/* ARCANA /GOVERNANCE — shared styles for the multi-page governance site */
:root {
  --bg: #0D0E0E; --panel: #131415; --panel2: #191B1C; --line: #232527; --line2: #323538;
  --text: #C8CAC7; --muted: #8F9290; --dim: #5B5E5C;
  --blue: #5B9BD5; --green: #6BCB77; --amber: #FBBF24; --red: #F87171;
  --purple: #A78BFA; --cyan: #22D3EE; --pink: #F472B6; --orange: #FF9F43;
  --L01: #5B9BD5; --L02: #6BCB77; --L03: #FF9F43; --L04: #A78BFA;
  --L05: #22D3EE; --L06: #F472B6; --L07: #FBBF24; --L08: #F87171;
  --L09: #2DD4BF; --L10: #A3E635; --L11: #FB7185;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; overflow: hidden; display: flex; flex-direction: column; }

/* ── big brother ───────────────────────────────────── */
.eye-bg { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 0; pointer-events: none; overflow: hidden; user-select: none; }
.eye-bg pre { font-family: var(--mono); font-size: clamp(24px, 2.2vw, 42px); line-height: 1.05; color: #C8CAC7; opacity: 0.04; animation: gaze 9s ease-in-out infinite; margin: 0; }
@keyframes gaze { 0%, 100% { opacity: 0.032; } 50% { opacity: 0.06; } }

/* ── top bar ───────────────────────────────────────── */
.bar { position: relative; z-index: 30; flex: none; background: rgba(7,7,11,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 3vw, 32px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 2px; font-size: 13px; text-decoration: none; color: var(--text); white-space: nowrap; }
.brand img { width: 20px; height: 20px; }
.brand em { color: var(--blue); font-style: normal; }
.crumb { font-family: var(--mono); font-size: 11px; color: var(--dim); text-decoration: none; white-space: nowrap; }
.crumb:hover { color: var(--blue); }
.inv { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv i { color: var(--green); font-style: normal; }
@media (max-width: 900px) { .inv { display: none; } }

/* ── page frame ────────────────────────────────────── */
.page { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
@media (max-width: 1150px) { .page { grid-template-columns: 208px minmax(0, 1fr); } }
@media (max-width: 860px) { .page { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); } }

/* ── rail — the vertical line ──────────────────────── */
.rail { position: relative; z-index: 10; border-right: 1px solid var(--line2); overflow-y: auto; scrollbar-width: thin; padding: 14px 0 10px; display: flex; flex-direction: column; }
@media (max-width: 860px) {
  .rail { flex-direction: row; align-items: center; overflow-x: auto; overflow-y: hidden; border-right: none; border-bottom: 1px solid var(--line2); padding: 8px 10px; gap: 2px; }
}
.r-label { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--dim); padding: 6px 22px 8px; }
@media (max-width: 860px) { .r-label { display: none; } }
.r-item { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 9px 18px 9px 24px; color: var(--muted); font-size: 12.5px; text-decoration: none; transition: color .15s ease, background-color .15s ease; white-space: nowrap; }
.r-item .n { font-family: var(--mono); font-size: 10.5px; color: var(--dim); min-width: 18px; transition: color .15s ease; }
.r-item:hover { color: var(--text); }
.r-item.on { color: var(--text); background: var(--panel); }
.r-item.on .n { color: var(--acc); }
.r-item.on::before { content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 10px; height: 2px; border-radius: 2px; background: var(--acc); }
@media (max-width: 860px) {
  .r-item { padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; }
  .r-item.on { border-color: var(--line2); }
  .r-item.on::before { display: none; }
}
.r-foot { margin-top: auto; padding: 14px 24px 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 860px) { .r-foot { display: none; } }
.r-foot a { font-family: var(--mono); font-size: 10.5px; color: var(--dim); text-decoration: none; }
.r-foot a:hover { color: var(--blue); }

/* ── content column ────────────────────────────────── */
.content { position: relative; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding: 32px clamp(20px, 3.4vw, 44px) 26px; animation: fadeUp 320ms var(--ease) backwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.pane-head { display: flex; align-items: baseline; gap: 16px; }
.pane-num { font-family: var(--mono); font-size: 13px; color: var(--acc); }
.pane-head h2 { font-size: clamp(21px, 2.6vw, 27px); font-weight: 750; letter-spacing: -.02em; }
.pane-sub { font-size: 13px; color: var(--dim); margin-top: 3px; }
.pane-body { margin-top: 20px; }
.pane-body > p { font-size: 13.5px; color: var(--muted); margin: 12px 0; max-width: 76ch; }
.pane-body p b, .pane-body li b { color: var(--text); }
.pane-body td, .pane-body th, .pane-body li, .pane-body div { overflow-wrap: break-word; }

.label { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--dim); margin: 22px 0 6px; text-transform: uppercase; }
.label::first-letter { color: var(--acc, var(--dim)); }

.formula { font-family: var(--mono); font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 13px 17px; margin: 13px 0; overflow-x: auto; white-space: nowrap; width: fit-content; max-width: 100%; }
.formula i { font-style: normal; }
.f-green i { color: var(--green); } .f-blue i { color: var(--blue); } .f-purple i { color: var(--purple); } .f-amber i { color: var(--amber); } .f-cyan i { color: var(--cyan); }
.note { border-left: 3px solid var(--blue); background: var(--panel); border-radius: 0 8px 8px 0; padding: 11px 15px; margin: 13px 0; font-size: 13px; color: var(--muted); }
.note.warn { border-left-color: var(--red); }
.note.ok { border-left-color: var(--green); }
.note b { color: var(--text); }

table.g { width: 100%; border-collapse: collapse; margin: 13px 0; font-size: 13px; }
table.g th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line2); }
table.g td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
table.g td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
table.g tr:last-child td { border-bottom: none; }

.risk { display: grid; grid-template-columns: 105px 1fr 1fr; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; margin: 13px 0; font-size: 13px; }
.risk > div { padding: 11px 15px; border-bottom: 1px solid var(--line); }
.risk > div:nth-child(3n+1), .risk > div:nth-child(3n+2) { border-right: 1px solid var(--line); }
.risk > div:nth-last-child(-n+3) { border-bottom: none; }
.risk .cls { font-family: var(--mono); font-weight: 700; }
.risk .low  { color: var(--green);  background: rgba(118,121,94,.07); }
.risk .mod  { color: var(--amber);  background: rgba(154,143,106,.07); }
.risk .high { color: var(--orange); background: rgba(255,154,77,.07); }
.risk .crit { color: var(--red);    background: rgba(138,59,50,.09); }
@media (max-width: 720px) { .risk { grid-template-columns: 90px 1fr; } .risk > div:nth-child(3n) { border-right: none; } .risk .ex { display: none; } }

.req { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 10px; margin: 13px 0; }
.req-group { border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); padding: 13px 15px; }
.req-group h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 7px; }
.req-group ul { list-style: none; }
.req-group li { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 2.5px 0; }
.rg-id h4 { color: var(--blue); } .rg-intent h4 { color: var(--purple); } .rg-action h4 { color: var(--amber); } .rg-data h4 { color: var(--cyan); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 13px 0; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }
.half { border: 1px solid var(--line2); border-radius: 8px; padding: 15px 17px; background: var(--panel); }
.half h4 { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; margin-bottom: 8px; }
.half.pdp h4 { color: var(--blue); } .half.pep h4 { color: var(--green); }
.half ul { list-style: none; }
.half li { font-size: 12.5px; color: var(--muted); padding: 4px 0 4px 16px; position: relative; }
.half li::before { content: "▸"; position: absolute; left: 0; color: var(--dim); }

.props { display: grid; grid-template-columns: repeat(auto-fit, minmax(142px, 1fr)); gap: 8px; margin: 13px 0; }
.prop { border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); padding: 10px 12px; text-align: center; }
.prop b { display: block; font-size: 12.5px; color: var(--blue); }
.prop span { font-size: 11px; color: var(--dim); }

.flow { counter-reset: step; margin: 13px 0; }
.flow .step { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; font-size: 13px; color: var(--muted); }
.flow .step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--acc, var(--purple)); min-width: 24px; }

.sm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 15px 0; font-family: var(--mono); font-size: 12px; }
.state { padding: 8px 14px; border-radius: 8px; border: 1px solid; font-weight: 700; }
.st-pending  { color: var(--amber);  border-color: var(--amber);  background: rgba(154,143,106,.08); }
.st-approved { color: var(--green);  border-color: var(--green);  background: rgba(118,121,94,.08); }
.st-claimed  { color: var(--blue);   border-color: var(--blue);   background: rgba(122,130,136,.08); }
.st-consumed { color: var(--purple); border-color: var(--purple); background: rgba(126,115,120,.08); }
.arrow { color: var(--dim); }

.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 13px 0; }
.route { border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); padding: 13px 15px; }
.route b { font-family: var(--mono); font-size: 12px; display: block; margin-bottom: 5px; }
.route span { font-size: 12px; color: var(--muted); }
.r-tui b { color: var(--green); } .r-dp b { color: var(--blue); } .r-dr b { color: var(--orange); } .r-ce b { color: var(--purple); }

.pipe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 15px 0; }
.layer { font-family: var(--mono); font-size: 11.5px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); }
.layer em { font-style: normal; color: var(--dim); margin-right: 6px; }

.prov { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 8px; margin: 13px 0; }
.pv { border: 1px solid var(--line2); border-left-width: 3px; border-radius: 8px; background: var(--panel); padding: 10px 13px; }
.pv b { font-family: var(--mono); font-size: 11.5px; display: block; }
.pv span { font-size: 11.5px; color: var(--muted); }

.sens { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; margin: 15px 0; }
.sv { flex: 1; min-width: 124px; text-align: center; border-radius: 8px; padding: 12px 10px; border: 1px solid var(--line2); }
.sv b { font-family: var(--mono); font-size: 12.5px; display: block; }
.sv span { font-size: 11px; color: var(--muted); }
.s1 { background: rgba(118,121,94,.06); }  .s1 b { color: var(--green); }
.s2 { background: rgba(122,130,136,.06); }  .s2 b { color: var(--blue); }
.s3 { background: rgba(154,143,106,.07); }  .s3 b { color: var(--amber); }
.s4 { background: rgba(138,59,50,.09); }   .s4 b { color: var(--red); }

.health { display: flex; gap: 8px; flex-wrap: wrap; margin: 13px 0; }
.hpill { font-family: var(--mono); font-size: 11.5px; padding: 6px 14px; border-radius: 999px; border: 1px solid; }
.h-c { color: var(--green); border-color: var(--green); background: rgba(118,121,94,.07); }
.h-d { color: var(--amber); border-color: var(--amber); background: rgba(154,143,106,.07); }
.h-u { color: var(--red); border-color: var(--red); background: rgba(138,59,50,.08); }

/* pager between domains */
.pager { margin-top: 34px; padding-top: 16px; border-top: 1px dashed var(--line2); display: flex; justify-content: space-between; gap: 12px; }
.pager a { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-decoration: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s ease; }
.pager a:hover { color: var(--acc); }
.pager a.next { margin-left: auto; text-align: right; }
.pager .n { color: var(--acc); margin-right: 6px; }
.pager a.next .n { margin-right: 0; margin-left: 6px; }

/* ── landing ───────────────────────────────────────── */
.page.landing { display: flex; flex-direction: column; }
.l-hero { flex: none; padding: clamp(28px, 5vh, 52px) clamp(20px, 4vw, 48px) 20px; }
.l-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--blue); margin-bottom: 12px; }
.l-title {
  font-family: var(--grotesk);
  font-size: clamp(40px, 5.8vw, 68px);
  font-weight: 700;
  letter-spacing: -2.5px;
  line-height: .96;
  background: linear-gradient(180deg, var(--text) 25%, color-mix(in srgb, var(--text) 34%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.l-title span { color: var(--dim); }
.l-tag { margin-top: 12px; font-size: 14.5px; color: var(--muted); max-width: 62ch; }
.l-tag b { color: var(--text); }
.l-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.l-inv { font-family: var(--mono); font-size: clamp(13px, 1.8vw, 17px); background: var(--panel); border: 1px solid var(--line2); border-left: 3px solid var(--green); border-radius: 0; padding: 12px 18px; }
.l-inv i { color: var(--green); font-style: normal; }
.stats { display: flex; gap: 7px; flex-wrap: wrap; }
.stat { font-family: var(--mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); background: var(--panel); padding: 6px 11px; border-radius: 0; }
.stat b { color: var(--text); }
.l-spine-label { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--dim); padding: 14px clamp(20px, 4vw, 48px) 8px calc(clamp(20px, 4vw, 48px) + 24px); }
.l-spine { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin: 0 clamp(20px, 4vw, 48px); border-left: 1px solid var(--line2); padding-bottom: 16px; }
.l-item { position: relative; display: flex; align-items: baseline; gap: 14px; padding: 11px 16px 11px 26px; text-decoration: none; transition: background-color .15s ease; }
.l-item:hover { background: var(--panel); }
.l-item::before { content: ""; position: absolute; left: -5.5px; top: 50%; transform: translateY(-50%); width: 11px; height: 2px; border-radius: 2px; background: var(--acc); opacity: .55; transition: opacity .15s ease, width .15s var(--ease); }
.l-item:hover::before { opacity: 1; width: 15px; }
.l-item .n { font-family: var(--mono); font-size: 11px; color: var(--acc); min-width: 22px; }
.l-item .t { font-size: 15px; font-weight: 650; color: var(--text); letter-spacing: -.01em; }
.l-item .s { margin-left: auto; font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-item .go { font-family: var(--mono); font-size: 12px; color: var(--dim); opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s var(--ease); }
.l-item:hover .go { opacity: 1; transform: none; }
@media (max-width: 720px) { .l-item .s { display: none; } }

footer { position: relative; z-index: 1; flex: none; border-top: 1px solid var(--line); padding: 9px clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--dim); font-size: 11px; }
footer .flinks { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
footer a { color: var(--dim); text-decoration: none; font-family: var(--mono); font-size: 10.5px; }
footer a:hover { color: var(--blue); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ── ascii motion ─────────────────────────────────── */
.rv { animation: fadeUp .45s var(--ease) backwards; }
.cur { display: inline-block; margin-left: 2px; color: var(--acc, var(--red)); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tick-wrap { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
#tick { color: var(--green); display: inline-block; }

/* ── human | agent ────────────────────────────────── */
.seg { display: flex; border: 1px solid var(--line2); border-radius: 999px; padding: 2px; gap: 2px; }
.seg button { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--dim); background: none; border: none; border-radius: 999px; padding: 4px 11px; cursor: pointer; transition: color .15s ease, background-color .15s ease; }
.seg button.on { color: var(--text); background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line2); }
.agent-view { display: none; }
.content.show-agent > :not(.agent-view) { display: none; }
.content.show-agent .agent-view { display: block; animation: fadeUp 320ms var(--ease) backwards; }
.page.landing.show-agent .l-hero, .page.landing.show-agent .l-spine-label, .page.landing.show-agent .l-spine { display: none; }
.page.landing.show-agent .agent-view { display: block; overflow-y: auto; padding: 26px clamp(20px, 4vw, 48px); animation: fadeUp 320ms var(--ease) backwards; }
.agent-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-bottom: 10px; }
#copy-md { font-family: var(--mono); font-size: 10.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 5px 12px; cursor: pointer; transition: color .15s ease, border-color .15s ease; }
#copy-md:hover { color: var(--text); border-color: var(--acc, var(--red)); }
.agent-md-src { font-family: var(--mono); font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; color: var(--muted); margin: 0; }

/* ── markdown graphs ─────────────────────────────────── */

/* Bracket title */
.md-bracket {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--acc, var(--text));
}

/* Sidebar rail */
.r-item .md-bracket {
  font-size: 11.5px;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 500;
}
.r-item:hover .md-bracket { color: var(--text); }
.r-item.on .md-bracket {
  color: var(--acc);
  font-weight: 600;
}

/* Pane head */
.pane-head .pane-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--acc);
}
.pane-head h2 {
  font-family: var(--mono);
  font-size: clamp(17px, 2.1vw, 22px);
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text);
  text-transform: uppercase;
}
.pane-head .md-bracket {
  color: var(--acc);
}
/* Landing spine titles: keep accent + mono spacing (beats .l-item .t) */
.l-item .t.md-bracket {
  color: var(--acc);
  letter-spacing: 0.5px;
  font-weight: 650;
}

/* Content containers — ascii frames */
.blueprint,
.gate,
.ladder,
.mani,
.seals,
.del,
.prov-line,
.pipeline,
.env-wrap,
.chain,
.verdicts,
.bounds {
  position: relative;
  border: 1px solid var(--line2);
  background: var(--panel);
  padding: 22px 26px;
  margin: 18px 0;
  border-radius: 0 !important;
}
.blueprint::before, .blueprint::after,
.gate::before, .gate::after,
.ladder::before, .ladder::after,
.mani::before, .mani::after,
.seals::before, .seals::after,
.del::before, .del::after,
.prov-line::before, .prov-line::after,
.pipeline::before, .pipeline::after,
.env-wrap::before, .env-wrap::after,
.chain::before, .chain::after,
.verdicts::before, .verdicts::after,
.bounds::before, .bounds::after {
  content: "+";
  position: absolute;
  top: -7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--acc, var(--dim));
  background: var(--bg);
  padding: 0 2px;
  z-index: 1;
}
.blueprint::before, .gate::before, .ladder::before, .mani::before,
.seals::before, .del::before, .prov-line::before, .pipeline::before,
.env-wrap::before, .chain::before, .verdicts::before, .bounds::before { left: -2px; }
.blueprint::after, .gate::after, .ladder::after, .mani::after,
.seals::after, .del::after, .prov-line::after, .pipeline::after,
.env-wrap::after, .chain::after, .verdicts::after, .bounds::after { right: -2px; }

/* Code blocks — fenced-formula look */
.formula {
  font-family: var(--mono);
  background: var(--panel);
  border: none;
  border-left: 3px solid var(--line2);
  border-radius: 0 !important;
  padding: 13px 17px;
  margin: 14px 0;
  overflow-x: auto;
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
}
.formula i { font-style: normal; }

/* Markdown tables */
.pane-body table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 14px 0; }
.pane-body th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--acc);
  text-align: left;
  padding: 9px 14px;
  border-bottom: 2px solid var(--line2);
}
.pane-body td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}
.pane-body tr:last-child td { border-bottom: none; }
.pane-body td:first-child { font-family: var(--mono); color: var(--text); }

/* Square inner components — no rounded corners in markdown */
.pane-body .fgroup,
.pane-body .gate-side,
.pane-body .gate-note,
.pane-body .rung,
.pane-body .pl-state,
.pane-body .mode,
.pane-body .stair,
.pane-body .hpill,
.pane-body .lane,
.pane-body .seal,
.pane-body .blk,
.pane-body .v-card,
.pane-body .half,
.pane-body .stratum,
.pane-body .step,
.pane-body .zero,
.pane-body .procl,
.pane-body .note,
.pane-body .env-note {
  border-radius: 0 !important;
}

/* Sub-headings */
.fgroup h4,
.gate-side h3,
.v-card h4,
.half h4,
.kick {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 10px;
}

/* Markdown blockquote callouts */
.procl,
.zero,
.gate-note,
.env-note,
.note,
.warn {
  border-left: 3px solid var(--acc, var(--line2));
  background: var(--panel);
  padding: 12px 18px;
  margin: 14px 0;
  font-size: 13px;
  color: var(--muted);
  border-radius: 0;
}
.procl b, .zero b, .gate-note b, .env-note b, .note b { color: var(--text); }

/* Markdown inline-code tokens (pipe layers) */
.pipe .layer {
  font-family: var(--mono);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
}

/* Decode animation */
@keyframes decode-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-decode] {
  animation: decode-in 0.4s ease-out backwards;
}

/* Stagger children */
.pane-body > * {
  animation: decode-in 0.4s ease-out backwards;
}
.pane-body > *:nth-child(1) { animation-delay: 0.1s; }
.pane-body > *:nth-child(2) { animation-delay: 0.15s; }
.pane-body > *:nth-child(3) { animation-delay: 0.2s; }
.pane-body > *:nth-child(4) { animation-delay: 0.25s; }
.pane-body > *:nth-child(5) { animation-delay: 0.3s; }
.pane-body > *:nth-child(6) { animation-delay: 0.35s; }
.pane-body > *:nth-child(7) { animation-delay: 0.4s; }
.pane-body > *:nth-child(8) { animation-delay: 0.45s; }

/* Reduced motion — accessibility */
@media (prefers-reduced-motion: reduce) {
  [data-decode], .pane-body > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  .scanlines::after { display: none; }
  .l-item::before, .l-item:hover::before { transition: none; animation: none !important; }
}

/* ══════════════════════════════════════════════════════════
   DESIGN REFINEMENT — depth, glow, motion, texture
   ══════════════════════════════════════════════════════════ */

/* Selection + focus + scrollbars */
::selection { background: color-mix(in srgb, var(--acc, #5B9BD5) 32%, transparent); color: var(--text); }
:focus-visible { outline: 1px solid var(--acc, var(--blue)); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border: 3px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }

/* Film grain — tactility over the void */
.scanlines::before {
  content: "";
  position: fixed; inset: 0; z-index: 99; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* Frames: accent hairline on top edge, hover lift, corner draw-in */
.blueprint, .gate, .ladder, .mani, .seals, .del,
.prov-line, .pipeline, .env-wrap, .chain, .verdicts, .bounds {
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  background-color: var(--panel);
  background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--acc, var(--dim)) 30%, transparent), transparent);
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 0;
}
.blueprint:hover, .gate:hover, .ladder:hover, .mani:hover, .seals:hover, .del:hover,
.prov-line:hover, .pipeline:hover, .env-wrap:hover, .chain:hover, .verdicts:hover, .bounds:hover {
  border-color: color-mix(in srgb, var(--acc, var(--line2)) 45%, var(--line2));
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -16px color-mix(in srgb, var(--acc, #000) 30%, transparent);
}
.blueprint::before, .blueprint::after,
.gate::before, .gate::after,
.ladder::before, .ladder::after,
.mani::before, .mani::after,
.seals::before, .seals::after,
.del::before, .del::after,
.prov-line::before, .prov-line::after,
.pipeline::before, .pipeline::after,
.env-wrap::before, .env-wrap::after,
.chain::before, .chain::after,
.verdicts::before, .verdicts::after,
.bounds::before, .bounds::after {
  opacity: .55;
  transition: opacity .2s ease;
  text-shadow: 0 0 10px color-mix(in srgb, var(--acc, transparent) 50%, transparent);
}
.blueprint:hover::before, .blueprint:hover::after,
.gate:hover::before, .gate:hover::after,
.ladder:hover::before, .ladder:hover::after,
.mani:hover::before, .mani:hover::after,
.seals:hover::before, .seals:hover::after,
.del:hover::before, .del:hover::after,
.prov-line:hover::before, .prov-line:hover::after,
.pipeline:hover::before, .pipeline:hover::after,
.env-wrap:hover::before, .env-wrap:hover::after,
.chain:hover::before, .chain:hover::after,
.verdicts:hover::before, .verdicts:hover::after,
.bounds:hover::before, .bounds:hover::after { opacity: 1; }

/* Pane number → accent chip */
.pane-head .pane-num {
  font-size: 11.5px;
  letter-spacing: 1px;
  border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent);
  background: color-mix(in srgb, var(--acc) 9%, transparent);
  padding: 3px 9px;
}

/* Section labels read as code comments */
.label::before { content: "// "; color: var(--acc); opacity: .7; }

/* Callouts pick up an accent tint */
.procl, .zero, .gate-note, .env-note, .note, .warn {
  background: color-mix(in srgb, var(--acc, var(--line2)) 5%, var(--panel));
  transition: border-color .2s ease;
}
.procl:hover, .zero:hover, .gate-note:hover, .env-note:hover, .note:hover, .warn:hover {
  border-left-color: var(--acc);
}

/* Table rows breathe */
.pane-body tbody tr { transition: background-color .15s ease; }
.pane-body tbody tr:hover { background: color-mix(in srgb, var(--acc) 5%, transparent); }

/* Hero: gradient-cut title, terminal kicker */
.l-title {
  background: linear-gradient(180deg, var(--text) 25%, color-mix(in srgb, var(--text) 34%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.l-title span {
  background: linear-gradient(180deg, var(--blue), color-mix(in srgb, var(--blue) 28%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.l-kicker::after {
  content: "▮"; margin-left: 7px; color: var(--blue);
  animation: blink 1s steps(1) infinite;
}

/* Invariant box: green ambient */
.l-inv { box-shadow: 0 0 26px -14px color-mix(in srgb, var(--green) 60%, transparent); }

/* Stats: accent numerals, tabular */
.stat { transition: border-color .2s ease, color .2s ease; }
.stat b { color: var(--blue); font-variant-numeric: tabular-nums; }
.stat:hover { border-color: var(--line2); color: var(--text); }

/* Spine: wash + slide + glowing tick */
.l-item { transition: background-color .15s ease, padding-left .22s var(--ease); }
.l-item:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 8%, transparent), transparent 58%);
  padding-left: 31px;
}
.l-item:hover::before { box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 65%, transparent); }

/* Rail active: accent wash instead of flat panel */
.r-item.on { background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 9%, transparent), transparent 72%); }
.r-item { transition: color .15s ease, background-color .15s ease; }

/* ══════════════════════════════════════════════════════════
   MOTION LAYER — orchestrated, ambient, responsive
   (auto-disabled under prefers-reduced-motion by global block)
   ══════════════════════════════════════════════════════════ */

@keyframes pop      { from { opacity: 0; transform: translateY(6px) scale(.96); } }
@keyframes ignite   { from { opacity: 0; transform: scale(.94); } }
@keyframes float    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes linkpulse{ 0%, 100% { opacity: .45; } 50% { opacity: .95; } }

/* Hero orchestration: invariant glows in, stats pop in sequence */
.l-inv { animation: fadeUp .55s var(--ease) .35s backwards; }
.stats .stat  { animation: pop .5s var(--ease) backwards; }
.stats .stat:nth-child(1) { animation-delay: .55s; }
.stats .stat:nth-child(2) { animation-delay: .62s; }
.stats .stat:nth-child(3) { animation-delay: .69s; }
.stats .stat:nth-child(4) { animation-delay: .76s; }
.stats .stat:nth-child(5) { animation-delay: .83s; }
.stats .stat:nth-child(6) { animation-delay: .90s; }
.stats .stat:nth-child(7) { animation-delay: .97s; }

/* Risk ladder: rungs descend the ladder */
.ladder .rung { animation: fadeUp .45s var(--ease) backwards; }
.ladder .rung:nth-child(1) { animation-delay: .20s; }
.ladder .rung:nth-child(2) { animation-delay: .32s; }
.ladder .rung:nth-child(3) { animation-delay: .44s; }
.ladder .rung:nth-child(4) { animation-delay: .56s; }

/* Approval pipeline: states ignite left to right */
.pipeline .pl-state { animation: ignite .5s var(--ease) backwards; }
.pipeline .pl-state:nth-of-type(1) { animation-delay: .25s; }
.pipeline .pl-state:nth-of-type(2) { animation-delay: .45s; }
.pipeline .pl-state:nth-of-type(3) { animation-delay: .65s; }
.pipeline .pl-state:nth-of-type(4) { animation-delay: .85s; }

/* Envelope strata: seven gates cascade */
.strata .stratum { animation: fadeUp .4s var(--ease) backwards; }
.strata .stratum:nth-child(1) { animation-delay: .15s; }
.strata .stratum:nth-child(2) { animation-delay: .24s; }
.strata .stratum:nth-child(3) { animation-delay: .33s; }
.strata .stratum:nth-child(4) { animation-delay: .42s; }
.strata .stratum:nth-child(5) { animation-delay: .51s; }
.strata .stratum:nth-child(6) { animation-delay: .60s; }
.strata .stratum:nth-child(7) { animation-delay: .69s; }

/* Capability seals: glyphs breathe, staggered */
.seals .seal .g { animation: float 5s ease-in-out infinite; }
.seals .seal:nth-child(2) .g { animation-delay: .4s; }
.seals .seal:nth-child(3) .g { animation-delay: .8s; }
.seals .seal:nth-child(4) .g { animation-delay: 1.2s; }
.seals .seal:nth-child(5) .g { animation-delay: 1.6s; }
.seals .seal:nth-child(6) .g { animation-delay: 2.0s; }
.seals .seal:nth-child(7) .g { animation-delay: 2.4s; }

/* Hash-chain + pipeline arrows: data flowing */
.chain .lk, .pl-arrow { animation: linkpulse 2.4s ease-in-out infinite; }
.chain .lk:nth-of-type(2), .pl-arrow:nth-of-type(2) { animation-delay: .3s; }
.chain .lk:nth-of-type(3), .pl-arrow:nth-of-type(3) { animation-delay: .6s; }
.chain .lk:nth-of-type(4), .pl-arrow:nth-of-type(4) { animation-delay: .9s; }
.chain .lk:nth-of-type(5), .pl-arrow:nth-of-type(5) { animation-delay: 1.2s; }

/* Responsive hovers: rows, pills, cards, blocks */
.hpill, .v-card, .blk, .mode, .lane, .step, .pv2, .seal {
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              border-color .2s var(--ease), background-color .2s var(--ease);
}
.hpill:hover { transform: translateY(-1px); box-shadow: 0 0 14px -5px currentColor; }
.v-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--vc, var(--acc)) 55%, transparent);
  box-shadow: 0 10px 26px -14px color-mix(in srgb, var(--vc, var(--acc)) 45%, transparent);
}
.blk:hover { border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
.mode:hover, .lane:hover, .step:hover, .pv2:hover {
  background: color-mix(in srgb, var(--acc) 6%, transparent);
}
.lane:hover .dot { box-shadow: 0 0 9px 1px currentColor; }
.pv2:hover { transform: translateX(2px); }

/* ══════════════════════════════════════════════════════════
   MOTION LAYER II — pointer light · signals · flow
   ══════════════════════════════════════════════════════════ */

/* Pointer-tracked spotlight inside frames (vars set by motion.js) */
.blueprint, .gate, .ladder, .mani, .seals, .del,
.prov-line, .pipeline, .env-wrap, .chain, .verdicts, .bounds {
  background-image:
    radial-gradient(340px circle at var(--mx, 50%) var(--my, -40%),
      color-mix(in srgb, var(--acc) 7%, transparent), transparent 62%),
    linear-gradient(90deg, transparent,
      color-mix(in srgb, var(--acc) 30%, transparent), transparent);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, 100% 1px;
  background-position: 0 0, 0 0;
}

/* Scroll progress hairline */
.md-prog {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  z-index: 300; pointer-events: none;
  background: linear-gradient(90deg,
    var(--acc, var(--blue)),
    color-mix(in srgb, var(--acc, var(--blue)) 35%, transparent));
  transition: width .08s linear;
}

/* THE LINE: a signal travels down the spine */
@keyframes ticksignal {
  0% { opacity: .55; } 1.5% { opacity: 1; } 5% { opacity: .55; } 100% { opacity: .55; }
}
.l-item::before { animation: ticksignal 5s infinite; }
.l-item:nth-child(1)::before { animation-delay: .00s; }
.l-item:nth-child(2)::before { animation-delay: .16s; }
.l-item:nth-child(3)::before { animation-delay: .32s; }
.l-item:nth-child(4)::before { animation-delay: .48s; }
.l-item:nth-child(5)::before { animation-delay: .64s; }
.l-item:nth-child(6)::before { animation-delay: .80s; }
.l-item:nth-child(7)::before { animation-delay: .96s; }
.l-item:nth-child(8)::before { animation-delay: 1.12s; }
.l-item:nth-child(9)::before { animation-delay: 1.28s; }
.l-item:nth-child(10)::before { animation-delay: 1.44s; }
.l-item:nth-child(11)::before { animation-delay: 1.60s; }
.l-item:nth-child(12)::before { animation-delay: 1.76s; }

/* RunProof chain: verification blip travels e₀ → runRoot */
@keyframes blkflash {
  0%, 100% { border-color: var(--line2); box-shadow: none; }
  4% { border-color: color-mix(in srgb, var(--acc) 70%, transparent);
       box-shadow: 0 0 14px -4px color-mix(in srgb, var(--acc) 55%, transparent); }
}
.chain .blk { animation: blkflash 3.4s infinite; }
.chain .blk:nth-of-type(1) { animation-delay: .0s; }
.chain .blk:nth-of-type(2) { animation-delay: .3s; }
.chain .blk:nth-of-type(3) { animation-delay: .6s; }
.chain .blk:nth-of-type(4) { animation-delay: .9s; }
.chain .blk.root { animation-duration: 3.4s; animation-delay: 1.25s; }

/* Provenance spectrum: trusted ↔ hostile drift */
.spec-bar {
  background-size: 300% 100% !important;
  animation: specdrift 8s ease-in-out infinite alternate !important;
}
@keyframes specdrift { from { background-position: 0% 0; } to { background-position: 200% 0; } }

/* Rail active tick breathes */
.r-item.on::before { animation: linkpulse 2.4s ease-in-out infinite; }

/* Smooth cross-page fades (Chromium View Transitions) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* ══════════════════════════════════════════════════════════
   FULL MARKDOWN — literal syntax as design
   ══════════════════════════════════════════════════════════ */

/* Document file-tab above each pane */
.doc-path {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .5px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.doc-path .dp-dot {
  width: 6px; height: 6px; flex: none;
  background: var(--acc);
  opacity: .85;
  box-shadow: 0 0 8px var(--acc);
}

/* Headings carry their markdown level */
.label::before { content: "## "; opacity: .55; }
.fgroup h4::before  { content: "#### "; opacity: .5; }
.gate-side h3::before { content: "### "; opacity: .5; }
.v-card h4::before  { content: "#### "; opacity: .5; }
.half h4::before    { content: "#### "; opacity: .5; }
.label::after {
  content: "";
  display: block;
  border-top: 1px dashed var(--line);
  margin-top: 10px;
  margin-bottom: 12px;
}

/* Bullets are literal "- " */
.pane-body ul { list-style: none; }
.pane-body ul li::before {
  content: "- ";
  color: var(--acc);
  opacity: .65;
  font-family: var(--mono);
}
.gate-side li::before { content: "- " !important; color: var(--acc) !important; opacity: .65 !important; }

/* Delegation flow renders as an ordered list */
.flow { counter-reset: mdstep; }
.flow .step::before {
  counter-increment: mdstep;
  content: counter(mdstep) ". ";
  font-family: var(--mono);
  color: var(--acc);
  opacity: .75;
}

/* Callouts open with a quote glyph */
.procl::before, .zero::before, .gate-note::before,
.env-note::before, .note::before {
  content: "> ";
  font-family: var(--mono);
  color: var(--acc);
  opacity: .7;
}

/* Reading measure — a rendered document, not a dashboard */
.pane-body p { line-height: 1.75; }
.pane-body ul li { line-height: 1.65; }
.pane-body > p { max-width: 72ch; }

/* ══════════════════════════════════════════════════════════
   LAYOUT FIXES — no stray scrollbars, stable geometry
   ══════════════════════════════════════════════════════════ */

/* Nothing inside the document pane ever scrolls horizontally.
   clip (not hidden) — no scroll container is created, corners
   and hover-nudges simply crop at the edge. */
.pane-body { overflow-x: clip; }
.pane-body div, .pane-body table { max-width: 100%; }

/* Wide tables scroll inside themselves, invisibly until hover */
.pane-body table { display: block; overflow-x: auto; }
.pane-body table::-webkit-scrollbar { height: 6px; }
.pane-body table::-webkit-scrollbar-thumb { background: transparent; }
.pane-body table:hover::-webkit-scrollbar-thumb { background: var(--line2); }

/* Quiet overlay-feel scrollbars: slim, low-contrast, hover-darkens.
   Firefox gets scrollbar-color; Chromium gets the webkit rules. */
.rail, .content, .l-spine { scrollbar-color: var(--line) transparent; }
.rail:hover, .content:hover, .l-spine:hover { scrollbar-color: var(--line2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid var(--bg); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--dim); }
*::-webkit-scrollbar-corner { background: transparent; }

/* Mobile horizontal rail: no scrollbar at all */
@media (max-width: 860px) {
  .rail { scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
}

/* Count-up never jiggles chip width */
.stat b { display: inline-block; min-width: 2ch; }

/* File-tab sits tight under the pane head */
.doc-path { margin-bottom: 14px; }

/* Long formulas: contained, no page-level influence */
.formula { contain: layout paint; }

/* ══════════════════════════════════════════════════════════
   GOVERNANCE CONTROL SURFACE — radical recomposition
   ══════════════════════════════════════════════════════════ */

/* Surfaces: three near-black levels */
:root { --bg:#080909; --panel:#0B0D0D; --panel2:#101212; }

/* Typography: precise grotesk for command surfaces */
:root { --grotesk:"Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; }

/* ── Eye: architectural watermark, ghosted over the void ── */
.eye-bg pre {
  font-size: clamp(15px, 1.35vw, 22px);
  opacity: .085;
  animation: gaze 9s ease-in-out infinite;
}
@keyframes gaze { 0%, 100% { opacity: .065; } 50% { opacity: .11; } }

/* ── Top bar: thinner, purposeful, centered document identity ── */
.bar-in { padding: 8px clamp(16px, 3vw, 32px); gap: 18px; }
.brand { font-size: 12px; letter-spacing: 2.4px; }
.brand img { width: 17px; height: 17px; }
.bar-doc {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 2.6px;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.bar-doc::before { content: "▸ "; color: var(--acc); opacity: .7; }
@media (max-width: 1060px) { .bar-doc { display: none; } }
.seg { background: var(--bg); border-color: var(--line); padding: 0; }
.seg button {
  position: relative; padding: 6px 13px; font-size: 9.5px; letter-spacing: 1.6px;
  color: var(--dim);
}
.seg button.on { color: var(--text); background: transparent; box-shadow: none; }
.seg button.on::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px;
  background: var(--acc);
}

/* ── Rail: dense classified-manual index ── */
.page { grid-template-columns: 208px minmax(0, 1fr); }
@media (max-width: 1150px) { .page { grid-template-columns: 188px minmax(0, 1fr); } }
.rail { padding: 10px 0 8px; }
.r-label { padding: 8px 20px 10px; font-size: 9px; letter-spacing: 3px; }
.r-item { padding: 7px 12px 7px 22px; font-size: 11.5px; align-items: center; }
.r-item .n { font-size: 11px; font-weight: 600; min-width: 24px; text-align: left; color: var(--dim); }
.r-item:hover { padding-left: 25px; }
.r-item.on {
  background: var(--panel2);
  box-shadow: inset 2px 0 0 var(--acc);
  animation: none;
}
.r-item.on::before {
  left: 0; right: auto; top: 0; bottom: 0;
  width: 2px; height: auto; transform: none; border-radius: 0;
  opacity: 1; animation: none;
}

/* ── Editorial opening: giant index + commanding grotesk title ── */
.pane-head, header.ed-open {
  display: block; position: relative;
  border-bottom: none;
  padding: 26px 0 30px;
  margin-bottom: 30px;
}
.pane-head::before, header.ed-open::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 25%, transparent) 45%, transparent);
}
.pane-head::after, header.ed-open::after {
  content: "SEC · GOVERNANCE SPEC"; position: absolute; top: -7px; right: 0;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 2.6px; color: var(--dim);
  background: var(--bg); padding: 0 8px;
}
.pane-num, header.ed-open .pane-num {
  display: block;
  font-family: var(--grotesk);
  font-weight: 700;
  font-size: clamp(58px, 6.5vw, 88px);
  line-height: .82;
  letter-spacing: -2px;
  color: color-mix(in srgb, var(--acc) 16%, transparent);
  -webkit-text-stroke: 1.2px color-mix(in srgb, var(--acc) 62%, transparent);
  margin-bottom: 14px;
}
@supports (-webkit-text-stroke: 1px black) {
  .pane-num, header.ed-open .pane-num { color: transparent; }
}
.pane-head h2, header.ed-open h2 {
  font-family: var(--grotesk);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--text);
}
.pane-sub { font-size: 14px; margin-top: 10px; letter-spacing: .2px; }
header.ed-open .ed-meta,
.pane-head .ed-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--dim);
  margin-bottom: 22px;
}
header.ed-open .ed-row { display: flex; align-items: flex-end; gap: clamp(18px, 3vw, 44px); flex-wrap: wrap; }
header.ed-open .ed-titles { flex: 1 1 320px; }
header.ed-open .ed-coord {
  display: flex; flex-direction: column; gap: 5px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--dim); text-align: right;
  border-right: 1px solid var(--line2); padding-right: 14px;
}
@media (max-width: 800px) { header.ed-open .ed-coord { display: none; } }

/* ── Pager → document footer rail with progress ── */
.pager {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: stretch; min-height: 54px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 46px; padding: 0;
}
.pager a { display: flex; align-items: center; padding: 0 4px; max-width: none; }
.pager a.next { justify-content: flex-end; }
.pg-pos {
  display: flex; align-items: center;
  padding: 0 26px;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px; color: var(--muted);
}

/* Grid energy removed — content stays a clean void over the eye */

/* ══════════════════════════════════════════════════════════
   SURFACE REFINEMENT — premium governance control surface
   (eye-bg untouched; grain/scanlines/glow stay)
   ══════════════════════════════════════════════════════════ */

/* ── Top bar: cohesive, single hairline, chip invariant ── */
.bar { border-bottom: none; position: relative; }
.bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line2) 22%, var(--line2) 78%, transparent);
}
.inv {
  border: 1px solid var(--line); background: var(--panel);
  padding: 5px 12px; border-radius: 0; font-size: 11px;
}
.seg { border-radius: 0; }
.seg button { border-radius: 0; }

/* ── Rail: balanced, scannable, edge-lit active state ── */
.page { grid-template-columns: 248px minmax(0, 1fr); }
@media (max-width: 1150px) { .page { grid-template-columns: 224px minmax(0, 1fr); } }
.r-label { display: flex; align-items: center; gap: 10px; padding: 16px 22px 10px; }
.r-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.r-item { padding: 10px 16px 10px 30px; }
.r-item .n {
  min-width: 22px; text-align: right; padding-right: 2px;
  color: var(--dim); opacity: .8;
}
.r-item.on .n { color: var(--acc); opacity: 1; }
.r-item.on::before {
  left: 0; right: auto; top: 7px; bottom: 7px;
  width: 2px; height: auto; transform: none; border-radius: 0;
  animation: linkpulse 2.4s ease-in-out infinite;
}
.r-foot { border-top: 1px dashed var(--line); margin-top: auto; padding-top: 12px; }

/* ── Content: clean void — the eye is the only background motif ── */

/* ── Pane head: iconic hero band ── */
.pane-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 24px;
}
.pane-head h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  text-shadow: 0 0 34px color-mix(in srgb, var(--acc) 22%, transparent);
}
.pane-sub { margin-top: 6px; font-size: 13px; letter-spacing: .3px; }
.pane-body > .label { margin-top: 30px; }

/* ── Chain: the evidence conduit (centerpiece) ── */
.pane-body .chain {
  position: relative;
  display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap;
  padding: 30px 26px 24px;
  margin: 6px 0 34px;
}
.pane-body .chain::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: 50%;
  height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, var(--line2) 10%, var(--line2) 90%, transparent);
}
.pane-body .blk {
  position: relative; z-index: 1;
  flex: 1 1 0; min-width: 104px;
  padding: 14px 10px 12px;
  background: var(--bg);
}
.pane-body .blk b { font-size: 13px; letter-spacing: .5px; }
.pane-body .blk span {
  display: block; margin-top: 4px;
  font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
}
.pane-body .blk.root {
  flex-grow: 1.25;
  border-color: color-mix(in srgb, var(--green) 55%, transparent);
  background: color-mix(in srgb, var(--green) 6%, var(--bg));
  box-shadow: 0 0 26px -12px color-mix(in srgb, var(--green) 55%, transparent);
}
.pane-body .chain .lk {
  align-self: center; flex: none; z-index: 1;
  font-size: 11px; color: var(--acc); opacity: .8;
}
.pane-body .chain::after {
  content: "hash-linked · append-only · offline-verifiable";
  position: absolute; left: 2px; bottom: -20px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--dim);
}
@media (max-width: 760px) {
  .pane-body .chain::before { display: none; }
  .pane-body .chain { flex-direction: column; align-items: stretch; }
  .pane-body .chain .lk { transform: rotate(90deg); align-self: center; padding: 2px 0; }
}

/* ── Replay modes: three equal interactive cards ── */
.pane-body .modes { grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: rpm; }
@media (max-width: 900px) { .pane-body .modes { grid-template-columns: 1fr; } }
.pane-body .mode {
  position: relative;
  border-top: 1px solid var(--line2) !important;
  padding: 18px 18px 16px;
  min-height: 128px;
}
.pane-body .mode::before {
  content: "0" counter(rpm);
  counter-increment: rpm;
  position: absolute; top: 12px; right: 14px;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1px; color: var(--cyan); opacity: .45;
}
.pane-body .mode::after {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent 72%);
  opacity: .55; transition: opacity .2s ease;
}
.pane-body .mode:hover::after { opacity: 1; }
.pane-body .mode:hover {
  border-color: color-mix(in srgb, var(--cyan) 40%, var(--line2)) !important;
  box-shadow: 0 10px 26px -16px color-mix(in srgb, var(--cyan) 45%, transparent);
}
.pane-body .mode b { color: var(--cyan); letter-spacing: 1px; font-size: 11.5px; }
.pane-body .mode span { display: block; line-height: 1.65; margin-top: 2px; }
.modes .mode { animation: fadeUp .45s var(--ease) backwards; }
.modes .mode:nth-child(1) { animation-delay: .15s; }
.modes .mode:nth-child(2) { animation-delay: .27s; }
.modes .mode:nth-child(3) { animation-delay: .39s; }

/* ── Security profiles: scannable ledger ── */
.pane-body td:first-child {
  display: inline-block;
  background: var(--panel2);
  border: 1px solid var(--line);
  padding: 3px 9px;
  margin: 2px 0;
  font-size: 11.5px;
  color: var(--cyan);
}
.pane-body td:last-child { font-size: 12px; line-height: 1.7; color: var(--muted); }
.pane-body th { color: var(--cyan); border-bottom-color: color-mix(in srgb, var(--cyan) 45%, transparent); }

/* ── Trace health: system state board ── */
.health { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .health { grid-template-columns: 1fr; } }
.hpill {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-radius: 0;
  font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase;
}
.hpill::before {
  content: ""; flex: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.hpill::after {
  margin-left: auto;
  font-size: 9px; letter-spacing: 1.5px; opacity: .55; text-transform: lowercase;
}
.hpill.h-c::after { content: "all events accounted"; }
.hpill.h-d::after { content: "partial capture"; }
.hpill.h-u::after { content: "no verifiable trail"; }
.health .hpill { animation: fadeUp .45s var(--ease) backwards; }
.health .hpill:nth-child(1) { animation-delay: .5s; }
.health .hpill:nth-child(2) { animation-delay: .62s; }
.health .hpill:nth-child(3) { animation-delay: .74s; }
