/* Pre-Toggled judges' site. Plain CSS, system fonts, light and dark.
   The visual language follows the slide deck (docs/visuals/index.html): calm, editorial, one red accent for harm. */

:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --panel: #f3f1eb;
  --panel-2: #e9e7e0;
  --card: #ffffff;
  --ink: #141413;
  --ink-2: #4a4945;
  --muted: #6f6d67;
  --hair: #e3e1d9;
  --line: #bdbbb2;
  --red: #cf3a43;
  --red-ink: #b4232d;
  --red-tint: rgba(207, 58, 67, .10);
  --orange: #e08a1e;
  --amber: #a88300;
  --amber-tint: rgba(168, 131, 0, .12);
  --ok: #cfcdc4;
  --ring: #77756e;
  --green: #2e7d4f;
  --link: #1f4f8a;
  --term-bg: #151514;
  --term-ink: #e8e7e2;
  --term-dim: #8d8b84;
  --shadow: 0 14px 40px rgba(30, 28, 20, .12);
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211;
    --panel: #1b1b19;
    --panel-2: #252522;
    --card: #1c1c1a;
    --ink: #f2f1ed;
    --ink-2: #c6c5bc;
    --muted: #96948d;
    --hair: #2e2e2b;
    --line: #4d4c47;
    --red: #e0464e;
    --red-ink: #ff8086;
    --red-tint: rgba(224, 70, 78, .17);
    --orange: #f2a03c;
    --amber: #d9b300;
    --amber-tint: rgba(217, 179, 0, .15);
    --ok: #5a5954;
    --ring: #a3a198;
    --green: #5cc287;
    --link: #8fb8ff;
    --term-bg: #0c0c0b;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --panel: #1b1b19;
  --panel-2: #252522;
  --card: #1c1c1a;
  --ink: #f2f1ed;
  --ink-2: #c6c5bc;
  --muted: #96948d;
  --hair: #2e2e2b;
  --line: #4d4c47;
  --red: #e0464e;
  --red-ink: #ff8086;
  --red-tint: rgba(224, 70, 78, .17);
  --orange: #f2a03c;
  --amber: #d9b300;
  --amber-tint: rgba(217, 179, 0, .15);
  --ok: #5a5954;
  --ring: #a3a198;
  --green: #5cc287;
  --link: #8fb8ff;
  --term-bg: #0c0c0b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.015em; margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: clamp(27px, 3.4vw, 40px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
b, strong { font-weight: 650; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin: 0 0 12px; }
.sub { font-size: 19px; color: var(--ink-2); margin: 14px 0 0; max-width: 760px; line-height: 1.5; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--hair); }
.topbar-in { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand-switch { width: 30px; height: 17px; border-radius: 9px; background: var(--line); position: relative; flex: none; }
.brand-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); }
.topnav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.topnav a:hover { background: var(--panel); color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--panel); font-weight: 600; }
.topnav .short { display: none; }
.theme-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hair); background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.theme-btn:hover { background: var(--panel); }
.theme-btn svg { width: 18px; height: 18px; }

/* ---------- Buttons, pills, notes ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px; background: transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.btn.small { padding: 6px 13px; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; color: var(--ink-2); font-weight: 550; white-space: nowrap; }
.pill.red { border-color: var(--red); color: var(--red-ink); }
.pill.ship { border-color: var(--ink); color: var(--ink); font-size: 11.5px; padding: 1px 8px; vertical-align: 3px; font-family: var(--sans); font-weight: 650; }
.simnote { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); margin: 0; }
.simnote::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.callout { border-left: 4px solid var(--line); padding: 4px 0 4px 18px; color: var(--ink-2); margin: 22px 0; }
.callout.red { border-left-color: var(--red); }
.callout b { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-top: 64px; padding-bottom: 8px; }
.hero h1 { max-width: 980px; }
.lead { font-size: clamp(18px, 2.1vw, 22px); color: var(--ink-2); line-height: 1.5; margin: 24px 0 0; max-width: 860px; }
.lead b { color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 18px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 28px 0 0; padding: 14px 0 0; border-top: 1px solid var(--hair); font-size: 14.5px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Video ---------- */
.video-sec { margin-top: 36px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0d0d0c; border: 1px solid var(--hair); }
/* No video id yet: a shorter card, so the result chart sits higher on the page. */
.video.is-empty { aspect-ratio: auto; height: clamp(230px, 22vw, 320px); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: blur(1.5px); }
.video-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #f2f1ed; padding: 20px; background: radial-gradient(ellipse at center, rgba(10, 10, 9, .55), rgba(10, 10, 9, .8)); }
.video-card .vc-t { font-size: clamp(19px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.01em; }
.video-card .vc-s { font-size: 15px; color: #d4d2ca; max-width: 520px; }
.video-card .vc-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.video-card .btn { color: #f2f1ed; border-color: rgba(242, 241, 237, .5); }
.video-card .btn:hover { border-color: #f2f1ed; }
.play { width: 78px; height: 78px; border-radius: 50%; border: 0; background: rgba(242, 241, 237, .95); cursor: pointer; display: grid; place-items: center; }
.play svg { width: 30px; height: 30px; margin-left: 5px; fill: #141413; }
.play-btn { all: unset; position: absolute; inset: 0; cursor: pointer; }
.play-btn:focus-visible { outline: 3px solid #8fb8ff; outline-offset: -3px; }

/* ---------- Sections ---------- */
.sec { padding-top: 92px; }
.sec > .kicker { margin-bottom: 10px; }
.sec-head { max-width: 820px; }
.prose { max-width: 760px; color: var(--ink-2); }
.prose p { margin: 0 0 1em; }
.prose b, .prose strong { color: var(--ink); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 24px 26px; }
.card h3 { margin-bottom: 6px; }
.card .card-s { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
hr.rule { border: 0; border-top: 1px solid var(--hair); margin: 40px 0; }

/* ---------- Dots (shared with the deck) ---------- */
.dots { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; }
.dot { width: 15px; height: 15px; border-radius: 50%; position: relative; background: var(--ok); flex: none; display: block; }
a.dot:hover, a.dot:focus-visible { transform: scale(1.35); outline: 2px solid var(--ink); outline-offset: 1px; }
.dot.unwanted_plan { background: var(--red); }
.dot.missing_plan { background: var(--orange); }
.dot.missing_plan::after { content: ""; position: absolute; left: 3px; right: 3px; top: 6.5px; height: 2px; border-radius: 1px; background: var(--bg); }
.dot.two_kettles { background: repeating-linear-gradient(135deg, var(--amber) 0 2px, transparent 2px 4.5px); box-shadow: inset 0 0 0 2px var(--amber); }
.dot.no_order { background: transparent; border: 2px dashed var(--ring); }
.dots.small { gap: 4px; }
.dots.small .dot { width: 12px; height: 12px; }
.dots.small .dot.missing_plan::after { left: 2px; right: 2px; top: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; font-size: 14.5px; color: var(--ink-2); }
.legend .li { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Dot wall ---------- */
.wall { margin-top: 30px; border-top: 1px solid var(--hair); }
.wall-row, .wall-axis-row { display: grid; grid-template-columns: 230px minmax(0, 1fr) 190px; column-gap: 32px; align-items: start; }
.wall-row { padding: 18px 0; border-bottom: 1px solid var(--hair); }
.wall-row.is-ship .wall-arm code { box-shadow: inset 0 -3px 0 var(--ink); }
.wall-axis-row { padding-top: 10px; font-size: 12.5px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 650; }
.wall-axis-row .ci-axis { position: relative; height: 18px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ci-axis span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.ci-axis span:first-child { transform: none; }
.ci-axis span:last-child { transform: translateX(-100%); }
.wall-arm code { font-size: 19px; font-weight: 700; color: var(--ink); }
.wall-desc { font-size: 14px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.wall-stat { font-size: 17px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.wall .dots { padding-top: 4px; }
.wall-ci { padding-top: 6px; }
.ci-track { position: relative; height: 22px; }
.ci-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--hair); }
.ci-bar { position: absolute; top: 9.5px; height: 3px; border-radius: 2px; background: var(--ink-2); min-width: 3px; }
.ci-pt { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ink); }
.ci-t { font-size: 13px; color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.orders { margin: 16px 0 10px; font-size: 15px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.orders .sep { color: var(--line); }
.orders code { color: var(--ink); }

/* ---------- Versions ---------- */
.q-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 34px; }
.popup-fig { margin: 0; }
.popup-fig img { border-radius: var(--radius); border: 1px solid var(--hair); }
.popup-fig figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.vgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.vcard { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); text-decoration: none; min-width: 0; }
.vcard:hover { border-color: var(--line); text-decoration: none; box-shadow: var(--shadow); }
.vcard-top { display: flex; align-items: center; gap: 10px; }
.vcard-top code { font-size: 16.5px; font-weight: 700; }
.vcard-desc { font-size: 14px; color: var(--muted); line-height: 1.35; }
.vcard-read { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.vcard-read .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin-top: 2px; }
.vcard-read code { font-size: 12.5px; background: var(--panel); border-radius: 6px; padding: 5px 8px; overflow-wrap: anywhere; color: var(--ink); }
.vcard-read code.bad { background: var(--red-tint); box-shadow: inset 3px 0 0 var(--red); }
.vcard-note { font-size: 12.5px; color: var(--ink-2); background: var(--amber-tint); box-shadow: inset 3px 0 0 var(--amber); border-radius: 6px; padding: 5px 8px; line-height: 1.4; }
.vcard-go { font-size: 13.5px; color: var(--link); margin-top: auto; padding-top: 4px; }
.mini-switch { width: 28px; height: 16px; border-radius: 8px; background: var(--line); position: relative; flex: none; }
.mini-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.mini-switch.on { background: var(--red); }
.mini-switch.on::after { left: 14px; }

/* ---------- Flagsmith loop + gallery ---------- */
.loop { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--hair); }
.loop li { padding: 16px 22px 18px 0; border-bottom: 1px solid var(--hair); font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.loop li b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 3px; }
.loop .n { font-family: var(--mono); font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 26px; margin-top: 36px; }
.shot { margin: 0; min-width: 0; }
.shot-btn { all: unset; display: block; cursor: zoom-in; border-radius: 10px; overflow: hidden; border: 1px solid var(--hair); background: var(--panel); width: 100%; box-sizing: border-box; }
.shot-btn:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.shot-btn img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s ease; }
.shot-btn:hover img { transform: scale(1.015); }
.shot figcaption { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; line-height: 1.45; }
.shot figcaption b { color: var(--ink); }
.shot .num { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 8px; }
.feature-shot { margin: 28px 0 0; }
.feature-shot .shot-btn img { aspect-ratio: auto; object-fit: contain; }
.feature-shot figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1600px, 96vw); width: 96vw; max-height: 94vh; color: #f2f1ed; }
dialog.lightbox::backdrop { background: rgba(8, 8, 7, .86); }
.lb-inner { display: flex; flex-direction: column; gap: 10px; }
.lb-img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; background: #111; }
.lb-bar { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; font-size: 14.5px; line-height: 1.45; }
.lb-cap b { color: #fff; }
.lb-btns { display: flex; gap: 6px; flex: none; }
.lb-btns button, .lb-btns a { all: unset; cursor: pointer; border: 1px solid rgba(242, 241, 237, .4); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; color: #f2f1ed; }
.lb-btns button:hover, .lb-btns a:hover { border-color: #fff; }

/* Terminal */
.terminal { background: var(--term-bg); color: var(--term-ink); border-radius: 12px; padding: 18px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.65; overflow-x: auto; border: 1px solid var(--hair); }
.terminal .t-cmd { color: var(--term-dim); display: block; margin-bottom: 6px; white-space: pre; }
.terminal .t-line { display: block; white-space: pre; }
.terminal .t-line.dim { color: var(--term-dim); }
.terminal b { color: #8fe3a8; font-weight: 600; }
.term-cap { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---------- Tables ---------- */
.tbl-scroll { overflow-x: auto; margin-top: 24px; border: 1px solid var(--hair); border-radius: 12px; background: var(--card); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 640px; }
.tbl th, .tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--hair); vertical-align: top; }
.tbl thead th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: var(--panel); line-height: 1.3; vertical-align: bottom; }
.tbl thead tr.grp th { text-align: left; background: var(--bg); color: var(--ink-2); letter-spacing: .1em; }
.tbl tbody th { font-weight: 600; white-space: nowrap; }
.tbl td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl thead th.num { text-align: right; }
.tbl .sep-l { border-left: 1px solid var(--hair); }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.is-ship th code { box-shadow: inset 0 -2px 0 var(--ink); }
.tbl sup { color: var(--red-ink); font-weight: 700; }
.tbl-note { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 900px; }
.tbl-note b { color: var(--ink-2); }
.tables-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 8px; }
.tables-3 .tbl { min-width: 0; font-size: 14px; }
.tables-3 .tbl th, .tables-3 .tbl td { padding: 8px 8px; }
.tbl.rule-tbl { min-width: 0; }
.tables-3 h3 { font-size: 16px; margin: 28px 0 0; }
.tables-3 .tbl-scroll { margin-top: 10px; }

/* ---------- Labels / compare rows ---------- */
.cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 6px; align-items: end; padding: 12px 0; border-top: 1px solid var(--hair); }
.cmp-who { grid-column: 1 / -1; font-size: 14.5px; color: var(--ink-2); }
.cmp-who b { color: var(--ink); }
.cmp-frac { font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }
.cmp-frac small { font-size: 17px; color: var(--muted); font-weight: 500; }
.verdict { font-size: 17px; margin: 14px 0 0; }
.verdict .muted { font-size: 14.5px; }
.quote { margin: 22px 0 0; border-left: 4px solid var(--line); padding: 2px 0 2px 18px; }
.quote .q { font-size: 18px; line-height: 1.42; font-weight: 520; color: var(--ink); margin: 0; }
.quote .who { font-size: 13.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.quote .who a { color: inherit; }
.mini-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.mini-legend span { display: inline-flex; gap: 6px; align-items: center; }
.mini-legend .dot { width: 12px; height: 12px; }
.mini-legend .dot.missing_plan::after { left: 2px; right: 2px; top: 5px; }

/* ---------- Steer bars ---------- */
.bars { display: grid; gap: 14px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 76px; gap: 14px; align-items: center; }
.bar-l { font-size: 15.5px; font-weight: 650; line-height: 1.2; }
.bar-l small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 3px; }
.bar-l small code { font-size: 12px; }
.bar-track { height: 26px; background: var(--panel-2); border-radius: 4px; position: relative; overflow: hidden; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); border-radius: 0 4px 4px 0; }
.bar-v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 4px 90px 0 184px; }
.note-card { background: var(--panel); border-radius: 12px; padding: 16px 18px; font-size: 15px; line-height: 1.5; }
.note-card + .note-card { margin-top: 14px; }
.note-card .nc-h { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.note-card.protect { box-shadow: inset 4px 0 0 var(--line); }
.note-card.push { box-shadow: inset 4px 0 0 var(--red); }

/* ---------- Decision ---------- */
.rule-quote { font-size: clamp(18px, 2vw, 22px); line-height: 1.45; border-left: 4px solid var(--ink); padding: 4px 0 4px 20px; margin: 28px 0 0; max-width: 880px; }
.rule-quote .src { display: block; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.ship-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 30px; align-items: start; }

/* ---------- Verify ---------- */
.verify { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; margin-top: 30px; align-items: start; }
.vf-out { margin-top: 16px; display: grid; gap: 10px; }
.vf-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; font-size: 14px; align-items: baseline; }
.vf-row .k { color: var(--muted); }
.vf-row code { overflow-wrap: anywhere; font-size: 13px; }
.vf-result { margin-top: 6px; padding: 12px 14px; border-radius: 10px; font-weight: 650; display: none; }
.vf-result.ok { display: block; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--ink); box-shadow: inset 4px 0 0 var(--green); }
.vf-result.bad { display: block; background: var(--red-tint); box-shadow: inset 4px 0 0 var(--red); }
.timeline { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 26px 0 6px; }
.tl-pt .t { font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; }
.tl-pt .w { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; max-width: 210px; }
.tl-pt.r { text-align: right; }
.tl-mid { position: relative; height: 2px; background: var(--line); }
.tl-mid span { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); font-weight: 700; font-size: 15px; white-space: nowrap; }
.cmdline { display: block; background: var(--panel); border-radius: 8px; padding: 9px 12px; font-family: var(--mono); font-size: 13px; overflow-x: auto; white-space: pre; margin: 6px 0 12px; color: var(--ink); }
.logs-details { margin-top: 10px; border: 1px solid var(--hair); border-radius: 10px; background: var(--card); }
.logs-details summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14.5px; }
.loglist { list-style: none; padding: 0 14px 6px; margin: 0; font-size: 13.5px; }
.loglist li { padding: 8px 0; border-top: 1px solid var(--hair); }
.loglist .logf { display: block; overflow-wrap: anywhere; margin-top: 3px; text-decoration: none; }
.loglist .logf code { font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.loglist .logf .muted { font-size: 12px; }

/* ---------- Lists ---------- */
.list { list-style: none; padding: 0; margin: 18px 0 0; }
.list li { padding: 14px 0; border-top: 1px solid var(--hair); color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.list li b { color: var(--ink); }
.list li small { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; }
.key-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.key-card { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--hair); background: var(--card); text-decoration: none; color: var(--ink); font-size: 14px; line-height: 1.4; min-width: 0; }
.key-card:hover { border-color: var(--line); box-shadow: var(--shadow); text-decoration: none; }
.key-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.key-top code { font-size: 13px; color: var(--muted); }
.key-card b { font-size: 15.5px; }
.key-meta { font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.links-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.link-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--hair); text-decoration: none; color: var(--ink); background: var(--card); min-width: 0; }
.link-card:hover { border-color: var(--line); text-decoration: none; box-shadow: var(--shadow); }
.link-card b { font-size: 16px; }
.link-card span { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.foot { margin-top: 110px; border-top: 1px solid var(--hair); padding: 34px 0 48px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0 0 10px; max-width: 820px; }
.foot .simnote { font-size: 14.5px; color: var(--ink-2); margin-bottom: 14px; }
.foot a { color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- Page heads (explorer, try) ---------- */
.page-head { padding-top: 48px; }
.page-head h1 { font-size: clamp(30px, 4.2vw, 46px); }
.page-head .lead { font-size: 18px; margin-top: 14px; }
.explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.explain > div { background: var(--panel); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.explain b { color: var(--ink); display: block; margin-bottom: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .wall-row, .wall-axis-row { grid-template-columns: 180px minmax(0, 1fr) 150px; column-gap: 20px; }
  .key-grid, .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tables-3 { grid-template-columns: minmax(0, 1fr); }
  .loop { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .q-grid, .grid-2, .ship-grid, .verify { grid-template-columns: minmax(0, 1fr); }
  .explain { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar-in { gap: 10px; height: 54px; }
  .brand { font-size: 15px; }
  .brand-switch { display: none; }
  .topnav a { font-size: 14px; padding: 6px 7px; }
  .topnav .long { display: none; }
  .topnav .short { display: inline; }
  .video-card .vc-s { display: none; }
  .video-card .vc-t { font-size: 18px; }
  .hero { padding-top: 36px; }
  .sec { padding-top: 64px; }
  .wall-axis-row { display: none; }
  .wall-row { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .wall-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .wall-desc { flex-basis: 100%; order: 3; margin-top: 0; }
  .wall-stat { margin-top: 0; margin-left: auto; }
  .dot { width: 13px; height: 13px; }
  .dot.missing_plan::after { left: 3px; right: 3px; top: 5.5px; }
  .wall-ci { max-width: 300px; }
  .vgrid, .gallery, .key-grid, .links-grid, .loop { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px 18px; }
  .bar-row { grid-template-columns: 112px minmax(0, 1fr) 62px; gap: 10px; }
  .bars-scale { margin: 4px 72px 0 122px; }
  .vf-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tl-mid { height: auto; background: none; padding: 2px 0; }
  .tl-mid span { position: static; transform: none; color: var(--ink-2); }
  .tl-pt.r { text-align: left; }
  .theme-btn { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.pill.wrap-ok { white-space: normal; line-height: 1.35; padding: 4px 12px; border-radius: 14px; }
[hidden] { display: none !important; }
.video-card.is-set { flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 14px; padding: 22px 24px; background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 9, .72)); text-align: left; }
.video-card.is-set .play { width: 64px; height: 64px; flex: none; }
.video-card.is-set .vc-s { display: block; margin-bottom: 18px; }
