/* Situation room: the look of the Learning Center and its entry pages, loaded after styles.css
   (and after pages.css on the entry pages), so it only overrides.
   Dark is the floor of an operations room: graphite, warm white ink, one amber signal color.
   Light is the same room on paper: sand stock, black ink, a dark amber.
   Shape: hairline rules and square corners instead of rounded, shadowed cards.
   Type: Barlow Condensed for headings and labels, IBM Plex Sans for reading, IBM Plex Mono for
   figures, ids and dates. Green, amber and red still mean state and nothing else. */
:root {
  --navy-950: #0b0c0e;
  --navy-900: #111316;
  --navy-800: #191c20;
  --navy-line: #2c3037;
  --on-navy: #f0ece2;
  --on-navy-muted: #a39e92;
  --on-navy-soft: #c9c4b8;
  --cyan: #f2a900;
  --cyan-soft: #ffd166;
  --glow: linear-gradient(180deg, #f7b51d 0%, #f2a900 100%);
  --glow-text: linear-gradient(90deg, #ffd166 0%, #f2a900 100%);
  --on-glow: #171204;
  --glass: rgba(17, 19, 22, 0.72);
  --glass-line: rgba(242, 169, 0, 0.28);

  --bg: #f1ede3;
  --surface: #faf7ef;
  --surface-2: #e9e4d7;
  --border: #cbc4b2;
  --text: #191713;
  --muted: #5a554a;
  --accent: #7d5200;
  --accent-soft: #f1e3bf;
  --on-accent: #ffffff;
  --primary: linear-gradient(180deg, #23201a 0%, #191713 100%);
  --on-primary: #faf7ef;

  --good: #1d6b3a;
  --good-soft: #dcecd9;
  --warn: #9a4a06;
  --warn-soft: #f6e6c4;
  --bad: #b3261e;
  --bad-soft: #f6dcd6;
  --crit: #8a1a14;
  --info: #24487e;
  --info-soft: #dde4ef;
  --neutral-soft: #e6e1d4;
  --shadow: none;
  --shadow-lg: 0 24px 48px -28px rgba(25, 23, 19, 0.45);

  --radius: 2px;
  --font-display: "Barlow Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --field-border: #857d6b;
  --map-land: #d9d2c0; --map-mark: #7d5200;
  --lvl-moderate: #a16207; --lvl-elevated: #c2410c;
  --sr-signal: #b97800;      /* the one signal color, for marks drawn on a canvas */
  --sr-ink: #191713;
  --sr-dim: rgba(25, 23, 19, 0.34);
  --sr-grid: rgba(25, 23, 19, 0.12);
  --sr-hot: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0e10; --surface: #141619; --surface-2: #1a1d21; --border: #2b2f36; --text: #ebe7dc; --muted: #a09b8f;
    --accent: #f2a900; --accent-soft: #2b2208; --on-accent: #171204;
    --primary: linear-gradient(180deg, #f7b51d 0%, #f2a900 100%); --on-primary: #171204;
    --good: #5fd08a; --good-soft: #12261a; --warn: #f5b942; --warn-soft: #2e230a; --bad: #ff7a6b; --bad-soft: #351512;
    --crit: #ffa79c; --info: #9bbcf0; --info-soft: #16233a; --neutral-soft: #1d2025;
    --shadow: none; --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, 0.8);
    --field-border: #5d6470;
    --map-land: #23272d; --map-mark: #f2a900;
    --lvl-moderate: #f5c542; --lvl-elevated: #fb923c;
    --sr-signal: #f2a900; --sr-ink: #ebe7dc; --sr-dim: rgba(235, 231, 220, 0.34); --sr-grid: rgba(235, 231, 220, 0.1); --sr-hot: #ff7a6b;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0e10; --surface: #141619; --surface-2: #1a1d21; --border: #2b2f36; --text: #ebe7dc; --muted: #a09b8f;
  --accent: #f2a900; --accent-soft: #2b2208; --on-accent: #171204;
  --primary: linear-gradient(180deg, #f7b51d 0%, #f2a900 100%); --on-primary: #171204;
  --good: #5fd08a; --good-soft: #12261a; --warn: #f5b942; --warn-soft: #2e230a; --bad: #ff7a6b; --bad-soft: #351512;
  --crit: #ffa79c; --info: #9bbcf0; --info-soft: #16233a; --neutral-soft: #1d2025;
  --shadow: none; --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, 0.8);
  --field-border: #5d6470;
  --map-land: #23272d; --map-mark: #f2a900;
  --lvl-moderate: #f5c542; --lvl-elevated: #fb923c;
  --sr-signal: #f2a900; --sr-ink: #ebe7dc; --sr-dim: rgba(235, 231, 220, 0.34); --sr-grid: rgba(235, 231, 220, 0.1); --sr-hot: #ff7a6b;
}

/* the room itself: a faint survey grid on the floor, fixed, so pages scroll over it */
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--sr-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--sr-grid) 1px, transparent 1px);
  background-size: 96px 96px;
  background-attachment: fixed;
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* type: condensed, upper-case labels; headings set tight and heavy */
h1, h2, h3, .front-title { font-family: var(--font-display); letter-spacing: 0.005em; text-wrap: balance; }
h1, .front-title { font-weight: 700; text-transform: uppercase; line-height: 0.98; }
h2 { font-weight: 600; }
h3, h4 { font-weight: 600; letter-spacing: 0.01em; }
.eyebrow, .learn-nav-group > summary, .learn-nav-title, .chip, .badge, .pg-kicker, th {
  font-family: var(--font-display); letter-spacing: 0.09em; text-transform: uppercase;
}
.mono, code, kbd, time, .threat-score, .count, .learn-nav .n { font-family: var(--font-mono); }

/* shape: square corners, hairlines, no lift. A card is a ruled panel with a signal tick top-left */
.card, .entry, details.card, .pg-door, .pg-card, dialog, .learn-search, select, input, textarea, .btn, button, .chip, .badge, kbd {
  border-radius: var(--radius) !important;
}
.card, .pg-door, .pg-card {
  box-shadow: none; border: 1px solid var(--border); position: relative;
  background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat;
  background-size: 28px 2px; background-position: 0 0;
}
.card .card { background-image: none; }
a { text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* the top bar: a console strip with a signal line under it */
.learn-top-bar, .pg-top, header.top, .site-top { border-bottom: 1px solid var(--cyan); }

/* the front of the center: the headline on the left, the live globe on the right */
.learn-intro.front { position: relative; }
.sr-front { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 36%); gap: 1.5rem; align-items: center; }
.sr-front-copy { min-width: 0; }
.learn-intro.front .front-title { font-size: clamp(2.2rem, 4vw, 3.5rem); margin-bottom: 0.6rem; }
.learn-intro.front .front-title::before {
  content: "LIVE BRIEFING"; display: block; font: 600 0.8rem/1 var(--font-display); letter-spacing: 0.22em;
  color: var(--accent); margin-bottom: 0.7rem; padding-left: 1.1rem;
  background: radial-gradient(circle at 0.3rem 50%, var(--bad) 0.28rem, transparent 0.3rem) no-repeat;
}
.sr-globe { position: relative; aspect-ratio: 1; width: 100%; max-width: 30rem; justify-self: end; }
.sr-globe canvas, .sr-stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.sr-globe canvas:active, .sr-stage canvas:active { cursor: grabbing; }
.sr-readout {
  position: absolute; left: 0; bottom: 0; font: 500 0.72rem/1.35 var(--font-mono); color: var(--muted);
  border-left: 2px solid var(--accent); padding-left: 0.5rem; max-width: 80%; pointer-events: none;
}
.sr-readout strong { display: block; color: var(--text); font-weight: 600; }
.sr-readout a { pointer-events: auto; }
.sr-globe-links { position: absolute; right: 0; top: 0; font: 600 0.7rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; }
@media (max-width: 860px) {
  .sr-front { grid-template-columns: 1fr; }
  .sr-globe { justify-self: center; max-width: 22rem; }
}

/* a 3D figure: the scene, its caption, and the step controls under it */
.sr-stage {
  position: relative; border: 1px solid var(--border); background: var(--surface); margin: 0.9rem 0 1.1rem;
  background-image: linear-gradient(var(--sr-grid) 1px, transparent 1px), linear-gradient(90deg, var(--sr-grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.sr-stage .sr-view { height: clamp(15rem, 38vw, 24rem); }
.sr-stage.slim .sr-view { height: clamp(13rem, 30vw, 18rem); }
.sr-stage-head {
  display: flex; align-items: baseline; gap: 0.75rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border);
  font: 600 0.78rem/1.2 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.sr-stage-head b { color: var(--accent); font-weight: 600; }
.sr-stage-head span:last-child { margin-left: auto; font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0; text-transform: none; }
.sr-step {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center;
  padding: 0.6rem 0.75rem; border-top: 1px solid var(--border);
}
.sr-step p { margin: 0; font-size: 0.92rem; min-height: 2.6em; }
.sr-step .sr-n { font: 600 0.72rem/1 var(--font-mono); color: var(--accent); white-space: nowrap; }
.sr-step .sr-btns { display: flex; gap: 0.35rem; }
.sr-step button {
  font: 600 0.75rem/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  padding: 0.5rem 0.7rem; min-height: 2.25rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
}
.sr-step button:hover { border-color: var(--accent); color: var(--accent); }
.sr-step button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (max-width: 640px) { .sr-step { grid-template-columns: 1fr; } }

/* the 3D threat dial sits in the readout rail under the headline */
.sr-rail { display: flex; flex-wrap: wrap; gap: 0; margin: 0.9rem 0 1rem; border: 1px solid var(--border); background: var(--surface); }
.sr-rail > * { padding: 0.55rem 0.9rem; border-right: 1px solid var(--border); min-width: 5.5rem; }
.sr-rail > *:last-child { border-right: 0; }
.sr-rail .v { display: block; font: 600 1.5rem/1 var(--font-mono); color: var(--text); }
.sr-rail .k { display: block; margin-top: 0.3rem; font: 600 0.68rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sr-rail a { color: inherit; text-decoration: none; }
.sr-rail a:hover .v { color: var(--accent); }
.sr-rail .sr-dial { display: flex; align-items: center; gap: 0.6rem; padding: 0.2rem 0.9rem 0.2rem 0.3rem; cursor: pointer; background: none; border: 0; border-right: 1px solid var(--border); color: inherit; text-align: left; }
.sr-rail .sr-dial canvas { width: 5.6rem; height: 3.6rem; display: block; }
.sr-rail .sr-dial .v { font-size: 1.5rem; }

/* depth for the tiles that carry a number: they tilt toward the pointer, a few degrees */
.sr-tilt { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.18s ease-out; transform-style: preserve-3d; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .sr-tilt { transform: none !important; transition: none; } }

/* the entry pages' way back to the center, and the last of the old green on a button */
.pg-open, .btn.glow { background: var(--cyan) !important; color: var(--on-glow) !important; border-color: var(--cyan) !important; }
.lab-trial.beta { color: var(--cyan-soft); border-color: var(--glass-line); background: transparent; }

/* ---- one desk for the news and the incident files: the same card, the same order of facts */
.sr-desk { display: flex; align-items: stretch; border: 1px solid var(--border); background: var(--surface); margin: 0 0 1rem; }
.sr-desk a { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.7rem 1.1rem; min-height: 2.75rem; text-decoration: none; color: var(--muted);
  font: 600 0.85rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; border-right: 1px solid var(--border); }
.sr-desk a b { font: 600 1.05rem/1 var(--font-mono); letter-spacing: 0; color: var(--text); }
.sr-desk a:hover { color: var(--text); }
.sr-desk a[aria-current="page"] { color: var(--on-accent); background: var(--accent); }
.sr-desk a[aria-current="page"] b { color: var(--on-accent); }
.sr-desk span { margin-left: auto; align-self: center; padding: 0 1rem; font: 500 0.72rem/1.3 var(--font-mono); color: var(--muted); }
@media (max-width: 720px) { .sr-desk span { display: none; } .sr-desk a { flex: 1; justify-content: center; } }

.entry.story, details.entry.incident { --sr-rail: var(--accent); border-left: 3px solid var(--sr-rail); background-image: none; padding-top: 0; overflow: hidden; }
.entry.incident.sev-CRITICAL { --sr-rail: var(--crit); } .entry.incident.sev-HIGH { --sr-rail: var(--bad); }
.entry.incident.sev-MEDIUM { --sr-rail: var(--warn); } .entry.incident.sev-LOW { --sr-rail: var(--good); }
.entry.story.kind-incident { --sr-rail: var(--bad); } .entry.story.kind-policy { --sr-rail: var(--info); }
.entry.story.kind-research { --sr-rail: var(--accent); } .entry.story.kind-product, .entry.story.kind-analysis { --sr-rail: var(--muted); }
.sr-file { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; margin: 0 -1.25rem 0.8rem; padding: 0.45rem 1.25rem; border-bottom: 1px solid var(--border);
  background: var(--surface-2); font: 600 0.7rem/1.2 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sr-file b { color: var(--sr-rail); font-weight: 700; }
.sr-file a { margin-left: auto; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.entry.story .incident-title, details.entry.incident .incident-title { display: block; font: 600 1.35rem/1.2 var(--font-display); letter-spacing: 0.005em; margin-top: 0.35rem; }
.entry.story .callout { background: none; border: 0; border-left: 2px solid var(--accent); border-radius: 0; padding: 0.1rem 0 0.1rem 0.8rem; }
.entry .entry-tools .btn:first-child { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.entry .entry-tools .btn:first-child::before { content: ""; display: inline-block; margin-right: 0.5rem; border: 0.36em solid transparent; border-left: 0.6em solid currentColor; border-right: 0; vertical-align: -0.05em; }

/* the opened file: every part in a ruled box of its own, named in the margin, arriving in order */
.sr-sec { border: 1px solid var(--border); border-top: 2px solid var(--sr-tone, var(--border)); padding: 0.7rem 0.85rem 0.8rem; margin: 0 0 0.75rem; background: var(--surface-2); }
.sr-sec > h4 { margin: 0 0 0.45rem; font: 700 0.72rem/1.2 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sr-tone, var(--muted)); }
.sr-sec > h4::before { content: attr(data-n); margin-right: 0.6rem; font-family: var(--font-mono); letter-spacing: 0; opacity: 0.75; }
.sr-sec.how { --sr-tone: var(--accent); } .sr-sec.impact { --sr-tone: var(--bad); } .sr-sec.fix { --sr-tone: var(--good); } .sr-sec.lessons { --sr-tone: var(--info); }
.sr-sec.lessons ul { list-style: none; padding-left: 0; }
.sr-sec.lessons li { padding-left: 1.4rem; position: relative; }
.sr-sec.lessons li::before { content: ""; position: absolute; left: 0.1rem; top: 0.45em; width: 0.7rem; height: 0.35rem; border-left: 2px solid var(--info); border-bottom: 2px solid var(--info); transform: rotate(-45deg); }
@media (prefers-reduced-motion: no-preference) {
  details.incident[open] .sr-sec { animation: sr-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .sr-in { animation: sr-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .entry:has(.badge.new) .sr-file { background-image: linear-gradient(100deg, transparent 0%, transparent 40%, color-mix(in srgb, var(--accent) 35%, transparent) 50%, transparent 60%); background-size: 250% 100%; animation: sr-sweep 3.2s ease-in-out infinite; }
}
@keyframes sr-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sr-sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ---- mission control in the room's colors, with a scan line and a 3D field of the last weeks */
.mc { --bg: #0b0c0e; --surface: #131518; --surface-2: #191c20; --border: rgba(242, 169, 0, 0.22); --text: #ebe7dc; --muted: #a09b8f;
  --accent: #f2a900; --on-accent: #171204; --accent-soft: rgba(242, 169, 0, 0.12); --hud: #f2a900; --neutral-soft: #1d2025;
  background: radial-gradient(ellipse at 45% 45%, #17191d 0%, #0d0e10 55%, #060607 100%) !important; scrollbar-color: rgba(242, 169, 0, 0.35) transparent; }
.mc::before { background-image: linear-gradient(rgba(235, 231, 220, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(235, 231, 220, 0.05) 1px, transparent 1px) !important; }
.mc a { color: #ffd166 !important; }
.mc-top { background: rgba(11, 12, 14, 0.92) !important; }
.mc-brand strong, .mc-ct, .mc-num { color: #f5f1e6 !important; }
.mc-num { text-shadow: none !important; font-family: var(--font-mono); }
.mc-clock.utc .mc-ck { color: #ff7a6b !important; }
.mc-panel { border-radius: 0 !important; background: linear-gradient(180deg, rgba(25, 28, 32, 0.86), rgba(13, 14, 16, 0.86)) !important; box-shadow: none !important; overflow: hidden; }
.mc-panel::before { border-top-left-radius: 0 !important; } .mc-panel::after { border-bottom-right-radius: 0 !important; }
.mc-stat { border-radius: 0 !important; background: rgba(242, 169, 0, 0.05) !important; border-color: rgba(242, 169, 0, 0.16) !important; }
.mc-h, .mc-k { font-family: var(--font-display) !important; font-size: 0.8rem !important; }
.sr-scan { position: absolute; left: 0; right: 0; top: 0; height: 30%; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(242, 169, 0, 0.07) 85%, rgba(242, 169, 0, 0.3)); border-bottom: 1px solid rgba(242, 169, 0, 0.5); opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .sr-scan { animation: sr-scan 7s linear infinite; animation-delay: var(--d, 0s); } }
@keyframes sr-scan { 0% { transform: translateY(-100%); opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { transform: translateY(340%); opacity: 0; } }
.sr-field { margin-top: 0.8rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.sr-field canvas { display: block; width: 100%; height: 11.5rem; cursor: grab; touch-action: pan-y; }
.sr-field p { margin: 0.2rem 0 0; font: 500 0.7rem/1.4 var(--font-mono); color: var(--muted); }
.tile.sr-tilt .num { font-family: var(--font-mono); }
