:root {
  --bg: #07090c;
  --surface: #111721;
  --surface-2: #182130;
  --line: #2a3444;
  --ink: #f3f5f0;
  --muted: #9ba5b1;
  --green: #5ee0ad;
  --blue: #65b8ff;
  --amber: #e7b84a;
  --red: #ff7482;
  --plum: #b99cff;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #080b10 0%, #07090c 42%, #0b0d10 100%); }
a { color: inherit; text-decoration: none; }

.hq-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 12, .94);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-sigil {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #425068;
  border-radius: 8px;
  color: var(--green);
  font: 900 12px var(--mono);
  background: #101721;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: .06em; }
.brand small { margin-top: 2px; color: var(--muted); font: 800 10px var(--mono); text-transform: uppercase; }

.topnav { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #0d1219; }
.topnav a { padding: 8px 11px; border-radius: 7px; color: #bac3cf; font-size: 12px; font-weight: 800; }
.topnav a:hover, .topnav a.active { background: #222c3c; color: #fff; }

.status-strip { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.pill { min-width: 68px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font: 900 10px var(--mono); text-align: center; text-transform: uppercase; }
.pill.ready { color: var(--green); border-color: rgba(94, 224, 173, .4); }
.pill.warn { color: var(--amber); border-color: rgba(231, 184, 74, .42); }
.pill.blocked { color: var(--red); border-color: rgba(255, 116, 130, .4); }
.pill.checking { color: var(--blue); }

.hq-shell { width: min(1480px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 72px; }

.command-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 14px;
  min-height: 520px;
}

.deck-copy, .house-monitor, .truth-row article, .station, .media-organ, .directory {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.deck-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
  background: linear-gradient(135deg, #111721, #0c1017 62%);
}
.eyebrow { margin: 0 0 12px; color: var(--green); font: 900 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 900px; margin-bottom: 16px; font-size: clamp(3rem, 6.5vw, 6.6rem); line-height: .9; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: clamp(1.8rem, 3.4vw, 3.4rem); line-height: .98; letter-spacing: 0; }
.deck-lead { max-width: 820px; color: #cbd3d9; font-size: 18px; line-height: 1.55; }
.command-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.action { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 12px 14px; border: 1px solid #394456; border-radius: 7px; background: #151d29; font-weight: 850; }
.action span { color: var(--blue); font: 900 11px var(--mono); }
.action.primary { border-color: rgba(94, 224, 173, .5); background: #102018; color: #eafff7; }
.action:hover, .station:hover, .directory-grid a:hover, .media-links a:hover { border-color: #667489; background: var(--surface-2); }

.house-monitor { position: relative; display: flex; flex-direction: column; padding: 22px; overflow: hidden; }
.monitor-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.monitor-head span { color: var(--muted); font: 900 10px var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.monitor-head b { color: var(--green); font: 900 11px var(--mono); text-align: right; }
.house-monitor dl { margin: 0; padding: 8px 0 18px; }
.house-monitor dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid #263142; }
.house-monitor dt { color: var(--muted); font-size: 12px; }
.house-monitor dd { margin: 0; color: #eff6fb; font: 800 12px var(--mono); text-align: right; overflow-wrap: anywhere; }
.house-monitor img { width: 100%; max-height: 150px; margin-top: auto; object-fit: cover; border: 1px solid #2c3849; border-radius: 8px; background: #0b0f15; image-rendering: auto; }

.truth-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.truth-row article { min-height: 150px; padding: 20px; }
.kicker { display: block; margin-bottom: 9px; color: var(--amber); font: 900 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.truth-row strong { display: block; margin-bottom: 8px; font-size: 19px; }
.truth-row p, .section-head p, .station strong, .media-organ p { color: var(--muted); line-height: 1.5; }

.section { margin-top: 46px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 16px; }
.section-head p { max-width: 560px; margin-bottom: 0; }
.spine-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.spine-step { min-height: 180px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #101721; }
.spine-step:hover { border-color: #667489; background: #151e2b; }
.step-no { display: block; color: var(--blue); font: 900 11px var(--mono); margin-bottom: 24px; }
.spine-step strong { display: block; margin-bottom: 10px; font-size: 20px; }
.spine-step p { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 0; }

.lane { display: grid; grid-template-columns: 180px 1fr; gap: 14px; margin-top: 14px; }
.lane h3 { margin: 0; padding-top: 18px; color: #dce5ed; font-size: 15px; }
.station-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.station { position: relative; min-height: 142px; padding: 18px; }
.station.primary { border-color: rgba(94, 224, 173, .45); }
.station span { display: block; margin-bottom: 10px; color: var(--amber); font: 900 10px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.station strong { display: block; max-width: 90%; font-size: 20px; color: var(--ink); }
.station em { position: absolute; left: 18px; bottom: 15px; color: var(--blue); font: 900 10px var(--mono); font-style: normal; text-transform: uppercase; }
.station em.ready { color: var(--green); }
.station em.blocked { color: var(--red); }
.station em.warn { color: var(--amber); }

.media-organ {
  display: grid;
  grid-template-columns: 1fr minmax(300px, .65fr);
  gap: 22px;
  align-items: center;
  margin-top: 46px;
  padding: 24px;
  border-color: rgba(101, 184, 255, .35);
}
.media-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-links a, .directory-grid a { min-height: 48px; display: flex; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #131a25; font-weight: 850; }

.directory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

@media (max-width: 1100px) {
  .hq-topbar { grid-template-columns: 1fr; }
  .topnav { justify-self: stretch; overflow-x: auto; }
  .status-strip { justify-content: flex-start; }
  .command-deck, .truth-row, .media-organ { grid-template-columns: 1fr; }
  .spine-grid, .directory-grid { grid-template-columns: repeat(2, 1fr); }
  .lane { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hq-shell { width: min(100% - 20px, 1480px); padding-top: 14px; }
  h1 { font-size: 3rem; }
  .deck-copy, .house-monitor { padding: 20px; }
  .station-grid, .spine-grid, .directory-grid, .media-links { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: 10px; }
  .house-monitor dl div { grid-template-columns: 1fr; }
  .house-monitor dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
