/* Layout: herdr-style single column — sticky nav, tagline hero + install box, stat strip, an interactive terminal/repo panel, then feature sections. Canon Cockpit slate + violet palette, dark-first. */
:root {
  --bg: #141b26;
  --panel: #1b2330;
  --panel-2: #202a39;
  --line: #2a3547;
  --line-strong: #3a4760;
  --fg: #e9ecf3;
  --fg-dim: #a3adbf;
  --fg-mute: #74809a;
  --accent: #8b7bff;
  --accent-ink: #12101f;
  --accent-soft: rgba(139, 123, 255, 0.14);
  --ok: #4ade80;
  --work: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;
  --term-bg: #0f1520;
  --term-fg: #d5dbe8;
  --mark: #232e42;
  --f-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f2f7; --panel: #ffffff; --panel-2: #f7f6fc; --line: #dcdce8; --line-strong: #c4c4d8;
    --fg: #1a1d2b; --fg-dim: #4b5266; --fg-mute: #7a8196;
    --accent: #6c5cf7; --accent-ink: #ffffff; --accent-soft: rgba(108, 92, 247, 0.1);
    --ok: #15803d; --work: #b45309; --bad: #dc2626; --info: #2563eb; --mark: #e6e4f3;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f2f7; --panel: #ffffff; --panel-2: #f7f6fc; --line: #dcdce8; --line-strong: #c4c4d8;
  --fg: #1a1d2b; --fg-dim: #4b5266; --fg-mute: #7a8196;
  --accent: #6c5cf7; --accent-ink: #ffffff; --accent-soft: rgba(108, 92, 247, 0.1);
  --ok: #15803d; --work: #b45309; --bad: #dc2626; --info: #2563eb; --mark: #e6e4f3;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, .mono { font-family: var(--f-mono); }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 14px; }
.eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--accent); }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -0.03em; line-height: 1; }
h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
.lead { color: var(--fg-dim); max-width: 62ch; font-size: 17px; }
/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.brand .mk { width: 42px; height: 26px; color: var(--accent); }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); flex-wrap: wrap; }
.nav-links a:hover { color: var(--fg); }
.nav-tools { display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding-inline: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); }
.seg button { height: 32px; padding-inline: 12px; background: transparent; border: 0; color: var(--fg-mute); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.cta { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); text-transform: uppercase; }
.cta:hover { filter: brightness(1.08); }
@media (max-width: 900px) { .nav-links { order: 3; width: 100%; margin-left: 0; gap: 18px; } .nav-tools { margin-left: auto; } }
/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; padding-block: 64px 56px; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(36px, 6vw, 80px); font-weight: 800; line-height: 1; letter-spacing: -0.035em; max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub { max-width: 58ch; color: var(--fg-dim); font-size: 18px; }
.hero .sub strong { color: var(--fg); font-weight: 600; }
.hero-mark { position: absolute; right: -3%; top: 84px; width: min(620px, 54vw); pointer-events: none; }
@media (max-width: 760px) { .hero-mark { width: 130vw; right: -34vw; top: 36px; opacity: 0.6; } }
.install { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.install-tabs { display: flex; gap: 0; }
.install-tabs button { background: transparent; border: 1px solid var(--line-strong); border-bottom: 0; color: var(--fg-mute); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 14px; cursor: pointer; }
.install-tabs button + button { border-left: 0; }
.install-tabs button[aria-pressed="true"] { background: var(--panel); color: var(--fg); }
.install-box { display: flex; align-items: stretch; border: 1px solid var(--line-strong); background: var(--panel); max-width: 900px; }
.install-box code { flex: 1; min-width: 0; padding: 16px 18px; font-size: 13px; overflow-x: auto; white-space: nowrap; color: var(--fg); }
.install-box code i { color: var(--fg-mute); font-style: normal; margin-right: 10px; }
.install-box button { border: 0; border-left: 1px solid var(--line-strong); background: transparent; color: var(--fg-dim); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding-inline: 18px; cursor: pointer; }
.install-box button:hover { color: var(--accent); }
.fine { font-family: var(--f-mono); font-size: 12px; color: var(--fg-mute); display: flex; gap: 8px 14px; flex-wrap: wrap; }
.fine a { color: var(--accent); }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.new-link { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; }
.new-link b { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; background: var(--accent); color: var(--accent-ink); padding: 3px 8px; }
.new-link span { color: var(--accent); }
/* stats */
.stats { border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding-inline: 0; }
.stat { padding: 28px 24px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat:first-child { border-left: 0; }
.stat b { font-family: var(--f-display); font-size: clamp(34px, 4.5vw, 52px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); }
@media (max-width: 760px) { .stats .wrap { grid-template-columns: 1fr 1fr; padding-inline: 0; } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }
section.block { border-bottom: 1px solid var(--line); }
section.block > .wrap { padding-block: 72px; display: flex; flex-direction: column; gap: 32px; }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.head-row .hint { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-mute); }
/* loop panel */
.panel { display: grid; grid-template-columns: 240px minmax(0, 1.5fr) minmax(0, 1fr); border: 1px solid var(--line-strong); background: var(--panel); min-height: 460px; }
.rail { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.rail h4, .pane-title { margin: 0; font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.step { text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--fg-dim); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; }
.step code { font-size: 13px; color: var(--fg); }
.step small { font-size: 13px; line-height: 1.4; }
.step[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.step:hover { background: var(--accent-soft); }
.term-wrap { background: var(--term-bg); display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.term-wrap .pane-title { background: transparent; border-color: #232e42; color: #74809a; }
.term { margin: 0; padding: 18px; font-family: var(--f-mono); font-size: 13px; line-height: 1.75; color: var(--term-fg); overflow-x: auto; white-space: pre; flex: 1; }
.term .p { color: #74809a; }
.term .ok { color: #4ade80; }
.term .bad { color: #f87171; }
.term .acc { color: #b3a8ff; }
.term .dim { color: #74809a; }
.files { display: flex; flex-direction: column; min-width: 0; }
.tree { list-style: none; margin: 0; padding: 14px 16px; font-family: var(--f-mono); font-size: 13px; display: flex; flex-direction: column; gap: 6px; color: var(--fg-mute); }
.tree li { display: flex; gap: 10px; align-items: baseline; padding: 3px 8px; margin-inline: -8px; }
.tree li.dir { color: var(--fg-dim); }
.tree li.kid { padding-left: 26px; }
.tree li.hot { background: var(--accent-soft); color: var(--fg); }
.tree li.hot::after { content: attr(data-note); margin-left: auto; font-size: 11px; color: var(--accent); text-align: right; }
.files p { padding: 0 16px 16px; font-size: 14px; color: var(--fg-dim); margin-top: auto; }
@media (max-width: 900px) { .panel { grid-template-columns: 1fr; } .rail { border-right: 0; border-bottom: 1px solid var(--line); } .rail { flex-direction: column; } .term-wrap { border-right: 0; border-bottom: 1px solid var(--line); } }
/* difference */
.diff-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.diff-grid > article { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; grid-column: span 2; }
.diff-grid > article.big { grid-column: span 4; background: var(--panel); }
.diff-grid > article.wide { grid-column: span 3; }
.diff-grid p { color: var(--fg-dim); font-size: 15px; }
.tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.pill { display: inline-block; font-family: var(--f-mono); font-size: 11px; padding: 2px 8px; border: 1px solid var(--line-strong); color: var(--fg-dim); }
@media (max-width: 900px) { .diff-grid > article, .diff-grid > article.big, .diff-grid > article.wide { grid-column: span 6; } }
/* cockpit */
.shot { border: 1px solid var(--line-strong); background: var(--panel); display: block; width: 100%; }
.shot-frame { position: relative; }
.cockpit-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.cockpit-grid.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
.cockpit-side { display: flex; flex-direction: column; gap: 20px; }
.cockpit-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.cockpit-side li { color: var(--fg-dim); font-size: 15px; padding-left: 18px; position: relative; }
.cockpit-side li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 2px; background: var(--accent); }
.cockpit-side li b { color: var(--fg); font-weight: 600; }
.cmds { background: var(--term-bg); border: 1px solid var(--line-strong); padding: 14px 16px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.8; color: var(--term-fg); overflow-x: auto; white-space: pre; }
.cmds .dim { color: #74809a; }
@media (max-width: 900px) { .cockpit-grid { grid-template-columns: 1fr; } }
/* caught */
.caught { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.code { background: var(--term-bg); border: 1px solid var(--line-strong); padding: 18px; font-family: var(--f-mono); font-size: 13px; line-height: 1.75; color: var(--term-fg); overflow-x: auto; white-space: pre; }
.code .bad { color: #f87171; }
.code .ok { color: #4ade80; }
.code .dim { color: #74809a; }
.caught-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.caught-copy p { color: var(--fg-dim); }
.caught-copy p b { color: var(--fg); font-weight: 600; }
@media (max-width: 900px) { .caught { grid-template-columns: minmax(0, 1fr); } }
/* agents */
.agents-now { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 14px 18px; border: 1px solid var(--line-strong); background: var(--panel); font-size: 14px; color: var(--fg-dim); }
.an-proj { font-weight: 600; color: var(--fg); }
.an-row { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.an-row b { font-family: var(--f-mono); font-weight: 500; color: var(--fg); font-size: 13px; }
.an-row em { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--fg-mute); }
.an-dot { width: 9px; height: 9px; border-radius: 50%; align-self: center; flex: none; }
.an-dot.work { background: var(--work); }
.an-dot.idle { background: transparent; border: 2px solid var(--ok); }
.agent-tabs { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.agent-tabs button { height: 36px; padding-inline: 16px; font-size: 12px; }
.agent-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.agent-facts article { background: var(--bg); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.agent-facts p { font-size: 14.5px; color: var(--fg-dim); }
@media (max-width: 900px) { .agent-facts { grid-template-columns: 1fr; } }
/* learnings teaser */
.learn-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ls-step { background: var(--bg); padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ls-step b { font-family: var(--f-display); font-size: 22px; letter-spacing: -0.02em; }
.ls-step p { font-size: 14.5px; color: var(--fg-dim); }
.ls-hot { background: var(--panel); box-shadow: inset 0 -3px 0 var(--ok); }
@media (max-width: 900px) { .learn-strip { grid-template-columns: 1fr; } }
/* sprint crew flow */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.stage { --sc: var(--accent); position: relative; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--sc); border-radius: 10px 10px 6px 6px; box-shadow: 0 1px 0 var(--line); }
.stage.st-start { --sc: var(--info); }
.stage.st-close { --sc: var(--ok); }
.stage.st-mem { --sc: var(--work); }
.stage:not(:last-child)::after { content: ""; position: absolute; top: 34px; right: -45px; width: 44px; height: 12px; background: linear-gradient(var(--arrow, var(--fg-mute)), var(--arrow, var(--fg-mute))) left center / 34px 2px no-repeat; }
.stage:not(:last-child)::before { content: ""; position: absolute; top: 34px; right: -43px; width: 9px; height: 9px; border-top: 2px solid var(--arrow, var(--fg-mute)); border-right: 2px solid var(--arrow, var(--fg-mute)); transform: translateY(1px) rotate(45deg); z-index: 1; }
.stage-head { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 14px; }
.stage-head code { font-size: 16px; color: var(--fg); font-weight: 500; }
.stage-head span { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sc); }
.acts { list-style: none; margin: 0; padding: 0 0 8px; position: relative; }
.acts::before { content: ""; position: absolute; left: 25px; top: 0; bottom: 14px; width: 2px; background: var(--line-strong); }
.band { position: relative; margin-top: 4px; padding: 7px 20px 7px 48px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-mute); background: var(--panel-2); border-block: 1px solid var(--line); }
.band:first-child { margin-top: 0; border-top: 1px solid var(--line); }
.act { position: relative; padding: 14px 20px 14px 48px; display: flex; flex-direction: column; gap: 4px; }
.act + .act { border-top: 1px solid var(--line); }
.act .bub { position: absolute; left: 19px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid var(--sc); box-shadow: 0 0 0 4px var(--panel); }
.act-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.act-top code { font-size: 14px; color: var(--fg); font-weight: 500; }
.act p { font-size: 13.5px; color: var(--fg-dim); line-height: 1.5; }
.act-adv .bub { border-color: var(--info); }
.act-bind { background: rgba(74, 222, 128, 0.08); }
.act-bind .bub { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 4px var(--panel), 0 0 0 7px rgba(74, 222, 128, 0.28); }
@media (max-width: 1040px) { .flow { grid-template-columns: 1fr; gap: 28px; } .stage::before, .stage::after { display: none; } }
.lv { font-style: normal; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); border: 1px solid var(--line-strong); padding: 1px 7px; white-space: nowrap; }
.lv.adv { color: var(--info); border-color: var(--info); }
.lv.bind { color: var(--ok); border-color: var(--ok); }
.note { font-family: var(--f-mono); font-size: 12px; color: var(--fg-mute); line-height: 1.7; max-width: 90ch; }
/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.skill { background: var(--bg); padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.skill:hover { background: var(--panel); }
.skill code { font-size: 14px; color: var(--fg); }
.skill p { font-size: 14px; color: var(--fg-dim); line-height: 1.5; }
.skill .cat { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); }
@media (max-width: 1000px) { .skill-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .skill-grid { grid-template-columns: 1fr; } }
/* docs + footer */
.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.doc { background: var(--bg); padding: 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.doc:hover { background: var(--panel); }
.doc b { font-family: var(--f-display); font-size: 19px; letter-spacing: -0.02em; display: flex; justify-content: space-between; gap: 8px; }
.doc b span { color: var(--accent); }
.doc p { font-size: 14px; color: var(--fg-dim); }
@media (max-width: 900px) { .docs-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .docs-grid { grid-template-columns: 1fr; } }
.final { text-align: left; }
.final .wrap { padding-block: 80px; display: flex; flex-direction: column; gap: 28px; }
.final h2 { font-size: clamp(34px, 6vw, 72px); max-width: 16ch; }
footer .wrap { padding-block: 28px 40px; display: flex; gap: 12px 28px; flex-wrap: wrap; align-items: center; font-family: var(--f-mono); font-size: 12px; color: var(--fg-mute); }
footer .wrap a:hover { color: var(--accent); }
footer .spacer { margin-left: auto; }
@media (prefers-reduced-motion: no-preference) { .step, .chip, .doc, .skill { transition: background 0.15s, border-color 0.15s; } }
/* compare page */
.cmp-hero .wrap { padding-block: 64px 40px; display: flex; flex-direction: column; gap: 24px; }
.cmp-hero h1 { font-size: clamp(36px, 6vw, 80px); font-weight: 800; line-height: 1; letter-spacing: -0.035em; max-width: 18ch; }
.cmp-hero h1 em { font-style: normal; color: var(--accent); }
.cmp-hero .sub { max-width: 62ch; color: var(--fg-dim); font-size: 18px; }
.cmp-hero .sub strong { color: var(--fg); font-weight: 600; }
.legend { display: flex; gap: 8px 20px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 12px; color: var(--fg-mute); }
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line-strong); background: var(--panel); }
table.matrix { border-collapse: collapse; width: 100%; min-width: 980px; font-size: 14px; }
.matrix th, .matrix td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.matrix th:first-child, .matrix td:first-child { border-left: 0; position: sticky; left: 0; background: var(--panel); z-index: 1; }
.matrix thead th { font-family: var(--f-display); font-size: 20px; letter-spacing: -0.02em; font-weight: 800; background: var(--panel-2); padding-block: 18px; position: static; }
.matrix thead th:first-child { font-family: var(--f-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); position: sticky; }
.matrix thead th small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.04em; color: var(--fg-mute); margin-top: 4px; }
.matrix { table-layout: fixed; }
.matrix thead th:nth-child(1) { width: 19%; }
.matrix thead th:nth-child(2) { width: 27%; }
.matrix thead th:nth-child(3) { width: 18%; }
.matrix thead th:nth-child(4) { width: 14%; }
.matrix thead th:nth-child(5) { width: 22%; }
.matrix .us { background: var(--accent-soft); }
.matrix thead th.us { color: var(--accent); }
.matrix tr.grp td { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); background: var(--panel-2); padding-block: 10px; border-left: 0; position: static; }
.matrix tbody th { font-weight: 600; color: var(--fg); font-size: 14px; background: var(--panel); position: sticky; left: 0; z-index: 1; border-left: 0; }
.cell { display: flex; gap: 10px; align-items: baseline; color: var(--fg-dim); line-height: 1.45; }
.cell b { color: var(--fg); font-weight: 600; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; }
.dot.y { background: var(--ok); }
.dot.p { background: var(--work); }
.dot.n { background: transparent; border: 1.5px solid var(--fg-mute); }
.verdicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.verdict { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.verdict p { color: var(--fg-dim); font-size: 15px; }
.verdict .win { font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--fg-dim); }
.verdict .win b { color: var(--fg); font-weight: 600; }
@media (max-width: 900px) { .verdicts { grid-template-columns: 1fr; } }
.note a { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.tr figcaption { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.tr blockquote { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--fg); }
.tr p { font-size: 13.5px; color: var(--fg-dim); }
.trace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .trace { grid-template-columns: minmax(0, 1fr); } }
/* cards in the style of a glass feature grid */
.gcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gcard { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: 18px 16px; padding: 24px; min-height: 260px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--panel); overflow: hidden; min-width: 0; }
.gcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 0% 0%, var(--accent-soft), transparent 60%); pointer-events: none; }
.gcard.feat { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--panel) 65%); box-shadow: 0 0 0 1px var(--accent-soft), 0 18px 50px -24px var(--accent); }
.gicon { position: relative; grid-column: 1 / -1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--accent); background: var(--bg); }
.gicon svg { width: 24px; height: 24px; }
.gbody { position: relative; align-self: end; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gbody h3 { font-size: 22px; }
.gbody p { font-size: 14.5px; color: var(--fg-dim); }
.go { position: relative; align-self: end; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--fg); color: var(--bg); cursor: pointer; transition: transform 0.15s; }
.go:hover { transform: translateX(3px); }
.go svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .gcards { grid-template-columns: minmax(0, 1fr); } .gcard { min-height: 0; } }
.tr { margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--panel); }
.tr.hot { border-color: var(--ok); box-shadow: 0 18px 50px -28px var(--ok); }
.cmp-hero { position: relative; overflow: hidden; }
.cmp-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 140%; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.cmp-hero .wrap { position: relative; }
.flow-open { cursor: pointer; }
/* non-modal flowchart window */
.flowwin { position: fixed; right: 24px; bottom: 24px; width: min(420px, calc(100vw - 32px)); max-height: min(78vh, 760px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 70px -20px rgba(0, 0, 0, 0.6); z-index: 40; overflow: hidden; }
.fw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); cursor: grab; touch-action: none; user-select: none; }
.fw-head b { font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.fw-head button { background: transparent; border: 1px solid var(--line-strong); color: var(--fg-dim); font-family: var(--f-mono); font-size: 11px; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.fw-head button:hover { color: var(--accent); border-color: var(--accent); }
.fw-body { overflow: auto; background: #ffffff; padding: 12px; }
.fw-body img { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .flowwin { left: 16px; right: 16px; bottom: 16px; width: auto; } .fw-head { cursor: default; } }

/* shared layout helpers (replace inline styles) */
.head-stack { display: flex; flex-direction: column; gap: 16px; }
.head-stack.tight { gap: 12px; }
.foot-line { border-top: 1px solid var(--line); }
footer b { color: var(--fg); }
.hint-link { color: var(--accent); }
.fg { color: var(--fg); }
.cmp-hero { border-bottom: 1px solid var(--line); }
.matrix.loose { table-layout: auto; min-width: 760px; }
.matrix th.w38 { width: 38%; }
.rail-steps { display: flex; flex-direction: column; }

/* single theme toggle: shows the current theme, click switches */
.theme-toggle { font-family: var(--f-body); font-size: 14px; letter-spacing: 0; text-transform: none; gap: 8px; }
.theme-toggle .ic { color: #f5b301; flex: none; }

/* daily-loop autoplay: header with a pause button, and a progress line under the active command */
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); background: var(--panel-2); padding-right: 10px; }
.rail-head h4 { border: 0; background: none; flex: 1; }
.mini { background: transparent; border: 1px solid var(--line-strong); color: var(--fg-dim); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.mini:hover { color: var(--accent); border-color: var(--accent); }
.step { position: relative; }
.panel.auto .step[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: loop-tick 8s linear forwards; }
@keyframes loop-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .panel.auto .step[aria-selected="true"]::after { animation: none; display: none; } }

/* sprint crew: a pulse walks each stage's steps, crosses the arrow, and carries on to the next stage */
.flow-ctl { display: flex; justify-content: flex-end; margin-bottom: -12px; }
.act { transition: background 0.3s; }
.act.pulse { background: var(--accent-soft); background: color-mix(in srgb, var(--sc) 14%, transparent); }
.act.pulse .bub { animation: bub-pulse 0.5s ease-out; }
@keyframes bub-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 4px var(--panel), 0 0 0 4px transparent; }
  35% { transform: scale(1.4); box-shadow: 0 0 0 4px var(--panel), 0 0 0 11px color-mix(in srgb, var(--sc) 40%, transparent); }
  100% { transform: scale(1); box-shadow: 0 0 0 4px var(--panel), 0 0 0 4px transparent; }
}
.stage.arrow-on { --arrow: var(--accent); }
.stage.arrow-on::after { animation: arrow-line 0.9s ease-in-out; }
.stage.arrow-on::before { animation: arrow-head 0.9s ease-in-out; }
@keyframes arrow-line { 0% { transform: translateX(-8px); opacity: 0.3; } 60% { opacity: 1; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes arrow-head { 0% { transform: translate(-8px, 1px) rotate(45deg); opacity: 0.3; } 60% { opacity: 1; } 100% { transform: translate(0, 1px) rotate(45deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .act.pulse .bub, .stage.arrow-on::after, .stage.arrow-on::before { animation: none; } }
