/* AI Football — Interactive Engineering Blueprint. Loaded after base.css; reuses its tokens. */
:root {
  --tb-h: 60px;
  --toc-w: 288px;
  --col: 880px;
  --wide: 1120px;
  --c-crit: var(--ev-pending);
  --c-high: var(--team-b);
  --c-medhigh: var(--ev-assumption);
  --c-med: var(--ev-hypothesis);
  --c-dom: color-mix(in srgb, var(--ev-hypothesis) 50%, var(--ev-pending));
}

html { scroll-padding-top: calc(var(--tb-h) + 16px); }
body.bp { background: var(--bg); }
.small { font-size: 15px; }
.muted { color: var(--muted); }
code { color: var(--text); background: var(--turf-wash); padding: 1px 5px; border-radius: 5px; word-break: break-word; }
h3 { font-size: 21px; margin-top: 1.6em; }
h4 { font-size: 16px; margin: 1.2em 0 .5em; color: var(--text-2); letter-spacing: 0; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--tb-h);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px;
  padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--text) 3%, transparent);
  cursor: pointer; font-size: 15px; font-weight: 600;
}
.tb-btn:hover { border-color: var(--light-2); background: color-mix(in srgb, var(--text) 7%, transparent); }
.tb-menu { display: none; }
.tb-search-toggle { display: none; }
.tb-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--turf-wash);
}
.tb-back:hover { border-color: var(--light-2); color: var(--text); background: var(--turf-wash); }
.tb-title { font-weight: 700; font-size: 15px; color: var(--text-2); white-space: nowrap; letter-spacing: -.01em; }
.tb-ver { font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.tb-search { position: relative; margin-left: auto; width: min(380px, 34vw); }
.tb-search input {
  width: 100%; min-height: 42px; padding: 0 40px 0 38px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 15px;
}
.tb-search input::placeholder { color: var(--dim); }
.tb-search input:focus { outline: none; border-color: var(--light-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--light-2) 22%, transparent); }
.tb-search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.tb-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 13px; color: var(--dim);
  border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 6px; pointer-events: none; }
.tb-search input:not(:placeholder-shown) ~ .tb-kbd { display: none; }
.search-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(560px, 92vw); max-height: min(70vh, 560px); overflow: auto;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 8px;
}
.search-status { margin: 4px 8px 8px; font-size: 13px; color: var(--muted); font-family: var(--font); font-weight: 600; }
.search-results { list-style: none; margin: 0; padding: 0; }
.sr-item {
  display: block; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 10px 12px; cursor: pointer; min-height: 44px;
}
.sr-item:hover, .sr-item:focus-visible { background: var(--turf-wash); border-color: color-mix(in srgb, var(--light-2) 35%, transparent); outline: none; }
.sr-sec { display: block; font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--light-2); margin-bottom: 2px; }
.sr-snip { display: block; font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.sr-snip b { color: var(--text); background: color-mix(in srgb, var(--ev-assumption) 22%, transparent); border-radius: 3px; padding: 0 2px; font-weight: 600; }

.lvl { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: color-mix(in srgb, var(--text) 2%, transparent); }
.lvl-btn {
  border: 0; background: transparent; border-radius: 999px; padding: 0 14px; min-height: 36px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.lvl-btn[aria-pressed="true"] { background: var(--light); color: var(--on-accent); }
.lvl-btn:not([aria-pressed="true"]):hover { color: var(--text); }

/* ---------------- Sidebar ---------------- */
.toc {
  position: fixed; top: var(--tb-h); bottom: 0; left: 0; width: var(--toc-w); z-index: 40;
  border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; overscroll-behavior: contain;
}
.toc-inner { padding: 22px 16px 40px 20px; }
.toc-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 0 0 14px; font-size: 15px; color: var(--turf-ink); }
.toc-brand small { display: block; color: var(--muted); font-weight: 500; font-size: 14px; }
.toc-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--pitch); }
.toc-lvl { display: none; margin-bottom: 14px; }
.toc-part { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--dim); margin: 20px 0 6px 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 9px; text-decoration: none;
  color: var(--text-2); font-size: 14.5px; line-height: 1.3; min-height: 36px;
}
.toc a:hover { background: color-mix(in srgb, var(--text) 4%, transparent); color: var(--text); }
.toc a[aria-current="location"] { background: var(--turf-wash); color: var(--turf-ink); font-weight: 650; }
.toc-n { font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--dim); min-width: 20px; }
.toc a[aria-current="location"] .toc-n { color: var(--light-2); }
.toc-scrim { position: fixed; inset: var(--tb-h) 0 0 0; z-index: 39; background: color-mix(in srgb, var(--text) 35%, transparent); }

/* ---------------- Main column ---------------- */
.main { margin-left: var(--toc-w); padding: calc(var(--tb-h) + 24px) clamp(20px, 4.5vw, 72px) 120px; outline: none; }
.main > * { max-width: var(--wide); margin-left: auto; margin-right: auto; }

.hero { padding: 36px 0 56px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5vw, 66px); margin: 18px 0 20px; max-width: 16ch; text-wrap: balance; }
.hero .lede { max-width: 60ch; }
.hero-meta {
  display: inline-block; margin-top: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ev-pending) 35%, transparent);
  background: color-mix(in srgb, var(--ev-pending) 6%, transparent); color: var(--text-2); font-family: var(--font); font-weight: 600; font-size: 13px; line-height: 1.55;
}
.hero-pitch { position: relative; }
.hp-svg { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.hp-bg { fill: var(--pitch); }
.hp-lines { fill: none; stroke: color-mix(in srgb, var(--ball) 55%, transparent); stroke-width: 1.2; }
.hp-a { fill: var(--team-a); stroke: var(--team-a-edge); stroke-width: 1.2; }
.hp-b { fill: var(--team-b); stroke: var(--team-b-edge); stroke-width: 1.2; }
.hp-ball { fill: var(--ball); stroke: var(--text); stroke-width: .8; }
.hp-pass { fill: none; stroke: var(--ball); stroke-width: 1.4; stroke-dasharray: 3 3; }
.r-turf { fill: var(--pitch); }
.r-stripe { fill: color-mix(in srgb, var(--ball) 7%, transparent); }
.r-lines { fill: none; stroke: color-mix(in srgb, var(--ball) 60%, transparent); stroke-width: 1.5; }
.r-spot { fill: color-mix(in srgb, var(--ball) 70%, transparent); }
.r-seg { fill: none; stroke: var(--ball); stroke-width: 2.2; stroke-dasharray: 6 5; }
.r-axis { fill: color-mix(in srgb, var(--ball) 85%, transparent); font-family: var(--font); font-weight: 600; font-size: 18px; }
.r-num { font-family: var(--font); font-size: 18px; font-weight: 700; fill: var(--navy); }
.rball circle { fill: var(--ball); stroke: var(--navy); stroke-width: 1.5; }
.arr-head { fill: var(--light-2); }
.hp-cap { margin: 10px 2px 0; font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--dim); }
.hero-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 44px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hero-facts div { padding: 16px 18px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.hero-facts div:last-child { border-right: 0; }
.hero-facts dt { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); margin-bottom: 6px; }
.hero-facts dd { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.35; }
.hero-read { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.hr-h { font-size: 17px; margin: 0 0 10px; letter-spacing: -.01em; }
.hero-read p { color: var(--text-2); font-size: 16px; }
.hero-lvl .lvl-btn { min-height: 40px; font-size: 14.5px; }
.ev-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ev-legend li { display: grid; grid-template-columns: 210px 1fr; gap: 12px; align-items: baseline; font-size: 15px; color: var(--text-2); }
.ev-legend .ev { justify-self: start; }
.hero-notice { margin-top: 32px; }

/* chapters */
.chapter { padding: 72px 0 24px; border-bottom: 1px solid var(--line); }
.chapter > *:not(.fig-wide):not(.tbl-wrap):not(.fig) { max-width: var(--col); }
.ch-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; margin-bottom: 18px; }
.ch-head .eyebrow { flex-basis: 100%; }
.ch-head h2 { font-size: clamp(32px, 3.4vw, 48px); margin: 0; flex: 1 1 auto; text-wrap: balance; }
.copy-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
}
.copy-link:hover { color: var(--text); border-color: var(--light-2); }
.copy-link.is-done { color: var(--ev-verified); border-color: var(--ev-verified); }
.chapter p, .chapter li { color: var(--text-2); }
.chapter strong { color: var(--text); }
.chapter ul, .chapter ol { padding-left: 1.3em; }
.chapter li { margin-bottom: .35em; }
.spaced li { margin-bottom: .75em; }
.cols-2 { columns: 2; column-gap: 40px; }
.cols-2 li { break-inside: avoid; }

/* reading levels */
body[data-level="deep"] .exec { display: none; }
.exec { margin-bottom: 8px; }
details.deep {
  margin: 28px 0 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
details.deep > summary {
  list-style: none; cursor: pointer; padding: 14px 18px 14px 52px; position: relative; font-weight: 600; color: var(--text);
  min-height: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border-radius: var(--radius); font-size: 16px;
}
details.deep > summary::-webkit-details-marker { display: none; }
details.deep > summary::before {
  content: ""; position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  border: 1px solid var(--light-2); background:
    linear-gradient(var(--light-2), var(--light-2)) center/10px 1.6px no-repeat,
    linear-gradient(var(--light-2), var(--light-2)) center/1.6px 10px no-repeat;
  transition: transform .25s var(--ease);
}
details.deep[open] > summary::before { background: linear-gradient(var(--light-2), var(--light-2)) center/10px 1.6px no-repeat; transform: rotate(180deg); }
details.deep > summary:hover { background: var(--turf-wash); }
.deep-tag { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--light-2); font-weight: 500; }
.deep-body { padding: 4px 22px 22px; border-top: 1px solid var(--line); }
.deep-body > h3:first-child { margin-top: 1em; }

/* figures */
.fig { margin: 32px 0; }
.fig-wide { max-width: var(--wide); }
.fig-cap { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
figure > .fig-cap:first-child { margin: 0 0 12px; font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--light-2); }
.illus {
  display: inline-flex; gap: 8px; align-items: center; font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--ev-assumption);
  border: 1px dashed color-mix(in srgb, var(--ev-assumption) 50%, transparent); padding: 6px 10px; border-radius: 8px; margin: 0 0 14px;
}
.illus::before { content: "◇"; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 20px 0; background: color-mix(in srgb, var(--surface) 50%, transparent); -webkit-overflow-scrolling: touch; }
.tbl-wrap:focus-visible { outline-offset: 2px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); line-height: 1.5; }
.tbl thead th { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); font-weight: 500; background: color-mix(in srgb, var(--text) 2%, transparent); white-space: nowrap; }
.tbl tbody th { color: var(--text); font-weight: 600; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody tr:hover > * { background: color-mix(in srgb, var(--text) 1.5%, transparent); }
.tbl .ev { margin: 2px 0; }
.verdict-tbl tbody th { width: 40%; }
.verdict-tbl tbody th::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; background: var(--dim); }
.verdict-tbl tr.v-ok th::before { background: var(--ev-verified); }
.verdict-tbl tr.v-risk th::before { background: var(--ev-pending); }
.verdict-tbl tr.v-far th::before { background: transparent; border: 1.5px solid var(--dim); }
.flag { display: inline-block; margin-left: 6px; font-size: 13.5px; font-weight: 700; color: var(--ev-pending); border-bottom: 1px solid currentColor; }
.flag-blue { color: var(--light-2); }
.fw-tbl td.rc-y { color: var(--ev-verified); font-size: 13.5px; white-space: nowrap; }
.fw-tbl td.rc-n { color: var(--dim); font-size: 13.5px; white-space: nowrap; }
.dec-tbl tr.hl > * { background: var(--turf-wash); }
.spec-tbl tr.crit th { color: var(--light); }
.xo-tbl td:nth-child(3) { color: var(--text); }

/* split blocks */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin: 28px 0; max-width: var(--wide) !important; }
.split h3 { margin-top: 0; }
.ok-list h3, .ok-list h4 { color: var(--ev-verified); }
.no-list h3, .no-list h4 { color: var(--ev-pending); }
.two-col-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.notice { margin: 24px 0; }
.notice > span { display: block; }

/* principles & ADR */
.adr {
  margin: 8px 0 28px; padding: 26px 28px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--light-2) 30%, transparent);
  background: var(--surface);
}
.adr-tag { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--ev-verified); margin: 0 0 14px; }
.adr-steps { list-style: none; padding: 0 !important; margin: 0 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.adr-steps li { display: flex; gap: 12px; align-items: center; font-size: 19px; font-weight: 700; color: var(--text) !important; margin: 0; letter-spacing: -.01em; }
.adr-steps span { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--light-2); color: var(--light-2); font-family: var(--font); font-weight: 600; font-size: 14px; }
.adr-rule { margin: 0; font-size: 18px; color: var(--text) !important; }
.principles { list-style: none; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 24px 0; max-width: var(--wide) !important; }
.principles li { display: grid; grid-template-columns: 46px 1fr; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); margin: 0; }
.principles p { margin: 0; color: var(--text); }
.p-id { font-family: var(--font); font-weight: 600; color: var(--light-2); font-size: 14px; padding-top: 2px; grid-row: span 2; }
.p-src { font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--muted); }

/* rule quote */
.rule-quote { margin: 8px 0 28px; padding: 22px 26px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--pitch) 6%, transparent); border-radius: var(--radius); }
.rule-quote p { font-size: clamp(21px, 2.2vw, 28px); font-weight: 700; color: var(--text) !important; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 10px; }
.rule-quote footer { color: var(--muted); font-size: 15px; }
.small-quote p { font-size: 19px; }

/* architecture */
.arch-stage { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.arch-svg svg { width: 100%; height: auto; }
.arch-detail { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px 20px; background: var(--surface); scroll-margin-bottom: 24px; }
.arch-detail h3 { margin: 0 0 8px; font-size: 18px; }
.arch-detail p { font-size: 15px; }
.arch-detail ul { padding-left: 1.1em; margin: 0; }
.arch-detail li { font-size: 14.5px; }
.ad-k { font-family: var(--font); font-weight: 600; font-size: 13px;  margin: 0 0 6px; }
.anode { cursor: pointer; }
.anode rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.2; transition: fill .2s, stroke .2s; }
.anode .an-t { fill: var(--text); font-weight: 700; font-family: var(--font); }
.anode .an-s { fill: var(--muted); font-family: var(--font); font-weight: 600; }
.anode:hover rect { stroke: var(--light-2); }
.anode:focus { outline: none; }
.anode:focus-visible rect { stroke: var(--text); stroke-width: 3; }
.anode[aria-pressed="true"] rect { fill: color-mix(in srgb, var(--light-2) 20%, var(--surface-2)); stroke: var(--light-2); stroke-width: 2.4; }
.anode.g-contract rect { fill: color-mix(in srgb, var(--pitch) 12%, transparent); stroke: color-mix(in srgb, var(--pitch) 60%, transparent); stroke-dasharray: 5 4; }
.anode.g-contract[aria-pressed="true"] rect { fill: color-mix(in srgb, var(--pitch) 25%, transparent); stroke: var(--pitch); }
.anode.g-contract .an-t { fill: var(--text); }
.anode.g-side rect { fill: color-mix(in srgb, var(--ev-assumption) 6%, transparent); stroke: color-mix(in srgb, var(--ev-assumption) 45%, transparent); }
.agroup { fill: color-mix(in srgb, var(--text) 1.5%, transparent); stroke: var(--line); stroke-width: 1; }
.agroup-l { fill: var(--dim); font-family: var(--font); font-weight: 600; }
.aedge { fill: none; stroke: color-mix(in srgb, var(--light-2) 65%, transparent); stroke-width: 1.6; }
.aedge.side { stroke: color-mix(in srgb, var(--ev-assumption) 55%, transparent); stroke-dasharray: 4 4; }
.aedge-l { fill: var(--light-2); font-family: var(--font); font-weight: 600; }
.arch-text dl { margin: 0; }
.arch-text dt { font-weight: 700; color: var(--text); margin-top: 12px; }
.arch-text dd { margin: 2px 0 0; color: var(--text-2); }

/* contract flow */
.cflow-row { display: grid; grid-template-columns: 1fr auto 1fr 1.1fr 1fr auto 1.2fr; gap: 10px; align-items: stretch; }
.cf-node { border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cf-node strong { font-size: 15px; line-height: 1.3; }
.cf-k { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); }
.cf-sub { font-size: 13px; color: var(--muted); }
.cf-badge { align-self: flex-start; font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--ev-verified); border: 1px solid color-mix(in srgb, var(--ev-verified) 40%, transparent); border-radius: 999px; padding: 1px 8px; margin-top: auto; }
.cf-adapter { border-style: dashed; border-color: color-mix(in srgb, var(--ev-assumption) 50%, transparent); background: color-mix(in srgb, var(--ev-assumption) 5%, transparent); }
.cf-adapter strong { color: var(--ev-assumption); }
.cf-engine { border-color: color-mix(in srgb, var(--light-2) 50%, transparent); }
.cf-link { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 0 2px; text-align: center; }
.cf-c { font-family: var(--font); font-weight: 600; font-size: 13px; font-weight: 700; color: var(--text); background: color-mix(in srgb, var(--pitch) 14%, transparent); border: 1px solid color-mix(in srgb, var(--pitch) 50%, transparent); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.cf-dir { font-size: 13px; color: var(--muted); font-family: var(--font); font-weight: 600; white-space: nowrap; }
.cflow-ctl { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 16px; }
.cf-note { margin: 0; font-size: 15px; color: var(--text-2); }
.cf-flash { animation: cfflash .9s var(--ease); }
@keyframes cfflash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ev-assumption) 55%, transparent); } 100% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--ev-assumption) 0%, transparent); } }

/* tabs */
.tablist { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tablist [role="tab"] {
  border: 1px solid transparent; border-bottom: 0; background: transparent; padding: 0 14px; min-height: 44px; border-radius: 10px 10px 0 0;
  cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14.5px; margin-bottom: -1px;
}
.tablist [role="tab"][aria-selected="true"] { color: var(--text); border-color: var(--line); background: var(--surface); box-shadow: inset 0 2px 0 var(--light-2); }
.tablist [role="tab"]:hover { color: var(--text); }
.code { margin: 0; padding: 16px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.code code { background: none; padding: 0; color: inherit; word-break: normal; white-space: pre; }

/* brain layers */
.brain-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.brain-ctl-label { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; border-right: 1px solid var(--line-strong); background: transparent; min-height: 44px; min-width: 64px; padding: 0 16px; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button:last-child { border-right: 0; }
.seg button[aria-checked="true"] { background: var(--turf-wash); color: var(--text); }
.layers { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0; }
.layer { display: grid; grid-template-columns: 90px 1fr 260px; gap: 18px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); margin: 0 !important; position: relative; }
.layer + .layer { border-top: 0; }
.layer:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.layer:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.layer + .layer::before { content: "↓"; position: absolute; top: -13px; left: 40px; width: 24px; height: 24px; display: grid; place-items: center; font-size: 13px; color: var(--light-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 50%; }
.layer-k { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); }
.layer-main h3 { margin: 0 0 4px; font-size: 18px; }
.layer-main p { margin: 0; font-size: 15px; }
.layer-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.layer-meta dt { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--dim); }
.layer-meta dd { margin: 0; font-size: 14.5px; color: var(--text-2); }
.layer-meta dd.hot { color: var(--ev-assumption); font-weight: 700; }
.layer-skill { background: color-mix(in srgb, var(--ev-assumption) 7%, var(--surface)); border-color: color-mix(in srgb, var(--ev-assumption) 45%, transparent); }
.layer-skill.is-swapped .layer-main p { animation: cfflash .8s var(--ease); }
.lab-link { margin: 20px 0; }

/* autonomy */
.def-card { border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--ev-verified) 35%, transparent); background: color-mix(in srgb, var(--ev-verified) 5%, transparent); padding: 22px 24px; margin: 8px 0 24px; }
.def-k { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--ev-verified) !important; margin: 0 0 8px; }
.def-text { font-size: 20px; color: var(--text) !important; line-height: 1.45; margin: 0 0 10px; }
.def-not { margin: 0; font-size: 15.5px; }
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.ladder-btn { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-height: 64px; display: flex; flex-direction: column; gap: 4px; }
.ladder-btn .lb-id { font-family: var(--font); font-weight: 600; font-weight: 700; font-size: 17px; }
.ladder-btn .lb-v { font-size: 13.5px; color: var(--muted); }
.ladder-btn.ok-yes .lb-id { color: var(--ev-verified); }
.ladder-btn.ok-no .lb-id { color: var(--ev-pending); }
.ladder-btn.ok-maybe .lb-id { color: var(--ev-assumption); }
.ladder-btn[aria-pressed="true"] { border-color: var(--light-2); background: var(--turf-wash); }
.ladder-btn.is-rec { box-shadow: inset 0 -3px 0 var(--ev-verified); }
.ladder-out { grid-column: 1 / -1; margin-top: 6px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ladder-out p { margin: 0 0 4px; }

.stepper-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.step-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; color: var(--muted); font-size: 14.5px; }
.step-btn .sn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; font-family: var(--font); font-weight: 600; font-size: 13px; }
.step-btn[aria-current="step"] { color: var(--text); border-color: var(--light-2); background: var(--turf-wash); }
.step-btn.is-done { color: var(--ev-verified); }
.step-panel { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; }
.step-panel h3 { margin: 0 0 4px; }
.step-panel .sp-short { color: var(--light-2); font-family: var(--font); font-weight: 600; font-size: 13px; margin: 0 0 14px; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0; }
.sp-grid dt { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); }
.sp-grid dd { margin: 2px 0 0; color: var(--text-2); }
.sp-limit { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-size: 15px; }
.step-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.step-foot .btn { min-height: 44px; }
.step-foot .btn[disabled] { opacity: .35; cursor: default; }

/* simulation requirements */
.req-grid { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req-grid li { margin: 0; padding: 14px 16px 14px 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); position: relative; display: flex; flex-direction: column; gap: 4px; }
.req-grid li::before { position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.rq-ok::before { content: "✓"; color: var(--on-accent); background: var(--ev-verified); }
.rq-part::before { content: "~"; color: var(--on-accent); background: var(--ev-assumption); }
.rq-open::before { content: "?"; color: var(--on-accent); background: var(--ev-pending); }
.rq-k { font-weight: 700; color: var(--text); font-size: 15.5px; }
.rq-v { font-size: 14.5px; color: var(--text-2); }
.num-list li { margin-bottom: .6em; }

/* engines widget */
.eng-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 6px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--turf-wash); border-color: var(--light-2); color: var(--text); }
.chip:hover { color: var(--text); }
.chk { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; font-size: 14.5px; color: var(--text-2); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--light-2); }
.sort-sel { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.sort-sel select { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; }
.eng-count { font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--muted); margin-left: auto; }
.eng-tbl { min-width: 860px; }
.sort-btn { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; display: inline-flex; gap: 6px; align-items: center; min-height: 32px; }
.sort-btn:hover { color: var(--text); }
.sort-ind { font-size: 13px; opacity: .6; }
th[aria-sort="ascending"] .sort-ind, th[aria-sort="descending"] .sort-ind { opacity: 1; color: var(--light-2); }
.exp-btn { display: inline-flex; align-items: flex-start; gap: 10px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.35; min-height: 32px; }
.exp-btn .ei { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; color: var(--light-2); transition: transform .2s; margin-top: 1px; }
.exp-btn[aria-expanded="true"] .ei { transform: rotate(90deg); }
.role { display: inline-block; font-size: 13.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.role-candidate { color: var(--ev-verified); }
.role-reference { color: var(--light-2); }
.role-alternative { color: var(--ev-hypothesis); }
.role-unsuitable { color: var(--ev-assumption); }
.role-fallback { color: var(--muted); }
.role-excluded { color: var(--ev-pending); }
.pin { font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--ev-verified); }
.pin.no { color: var(--dim); }
tr.eng-detail > td { background: var(--turf-wash); color: var(--text-2); padding: 14px 18px 18px 50px; }
tr.eng-detail .ed-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 20px; margin-top: 10px; }
tr.eng-detail .ed-grid span { display: block; font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--dim); }

/* messi lines */
.ml-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.ml { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); position: relative; overflow: hidden; }
.ml-cand { border-color: var(--turf); background: var(--turf-wash); }
.ml-ex { opacity: .85; }
.ml-tag { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); margin: 0 0 6px; }
.ml-cand .ml-tag { color: var(--ev-verified); }
.ml-ex .ml-tag { color: var(--ev-pending); }
.ml h3 { margin: 0 0 4px; font-size: 20px; }
.ml h3 code { background: none; padding: 0; font-size: 1em; }
.ml-line { font-size: 14.5px; margin: 0 0 10px; }
.ml-sha { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; }
.ml-sha code { font-size: 13.5px; word-break: break-all; line-height: 1.45; padding: 6px 8px; background: var(--bg-2); border: 1px solid var(--line); flex: 1; }
.mini-btn { flex: none; min-height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 600; }
.mini-btn:hover { color: var(--text); border-color: var(--light-2); }
.mini-btn.is-done { color: var(--ev-verified); border-color: var(--ev-verified); }
.ml-facts { margin: 0; display: grid; gap: 6px; }
.ml-facts div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; font-size: 14px; }
.ml-facts dt { color: var(--dim); font-family: var(--font); font-weight: 600; font-size: 13px; padding-top: 2px; }
.ml-facts dd { margin: 0; color: var(--text-2); }

/* N ladder */
.nl { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; align-items: end; }
.nl-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 12px 12px 4px 4px; cursor: pointer; padding: 12px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 64px; }
.nl-btn .nl-id { font-family: var(--font); font-weight: 600; font-weight: 700; font-size: 18px; color: var(--text); }
.nl-btn .nl-s { font-size: 13.5px; color: var(--muted); }
.nl-btn[data-i="0"] { height: 70px; } .nl-btn[data-i="1"] { height: 96px; } .nl-btn[data-i="2"] { height: 122px; } .nl-btn[data-i="3"] { height: 148px; border-style: dashed; } .nl-btn[data-i="4"] { height: 174px; border-style: dashed; }
.nl-btn[aria-pressed="true"] { border-color: var(--light-2); background: color-mix(in srgb, var(--light-2) 14%, var(--surface)); }
.nl-out { margin-top: 12px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nl-out p { margin: 0 0 4px; }
.licence-box { margin-top: 18px; padding: 16px 18px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ev-assumption) 40%, transparent); background: color-mix(in srgb, var(--ev-assumption) 5%, transparent); }
.lb-k { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--ev-assumption) !important; margin: 0 0 6px; }

/* body architectures */
.body-ctl { margin: 6px 0 14px; }
.ba-panels { display: block; }
.ba-panel { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; }
.ba-panel h3 { margin: 0 0 4px; }
.ba-name { font-family: var(--font); font-weight: 600; color: var(--light-2); font-size: 13px;  }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; margin: 14px 0 0; }
.ba-grid dt { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); }
.ba-grid dd { margin: 3px 0 0; color: var(--text-2); }
.ba-grid .ba-fail dd { color: var(--ev-pending); }
.ba-none { display: inline-block; margin-top: 16px; font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--ev-assumption); border: 1px solid color-mix(in srgb, var(--ev-assumption) 45%, transparent); border-radius: 999px; padding: 4px 10px; }
.body-wrap.is-compare .tablist { display: none; }
.body-wrap.is-compare .ba-panels { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.body-wrap.is-compare .ba-panel[hidden] { display: block; }
.body-wrap.is-compare .ba-grid { grid-template-columns: 1fr; }

/* match record */
.rec-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rec-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.rec-dot { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--muted); }
.rec-dot[aria-current="step"] { color: var(--text); border-color: var(--light-2); background: var(--turf-wash); }
.rec-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rec-btns .btn { min-height: 44px; }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; }
.rec-pitch { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.rec-pitch svg { width: 100%; height: auto; }
.rec-time { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.rec-time b { color: var(--light); font-weight: 600; }
.rec-cap { padding: 12px 14px; margin: 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); background: var(--surface); }
.rec-cap strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 2px; }
.rec-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.rcard { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; transition: border-color .3s, background .3s; }
.rcard-k { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); margin: 0 0 6px; }
.rcard-k .rc-new { color: var(--ev-assumption); }
.rcard pre { margin: 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.5; color: var(--text); white-space: pre; overflow-x: auto; }
.rcard p { margin: 0; font-size: 14px; color: var(--text-2); }
.rcard.is-empty pre, .rcard.is-empty p { color: var(--dim); }
.rcard.is-active { border-color: color-mix(in srgb, var(--ev-assumption) 55%, transparent); background: color-mix(in srgb, var(--ev-assumption) 5%, transparent); }
.chain { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.chain span { font-family: var(--mono); font-size: 13px; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.chain span.cur { color: var(--ev-assumption); border-color: color-mix(in srgb, var(--ev-assumption) 60%, transparent); }
.chain span.sealed { color: var(--ev-verified); border-color: color-mix(in srgb, var(--ev-verified) 60%, transparent); }
.chain i { color: var(--dim); font-style: normal; }
.pl-h circle { fill: var(--team-a); stroke: var(--team-a-edge); }
.pl-a circle { fill: var(--team-b); stroke: var(--team-b-edge); }
.pl, .rball { transition: transform .6s var(--ease); }
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: var(--wide) !important; }
.ch-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; background: var(--surface); }
.ch-col h4 { margin-top: 0; }
.ch-auth { border-color: color-mix(in srgb, var(--light-2) 40%, transparent); }
.ch-auth h4 { color: var(--light); }
.ch-pres h4 { color: var(--ev-assumption); }

/* integrity protocol */
.proto { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 8px; counter-reset: none; }
.proto > li { margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.proto-step { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 10px 14px; min-height: 52px; border: 0; background: transparent; cursor: pointer; border-radius: 12px; }
.proto-step:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.ps-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--light-2); color: var(--light-2); font-family: var(--font); font-weight: 600; font-size: 13px; flex: none; }
.ps-t { font-weight: 700; color: var(--text); font-size: 16px; }
.proto-step[aria-expanded="true"] .ps-n { background: var(--light); color: var(--on-accent); border-color: var(--light); }
.proto-body { padding: 0 18px 14px 58px; }
.proto-body p { font-size: 15.5px; }
.formula { display: inline-block; font-size: 14px; padding: 6px 10px; color: var(--light); background: var(--bg-2); border: 1px solid var(--line-strong); }

/* roadmap */
.road-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); -webkit-overflow-scrolling: touch; }
.road-scroll svg { display: block; width: 100%; min-width: 1000px; height: auto; }
.rnode { cursor: pointer; }
.rnode circle.rc { fill: var(--surface-2); stroke: var(--light-2); stroke-width: 1.6; transition: fill .2s; }
.rnode .rn { fill: var(--text); font-family: var(--font); font-weight: 600; font-weight: 700; font-size: 15px; }
.rnode .rl { fill: var(--text-2); font-size: 14px; font-family: var(--font); }
.rnode.gate path { fill: color-mix(in srgb, var(--ev-assumption) 12%, transparent); stroke: var(--ev-assumption); stroke-width: 1.6; }
.rnode.gate .rn { fill: var(--ev-assumption); }
.rnode.current circle.rc { stroke: var(--pitch); fill: color-mix(in srgb, var(--pitch) 25%, transparent); }
.rnode.phase1 circle.rc { stroke: var(--ev-verified); }
.rnode.out circle.rc { stroke: var(--dim); stroke-dasharray: 3 3; }
.rnode:hover circle.rc, .rnode:hover path { fill: color-mix(in srgb, var(--light-2) 20%, transparent); }
.rnode:focus { outline: none; }
.rnode:focus-visible circle.rc, .rnode:focus-visible path { stroke: var(--text); stroke-width: 3; }
.rnode[aria-pressed="true"] circle.rc { fill: var(--light); stroke: var(--light); }
.rnode[aria-pressed="true"] .rn { fill: var(--on-accent); }
.rnode.gate[aria-pressed="true"] path { fill: var(--ev-assumption); }
.rnode.gate[aria-pressed="true"] .rn { fill: var(--on-accent); }
.rline { stroke: color-mix(in srgb, var(--light-2) 40%, transparent); stroke-width: 2; fill: none; }
.rband { fill: color-mix(in srgb, var(--ev-verified) 6%, transparent); stroke: color-mix(in srgb, var(--ev-verified) 25%, transparent); stroke-dasharray: 4 4; }
.rband-l { fill: var(--ev-verified); font-family: var(--font); font-weight: 600; font-size: 14px; }
.rband2 { fill: color-mix(in srgb, var(--ev-assumption) 4%, transparent); stroke: color-mix(in srgb, var(--ev-assumption) 22%, transparent); stroke-dasharray: 4 4; }
.rband2-l { fill: var(--ev-assumption); font-family: var(--font); font-weight: 600; font-size: 14px; }
.rpulse { fill: none; stroke: var(--pitch); stroke-width: 2; animation: rpulse 2.4s var(--ease) infinite; transform-origin: center; transform-box: fill-box; }
@keyframes rpulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }

.sched { margin: 36px 0; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--ev-assumption) 30%, transparent); border-radius: var(--radius); background: color-mix(in srgb, var(--ev-assumption) 3%, transparent); }
.sched h3 { margin-top: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sched-bars { display: grid; gap: 12px; margin: 18px 0 4px; }
.sb { display: grid; grid-template-columns: 170px 1fr 170px; gap: 14px; align-items: center; }
.sb-l { font-size: 15px; color: var(--text-2); }
.sb-v { font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--text); }
.sb-track { position: relative; height: 14px; border-radius: 999px; background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--line); }
.sb-bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 999px; }
.sb-fav { background: var(--ev-verified); }
.sb-cen { background: var(--light-2); }
.sb-range { position: absolute; top: -3px; bottom: -3px; left: var(--l); width: var(--w); border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--light-2) 80%, transparent); background: var(--turf-wash); }
.sb-unf { border-color: var(--ev-pending); background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ev-pending) 30%, transparent) 0 6px, color-mix(in srgb, var(--ev-pending) 8%, transparent) 6px 12px); }
.sched-axis { display: flex; justify-content: space-between; margin: 4px 170px 0 184px; font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--dim); }
.sched-why { margin: 16px 0; font-size: 15px; }
.milestones { list-style: none; padding: 0 !important; margin: 22px 0 8px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; position: relative; }
.milestones::before { content: ""; position: absolute; left: 8px; right: 8px; top: 8px; height: 2px; background: var(--line-strong); }
.milestones li { margin: 0; padding: 26px 16px 0 0; font-size: 15px; position: relative; }
.milestones li::before { content: ""; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--turf); }
.milestones strong { display: block; color: var(--turf-ink); font-size: 18px; }
.ms-w { display: block; font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 4px; }

.stage-list { display: grid; gap: 8px; max-width: var(--wide); }
details.stage { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details.stage > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 56px; border-radius: 12px; }
details.stage > summary::-webkit-details-marker { display: none; }
details.stage > summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--light-2); width: 24px; text-align: center; flex: none; }
details.stage[open] > summary::after { content: "−"; }
details.stage > summary:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
details.stage[open] { border-color: color-mix(in srgb, var(--light-2) 45%, transparent); }
.st-n { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font); font-weight: 600; font-weight: 700; border: 1px solid var(--light-2); color: var(--light-2); font-size: 14px; }
.stage.is-gate .st-n { border-radius: 8px; transform: rotate(45deg); width: 32px; height: 32px; margin: 4px; border-color: var(--ev-assumption); color: var(--ev-assumption); }
.stage.is-gate .st-n span { transform: rotate(-45deg); }
.st-name { font-weight: 700; color: var(--text); font-size: 16px; line-height: 1.3; }
.st-phase { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); display: block; font-weight: 400; margin-top: 2px; }
.st-body { padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.q9 { display: grid; grid-template-columns: 1fr; margin: 12px 0 0; }
.q9 > div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.q9 > div:last-child { border-bottom: 0; }
.q9 dt { font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--light-2); padding-top: 3px; }
.q9 dd { margin: 0; color: var(--text-2); font-size: 15.5px; }
.q9 .q-adv dt { color: var(--ev-verified); }
.q9 .q-stop dt { color: var(--ev-pending); }
.st-note { margin: 12px 0 0; font-size: 14.5px; }

/* gates: a stepped sequence, not a card grid */
.gates { display: grid; gap: 0; max-width: var(--wide) !important; margin: 24px 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gate-row { display: grid; grid-template-columns: 210px minmax(0,1fr) minmax(0,1.25fr); gap: 24px; padding: 22px 24px; border-top: 1px solid var(--line); }
.gate-row:first-child { border-top: 0; }
.gate-id { display: flex; align-items: flex-start; gap: 14px; }
.gate-dia { width: 40px; height: 40px; transform: rotate(45deg); border: 2px solid var(--ev-assumption); border-radius: 6px; display: grid; place-items: center; flex: none; margin: 6px; background: var(--surface); }
.gate-dia span { transform: rotate(-45deg); font-weight: 800; color: var(--ev-assumption); font-size: 17px; }
.gate-row h3 { margin: 0 0 2px; font-size: 21px; }
.gate-after { font-size: 14px; color: var(--muted); margin: 0; }
.gate-k { font-weight: 650; font-size: 14px; color: var(--muted) !important; margin: 0 0 4px; }
.gate-row ul { padding-left: 1.1em; margin: 0; }
.gate-row li { font-size: 15px; }
.gate-open { color: var(--text) !important; font-weight: 600; margin: 0 0 10px; }
.gate-not { color: var(--ev-pending) !important; font-size: 14.5px; margin: 0; }

/* acceptance */
.goals { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; margin: 8px 0 24px; max-width: var(--wide) !important; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.goals h3 { margin-top: 0; }
.goals-viz { display: grid; gap: 14px; }
.gv-row { display: grid; grid-template-columns: 64px 1fr 60px; gap: 12px; align-items: center; }
.gv-l, .gv-v { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--text-2); }
.gv-v { color: var(--text); }
.gv-track { height: 18px; border-radius: 6px; background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--line); position: relative; overflow: hidden; }
.gv-bar { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--pitch); }
.gv-small { min-width: 4px; background: var(--ev-assumption); }
.gv-note { margin: 0; font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--muted) !important; }

/* infra */
.infra { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 12px; }
.infra-svg { width: 100%; min-width: 800px; height: auto; }
.i-edges { fill: none; stroke: var(--light-2); stroke-width: 1.4; }
.i-lbl { font-family: var(--font); font-weight: 600; font-size: 14px; fill: var(--muted); }
.i-n { fill: var(--surface-2); stroke: var(--line-strong); }
.i-iso { stroke: var(--pitch); fill: color-mix(in srgb, var(--pitch) 10%, transparent); }
.i-ai { stroke-dasharray: 4 4; fill: color-mix(in srgb, var(--ev-hypothesis) 8%, transparent); stroke: var(--ev-hypothesis); }
.i-t { fill: var(--text); font-weight: 700; font-size: 15px; font-family: var(--font); }
.i-s { fill: var(--muted); font-size: 14px; font-family: var(--font); }
.infra .fig-cap { padding: 0 6px; }
.kv { list-style: none; padding: 0 !important; margin: 0 0 12px; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 15px; }
.kv b { font-weight: 600; color: var(--text-2); text-align: right; }
.kv b.good { color: var(--ev-verified); }
.kv b.bad { color: var(--ev-pending); }

.rules-ai { margin: 20px 0; padding: 18px 22px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--ev-hypothesis) 35%, transparent); background: color-mix(in srgb, var(--ev-hypothesis) 5%, transparent); }
.rules-ai h4 { margin-top: 0; color: var(--ev-hypothesis); }

/* risks */
.risk-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 6px; }
.risk-tbl { min-width: 720px; }
.sev { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--text); }
.sev::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sev); flex: none; }
.sev-critical { --sev: var(--c-crit); }
.sev-high { --sev: var(--c-high); }
.sev-medhigh { --sev: var(--c-medhigh); }
.sev-medium { --sev: var(--c-med); }
.sev-dominant { --sev: var(--c-dom); }
.risk-tbl td:first-child { font-family: var(--font); font-weight: 600; color: var(--muted); }

/* evidence quadrant */
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: var(--wide) !important; margin: 20px 0; }
.q { background: var(--surface); padding: 22px 24px; }
.q p { margin: 0; }
.q-k { font-family: var(--font); font-weight: 600; font-size: 13px;  margin-bottom: 8px !important; }
.q1 .q-k { color: var(--ev-verified); } .q2 .q-k { color: var(--light-2); } .q3 .q-k { color: var(--ev-assumption); } .q4 .q-k { color: var(--ev-pending); }
.q4 { background: color-mix(in srgb, var(--ev-pending) 6%, var(--surface)); }
.pv-tbl { min-width: 980px; }

/* glossary */
.gl-ctl { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0 16px; }
.gl-ctl input { min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 15px; width: min(360px, 100%); }
.gl-ctl input:focus { outline: none; border-color: var(--light-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--light-2) 22%, transparent); }
.gl-count { font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--muted); }
.gl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0; max-width: var(--wide); }
.gl > div { padding: 14px 0; border-top: 1px solid var(--line); }
.gl dt { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.gl dd { margin: 0; color: var(--text-2); font-size: 15.5px; }

/* sources */
.src-list li, .doc-list li { margin-bottom: .7em; font-size: 15.5px; }
.doc-list { list-style: none; padding: 0 !important; }
.doc-list b { display: block; color: var(--text); font-family: var(--font); font-weight: 600; font-size: 13.5px; }
.doc-foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; }
.doc-foot p { color: var(--muted); }

/* chapter navigation */
.ch-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 48px 0 0; max-width: var(--col); }
.ch-nav a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 60px; justify-content: center; }
.ch-nav a:hover { border-color: var(--light-2); background: var(--turf-wash); }
.ch-nav .cn-k { font-family: var(--font); font-weight: 600; font-size: 13px;  color: var(--muted); }
.ch-nav .cn-t { font-weight: 700; }
.ch-nav .cn-next { text-align: right; grid-column: 2; }

/* search highlight */
mark.hit { background: color-mix(in srgb, var(--ev-assumption) 35%, transparent); color: var(--text); border-radius: 3px; padding: 0 1px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--ev-assumption) 35%, transparent); }
.flash-target { animation: flashTarget 1.6s var(--ease); border-radius: 6px; }
@keyframes flashTarget { 0%, 30% { background: color-mix(in srgb, var(--ev-assumption) 18%, transparent); } 100% { background: transparent; } }
.noscript { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; padding: 12px; background: var(--surface-3); text-align: center; z-index: 80; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1240px) {
  .tb-title { display: none; }
}
@media (max-width: 1100px) {
  .tb-menu { display: inline-flex; }
  .toc { transform: translateX(-102%); transition: transform .28s var(--ease); width: min(340px, 88vw); box-shadow: var(--shadow); visibility: hidden; }
  .toc.is-open { transform: none; visibility: visible; }
  .toc-lvl { display: inline-flex; }
  .toc a { min-height: 44px; font-size: 15.5px; }
  .main { margin-left: 0; }
  .gate-row { grid-template-columns: 1fr 1fr; }
  .gate-row .gate-id { grid-column: 1 / -1; }
  .ml-grid { grid-template-columns: 1fr; }
  .cflow-row { grid-template-columns: minmax(0, 1fr); }
  .cf-dir, .cf-c { white-space: normal; }
  .cf-link { flex-direction: row; justify-content: flex-start; padding: 2px 12px; }
  .cf-link::before { content: "↓"; color: var(--light-2); }
  .body-wrap.is-compare .ba-panels { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .tb-lvl { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-read { grid-template-columns: 1fr; gap: 28px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div:nth-child(2) { border-right: 0; }
  .hero-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .split, .two-col-list, .channels, .goals, .quad, .req-grid, .principles, .gl { grid-template-columns: 1fr; }
  .adr-steps { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; gap: 8px; }
  .ladder { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .rec-grid { grid-template-columns: minmax(0, 1fr); }
  .sp-grid, .ba-grid { grid-template-columns: 1fr; }
  .cols-2 { columns: 1; }
  tr.eng-detail .ed-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --tb-h: 64px; }
  body { font-size: 16.5px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .tb-menu span { display: none; }
  .tb-back { flex: 1 1 auto; min-width: 0; justify-content: center; padding: 0 10px; font-size: 14.5px; }
  .tb-search-toggle { display: inline-flex; }
  .tb-search { display: none; position: fixed; left: 0; right: 0; top: var(--tb-h); width: auto; margin: 0; padding: 10px 12px; background: color-mix(in srgb, var(--bg) 97%, transparent); border-bottom: 1px solid var(--line); }
  .topbar.search-open .tb-search { display: block; }
  .tb-search-ico { left: 26px; top: 33px; }
  .tb-kbd { display: none; }
  .tb-search input { min-height: 46px; font-size: 16px; }
  .search-panel { position: static; width: auto; max-height: 62vh; margin-top: 8px; }
  .search-status { font-size: 14px; }
  .sr-sec { font-size: 14px; }
  .sr-snip { font-size: 15px; }
  .main { padding: calc(var(--tb-h) + 12px) 16px 96px; }
  .hero { padding: 20px 0 40px; }
  .hero h1 { font-size: 34px; }
  .hero-meta { font-size: 14px; }
  .hp-cap { font-size: 14px; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-facts div:last-child { border-bottom: 0; }
  .hero-facts dt { font-size: 14px; }
  .ev-legend li { grid-template-columns: 1fr; gap: 4px; }
  .lvl { display: flex; width: 100%; }
  .topbar .tb-lvl { display: none; }
  .lvl-btn { flex: 1; min-height: 44px; font-size: 15px; white-space: normal; line-height: 1.2; padding: 4px 10px; }
  .chapter { padding: 52px 0 20px; }
  .ch-head h2 { font-size: 30px; }
  .copy-link { min-height: 44px; font-size: 14px; }
  h3 { font-size: 20px; }
  /* minimum 14px text on phones */
  .eyebrow, .tb-ver, .toc-part, .toc-n, .deep-tag, .fig-cap, figure > .fig-cap:first-child, .illus, .tbl thead th, .p-src, .adr-tag,
  .cf-k, .cf-sub, .cf-badge, .cf-c, .cf-dir, .brain-ctl-label, .layer-k, .layer-meta dt, .def-k, .ladder-btn .lb-v, .sp-grid dt,
  .step-panel .sp-short, .eng-count, .role, .pin, tr.eng-detail .ed-grid span, .ml-tag, .ml-sha code, .ml-facts dt, .mini-btn,
  .nl-btn .nl-s, .lb-k, .ba-name, .ba-grid dt, .ba-none, .rec-time, .rcard-k, .rcard pre, .chain span, .flag, .fw-tbl td.rc-y, .fw-tbl td.rc-n,
  .ms-w, .sb-v, .sched-axis, .st-phase, .q9 dt, .gate-after, .gate-k, .gv-l, .gv-v, .gv-note, .i-s, .sev, .q-k, .gl-count,
  .doc-list b, .ch-nav .cn-k, .search-status, .code, .formula, .ad-k, .layer-meta dd, .small, .chip, .tbl, .ev, code {
    font-size: 14px;
  }
  .ev { text-transform: none; letter-spacing: 0; white-space: normal; }
  .eyebrow, .toc-part, .deep-tag, .tbl thead th, .fig-cap, .cf-k, .layer-k, .def-k, .ml-tag, .q-k, .gate-k, .rcard-k, .ch-nav .cn-k, .st-phase { }
  .chip { min-height: 44px; }
  .mini-btn { min-height: 44px; }
  .exp-btn { min-height: 44px; }
  .sort-btn { min-height: 44px; }
  .tablist [role="tab"] { flex: 1 1 auto; }
  details.deep > summary { padding: 12px 14px 12px 48px; font-size: 16px; }
  details.deep > summary::before { left: 14px; }
  .deep-body { padding: 4px 14px 18px; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .ladder { grid-template-columns: 1fr 1fr; }
  .step-btn .sn, .rec-dot, .ps-n, .exp-btn .ei, .sort-ind, .gate-after { font-size: 14px; }
  .hero-lvl .lvl-btn { min-height: 44px; }
  .rcard pre { white-space: pre-wrap; word-break: break-word; }
  /* engines and risks: stacked rows instead of a wide table */
  .eng-tbl, .risk-tbl { min-width: 0; }
  .eng-tbl thead, .risk-tbl thead { display: none; }
  .eng-tbl, .eng-tbl tbody, .eng-tbl tr, .eng-tbl th, .eng-tbl td,
  .risk-tbl, .risk-tbl tbody, .risk-tbl tr, .risk-tbl td { display: block; width: auto; }
  .eng-tbl tr[hidden], .risk-tbl tr[hidden] { display: none; }
  .eng-tbl tbody tr:not(.eng-detail), .risk-tbl tbody tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .eng-tbl tbody tr:not(.eng-detail) > *, .risk-tbl tbody tr > * { border: 0; padding: 3px 0; }
  .eng-tbl td[data-label], .risk-tbl td[data-label] { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 10px; }
  .eng-tbl td[data-label]::before, .risk-tbl td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 14px; }
  .risk-tbl td.rk-id { font-weight: 700; color: var(--turf-ink); }
  .risk-tbl td.rk-risk { font-weight: 600; color: var(--text); padding-bottom: 6px; }
  tr.eng-detail > td { padding: 12px 14px 16px; }
  .sort-sel select { min-height: 44px; }
  .role { white-space: normal; }
  .eng-count { margin-left: 0; flex-basis: 100%; }

  .ladder-btn { min-height: 64px; }
  .ladder-out { grid-column: 1 / -1; }
  .nl { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px; }
  .nl-btn { padding: 8px 6px; min-height: 44px; }
  .nl-btn .nl-id { font-size: 15px; }
  .nl-btn .nl-s { display: none; }
  .stepper-nav .step-btn .st-label { display: none; }
  .stepper-nav .step-btn { padding: 0 8px; min-width: 44px; justify-content: center; }
  .step-panel, .ba-panel { padding: 18px 16px; }
  .sb { grid-template-columns: 1fr; gap: 6px; }
  .sched { padding: 18px 16px; }
  .sched-axis { margin: 4px 0 0; }
  .milestones { grid-template-columns: 1fr; }
  .milestones::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .milestones li { padding: 0 0 16px 30px; }
  .gate-row { grid-template-columns: 1fr; gap: 12px; padding: 18px 16px; }
  .q9 > div { grid-template-columns: 1fr; gap: 4px; }
  details.stage > summary { padding: 8px 12px; }
  .st-body { padding: 4px 14px 14px; }
  .gv-row { grid-template-columns: 56px 1fr 56px; }
  .ch-nav { grid-template-columns: 1fr; }
  .ch-nav .cn-next { grid-column: 1; }
  .rule-quote { padding: 18px; }
  .def-card, .adr, .goals { padding: 18px 16px; }
  .def-text { font-size: 18px; }
  .rec-dot { min-width: 44px; }
  .tb-back span[aria-hidden] { display: inline; }
  .kv li { flex-direction: column; gap: 2px; }
  .kv b { text-align: left; }
  .toc-inner { padding: 16px 14px 40px; }
}
@media (max-width: 380px) {
  .tb-back { font-size: 14px; padding: 0 8px; }
  .hero h1 { font-size: 30px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rpulse { animation: none; opacity: 0; }
  .pl, .rball { transition: none; }
}

/* ---------------- Print ---------------- */
@media print {
  :root { --tb-h: 0px; }
  @page { margin: 16mm 14mm; }
  html, body.bp { background: #fff !important; color: #000 !important; font-size: 11pt; } /* print: fixed black on white by requirement */
  .topbar, .toc, .toc-scrim, .skip-link, .copy-link, .ch-nav, .lvl, .hero-read .lvl, .cflow-ctl, .body-ctl, .rec-top, .eng-ctl, .risk-ctl, .gl-ctl,
  .stepper-nav, .step-foot, .mini-btn, .lab-link, .noscript, #to-top, .hp-svg, .hp-cap, .arch-detail, .search-panel { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .main > *, .chapter > * { max-width: none !important; }
  .chapter { padding: 18pt 0 6pt; border-bottom: 1px solid #999; break-before: auto; }
  h1, h2, h3, h4, strong, b, dt, th, .rq-k, .st-name, .ps-t, .def-text, .rule-quote p, .adr-steps li, .adr-rule, .principles p, .gate-open { color: #000 !important; }
  p, li, td, dd, .muted, .fig-cap, .small, span { color: #222 !important; }
  a { color: #000 !important; text-decoration: underline; }
  .chapter a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444 !important; word-break: break-all; }
  body[data-level] .exec { display: block !important; }
  details > *:not(summary) { display: block !important; }
  details.deep, details.stage { border: 1px solid #bbb !important; background: none !important; }
  details.deep > summary::before { display: none; }
  details.deep > summary, details.stage > summary { padding-left: 10px !important; }
  details.stage > summary::after { display: none; }
  [role="tabpanel"][hidden], .proto-body[hidden], tr.eng-detail[hidden], tr[hidden], .ba-panel[hidden], .gl > div[hidden] { display: block !important; }
  tr.eng-detail[hidden], tr[hidden] { display: table-row !important; }
  .tablist { display: none !important; }
  .hero, .tbl-wrap, .fig, .adr, .def-card, .sched, .goals, .gate-card, .q, .ml, .layer, .step-panel, .ba-panel, .rcard, .req-grid li,
  .proto > li, .ch-col, .rules-ai, .licence-box, .notice, .rule-quote, .cf-node, .milestones li, .ladder-out, .nl-out, .rec-pitch, .rec-time, .rec-cap, .hero-facts div, .hero-meta, .code, .infra, .road-scroll, .quad {
    background: #fff !important; border-color: #bbb !important; box-shadow: none !important; color: #000 !important;
  }
  .tbl-wrap, .road-scroll, .infra { overflow: visible !important; }
  .tbl { min-width: 0 !important; font-size: 9.5pt; }
  .tbl th, .tbl td { color: #000 !important; border-color: #ccc !important; padding: 5pt 7pt; }
  .code, .rcard pre, .code code { color: #000 !important; white-space: pre-wrap !important; font-size: 8.5pt; }
  code { background: #f2f2f2 !important; color: #000 !important; }
  .ev { color: #000 !important; border-color: #000 !important; }
  .road-scroll svg, .infra-svg { min-width: 0 !important; }
  .arch-stage { grid-template-columns: 1fr !important; }
  tr, .layer, .gate-card, .q, details.stage, .rcard { break-inside: avoid; }
  .split, .channels, .gates, .ml-grid, .quad, .principles, .gl { gap: 8pt !important; }
  .body-wrap .ba-panels { display: grid !important; grid-template-columns: 1fr !important; gap: 8pt; }
  mark.hit { background: none !important; box-shadow: none !important; }
}
