@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Mono"; src: url("fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* "Carbon copy": cool paper, ink, carbon blue for structure, highlighter only for hidden data */
:root {
  --paper: #edf0f3;
  --sheet: #f8f9fb;
  --ink: #16191f;
  --muted: #4a5160;
  --carbon: #22337a;
  --rule: #c9d0da;
  --hi: #f3d547;
  --hi-ink: #16191f;
  --bad: #a4231c;
  --ok: #2d6b45;
  --warn: #8a5a00;
  --term: #1b2240;
  --term-ink: #dfe4f2;
  --term-dim: #9aa6c7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12151c; --sheet: #191d26; --ink: #e6e9ef; --muted: #a3abba; --carbon: #9fb0f2;
    --rule: #2c3240; --hi: #d9bd34; --bad: #f08a80; --ok: #7cc79a; --warn: #e2b45a;
    --term: #0d1120; --term-ink: #dfe4f2; --term-dim: #8792b3;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 "Atkinson", system-ui, sans-serif; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
a { color: var(--carbon); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--carbon); outline-offset: 3px; border-radius: 2px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.mark { font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 16px; }
nav a:hover { color: var(--ink); text-decoration: underline; }

/* type scale (1.25) */
h1 { font-size: clamp(38px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.025em; margin: 64px 0 20px; max-width: 14ch; font-weight: 700; }
h2 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 14px; font-weight: 700; }
p, li, dt { max-width: 66ch; }
.lede { font-size: 21px; color: var(--muted); margin: 0 0 36px; max-width: 58ch; }
section { padding: 88px 0 0; }
section.hero { padding-top: 0; }
.note { font-size: 16px; color: var(--muted); }

/* the specimen: the one bold thing */
.specimen { margin: 0 0 8px; }
.switch { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; padding: 3px; background: var(--sheet); margin-bottom: 12px; }
.switch button { font: 700 15px/1 "Atkinson", sans-serif; border: 0; background: transparent; color: var(--muted); padding: 9px 14px; border-radius: 4px; cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--carbon); color: #fff; }
html:not(.js) .switch { display: none; }
html.js .pane[hidden] { display: none; }
html:not(.js) .pane + .pane { margin-top: 12px; }
pre { margin: 0; background: var(--term); color: var(--term-ink); border-radius: 8px; padding: 18px 20px; overflow-x: auto;
      font: 15px/1.65 "Atkinson Mono", ui-monospace, Consolas, monospace; }
pre code { font: inherit; white-space: pre-wrap; word-break: break-word; }
pre .prompt { color: var(--term-dim); }
pre .exit { color: var(--term-dim); }
/* highlighter: hidden data is marked like a reviewer would mark it */
pre .bad { background: linear-gradient(transparent 8%, var(--hi) 8%, var(--hi) 92%, transparent 92%) no-repeat 0 0 / 100% 100%;
           color: var(--hi-ink); padding: 0 3px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Motion: the highlighter is the animation. One swipe per hidden line, in reading order. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-pane="before"] pre .bad { background-size: 0% 100%; color: var(--term-ink);
      transition: background-size .42s cubic-bezier(.3,.7,.2,1) calc(var(--i, 0) * 110ms + 250ms),
                  color .2s linear calc(var(--i, 0) * 110ms + 380ms); }
  html.js [data-pane="before"].marked pre .bad { background-size: 100% 100%; color: var(--hi-ink); }
  html.js [data-pane="after"] pre .ok { opacity: 0; transform: translateX(-6px);
      transition: opacity .3s ease calc(var(--i, 0) * 120ms + 80ms), transform .3s ease calc(var(--i, 0) * 120ms + 80ms); }
  html.js [data-pane="after"].marked pre .ok { opacity: 1; transform: none; }
  .switch button { transition: background-color .2s ease, color .2s ease; }
  :root { interpolate-size: allow-keywords; }
  .formats details::details-content { block-size: 0; overflow: hidden; transition: block-size .28s ease, content-visibility .28s allow-discrete; }
  .formats details[open]::details-content { block-size: auto; }
  .formats summary .fmt::before { transition: transform .2s ease; }
}
pre .ok { color: #8fe0ad; }
pre .warn { color: #f2c66b; }
.caption { font-size: 15px; color: var(--muted); margin: 10px 0 0; }

/* steps: a real sequence, so numbered */
.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 8px 0 28px; }
.steps li { counter-increment: s; position: relative; padding: 14px 0 14px 52px; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 34px; height: 34px; border-radius: 50%;
                    border: 2px solid var(--carbon); color: var(--carbon); font-weight: 700; display: grid; place-items: center; font-size: 16px; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: 15px; }
.verdicts td:last-child, .verdicts th:last-child { text-align: right; padding-right: 0; width: 6em; }
.v { font-weight: 700; white-space: nowrap; }
.v.ok, .state.ok { color: var(--ok); }
.v.warn, .state.warn { color: var(--warn); }
.v.bad, .state.bad { color: var(--bad); }

.formats details { border-top: 1px solid var(--rule); }
.formats details:last-child { border-bottom: 1px solid var(--rule); }
.formats summary { cursor: pointer; padding: 14px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; list-style: none; }
.formats summary::-webkit-details-marker { display: none; }
.formats summary .fmt { font-weight: 700; font-size: 19px; }
.formats summary .fmt::before { content: "+"; display: inline-block; width: 1.2em; color: var(--carbon); }
.formats details[open] summary .fmt::before { content: "\2212"; }
.formats summary .tally { color: var(--muted); font-size: 16px; }
.formats table { margin: 0 0 16px; }
.formats td.state { width: 44%; }

/* results */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; margin: 16px 0 20px; }
.figures div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.figures dt { font-size: 16px; }
.figures dd { margin: 0; font-weight: 700; font-size: 26px; font-variant-numeric: tabular-nums; }
.figures div:first-child dd { color: var(--ok); }

.foot { margin-top: 72px; border-top: 1px solid var(--rule); padding: 20px 0 48px; font-size: 15px; color: var(--muted); }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }

article h1 { font-size: clamp(32px, 6vw, 46px); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  section { padding-top: 64px; }
  .verdicts th:first-child { width: 36%; }
  .verdicts td:last-child, .verdicts th:last-child { width: 3.2em; }
  .v { white-space: normal; }
  h1 { margin-top: 40px; }
  pre { font-size: 13.5px; padding: 14px; }
  .formats td.state { width: 50%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
