/* ═══════════════════════════════════════════════════════════
   VIGILANT® — TACTICAL TELEMETRY / CRT TERMINAL SUBSTRATE
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0a0a;
  --bg-raise: #121212;
  --fg: #eaeaea;
  --fg-dim: #8a8a8a;
  --accent: #ff2a2a;
  --green: #4af626;
  --line: #2a2a2a;
  --mono: "JetBrains Mono", "SF Mono", monospace;
  --display: "Archivo Black", "Arial Black", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  overflow-x: clip;
}

::selection { background: var(--accent); color: #0a0a0a; }

/* ─── 3D canvas + veil ─── */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

#veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(10, 10, 10, 0.55) 100%);
}

/* ─── analog degradation overlays ─── */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.14) 2px,
    rgba(0, 0, 0, 0.14) 4px
  );
  mix-blend-mode: multiply;
}

.noise {
  position: fixed;
  inset: -50%;
  z-index: 41;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 0.6s steps(4) infinite;
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(2%, 2%); }
}

.frame-marks { position: fixed; inset: 0; z-index: 42; pointer-events: none; }
.frame-marks .mark {
  position: absolute;
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 14px;
}
.mark.tl { top: 8px; left: 10px; }
.mark.tr { top: 8px; right: 10px; }
.mark.bl { bottom: 8px; left: 10px; }
.mark.br { bottom: 8px; right: 10px; }

/* ─── top bar ─── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.7rem;
}
/* translucent bar only where backdrop blur can keep content behind it unreadable */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar {
    background: rgba(10, 10, 10, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.topbar-brand { display: flex; align-items: baseline; gap: 0.75rem; }
.brand-block { width: 12px; height: 12px; background: var(--accent); align-self: center; }
.brand-name { font-family: var(--display); font-size: 1rem; letter-spacing: 0.02em; }
.brand-name sup { font-size: 0.5em; }
.brand-meta { color: var(--fg-dim); }

.topbar-nav { display: flex; justify-content: center; gap: clamp(1rem, 2.4vw, 2.5rem); }
.topbar-nav a { color: var(--fg-dim); text-decoration: none; transition: color 0.15s; white-space: nowrap; }
.topbar-nav a:hover { color: var(--accent); }

.topbar-status { display: flex; align-items: center; gap: 1rem; color: var(--fg-dim); }
.status-dot {
  width: 8px; height: 8px;
  background: var(--green);
  animation: blink 1.6s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }
.topbar-clock { color: var(--fg); min-width: 11ch; text-align: right; }

/* ─── panels / layout ─── */
main { position: relative; z-index: 10; }

.panel { position: relative; padding: 0 4vw; }

.kicker { color: var(--fg-dim); font-size: 0.7rem; margin-bottom: 1.5rem; }
.accent { color: var(--accent); }

.section-no {
  font-size: 0.7rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}
.section-no::before { content: "/// "; color: var(--fg-dim); }

.section-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6.5vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

/* ─── hero ─── */
.panel-hero {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding-top: 5rem;
  padding-bottom: 5.5rem;
  pointer-events: none;
}
.panel-hero a { pointer-events: auto; }

.hero-title {
  font-family: var(--display);
  font-size: clamp(5rem, 17vw, 15rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-shadow: 0 0 60px rgba(10, 10, 10, 0.9);
}

.hero-sub {
  display: grid;
  grid-template-columns: minmax(0, 44ch) auto;
  gap: 3rem;
  align-items: end;
  margin-top: 2.5rem;
  max-width: 72rem;
}

.hero-lede { color: var(--fg); font-size: 0.8125rem; }

.hero-cta { display: flex; flex-direction: column; gap: 0.75rem; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--fg);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn-solid { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.btn-solid:hover { background: var(--fg); border-color: var(--fg); }
.btn-line { color: var(--fg); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn-big { font-size: clamp(0.8rem, 1.6vw, 1.1rem); padding: 1.3rem 2.4rem; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 4vw;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.65rem;
  color: var(--fg-dim);
}
.hero-scroll-bar {
  width: 60px; height: 1px;
  background: var(--fg-dim);
  position: relative;
  overflow: hidden;
}
.hero-scroll-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: scroll-sweep 2s linear infinite;
}
@keyframes scroll-sweep { to { transform: translateX(100%); } }

.hero-side {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 0.6rem;
  color: var(--fg-dim);
  writing-mode: vertical-rl;
}

/* ─── aperture ─── */
.panel-aperture { min-height: 160vh; }
.aperture-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(0, 40ch);
  align-content: center;
  gap: 4rem;
  padding-top: 6rem;
  pointer-events: none;
}

.mono-block { color: var(--fg); margin-bottom: 2.5rem; }

.aperture-note {
  margin-top: 1.4rem;
  font-size: 0.62rem;
  line-height: 1.7;
  color: var(--fg-dim);
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.stat-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat { background: rgba(10, 10, 10, 0.85); padding: 1.1rem 1.2rem; }
.stat dt { font-size: 0.6rem; color: var(--fg-dim); margin-bottom: 0.4rem; }
.stat dd { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 2rem); letter-spacing: -0.02em; }
.stat .unit { font-size: 0.5em; color: var(--accent); }
/* odd stat count: let the last cell span the full row */
.stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ─── demo section (spacer for scroll-gated HUD) ─── */
.panel-demo { padding: 0; position: relative; }
.demo-spacer { height: 260vh; }

.dim { color: var(--fg-dim); }

/* ─── HUD ─── */
.hud {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.hud.active { opacity: 1; visibility: visible; }

.hud-head {
  position: absolute;
  top: 5rem;
  left: 2rem;
}
.hud-title {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0.3rem 0;
}
.hud-sub { font-size: 0.65rem; color: var(--fg-dim); }

.hud-panel {
  position: absolute;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.88);
  font-size: 0.68rem;
}
.hud-panel-head {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 0.62rem;
}
.hud-panel-head-gap { border-top: 1px solid var(--line); }

.hud-log {
  left: 2rem;
  bottom: 5.5rem;
  width: min(420px, 42vw);
}
.hud-log-list {
  list-style: none;
  padding: 0.6rem 0.9rem;
  height: 190px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hud-log-list li {
  padding: 0.22rem 0;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-log-list li.fresh { color: var(--fg); }
.hud-log-list li.alert { color: var(--accent); }
.hud-log-list li .t { color: var(--fg-dim); margin-right: 0.6em; }

.hud-tele {
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  width: min(300px, 32vw);
}
.hud-tele-list { display: grid; }
.hud-tele-list > div {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.hud-tele-list > div:last-child { border-bottom: 0; }
.hud-tele-list dt { color: var(--fg-dim); }
.hud-tele-list dd { color: var(--fg); }

.hud-track {
  display: grid;
  gap: 0.3rem;
  padding: 0.8rem 0.9rem;
}
.hud-track-node { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0; }
.hud-track-coord { color: var(--fg-dim); }
.hud-track-class { color: var(--green); }
.hud-track.alert .hud-track-class { color: var(--accent); }
.hud-track.alert .hud-track-node { color: var(--accent); }

.hud-reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(234, 234, 234, 0.18);
}
.ret-line { position: absolute; background: rgba(255, 42, 42, 0.55); }
.ret-h { left: -18px; right: -18px; top: 50%; height: 1px; }
.ret-v { top: -18px; bottom: -18px; left: 50%; width: 1px; }

.hud-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.92);
  overflow: hidden;
  padding: 0.55rem 0;
  font-size: 0.65rem;
  color: var(--fg-dim);
}
.hud-ticker-inner {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: ticker 28s linear infinite;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ─── hero metrics strip (euveka-style quantified hero) ─── */
.hero-metrics {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 62rem;
}
.metric {
  background: rgba(10, 10, 10, 0.78);
  padding: 1rem 1.1rem 1.2rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}
.metric-num {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.metric-num .unit { font-size: 0.5em; color: var(--accent); }
.metric-label { font-size: 0.58rem; color: var(--fg-dim); line-height: 1.55; }
.hero-hint { margin-top: 1.1rem; font-size: 0.6rem; color: var(--fg-dim); }

/* ═══════════════════════════════════════════
   EDGE AI SECTION
   ═══════════════════════════════════════════ */
.edge-scale {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 72ch);
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.88);
  padding: 2rem 2.2rem;
}
.edge-scale-copy h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
}
.edge-scale-copy p { color: var(--fg-dim); font-size: 0.72rem; line-height: 1.6; }

/* ─── capabilities ─── */
.panel-caps {
  padding-top: 10rem;
  padding-bottom: 8rem;
  background: rgba(10, 10, 10, 0.93);
  border-top: 1px solid var(--line);
}

.caps-grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cap {
  background: var(--bg);
  padding: 2rem 1.6rem 2.6rem;
  position: relative;
  transition: background 0.15s;
}
.cap:hover { background: var(--bg-raise); }
.cap-id { font-size: 0.62rem; color: var(--accent); display: block; margin-bottom: 2.2rem; }
.cap h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.cap p { color: var(--fg-dim); font-size: 0.7rem; line-height: 1.55; }
.cap-accent { outline: 1px solid var(--accent); outline-offset: -1px; }
.cap-accent .cap-id::after { content: " ● PRIORITY"; }

.caps-lede { max-width: 62ch; margin-top: 3rem; }
.cap-truth {
  display: block;
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.6rem;
  line-height: 1.6;
  color: var(--green);
}

/* ═══════════════════════════════════════════
   SHARED — thesis punchline bands
   ═══════════════════════════════════════════ */
.green { color: var(--green); }

.thesis-band {
  margin-top: 3rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: rgba(10, 10, 10, 0.88);
  padding: 1.6rem 2rem;
}
.thesis-band p {
  max-width: 78ch;
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--fg);
}
.thesis-band-green { border-left-color: var(--green); }

/* ═══════════════════════════════════════════
   ORBIT CHAPTERS — the globe is the pinned centerpiece;
   story cards alternate around it (euveka pattern)
   ═══════════════════════════════════════════ */
.chapter {
  background: transparent;
  border-top: 0;
  padding-top: 0;
  padding-bottom: 12vh;
  position: relative;
  z-index: 10;
  pointer-events: none;
}
.chapter a,
.chapter button,
.chapter .orbit-card,
.chapter .chapter-wide { pointer-events: auto; }

/* full-viewport chapter intro with ghost numeral */
.chapter-head {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 6rem 0 2rem;
}
.chapter-ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: clamp(11rem, 40vw, 32rem);
  line-height: 1;
  color: rgba(255, 42, 42, 0.04);
  -webkit-text-stroke: 1px rgba(255, 42, 42, 0.32);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
.chapter-lede {
  max-width: 54ch;
  margin: 2.2rem auto 0;
  background: rgba(10, 10, 10, 0.6);
  padding: 0.7rem 1.1rem;
}
.chapter-cue {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  color: var(--fg-dim);
}
.chapter-cue-bar {
  width: 1px;
  height: 48px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.chapter-cue-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(-100%);
  animation: cue-drop 2s ease-in-out infinite;
}
@keyframes cue-drop { to { transform: translateY(100%); } }

/* the flow: a center spine, cards alternating left / right of the globe */
.orbit-flow {
  position: relative;
  display: grid;
  row-gap: 24vh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 4vh 0 10vh;
}
.orbit-flow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 14px);
}
.orbit-card {
  position: relative;
  width: min(48ch, 100%);
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--line);
  padding: 1.8rem 1.7rem 2rem;
  backdrop-filter: blur(3px);
  transition: border-color 0.2s, background 0.2s;
}
.orbit-card:hover { background: rgba(18, 18, 18, 0.92); border-color: var(--fg-dim); }
.orbit-flow > .orbit-card:nth-child(odd) { justify-self: start; }
.orbit-flow > .orbit-card:nth-child(even) { justify-self: end; }
/* tick connecting each card back to the spine / globe */
.orbit-card::after {
  content: "";
  position: absolute;
  top: 2.1rem;
  width: 3.2rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.orbit-flow > .orbit-card:nth-child(odd)::after { left: 100%; }
.orbit-flow > .orbit-card:nth-child(even)::after { right: 100%; }

/* wide interludes inside a chapter */
.chapter-wide {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════
   02 / INVENTORY — five layers, now orbit cards
   ═══════════════════════════════════════════ */
.layer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
.layer-id { display: flex; flex-direction: row; align-items: center; gap: 1rem; }
.layer-no { font-size: 0.62rem; color: var(--fg-dim); }
.layer-no::before { content: "/// "; }
.layer-physics {
  font-size: 0.6rem;
  color: var(--green);
  border: 1px solid var(--line);
  padding: 0.3rem 0.5rem;
  align-self: start;
}
.layer-body h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
}
.layer-tag { font-family: var(--mono); font-size: 0.6rem; color: var(--accent); letter-spacing: 0.08em; }
.layer-body p { color: var(--fg-dim); font-size: 0.68rem; line-height: 1.6; }
.layer-io {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  font-size: 0.6rem;
  color: var(--fg);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.layer-io li::before { content: "▸ "; color: var(--accent); }

/* ═══════════════════════════════════════════
   03 / THE FABRIC — four properties of one platform
   ═══════════════════════════════════════════ */
.fabric-card {
  display: grid;
  align-content: start;
}
.fabric-no { font-size: 0.62rem; color: var(--accent); display: block; margin-bottom: 1.8rem; }
.fabric-no::before { content: "/// "; color: var(--fg-dim); }
.fabric-card h3 {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.fabric-card p { color: var(--fg-dim); font-size: 0.68rem; line-height: 1.6; margin-bottom: 1.4rem; }
.fabric-io {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.6rem;
  color: var(--fg);
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: auto;
}
.fabric-io li::before { content: "▸ "; color: var(--green); }
.fabric-card-accent { outline: 1px solid var(--accent); outline-offset: -1px; }

/* ═══════════════════════════════════════════
   04 / AI STACK — five jobs, spec-sheet rows
   ═══════════════════════════════════════════ */
.job {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: start;
}
.job-no { font-size: 0.62rem; color: var(--fg-dim); }
.job-body h3 {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}
.job-flag { font-family: var(--mono); font-size: 0.6rem; color: var(--accent); letter-spacing: 0.08em; }
.job-body p { color: var(--fg-dim); font-size: 0.68rem; line-height: 1.6; }
.job-where {
  font-size: 0.6rem;
  color: var(--green);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  justify-self: stretch;
}
.job-accent { outline: 1px solid var(--accent); outline-offset: -1px; }

.jobs-plus {
  margin-top: 1.4rem;
  border: 1px dashed var(--line);
  background: rgba(10, 10, 10, 0.85);
  padding: 1.2rem 1.5rem 1.4rem;
}
.jobs-plus-head { display: block; font-size: 0.62rem; color: var(--fg-dim); margin-bottom: 0.9rem; }
.jobs-plus-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.jobs-plus-row p { font-size: 0.66rem; line-height: 1.65; color: var(--fg-dim); }
.jobs-plus-row strong { color: var(--fg); }

/* ─── 05 / MISSIONS — weak signal chains ─── */
.cap-signals {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  font-size: 0.62rem;
  line-height: 1.55;
  color: var(--fg-dim);
}
.sig-src {
  display: inline-block;
  min-width: 6ch;
  margin-right: 0.5em;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 0.56rem;
  text-align: center;
}
.cap p.cap-verdict {
  border-top: 1px solid var(--accent);
  padding-top: 0.9rem;
  color: var(--fg);
}

/* ═══════════════════════════════════════════
   06 / ARCHITECTURE — four-tier ladder
   ═══════════════════════════════════════════ */
.panel-tiers {
  padding-top: 9rem;
  padding-bottom: 7rem;
  background: rgba(10, 10, 10, 0.93);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.tiers-lede { max-width: 62ch; margin-top: 3rem; }

.tiers {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.6rem;
  align-items: stretch;
}
.tiers-flow {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.6rem;
  padding: 0.4rem 0;
}
.tiers-flow span:nth-child(2) { writing-mode: vertical-rl; letter-spacing: 0.25em; }
.tiers-flow-up { color: var(--accent); }
.tiers-flow-up span:nth-child(2) { transform: rotate(180deg); }
.tiers-flow-down { color: var(--green); }

.tier-stack {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.tier {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 220px;
  gap: 2rem;
  align-items: center;
  background: var(--bg);
  padding: 1.4rem 1.5rem;
  transition: background 0.15s;
}
.tier:hover { background: var(--bg-raise); }
.tier-no { font-family: var(--display); font-size: 1.1rem; color: var(--fg-dim); letter-spacing: 0; }
.tier-body h3 {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
}
.tier-body p { color: var(--fg-dim); font-size: 0.66rem; line-height: 1.6; }
.tier-scope {
  font-size: 0.6rem;
  color: var(--green);
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
}
.tier-accent { outline: 1px solid var(--accent); outline-offset: -1px; }
.tier-accent .tier-no { color: var(--accent); }

/* ═══════════════════════════════════════════
   07 / TRUST — governance grid
   ═══════════════════════════════════════════ */
.panel-trust {
  padding-top: 9rem;
  padding-bottom: 8rem;
  background: rgba(10, 10, 10, 0.93);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.trust-lede { max-width: 62ch; margin-top: 3rem; }

.trust-grid {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.trust-card {
  background: var(--bg);
  padding: 1.8rem 1.5rem 2.2rem;
  transition: background 0.15s;
}
.trust-card:hover { background: var(--bg-raise); }
.trust-no { font-size: 0.62rem; color: var(--green); display: block; margin-bottom: 1.8rem; }
.trust-no::before { content: "/// "; color: var(--fg-dim); }
.trust-card h3 {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}
.trust-card p { color: var(--fg-dim); font-size: 0.66rem; line-height: 1.6; }
.trust-card em { font-style: normal; color: var(--fg); }
.trust-card-accent { outline: 1px solid var(--accent); outline-offset: -1px; }
.trust-card-accent .trust-no { color: var(--accent); }
.trust-card-accent p { color: var(--fg); }

/* ─── stat band ─── */
.panel-band {
  padding: 0;
  border-top: 2px solid var(--fg);
  border-bottom: 2px solid var(--fg);
  background: var(--accent);
  color: #0a0a0a;
}
.band-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.band-cell {
  padding: 2.4rem 2rem;
  border-right: 1px solid rgba(10, 10, 10, 0.35);
  display: grid;
  gap: 0.4rem;
}
.band-cell:last-child { border-right: 0; }
.band-num { font-family: var(--display); font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 0.9; letter-spacing: -0.03em; }
.band-num sup { font-size: 0.45em; }
.band-label { font-size: 0.65rem; }

/* ─── contact ─── */
.panel-contact {
  min-height: 90vh;
  display: grid;
  align-content: center;
  justify-items: start;
  background: rgba(10, 10, 10, 0.9);
}
.contact-title {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: 3rem;
}
.contact-lede { max-width: 66ch; font-size: 0.72rem; line-height: 1.75; color: var(--fg-dim); }
.contact-meta { margin-top: 2rem; color: var(--fg-dim); font-size: 0.65rem; }

/* ─── footer ─── */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 4vw;
  background: var(--bg);
  position: relative;
  z-index: 10;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.62rem;
  color: var(--fg-dim);
}

/* ═══════════════════════════════════════════
   SUPERADMIN / SENTRY CONSOLE
   ═══════════════════════════════════════════ */
.sentry-trigger {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  width: 22px; height: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.sentry-trigger:hover { color: var(--accent); border-color: var(--accent); }

.sentry {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}
.sentry[hidden] { display: none; }
.sentry-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(3px);
}
.sentry-modal {
  position: relative;
  width: min(980px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 42, 42, 0.15), 0 30px 90px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  animation: sentry-in 0.25s ease-out;
}
@keyframes sentry-in { from { opacity: 0; transform: scale(0.97); } }
.sentry-scan {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.14) 3px, rgba(0,0,0,0.14) 4px);
}

/* gate */
.sentry-gate { padding: 4rem 2rem; display: grid; place-items: center; position: relative; z-index: 4; }
.sentry-gate[hidden] { display: none; }
.sentry-gate-inner { text-align: center; width: min(380px, 84vw); }
.sentry-gate-mark { font-size: 2.4rem; color: var(--accent); margin-bottom: 1rem; }
.sentry-gate h2 { font-family: var(--display); font-size: 1.8rem; letter-spacing: -0.02em; }
.sentry-gate-sub { color: var(--fg-dim); font-size: 0.65rem; margin: 0.5rem 0 2rem; }
#sentry-form { display: flex; flex-direction: column; gap: 0.6rem; }
#sentry-pass {
  background: var(--bg-raise); border: 1px solid var(--line); color: var(--fg);
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.15em;
  padding: 0.8rem 1rem; text-align: center; text-transform: uppercase;
}
#sentry-pass:focus { outline: none; border-color: var(--accent); }
#sentry-form button {
  background: var(--accent); border: 0; color: #0a0a0a;
  font-family: var(--mono); font-weight: 700; letter-spacing: 0.1em;
  padding: 0.8rem; cursor: pointer; text-transform: uppercase;
}
#sentry-form button:hover { background: var(--fg); }
.sentry-gate-err { color: var(--accent); font-size: 0.65rem; margin-top: 1rem; min-height: 1em; }

/* dashboard */
.sentry-dash { display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 4; }
.sentry-dash[hidden] { display: none; }
.sentry-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--accent);
  background: var(--bg-raise);
}
.sentry-head-l, .sentry-head-r { display: flex; align-items: center; gap: 1rem; }
.sentry-badge { color: var(--accent); font-weight: 700; }
.sentry-head-title { font-family: var(--display); font-size: 0.95rem; letter-spacing: 0; }
.sentry-x {
  background: transparent; border: 1px solid var(--line); color: var(--fg-dim);
  width: 26px; height: 26px; cursor: pointer; font-size: 0.8rem;
}
.sentry-x:hover { color: var(--accent); border-color: var(--accent); }

.sentry-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  gap: 1px;
  background: var(--line);
  overflow-y: auto;
  min-height: 0;
}
.sentry-card { background: var(--bg); padding: 0.9rem 1rem 1.1rem; }
.sentry-card-head {
  color: var(--fg-dim); font-size: 0.62rem; margin-bottom: 0.9rem;
  display: flex; justify-content: space-between; align-items: center;
}

.sentry-vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sentry-vitals > div { background: var(--bg); padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sentry-vitals dt { color: var(--fg-dim); font-size: 0.58rem; }
.sentry-vitals dd { font-family: var(--display); font-size: 1.05rem; letter-spacing: 0; }

/* log */
.sentry-clear { background: transparent; border: 1px solid var(--line); color: var(--fg-dim); font-family: var(--mono); font-size: 0.55rem; padding: 0.15rem 0.5rem; cursor: pointer; }
.sentry-clear:hover { color: var(--accent); border-color: var(--accent); }
.sentry-log { list-style: none; margin: 0; padding: 0; max-height: 170px; overflow-y: auto; }
.sentry-log li { font-size: 0.62rem; line-height: 1.5; color: var(--fg-dim); border-bottom: 1px solid rgba(42,42,42,0.4); padding: 0.15rem 0; }
.sentry-log li .t { color: var(--fg-dim); margin-right: 0.6em; }
.sentry-log li.lg-error { color: var(--accent); }
.sentry-log li.lg-warn { color: #ffb800; }
.sentry-log li.lg-admin { color: var(--fg); }
.sentry-log li.lg-net { color: var(--fg-dim); }

@media (max-width: 760px) {
  .sentry-grid { grid-template-columns: 1fr; }
}

/* ─── scroll reveals (progressive enhancement) ─── */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(48px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes orbit-in-l {
    from { opacity: 0; transform: translate(-56px, 40px); }
    to { opacity: 1; transform: translate(0, 0); }
  }
  @keyframes orbit-in-r {
    from { opacity: 0; transform: translate(56px, 40px); }
    to { opacity: 1; transform: translate(0, 0); }
  }
  /* note: not applied to .stat — sticky content never progresses a view() timeline */
  .cap, .band-cell, .contact-title,
  .tier, .trust-card, .thesis-band,
  .chapter-head .section-title, .chapter-lede {
    animation: rise-in linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 45%;
  }
  /* orbit cards enter from their own side of the spine */
  .orbit-flow > .orbit-card {
    animation: orbit-in-l linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 45%;
  }
  .orbit-flow > .orbit-card:nth-child(even) { animation-name: orbit-in-r; }
}

@media (prefers-reduced-motion: reduce) {
  .cap, .band-cell, .contact-title,
  .layer, .fabric-card, .job, .tier, .trust-card, .thesis-band,
  .orbit-card, .chapter-head .section-title, .chapter-lede,
  .chapter-cue-bar::after,
  .noise, .hero-scroll-bar::after, .hud-ticker-inner { animation: none; }
  html { scroll-behavior: auto; }
}

/* ─── responsive ─── */
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-nav { display: none; }
  .hero-sub { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .aperture-sticky { grid-template-columns: 1fr; gap: 2.5rem; }
  .caps-grid { grid-template-columns: 1fr; }
  .band-row { grid-template-columns: 1fr 1fr; }
  .band-cell:nth-child(2) { border-right: 0; }
  .band-cell:nth-child(1), .band-cell:nth-child(2) { border-bottom: 1px solid rgba(10,10,10,0.35); }
  .hud-log { width: calc(100vw - 4rem); bottom: 4.5rem; }
  .hud-tele { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .hero-metrics { grid-template-columns: 1fr; }
  .edge-scale { grid-template-columns: 1fr; }

  /* orbit chapters collapse to a single left-spine rail */
  .orbit-flow { row-gap: 12vh; }
  .orbit-flow::before { left: 0; }
  .orbit-flow > .orbit-card,
  .orbit-flow > .orbit-card:nth-child(even) { justify-self: stretch; width: 100%; }
  .orbit-card::after { display: none; }
  .chapter-head { min-height: 78vh; }
  .jobs-plus-row { grid-template-columns: 1fr; gap: 1rem; }
  .tiers { grid-template-columns: 1fr; gap: 1rem; }
  .tiers-flow { flex-direction: row; padding: 0; }
  .tiers-flow span:nth-child(2) { writing-mode: horizontal-tb; transform: none; letter-spacing: 0.15em; }
  .tier { grid-template-columns: 1fr; gap: 1rem; }
  .tier-scope { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 0.9rem; }
  .trust-grid { grid-template-columns: 1fr; }
}
