/* =============================================================
   REESE REILLY : PORTFOLIO — retrofuturist mission-control theme
   (black glass, amber vector lines, red warnings, phosphor green)

   QUICK EDITS: colours are the variables in :root just below.
   Fonts are stored in assets/fonts, so the site works on any host.
   ============================================================= */

/* ---------- fonts (self-hosted) ---------- */
@font-face { font-family: "Title Serif"; src: url(../assets/fonts/noto-serif-latin-wdth-normal.woff2) format("woff2-variations"); font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Title Serif"; src: url(../assets/fonts/noto-serif-latin-ext-wdth-normal.woff2) format("woff2-variations"); font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Antonio"; src: url(../assets/fonts/antonio-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF,U+02BB-02BC,U+2000-206F,U+2190-2193,U+2212; }
@font-face { font-family: "Antonio"; src: url(../assets/fonts/antonio-latin-ext-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02FF,U+1E00-1EFF; }
@font-face { font-family: "Antonio"; src: url(../assets/fonts/antonio-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF,U+02BB-02BC,U+2000-206F,U+2190-2193,U+2212; }
@font-face { font-family: "Antonio"; src: url(../assets/fonts/antonio-latin-ext-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02FF,U+1E00-1EFF; }
@font-face { font-family: "Plex Mono"; src: url(../assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF,U+02BB-02BC,U+2000-206F,U+2190-2193,U+2212; }
@font-face { font-family: "Plex Mono"; src: url(../assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02FF,U+1E00-1EFF; }
@font-face { font-family: "Plex Mono"; src: url(../assets/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF,U+02BB-02BC,U+2000-206F,U+2190-2193,U+2212; }
@font-face { font-family: "Plex Mono"; src: url(../assets/fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02FF,U+1E00-1EFF; }
@font-face { font-family: "Plex Mono"; src: url(../assets/fonts/ibm-plex-mono-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --void: #030405;          /* background */
  --panel: #07080b;         /* panel glass */
  --panel-2: #0c0d12;
  --amber: #ffa424;         /* main vector colour */
  --amber-hi: #ffc46a;
  --amber-dim: #8a5512;
  --orange: #ff6a1a;
  --red: #ff3b30;           /* warnings */
  --red-dim: #6e1611;
  --green: #4dff9a;         /* the title-card green */
  --green-dim: #1f6b45;
  --cyan: #46e0ff;
  --violet: #8f63ff;
  --text: #f1dfc2;          /* body text */
  --muted: #9a8a72;
  --line: rgba(255, 164, 36, .32);
  --line-strong: rgba(255, 164, 36, .7);
  --bezel: #1b1c20;

  --font-title: "Title Serif", "Noto Serif", "Times New Roman", serif;
  --font-jp: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --font-ui: "Antonio", "Oswald", "Arial Narrow", sans-serif;
  --font-mono: "Plex Mono", "IBM Plex Mono", ui-monospace, monospace;

  --max: 1280px;
  --gutter: clamp(14px, 3vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--void); }
body {
  margin: 0; min-height: 100vh;
  color: var(--text); background: var(--void);
  font-family: var(--font-mono); font-size: 15px; line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 164, 36, .06), transparent 70%),
    linear-gradient(rgba(255, 164, 36, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 164, 36, .035) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}
a { color: var(--amber-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
::selection { background: var(--amber); color: #000; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
* { scrollbar-width: thin; scrollbar-color: var(--amber-dim) #000; }

/* ---------- CRT overlay: scanlines + vignette ---------- */
.crt::before {
  content: ""; position: fixed; inset: 0; z-index: 900; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.22) 2px 3px);
}
.crt::after {
  content: ""; position: fixed; inset: 0; z-index: 901; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.6) 100%);
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* =============================================================
   TYPE: Eva-style title cards
   ============================================================= */
.title-card {
  font-family: var(--font-title); font-weight: 900; font-stretch: 62.5%;
  text-transform: uppercase; line-height: .88; letter-spacing: -.005em;
  color: var(--text);
}
.title-card.green { color: var(--green); text-shadow: 0 0 6px rgba(77,255,154,.55), 0 0 22px rgba(77,255,154,.25); }
.title-card.amber { color: var(--amber); text-shadow: 0 0 8px rgba(255,164,36,.4); }
.title-card.red { color: var(--red); text-shadow: 0 0 8px rgba(255,59,48,.45); }
.jp { font-family: var(--font-jp); font-weight: 900; }
.label {
  font-family: var(--font-ui); font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  font-size: 12px; color: var(--amber);
}
.tag-red {
  display: inline-block; padding: 1px 8px;
  font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); border: 1px solid var(--red); background: rgba(255,59,48,.08);
}
.tag-amber { display: inline-block; padding: 0 7px; font-family: var(--font-ui); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); border: 1px solid var(--line-strong); }
.tag-green { display: inline-block; padding: 0 7px; font-family: var(--font-ui); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--green); border: 1px solid var(--green-dim); }
.mono-dim { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* =============================================================
   TOP BAR / NAV
   ============================================================= */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(3, 4, 5, .92); backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.emblem { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.emblem svg { width: 34px; height: 34px; flex: none; }
.emblem .nm { font-family: var(--font-ui); font-weight: 700; letter-spacing: .18em; font-size: 14px; line-height: 1.1; }
.emblem .nm small { display: block; font-weight: 400; color: var(--muted); letter-spacing: .14em; font-size: 10px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  display: flex; align-items: baseline; gap: 6px; padding: 6px 12px 5px; text-decoration: none;
  font-family: var(--font-ui); font-weight: 700; letter-spacing: .16em; font-size: 13px; text-transform: uppercase;
  color: var(--amber); border: 1px solid var(--line); background: rgba(255,164,36,.03);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background .15s, color .15s;
}
.nav a .n { font-weight: 400; font-size: 10px; color: var(--amber-dim); }
.nav a:hover { background: rgba(255,164,36,.14); color: var(--amber-hi); }
.nav a[aria-current="page"] { background: var(--amber); color: #000; border-color: var(--amber); }
.nav a[aria-current="page"] .n { color: #3a2200; }
.utc { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: right; line-height: 1.25; white-space: nowrap; }
.utc b { color: var(--green); font-weight: 500; }
@media (max-width: 860px) {
  .topbar { position: static; }
  .nav { order: 3; margin-left: 0; width: 100%; }
  .nav a { flex: 1 1 auto; justify-content: center; padding: 7px 8px 6px; letter-spacing: .1em; }
  .utc { margin-left: auto; }
}

/* audio module (in the top bar) */
.audio { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 3px 6px 3px 4px; max-width: 230px; }
.audio button { width: 26px; height: 24px; display: grid; place-items: center; background: none; border: 1px solid var(--amber-dim); color: var(--amber); cursor: pointer; flex: none; }
.audio button:hover { background: var(--amber); color: #000; }
.audio button svg { width: 10px; height: 10px; }
.audio .trk { overflow: hidden; white-space: nowrap; font-family: var(--font-ui); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); min-width: 0; flex: 1; }
.audio .trk span { display: inline-block; }
.audio.playing .trk { color: var(--green); }
.audio.playing .trk span { animation: ticker 10s linear infinite; padding-left: 100%; }
.audio .bars { display: flex; gap: 1px; align-items: flex-end; height: 12px; }
.audio .bars i { width: 2px; height: 2px; background: var(--green); }
.audio.playing .bars i { animation: eq .5s ease-in-out infinite alternate; }
.audio.playing .bars i:nth-child(2) { animation-delay: -.2s; } .audio.playing .bars i:nth-child(3) { animation-delay: -.35s; }
@keyframes eq { to { height: 12px; } }
@keyframes ticker { to { transform: translateX(-100%); } }

/* =============================================================
   PANELS
   ============================================================= */
.panel {
  position: relative; background: linear-gradient(180deg, rgba(12,13,18,.92), rgba(5,6,8,.95));
  border: 1px solid var(--line);
}
.panel::before, .panel::after { content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none; }
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--amber); border-left: 2px solid var(--amber); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--amber); border-right: 2px solid var(--amber); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 10px; }

/* section headers: big condensed serif + kanji + rule */
.section { padding: clamp(40px, 6vw, 80px) 0; position: relative; }
.sec-head { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 6px 18px; margin-bottom: 26px; }
.sec-head .title-card { font-size: clamp(42px, 7vw, 84px); }
.sec-head .jp { font-size: clamp(16px, 2vw, 22px); color: var(--red); letter-spacing: .2em; }
.sec-head .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
.sec-head .rule { align-self: center; height: 1px; background: repeating-linear-gradient(90deg, var(--amber) 0 6px, transparent 6px 10px); opacity: .6; }
.sec-head .side { display: flex; flex-direction: column; gap: 6px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 6px 16px;
  font-family: var(--font-ui); font-weight: 700; letter-spacing: .16em; font-size: 13px; text-transform: uppercase; text-decoration: none;
  color: var(--amber); background: rgba(255,164,36,.05); border: 1px solid var(--amber); cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--amber); color: #000; }
.btn.red { color: var(--red); border-color: var(--red); background: rgba(255,59,48,.06); }
.btn.red:hover { background: var(--red); color: #000; }
.btn.green { color: var(--green); border-color: var(--green); background: rgba(77,255,154,.05); }
.btn.green:hover { background: var(--green); color: #000; }
.btn.small { min-height: 30px; padding: 3px 11px; font-size: 11px; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* form fields: terminal style */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-family: var(--font-ui); font-weight: 700; letter-spacing: .16em; font-size: 11px; color: var(--amber); text-transform: uppercase; margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; padding: 9px 11px; background: #000; color: var(--green); caret-color: var(--green);
  border: 1px solid var(--line-strong); border-radius: 0; font-family: var(--font-mono);
}
.field textarea { min-height: 100px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--green-dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 18px rgba(77,255,154,.15); }

/* footer */
.footer { border-top: 1px solid var(--line); margin-top: 30px; }
.ticker { overflow: hidden; white-space: nowrap; border-bottom: 1px solid var(--line); background: #000; padding: 5px 0; font-size: 12px; color: var(--amber); letter-spacing: .08em; }
.ticker span { display: inline-block; padding-left: 100%; animation: ticker 50s linear infinite; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }

/* boot sequence (first visit each session) */
.boot { position: fixed; inset: 0; z-index: 2000; background: #000; display: grid; place-items: center; padding: 20px; cursor: pointer; transition: opacity .5s; }
.boot.done { opacity: 0; pointer-events: none; }
.boot pre { margin: 0; font-family: var(--font-mono); font-size: clamp(11px, 1.6vw, 14px); line-height: 1.7; color: var(--green); text-shadow: 0 0 6px rgba(77,255,154,.6); white-space: pre-wrap; max-width: 640px; width: 100%; }
.boot pre .r { color: var(--red); } .boot pre .a { color: var(--amber); }
.boot .skip { position: absolute; bottom: 18px; right: 20px; font-size: 11px; color: var(--muted); letter-spacing: .2em; }

/* =============================================================
   HOME: COMMAND SCREEN (hero)
   ============================================================= */
.command { padding-top: 16px; }
.hud {
  position: relative; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 0;
  border: 1px solid var(--line-strong); background: #000; height: clamp(560px, 78vh, 760px);
  box-shadow: 0 0 0 4px #000, 0 0 0 5px var(--line), 0 30px 80px rgba(0,0,0,.6);
}
.hud-side { display: grid; grid-template-rows: auto auto minmax(0, 1fr); border-right: 1px solid var(--line); min-height: 0; }
.hud-side > section { border-bottom: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; }
.hud-side .ph { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; }
.hud-side canvas { display: block; width: 100%; }
.hud-side .cap { padding: 0 10px 6px; font-size: 10px; color: var(--muted); letter-spacing: .06em; display: flex; justify-content: space-between; }
.feed { overflow-y: auto; flex: 1; min-height: 0; font-size: 11px; line-height: 1.55; padding: 0 10px 8px; }
.feed table { width: 100%; border-collapse: collapse; }
.feed td { padding: 0 2px; white-space: nowrap; }
.feed td:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.feed tr.up { color: var(--amber); } .feed tr.down { color: #4a4034; }
.feed tr.hl { color: var(--red); }
.feed th { font-weight: 400; color: var(--muted); text-align: right; font-size: 10px; }
.feed th:first-child { text-align: left; }

.hud-main { position: relative; min-width: 0; overflow: hidden; }
.hud-main canvas#globe { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud-main .scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0,0,0,.35) 3px 4px); }

.hud-title { position: absolute; top: 14px; right: 18px; text-align: right; z-index: 3; max-width: 62%; }
.hud-title .title-card { font-size: clamp(38px, 5.4vw, 74px); }
.hud-title .sub { margin-top: 8px; font-size: 11px; color: var(--red); letter-spacing: .1em; text-transform: uppercase; line-height: 1.5; }
.hud-title .sub b { color: var(--amber); font-weight: 500; }
.hud-title .sub .g { color: var(--green); }

.target-box { position: absolute; top: 14px; left: 14px; z-index: 3; width: 250px; border: 1px solid var(--line-strong); background: rgba(0,0,0,.72); }
.target-box .ph { padding: 4px 8px; border-bottom: 1px solid var(--line); }
.target-box dl { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; margin: 0; padding: 6px 8px 8px; font-size: 12px; }
.target-box dt { color: var(--muted); }
.target-box dd { margin: 0; text-align: right; color: var(--red); font-variant-numeric: tabular-nums; }
.target-box dd.g { color: var(--green); }
.target-box .who { padding: 6px 8px 0; font-family: var(--font-ui); font-weight: 700; font-size: 14px; letter-spacing: .1em; color: var(--amber-hi); text-transform: uppercase; }

.hud-legend { position: absolute; left: 14px; right: 14px; bottom: 54px; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--font-ui); letter-spacing: .12em; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.hud-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.hud-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; border-top: 1px solid var(--red-dim); background: rgba(0,0,0,.8);
}
.hud-bar .mt { font-family: var(--font-ui); letter-spacing: .14em; font-size: 12px; color: var(--red); text-transform: uppercase; }
.hud-bar .clock { margin-left: auto; font-family: var(--font-ui); font-size: 18px; letter-spacing: .08em; color: var(--green); font-variant-numeric: tabular-nums; }
.hud-bar .sq { width: 30px; height: 26px; display: grid; place-items: center; border: 1px solid var(--red); color: var(--red); background: none; cursor: pointer; font-family: var(--font-ui); font-size: 11px; letter-spacing: .1em; }
.hud-bar .sq:hover, .hud-bar .sq[aria-pressed="true"] { background: var(--red); color: #000; }
.hud-bar .sq.wide { width: auto; padding: 0 10px; }

@media (max-width: 900px) {
  .hud { grid-template-columns: 1fr; height: auto; }
  .hud-main { order: -1; height: min(138vw, 660px); }
  .hud-title .title-card { font-size: clamp(34px, 10vw, 54px); }
  .hud-title .sub { font-size: 10px; }
  .hud-bar .clock { font-size: 14px; }
  .hud-side .cap span:first-child { display: none; }
  .hud-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; border-right: 0; border-top: 1px solid var(--line); }
  .hud-side > section:nth-child(3) { grid-column: 1 / -1; max-height: 240px; }
  .hud-side > section:nth-child(1) { border-right: 1px solid var(--line); }
  .hud-title { left: 14px; right: 14px; max-width: none; }
  .target-box { top: auto; bottom: 92px; left: 10px; width: 210px; }
  .target-box dl { font-size: 11px; }
  .hud-legend { display: none; }
}
@media (max-width: 520px) {
  .target-box { display: none; }
}

/* =============================================================
   RESEARCH SCREENS (CRT monitors)
   ============================================================= */
.monitors { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 26px; }
.monitors .stack { display: grid; gap: 26px; }
@media (max-width: 900px) { .monitors { grid-template-columns: 1fr; } }

.monitor { position: relative; }
.bezel {
  position: relative; padding: 14px 14px 12px; border-radius: 22px;
  background: linear-gradient(160deg, #26272c, #141518 60%, #0e0f11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -2px 0 rgba(0,0,0,.6), 0 18px 40px rgba(0,0,0,.6);
}
.screen {
  position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 16 / 10; background: #000;
  box-shadow: inset 0 0 30px rgba(0,0,0,.9), inset 0 0 2px rgba(255,255,255,.2);
  cursor: pointer;
}
.screen > img, .screen > svg, .screen > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen > img { filter: sepia(.35) saturate(1.2) contrast(1.05) brightness(.9); transition: filter .3s; }
.monitor:hover .screen > img { filter: none; }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 14px;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,.28) 2px 3px), radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.06), transparent 60%), radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.65) 100%); }
.screen .overlay-label { position: absolute; z-index: 2; left: 12px; top: 10px; }
.screen .play {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); opacity: 0;
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; transition: opacity .2s, transform .2s;
  background: radial-gradient(circle at 40% 35%, #ff6b5e, #8d1610); box-shadow: 0 0 0 2px rgba(255,59,48,.5), 0 0 30px rgba(255,59,48,.5);
}
.screen .play svg { width: 24px; height: 24px; margin-left: 4px; }
.monitor:hover .screen .play, .screen:focus-visible .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.plate { display: flex; align-items: center; gap: 10px; padding: 10px 4px 0; }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); flex: none; }
.led.off { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1.1s steps(1) infinite; }
.plate .code { font-family: var(--font-ui); letter-spacing: .14em; font-size: 12px; color: var(--muted); }
.plate .status { margin-left: auto; font-family: var(--font-ui); letter-spacing: .14em; font-size: 11px; color: var(--green); }
.plate .status.off { color: var(--red); }
.monitor .info { padding: 14px 4px 0; }
.monitor h3 { font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 6px; }
.monitor.small h3 { font-size: clamp(26px, 2.6vw, 34px); }
.monitor .sum { color: var(--text); font-size: 14px; }
.monitor .facts { list-style: none; padding: 0; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.monitor .facts li::before { content: "▸ "; color: var(--amber); }
.monitor .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.monitor .actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* little green connectors between screens, like a wall of monitors */
.monitor .node { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); top: 40%; }
.monitor .node.l { left: -18px; } .monitor .node.r { right: -18px; }
@media (max-width: 900px) { .monitor .node { display: none; } }

/* VIEWER overlay */
.viewer { position: fixed; inset: 0; z-index: 1500; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: #000; }
.viewer[hidden] { display: none; }
.viewer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px var(--gutter); border-bottom: 1px solid var(--line-strong); }
.viewer-head .title-card { font-size: clamp(24px, 3vw, 36px); margin-right: auto; }
.viewer-tabs { display: flex; gap: 4px; padding: 6px var(--gutter); border-bottom: 1px solid var(--line); overflow-x: auto; }
.viewer-tabs button { white-space: nowrap; padding: 5px 12px; background: none; border: 1px solid var(--line); color: var(--amber); font-family: var(--font-ui); letter-spacing: .14em; font-size: 12px; text-transform: uppercase; cursor: pointer; }
.viewer-tabs button[aria-selected="true"] { background: var(--amber); color: #000; }
.viewer-body { position: relative; margin: 12px var(--gutter) var(--gutter); border: 1px solid var(--line-strong); background: #0b0b0b; min-height: 0; }
.viewer-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-body .hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 12px; font-size: 11px; color: var(--muted); background: rgba(0,0,0,.85); border-top: 1px solid var(--line); z-index: 2; }
.viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.viewer-empty .box { max-width: 560px; }
.viewer-empty code { color: var(--green); }
.viewer-empty ol { text-align: left; color: var(--text); font-size: 14px; }
body.locked { overflow: hidden; }

/* =============================================================
   DOSSIER (about)
   ============================================================= */
.dossier { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
@media (max-width: 820px) { .dossier { grid-template-columns: 1fr; } }
.portrait { position: relative; padding: 14px; border: 1px solid var(--line); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(.3) sepia(.25) contrast(1.1); }
.portrait .br { position: absolute; width: 26px; height: 26px; border: 2px solid var(--red); }
.portrait .br.tl { top: 4px; left: 4px; border-right: 0; border-bottom: 0; }
.portrait .br.tr { top: 4px; right: 4px; border-left: 0; border-bottom: 0; }
.portrait .br.bl { bottom: 32px; left: 4px; border-right: 0; border-top: 0; }
.portrait .br.brr { bottom: 32px; right: 4px; border-left: 0; border-top: 0; }
.portrait .cap { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--red); letter-spacing: .1em; }
.portrait .scanbar { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--green); box-shadow: 0 0 10px var(--green); top: 14px; animation: scanbar 4s ease-in-out infinite; opacity: .7; }
@keyframes scanbar { 50% { top: calc(100% - 40px); } }
.spec { display: grid; grid-template-columns: 150px 1fr; border-top: 1px solid var(--line); margin: 16px 0; font-size: 13px; }
.spec dt, .spec dd { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--font-ui); letter-spacing: .14em; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.spec dd { color: var(--amber-hi); }
@media (max-width: 520px) { .spec { grid-template-columns: 1fr; } .spec dt { border-bottom: 0; padding-bottom: 0; } }
.sync { display: grid; gap: 8px; margin: 10px 0 18px; }
.sync .row { display: grid; grid-template-columns: 120px 1fr 52px; gap: 10px; align-items: center; font-size: 12px; }
.sync .nm { font-family: var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.sync .bar { height: 10px; border: 1px solid var(--amber-dim); position: relative; overflow: hidden; }
.sync .bar i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--amber) 0 4px, transparent 4px 6px); width: 0; transition: width 1.4s ease-out; }
.sync .pct { text-align: right; color: var(--green); font-variant-numeric: tabular-nums; }
.commend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.commend li { display: flex; gap: 10px; font-size: 13px; padding: 6px 10px; border-left: 2px solid var(--red); background: rgba(255,59,48,.05); }
.commend li b { color: var(--amber); font-weight: 500; }

/* =============================================================
   ARCHIVE + RECS grids
   ============================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.filters button { padding: 4px 12px; background: none; border: 1px solid var(--line); color: var(--amber); font-family: var(--font-ui); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--amber); color: #000; border-color: var(--amber); }
.grid-mon { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.grid-mon .monitor h3 { font-size: 28px; }
.grid-mon .screen { aspect-ratio: 4 / 3; }

/* socials as comm channels */
.channels { display: grid; gap: 8px; }
.channel {
  display: grid; grid-template-columns: 70px 1fr auto auto; gap: 14px; align-items: center; text-decoration: none; color: var(--text);
  padding: 10px 14px; border: 1px solid var(--line); background: rgba(255,164,36,.025); transition: background .15s, border-color .15s;
}
.channel:hover { background: rgba(255,164,36,.1); border-color: var(--amber); color: var(--text); }
.channel .ch { font-family: var(--font-ui); letter-spacing: .14em; font-size: 12px; color: var(--red); }
.channel .nm { font-family: var(--font-title); font-weight: 900; font-stretch: 62.5%; font-size: 26px; text-transform: uppercase; line-height: 1; color: var(--amber-hi); }
.channel .hd { font-size: 12px; color: var(--muted); }
.channel .sig { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
.channel .sig i { width: 3px; background: var(--green); }
.channel .go { font-family: var(--font-ui); letter-spacing: .14em; font-size: 12px; color: var(--green); }
@media (max-width: 560px) { .channel { grid-template-columns: 1fr auto; } .channel .ch, .channel .sig { display: none; } }

/* =============================================================
   GUEST LOG
   ============================================================= */
.log-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .log-layout { grid-template-columns: 1fr; } }
.sketch { display: grid; grid-template-columns: 40px 1fr; gap: 8px; }
.sketch .tools { display: grid; gap: 4px; align-content: start; }
.sketch .tools button { width: 40px; height: 34px; background: none; border: 1px solid var(--line); color: var(--amber); font-family: var(--font-ui); font-size: 11px; letter-spacing: .06em; cursor: pointer; }
.sketch .tools button[aria-pressed="true"] { background: var(--amber); color: #000; }
.sketch canvas { width: 100%; max-width: 420px; height: auto; display: block; image-rendering: pixelated; background: #000; border: 1px solid var(--green-dim); cursor: crosshair; touch-action: none; box-shadow: inset 0 0 20px rgba(77,255,154,.08); }
.swatches { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.swatches button { width: 24px; height: 24px; border: 1px solid #333; background: var(--c); cursor: pointer; }
.swatches button[aria-pressed="true"] { outline: 2px solid #fff; outline-offset: 1px; }
.attach { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 10px 0 14px; color: var(--muted); }
.attach input { accent-color: var(--amber); width: 16px; height: 16px; }
.form-status { min-height: 1.4em; margin-top: 10px; font-size: 13px; color: var(--green); }
.mode-note { margin-top: 14px; font-size: 12px; color: var(--muted); border-left: 2px solid var(--red); padding: 4px 10px; }
.entries { display: grid; gap: 12px; max-height: 1000px; overflow-y: auto; padding-right: 4px; }
.entry { border: 1px solid var(--line); background: rgba(0,0,0,.6); padding: 10px 14px; }
.entry .hdr { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: 6px; margin-bottom: 8px; }
.entry .cs { font-family: var(--font-title); font-weight: 900; font-stretch: 62.5%; text-transform: uppercase; font-size: 24px; line-height: 1; color: var(--green); }
.entry time { font-size: 11px; color: var(--red); letter-spacing: .06em; }
.entry .msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.entry .origin { font-size: 12px; }
.entry img { width: 100%; max-width: 300px; image-rendering: pixelated; border: 1px solid var(--green-dim); background: #000; }
.entry .reply { margin-top: 8px; padding: 6px 10px; font-size: 13px; border-left: 2px solid var(--amber); background: rgba(255,164,36,.06); }
.entry .reply b { font-family: var(--font-ui); letter-spacing: .12em; font-size: 11px; color: var(--amber); font-weight: 400; }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker span, .audio.playing .trk span { padding-left: 0; }
}
