/* ═══════════════════════════════════════════════════════════════
   talkatz.com

   A security engineer's CV built as an operator's report: monochrome
   with one saturated accent reserved strictly for signal, monospace
   for display and data, dense aligned tables rather than cards, and
   a background that is the page's own security policy rather than
   decoration.

   Palette: near-black #0A0A0B, whites and greys, and #FF3B30 used
   only where something actually means "attention".
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:     #0A0A0B;
  --bg2:    #0F0F12;
  --panel:  #131316;
  --line:   #2A2A31;

  --ink:    #D9D9DE;   /* body text        11.4:1 on --bg */
  --bright: #FFFFFF;   /* headings, emphasis            */
  --muted:  #85858E;   /* secondary         5.2:1       */
  --dim:    #5C5C65;   /* DECORATIVE ONLY - 2.9:1, never used for text */

  /* The ONE saturated colour on the page. Reserved for signal:
     P1 severity, the on-call pip, active nav, TODOs, graph flares.
     Everywhere it appears it should mean something. */
  --signal:  #FF3B30;
  --signal2: #FF7A73;

  /* Display and data share one family. Monospace is ~30% wider per
     character than Impact, so every display size below is reduced to
     compensate — a straight family swap would have overflowed. */
  --disp: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Motion. The bare `ease` keyword is cubic-bezier(.25,.1,.25,1) — an
     ease-IN-out, so it ramps up slowly and reads as sluggish on hover.
     Interaction motion should start fast and settle, hence quint-out. */
  --dur-1: 120ms;   /* hover, press — must feel immediate */
  --dur-2: 200ms;   /* small state changes */
  --dur-3: 320ms;   /* panel-level fades */
  --dur-4: 520ms;   /* entrances */
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --wrap: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* NOT hidden: hidden breaks position:sticky on #nav */
}

a { color: var(--ink); text-underline-offset: 3px; }
a, #nav button, .keys-close { -webkit-tap-highlight-color: transparent; }
@media (hover: hover) {
  a:hover { color: var(--bright); }
}
:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px;
  background: var(--bright); color: #000; padding: .6rem 1rem; z-index: 90; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

#fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: .55; pointer-events: none;
}

/* ─── policy ledger ──────────────────────────────────────────
   Replaces the drifting-particle canvas, which is the single most
   borrowed background in this genre and carried no information.
   This reads the page's REAL Content-Security-Policy and logs what
   the browser has actually refused, so it cannot be copied — it is
   generated by this document's own behaviour. */

#ledger {
  /* bottom-right, so it can never collide with the masthead meta table */
  position: fixed; right: 1.75rem; bottom: 1.75rem; top: auto;
  width: 17rem; z-index: 1;
  pointer-events: none;
  font: 400 .66rem/1.75 var(--mono);
  color: var(--dim);
}
@media (max-width: 86rem) { #ledger { display: none; } }

.lg-h {
  margin: 1.1rem 0 .25rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: .2rem;
}
.lg-h:first-child { margin-top: 0; }
#lgCount { float: right; color: var(--muted); }
.lg-dir, .lg-log { list-style: none; margin: 0; padding: 0; }
.lg-dir li, .lg-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-dir b { color: var(--muted); font-weight: 400; }
.lg-log li { color: var(--signal); }
.lg-log .lg-none { color: var(--dim); }

/* ─── left rail ──────────────────────────────────────────────
   A permanent structural signature. The genre is uniformly centred
   single-column, which is why these pages are unidentifiable from a
   cropped screenshot; this makes any fragment of any screen legible
   as this document. */

#rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: 4.5rem;
  z-index: 30; pointer-events: none;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1.25rem;
}
.rail-ord {
  font: 700 1.5rem/1 var(--disp); color: var(--muted);
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.rail-sec {
  writing-mode: vertical-rl;
  font: 400 .66rem/1 var(--mono);
  letter-spacing: .3em; text-transform: uppercase; color: var(--dim);
}
@media screen and (max-width: 62rem) { #rail { display: none; } }

/* ─── pointer: your mouse as a monitored process ─────────────
   The OS arrow is hidden only once JS is running (.cursorless is added
   by script), so a JS failure can never leave a visitor with no cursor. */

.cursorless, .cursorless * { cursor: none !important; }
/* Text fields keep a real caret — losing that is genuinely disorienting. */
.cursorless input { cursor: text !important; }

#ptr {
  position: fixed; top: 0; left: 0; z-index: 70;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
  will-change: transform;
}
#ptr.on { opacity: 1; }

.ptr-mark {
  position: absolute; top: -6px; left: -6px;
  width: 12px; height: 12px;
}
.ptr-mark::before, .ptr-mark::after {
  content: ''; position: absolute; background: var(--bright);
}
.ptr-mark::before { left: 5px; top: 0; width: 2px; height: 12px; }
.ptr-mark::after  { top: 5px; left: 0; height: 2px; width: 12px; }
#ptr.busy .ptr-mark::before, #ptr.busy .ptr-mark::after { background: var(--signal); }

.ptr-hud {
  position: absolute; top: 14px; left: 14px;
  min-width: 6.5rem;
  padding: .4rem .5rem;
  background: rgba(10,10,11,.92);
  border: 1px solid var(--line);
  border-left: 2px solid var(--bright);
  font: 400 .62rem/1.5 var(--mono);
  color: var(--muted);
}
#ptr.flip-x .ptr-hud { left: auto; right: 14px; }
#ptr.flip-y .ptr-hud { top: auto; bottom: 14px; }

#ptrSpark { display: block; width: 76px; height: 20px; margin-bottom: .25rem; }
.ptr-row { display: flex; justify-content: space-between; gap: .75rem; }
.ptr-row b { color: var(--bright); font-weight: 400; }

@media (hover: none), (pointer: coarse) { #ptr { display: none; } }

#app { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem 5rem; }
@media (min-width: 62rem) { body { padding-left: 4.5rem; } }

/* ─── masthead ───────────────────────────────────────────────
   Not a HUD. The page is a dense operator report, so its header is
   document furniture: an identity block plus a definition list of
   standing facts, separated by hairlines rather than boxes. */

.masthead { display: grid; gap: 2rem; padding: 4.5rem 0 2rem; }
@media (min-width: 56rem) {
  .masthead { grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); align-items: end; }
}

.masthead h1 {
  margin: 0;
  font: 700 clamp(1.75rem, 6.8vw, 4rem)/1.05 var(--disp);
  letter-spacing: -.035em; color: #fff;
}
.mh-role { margin: .55rem 0 0; font: 400 .95rem/1.5 var(--mono); color: var(--muted); }
.sep { color: var(--dim); }

/* Google wordmark in its own brand colours. This is the one deliberate
   exception to the single-accent rule — it names an employer rather than
   signalling anything, so it is kept to one word in one place. All four
   hexes clear 4.5:1 on --bg (5.04 to 11.59), so no substitutes needed.
   role="img" + aria-label keeps it announced as one word, not six letters. */
.gbrand { white-space: nowrap; }
.g-b { color: #4285F4; }
.g-r { color: #EA4335; }
.g-y { color: #FBBC05; }
.g-g { color: #34A853; }

.mh-meta { margin: 0; display: grid; gap: 0; }
.mh-meta > div {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem; align-items: baseline;
  padding: .4rem 0; border-top: 1px solid var(--line);
}
.mh-meta > div:first-child { border-top: 0; }
.mh-meta dt {
  font: 400 .66rem/1.7 var(--mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.mh-meta dd { margin: 0; font: 400 .82rem/1.7 var(--mono); color: var(--ink); }
.mh-meta dd.live { color: var(--signal); }
.num { font-variant-numeric: tabular-nums; }

.mh-meta > div.arming dd { opacity: 0; }
.mh-meta > div.armed dd { opacity: 1; transition: opacity var(--dur-3) var(--ease-out); }

/* ── entry sequence ───────────────────────────────────────────
   The name and role rise as the graph behind them assembles and the
   status cells resolve below — one gesture on one clock. .mh-enter is
   added by JS and only when motion is allowed, so no-JS, failed-JS and
   reduced-motion loads all land on the finished state with no rule to
   undo. Nothing here gates reading; it is opacity and transform only. */
@keyframes mhRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.js .masthead.mh-enter h1 { animation: mhRise 380ms var(--ease-out) both; }
.js .masthead.mh-enter .mh-role { animation: mhRise 380ms 70ms var(--ease-out) both; }

/* ── welcome sequence ─────────────────────────────────────────
   The page attests its own policy before it shows itself. Every row is
   read from the live CSP meta tag, so this cannot claim a directive that
   is not being enforced — the same rule the ledger follows.

   The element ships hidden and only script reveals it. That is the way
   round it has to be: an overlay shown by CSS and dismissed by JS seals
   the page shut the moment anything upstream throws, whereas this way a
   failure costs the animation and nothing else. Same rule the rest of
   the page follows — content never depends on an animation running.

   Reduced motion never starts it. Print drops it. */
#welcome { display: none; }
.js #welcome {
  display: grid; position: fixed; inset: 0; z-index: 100;
  place-items: center; align-content: center;
  background: var(--bg);
  transition: opacity var(--dur-3) var(--ease-out);
}
.js #welcome[hidden] { display: none; }
.js #welcome.lifting { opacity: 0; pointer-events: none; }

.wc-in { width: min(30rem, 84vw); }
.wc-lede {
  margin: 0 0 1.15rem; font: 400 .68rem/1 var(--mono);
  letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}
.wc-rows { list-style: none; margin: 0; padding: 0; }
.wc-rows li {
  display: grid; grid-template-columns: .75rem minmax(0, 1fr) auto;
  gap: .75rem; align-items: baseline;
  padding: .4rem 0; border-top: 1px solid var(--line);
  font: 400 .78rem/1.5 var(--mono);
  opacity: 0; transform: translateY(6px);
}
.wc-rows li:first-child { border-top: 0; }
.wc-rows li.on {
  opacity: 1; transform: none;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.wc-tick { color: var(--muted); transition: color var(--dur-2) var(--ease-out); }
.wc-rows li.on .wc-tick { color: var(--signal); }
.wc-k { color: var(--ink); }
.wc-v { color: var(--muted); text-align: right; }
.wc-out {
  margin: 1.15rem 0 0; font: 400 .76rem/1.5 var(--mono);
  color: var(--bright); opacity: 0;
}
.wc-out.on { opacity: 1; transition: opacity var(--dur-3) var(--ease-out); }
.wc-skip {
  position: fixed; left: 0; right: 0; bottom: 1.7rem; margin: 0;
  text-align: center; font: 400 .66rem/1 var(--mono);
  letter-spacing: .14em; color: var(--muted);
}

/* ─── nav ────────────────────────────────────────────────────
   Unnumbered and unboxed. The page is one continuous scroll, so a
   numbered tab strip would imply a sequence that no longer exists. */

#nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; flex-wrap: wrap; gap: .35rem 1.75rem;
  padding: .85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
#nav button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 400 .8rem/1.4 var(--mono); color: var(--muted);
  transition: color var(--dur-1) var(--ease-out);
}
@media (hover: hover) { #nav button:hover { color: var(--bright); } }
#nav button:active { transform: translateY(1px); }
#nav button.active { color: var(--signal); }
.no-js #nav { display: none; }

/* ─── wide-screen note ───────────────────────────────────────
   Shown only on narrow viewports. Deliberately framed as an invitation
   rather than "best viewed on desktop" — the mobile layout works, and
   apologising for it on a hiring document reads as unfinished. This
   names what is genuinely absent instead. */

.wide-note { display: none; }

@media screen and (max-width: 62rem) {
  .wide-note {
    display: block;
    margin: 1.25rem 0 0;
    padding: .7rem .85rem;
    border-left: 2px solid var(--line);
    font: 400 .78rem/1.65 var(--mono);
    color: var(--muted);
  }
  .wn-mark { color: var(--signal); margin-right: .4rem; }
}

/* ─── section markers ────────────────────────────────────────
   A table caption, not a display headline: small label plus hairline,
   matching the row grammar of the content beneath it. */

.sec-head {
  display: flex; align-items: baseline; gap: 1rem;
  margin: 0 0 1.35rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.sec-head h2 {
  margin: 0; font: 400 .72rem/1 var(--mono);
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.rule { flex: 1; }

/* ─── panels ───────────────────────────────────────────────── */

.panel { padding: 4rem 0 0; scroll-margin-top: 4.25rem; }

.sec-note { margin: -.75rem 0 1.5rem; font: 400 .82rem/1.6 var(--mono); color: var(--muted); }
code { font: 400 .9em var(--mono); color: var(--bright); }

/* ─── dense rows, not cards ──────────────────────────────────
   Cards-inside-sections was the shape inherited from the reference
   site, and it is also the wrong instrument: operator tooling shows
   aligned tabular rows, not floating panels. Everything below is
   separated by hairlines and aligned to shared columns instead. */

.card {
  border-left: 2px solid var(--line);
  padding: 0 0 0 1.5rem;
  max-width: 68ch;
}
.card p { margin: 0 0 1rem; color: var(--ink); }
.card p:last-child { margin-bottom: 0; }

/* inline stat line, replacing the boxed KPI tiles */
.stats {
  display: flex; flex-wrap: wrap; gap: .4rem 2.25rem;
  margin: 1.75rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font: 400 .82rem/1.6 var(--mono); color: var(--muted);
}
.stats b { color: var(--bright); font-weight: 400; margin-right: .4rem; }

/* ── shared row primitive ── */
.rows { display: grid; }
.row {
  display: grid;
  gap: .35rem 1.5rem;
  padding: .8rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.rows .row:first-child { border-top: 0; }
.row .what b { color: var(--bright); font-weight: 600; }
.row .by, .row .desc { color: var(--ink); }

/* credentials: year | credential */
.creds .row { grid-template-columns: 5rem minmax(0, 1fr); }
.creds .yr {
  font: 400 .8rem/1.6 var(--mono); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.creds .by { color: var(--muted); font-size: .9rem; }

/* detections: name | what it is | stack */
.ops .row { grid-template-columns: 14rem minmax(0, 1fr); }
.tools .row { grid-template-columns: 14rem minmax(0, 1fr); }
.tools .what { color: var(--muted); font: 400 .74rem/1.7 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.ops .desc { font-size: .95rem; }
.ops .stack { grid-column: 2; }

.stack { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .15rem; }
.stack span {
  font: 400 .66rem/1 var(--mono); padding: .35em .5em;
  border: 1px solid var(--line); color: var(--muted);
}
.tag-os {
  font: 400 .6rem/1 var(--mono); color: var(--muted);
  border: 1px solid var(--line); padding: .3em .4em; vertical-align: 2px;
}

/* ── alert feed: severity | dates | content ── */
.mission {
  display: grid;
  grid-template-columns: 2.75rem 9.5rem minmax(0, 1fr);
  gap: .3rem 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
#alerts .mission:first-of-type { border-top: 0; }
.m-top { display: contents; }
.m-meta { display: contents; }
.sev-tag {
  grid-column: 1; grid-row: 1;
  font: 700 .62rem/1 var(--mono); letter-spacing: .08em;
  padding: .35em .45em; border: 1px solid currentColor; justify-self: start;
}
.m-date {
  grid-column: 2; grid-row: 1;
  font: 400 .74rem/1.5 var(--mono); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mission h3 {
  grid-column: 3; grid-row: 1;
  margin: 0; font: 600 1.05rem/1.35 var(--sans); color: #fff;
}
.org { color: var(--muted); font-weight: 400; font-size: .92rem; }
.scope {
  grid-column: 3; grid-row: 2;
  margin: 0; font: 400 .74rem/1.5 var(--mono); color: var(--muted);
}
.scope span {
  color: var(--muted); letter-spacing: .14em; text-transform: uppercase;
  font-size: .62rem; margin-right: .6rem;
}
.mission ul {
  grid-column: 3; grid-row: 3;
  margin: .5rem 0 0; padding-left: 1.1rem; max-width: 68ch;
}
.mission li { margin: .3rem 0; color: var(--ink); }
.mission li::marker { color: var(--dim); }
.todo { color: var(--signal) !important; }

.s-p1 { color: var(--signal); }
.s-p2 { color: var(--bright); }
.s-p3 { color: var(--ink);    }
.s-p4 { color: var(--muted);  }

/* ─── terminal ─────────────────────────────────────────────── */

.term { border: 1px solid var(--line); background: #0C0C0E; }
.term-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg2);
}
.tb-name { margin-left: .6rem; font: 400 .72rem/1 var(--mono); color: var(--muted); }

.term-out {
  padding: 1.1rem 1.25rem; min-height: 16rem; max-height: 30rem; overflow-y: auto;
  font: 400 .82rem/1.75 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--ink);
}
.term-out .ok { color: var(--bright); }
.term-out .acc { color: var(--bright); }
.term-out .warn { color: var(--muted); }
.term-out .err { color: var(--signal); }
.term-out .dim, .term-out .echo { color: var(--muted); }
.term-out .hdr { color: #fff; font-weight: 700; }

.term-in { display: flex; align-items: center; gap: .6rem; padding: .8rem 1.25rem; border-top: 1px solid var(--line); }
.prompt { font: 400 .8rem/1 var(--mono); color: var(--signal); white-space: nowrap; }
#cmd {
  flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ink);
  font: 400 .82rem/1.5 var(--mono); padding: .15rem 0;
}
#cmd::placeholder { color: var(--muted); }
#cmd:focus { outline: none; }
.term-in:focus-within { box-shadow: inset 3px 0 0 var(--bright); }

/* ─── keyboard layer ───────────────────────────────────────── */

kbd {
  font: 400 .78em var(--mono);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: .15em .4em;
  color: var(--ink);
  background: var(--bg2);
}

.kb-hint { margin: 0 0 .5rem; font: 400 .72rem/1.6 var(--mono); color: var(--muted); }
@media (hover: none), (pointer: coarse) { .kb-hint { display: none; } }

#keys {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 1.5rem;
  background: rgba(5,5,6,.82);
}
#keys[hidden] { display: none; }

.keys-panel {
  width: min(26rem, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--signal);
  padding: 1.5rem;
}
.keys-panel h2 {
  margin: 0 0 1.1rem;
  font: 700 .95rem/1 var(--disp);
  letter-spacing: .04em; color: #fff;
}
.keys-panel dl { margin: 0; display: grid; gap: .5rem; }
.keys-panel dl > div {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: baseline;
}
.keys-panel dt { display: flex; gap: .25rem; }
.keys-panel dd { margin: 0; font-size: .88rem; color: var(--ink); }

.keys-close {
  margin-top: 1.5rem;
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); font: 400 .75rem/1 var(--mono);
  padding: .55rem 1rem; cursor: pointer;
}
@media (hover: hover) {
  .keys-close:hover { color: var(--bright); border-color: var(--muted); }
}
.keys-close:active { transform: translateY(1px); }

/* ─── footer ───────────────────────────────────────────────── */

.foot { margin-top: 4rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.foot p { margin: 1rem 0 0; font: 400 .72rem/1.6 var(--mono); color: var(--muted); }

/* ─── reveal ───────────────────────────────────────────────── */

.js .panel.reveal { opacity: 0; transform: translateY(14px); }
.js .panel.shown {
  opacity: 1; transform: none;
  transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js .panel.reveal { opacity: 1; transform: none; }
  #ptr, #fx { display: none; }
}

/* ─── mobile ─────────────────────────────────────────────────
   The table grids carry fixed first columns (2.75rem + 9.5rem for
   alerts, 14rem for ops and tools). That is right on a wide screen
   and unusable on a phone — at 375px it left the content column
   ~80px wide, and at 320px ~22px. Below 46rem the fixed columns
   collapse and each row stacks label-over-value. */

@media screen and (max-width: 46rem) {
  /* Reclaim horizontal space. Nested indents (#app padding, then the
     card's rule + padding, then the list's padding) were eating ~19% of
     a 360px screen before a single character, leaving ~36 characters
     per line against a comfortable 45-75. */
  #app { padding-inline: 1rem; }
  .card { padding-left: .85rem; border-left-width: 2px; }
  .mission ul { padding-left: 1rem; }
  .bullets { padding-left: 1rem; }
  .term-out { font-size: .78rem; padding: .9rem .85rem; }
  .term-in { padding: .7rem .85rem; }
  .masthead { padding-top: 3rem; gap: 1.5rem; }
  /* mono meta lines were filling the width edge-to-edge with no breathing
     room; smaller here so they wrap instead of hugging the boundary */
  .mh-role { font-size: .86rem; }
  .scope { font-size: .7rem; line-height: 1.6; }
  .stats { font-size: .76rem; gap: .3rem 1rem; }
  .sec-head h2 { font-size: .68rem; letter-spacing: .16em; }
  .rail-sec { display: none; }

  /* iOS Safari zooms the viewport when a focused input is under 16px, and
     does not zoom back out on blur. The console is the first thing people
     tap, so it pays the 16px tax; everything around it stays at scale. */
  #cmd { font-size: 16px; }

  /* alert feed: severity and dates share line one, content runs full width */
  .mission {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .3rem .75rem;
    padding: 1.05rem 0;
  }
  .sev-tag { grid-column: 1; grid-row: 1; }
  .m-date { grid-column: 2; grid-row: 1; justify-self: start; }
  .mission h3 { grid-column: 1 / -1; grid-row: 2; margin-top: .2rem; }
  .scope { grid-column: 1 / -1; grid-row: 3; }
  .mission ul { grid-column: 1 / -1; grid-row: 4; margin-top: .55rem; }
  .org { display: block; margin-top: .1rem; }

  /* every row grid stacks: label above value */
  .ops .row,
  .tools .row,
  .creds .row {
    grid-template-columns: minmax(0, 1fr);
    gap: .25rem;
  }
  .tools .what { letter-spacing: .12em; }
  .ops .stack { grid-column: 1; }

  .stats { gap: .35rem 1.25rem; }
  .mh-meta > div { grid-template-columns: 4.75rem minmax(0, 1fr); gap: .8rem; }
  .keys-panel dl > div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  #nav { gap: .3rem 1.15rem; }
  .prompt { font-size: .68rem; }
}

@media screen and (max-width: 26rem) {
  #app { padding-inline: .8rem; }
  .card { padding-left: .7rem; }
  .mission ul, .bullets { padding-left: .9rem; }
  .masthead h1 { font-size: clamp(1.5rem, 9vw, 2rem); }
  .mh-meta > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mh-meta dt { letter-spacing: .1em; }
}

/* ─── print ──────────────────────────────────────────────────
   Browsers drop backgrounds when printing but honour authored text
   colour, so a dark site prints as near-blank paper — white headings
   on white. Everything below inverts to ink on paper and strips the
   interface, leaving the document a recruiter actually wanted. */

@media print {
  :root {
    --bg: #fff; --bg2: #fff; --panel: #fff;
    --ink: #111; --bright: #000; --muted: #555; --dim: #777;
    --line: #bbb; --signal: #000; --signal2: #000;
  }

  html, body { background: #fff !important; color: #111 !important; }

  /* interface has no meaning on paper */
  #fx, #ledger, #rail, #nav, #ptr, #keys,
  .wide-note, .kb-hint, .skip-link, #console,
  #welcome { display: none !important; }

  /* Content must never depend on an animation having run. A print fired
     before the reveal observer resolves — Cmd-P on a cold load, or any
     headless print path — would otherwise emit blank panels and silently
     drop most of the CV. */
  .js .panel.reveal { opacity: 1 !important; transform: none !important; }
  /* Same failure class: the masthead values fade in under JS, so a print
     taken mid-arm emits empty cells beside every label. */
  .mh-meta > div dd { opacity: 1 !important; }

  /* Paper never runs animation, so anything caught mid-flight must land
     on its finished frame rather than printing at opacity 0. This is the
     general form of the two blank-content bugs fixed above; it stops the
     next animated element from reintroducing them. */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .masthead h1, .mh-role { opacity: 1 !important; transform: none !important; }

  body { padding: 0 !important; font: 400 10.5pt/1.5 var(--sans); }
  #app { max-width: none; padding: 0; }

  .masthead { display: block; padding: 0 0 .5rem; }
  .masthead h1 { color: #000 !important; font-size: 20pt; margin-bottom: .2rem; }
  .mh-role { font-size: 10pt; color: #333; }
  .gbrand span { color: #000 !important; }   /* brand colours print badly */

  .mh-meta { margin-top: .4rem; }
  .mh-meta > div { grid-template-columns: 5rem 1fr; padding: .12rem 0; border-top: 0; }
  .mh-meta dt, .mh-meta dd { font-size: 9pt; color: #444; }
  .mh-meta dd.live { color: #000 !important; }
  #upClock { display: none; }   /* a live clock means nothing on paper */

  /* tighter rhythm so a full CV lands in fewer pages */
  .panel { padding-top: .55rem; }
  .mission ul { margin-top: .25rem; }
  .mission li { margin: .12rem 0; }
  .rows .row { padding: .3rem 0; }

  .panel { padding: .7rem 0 0; }
  .sec-head { border-bottom: 1px solid #999; margin-bottom: .5rem; padding-bottom: .15rem; }
  .sec-head h2 { color: #000 !important; font-size: 8.5pt; letter-spacing: .16em; }

  h3, .mission h3, .row .what b { color: #000 !important; }
  .mission h3 { font-size: 11.5pt; }

  /* keep an entry on one page */
  .mission, .row, .card { break-inside: avoid; page-break-inside: avoid; }

  .mission { border-top: 1px solid #ddd; padding: .45rem 0; }
  .sev-tag { border: 1px solid #666; color: #000 !important; }
  .card { border-left: 2px solid #ccc; }
  .stats { border-top: 1px solid #ddd; color: #444; }

  a { color: #000 !important; text-decoration: underline; }
  /* a printed link is useless without its destination */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  a[href^="mailto:"]::after { content: ""; }

  .foot { border-top: 1px solid #999; margin-top: .8rem; }
}
