/* ============ POSTMORTEM // VHS × DOS-TUI theme ============ */
@font-face { font-family: 'Cond'; src: url(fonts/BarlowCondensed-ExtraBold.ttf) format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Cond'; src: url(fonts/BarlowCondensed-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cond'; src: url(fonts/BarlowCondensed-Medium.ttf) format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'JBM'; src: url(fonts/JetBrainsMono-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JBM'; src: url(fonts/JetBrainsMono-ExtraBold.ttf) format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --bg: #050707; --panel: rgba(9, 22, 24, .55); --line: #2a5a60; --line-hi: #7fd6df;
  --teal: #7fd6df; --teal-hi: #c4f6f9; --text: #cfe9ec; --dim: #5d8a8f;
  --red: #ff2a3c; --blue: #4b6bff; --amber: #ffb000; --green: #5dffb0; --cyan: #7fd6df;
  --mono: 'JBM', ui-monospace, Menlo, Consolas, monospace;
  --cond: 'Cond', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --chroma: -2px 0 rgba(255, 42, 60, .55), 2px 0 rgba(75, 107, 255, .7);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font: 15px/1.6 var(--mono); overflow-x: hidden; }
::selection { background: var(--teal); color: #000; }
a { color: var(--teal); text-decoration: none; border-bottom: 1px dashed currentColor; }
a:hover { color: var(--teal-hi); }
.red { color: var(--red); } .amber { color: var(--amber); } .green { color: var(--green); } .dim { color: var(--dim); }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
pre { margin: 0; font-family: var(--mono); }
.tag { font-size: 11px; letter-spacing: .18em; color: var(--dim); text-transform: uppercase; margin: 0 0 10px; }

/* ---------- film grain, scanlines, vignette ---------- */
.grain { pointer-events: none; position: fixed; inset: 0; z-index: 30; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .6  0 0 0 0 .9  0 0 0 0 .95  0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.scan { pointer-events: none; position: fixed; inset: 0; z-index: 31;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px),
              radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.75)); }

/* ---------- VHS OSD ---------- */
.osd { position: fixed; top: 14px; left: 18px; right: 18px; z-index: 40; display: flex; gap: 18px; pointer-events: none;
  font: 600 22px/1 var(--cond); letter-spacing: .06em; color: var(--teal); text-shadow: var(--chroma); }
.osd .osd-sp { opacity: .8; }
.osd .rec { margin-left: auto; color: var(--red); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- HERO ---------- */
.hero-vhs { position: relative; height: 100svh; padding: 0 0 18px; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; }
body.hero-lock { overflow: hidden; overscroll-behavior: none; touch-action: none; }
body.hero-lock a, body.hero-lock button, body.hero-lock input,
body.hero-lock textarea, body.hero-lock summary, body.hero-lock details {
  touch-action: manipulation;
}

.skull-bg { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); z-index: 0; margin: 0;
  pointer-events: none; user-select: none; color: var(--teal); opacity: .2; white-space: pre;
  font: 800 clamp(11px, 2.35vw, 24px)/1.12 var(--mono); text-shadow: var(--chroma);
  transition: opacity .25s; }
.hero-vhs:not(.show-skull) .skull-bg { opacity: 0; visibility: hidden; }
.hero-vhs > :not(.skull-bg) { position: relative; z-index: 1; }

.marquee { overflow: hidden; white-space: nowrap; margin-top: 0; padding-top: 42px; }
.marquee-track { display: inline-flex; will-change: transform; animation: marquee 32s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mq { position: relative; display: inline-block; padding-right: .25em; flex: none;
  font: 800 clamp(104px, 21vw, 320px)/.78 var(--cond); letter-spacing: -.01em; color: var(--teal);
  text-shadow: -4px 0 rgba(255,42,60,.55), 5px 0 rgba(75,107,255,.85), 0 0 24px rgba(127,214,223,.25);
  filter: contrast(1.15); }
.mq .mq-q { color: var(--red); text-shadow: -3px 0 rgba(255,42,60,.85), 3px 0 rgba(75,107,255,.45), 0 0 18px rgba(255,42,60,.45); }
.mq::before, .mq::after { content: attr(data-text); position: absolute; left: 0; top: 0; pointer-events: none; }
.mq::before { color: var(--teal-hi); clip-path: inset(18% 0 62% 0); transform: translateX(-6px); mix-blend-mode: screen; opacity: .85; }
.mq::after { color: var(--blue); clip-path: inset(64% 0 14% 0); transform: translateX(7px); mix-blend-mode: screen; opacity: .75; }
@keyframes slice1 { 0%{clip-path:inset(18% 0 62% 0);transform:translateX(-3px)} 40%{clip-path:inset(40% 0 44% 0);transform:translateX(4px)} 100%{clip-path:inset(18% 0 62% 0);transform:translateX(-3px)} }
@keyframes slice2 { 0%{clip-path:inset(64% 0 14% 0);transform:translateX(4px)} 50%{clip-path:inset(30% 0 58% 0);transform:translateX(-3px)} 100%{clip-path:inset(64% 0 14% 0);transform:translateX(4px)} }

.qday-block { text-align: right; }
.qday-label { font: 400 11px/1.2 var(--mono); letter-spacing: .18em; color: var(--dim); text-transform: uppercase; margin-bottom: 8px; }
.osd-big { font: 600 clamp(26px, 4.4vw, 58px)/1 var(--cond); color: var(--teal); text-shadow: var(--chroma); letter-spacing: .02em; }

.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 5vw; margin-top: auto; flex-wrap: wrap; flex: none; }
.brand {
  display: block; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: 800 clamp(30px, 4vw, 52px)/.9 var(--cond); color: var(--teal); text-shadow: var(--chroma);
}
.brand:hover { color: var(--teal-hi); }
.brand:focus-visible { outline: 1px solid var(--teal); outline-offset: 4px; }
.brand .mq-q { color: var(--red); text-shadow: -2px 0 rgba(255,42,60,.85), 2px 0 rgba(75,107,255,.45); }
.brand small {
  display: block; font: 400 10px var(--mono); letter-spacing: .18em;
  color: var(--dim); text-shadow: none; text-transform: uppercase; margin-top: 8px;
}

@media (max-width: 720px) {
  .osd { font-size: 15px; gap: 10px; top: 10px; white-space: nowrap; }
  .osd .osd-sp { display: none; }

  .topbar.cmdbar { padding: 10px 14px; }
  .topbar .keys {
    flex-wrap: nowrap; gap: 16px; width: 100%; justify-content: center;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .topbar .keys::-webkit-scrollbar { display: none; }
  .topbar .keys a { flex: none; font-size: 11px; letter-spacing: .08em; white-space: nowrap; }

  .hero-vhs { padding-bottom: 12px; }
  /* Marquee sits tight under the menu */
  .marquee { padding-top: 14px; }
  .mq {
    font-size: clamp(36px, 12vw, 64px); line-height: .82;
    text-shadow: -2px 0 rgba(255,42,60,.5), 3px 0 rgba(75,107,255,.75), 0 0 14px rgba(127,214,223,.2);
  }

  /* Bigger skull on home */
  .skull-bg { top: 46%; font-size: clamp(10px, 3.1vw, 15px); }
  .hero-vhs.show-skull .skull-bg { opacity: .28; }

  .land { padding: 4px 5vw 8px; gap: 8px; }

  /* Centered Q-Day timer (big), brand smaller below */
  .hero-foot {
    flex-direction: column; align-items: center; gap: 14px;
    padding: 0 4vw 8px; text-align: center;
  }
  .qday-block { order: -1; text-align: center; width: 100%; }
  .qday-label { font-size: 11px; letter-spacing: .2em; margin-bottom: 8px; }
  .osd-big { font-size: clamp(30px, 9.5vw, 44px); white-space: nowrap; letter-spacing: .04em; }
  .brand { font-size: clamp(22px, 6.5vw, 30px); text-align: center; width: 100%; }
  .brand small { font-size: .26em; letter-spacing: .1em; margin-top: 6px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .marquee-track, .warn-mq-track, .osd .rec { animation: none; }
}

/* ---------- TUI main ---------- */
main.tui { max-width: 1120px; margin: 0 auto; padding: 34px 20px 40px; }
.scan-head { margin-bottom: 10px; }
.scan-cta { margin: 0 0 10px; font: 600 clamp(28px, 4.2vw, 52px)/1.02 var(--cond); color: var(--teal);
  text-shadow: var(--chroma); text-transform: uppercase; letter-spacing: .01em; }
.scan-cta mark { background: rgba(255, 42, 60, .78); color: var(--teal-hi); padding: 0 .08em; text-shadow: var(--chroma); }
.warn-mq { overflow: hidden; white-space: nowrap; margin: 0 0 14px; border-top: 1px solid rgba(255,42,60,.35);
  border-bottom: 1px solid rgba(255,42,60,.35); background: rgba(255,42,60,.08); }
.warn-mq-track { display: inline-flex; will-change: transform; animation: marquee 32s linear infinite; }
.warn-mq span { flex: none; padding: 7px 0; font: 800 11px/1.2 var(--mono); letter-spacing: .12em;
  color: var(--red); text-transform: uppercase; padding-right: 2.5em; }
.manual-open {
  display: inline-block; margin: 10px 0 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: 800 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.manual-open:hover { color: var(--teal); }
.manual-dialog {
  border: 1px solid var(--line); background: #050707; color: var(--text);
  padding: 0; max-width: min(520px, 92vw); width: 100%;
  box-shadow: 0 24px 80px rgba(0,0,0,.75);
}
.manual-dialog::backdrop { background: rgba(0,0,0,.72); }
.manual-dialog-inner { padding: 18px 18px 20px; }
.manual-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.manual-dialog-head h3 { margin: 0; font: 800 14px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.manual-close {
  border: 0; background: transparent; color: var(--dim); font: 800 22px/1 var(--mono);
  cursor: pointer; padding: 0 4px;
}
.manual-close:hover { color: var(--teal-hi); }
.manifesto-list { padding-left: 18px; margin: 0 0 12px; font-size: 13.5px; color: #a9cdd1; }
.manifesto-list li { margin-bottom: 8px; }
.manifesto-list b { color: #fff; }
.manifesto-list b.red { color: var(--red); }
.manifesto-list b.amber { color: var(--amber); }
.manifesto-list b.green { color: var(--green); }

/* In-hero glitch stages (01–03 + autopsy) */
.land { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center;
  gap: 14px; padding: 8px 5vw 12px; min-height: 0; max-width: 1120px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.land.is-home { max-width: none; }
.land-stage { display: grid; width: 100%; flex: 1; min-height: 0; align-items: center; }
.land-block { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr;
  align-items: center; opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(0); filter: none; max-height: 100%; overflow: hidden;
  position: relative; width: 100%; height: 100%; min-height: 0; }
.land-block.on { opacity: 1; visibility: visible; pointer-events: auto; z-index: 1; }
.land-block.land-home {
  grid-template-columns: 1fr; align-items: center; justify-items: stretch;
  width: 100%; height: 100%; min-width: 0; padding: 0; overflow: hidden; max-height: none;
}
/* Two phrase blocks: left high, right lower — no horizontal scroll */
.hero-lines {
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(28px, 6vh, 72px);
  width: 100%; max-width: 100%; min-width: 0; padding: 0 clamp(16px, 4vw, 48px); box-sizing: border-box;
  font: 600 clamp(34px, 6.2vw, 82px)/1.08 var(--cond); color: var(--teal); text-shadow: var(--chroma);
  text-transform: uppercase; letter-spacing: .015em;
  overflow: hidden;
}
.hero-col {
  display: flex; flex-direction: column; gap: .35em;
  align-self: flex-start; width: max-content; max-width: 100%;
}
.hero-col > div { white-space: nowrap; }
.hero-col.r {
  align-self: flex-end; text-align: right; align-items: flex-end;
  margin-top: 0;
}
.hero-lines mark { background: rgba(255, 42, 60, .78); color: var(--teal-hi); padding: 0 .1em; text-shadow: var(--chroma); }
@media (max-width: 720px) {
  .land.is-home { min-width: 0; overflow: hidden; }
  .land.is-home .land-stage { min-width: 0; overflow: hidden; }
  .land-block.land-home { overflow: hidden; }
  .hero-lines {
    gap: clamp(36px, 8vh, 64px); padding: 0 4vw;
    font-size: clamp(24px, 6.4vw, 40px);
    line-height: 1.1; letter-spacing: .02em;
  }
  .hero-col { gap: .3em; max-width: 100%; }
}

.land-block.land-scan {
  grid-template-columns: 1fr; align-content: start; align-items: stretch; gap: 10px;
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  touch-action: pan-y; overscroll-behavior: contain; padding-bottom: 8px;
  min-width: 0; max-width: 100%;
}
.land-block.land-scan #scan-form {
  width: 100%; max-width: 100%; min-width: 0;
  padding-top: clamp(28px, 6vh, 64px);
}
.land-block.land-scan .panel { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.land-block.land-scan .scan-head { position: relative; z-index: 1; }
.land-block.land-scan #panel-scan { padding-top: 14px; }
.land-block.land-scan .scan-main,
.land-block.land-scan #pane-autopsy,
.land-block.land-scan #pane-preflight { min-width: 0; max-width: 100%; }
.land-block.land-scan .warn-mq { max-width: 100%; }
.land-block.land-scan .scan-results { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.land-block.land-scan .scan-out { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.land-block.land-scan .scan-out .summary,
.land-block.land-scan .scan-out .share { margin: 0; min-width: 0; }
.land-block.land-scan .scan-out .share img { display: block; max-width: 100%; width: 100%; height: auto; }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.summary-top .tag { margin: 0; }
.summary-top #restart { flex: none; letter-spacing: .12em; padding: 6px 12px; font-size: 12px; }
.case-block { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.case-block header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cert-slot { margin-top: 14px; }
.cert-slot .cert-actions { margin-top: 0; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.share-actions .btn, .share-actions .ghost { flex: 1 1 auto; text-align: center; justify-content: center; min-width: 7.5em; }
.land-block.glitch-out { animation: landOut .32s steps(3) forwards; z-index: 2; }
.land-block.glitch-in { animation: landIn .38s steps(4) forwards; z-index: 3; }
@keyframes landOut {
  0% { opacity: 1; filter: none; transform: none; clip-path: none; }
  35% { opacity: 1; filter: hue-rotate(-18deg) saturate(1.6); transform: translateX(-10px); clip-path: inset(0 20% 40% 0); }
  70% { opacity: .5; filter: hue-rotate(20deg); transform: translateX(14px); clip-path: inset(50% 0 0 30%); }
  100% { opacity: 0; visibility: hidden; filter: none; transform: translateX(-6px); clip-path: none; }
}
@keyframes landIn {
  0% { opacity: 0; filter: hue-rotate(25deg) contrast(1.4); transform: translateX(16px); clip-path: inset(0 0 70% 0); }
  30% { opacity: 1; transform: translateX(-8px); clip-path: inset(40% 0 0 0); }
  55% { transform: translateX(6px); clip-path: inset(0 35% 20% 0); filter: hue-rotate(-12deg); }
  100% { opacity: 1; visibility: visible; filter: none; transform: none; clip-path: none; }
}
/* Concept ASCII — background atmosphere, like the skull */
.land-block:not(.land-home):not(.land-scan) .land-art {
  position: absolute; z-index: 0; margin: 0; pointer-events: none; user-select: none;
  left: 4%; top: 34%; transform: translateY(-50%);
  color: var(--teal); opacity: .22; white-space: pre;
  font: 800 clamp(7px, 1.35vw, 13px)/1.12 var(--mono);
  text-shadow: -2px 0 rgba(255,42,60,.4), 2px 0 rgba(75,107,255,.55), 0 0 18px rgba(127,214,223,.2);
}
.land-block.flip:not(.land-home):not(.land-scan) .land-art {
  left: auto; right: 4%;
}
.land-art.tint-red { color: #ff5a68; text-shadow: -2px 0 rgba(255,42,60,.7), 2px 0 rgba(75,107,255,.3), 0 0 16px rgba(255,42,60,.3); }
.land-art.tint-blue { color: #6b86ff; text-shadow: -2px 0 rgba(255,42,60,.3), 2px 0 rgba(75,107,255,.7), 0 0 16px rgba(75,107,255,.3); }
.land-block:not(.land-home):not(.land-scan) .land-copy {
  position: relative; z-index: 1; max-width: 36em; justify-self: end; padding: 0 2vw;
}
.land-block.flip:not(.land-home):not(.land-scan) .land-copy {
  justify-self: start;
}
.land-copy .tag { margin-bottom: 12px; font-size: 12px; letter-spacing: .18em; }
.land-copy h2 { margin: 0 0 16px; font: 600 clamp(32px, 5vw, 58px)/1.02 var(--cond); color: var(--teal);
  text-shadow: var(--chroma); text-transform: uppercase; letter-spacing: .01em; }
.land-copy h2 mark { background: rgba(255, 42, 60, .78); color: var(--teal-hi); padding: 0 .08em; text-shadow: var(--chroma); }
.land-copy p { margin: 0; max-width: 34em; color: #c2dcdf; font-size: 16px; line-height: 1.65; }
.land-copy p b { color: #fff; }
@media (max-width: 720px) {
  .land-block:not(.land-home):not(.land-scan),
  .land-block.flip:not(.land-home):not(.land-scan) {
    overflow: hidden; align-content: center; touch-action: none;
  }
  .land-block:not(.land-home):not(.land-scan) .land-art,
  .land-block.flip:not(.land-home):not(.land-scan) .land-art {
    left: 50%; right: auto; top: 28%; transform: translate(-50%, -50%);
    font-size: clamp(8px, 2.4vw, 12px); opacity: .16;
    max-width: 95vw; overflow: hidden;
  }
  .land-block:not(.land-home):not(.land-scan) .land-copy,
  .land-block.flip:not(.land-home):not(.land-scan) .land-copy {
    justify-self: stretch; width: 100%; max-width: none; padding: 0;
  }
  .land-copy .tag { font-size: 11px; letter-spacing: .16em; margin-bottom: 10px; }
  .land-copy h2 {
    font-size: clamp(32px, 9.5vw, 48px);
    line-height: 1.02;
    margin: 0 0 14px;
  }
  .land-copy p {
    font-size: 15.5px;
    line-height: 1.6;
    max-width: none;
  }
  .scan-cta { font-size: clamp(28px, 8.5vw, 42px); }
  .warn-mq span { font-size: 10px; letter-spacing: .12em; }
  #input { height: 5.5em; max-height: 22vh; font-size: 12.5px; }
  .land-block.land-scan #scan-form { padding-top: clamp(20px, 5vh, 40px); }
  .boot { font-size: 11.5px; min-height: calc(3 * 1.55em); }
}
@media (prefers-reduced-motion: reduce) {
  .land-block.glitch-out, .land-block.glitch-in { animation: none; }
}

fieldset.panel, details.panel, div.panel { border: 1px solid var(--line); background: var(--panel); margin: 0; padding: 14px 16px 16px; min-width: 0; }
fieldset.panel > legend { padding: 0 6px; color: var(--teal); font-size: 13px; letter-spacing: .02em; }
.panel-like { border: 1px solid var(--line); background: var(--panel); padding: 16px; margin: 18px 0; }
.manifesto { margin-top: 26px; font-size: 13.5px; color: #a9cdd1; }
.manifesto > summary { cursor: pointer; color: var(--teal); font-size: 13px; letter-spacing: .02em; list-style: none;
  padding: 2px 0; user-select: none; }
.manifesto > summary::-webkit-details-marker { display: none; }
.manifesto > summary::before { content: '[+] '; color: var(--dim); }
.manifesto[open] > summary::before { content: '[-] '; }
.manifesto[open] > summary { margin-bottom: 12px; }
.manifesto .tag { margin-top: 18px; }
.manifesto b { color: #fff; } .manifesto b.red { color: var(--red); } .manifesto b.amber { color: var(--amber); } .manifesto b.green { color: var(--green); }
.manifesto ul { padding-left: 18px; margin: 0; } .manifesto li { margin-bottom: 8px; }
footer { margin: 28px 0 0; font-size: 12px; }

/* scan panel */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.tab { background: transparent; color: var(--dim); border: 1px solid var(--line); padding: 7px 12px; font: 13px var(--mono); letter-spacing: .06em; cursor: pointer; text-transform: none; }
.tab.on { color: #000; background: var(--teal); border-color: var(--teal); }
.tab.on .dim { color: #0b3b40; }
.tab:hover:not(.on) { color: var(--teal-hi); border-color: var(--teal); }
kbd { font: 800 12px var(--mono); color: #000; background: var(--teal); padding: 0 5px; margin-right: 6px; }
.tab.on kbd { background: #000; color: var(--teal); }

.boot { color: var(--teal); font-size: 12.5px; line-height: 1.55; min-height: calc(5 * 1.55em); white-space: pre-wrap; opacity: .95; margin-bottom: 8px; }
.cursor { animation: blink 1s steps(1) infinite; }

textarea, #pf-input {
  display: block; width: 100%; max-width: 100%; min-width: 0;
  background: rgba(0,0,0,.55); color: var(--teal-hi); border: 1px solid var(--line);
  padding: 12px; font: 13.5px/1.55 var(--mono); caret-color: var(--teal);
}
#input {
  height: clamp(4.5em, 14vh, 7.5em); max-height: 30vh;
  resize: none; overflow: auto; field-sizing: fixed;
}
#pf-input { resize: none; }
textarea::placeholder, #pf-input::placeholder { color: #3e6a6f; }
textarea:focus, #pf-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 0 22px rgba(127,214,223,.15); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; }
button { background: var(--teal); color: #000; border: 0; padding: 12px 22px; font: 800 14px var(--mono); letter-spacing: .12em; cursor: pointer; text-transform: uppercase; }
button:hover { background: var(--teal-hi); }
button.ghost { background: transparent; color: var(--teal); border: 1px solid var(--line); }
button.ghost:hover { border-color: var(--teal); color: var(--teal-hi); }
button:disabled { opacity: .7; cursor: wait; }
a.btn { display: inline-block; background: var(--teal); color: #000; border: 0; padding: 12px 20px; font: 800 13px var(--mono); letter-spacing: .12em; }
a.btn:hover { background: var(--teal-hi); color: #000; }

/* death certificate */
.cert-actions { margin-top: 12px; }
.cert-btn { background: transparent; color: var(--red); border: 1px solid var(--red); padding: 10px 16px; font-size: 13px; }
.cert-btn:hover { background: var(--red); color: #fff; }
.cert-btn.alive { color: var(--green); border-color: var(--green); }
.cert-btn.alive:hover { background: var(--green); color: #000; }
.cert-panel { margin-top: 12px; border: 1px solid var(--line); padding: 12px; background: rgba(0,0,0,.35); }
.cert-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 675; border: 1px solid var(--line); background: #000; }
.obit { color: var(--teal-hi); font-size: 13.5px; margin: 10px 0 0; border-left: 3px solid var(--red); padding-left: 10px; }
a.ghost-a { display: inline-block; border: 1px solid var(--line); color: var(--teal); padding: 11px 16px; font: 800 13px var(--mono); letter-spacing: .12em; }
a.ghost-a:hover { border-color: var(--teal); color: var(--teal-hi); }
button.bury { background: #1a1a1a; color: #e9f6f7; border: 1px solid #555; padding: 11px 16px; font-size: 13px; }
button.bury:hover { background: #fff; color: #000; }
.buried { color: #e9f6f7; margin: 12px 0 0; }

/* graveyard */
.small-mq .mq { font-size: clamp(64px, 11vw, 160px); }
.gy-top { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .gy-top { grid-template-columns: 1fr; } }
/* ---------- DEATH WATCH (teletext) ---------- */
.ttx-head { position: sticky; top: 38px; z-index: 45; display: flex; gap: 14px; align-items: center; padding: 6px 14px; margin-top: 40px;
  background: #0018a8; font: 800 15px/1.2 var(--mono); letter-spacing: .06em; box-shadow: 0 2px 0 #000; }
.ttx-head .p { color: #fff; } .ttx-head .svc { color: #00ffff; } .ttx-head .ttl { color: #ffff00; }
.ttx-head .clk { margin-left: auto; color: #fff; }
.ttx-main { padding-top: 16px; }
.drift-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.drift-side { text-align: center; font: 800 13px var(--mono); letter-spacing: .1em; }
.drift-side .n { font: 800 clamp(44px, 7vw, 72px)/1 var(--cond); text-shadow: var(--chroma); }
.drift-side.threat { color: var(--red); } .drift-side.defense { color: var(--green); }
.tug { flex: 1; min-width: 0; font-size: clamp(9px, 1.6vw, 15px); white-space: pre; overflow: hidden; text-align: center; color: #fff; }
.tug .t { color: var(--red); text-shadow: 0 0 8px rgba(255,42,60,.6); } .tug .g { color: var(--green); text-shadow: 0 0 8px rgba(93,255,176,.5); }
.drift-panel .sub { color: var(--teal-hi); font-size: 13px; margin: 10px 0 0; }
.ttx-tabs { margin-top: 18px; }
.ttx-list { margin-top: 8px; }
.ttx-row { display: grid; grid-template-columns: 110px 96px 1fr; gap: 12px; padding: 10px 6px; border-bottom: 1px solid #10292c; align-items: start; }
.ttx-row:nth-child(odd) { background: rgba(0,24,168,.08); }
.ttx-date { color: #ffff00; font: 800 12px var(--mono); padding-top: 2px; }
.ttx-tag { font: 800 11px var(--mono); letter-spacing: .08em; text-align: center; padding: 2px 4px; color: #000; background: #00ffff; }
.ttx-tag.t-hardware { background: #ff00ff; color: #fff; } .ttx-tag.t-research { background: #ffff00; }
.ttx-tag.t-bitcoin { background: #ff9900; } .ttx-tag.t-ethereum { background: #8c8cff; }
.ttx-tag.t-chains { background: #00ff66; } .ttx-tag.t-industry { background: #00ffff; }
.ttx-h { color: #fff; font-size: 14px; font-weight: 800; line-height: 1.35; }
.ttx-h a { color: #fff; border-bottom-color: #3a5c60; }
.ttx-row .dir { font-size: 11px; padding: 1px 5px; margin-right: 4px; }
.ttx-row.threat .dir { background: var(--red); color: #fff; } .ttx-row.defense .dir { background: var(--green); color: #000; }
.ttx-why { color: #a9cdd1; font-size: 13px; margin-top: 4px; line-height: 1.5; }
.ttx-meta { margin-top: 6px; font-size: 12px; display: flex; gap: 14px; align-items: center; }
.impact { color: #ffff00; letter-spacing: 2px; }
.wire-warn { background: #ffff00; color: #000; font: 800 12px var(--mono); padding: 6px 10px; margin: 6px 0 4px; }
.ttx-ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 34; background: #000; border-top: 1px solid #0018a8; overflow: hidden; white-space: nowrap; }
.ttx-track { display: inline-block; padding: 4px 0; color: #ffff00; font: 800 12px var(--mono); animation: marquee 120s linear infinite; }
body:has(.ttx-ticker) { padding-bottom: 40px; }
@media (max-width: 700px) {
  .ttx-row { grid-template-columns: 1fr; gap: 4px; }
  .ttx-tag { justify-self: start; }
  .ttx-head { font-size: 12px; gap: 8px; }
  .ttx-head .svc { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ttx-track { animation: none; } }

/* ---------- LIFE SUPPORT ---------- */
:root { --ls-stable: #5dffb0; --ls-surgery: #7fd6df; --ls-selfmed: #ffd24a; --ls-diagnosed: #ff8a3c; --ls-untreated: #ff2a3c; }
.ward-big { font: 800 clamp(44px, 8vw, 84px)/.95 var(--cond); color: var(--ls-stable); text-shadow: var(--chroma); }
.ward-head .sub { color: var(--teal); font-weight: 800; margin-top: 6px; font-size: 13px; letter-spacing: .04em; }
.ward-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill.ls-stable { color: var(--ls-stable); } .pill.ls-surgery { color: var(--ls-surgery); } .pill.ls-selfmed { color: var(--ls-selfmed); }
.pill.ls-diagnosed { color: var(--ls-diagnosed); } .pill.ls-untreated { color: #fff; background: var(--ls-untreated); border-color: var(--ls-untreated); }
.ls-t-stable { color: var(--ls-stable) !important; } .ls-t-surgery { color: var(--ls-surgery) !important; } .ls-t-selfmed { color: var(--ls-selfmed) !important; }
.ls-t-diagnosed { color: var(--ls-diagnosed) !important; } .ls-t-untreated { color: var(--ls-untreated) !important; }

.ward { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px; margin-top: 14px; }
.bed, .ekg, .monitor, .bed dl, .bed dd { min-width: 0; }
.bed dd { overflow-wrap: anywhere; }
.bed { --c: var(--ls-surgery); border: 1px solid var(--line); border-top: 3px solid var(--c); background: rgba(0,0,0,.45); padding: 12px 14px; display: flex; flex-direction: column; }
.bed.ls-stable { --c: var(--ls-stable); } .bed.ls-surgery { --c: var(--ls-surgery); } .bed.ls-selfmed { --c: var(--ls-selfmed); }
.bed.ls-diagnosed { --c: var(--ls-diagnosed); } .bed.ls-untreated { --c: var(--ls-untreated); }
.bed header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bed-no { color: var(--dim); font-size: 11px; letter-spacing: .14em; }
.bed .pt { font: 800 24px/1 var(--cond); color: var(--teal-hi); text-shadow: var(--chroma); }
.bed .stamp-s { margin-left: auto; color: var(--c); }
.monitor { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; background: #020605; border: 1px solid #12302c; padding: 6px 8px; }
.ekg { flex: 1; overflow: hidden; }
.ekg pre { margin: 0; color: var(--c); font-size: 14px; line-height: 1; white-space: pre; text-shadow: 0 0 8px var(--c);
  animation: ekg 6s linear infinite; }
@keyframes ekg { to { transform: translateX(-50%); } }
.bed.ls-untreated .ekg pre { animation-name: ekg, flatflick !important; animation-duration: 14s, 2.2s !important; animation-timing-function: linear, steps(1) !important; }
@keyframes flatflick { 0%, 92% { opacity: 1; } 93% { opacity: .2; } 96% { opacity: 1; } }
.bpm { color: var(--c); font: 800 13px var(--mono); white-space: nowrap; min-width: 62px; text-align: right; }
.bed.ls-stable .bpm, .bed.ls-surgery .bpm { animation: beat 0.9s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } }
.vitals { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 2px; }
.vitals .vlabel { color: var(--dim); letter-spacing: .14em; font-size: 10px; }
.vitals .vbar { color: var(--c); letter-spacing: -1px; white-space: nowrap; overflow: hidden; min-width: 0; }
.vitals b { color: #fff; font-size: 15px; margin-left: auto; }
.evidence { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ev { font-size: 10px; letter-spacing: .06em; padding: 1px 6px; border: 1px solid #1f3a3d; color: #3f6266; }
.ev.yes { color: var(--c); border-color: var(--c); }
.bed dl { grid-template-columns: 88px 1fr; font-size: 12px; gap: 3px 10px; margin-top: 6px; }
.bed dd { line-height: 1.45; }
.bed dd.eta { color: #fff; font-weight: 800; }
.chart-foot { margin-top: auto; padding-top: 8px; font-size: 12px; text-align: right; }
@media (prefers-reduced-motion: reduce) { .ekg pre, .bpm { animation: none !important; } }
@media (max-width: 420px) { .ward { grid-template-columns: 1fr; } }

/* ---------- THE KILLER ---------- */
.kill-big { font: 800 clamp(40px, 7vw, 72px)/.95 var(--cond); color: var(--teal-hi); text-shadow: var(--chroma); }
.kill-big.red { color: var(--red); }
.kill-meter .sub { color: var(--teal); font-weight: 800; letter-spacing: .06em; margin-top: 6px; font-size: 13px; }
.kill-meter .small { margin: 8px 0 0; }

.race { position: relative; padding: 26px 0 30px; }
.race-scale { position: relative; height: 18px; margin-left: 210px; border-bottom: 1px dashed var(--line); }
.race-scale span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--dim); white-space: nowrap; }
.race-scale span.end { transform: translateX(-100%); color: var(--red); font-weight: 800; text-shadow: 0 0 10px rgba(255,42,60,.8); }
.lane-track { border-right: 2px dashed var(--red) !important; }
.lane { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: center; margin-top: 8px; }
.lane-name { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-track { position: relative; height: 22px; background: repeating-linear-gradient(90deg, transparent 0 19px, rgba(127,214,223,.06) 19px 20px); border: 1px solid #10292c; }
.lane-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255,42,60,.05), rgba(255,42,60,.35)); }
.lane.parts .lane-fill { background: linear-gradient(90deg, rgba(255,176,0,.04), rgba(255,176,0,.28)); }
.lane.cleared .lane-fill { background: rgba(93,138,143,.18); }
.runner { position: absolute; top: 50%; transform: translate(-6px, -50%); white-space: nowrap; font-size: 12px; color: var(--red); text-shadow: 0 0 8px rgba(255,42,60,.7); }
.lane.parts .runner { color: var(--amber); text-shadow: none; }
.lane.cleared .runner { color: var(--dim); text-shadow: none; }
.runner b { color: #fff; margin-left: 4px; }
@media (max-width: 760px) {
  .race-scale .hide-sm { display: none; }
  .race-scale { margin-left: 0; }
  .lane { grid-template-columns: 1fr; gap: 2px; margin-top: 12px; }
}
.kill-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .kill-meters { grid-template-columns: 1fr; } }

.suspects { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.suspect, .dossier, .dossier dl, .dossier dd { min-width: 0; }
.suspect .mug { align-self: start; }
.suspect { grid-template-columns: 96px 1fr !important; }
.dossier dd { font-size: 12px; line-height: 1.45; }
@media (max-width: 420px) { .suspects { grid-template-columns: 1fr; } }
.lineup-bg { position: absolute; inset: 30px 16px auto 16px; color: #0f2427; font-size: 12px; line-height: 2.4; pointer-events: none; overflow: hidden; }
.suspect { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.45); padding: 12px; }
.suspect.cleared { opacity: .6; }
.mug { position: relative; background: repeating-linear-gradient(0deg, #0b1517 0 9px, #0e1d20 9px 10px); border: 1px solid #1a3337; display: grid; place-items: center; padding: 10px 4px 26px; }
.mug pre { color: #8fb9be; font-size: 11px; line-height: 1.05; margin: 0; }
.mug .plate { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); background: #000; color: #e9f6f7; font-size: 11px; padding: 1px 6px; border: 1px solid #333; }
.dossier .who { font: 800 22px/1 var(--cond); color: var(--teal-hi); text-shadow: var(--chroma); }
.dossier .alias { color: var(--dim); font-size: 12px; margin: 2px 0 6px; }
.dossier dl { grid-template-columns: 74px 1fr; margin-top: 4px; font-size: 12px; gap: 2px 8px; }
.dossier dt { font-size: 10px; }
.verdict { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; }
.stamp-s { font: 800 14px var(--cond); letter-spacing: .12em; padding: 1px 8px; border: 2px solid currentColor; transform: rotate(-4deg); display: inline-block; }
.stamp-s.armed { color: var(--red); } .stamp-s.parts { color: var(--amber); } .stamp-s.cleared { color: var(--green); }
@media (max-width: 420px) { .suspect { grid-template-columns: 1fr; } .mug { max-width: 140px; } }

/* ---------- the graveyard scene ---------- */
.yard { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 4px;
  background:
    radial-gradient(ellipse 60% 40% at 82% 8%, rgba(196,246,249,.10), transparent 70%),
    linear-gradient(180deg, #08131a 0%, #060c10 34%, #050807 52%, #070b08 100%); }
.sky { position: relative; height: 210px; }
.stars span { position: absolute; color: #cfeef2; font-size: 10px; opacity: .2; animation: twinkle 3.6s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .9; } }
.moon { position: absolute; right: 8%; top: 22px; color: #e8fbfc; font-size: 15px; line-height: 1.05; font-weight: 800;
  text-shadow: 0 0 14px rgba(196,246,249,.9), 0 0 50px rgba(196,246,249,.45); }
.crows { position: absolute; top: 70px; left: -30%; color: #2e4c50; font-size: 13px; animation: crows 38s linear infinite; }
@keyframes crows { to { transform: translateX(170vw); } }
.gate { position: relative; z-index: 2; margin: -120px auto 0; width: fit-content; color: #5f9196; font-size: 16px; line-height: 1.1; font-weight: 800;
  text-shadow: 0 0 10px rgba(0,0,0,.9); }
.fence { position: relative; z-index: 2; color: #2f5256; font-size: 13px; white-space: nowrap; overflow: hidden; letter-spacing: .1em; margin: 0; }
.fence.bottom { margin-top: 8px; }
.ground { position: relative; padding: 20px 18px 14px; min-height: 320px;
  background: radial-gradient(ellipse 90% 30% at 50% 0%, rgba(127,214,223,.06), transparent 70%); }
.tree { position: absolute; top: -10px; color: #1f3a3d; font-size: 13px; line-height: 1.05; z-index: 0; pointer-events: none; }
.tree.l { left: 4px; } .tree.r { right: 4px; }
@media (max-width: 760px) { .tree { display: none; } .gate { font-size: 9px; margin-top: -70px; } .moon { font-size: 11px; } }

.plots { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; padding: 0 40px; }
.plot { position: relative; transform: translateY(var(--drop)) rotate(var(--tilt)); transform-origin: bottom center; cursor: pointer; outline: none; }
.plot pre { margin: 0; font-size: 12px; line-height: 1.1; }
.stone { color: #a9b8b9; text-shadow: 0 0 6px rgba(196,246,249,.25), 1px 1px 0 #000; transition: color .2s, text-shadow .2s; }
.plot.c-taproot .stone, .plot.c-born .stone { color: #9eb3cf; }
.plot.c-burned .stone { color: #7d7d7d; }
.grass { color: #2f6b4d; }
.mound { color: #7a4b2e; }
.mound { text-shadow: 0 0 6px rgba(255,120,60,.25); }
.plot:hover .stone, .plot:focus .stone { color: #fff; text-shadow: 0 0 12px rgba(196,246,249,.8); }
.plot.unmarked { opacity: .45; filter: blur(.3px); cursor: default; }
.plot.unmarked:hover .stone { color: #a9b8b9; text-shadow: none; }

.epitaph { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) rotate(calc(var(--tilt) * -1)); z-index: 5;
  width: 220px; background: rgba(0,0,0,.92); border: 1px solid var(--line); color: var(--teal-hi); font-size: 11px; padding: 7px 9px;
  opacity: 0; pointer-events: none; transition: opacity .15s; text-align: center; }
.epitaph span { color: var(--dim); font-style: italic; }
.plot:hover .epitaph, .plot:focus .epitaph { opacity: 1; }

.plot.mine .stone { color: #ffd6da; text-shadow: 0 0 10px rgba(255,42,60,.95), 0 0 30px rgba(255,42,60,.5); }
.candle { position: absolute; right: -4px; bottom: 16px; color: #ffcf6a; font-size: 13px; font-weight: 800;
  text-shadow: 0 0 6px #ffb000, 0 0 16px #ff7a00; animation: flicker-c 1.2s infinite steps(3); }
@keyframes flicker-c { 0%{opacity:1} 33%{opacity:.6} 66%{opacity:.95} 100%{opacity:.75} }
.empty-note { position: relative; z-index: 1; text-align: center; color: var(--teal); font-size: 13px; margin: 26px 0 0; }

.fog { position: absolute; left: -50%; width: 200%; height: 140px; pointer-events: none; z-index: 3; filter: blur(18px);
  background: radial-gradient(ellipse 18% 60% at 20% 50%, rgba(196,246,249,.10), transparent 70%),
              radial-gradient(ellipse 22% 50% at 60% 50%, rgba(196,246,249,.08), transparent 70%),
              radial-gradient(ellipse 16% 55% at 85% 50%, rgba(196,246,249,.09), transparent 70%); }
.fog.f1 { bottom: 40px; animation: fog 60s linear infinite; }
.fog.f2 { bottom: 0; opacity: .8; animation: fog 90s linear infinite reverse; }
@keyframes fog { to { transform: translateX(25%); } }
@media (prefers-reduced-motion: reduce) { .stars span, .crows, .fog, .candle { animation: none; } }

/* wallet connect */
.wallets { border: 1px dashed var(--line); padding: 10px 12px; margin-top: 10px; }
.wallets .tag { font-size: 10px; margin-bottom: 6px; }
.wallets img { vertical-align: -2px; }
.wallets .cmdlist li { padding: 3px 0; }

/* Q-Day clock */
.clock { margin: 0; }
.clock .tag { font-size: 10px; }
.seg { color: var(--red); font-weight: 800; font-size: clamp(9px, 1.25vw, 13px); line-height: 1.05; white-space: pre; overflow-x: auto;
  text-shadow: 0 0 8px rgba(255,42,60,.75), 0 0 22px rgba(255,42,60,.3); margin: 6px 0 8px; }
.seg .lbl { color: var(--dim); text-shadow: none; font-weight: 400; }
.clock .small, .clock .small a { color: var(--dim); font-size: 11px; }

/* morgue teaser */
/* ---------- results ---------- */
.summary { scroll-margin-top: 60px; }
.stat .big { font: 800 clamp(44px, 8vw, 84px)/.95 var(--cond); color: var(--red); text-shadow: var(--chroma); }
.stat .big.ok { color: var(--green); }
.stat .sub { font-weight: 800; letter-spacing: .1em; margin-top: 8px; font-size: 13px; color: var(--teal); }
.stat .sub.dim { font-weight: 400; letter-spacing: 0; color: var(--dim); }
.summary:has(.good) { border-color: var(--green); }
.meter { color: var(--red); font-size: 13px; margin-top: 12px; white-space: pre; overflow-x: auto; }
.meter.green { color: var(--green); }
.counts { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .12em; padding: 1px 7px; border: 1px solid currentColor; }
.pill.exposed { color: #fff; background: var(--red); border-color: var(--red); }
.pill.contract { color: var(--blue); } .pill.revealed { color: var(--amber); }
.pill.hidden { color: var(--green); } .pill.empty, .pill.error { color: var(--dim); }

.card { border: 1px solid var(--line); border-left: 3px solid var(--dim); background: var(--panel); padding: 14px 16px; margin-bottom: 12px; }
.card.exposed, .case-block.exposed { border-left-color: var(--red); }
.card.exposed { background: linear-gradient(90deg, rgba(255,42,60,.08), var(--panel) 45%); }
.card.contract, .case-block.contract { border-left-color: var(--blue); }
.card.revealed, .case-block.revealed { border-left-color: var(--amber); }
.card.hidden, .case-block.hidden { border-left-color: var(--green); }
.card header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.case-block.exposed .usd { color: var(--red); text-shadow: var(--chroma); }
.case { color: var(--dim); font-size: 12px; white-space: pre; }
.type { color: var(--dim); font-size: 12px; }
.usd { margin-left: auto; font: 800 24px/1 var(--cond); color: var(--teal-hi); }
.card.exposed .usd { color: var(--red); text-shadow: var(--chroma); }
.addr { display: block; margin: 10px 0 4px; font-size: 13px; word-break: break-all; color: var(--teal-hi); }
.hold { font-size: 13px; color: #a9cdd1; display: flex; flex-wrap: wrap; gap: 2px 14px; } .hold small { color: var(--dim); }
dl { display: grid; grid-template-columns: 82px 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: 13px; }
dt { color: var(--dim); font-size: 11px; letter-spacing: .14em; padding-top: 2px; }
dd { margin: 0; color: #a9cdd1; }
dd.cause { color: #fff; font-weight: 800; }
dd.action { color: var(--text); }
.card.exposed dd.action { color: #fff; }
@media (max-width: 520px) { dl { grid-template-columns: 1fr; } dt { padding-top: 6px; } }

details.case-detail { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 13px; }
details.case-detail summary { cursor: pointer; color: var(--teal); font-weight: 800; letter-spacing: .12em; font-size: 12px; list-style: none; text-transform: uppercase; }
details.case-detail summary::-webkit-details-marker { display: none; }
details.case-detail summary::before { content: '[+] '; color: var(--dim); }
details.case-detail[open] summary::before { content: '[-] '; }
details.case-detail[open] summary { color: var(--teal-hi); }
details.case-detail dl { margin-top: 10px; }

.case-block .small-usd { font-size: 13px; font-weight: 800; margin-left: auto; }
.insight-tabs { display: flex; gap: 8px; margin-top: 14px; width: 100%; }
.insight-tab {
  flex: 1 1 0; background: transparent; color: var(--dim); border: 1px solid var(--line);
  padding: 10px 12px; font: 800 11px var(--mono); letter-spacing: .1em; cursor: pointer; text-align: center;
}
.insight-tab.on, .insight-tab:hover { color: var(--teal-hi); border-color: var(--teal); }
.insight-pane { margin-top: 12px; font-size: 13.5px; color: #a9cdd1; line-height: 1.55; width: 100%; }
.insight-pane p { margin: 0; }
.next-steps { margin: 0; padding-left: 22px; }
.next-steps li { margin-bottom: 5px; }
.next-steps li::marker { color: var(--red); font-weight: 800; }
.insight-pane .action { margin: 10px 0 0; color: #fff; }

.exfil { margin-top: 12px; border: 1px solid var(--red); padding: 12px 14px; font-size: 13px; }
.exfil p { margin: 0 0 10px; }
.exfil a.btn { padding: 10px 16px; font-size: 13px; background: var(--red); color: #fff; }
.exfil a.btn:hover { background: #fff; color: #000; }
.exfil .small { margin: 10px 0 0; }

a.watch { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--teal); border: 1px solid var(--teal); padding: 6px 10px; }
a.watch:hover { background: var(--teal); color: #000; }

.share img { display: block; width: 100%; height: auto; border: 1px solid var(--line); margin-bottom: 4px; background: #000; aspect-ratio: 1200 / 630; }
.share .share-actions .btn,
.share .share-actions .ghost { padding: 11px 12px; font-size: 12px; }

/* pre-flight verdict */
.drop { border: 1px solid var(--line); background: rgba(0,0,0,.4); padding: 16px 18px; margin: 12px 0 4px; }
.drop .verdict { font: 800 clamp(34px, 7vw, 56px)/1 var(--cond); text-shadow: var(--chroma); }
.drop.red { border-color: var(--red); } .drop.red .verdict { color: var(--red); }
.drop.green { border-color: var(--green); } .drop.green .verdict { color: var(--green); }
.drop.cyan { border-color: var(--blue); } .drop.cyan .verdict { color: var(--blue); }
.drop.dim .verdict { color: var(--dim); }
.drop p { color: #a9cdd1; font-size: 14px; margin: 10px 0 0; }

/* ---------- DOS command bar ---------- */
.topbar.cmdbar { position: fixed; top: 0; left: 0; right: 0; bottom: auto; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 0;
  padding: 10px 5vw; background: transparent; border: 0; pointer-events: none; }
.topbar .keys { display: flex; gap: 8px 28px; flex-wrap: wrap; justify-content: center; margin: 0; pointer-events: auto; }
.topbar .keys a { border: 0; background: transparent; color: var(--dim); padding: 2px 0;
  font: 600 13px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: inset 0 -0.28em 0 transparent; transition: color .12s, box-shadow .12s; }
.topbar .keys a:hover { background: transparent; color: var(--teal-hi);
  box-shadow: inset 0 -0.28em 0 rgba(255, 42, 60, .78); }
.topbar .keys a kbd { display: none; }
.topbar .keys a.on { color: var(--teal-hi); box-shadow: inset 0 -0.28em 0 rgba(255, 42, 60, .78); }
.page-share { margin: -6px 0 16px; }
.page-share a.btn { flex: 0 0 auto !important; }
/* sub-pages: solid backdrop so the fixed top menu stays readable over content */
body.vhs:not(:has(#hero)) .topbar.cmdbar { background: rgba(0,0,0,.9); border-bottom: 1px solid var(--line); }
.cmdbar .prompt { display: none; }

/* ---------- glitch helper (summary number) ---------- */
.glitch { position: relative; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; pointer-events: none; }
.glitch::before { color: var(--blue); transform: translate(-3px, 0); clip-path: inset(0 0 60% 0); animation: slice1 3.2s steps(1) infinite; mix-blend-mode: screen; }
.glitch::after { color: var(--teal); transform: translate(3px, 0); clip-path: inset(58% 0 0 0); animation: slice2 2.7s steps(1) infinite; mix-blend-mode: screen; }

/* ---------- ASCII banner (morgue) ---------- */
.banner { position: relative; color: var(--teal); font-weight: 800; line-height: 1.05; font-size: min(calc((100vw - 40px) / 54.5), 13.6px); text-shadow: var(--chroma); }
.banner.b82 { font-size: min(calc((100vw - 40px) / 49.7), 15.2px); }

/* ---------- morgue (window, census, table) ---------- */
main.wide { max-width: 1120px; margin: 0 auto; padding: 28px 20px 40px; }
.window { border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.72); overflow: hidden; box-shadow: 0 0 0 1px rgba(127,214,223,.08), 0 30px 80px rgba(0,0,0,.6); }
.chrome { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #10292c; }
.chrome i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.chrome i:nth-child(1) { background: #ff5f57; } .chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.chrome .pill-path { margin-left: 12px; background: #142a2d; color: #d6eef0; padding: 4px 12px; border-radius: 6px; font-size: 13px; }
.chrome .pill-path span { color: var(--amber); }
.win-body { display: grid; grid-template-columns: auto 1fr; gap: 34px; padding: 26px 28px 30px; align-items: start; }
@media (max-width: 780px) { .win-body { grid-template-columns: 1fr; } }
.shaded { font-weight: 800; font-size: 8.6px; line-height: 1.15; user-select: none; }
.shaded span { display: block; }
.win-right .title { color: var(--green); font-size: 16px; }
.win-right .sub { color: #e9f6f7; }
.win-right .ver { color: var(--dim); margin-top: 18px; }
.win-right hr { border: 0; border-top: 1px dashed #24474b; margin: 14px 0; }
.cmdlist { list-style: none; margin: 8px 0 0; padding: 0; }
.cmdlist li { padding: 2px 0; cursor: pointer; color: #e9f6f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdlist li .arg { color: var(--dim); }
.cmdlist li.on { color: var(--green); }
.cmdlist li.on::before { content: '> '; }
.cmdlist li:not(.on)::before { content: '  '; white-space: pre; }
.cmdlist li:hover { color: var(--teal-hi); }

.census-big { font: 800 clamp(48px, 7vw, 78px)/.95 var(--cond); color: var(--red); text-shadow: var(--chroma); margin: 6px 0 2px; }
table.census { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.census th { text-align: left; color: var(--dim); font-weight: 400; font-size: 11px; letter-spacing: .14em; border-bottom: 1px solid var(--line); padding: 4px 6px; }
.census td { padding: 5px 6px; border-bottom: 1px solid #0f2427; }

table.bodies { width: 100%; border-collapse: collapse; font-size: 13px; }
.bodies th { text-align: left; color: var(--teal); font-weight: 400; padding: 4px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bodies td { padding: 3px 8px; white-space: nowrap; }
.bodies td.name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.bodies td.num { text-align: right; font-variant-numeric: tabular-nums; }
.bodies tbody tr { cursor: pointer; }
.bodies tbody tr:hover td { color: var(--teal-hi); }
.bodies tbody tr.sel td { background: var(--teal); color: #000; }
.bodies tbody tr.sel td .st { color: #000; }
.bodies .st.exposed { color: var(--red); font-weight: 800; } .bodies .st.contract { color: var(--blue); } .bodies .st.hidden { color: var(--green); } .bodies .st.error { color: var(--dim); }
.bodies tr.detail td { background: rgba(127,214,223,.06); color: #a9cdd1; white-space: normal; padding: 8px 12px 10px; }
.bodies tr.detail a { margin-right: 18px; }
.table-wrap { overflow-x: auto; }
.grade { display: inline-block; min-width: 1.6em; text-align: center; font: 800 15px/1.35 var(--cond); color: #000; padding: 0 4px; }
.grade.gA { background: var(--green); } .grade.gB { background: var(--teal); } .grade.gC { background: var(--amber); }
.grade.gD { background: #ff7a3c; } .grade.gF { background: var(--red); color: #fff; }
.grade.gQ { background: var(--blue); color: #fff; }
.bodies.index tbody tr.sel td .grade { outline: 1px solid #000; }
.nav { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .14em; margin-bottom: 18px; }
.nav a { border: 0; }
.hook { font: 600 clamp(26px, 4.4vw, 52px)/1.02 var(--cond); color: var(--teal); text-shadow: var(--chroma); text-transform: uppercase; margin: 22px 0 18px; }
.hook .red { color: var(--red); }
.filters { margin-bottom: 14px; }
.filters button.on { background: var(--teal); color: #000; }
.filters a.btn { margin-left: auto; }
