@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations"); }

*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #fbfaf7; --fg: #111111; --copy: #666666; --muted: #737373; --dot: #a3a3a3;
  --card-border: rgba(15, 23, 42, 0.09); --card-border-hover: rgba(15, 23, 42, 0.16); --chip: rgba(15, 23, 42, 0.045);
  --grid: rgba(15, 23, 42, 0.07); --axis: rgba(15, 23, 42, 0.28);
  --c-blue: #2a78d6; --c-orange: #eb6834; --c-aqua: #1baf7a; --c-yellow: #eda100; --c-grey: #888780;
  --c-good: #0ca30c; --c-bad: #d03b3b; --tone-live: #15803d; --tip-bg: #ffffff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html.dark {
  --bg: #0a0a0a; --fg: #f5f5f5; --copy: #a3a3a3; --muted: #9a9a9a; --dot: #525252;
  --card-border: rgba(255, 255, 255, 0.08); --card-border-hover: rgba(255, 255, 255, 0.16); --chip: rgba(255, 255, 255, 0.05);
  --grid: rgba(255, 255, 255, 0.07); --axis: rgba(255, 255, 255, 0.28);
  --c-blue: #3987e5; --c-orange: #d95926; --c-aqua: #199e70; --c-yellow: #c98500; --c-grey: #8a8a85;
  --c-good: #2fbf2f; --c-bad: #e66767; --tone-live: #4ade80; --tip-bg: #171717;
}
html { background: var(--bg); color-scheme: light; scrollbar-gutter: stable; }
html.dark { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
.page { display: grid; justify-items: center; padding: clamp(2.5rem, 8vh, 5rem) clamp(1rem, 4vw, 4rem); }
.shell { width: min(100%, 54rem); min-width: 0; }
.shell * { min-width: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.25rem; animation: drop 620ms var(--ease) 40ms backwards; }
.back { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); transition: color 200ms ease; }
.back:hover { color: var(--fg); }
.back span, .label span { color: var(--dot); }
.toggle { appearance: none; border: 1px solid var(--card-border); background: transparent; color: var(--muted); font: inherit; font-family: var(--mono); font-size: 0.72rem; padding: 0.35rem 0.6rem; cursor: pointer; }
.toggle:hover { color: var(--fg); border-color: var(--card-border-hover); }

h1 { margin: 0; font-size: clamp(1.45rem, 3.5vw, 1.65rem); font-weight: 600; letter-spacing: -0.018em; line-height: 1.1; animation: unmask 780ms var(--ease) 180ms backwards; }
.intro { margin: 1rem 0 0; max-width: 40rem; font-size: clamp(1rem, 1.8vw, 1.12rem); line-height: 1.55; letter-spacing: -0.01em; animation: unmask 780ms var(--ease) 300ms backwards; }

/* Badge row: the README's shields, drawn in the site's own hairline style. */
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.badge { display: inline-flex; font-family: var(--mono); font-size: 0.7rem; line-height: 1; border: 1px solid var(--card-border-hover);
  animation: unmask 600ms var(--ease) backwards; transition: border-color 150ms ease, transform 150ms ease; }
.badge > span { padding: 0.32rem 0.45rem; }
.badge > span:first-child { color: var(--muted); }
.badge > span + span { background: var(--chip); border-left: 1px solid var(--card-border); color: var(--fg); }
a.badge:hover { border-color: var(--fg); transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--card-border-hover); }
.badge i { display: inline-block; width: 0.42rem; height: 0.42rem; margin-right: 0.35rem; vertical-align: 0.05em; }

.label { margin: 0 0 0.8rem; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; }
section { margin-top: 2.6rem; }

.tablewrap { overflow-x: auto; border: 1px solid var(--card-border); }
.step-table { margin-top: 1.4rem; }
.step-table table { font-size: 0.82rem; }
.step-table td, .step-table th { padding: 0.5rem 0.6rem; }
.step-table th { white-space: normal; vertical-align: bottom; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td { text-align: left; padding: 0.62rem 0.75rem; border-bottom: 1px solid var(--card-border); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.stage { white-space: normal; min-width: 12rem; }
td.stage small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 0.1rem; }
tr.best td { font-weight: 600; }
tbody tr { animation: rowin 520ms var(--ease) backwards; }
tbody tr:nth-child(1) { animation-delay: 480ms; } tbody tr:nth-child(2) { animation-delay: 540ms; } tbody tr:nth-child(3) { animation-delay: 600ms; }
tbody tr:nth-child(4) { animation-delay: 660ms; } tbody tr:nth-child(5) { animation-delay: 720ms; }
.kept { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.kept i { width: 0.42rem; height: 0.42rem; background: var(--dot); }
.kept.yes { color: var(--tone-live); } .kept.yes i { background: #22c55e; }
.kept.no { color: var(--c-bad); } .kept.no i { background: var(--c-bad); }
ul.points { margin: 0.9rem 0 0; padding: 0; list-style: none; }
ul.points li { position: relative; padding-left: 1rem; color: var(--copy); font-size: 0.9rem; line-height: 1.55; }
ul.points li + li { margin-top: 0.2rem; }
ul.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.32rem; height: 0.32rem; background: var(--dot); }
ul.points b { color: var(--fg); font-weight: 550; }
.note { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.note b { color: var(--copy); font-weight: 550; }

.measured { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cell { border: 1px solid var(--card-border); margin: 0 -1px -1px 0; padding: 0.9rem 1rem; }
.cell .k { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.cell p { margin: 0.35rem 0 0; font-size: 0.84rem; line-height: 1.45; color: var(--copy); }
.cell a { border-bottom: 1px solid var(--card-border-hover); }

/* Step selector: same plain-text nav and sliding underline as the site's top bar. */
.stepnav { position: relative; display: flex; flex-wrap: wrap; gap: 0 1.4rem; border-bottom: 1px solid var(--card-border); }
.stepnav button { appearance: none; border: 0; background: transparent; padding: 0 0 0.55rem; color: var(--muted); font: inherit; font-size: 0.88rem; font-weight: 450; cursor: pointer; transition: color 200ms ease; }
.stepnav button span { font-family: var(--mono); font-size: 0.7rem; color: var(--dot); margin-right: 0.35rem; }
.stepnav button:hover, .stepnav button[aria-selected="true"] { color: var(--fg); }
.stepnav button:focus-visible, .switch button:focus-visible, .toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.stepnav .bar { position: absolute; bottom: -1px; left: 0; height: 1px; background: var(--fg); transition: transform 320ms var(--ease), width 320ms var(--ease); }
.panel { border: 1px solid var(--card-border); border-top: 0; padding: 1.2rem 1.3rem 1.3rem; }
.panel[hidden] { display: none; }
.panel.enter { animation: switchin 320ms ease-out; }
.panel h3 { margin: 0; font-size: 1.02rem; font-weight: 550; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.panel h3 a { font-family: var(--mono); font-size: 0.72rem; font-weight: 400; color: var(--muted); }
.panel h3 a:hover { color: var(--fg); }
.panel ul.points { margin-top: 0.6rem; }
.fig { position: relative; margin-top: 1.1rem; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.fig text.strong { fill: var(--fg); font-family: Inter, ui-sans-serif, sans-serif; font-size: 11.5px; }
.fig text.bold { fill: var(--fg); font-weight: 600; }
.fig .grid { stroke: var(--grid); } .fig .axis { stroke: var(--axis); }
.caption { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.caption a { border-bottom: 1px solid var(--card-border-hover); }
.caption a:hover { color: var(--fg); }
.switch { display: inline-flex; margin-top: 0.9rem; border: 1px solid var(--card-border); }
.switch button { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-family: var(--mono); font-size: 0.72rem; padding: 0.4rem 0.7rem; cursor: pointer; transition: color 160ms ease, background 160ms ease; }
.switch button + button { border-left: 1px solid var(--card-border); }
.switch button[aria-pressed="true"] { color: var(--fg); background: var(--chip); }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.7rem; font-size: 0.76rem; color: var(--copy); }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.sw { width: 0.6rem; height: 0.6rem; display: inline-block; }
.sw.round { border-radius: 50%; } .sw.hollow { background: transparent !important; border: 1.6px solid; }
.sw.line { height: 0; width: 0.9rem; border-top: 1.5px dashed; }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--tip-bg); border: 1px solid var(--card-border-hover); padding: 0.45rem 0.6rem;
  font-size: 0.76rem; line-height: 1.45; color: var(--fg); max-width: 16rem; opacity: 0; transform: translateY(3px); transition: opacity 120ms ease, transform 120ms ease;
  box-shadow: 2px 2px 0 var(--card-border); }
.tip.on { opacity: 1; transform: none; }
.tip .k { color: var(--muted); font-family: var(--mono); font-size: 0.7rem; }

.lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lists .cell { padding: 1rem 1.1rem; }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--card-border); font-family: var(--mono); font-size: 0.74rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
footer a:hover { color: var(--fg); }

/* Justified text blocks: straight right edges, hyphenation keeps the spacing even. */
.intro, ul.points li, .note, .caption { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
.intro { max-width: none; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.mk { opacity: 0; transform-box: fill-box; transform-origin: center; }
.fig.in .mk { opacity: 1; transition: opacity 500ms var(--ease) var(--d, 0ms), transform 650ms var(--ease) var(--d, 0ms); }
.mk.pop { transform: scale(0.2); } .fig.in .mk.pop { transform: none; }
.mk.grow { transform: scaleX(0); transform-origin: left center; } .fig.in .mk.grow { transform: none; }
.mk.growl { transform: scaleX(0); transform-origin: right center; } .fig.in .mk.growl { transform: none; }
.mk.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); opacity: 1; }
.fig.in .mk.draw { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--ease) var(--d, 0ms); }
.pos { transition: transform 600ms var(--ease); }
.dim { opacity: 0.15 !important; transition: opacity 160ms ease; }

@keyframes unmask { from { opacity: 0; transform: translateY(0.28em); } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px) scale(0.96); } }
@keyframes rowin { from { opacity: 0; transform: perspective(900px) rotateX(9deg) translateY(8px); } }
@keyframes switchin { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 48rem) {
  .measured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lists { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .mk { opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}

/* Former inline styles. */
.s1 { margin-bottom:-1px }
.s2 { margin-top:0.2rem }
.s3 { color:var(--muted) }
.s4 { background:var(--muted) }
.s5 { color:var(--c-bad) }
.s6 { background:var(--c-blue) }
.s7 { background:var(--c-orange) }
.s8 { background:var(--c-grey);transform:rotate(45deg) scale(.8) }
.s9 { background:var(--c-good) }
.s10 { background:var(--c-bad) }
.s11 { color:var(--c-grey) }
.s12 { color:var(--c-orange) }
