/* ==========================================================================
   utkarsh.samdani.com — site styles
   Day theme reads like an aeronautical chart; night theme like a cockpit
   display. The left rail is an instrument tape with a lit readout per section.
   Everything lives in a cascade layer so page-level <style> blocks and the
   self-contained blog articles always win over these defaults.
   ========================================================================== */

@layer site {

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --paper: #f5f6f2;
  --paper-2: #eceee8;
  --panel: #fcfcfa;
  --ink: #0e1a2b;
  --ink-2: #3b4859;
  --ink-3: #66727f;
  --rule: rgba(14, 26, 43, 0.12);
  --rule-2: rgba(14, 26, 43, 0.24);
  --signal: #c8261d;
  --signal-deep: #a11c14;
  --signal-ink: #ffffff;
  --signal-wash: rgba(200, 38, 29, 0.08);
  --blue: #1d4e9e;
  --blue-wash: rgba(29, 78, 158, 0.08);
  --water: #d9e6ef;
  --land: #e5ebdc;
  --go: #1e7b4c;
  --caution: #a86400;
  --stop: #9b1c1c;
  --shadow: 0 1px 0 rgba(14, 26, 43, 0.04), 0 18px 40px -22px rgba(14, 26, 43, 0.35);

  --font-sans: 'Mona Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data: 'B612 Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --page: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --rail: 7.5rem;
  --nav-h: 4rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Names the older templates (dashboard, admin, games, tickets) still use */
  --bg: var(--paper);
  --bg-elevated: var(--panel);
  --bg-surface: var(--paper-2);
  --bg-glass: rgba(245, 246, 242, 0.8);
  --text: var(--ink);
  --text-secondary: var(--ink-2);
  --muted: var(--ink-3);
  --soft: #aeb7c2;
  --accent: var(--signal);
  --accent-2: var(--blue);
  --accent-3: var(--signal);
  --accent-soft: var(--signal-wash);
  --accent-ink: var(--signal-ink);
  --cyan: var(--blue);
  --peach: var(--caution);
  --lime: var(--go);
  --rose: var(--stop);
  --line: var(--rule);
  --line-strong: var(--rule-2);
  --glow: var(--signal-wash);
  --glow-accent2: var(--blue-wash);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --max: var(--page);
  --font-mono: var(--font-data);
  --font-body: var(--font-sans);
  --font-display: var(--font-sans);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #080c12;
  --paper-2: #0d131b;
  --panel: #111923;
  --ink: #e8edf3;
  --ink-2: #aab6c4;
  --ink-3: #75828f;
  --rule: rgba(232, 237, 243, 0.1);
  --rule-2: rgba(232, 237, 243, 0.2);
  --signal: #ff5a4f;
  --signal-deep: #ff7d74;
  --signal-ink: #1a0503;
  --signal-wash: rgba(255, 90, 79, 0.1);
  --blue: #5cc6f2;
  --blue-wash: rgba(92, 198, 242, 0.1);
  --water: #0c1a27;
  --land: #10170f;
  --go: #3ddc84;
  --caution: #ffb547;
  --stop: #ff8a80;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 22px 50px -24px rgba(0, 0, 0, 0.9);
  --bg-glass: rgba(8, 12, 18, 0.8);
  --soft: #3d4856;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video, canvas, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { line-height: 1.1; font-weight: 700; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
strong { font-weight: 650; }
::selection { background: rgba(200, 38, 29, 0.2); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: 0.75rem; z-index: 400;
  padding: 0.6rem 1rem; border-radius: 6px;
  background: var(--ink); color: var(--paper); font-weight: 600;
  transform: translateY(-200%); transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Type ---------- */
.data {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.t-display {
  font-stretch: 75%;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.012em;
}
.t-title {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-stretch: 75%;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.012em;
}
.t-h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-stretch: 78%;
  font-weight: 780;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.t-h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-stretch: 90%;
  font-weight: 700;
  line-height: 1.15;
}
.t-lede {
  font-size: clamp(1.15rem, 1.7vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 38rem;
}
.t-body { color: var(--ink-2); max-width: 36rem; }
.t-body + .t-body { margin-top: 0.9rem; }
.t-muted { color: var(--ink-3); }

.prose { color: var(--ink-2); max-width: 38rem; }
.prose p + p { margin-top: 1rem; }
.prose strong { color: var(--ink); }
.prose a, .t-body a, .t-lede a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--rule-2); transition: text-decoration-color 0.18s, color 0.18s; }
.prose a:hover, .t-body a:hover, .t-lede a:hover { color: var(--signal); text-decoration-color: currentColor; }

/* Headings settle from wide to condensed on first paint */
@media (prefers-reduced-motion: no-preference) {
  .js .settle { animation: settle 1.1s var(--ease-out) both; }
}
@keyframes settle {
  from { font-stretch: 125%; opacity: 0; letter-spacing: 0.02em; }
  35% { opacity: 1; }
}

/* ---------- Links & buttons ---------- */
.link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.28em;
  text-decoration-color: var(--rule-2);
  transition: color 0.18s, text-decoration-color 0.18s;
}
.link:hover { color: var(--signal); text-decoration-color: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0 1.3rem;
  border-radius: 8px; border: 1px solid transparent;
  font-weight: 650; font-size: 1rem; line-height: 1;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--fill { background: var(--signal); color: var(--signal-ink); }
.btn--fill:hover { background: var(--signal-deep); }
.btn--line { border-color: var(--rule-2); color: var(--ink); background: transparent; }
.btn--line:hover { border-color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--signal); color: var(--signal-ink); }
.btn--sm { min-height: 2.4rem; padding: 0 0.95rem; font-size: 0.9rem; }

/* ---------- Page frame ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.page { position: relative; min-height: 100dvh; display: flex; flex-direction: column; }
.page > main, .page > .main { flex: 1; }

/* Chart graticule used behind heads and the hero */
.graticule {
  --cell: clamp(4.5rem, 9vw, 7rem);
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: calc(50% + var(--cell) / 2) 0;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 1.25rem; }
.brand {
  display: inline-flex; align-items: baseline;
  font-size: 1.3rem; font-weight: 800; font-stretch: 80%; letter-spacing: -0.01em;
  color: var(--ink); flex: none;
}
.brand-dot { color: var(--signal); }
.nav-links { display: flex; align-items: center; gap: 0.1rem; margin-left: auto; }
.nav-links a {
  position: relative; padding: 0.5rem 0.7rem; border-radius: 6px;
  font-size: 0.95rem; font-weight: 520; color: var(--ink-2);
  transition: color 0.18s, background-color 0.18s;
}
.nav-links a:hover { color: var(--ink); background: var(--rule); }
.nav-links a[aria-current="page"], .nav-links a.active { color: var(--ink); }
.nav-links a[aria-current="page"]::after, .nav-links a.active::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.1rem;
  height: 2px; background: var(--signal); border-radius: 2px;
}
.nav-tools { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.nav-clock { color: var(--ink-3); white-space: nowrap; }
.nav-login { font-size: 0.95rem; font-weight: 560; color: var(--ink-2); padding: 0.5rem 0.4rem; }
.nav-login:hover { color: var(--ink); }

/* Day / night switch */
.theme-switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border-radius: 999px; border: 1px solid var(--rule-2);
  font-family: var(--font-data); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--ink-3); background: transparent; line-height: 1;
}
.theme-switch span { position: relative; z-index: 1; padding: 0.42rem 0.6rem; transition: color 0.25s; }
.theme-switch::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--ink); transition: transform 0.35s var(--ease-out);
}
.theme-switch .ts-day { color: var(--paper); }
:root[data-theme="dark"] .theme-switch::before { transform: translateX(100%); }
:root[data-theme="dark"] .theme-switch .ts-day { color: var(--ink-3); }
:root[data-theme="dark"] .theme-switch .ts-night { color: var(--paper); }
.theme-switch:hover { border-color: var(--ink-3); }

.nav-burger {
  display: none; width: 2.6rem; height: 2.6rem; border-radius: 8px;
  border: 1px solid var(--rule-2); color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-burger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.nav-sheet {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  padding: 1rem var(--gutter) 2rem;
  background: var(--paper);
  visibility: hidden; opacity: 0;
  transition: opacity 0.25s var(--ease-out), visibility 0s linear 0.25s;
}
.nav-sheet.is-open { visibility: visible; opacity: 1; transition: opacity 0.25s var(--ease-out); }
.nav-sheet-top { display: flex; align-items: center; justify-content: space-between; height: calc(var(--nav-h) - 1rem); }
.nav-sheet-close { width: 2.6rem; height: 2.6rem; border-radius: 8px; border: 1px solid var(--rule-2); display: grid; place-items: center; color: var(--ink); }
.nav-sheet-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-sheet-links { display: grid; margin-top: 1.5rem; border-top: 1px solid var(--rule); }
.nav-sheet-links a {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0.85rem 0; border-bottom: 1px solid var(--rule);
  font-size: 2rem; font-weight: 780; font-stretch: 78%; line-height: 1.1;
}
.nav-sheet-links a .data { color: var(--ink-3); }
.nav-sheet-links a[aria-current="page"], .nav-sheet-links a.active { color: var(--signal); }
.nav-sheet-foot { margin-top: auto; padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nav-sheet-foot .nav-login { padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  .nav-sheet-links a { transform: translateY(8px); opacity: 0; transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out); }
  .nav-sheet.is-open .nav-sheet-links a { transform: none; opacity: 1; }
  .nav-sheet.is-open .nav-sheet-links a:nth-child(2) { transition-delay: 30ms; }
  .nav-sheet.is-open .nav-sheet-links a:nth-child(3) { transition-delay: 60ms; }
  .nav-sheet.is-open .nav-sheet-links a:nth-child(4) { transition-delay: 90ms; }
  .nav-sheet.is-open .nav-sheet-links a:nth-child(5) { transition-delay: 120ms; }
  .nav-sheet.is-open .nav-sheet-links a:nth-child(6) { transition-delay: 150ms; }
  .nav-sheet.is-open .nav-sheet-links a:nth-child(7) { transition-delay: 180ms; }
  .nav-sheet.is-open .nav-sheet-links a:nth-child(8) { transition-delay: 210ms; }
}

@media (max-width: 1080px) {
  .nav-clock { display: none; }
}
@media (max-width: 960px) {
  .nav-links, .nav-tools .nav-login, .nav-tools .nav-dash { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-tools { margin-left: auto; }
}

/* Impersonation notice (admin feature) */
.impersonation-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 1rem auto 0; padding: 0.85rem 1rem; border-radius: 8px;
  border: 1px solid var(--caution); background: color-mix(in srgb, var(--caution) 10%, transparent);
  width: min(100% - 2 * var(--gutter), var(--page));
}
.impersonation-label { font-family: var(--font-data); font-size: 0.72rem; color: var(--caution); }
.impersonation-text { font-size: 0.92rem; color: var(--ink-2); }

/* ---------- The tape ----------
   The left rail works like the altitude tape on a cockpit display: a graduated
   scale that moves with the page and fades out toward the screen edges, with a
   red index fixed at mid-screen. Each section's code sits on the tape in a
   small outlined box; while that section is under the index its box locks
   there and lights up, until the next one pushes it off (plain sticky
   positioning, no animation code). */
.route {
  --route-x: calc(max(var(--gutter), (100% - var(--page)) / 2) + var(--rail) / 2);
  --tape-w: 30px; --tick: 12px; --tick-major: 60px;
  --tick-min-w: 8px; --tick-maj-w: 18px; --index-w: 24px;
  --tape-major: color-mix(in srgb, var(--ink-3) 70%, transparent);
  position: relative;
}
:root { --mid: 50vh; --ro-h: 1.7rem; --notch: 7px; --readout: #0b1118; --readout-ink: #eef1f4; }
@supports (height: 1dvh) { :root { --mid: 50dvh; } }
:root[data-theme="dark"] { --readout: #121b26; }

.tape {
  position: absolute; top: 0; bottom: 0; z-index: 1; pointer-events: none;
  left: calc(var(--route-x) - var(--tape-w) / 2); width: var(--tape-w);
  background:
    repeating-linear-gradient(to bottom, var(--tape-major) 0 1px, transparent 1px var(--tick-major)) 50% 0 / var(--tick-maj-w) 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--rule-2) 0 1px, transparent 1px var(--tick)) 50% 0 / var(--tick-min-w) 100% no-repeat;
}
/* the index: rides in with the route, locks at mid-screen, parks at the end */
.tape > i {
  position: sticky; top: calc(var(--mid) - 1px); display: block;
  width: var(--index-w); height: 2px; margin-inline: auto; background: var(--signal);
}
/* viewport-anchored fade window, driven by the tape's own view timeline */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @keyframes tape-window {
    from { -webkit-mask-position: 0 -100vh; mask-position: 0 -100vh; }
    to { -webkit-mask-position: 0 calc(100% + 100vh); mask-position: 0 calc(100% + 100vh); }
  }
  .tape {
    -webkit-mask-image: linear-gradient(transparent 6%, #000 36%, #000 64%, transparent 94%);
    mask-image: linear-gradient(transparent 6%, #000 36%, #000 64%, transparent 94%);
    -webkit-mask-size: 100% 100vh; mask-size: 100% 100vh;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    animation: tape-window linear both;
    animation-timeline: view();
    animation-range: cover;
  }
}

.leg { position: relative; padding-block: clamp(4rem, 8.5vw, 6.75rem); }
.leg + .leg { border-top: 1px solid var(--rule); }
.leg-grid { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
.leg-body { min-width: 0; }

.wpt {
  position: sticky; top: calc(var(--mid) - var(--ro-h) / 2); z-index: 2;
  align-self: start; justify-self: center; margin-top: 0.5rem;
}
.wpt-mark { display: none; }
.wpt-id {
  --ro-edge: var(--rule-2); --ro-fill: var(--paper);
  position: relative; isolation: isolate; display: block;
  height: var(--ro-h); line-height: var(--ro-h);
  padding: 0 calc(0.6rem + var(--notch)) 0 0.6rem;
  font-family: var(--font-data); font-size: 0.68rem; letter-spacing: 0.1em; white-space: nowrap;
  color: var(--ink-3); background: var(--ro-edge);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%);
  transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.wpt-id::before {
  content: ""; position: absolute; inset: 1px; z-index: -1;
  background: var(--ro-fill); clip-path: inherit;
  transition: background-color 0.25s var(--ease-out);
}
.wpt.is-here .wpt-id { --ro-edge: var(--signal); --ro-fill: var(--readout); color: var(--readout-ink); }
.leg-head { display: grid; gap: 1rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); max-width: 46rem; }

@media (max-width: 760px) {
  :root { --rail: 2.25rem; }
  .route {
    --route-x: calc(var(--gutter) + 0.5rem);
    --tape-w: 18px; --tick: 10px; --tick-major: 50px;
    --tick-min-w: 5px; --tick-maj-w: 11px; --index-w: 14px;
  }
  :root { --ro-h: 12px; --notch: 11px; }
  /* on phones the readout is just the pointer; the heading is right beside it */
  .wpt { justify-self: start; margin: 0.45rem 0 0 calc(0.5rem - 5.5px); }
  .wpt-id { width: 11px; padding: 0; font-size: 0; }
  .wpt.is-here .wpt-id { --ro-fill: var(--signal); }
  .leg { padding-block: 4rem; }
}

/* ---------- Page head (inner pages) ---------- */
.phead { position: relative; border-bottom: 1px solid var(--rule); overflow: hidden; }
.phead::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 6.5rem 6.5rem;
  background-position: 0 -1px;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}
.phead-grid {
  position: relative;
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) auto;
  align-items: end; gap: 0 clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem);
}
.phead-grid > .wpt { align-self: start; padding-top: 0.6rem; }
.phead-copy { display: grid; gap: 1.35rem; min-width: 0; }
.phead-fix {
  display: grid; gap: 0.2rem 1.5rem; grid-template-columns: auto auto;
  align-self: end; justify-self: end;
  padding: 0.9rem 1.1rem; border: 1px solid var(--blue); border-radius: 4px;
  background: var(--paper); color: var(--ink);
}
.phead-fix dt { font-family: var(--font-data); font-size: 0.68rem; color: var(--blue); letter-spacing: 0.04em; }
.phead-fix dd { font-family: var(--font-data); font-size: 0.78rem; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .phead-grid { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .phead-fix { grid-column: 2; justify-self: start; margin-top: 2rem; }
}

/* ---------- Home: hero ---------- */
.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--rule); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; opacity: 0.6; mask-image: radial-gradient(ellipse 75% 70% at 70% 45%, #000 35%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 45%, #000 35%, transparent 80%); }
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  grid-template-rows: 1fr auto;
  grid-template-areas: "head station" "copy station";
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: min(calc(100dvh - var(--nav-h)), 56rem);
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-head { grid-area: head; align-self: end; position: relative; z-index: 2; min-width: 0; }
.hero-copy { grid-area: copy; position: relative; z-index: 2; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); min-width: 0; }
.hero-name {
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-stretch: 75%; font-weight: 800; line-height: 0.86; letter-spacing: -0.012em;
  color: var(--ink);
}
.hero-name .particle-wrap { display: block; position: relative; }
.hero-name .particle-wrap canvas { position: absolute; left: 0; top: 0; }
.hero-name .pt-text { display: block; }
@media (hover: hover) and (pointer: fine) and (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .js .hero-name .pt-text { visibility: hidden; white-space: nowrap; animation: pt-fallback 0s linear 2.5s forwards; }
  .js .hero-name .is-canvas .pt-text { animation: none; }
  .js .hero-name .hero-role-caret { display: none; }
}
@keyframes pt-fallback { to { visibility: visible; } }
.hero-role { display: flex; align-items: flex-end; color: var(--signal); min-height: 1em; }
.hero-role .particle-wrap { display: inline-block; }
.hero-role-caret { display: inline-block; width: 0.06em; height: 0.72em; margin-left: 0.08em; margin-bottom: 0.1em; background: var(--signal); animation: caret 1.05s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero-lede { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); font-size: clamp(1.2rem, 1.9vw, 1.5rem); line-height: 1.42; max-width: 32rem; font-weight: 480; }
.hero-sub { margin-top: 1rem; color: var(--ink-2); max-width: 33rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }

.hero-station { grid-area: station; position: relative; align-self: stretch; display: grid; align-items: end; justify-items: center; min-width: 0; }
.rose-wrap { position: absolute; left: 50%; top: 46%; width: min(118%, 40rem); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.rose { width: 100%; height: 100%; overflow: visible; color: var(--blue); }
.rose .rose-ring { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.7; }
.rose .rose-ring--in { opacity: 0.25; stroke-dasharray: 2 5; }
.rose .rose-ticks line { stroke: currentColor; stroke-width: 1; opacity: 0.55; }
.rose .rose-ticks .t10 { opacity: 0.75; }
.rose .rose-ticks .t30 { stroke-width: 1.6; opacity: 0.95; }
.rose text { fill: currentColor; font-family: var(--font-data); font-size: 13px; letter-spacing: 0.04em; }
.rose .rose-north { fill: currentColor; }
.rose .rose-bug { fill: var(--signal); }
.rose .rose-dial { transform-origin: 220px 220px; }
.rose .rose-bug-g { transform-origin: 220px 220px; transform: rotate(var(--hdg, 78deg)); }
@media (prefers-reduced-motion: no-preference) {
  .js .rose .rose-dial { animation: rose-settle 1.8s var(--ease-out) both 0.1s; }
  .js .rose-wrap { animation: fade-in 1s var(--ease-out) both; }
}
@keyframes rose-settle { from { transform: rotate(-38deg); } }
@keyframes fade-in { from { opacity: 0; } }

.hero-portrait {
  position: relative; z-index: 1;
  width: min(100%, 27rem);
  margin: 0 auto -1px; /* centred under the rose, so the station is him */
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero-portrait { animation: rise 1.1s var(--ease-out) both 0.25s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.hdg-readout { position: absolute; z-index: 2; right: 0; top: clamp(1rem, 3vw, 2rem); color: var(--ink-3); }
.hdg-readout b { color: var(--signal); font-weight: 400; }

.hero-fixes {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: space-between;
  gap: 1rem 2rem; padding-block: 1.1rem 1.25rem; border-top: 1px solid var(--rule);
}
.hero-fixes dt { font-size: 0.8rem; color: var(--ink-3); }
.hero-fixes dd { font-weight: 600; margin-top: 0.15rem; }
.hero-fixes dd a { text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 0.2em; }
.hero-fixes dd a:hover { color: var(--signal); text-decoration-color: currentColor; }
.hero-fixes .data { font-size: 0.9rem; font-weight: 400; }

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr; grid-template-rows: auto;
    grid-template-areas: "head" "station" "copy";
    min-height: 0; padding-top: clamp(1.75rem, 5vw, 3rem);
  }
  .hero-station { min-height: clamp(23rem, 92vw, 34rem); margin-top: 0.25rem; }
  .rose-wrap { width: min(104%, 36rem); top: 50%; }
  .hero-portrait { width: min(64%, 22rem); }
  .hero-copy { padding-top: 0.5rem; padding-bottom: 2.25rem; }
  .hero-fixes { grid-template-columns: 1fr 1fr; }
  .hero-bg { opacity: 0.4; }
}
@media (max-width: 560px) {
  .hero-name { font-size: clamp(3.2rem, 17.5vw, 4.8rem); }
  .hdg-readout { top: 0.4rem; right: 0; font-size: 0.68rem; }
  .pos-readout { top: 0.4rem; left: 0; font-size: 0.68rem; }
  .hero-station .rose-wrap { width: min(94%, 36rem); }
  .hero-lede { font-size: 1.22rem; }
}

/* ---------- Home: the ventures index ----------
   Names set large; the one you point at lights up, a red leader line runs out
   from it and the terminal beside it prints that venture's file. */
.pos-readout { position: absolute; z-index: 2; left: 0; top: clamp(1rem, 3vw, 2rem); color: var(--ink-3); }
.pos-readout b { color: var(--ink-2); font-weight: 400; }

.vx { --gap: clamp(2rem, 5vw, 4.5rem); margin-top: 0.25rem; }
.vx-cmd { margin-bottom: 0.9rem; }
.vx-list { list-style: none; position: relative; border-top: 1px solid var(--rule-2); }
.vx-item { border-bottom: 1px solid var(--rule); }
.vx-name { display: flex; align-items: baseline; gap: 1rem; padding: 1rem 0 0.85rem; color: inherit; }
.vx-title { font-size: clamp(2.4rem, 5vw, 4.3rem); font-stretch: 75%; font-weight: 800; line-height: 0.95; letter-spacing: -0.01em; color: var(--ink); transition: color 0.25s, transform 0.4s var(--ease-out); }
.vx-lead { flex: 1; align-self: center; height: 1px; background: var(--signal); transform: scaleX(0); transform-origin: left center; transition: transform 0.5s var(--ease-out); }
.vx-years { flex: none; color: var(--ink-3); font-size: 0.78rem; white-space: nowrap; }
.vx-detail { padding: 0 0 1.35rem; }
.vx-path { display: none; }
.vx-state { font-size: 0.78rem; color: var(--ink-2); }
.vx-state--live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 0.55rem; border-radius: 50%; background: var(--signal); vertical-align: 1px; }
.vx-desc { margin-top: 0.45rem; max-width: 36rem; color: var(--ink-2); }
.vx-ping { margin-top: 0.7rem; font-size: 0.74rem; color: var(--ink-3); }
.vx-ping b { color: var(--ink); font-weight: 400; }
.vx-ping.is-down b { color: var(--stop); }
@media (prefers-reduced-motion: no-preference) {
  .vx-state--live::before { animation: vx-live 2s ease-in-out infinite; }
}
@keyframes vx-live { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--signal) 0%, transparent); } 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 45%, transparent); } }

/* Desktop with JS: names on the left, one terminal readout on the right.
   Touch screens keep everything inline, since there is nothing to hover. */
@media (min-width: 900px) and (hover: hover) {
  .js .vx-list { width: 57%; }
  .js .vx-title { color: var(--ink-3); }
  .js .vx-item.is-active .vx-title { color: var(--ink); transform: translateX(0.12em); }
  .js .vx-item.is-active .vx-lead { transform: scaleX(1); }
  .js .vx-name:focus-visible { outline: none; }
  .js .vx-name:focus-visible .vx-title { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
  .js .vx-detail {
    position: absolute; top: 0; left: calc(100% + var(--gap)); width: calc(100% * 43 / 57 - var(--gap));
    padding: 1.1rem 0 0; opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity 0.12s, transform 0.3s var(--ease-out), visibility 0s linear 0.12s;
  }
  .js .vx-item.is-active .vx-detail { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s 0.14s, transform 0.45s var(--ease-out) 0.14s, visibility 0s 0.12s; }
  .js .vx-path { display: block; min-height: 1.2em; margin-bottom: 1.1rem; color: var(--ink-2); }
  .js .vx-path.is-typing::after { content: ""; display: inline-block; width: 0.55em; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: var(--signal); }
  .js .vx-desc { font-size: 1.12rem; line-height: 1.6; }
}
@media (hover: hover) and (min-width: 900px) {
  .js .vx-name:hover .vx-title { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .vx-title, .vx-lead, .js .vx-detail, .js .vx-item.is-active .vx-detail { transition: none; }
}

/* ---------- Home: work list ---------- */
.proj-list { list-style: none; border-top: 1px solid var(--rule-2); }
.proj { border-bottom: 1px solid var(--rule); }
.proj-row {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 11rem; gap: 0.5rem 2rem;
  align-items: baseline; padding: clamp(1.4rem, 2.6vw, 2rem) 0;
}
.proj-years { color: var(--ink-3); }
.proj-name { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-stretch: 78%; font-weight: 780; line-height: 1; letter-spacing: -0.005em; }
.proj-name a { transition: color 0.18s; }
.proj-name a:hover { color: var(--signal); }
.proj-desc { grid-column: 2; color: var(--ink-2); max-width: 40rem; margin-top: 0.5rem; }
.proj-state { justify-self: end; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink-2); font-size: 0.9rem; white-space: nowrap; }
.proj-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.proj-state--live::before { background: var(--go); box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 18%, transparent); }
.proj-state--rebuild::before { background: var(--caution); }
.proj-state--merged::before { background: transparent; border: 1.5px solid var(--ink-3); }
.proj-ping { grid-column: 2; margin-top: 0.75rem; color: var(--ink-3); }
.proj-ping b { color: var(--go); font-weight: 400; }
.proj-ping.is-down b { color: var(--stop); }
@media (max-width: 760px) {
  .proj-row { grid-template-columns: minmax(0, 1fr) auto; }
  .proj-years { grid-column: 1 / -1; }
  .proj-desc, .proj-ping { grid-column: 1 / -1; }
  .proj-state { grid-row: 2; grid-column: 2; }
}

/* ---------- Home & blog: satellite comparison ---------- */
.intel { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.intel-copy { display: grid; gap: 1.25rem; align-content: start; }
.intel-copy .t-h2 { max-width: 14ch; }
.osint-def { border-left: 2px solid var(--signal); padding-left: 1rem; color: var(--ink-2); }
.osint-def strong { color: var(--ink); }
@media (max-width: 960px) { .intel { grid-template-columns: 1fr; } }

.sat { position: relative; }
.sat-frame {
  --split: 50%;
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: 4px; background: #1b1f1a; isolation: isolate;
  box-shadow: var(--shadow);
  touch-action: pan-y;
}
.sat-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.sat-after { clip-path: inset(0 0 0 var(--split)); }
.sat-divider { position: absolute; top: 0; bottom: 0; left: var(--split); width: 0; z-index: 3; pointer-events: none; }
.sat-divider::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); }
.sat-handle {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
  width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #fff; color: #0e1a2b;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.sat-handle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sat-range { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; -webkit-appearance: none; appearance: none; }
.sat-frame:has(.sat-range:focus-visible) .sat-handle { outline: 2px solid var(--signal); outline-offset: 3px; }
.sat-tag {
  position: absolute; top: 0.75rem; z-index: 2;
  padding: 0.3rem 0.5rem; border-radius: 3px;
  background: rgba(8, 12, 18, 0.72); color: #fff;
  font-family: var(--font-data); font-size: 0.7rem; letter-spacing: 0.04em;
}
.sat-tag--before { left: 0.75rem; }
.sat-tag--after { right: 0.75rem; }
.sat-coord { position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2; padding: 0.25rem 0.45rem; border-radius: 3px; background: rgba(8, 12, 18, 0.62); color: #fff; font-family: var(--font-data); font-size: 0.66rem; letter-spacing: 0.03em; }
.sat-lock {
  position: absolute; z-index: 2; left: var(--lx); top: var(--ly); width: var(--lw); height: var(--lh);
  border: 1.5px solid #ffd21f; box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
  opacity: 0; transform: scale(1.8); transition: opacity 0.4s var(--ease-out), transform 0.7s var(--ease-out);
}
.sat-lock span {
  position: absolute; left: -1.5px; bottom: calc(100% + 4px); white-space: nowrap;
  padding: 0.18rem 0.4rem; background: #ffd21f; color: #16130a;
  font-family: var(--font-data); font-size: 0.64rem; letter-spacing: 0.05em;
}
.sat.is-locked .sat-lock { opacity: 1; transform: none; }
.sat-cap { margin-top: 0.9rem; font-size: 0.92rem; color: var(--ink-2); max-width: 40rem; }
.sat-credit { display: block; margin-top: 0.35rem; color: var(--ink-3); }

/* ---------- Post list ---------- */
.posts { list-style: none; border-top: 1px solid var(--rule-2); }
.post-row { border-bottom: 1px solid var(--rule); }
.post-link { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 0.35rem 2rem; padding: 1.5rem 0; align-items: baseline; }
.post-date { color: var(--ink-3); }
.post-title { font-size: clamp(1.25rem, 2.1vw, 1.6rem); font-stretch: 88%; font-weight: 720; line-height: 1.15; transition: color 0.18s; }
.post-link:hover .post-title { color: var(--signal); }
.post-ex { grid-column: 2; color: var(--ink-2); font-size: 0.98rem; max-width: 44rem; }
.post-read { color: var(--ink-3); white-space: nowrap; }
@media (max-width: 760px) {
  .post-link { grid-template-columns: 1fr; }
  .post-ex { grid-column: 1; }
}

/* ---------- Home: journey (flight plan) ----------
   One neutral hairline is the plotted track. The red segments are legs already
   flown, fix to fix; past the present position the track goes dashed. Fixes are
   small chart dots, and the leg label says how long each hop took. */
.flight {
  --mark: 11px; --mark-y: 2.35rem;
  list-style: none; position: relative; margin-top: 0.5rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.flight::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(var(--mark-y) - 0.5px);
  height: 1px; background: var(--rule-2);
}
.fix {
  position: relative; padding-right: clamp(1rem, 2.5vw, 2rem);
  display: grid; grid-template-rows: var(--mark-y) auto auto; align-content: start;
}
.fix-year {
  align-self: start; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.fix-year em { font-style: normal; color: var(--signal); margin-left: 0.4rem; }
.fix-mark {
  position: absolute; z-index: 1; left: 0; top: calc(var(--mark-y) - var(--mark) / 2);
  width: var(--mark); height: var(--mark); border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 4px var(--paper);
}
.is-now .fix-mark { background: var(--paper); border: 2px solid var(--signal); }
.is-now .fix-mark::after {
  content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--signal);
}
/* the leg flown from this fix to the next one */
.fix::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(var(--mark-y) - 1px);
  height: 2px; background: var(--signal); transform-origin: left center;
}
.is-now::after {
  background: repeating-linear-gradient(90deg, var(--signal) 0 6px, transparent 6px 12px);
  -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent);
  mask-image: linear-gradient(90deg, #000 30%, transparent);
}
.fix-leg {
  position: absolute; left: 50%; top: 0.1rem; transform: translateX(-50%);
  font-size: 0.7rem; color: var(--ink-3); white-space: nowrap;
}
.fix-name {
  margin-top: 1.35rem; font-size: 1.3rem; font-stretch: 85%; font-weight: 750; line-height: 1.1;
}
.fix p { margin-top: 0.45rem; color: var(--ink-2); font-size: 0.95rem; max-width: 30ch; text-wrap: pretty; }

@media (prefers-reduced-motion: no-preference) {
  .js .flight.rv { transform: none; }
  .js .flight .fix::after { transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--i) * 160ms + 150ms); }
  .js .flight .fix-mark { transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); transition-delay: calc(var(--i) * 160ms); }
  .js .flight:not(.is-in) .fix::after { transform: scaleX(0); }
  .js .flight:not(.is-in) .fix-mark { opacity: 0; transform: scale(0.6); }
}

@media (max-width: 760px) {
  /* Vertical on phones. The connector stays neutral so it doesn't read as a
     second red route beside the rail. */
  .flight { --mark-y: 0.68rem; grid-template-columns: 1fr; gap: 2.6rem; }
  .flight::before { display: none; }
  .fix {
    padding: 0 0 0 1.9rem;
    grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto;
    column-gap: 1rem;
  }
  .fix-mark { left: 0; }
  .fix-name { grid-column: 1; grid-row: 1; margin-top: 0; font-size: 1.2rem; }
  .fix-year { grid-column: 2; grid-row: 1; align-self: center; }
  .fix p { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .fix::after {
    left: calc(var(--mark) / 2 - 0.5px); right: auto; top: calc(var(--mark-y) + var(--mark) / 2 + 5px);
    bottom: calc(-2.6rem + 5px); width: 1px; height: auto; background: var(--rule-2);
    transform-origin: top center;
  }
  .is-now::after { display: none; }
  .fix-leg {
    left: 1.9rem; top: auto; bottom: -1.75rem; transform: none; font-size: 0.68rem;
  }
  .js .flight:not(.is-in) .fix::after { transform: scaleY(0); }
}

/* ---------- Terminal ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.shell-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.5rem; }
.shell-chip {
  font-family: var(--font-data); font-size: 0.78rem;
  padding: 0.45rem 0.75rem; border-radius: 4px;
  border: 1px solid var(--rule-2); color: var(--ink-2);
  transition: color 0.18s, border-color 0.18s, background-color 0.18s;
}
.shell-chip:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 960px) { .shell { grid-template-columns: 1fr; } }

.term {
  border-radius: 8px; overflow: hidden;
  background: #0b1118; color: #d6dee8;
  border: 1px solid #1d2733;
  box-shadow: var(--shadow);
  font-family: var(--font-data); font-size: 0.84rem; line-height: 1.7;
}
.term-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem 1rem; border-bottom: 1px solid #1d2733; color: #7f8c9a; font-size: 0.72rem; }
.term-head b { color: #d6dee8; font-weight: 400; }
.term-lamp { display: inline-flex; align-items: center; gap: 0.45rem; }
.term-lamp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px rgba(61, 220, 132, 0.7); }
.term-screen { padding: 1rem 1.1rem 0.25rem; min-height: 15rem; max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; }
.term-screen::-webkit-scrollbar { width: 8px; }
.term-screen::-webkit-scrollbar-thumb { background: #243140; border-radius: 8px; }
.tl { white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-cmd { color: #fff; }
.tl-cmd::before { content: "$ "; color: #ff5a4f; }
.tl-head { color: #5cc6f2; }
.tl-muted { color: #7f8c9a; }
.tl-err { color: #ff8a7a; }
.tl a { color: #ff5a4f; text-decoration: underline; text-underline-offset: 0.2em; }
.tl-menu { list-style: none; margin: 0.25rem 0 0.5rem; }
.tl-menu a { display: grid; grid-template-columns: 1.1rem 10rem 1fr; gap: 0.5rem; color: #d6dee8; text-decoration: none; padding: 0.05rem 0.25rem; border-radius: 3px; }
.tl-menu a .tl-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-menu a[aria-selected="true"] { background: rgba(255, 90, 79, 0.16); color: #fff; }
.tl-menu a[aria-selected="true"] .tl-pick { color: #ff5a4f; }
.term-form { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1.1rem 0.9rem; border-top: 1px solid #1d2733; }
.term-form label { display: flex; align-items: center; gap: 0.55rem; flex: 1; min-width: 0; }
.term-form .tl-prompt { color: #ff5a4f; }
.term-input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font-family: var(--font-data); font-size: 0.9rem; caret-color: #ff5a4f; }
.term-input::placeholder { color: #4d5a68; }
.term-run { padding: 0.35rem 0.8rem; border-radius: 4px; border: 1px solid #2a3644; color: #d6dee8; font-family: var(--font-data); font-size: 0.75rem; }
.term-run:hover { border-color: #ff5a4f; color: #fff; }
.term:has(.term-input:focus-visible) { border-color: #ff5a4f; }
@media (max-width: 560px) {
  .tl-menu a { grid-template-columns: 1.1rem 1fr; }
  .tl-menu a .tl-muted { grid-column: 2; }
}

/* ---------- Contact close ---------- */
.hello { display: grid; gap: 1.5rem; }
.hello-mail {
  display: inline-block; width: fit-content; max-width: 100%;
  font-size: clamp(2.1rem, 7.2vw, 5.6rem); font-stretch: 75%; font-weight: 800; line-height: 1;
  letter-spacing: -0.01em; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
  transition: background-size 0.45s var(--ease-out), color 0.2s;
  padding-bottom: 0.08em;
}
.hello-mail:hover { color: var(--signal); background-size: 100% 3px; }
.hello-ways { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; color: var(--ink-2); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule-2); margin-top: clamp(3rem, 7vw, 5rem); padding-block: 2.5rem 2rem; color: var(--ink-2); font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: start; }
.foot-name { font-size: 1.5rem; font-weight: 800; font-stretch: 78%; color: var(--ink); }
.foot-note { margin-top: 0.35rem; }
.foot-pos { margin-top: 0.75rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 0.45rem 2.5rem; }
.foot-links a:hover { color: var(--signal); }
.foot-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.25rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 0.85rem; }
.foot-legend { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.foot-legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.foot-legend i { display: inline-block; width: 18px; height: 2px; background: var(--signal); }
.foot-legend b { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal (content is visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .js .rv.is-in { opacity: 1; transform: none; }
}

/* ---------- Forms (new pages) ---------- */
.fm { display: grid; gap: 1.35rem; }
.fm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem; }
.fm-field { display: grid; gap: 0.45rem; min-width: 0; }
.fm-label { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.fm-label small { font-weight: 400; color: var(--ink-3); font-size: inherit; }
.fm-input {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule-2); border-radius: 6px;
  background: var(--panel); color: var(--ink);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.fm-input::placeholder { color: var(--ink-3); opacity: 0.8; }
.fm-input:hover { border-color: var(--ink-3); }
.fm-input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-wash); }
textarea.fm-input { min-height: 9rem; resize: vertical; line-height: 1.55; }
select.fm-input { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%; background-size: 0.36rem 0.36rem; background-repeat: no-repeat; }
.fm-error { color: var(--stop); font-size: 0.85rem; }
.fm-choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fm-choice { position: relative; }
.fm-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fm-choice span {
  display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0 1rem;
  border: 1px solid var(--rule-2); border-radius: 999px; color: var(--ink-2);
  transition: border-color 0.18s, color 0.18s, background-color 0.18s;
}
.fm-choice input:checked + span { border-color: var(--signal); background: var(--signal-wash); color: var(--ink); }
.fm-choice input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.fm-note { font-size: 0.88rem; color: var(--ink-3); }
.fm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
@media (max-width: 640px) { .fm-row { grid-template-columns: 1fr; } }

.notice { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: 6px; border: 1px solid; font-size: 0.95rem; }
.notice svg { width: 1.2rem; height: 1.2rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 0.1rem; }
.notice--ok { border-color: color-mix(in srgb, var(--go) 45%, transparent); background: color-mix(in srgb, var(--go) 8%, transparent); color: var(--ink); }
.notice--ok svg { color: var(--go); }
.notice--err { border-color: color-mix(in srgb, var(--stop) 45%, transparent); background: color-mix(in srgb, var(--stop) 7%, transparent); color: var(--ink); }
.notice--err svg { color: var(--stop); }
.notice ul { list-style: none; display: grid; gap: 0.2rem; }

/* ---------- Generic two-column content leg ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------- About page ---------- */
.about-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.about-photo { position: relative; justify-self: center; width: min(100%, 24rem); }
.about-photo .rose-wrap { top: 55%; width: 128%; }
.about-photo img { position: relative; z-index: 1; -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent); mask-image: linear-gradient(180deg, #000 80%, transparent); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0; border-top: 1px solid var(--rule-2); }
.facts > div { padding: 1.1rem 1.25rem 1.2rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 0.82rem; color: var(--ink-3); }
.facts dd { margin-top: 0.2rem; font-size: 1.1rem; font-weight: 620; }
.plain-list { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--rule-2); }
.plain-list li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0.5rem 2rem; padding: 1.35rem 0; border-bottom: 1px solid var(--rule); }
.plain-list h3 { font-size: 1.2rem; font-stretch: 88%; font-weight: 720; line-height: 1.2; }
.plain-list p { color: var(--ink-2); }
@media (max-width: 760px) {
  .about-intro { grid-template-columns: 1fr; }
  .plain-list li { grid-template-columns: 1fr; }
}
.roots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.root { border-top: 2px solid var(--ink); padding-top: 1.1rem; display: grid; gap: 0.65rem; }
.root-glyph { font-size: 2.1rem; line-height: 1; color: var(--signal); }
.root p { color: var(--ink-2); }
@media (max-width: 760px) { .roots { grid-template-columns: 1fr; } }

/* ---------- Work page ---------- */
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; color: var(--ink-3); }
.case-name { font-size: clamp(2.6rem, 6vw, 4.6rem); font-stretch: 75%; font-weight: 800; line-height: 0.92; letter-spacing: -0.01em; }
.case-copy { display: grid; gap: 1.2rem; align-content: start; }
.case-facts { list-style: none; display: grid; gap: 0.55rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.case-facts li { position: relative; padding-left: 1.6rem; color: var(--ink-2); }
.case-facts li::before { content: ""; position: absolute; left: 0.1rem; top: 0.55em; width: 7px; height: 7px; border: 1.5px solid var(--signal); transform: rotate(45deg); }
.case-facts .link { display: inline; }
.case-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.case-media { position: relative; }
.shot {
  border-radius: 6px; overflow: hidden; border: 1px solid var(--rule-2);
  background: var(--panel); box-shadow: var(--shadow);
}
.shot-bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-2); }
.shot-bar .data { margin-left: 0.35rem; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.shot iframe { width: 100%; aspect-ratio: 16 / 10; border: 0; background: #0b0f14; }
.archive-card { border: 1px dashed var(--rule-2); border-radius: 6px; padding: 1.4rem; display: grid; gap: 0.6rem; color: var(--ink-2); background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--rule) 10px 11px); }
.archive-card b { color: var(--ink); font-stretch: 85%; font-size: 1.15rem; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } }

/* OSINT method */
.method-card { border: 1px solid var(--rule-2); border-radius: 4px; background: var(--panel); padding: clamp(1.1rem, 2.5vw, 1.5rem); }
.method-cap { font-family: var(--font-data); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-3); margin-bottom: 1.1rem; }
.method { list-style: none; counter-reset: step; display: grid; }
.method li { position: relative; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.15rem 0.6rem; padding-bottom: 1.15rem; counter-increment: step; }
.method li:last-child { padding-bottom: 0; }
.method li::before {
  content: counter(step, decimal-leading-zero); grid-row: 1 / span 2; align-self: start;
  width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--signal); color: var(--signal); background: var(--panel);
  font-family: var(--font-data); font-size: 0.68rem; position: relative; z-index: 1;
}
.method li::after { content: ""; position: absolute; left: 0.95rem; top: 1.9rem; bottom: 0; width: 1.5px; background: var(--signal); opacity: 0.4; }
.method li:last-child::after { display: none; }
.method b { font-size: 1.08rem; font-stretch: 88%; font-weight: 720; line-height: 1.9rem; }
.method span { grid-column: 2; color: var(--ink-2); font-size: 0.97rem; }
.case-meta .proj-state { font-size: 0.88rem; }

/* Helstify system diagram */
.flow { border: 1px solid var(--rule-2); border-radius: 6px; padding: clamp(1rem, 2.5vw, 1.5rem); background: var(--panel); display: grid; gap: 0.75rem; }
.flow-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.flow-node { border: 1px solid var(--rule-2); border-radius: 4px; padding: 0.55rem 0.6rem; font-size: 0.86rem; text-align: center; background: var(--paper); }
.flow-node .data { display: block; color: var(--ink-3); font-size: 0.66rem; margin-top: 0.1rem; }
.flow-mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem; }
.flow-mid::before, .flow-mid::after { content: ""; height: 0; border-top: 1px dashed var(--signal); }
.flow-core { border: 1.5px solid var(--signal); border-radius: 4px; padding: 0.6rem 1rem; text-align: center; font-weight: 700; font-stretch: 85%; background: var(--signal-wash); }
.flow-core .data { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.68rem; }
.flow-cap { font-size: 0.85rem; color: var(--ink-3); }
@media (prefers-reduced-motion: no-preference) {
  .flow-mid::before, .flow-mid::after { background: linear-gradient(90deg, var(--signal) 40%, transparent 0) 0 0 / 10px 1px repeat-x; border: 0; height: 1px; animation: flow 0.9s linear infinite; }
}
@keyframes flow { to { background-position: 10px 0; } }
@media (max-width: 560px) { .flow-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Journey page ---------- */
.log { list-style: none; }
.log-item { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.log-item + .log-item { border-top: 1px solid var(--rule); }
.log-when { color: var(--ink-3); display: block; margin-bottom: 0.4rem; }
.log-title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-stretch: 80%; font-weight: 770; line-height: 1.02; }
.log-body { margin-top: 0.75rem; color: var(--ink-2); max-width: 40rem; }
.log-age { display: inline-block; margin-left: 0.6rem; padding: 0.12rem 0.4rem; border: 1px solid var(--signal); color: var(--signal); border-radius: 3px; font-family: var(--font-data); font-size: 0.68rem; vertical-align: 0.35em; }
.school { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); }
.school > div { padding: 1.25rem 1.5rem 1.4rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: 0.35rem; align-content: start; }
.school b { font-size: 1.25rem; font-stretch: 85%; }
.school p { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 760px) { .school { grid-template-columns: 1fr; } }
.courses { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; }
.course a { display: grid; gap: 0.65rem; }
.course img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 1px solid var(--rule); transition: transform 0.4s var(--ease-out); }
.course a:hover img { transform: translateY(-3px); }
.course b { font-weight: 680; line-height: 1.25; }
.course a:hover b { color: var(--signal); }
.course span { color: var(--ink-2); font-size: 0.93rem; }

/* ---------- Stack page (checklist) ---------- */
.checklist { border: 1px solid var(--rule-2); border-radius: 4px; background: var(--panel); }
.checklist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--rule-2); background: var(--paper-2); }
.checklist-head b { font-family: var(--font-data); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; }
.checklist-head span { color: var(--ink-3); }
.cl { list-style: none; padding: 0.4rem 1.1rem 0.8rem; }
.cl li { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.55rem 0; }
.cl li + li { border-top: 1px solid var(--rule); }
.cl-item { font-weight: 650; white-space: nowrap; }
.cl-lead { flex: 1; min-width: 1.5rem; border-bottom: 1.5px dotted var(--rule-2); transform: translateY(-0.3em); }
.cl-resp { text-align: right; color: var(--ink-2); max-width: 62%; }
@media (max-width: 560px) {
  .cl li { flex-wrap: wrap; }
  .cl-lead { display: none; }
  .cl-resp { text-align: left; max-width: none; flex-basis: 100%; }
}
.stack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
@media (max-width: 900px) { .stack-grid { grid-template-columns: 1fr; } }

/* ---------- Status page ---------- */
.atis { border: 1px solid var(--rule-2); border-radius: 4px; background: var(--panel); overflow: hidden; }
.atis-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--rule-2); background: var(--paper-2); }
.atis-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 0.5rem 1.5rem; align-items: center; padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--rule); }
.atis-row:last-child { border-bottom: 0; }
.atis-name { font-weight: 620; }
.atis-group { color: var(--ink-3); font-size: 0.85rem; }
.lamp { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--font-data); font-size: 0.74rem; letter-spacing: 0.04em; white-space: nowrap; }
.lamp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.lamp--up::before { background: var(--go); box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 18%, transparent); }
.lamp--down::before { background: var(--stop); }
.lamp--wait::before { background: var(--caution); }
@media (max-width: 640px) { .atis-row { grid-template-columns: 1fr auto; } .atis-row .data:not(.lamp) { display: none; } }

/* ---------- Blog wrapper (articles carry their own design) ---------- */
.article-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.25rem; }
.article-shell { padding-bottom: 2rem; }
.article-shell > .dossier-embed { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }

/* ---------- Misc ---------- */
.empty { padding: 2.5rem 0; color: var(--ink-3); }
.kbd { font-family: var(--font-data); font-size: 0.75em; padding: 0.1em 0.35em; border: 1px solid var(--rule-2); border-bottom-width: 2px; border-radius: 3px; }
hr.rule { border: 0; border-top: 1px solid var(--rule); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

} /* end @layer site */
