/* Product site: bone paper, ink and one deep emerald, like the TD mark; sable is a rare highlight. Neutral
   greys without a blue cast in both themes. Light is the default; dark is a choice (theme.js).
   IBM Plex is self-hosted (fonts/, SIL Open Font License in fonts/OFL.txt); Japanese falls back to
   the system font. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plex-sans-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plex-sans-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/plex-sans-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/plex-sans-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/plex-sans-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/plex-sans-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plex-mono-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plex-mono-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #f7f5f0;
  --bg-soft: #efece4;
  --surface: #fffdf9;
  --bg-code: #f1eee7;
  --text: #14171a;
  --text-soft: #535a60;
  --border: #e3ded3;
  --line: #cfc8ba;
  --accent: #0b6b4f;
  --accent-strong: #08533d;
  --accent-soft: #e2efe8;
  --sable: #c8782e;
  --ok: #0b6b4f;
  --ok-soft: #e2efe8;
  --bar: #0b6b4f;
  --diff-del: #b4402a;
  --button-ink: #fff;
  --ink: #15191c;
  --ink-soft: #1f2428;
  --ink-text: #ecebe6;
  --ink-muted: #a6aaa7;
  --ink-accent: #7fd6b0;
  --shadow: 0 1px 2px rgba(20, 23, 26, 0.05), 0 14px 34px -14px rgba(20, 23, 26, 0.16);
  --radius: 10px;
  --wrap: 1160px;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121212;
  --bg-soft: #191919;
  --surface: #1c1c1b;
  --bg-code: #1e1e1d;
  --text: #ecebe6;
  --text-soft: #a3a39e;
  --border: #2c2c2a;
  --line: #45453f;
  --accent: #3fb68b;
  --accent-strong: #6fd0a8;
  --accent-soft: #16271f;
  --sable: #e39a52;
  --ok: #3fb68b;
  --ok-soft: #16271f;
  --bar: #3fb68b;
  --diff-del: #ef8a73;
  --button-ink: #0d1a14;
  --ink: #0b0b0b;
  --ink-soft: #171717;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 8px 12px; z-index: 10; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-soft); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--text-soft); font-size: 0.95rem; }
.nav-link:hover, .nav-link[aria-current] { color: var(--text); text-decoration: none; }
.nav-sponsor { display: inline-flex; align-items: center; gap: 6px; }
.nav-sponsor svg { flex: none; color: var(--sable); }
/* Narrower screens: the heart alone, its label kept for screen readers, so the menu fits on one line. */
.nav-link { white-space: nowrap; }
@media (max-width: 800px) { .nav-sponsor-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
@media (max-width: 640px) { .nav-extra { display: none; } .main-nav { gap: 14px; } }
@media (max-width: 420px) { .main-nav .button-small { display: none; } }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px;
  background: var(--accent); color: var(--button-ink); font-weight: 600;
  border: 1px solid var(--accent);
}
.button:hover { background: var(--accent-strong); border-color: var(--accent-strong); text-decoration: none; }
.button-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.button-ghost:hover { background: var(--bg-soft); border-color: var(--border); }
.button-small { padding: 6px 14px; font-size: 0.9rem; }
.button[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }
.button-large { padding: 13px 24px; font-size: 1.02rem; }
.button-light { background: var(--ink-text); color: var(--ink); border-color: var(--ink-text); }
.button-light:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--ink); }
.button-outline-light { background: transparent; color: var(--ink-text); border-color: rgba(255, 255, 255, 0.3); }
.button-outline-light:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); }

/* Hero */
.hero { padding: 88px 0 72px; background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 78%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--accent-strong); font-size: 0.85rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.06; letter-spacing: -0.025em; margin: 20px 0 18px; }
.hero p.lead { font-size: 1.22rem; color: var(--text-soft); max-width: 30em; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 26px 0 0; color: var(--text-soft); font-size: 0.92rem; }
.trust-points li { position: relative; padding-left: 22px; }
.trust-points li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .hero { padding: 56px 0 48px; } }

/* The pull request check in the hero */
.check-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.check-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.check-title { font-weight: 600; font-size: 0.92rem; flex: 1; }
.badge-ok { padding: 2px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 0.8rem; font-weight: 700; }
.check-body { padding: 22px 22px 18px; }
.check-saving { margin: 0 0 18px; font-size: 1.05rem; color: var(--text-soft); }
.check-saving strong { font-size: 3rem; line-height: 1; letter-spacing: -0.04em; color: var(--text); margin-right: 6px; }
.bars { display: grid; gap: 12px; margin-bottom: 20px; }
.bar-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 0.88rem; }
.bar-label { font-weight: 600; }
.bar-track { height: 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; }
.bar-all { width: 100%; background: var(--line); }
.bar-selected { width: 6%; background: var(--accent); }
.bar-value { color: var(--text-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.check-list { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 0.9rem; color: var(--text-soft); }
.check-list li { position: relative; padding-left: 26px; }
.check-list strong { color: var(--text); margin-right: 6px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; }
.check-list .is-run::before { background: var(--ok-soft); box-shadow: inset 0 0 0 1.5px var(--ok); }
.check-list .is-skip::before { background: var(--bg-soft); box-shadow: inset 0 0 0 1.5px var(--line); }
.check-card figcaption { padding: 12px 22px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-soft); background: var(--bg-soft); }
@media (max-width: 480px) { .bar-row { grid-template-columns: minmax(0, 1fr) auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* Repositories it was measured on */
.logos { padding: 36px 0; border-bottom: 1px solid var(--border); }
.logos-title { text-align: center; color: var(--text-soft); font-size: 0.9rem; margin: 0 0 16px; }
.logo-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; padding: 0; margin: 0; }
.logo-list li { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1.02rem; color: var(--text-soft); white-space: nowrap; }
.logo-list img { width: 28px; height: 28px; object-fit: contain; filter: grayscale(1) contrast(1.1); opacity: 0.7; transition: filter 0.3s ease, opacity 0.3s ease; }
.logo-list li:hover img { filter: none; opacity: 1; }
:root[data-theme="dark"] .logo-list img { filter: grayscale(1) brightness(1.6); }
:root[data-theme="dark"] .logo-list li:hover img { filter: none; }
.logos-note { text-align: center; margin: 14px 0 0; font-size: 0.78rem; color: var(--text-soft); opacity: 0.8; }

/* Dark band with the corpus numbers */
.band { background: var(--ink); color: var(--ink-text); padding: 72px 0; }
.band-head { max-width: 40em; margin: 0 auto 40px; text-align: center; }
.band-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 12px; color: #fff; }
.band-head p { margin: 0; color: var(--ink-muted); font-size: 1.08rem; }
.band-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255, 255, 255, 0.1); border-radius: var(--radius); overflow: hidden; }
.band-stats div { background: var(--ink-soft); padding: 26px 24px; }
.band-stats strong { display: block; font-size: 2.4rem; letter-spacing: -0.03em; line-height: 1.1; color: #fff; margin-bottom: 8px; }
.band-stats span { color: var(--ink-muted); font-size: 0.93rem; }
.band-link { text-align: center; margin: 28px 0 0; }
.band-note { max-width: 46em; margin: 20px auto 0; text-align: center; color: var(--ink-muted); font-size: 0.86rem; }
.band a { color: var(--ink-accent); }
@media (max-width: 860px) { .band-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .band-stats { grid-template-columns: 1fr; } }

/* Closing call to action */
.cta { background: var(--ink); color: var(--ink-text); padding: 80px 0; }
.cta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.025em; line-height: 1.2; margin: 0 auto 12px; max-width: 22em; color: #fff; }
.cta p { color: var(--ink-muted); margin: 0 0 30px; font-size: 1.08rem; }

.center-head { margin-left: auto; margin-right: auto; text-align: center; }
.align-center { align-items: center; }
.link-list a { display: block; margin: 6px 0; font-weight: 600; }
pre.code.code-dark { background: var(--ink); color: var(--ink-text); border-color: var(--ink); box-shadow: var(--shadow); }

/* Terminal */
.terminal { background: var(--ink); color: var(--ink-text); border-radius: var(--radius); border: 1px solid var(--ink-soft); box-shadow: var(--shadow); overflow: hidden; }
.terminal-bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--ink-soft); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a3f43; }
.terminal pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 0.78rem; line-height: 1.6; background: none; border: 0; }
.t-dim { color: #8d928f; } .t-ok { color: #7fd6b0; } .t-acc { color: #f0b273; } .t-skip { color: #7d827f; }

/* Sections */
section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 44em; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -0.025em; line-height: 1.2; margin: 0 0 12px; }
.section-head p { color: var(--text-soft); margin: 0; font-size: 1.05rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-soft); }
.step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }

/* Proof */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; }
.stat strong { display: block; font-size: 2rem; letter-spacing: -0.02em; line-height: 1.2; }
.stat span { color: var(--text-soft); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }


/* Docs */
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-top: 32px; padding-bottom: 64px; }
.docs-sidebar details { position: sticky; top: 84px; }
.docs-sidebar summary { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); cursor: default; list-style: none; margin-bottom: 8px; }
.docs-sidebar summary::-webkit-details-marker { display: none; }
.docs-sidebar ul { list-style: none; padding: 0; margin: 0; }
.docs-sidebar a { display: block; padding: 6px 12px; border-radius: 6px; color: var(--text-soft); font-size: 0.95rem; }
.docs-sidebar a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.docs-sidebar a[aria-current] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .docs-sidebar details { position: static; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
  .docs-sidebar summary { cursor: pointer; margin: 0; list-style: revert; }
}
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.pager a { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; }
.pager a span { font-size: 0.8rem; font-weight: 500; color: var(--text-soft); }
.pager-next { text-align: right; margin-left: auto; }

/* Long-form text: docs and legal pages */
.prose { max-width: 760px; }
.prose h1 { font-size: 2.2rem; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 12px; }
.prose h2 { font-size: 1.45rem; letter-spacing: -0.015em; margin: 44px 0 10px; padding-top: 8px; }
.prose h3 { font-size: 1.1rem; margin: 30px 0 8px; }
.prose p.lead { font-size: 1.15rem; color: var(--text-soft); margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose :not(pre) > code { background: var(--bg-code); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 0.86em; }
.prose pre, pre.code { background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; line-height: 1.55; font-size: 0.85rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 16px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 650; background: var(--bg-soft); }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--bg-soft); border-radius: 8px; padding: 14px 16px; margin: 20px 0; }
.callout p { margin: 0; }
.legal { padding-top: 48px; padding-bottom: 64px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 28px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); margin: 4px 0 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a:not(.brand) { color: var(--text); }
.footer-base { margin-top: 28px; font-size: 0.85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Not found */
.not-found { text-align: center; padding: 96px 20px; }
.not-found img { width: 120px; }

.center { text-align: center; }
.center .section-head { margin-left: auto; margin-right: auto; }
.center .hero-actions { justify-content: center; }

/* Terminal replay: lines appear one after another, the command types itself. CSS only (the CSP allows no scripts). */
.terminal pre .l { display: block; white-space: pre-wrap; padding-left: 4ch; text-indent: -4ch; }
/* Table lines keep their box: they scroll with the terminal instead of wrapping. */
.terminal pre .l.tbl { white-space: pre; padding-left: 0; text-indent: 0; }
.replay .l { opacity: 0; animation: line-in 0.01s linear forwards; }
.replay .type { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; width: 0; animation: type-in 1.1s steps(33, end) 0.3s forwards; }
.replay .l-cmd { opacity: 1; animation: none; }
.replay .l:nth-child(2) { animation-delay: 1.9s; }
.replay .l:nth-child(3) { animation-delay: 2.3s; }
.replay .l:nth-child(4) { animation-delay: 2.5s; }
.replay .l:nth-child(5) { animation-delay: 2.6s; }
.replay .l:nth-child(6) { animation-delay: 2.9s; }
.replay .l:nth-child(7) { animation-delay: 4.4s; }
.replay .l:nth-child(8) { animation-delay: 4.9s; }
.replay .l:nth-child(9) { animation-delay: 5.0s; }
.replay .l:nth-child(10) { animation-delay: 5.1s; }
.replay .l:nth-child(11) { animation-delay: 5.2s; }
.replay .l:nth-child(12) { animation-delay: 5.3s; }
@keyframes line-in { to { opacity: 1; } }
@keyframes type-in { to { width: 34ch; } }
@media (prefers-reduced-motion: reduce) {
  .replay .l, .replay .type { animation: none; opacity: 1; width: auto; }
}

/* Diff lines in code blocks */
.diff-add { color: var(--ok); }
.diff-del { color: var(--diff-del); }
.wrap-code code { white-space: pre-wrap; word-break: break-all; }

/* A GitHub job summary, as it renders on a pull request */
.gh-summary { border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 22px 14px; background: var(--surface); font-size: 0.93rem; }
.gh-summary h3 { margin: 16px 0 8px; font-size: 1.15rem; }
.gh-summary ul ul { margin-top: 4px; }
.gh-summary li { margin: 3px 0; }

/* Charts: one hue, thin bars, recessive grid; text in text colors */
.chart-figure { margin: 20px 0; }
.chart { width: 100%; height: auto; font: 12px var(--font); }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis, .chart .value { fill: var(--text-soft); }
.chart .label { fill: var(--text); }
.chart .bar { fill: var(--bar); }
.chart .hit { fill: transparent; }
.chart .row:hover .hit { fill: var(--bg-soft); }
.chart .row:hover .value { fill: var(--text); font-weight: 600; }

.prose .terminal pre { background: none; border: 0; border-radius: 0; color: var(--ink-text); margin: 0; }
.prose .terminal { margin: 16px 0; }
.terminal a { color: var(--ink-accent); text-decoration: underline; }
.replay .l:nth-child(13) { animation-delay: 5.6s; }
.replay .type { text-indent: 0; }
.stats-note { margin: 28px 0 0; color: var(--text-soft); }

:lang(ja) body, body:lang(ja) { line-height: 1.85; }
:lang(ja) .prose, :lang(ja) .section-head p { overflow-wrap: anywhere; }

/* Header controls: language popover (native light dismiss, no script) and the theme switch */
.header-control { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 30px; min-width: 30px; padding: 0 8px; background: none; color: var(--text-soft); font: 600 0.85rem var(--font); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.header-control:hover { color: var(--text); background: var(--bg-soft); }
.header-control svg { width: 16px; height: 16px; }
.lang-popover { position: fixed; inset: 62px max(20px, calc((100vw - var(--wrap)) / 2 + 20px)) auto auto; margin: 0; padding: 6px; min-width: 160px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.45); }
.lang-popover ul { list-style: none; margin: 0; padding: 0; }
.lang-popover a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); }
.lang-popover a:hover { background: var(--bg-soft); text-decoration: none; }
.lang-popover a[aria-current] { color: var(--accent-strong); font-weight: 600; }
.theme-toggle .icon { display: none; }
.theme-toggle[data-mode="system"] .icon-system, .theme-toggle[data-mode="light"] .icon-light, .theme-toggle[data-mode="dark"] .icon-dark { display: block; }
.theme-toggle:not([data-mode]) { display: none; }
.center .hero p.lead, .center p.lead { margin-left: auto; margin-right: auto; }

/* Motion (motion.js sets .motion; without it, or with reduced motion, everything is simply shown) */
.motion [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }
.motion .band-stats [data-reveal]:nth-child(4) { transition-delay: 0.3s; }
.motion .bar-fill { width: 0; transition: width 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s; }
.motion .is-in .bar-all { width: 100%; }
.motion .is-in .bar-selected { width: 6%; transition-delay: 0.9s; }
.motion .check-list li { opacity: 0; transform: translateX(-8px); transition: opacity 0.4s ease, transform 0.4s ease; }
.motion .is-in .check-list li { opacity: 1; transform: none; }
.motion .is-in .check-list li:nth-child(1) { transition-delay: 1.6s; }
.motion .is-in .check-list li:nth-child(2) { transition-delay: 1.8s; }
.motion .is-in .check-list li:nth-child(3) { transition-delay: 2s; }
.badge-ok { transition: opacity 0.4s ease 2.3s; }
.motion .check-card:not(.is-in) .badge-ok { opacity: 0; }

/* Logo strip: one static row; with motion it scrolls slowly and pauses under the pointer */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; }
.marquee-track.is-moving { animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .logo-list { flex-wrap: nowrap; padding-right: 36px; }
@keyframes marquee { to { transform: translateX(-50%); } }
html:not(.motion) .marquee { mask-image: none; }
html:not(.motion) .marquee-track { width: auto; }
html:not(.motion) .marquee .logo-list { flex-wrap: wrap; padding-right: 0; }

/* Corpus distribution in the dark band: one bar per repository */
.dist { margin: 36px 0 0; padding: 24px 24px 18px; border-radius: var(--radius); background: var(--ink-soft); }
.dist-chart { display: block; width: 100%; height: auto; font: 12px var(--font); }
.dist-chart .grid { stroke: rgba(255, 255, 255, 0.08); }
.dist-chart .axis { fill: var(--ink-muted); }
.dist-chart .bar { fill: var(--ink-accent); opacity: 0.85; }
.dist-chart .row:hover .bar { opacity: 1; fill: #fff; }
.dist-chart .median { stroke: var(--sable); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dist-chart .median-label { fill: var(--sable); font-weight: 600; }
.dist figcaption { margin-top: 12px; color: var(--ink-muted); font-size: 0.9rem; text-align: center; }
.motion .dist-chart .bar { transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.motion .dist.is-in .dist-chart .bar { transform: none; }

/* Savings calculator (docs: time saved) */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.calc-inputs { display: grid; gap: 14px; padding: 28px; }
.calc-inputs label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.calc-inputs input { width: 100%; padding: 10px 12px; font: 1rem var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.calc-inputs input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.calc-results { padding: 28px; background: var(--ink); color: var(--ink-text); }
.calc-hero { margin-bottom: 20px; }
.calc-hero output { display: block; font-size: 3.2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink-accent); }
.calc-hero span { color: var(--ink-muted); }
.calc dl { margin: 0; display: grid; gap: 0; }
.calc dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.calc dt { color: var(--ink-muted); }
.calc dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-note { margin: 14px 0 0; color: var(--ink-muted); font-size: 0.82rem; }
@media (max-width: 860px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.docs-sidebar .nav-group { margin: 18px 0 6px; padding: 0 12px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); }
.docs-sidebar .nav-group:first-child { margin-top: 4px; }

/* How it decides: one real change traced from diff to the tests that run */
.trace { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 0.95fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.trace-col { position: relative; padding: 26px 24px; }
.trace-col + .trace-col { border-left: 1px solid var(--border); }
.trace-col + .trace-col::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); transform: translateY(-50%) rotate(45deg); }
.trace-label { margin: 0 0 14px; font: 600 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.trace-diff { margin: 0; padding: 14px 16px; background: var(--ink); color: var(--ink-text); border-radius: 8px; font-size: 0.72rem; line-height: 1.75; overflow-x: auto; white-space: pre; }
.trace-diff .trace-file { color: var(--ink-muted); }
.trace-diff .diff-add { color: #7fd6b0; } .trace-diff .diff-del { color: #f29a86; }
.trace-note { margin: 12px 0 0; font-size: 0.86rem; color: var(--text-soft); }
.trace-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.trace-steps li { position: relative; display: grid; gap: 2px; padding: 0 0 14px 34px; counter-increment: step; }
.trace-steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font: 700 0.75rem var(--mono); }
.trace-steps li:not(:last-child)::after { content: ""; position: absolute; left: 10.5px; top: 25px; bottom: 2px; width: 1px; background: var(--line); }
.step-name { font-weight: 600; font-size: 0.95rem; }
.step-result { font-size: 0.86rem; color: var(--text-soft); }
.dots { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.dots i { aspect-ratio: 1; border-radius: 3px; background: var(--line); opacity: 0.55; }
.dots i.hit { background: var(--accent); opacity: 1; box-shadow: 0 0 0 2px var(--accent-soft); }
.trace-result { margin: 16px 0 0; font-size: 1rem; }
.trace-result strong { font-size: 2rem; letter-spacing: -0.03em; color: var(--accent); margin-right: 4px; }
.trace-safety { margin: 20px 0 0; text-align: center; color: var(--text-soft); }
.trace-safety strong { color: var(--text); }
@media (max-width: 960px) {
  .trace { grid-template-columns: minmax(0, 1fr); }
  .trace-col + .trace-col { border-left: 0; border-top: 1px solid var(--border); }
  .trace-col + .trace-col::before { left: 50%; top: -7px; transform: translateX(-50%) rotate(135deg); }
}
.motion .trace .trace-steps li { opacity: 0.2; transition: opacity 0.5s ease; }
.motion .trace.is-in .trace-steps li { opacity: 1; }
.motion .trace.is-in .trace-steps li:nth-child(2) { transition-delay: 0.35s; }
.motion .trace.is-in .trace-steps li:nth-child(3) { transition-delay: 0.7s; }
.motion .trace.is-in .trace-steps li:nth-child(4) { transition-delay: 1.05s; }
.motion .trace.is-in .trace-steps li:nth-child(5) { transition-delay: 1.4s; }
.motion .trace .dots i { opacity: 1; background: var(--line); transition: background-color 0.4s ease, opacity 0.6s ease 1.8s, box-shadow 0.4s ease; }
.motion .trace.is-in .dots i { opacity: 0.55; }
.motion .trace .dots i.hit { opacity: 1; background: var(--line); box-shadow: none; }
.motion .trace.is-in .dots i.hit { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* Built for teams: big promises and a spec sheet */
.promises-section { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.promises { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.promises-intro h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 16px; }
.promises-intro p { color: var(--text-soft); font-size: 1.08rem; margin: 0 0 12px; }
.promise-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.promise-list div { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); }
.promise-list div:nth-child(odd) { padding-right: 28px; }
.promise-list div:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.promise-list dt { font: 600 3.4rem/1 var(--mono); letter-spacing: -0.04em; color: var(--accent); margin-bottom: 10px; }
.promise-list dt span { color: var(--line); margin: 0 0.1em; }
.promise-list dd { margin: 0; color: var(--text-soft); font-size: 0.92rem; }
.promise-list dd strong { display: block; color: var(--text); font-size: 1rem; margin-bottom: 4px; }
.spec { width: 100%; margin-top: 40px; border-collapse: collapse; font-size: 0.9rem; }
.spec th, .spec td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec th { width: 11em; font: 600 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); padding-top: 13px; }
.spec td { font-family: var(--mono); color: var(--text-soft); }
@media (max-width: 900px) { .promises { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 520px) { .promise-list { grid-template-columns: minmax(0, 1fr); } .promise-list div:nth-child(n) { padding: 18px 0; border-left: 0; } .spec th { width: 7em; } }

/* Syntax colours (highlight.mjs). Light code blocks use the ink-on-paper set; dark blocks and the
   dark theme use the set below. */
.tk-key { color: #0b6b4f; }
.tk-str { color: #9a4f12; }
.tk-com { color: #8a8f8c; font-style: italic; }
.tk-var { color: #6a3fa0; }
.tk-ph { color: #2f6f8f; font-style: italic; }
.tk-num { color: #b4402a; }
.tk-fn { color: var(--text); font-weight: 600; }
.tk-flag { color: #2f6f8f; }
.tk-kw { color: #0b6b4f; font-weight: 600; }
.tk-punct, .tk-prompt { color: #8a8f8c; }
:root[data-theme="dark"] pre, .code-dark, .editor-code, .trace-diff { --tk-key: #7fd6b0; }
:root[data-theme="dark"] .tk-key, .code-dark .tk-key, .editor-code .tk-key { color: #7fd6b0; }
:root[data-theme="dark"] .tk-str, .code-dark .tk-str, .editor-code .tk-str { color: #f0b273; }
:root[data-theme="dark"] .tk-com, .code-dark .tk-com, .editor-code .tk-com { color: #7d827f; }
:root[data-theme="dark"] .tk-var, .code-dark .tk-var, .editor-code .tk-var { color: #c4a7f5; }
:root[data-theme="dark"] .tk-ph, .code-dark .tk-ph, .editor-code .tk-ph { color: #8fc8e8; }
:root[data-theme="dark"] .tk-num, .code-dark .tk-num, .editor-code .tk-num { color: #f29a86; }
:root[data-theme="dark"] .tk-fn, .code-dark .tk-fn, .editor-code .tk-fn { color: #ecebe6; }
:root[data-theme="dark"] .tk-flag, .code-dark .tk-flag, .editor-code .tk-flag { color: #8fc8e8; }
:root[data-theme="dark"] .tk-kw, .code-dark .tk-kw, .editor-code .tk-kw { color: #7fd6b0; }
:root[data-theme="dark"] .tk-punct, .code-dark .tk-punct, .editor-code .tk-punct,
:root[data-theme="dark"] .tk-prompt, .code-dark .tk-prompt, .editor-code .tk-prompt { color: #7d827f; }

/* GitHub Actions: the two events on the left, the workflow file on the right, joined by colour */
.gha { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.gha-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.gha-step { position: relative; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); }
.gha-b { border-left-color: var(--sable); }
.gha-event { display: inline-block; margin-bottom: 8px; font: 600 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.gha-b .gha-event { color: var(--sable); }
.gha-step h3 { margin: 0 0 6px; font-size: 1.1rem; }
.gha-step p { margin: 0; color: var(--text-soft); font-size: 0.93rem; }
.gha-step .gha-summary { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text); }
.gha-store { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 0; }
.gha-store::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed var(--line); }
.gha-store-label, .gha-store code { position: relative; background: var(--bg); padding: 2px 10px; }
.gha-store-label { font: 600 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); }
.gha-store code { font-size: 0.82rem; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.gha-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; margin: 32px 0 0; font-weight: 600; }
.editor { margin: 0; background: var(--ink); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.editor-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--ink-soft); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.editor-dots { display: inline-flex; gap: 6px; }
.editor-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3f43; }
.editor-tab { font: 0.8rem var(--mono); color: var(--ink-text); padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); }
pre.editor-code { margin: 0; padding: 14px 0; background: none; border: 0; border-radius: 0; color: var(--ink-text); font-size: 0.8rem; line-height: 1.7; overflow-x: auto; counter-reset: line; }
.editor-code .line { display: block; padding: 0 18px 0 0; white-space: pre; counter-increment: line; border-left: 3px solid transparent; }
.editor-code .line::before { content: counter(line); display: inline-block; width: 3.2em; padding-right: 1em; text-align: right; color: #5c6266; }
.editor-code .mark-a { background: rgba(127, 214, 176, 0.09); border-left-color: #7fd6b0; }
.editor-code .mark-b { background: rgba(240, 178, 115, 0.09); border-left-color: #f0b273; }
@media (max-width: 960px) { .gha { grid-template-columns: minmax(0, 1fr); } }
.motion .gha .gha-step, .motion .gha .gha-store { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.motion .gha.is-in .gha-step, .motion .gha.is-in .gha-store { opacity: 1; transform: none; }
.motion .gha.is-in .gha-store { transition-delay: 0.4s; }
.motion .gha.is-in .gha-b { transition-delay: 0.8s; }
.motion .gha .mark-a, .motion .gha .mark-b { background: transparent; border-left-color: transparent; transition: background-color 0.6s ease, border-color 0.6s ease; }
.motion .gha.is-in .mark-a { background: rgba(127, 214, 176, 0.09); border-left-color: #7fd6b0; transition-delay: 0.3s; }
.motion .gha.is-in .mark-b { background: rgba(240, 178, 115, 0.09); border-left-color: #f0b273; transition-delay: 1.1s; }

/* Real run page: outcome strip, diff editor, decision chain, selected-vs-failed table, summary frame, log */
.outcome { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 28px 0 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.outcome div { padding: 18px 18px 16px; display: grid; grid-template-rows: auto auto 1fr; align-content: start; gap: 2px; }
.outcome-five .outcome-label { min-height: 3.9em; }
.outcome div + div { border-left: 1px solid var(--border); }
.outcome-label { font: 600 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); }
.outcome-was { color: var(--text-soft); text-decoration: line-through; text-decoration-color: var(--diff-del); font-size: 0.95rem; }
.outcome strong { font-size: 2.1rem; line-height: 1.1; letter-spacing: -0.03em; color: var(--accent); }
@media (max-width: 640px) { .outcome { grid-template-columns: repeat(2, minmax(0, 1fr)); } .outcome div:nth-child(3) { border-left: 0; } .outcome div:nth-child(n+3) { border-top: 1px solid var(--border); } }
.prose .editor { margin: 18px 0; }
.editor-meta { margin-left: auto; font: 0.75rem var(--mono); color: var(--ink-muted); }
.prose pre.editor-code { background: none; border: 0; border-radius: 0; padding: 14px 0; color: var(--ink-text); }
.editor-diff .editor-code .line.add { background: rgba(127, 214, 176, 0.12); border-left-color: #7fd6b0; color: #c9f2df; }
.editor-diff .editor-code .line.del { background: rgba(242, 154, 134, 0.12); border-left-color: #f29a86; color: #f8cfc5; }
.chain { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px 24px; margin: 20px 0 16px; }
.chain .chain-node { flex: 1 1 auto; }
.chain-node { position: relative; display: grid; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.chain-node:not(:last-child)::after { content: "→"; position: absolute; right: -20px; top: 50%; transform: translateY(-50%); color: var(--line); font-weight: 700; }
.chain-kind { font: 600 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); }
.prose .chain-node code { background: none; border: 0; padding: 0; font-size: 0.82rem; }
.chain-result { background: var(--accent); border-color: var(--accent); color: #fff; }
.chain-result .chain-kind { color: rgba(255, 255, 255, 0.8); }
.chain-result strong { font-size: 1rem; }
.dots-figure { margin: 8px 0 24px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.dots-wide { grid-template-columns: repeat(24, 1fr); gap: 5px; }
.dots-dense { grid-template-columns: repeat(20, 1fr); gap: 3px; }
.dots-figure figcaption { margin-top: 12px; font-size: 0.85rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.legend-hit, .legend-skip { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--accent); }
.legend-skip { background: var(--line); margin-left: 10px; }
.prose table.match { display: table; font-size: 0.88rem; }
.match td.pick { color: var(--accent); font-weight: 600; }
.match td.fail { color: var(--diff-del); font-weight: 600; }
.match td.ok { color: var(--ok); font-weight: 700; }
.match tr.others td { color: var(--text-soft); font-style: italic; }
.match tbody tr:hover td { background: var(--bg-soft); }
.summary-frame { margin: 18px 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.summary-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; }
.summary-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 0.75rem; }
.summary-job { margin-left: auto; font: 0.78rem var(--mono); color: var(--text-soft); }
.summary-frame .gh-summary { border: 0; border-radius: 0; }
.gh-summary details summary { cursor: pointer; }
.prose pre.log { background: var(--ink); color: var(--ink-text); border-color: var(--ink); font-size: 0.78rem; }
.log-line { display: block; white-space: pre-wrap; padding-left: 2.5em; text-indent: -2.5em; margin-bottom: 4px; }
.log-lvl { display: inline-block; padding: 0 5px; border-radius: 4px; background: rgba(143, 200, 232, 0.15); color: #8fc8e8; font-size: 0.72rem; text-indent: 0; }
.log-src { color: #7fd6b0; }
.motion .terminal.replay:not(.is-in) .l, .motion .terminal.replay:not(.is-in) .type { animation-play-state: paused; }
.motion .chain .chain-node { opacity: 0; transform: translateX(-8px); transition: opacity 0.5s ease, transform 0.5s ease; }
.motion .chain.is-in .chain-node { opacity: 1; transform: none; }
.motion .chain.is-in .chain-node:nth-child(2) { transition-delay: 0.25s; }
.motion .chain.is-in .chain-node:nth-child(3) { transition-delay: 0.5s; }
.motion .chain.is-in .chain-node:nth-child(4) { transition-delay: 0.75s; }
.motion .dots-figure .dots i.hit { background: var(--line); box-shadow: none; transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.motion .dots-figure.is-in .dots i.hit { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* Evaluation corpus: method steps, five headline numbers, the sortable table and the hard cases */
.prose .method { list-style: none; counter-reset: m; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 20px 0; }
.prose .method li { margin: 0; counter-increment: m; position: relative; padding: 16px 14px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.86rem; color: var(--text-soft); }
.method li::before { content: counter(m); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-bottom: 8px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 0.78rem var(--mono); }
.method strong { display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 4px; }
@media (max-width: 760px) { .prose .method { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.outcome-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.outcome-note { font-size: 0.75rem; color: var(--text-soft); }
@media (max-width: 760px) { .outcome-five { grid-template-columns: repeat(2, minmax(0, 1fr)); } .outcome-five div { border-left: 0; border-top: 1px solid var(--border); } }
.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prose table.corpus { display: table; margin: 0; font-size: 0.85rem; min-width: 560px; }
.corpus th { position: sticky; top: 0; white-space: nowrap; }
.corpus th button { all: unset; cursor: pointer; font-weight: 650; }
.corpus th button::after { content: " ↕"; color: var(--line); }
.corpus th[aria-sort="ascending"] button::after { content: " ↑"; color: var(--accent); }
.corpus th[aria-sort="descending"] button::after { content: " ↓"; color: var(--accent); }
.corpus td { vertical-align: middle; }
.corpus td.num { text-align: right; font-variant-numeric: tabular-nums; }
.corpus .share-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.corpus td.share svg { width: 80px; height: 8px; flex: none; }
.corpus .track { fill: var(--bg-soft); }
.corpus .fill { fill: var(--accent); }
.corpus td.share span { font-variant-numeric: tabular-nums; min-width: 3em; }
.corpus .tags { display: block; margin-top: 4px; line-height: 1.2; }
.tag { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: 0.72rem; color: var(--text-soft); white-space: nowrap; }
.miss { color: var(--diff-del); font-weight: 600; white-space: nowrap; }
.corpus tbody tr:hover td { background: var(--bg-soft); }
.hard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 8px; }
.hard div { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.hard strong { display: block; font-size: 1.9rem; line-height: 1.1; letter-spacing: -0.03em; color: var(--accent); }
.hard span { font-size: 0.85rem; color: var(--text-soft); }
@media (max-width: 760px) { .hard { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The TD mark: T in the text colour, D in the accent, so it follows the theme */
.logo-mark { flex: none; }
.logo-t { fill: var(--text); }
.logo-d { fill: var(--accent); }

/* Narrow screens: the mark alone in the header, so longer menu labels (tr, de, es) fit; wide tables scroll */
@media (max-width: 520px) {
  .site-header .brand span { display: none; }
  .main-nav { gap: 12px; }
  .main-nav .button-small { display: none; }
  .prose table.match { display: block; overflow-x: auto; }
}
