
:root {
  --paper: #F6F7F3;
  --paper-line: #DCE3DA;
  --panel: #FFFFFF;
  --ink: #1F2A24;
  --muted: #5B6B62;
  --forest: #1B4332;
  --forest-deep: #10261C;
  --gold: #93690A;
  --gold-bg: #FBF2DD;
  --brick: #9C3B2E;
  --brick-bg: #F7E9E6;
  --neutral-bg: #ECEEEA;
  --radius: 10px;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--forest); }
a:hover { color: var(--forest-deep); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px 80px; }

nav.top {
  background: var(--forest-deep);
  padding: 14px 24px;
}
nav.top .wrap {
  padding: 0;
  display: flex;
  gap: 22px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
}
nav.top a { color: rgba(243,246,242,0.82); text-decoration: none; }
nav.top a.current { color: #F3F6F2; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
nav.top a:hover { color: #F3F6F2; }

header.hero { background: var(--forest); color: #F3F6F2; padding: 44px 24px 40px; }
header.hero .wrap { padding: 0; }
.pipeline { display: flex; align-items: center; gap: 0; margin-bottom: 30px; flex-wrap: wrap; }
.pipeline .stage {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em;
  padding: 7px 13px; border: 1px solid rgba(243,246,242,0.35); border-radius: 999px; white-space: nowrap;
}
.pipeline .arrow { width: 22px; height: 1px; background: rgba(243,246,242,0.35); margin: 0 6px; }
h1 { font-size: 29px; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; }
.hero p.lede { font-size: 16.5px; max-width: 56ch; color: rgba(243,246,242,0.86); margin: 0; }

.stat-block {
  display: flex; gap: 0; margin: 28px 0 6px; background: var(--panel);
  border: 1px solid var(--paper-line); border-radius: var(--radius); overflow: hidden;
}
.stat-block .stat { flex: 1; padding: 22px 20px; text-align: center; }
.stat-block .stat + .stat { border-left: 1px solid var(--paper-line); }
.stat-block .stat .num { font-family: var(--mono); font-size: 34px; font-weight: 600; color: var(--forest-deep); }
.stat-block .stat.baseline .num { color: var(--muted); }
.stat-block .stat .label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.stat-caption { font-size: 12.5px; color: var(--muted); text-align: center; margin: 8px 0 0; }

h2.section-title {
  font-size: 14px; font-family: var(--mono); color: var(--muted); font-weight: 500; margin: 44px 0 6px;
}

.build-steps { counter-reset: step; margin: 18px 0; padding: 0; list-style: none; }
.build-steps li {
  counter-increment: step; position: relative; padding: 4px 0 18px 40px; border-left: 1px solid var(--paper-line); margin-left: 14px;
}
.build-steps li:last-child { border-left: 1px solid transparent; padding-bottom: 0; }
.build-steps li::before {
  content: counter(step); position: absolute; left: -14px; top: 2px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--forest); color: #F3F6F2;
  font-family: var(--mono); font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.build-steps li b { color: var(--forest-deep); }
.build-steps li p { margin: 4px 0 0; font-size: 15px; }

.note {
  background: var(--panel); border: 1px solid var(--paper-line); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 18px 20px; margin: 28px 0 8px; font-size: 15px; color: var(--ink);
}
.note strong { color: var(--forest-deep); }

.tally {
  display: flex; gap: 22px; margin: 26px 0 6px; padding: 14px 0;
  border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line);
  font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.tally b { color: var(--ink); font-size: 15px; }

details.example {
  background: var(--panel); border: 1px solid var(--paper-line); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
details.example > summary {
  list-style: none; cursor: pointer; padding: 16px 18px;
  display: flex; align-items: baseline; gap: 14px; justify-content: space-between;
}
details.example > summary::-webkit-details-marker { display: none; }
details.example > summary .q-text { font-size: 15.5px; flex: 1; }
.badge {
  font-family: var(--mono); font-size: 11.5px; padding: 4px 9px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
}
.badge.correct { background: var(--gold-bg); color: var(--gold); }
.badge.incorrect { background: var(--brick-bg); color: var(--brick); }
.badge.unknown { background: var(--neutral-bg); color: var(--muted); }
.example-body { padding: 4px 18px 20px; border-top: 1px solid var(--paper-line); }
.example-body .meta-row {
  display: flex; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 14px 0 18px;
}
.candidate {
  border: 1px solid var(--paper-line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
  font-size: 14px; white-space: pre-wrap;
}
.candidate.selected { border-color: var(--gold); background: var(--gold-bg); }
.candidate .candidate-head {
  display: flex; justify-content: space-between; align-items: center; font-family: var(--mono);
  font-size: 11.5px; color: var(--muted); margin-bottom: 8px; white-space: normal;
}
.candidate.selected .candidate-head { color: var(--gold); }
.candidate-text { color: var(--ink); }
.final-row {
  display: flex; gap: 24px; align-items: center; margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--paper-line); font-family: var(--mono); font-size: 13px;
}
.final-row .final-answer { font-size: 15px; }
.final-row .final-answer b { color: var(--forest-deep); }

.links { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; margin: 30px 0 4px; }

footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--paper-line); font-size: 13.5px; color: var(--muted); }
footer a { color: var(--forest); }

@media (max-width: 600px) {
  header.hero { padding: 34px 20px 28px; }
  h1 { font-size: 24px; }
  .pipeline .stage { font-size: 11px; padding: 6px 10px; }
  .stat-block { flex-direction: column; }
  .stat-block .stat + .stat { border-left: none; border-top: 1px solid var(--paper-line); }
}
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
