/* DTBrief v3 — "Signal Room" design system (Dec 4, 2026, fidelity pass).
   Reproduces the approved Signal Room mock-up: dark-first control-room
   design, viewer Dark/Light toggle (localStorage "dtb-theme", set before
   paint by the inline head script; wired by assets/v3.js).
   Signal Room colors live in --sr-* variables so they never collide with
   the per-page --paper/--ink variables inner pages still use.
   The shared header/footer blocks (tools/set-topnav.py, add-footer.py)
   and every homepage component below read these variables. */

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --sr-ink: #0A0F1E;
  --sr-ink2: #0E1528;
  --sr-ink3: #131C36;
  --sr-panel: #101830;
  --sr-panel2: #0C1327;
  --sr-line: rgba(0, 194, 255, .22);
  --sr-line-soft: rgba(237, 241, 248, .09);
  --sr-signal: #00C2FF;
  --sr-signal-deep: #0090C8;
  --sr-volt: #FFC800;
  --sr-volt-text: #FFC800;
  --sr-coral: #FF5A3C;
  --sr-air: #EDF1F8;
  --sr-air-dim: #A9B4CC;
  --sr-air-faint: #6E7B99;
  --sr-radius: 14px;
  --sr-on-signal: #0A0F1E;
  --sr-on-volt: #0A0F1E;
  --sr-status-bg: rgba(10, 15, 30, .92);
  --sr-grid-line: rgba(0, 194, 255, .028);
  --sr-wave-idle: rgba(237, 241, 248, .22);
  --sr-track-line: rgba(237, 241, 248, .12);
  --sr-hover-tint: rgba(0, 194, 255, .06);
  --sr-active-tint: rgba(0, 194, 255, .09);
  --sr-step-on-bg: rgba(0, 194, 255, .1);
  --sr-lesson-wash: rgba(0, 194, 255, .14);
  --sr-volt-line: rgba(255, 200, 0, .4);
  --sr-card-shadow: none;
  --sr-toggle-bg: #0E1528;
  --sr-toggle-active-bg: #00C2FF;
  --sr-toggle-active-text: #0A0F1E;
}
:root[data-theme="light"] {
  color-scheme: light;
  --sr-ink: #EDF1F8;
  --sr-ink2: #FFFFFF;
  --sr-ink3: #FFFFFF;
  --sr-panel: #FFFFFF;
  --sr-panel2: #F7F9FD;
  --sr-line: rgba(0, 144, 200, .38);
  --sr-line-soft: rgba(10, 15, 30, .11);
  --sr-signal: #0090C8;
  --sr-signal-deep: #0077A8;
  --sr-volt: #FFC800;
  --sr-volt-text: #7A5C00;
  --sr-coral: #D93A1E;
  --sr-air: #0A0F1E;
  --sr-air-dim: #3D4A66;
  --sr-air-faint: #5B6A8A;
  --sr-on-signal: #FFFFFF;
  --sr-on-volt: #0A0F1E;
  --sr-status-bg: rgba(255, 255, 255, .94);
  --sr-grid-line: rgba(0, 144, 200, .055);
  --sr-wave-idle: rgba(10, 15, 30, .18);
  --sr-track-line: rgba(10, 15, 30, .14);
  --sr-hover-tint: rgba(0, 144, 200, .07);
  --sr-active-tint: rgba(0, 144, 200, .1);
  --sr-step-on-bg: rgba(0, 144, 200, .1);
  --sr-lesson-wash: rgba(0, 144, 200, .12);
  --sr-volt-line: rgba(180, 138, 0, .55);
  --sr-card-shadow: 0 1px 3px rgba(10, 15, 30, .06);
  --sr-toggle-bg: #FFFFFF;
  --sr-toggle-active-bg: #0090C8;
  --sr-toggle-active-text: #FFFFFF;
}

::selection { background: #00C2FF; color: #0A0F1E; }

/* ---------- theme toggle pill (masthead + shared header) ---------- */
.sr-theme-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--sr-toggle-bg);
  border: 1px solid var(--sr-line);
  border-radius: 999px; padding: 3px;
}
.sr-theme-toggle button {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; background: transparent; color: var(--sr-air-dim);
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; min-height: 38px; cursor: pointer;
  transition: background .2s, color .2s;
}
.sr-theme-toggle button svg { display: block; flex: none; }
.sr-theme-toggle button[aria-pressed="true"] {
  background: var(--sr-toggle-active-bg); color: var(--sr-toggle-active-text);
}
.sr-theme-toggle button:focus-visible { outline: 2px solid var(--sr-signal); outline-offset: 2px; }

/* ================= HOMEPAGE (body.sr-home) ================= */
body.sr-home {
  margin: 0;
  background: var(--sr-ink);
  color: var(--sr-air);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.sr-home::before {
  content: ""; position: fixed; inset: 0;
  background:
    linear-gradient(var(--sr-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--sr-grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none; z-index: 0;
}
body.sr-home main, body.sr-home header, body.sr-home footer.site-footer { position: relative; z-index: 1; }
.sr-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
body.sr-home a { color: var(--sr-signal); }
body.sr-home button { font-family: inherit; cursor: pointer; }

/* ---------- 1. status bar ---------- */
.sr-statusbar {
  border-bottom: 1px solid var(--sr-line);
  background: var(--sr-status-bg);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sr-air);
  position: relative; z-index: 1;
}
.sr-statusbar .sr-wrap { display: flex; align-items: center; gap: 14px; padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap; }
.sr-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sr-signal); flex: none;
  box-shadow: 0 0 0 0 rgba(0, 194, 255, .55);
  animation: sr-pulse 2.2s infinite;
}
@keyframes sr-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 194, 255, .5); }
  70% { box-shadow: 0 0 0 9px rgba(0, 194, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 194, 255, 0); }
}
.sr-statusbar .sr-sep { color: var(--sr-air-faint); }
.sr-statusbar .sr-ok { color: var(--sr-volt-text); }
/* NOTE: `body.sr-home a` (specificity 0-1-2) beats any single-class link
   rule (0-1-0), so links that carry their own color MUST be written with
   the `body.sr-home a.` prefix below — a bare `.sr-explain` color rule
   silently loses to the generic link color and the label renders in the
   fill color (invisible). Keep every own-color link rule prefixed. */
body.sr-home .sr-statusbar a { color: var(--sr-air); text-decoration: none; }
body.sr-home .sr-statusbar a:hover { color: var(--sr-signal); text-decoration: underline; }

/* ---------- 2. masthead ---------- */
.sr-masthead { padding: 26px 0 0; }
.sr-mast-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sr-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.sr-brand-tile {
  width: 52px; height: 52px; border-radius: 10px; flex: none;
  background: var(--sr-signal);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 194, 255, .35);
}
:root[data-theme="light"] .sr-brand-tile { box-shadow: 0 6px 24px rgba(0, 144, 200, .3); }
.sr-brand-tile svg { display: block; }
.sr-brand-name { font-family: "Sora", sans-serif; font-weight: 800; font-size: 34px; letter-spacing: -.01em; color: var(--sr-air); line-height: 1; }
.sr-brand-name span { color: var(--sr-signal); }
.sr-brand-tag { display: block; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--sr-air-dim); letter-spacing: .04em; margin-top: 5px; }
.sr-mast-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.sr-mast-date { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--sr-air-dim); letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.sr-mast-date strong { color: var(--sr-air); font-weight: 600; display: block; font-size: 13px; }
nav.sr-mainnav { margin-top: 20px; border-top: 1px solid var(--sr-line); border-bottom: 1px solid var(--sr-line); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
nav.sr-mainnav a, nav.sr-mainnav button.sr-searchbtn {
  color: var(--sr-air); text-decoration: none; background: none; border: none;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 13px 14px; min-height: 44px;
  display: inline-flex; align-items: center;
  border-bottom: 2px solid transparent;
}
nav.sr-mainnav a:hover, nav.sr-mainnav button.sr-searchbtn:hover { color: var(--sr-signal); }
nav.sr-mainnav a.sr-active { color: var(--sr-signal); border-bottom-color: var(--sr-signal); }
nav.sr-mainnav .sr-searchbtn { margin-left: auto; color: var(--sr-air-dim); }
.sr-searchrow { border-bottom: 1px solid var(--sr-line); }
.sr-searchinner { padding: 14px 0 18px; }
.sr-searchbox {
  width: 100%; font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 17px;
  padding: 13px 16px; border: 1px solid var(--sr-line); border-radius: 12px;
  background: var(--sr-panel); color: var(--sr-air); margin: 0;
}
.sr-searchbox:focus { outline: 2px solid var(--sr-signal); outline-offset: 1px; }
.sr-searchmeta { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--sr-air-faint); margin: 10px 0 0; }
.sr-search-results { display: grid; gap: 12px; margin-top: 12px; max-height: 55vh; overflow-y: auto; }
.sr-search-results:empty { margin-top: 0; }
.sr-search-results .pcard { display: block; background: var(--sr-panel); border: 1px solid var(--sr-line-soft); border-radius: 14px; padding: 18px 20px; text-decoration: none; color: var(--sr-air); }
.sr-search-results .pcard:hover { border-color: var(--sr-line); }
.sr-search-results .pcard .pkicker { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sr-signal); }
.sr-search-results .pcard h3 { font-family: "Sora", sans-serif; font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; margin: 8px 0 6px; }
.sr-search-results .pcard p { font-size: 14.5px; line-height: 1.5; color: var(--sr-air-dim); margin: 0 0 8px; }
.sr-search-results .pcard .meta { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--sr-air-faint); }

/* ---------- section scaffolding ---------- */
body.sr-home section { padding: 44px 0 6px; }
.sr-sec-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--sr-line); padding-bottom: 12px; margin-bottom: 22px; }
.sr-sec-kicker { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--sr-signal); }
.sr-sec-title { font-family: "Sora", sans-serif; font-weight: 700; font-size: clamp(22px, 3.4vw, 30px); margin: 0; letter-spacing: -.01em; }
.sr-sec-note { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--sr-air-faint); letter-spacing: .06em; }

/* ---------- 3. hero / player ---------- */
.sr-hero { padding-top: 30px !important; }
.sr-hero-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--sr-air-dim); margin-bottom: 16px; }
.sr-chip { border: 1px solid var(--sr-line); border-radius: 999px; padding: 4px 11px; color: var(--sr-signal); }
.sr-chip.sr-volt { color: var(--sr-volt-text); border-color: var(--sr-volt-line); }
.sr-hero h1 { font-family: "Sora", sans-serif; font-weight: 800; font-size: clamp(30px, 5.4vw, 54px); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 14px; max-width: 20ch; }
.sr-hero h1 .sr-hl { color: var(--sr-signal); }
.sr-hero-sub { color: var(--sr-air-dim); font-size: 17px; max-width: 62ch; margin: 0 0 26px; }
.sr-player { background: linear-gradient(160deg, var(--sr-ink3), var(--sr-panel2)); border: 1px solid var(--sr-line); border-radius: var(--sr-radius); padding: 22px 22px 18px; }
.sr-player-top { display: flex; align-items: center; gap: 18px; }
.sr-play-btn { width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--sr-volt); border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 28px rgba(255, 200, 0, .35); transition: transform .15s ease; }
.sr-play-btn:hover { transform: scale(1.05); }
.sr-play-btn svg { display: block; }
.sr-player-info { min-width: 0; }
.sr-player-now { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sr-signal); margin-bottom: 3px; }
.sr-player-title { font-family: "Sora", sans-serif; font-weight: 700; font-size: 19px; line-height: 1.3; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-player-anchor { color: var(--sr-air-dim); font-size: 13.5px; margin-top: 3px; }
.sr-player-time { margin-left: auto; text-align: right; flex: none; font-family: "IBM Plex Mono", monospace; }
.sr-player-time .sr-cur { font-size: 20px; color: var(--sr-air); font-weight: 600; }
.sr-player-time .sr-dur { font-size: 12px; color: var(--sr-air-faint); display: block; margin-top: 2px; }
.sr-wave { margin-top: 20px; height: 64px; display: flex; align-items: center; gap: 2.5px; cursor: pointer; }
.sr-wave .sr-bar { flex: 1; min-width: 2px; border-radius: 2px; background: var(--sr-wave-idle); transition: background .2s; }
.sr-wave .sr-bar.sr-played { background: var(--sr-signal); }
.sr-player-foot { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--sr-line-soft); font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--sr-air-faint); letter-spacing: .06em; }
.sr-player-foot .sr-sp { margin-left: auto; color: var(--sr-air-dim); }
.sr-player-foot .sr-sp a { color: var(--sr-volt-text); font-weight: 600; text-decoration: none; }
.sr-player-foot .sr-sp a:hover { text-decoration: underline; }

/* chapters */
.sr-chapters { margin-top: 26px; }
.sr-chapters-head { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--sr-air-faint); margin-bottom: 8px; }
body.sr-home .sr-chapters-head a { color: var(--sr-air-dim); }
.sr-chapter { display: flex; align-items: center; gap: 16px; width: 100%; background: transparent; border: none; text-align: left; border-top: 1px solid var(--sr-line-soft); padding: 13px 10px; min-height: 52px; color: var(--sr-air); font-size: 15.5px; transition: background .15s; }
.sr-chapter:last-child { border-bottom: 1px solid var(--sr-line-soft); }
.sr-chapter:hover { background: var(--sr-hover-tint); }
.sr-chapter .sr-num { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--sr-air-faint); width: 26px; flex: none; }
.sr-chapter .sr-ts { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--sr-signal); flex: none; width: 46px; }
.sr-chapter .sr-ttl { flex: 1; line-height: 1.35; }
.sr-chapter .sr-jump { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .12em; color: var(--sr-air-faint); flex: none; opacity: 0; transition: opacity .15s; }
.sr-chapter:hover .sr-jump { opacity: 1; }
.sr-chapter.sr-active { background: var(--sr-active-tint); }
.sr-chapter.sr-active .sr-num { color: var(--sr-volt-text); }
.sr-chapter.sr-active .sr-ttl { font-weight: 600; }
.sr-chapter.sr-active .sr-jump { opacity: 1; color: var(--sr-volt-text); }
.sr-eq { display: none; gap: 2.5px; align-items: flex-end; height: 14px; flex: none; }
.sr-chapter.sr-active .sr-eq { display: flex; }
.sr-eq i { width: 3px; background: var(--sr-volt); border-radius: 1px; animation: sr-eq .9s ease-in-out infinite; }
.sr-eq i:nth-child(1) { height: 60%; }
.sr-eq i:nth-child(2) { height: 100%; animation-delay: .15s; }
.sr-eq i:nth-child(3) { height: 45%; animation-delay: .3s; }
@keyframes sr-eq { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }

/* ---------- 4. pipeline ---------- */
.sr-pipeline-box { background: var(--sr-panel2); border: 1px solid var(--sr-line); border-radius: var(--sr-radius); padding: 24px 22px 20px; }
.sr-pipe-track { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; position: relative; }
.sr-pipe-track::before { content: ""; position: absolute; left: 6%; right: 6%; top: 21px; height: 2px; background: var(--sr-track-line); }
.sr-pipe-fill { position: absolute; left: 6%; top: 21px; height: 2px; background: var(--sr-signal); width: 0%; transition: width .5s ease; box-shadow: 0 0 8px rgba(0, 194, 255, .7); }
.sr-step { text-align: center; padding: 0 4px; position: relative; opacity: .38; transition: opacity .4s; }
.sr-step .sr-dot { width: 42px; height: 42px; margin: 0 auto 10px; border-radius: 50%; background: var(--sr-ink3); border: 1px solid var(--sr-line-soft); display: flex; align-items: center; justify-content: center; font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--sr-air-dim); position: relative; z-index: 1; transition: all .4s; }
.sr-step .sr-lbl { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--sr-air); }
.sr-step .sr-time { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--sr-air-faint); margin-top: 4px; min-height: 14px; }
.sr-step .sr-check { position: absolute; top: -7px; right: calc(50% - 30px); width: 19px; height: 19px; border-radius: 50%; background: var(--sr-volt); color: #0A0F1E; display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); z-index: 2; }
.sr-step.sr-on { opacity: 1; }
.sr-step.sr-on .sr-dot { border-color: var(--sr-signal); color: var(--sr-signal); box-shadow: 0 0 16px rgba(0, 194, 255, .35); background: var(--sr-step-on-bg); }
.sr-step.sr-on .sr-check { transform: scale(1); }
.sr-step.sr-on .sr-time { color: var(--sr-signal); }
.sr-pipe-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--sr-line-soft); font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--sr-air-faint); letter-spacing: .05em; }
.sr-replay-btn { margin-left: auto; background: transparent; color: var(--sr-signal); border: 1px solid var(--sr-line); border-radius: 8px; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; padding: 8px 14px; min-height: 40px; }
.sr-replay-btn:hover { background: var(--sr-step-on-bg); }

/* ---------- 5. story grid ---------- */
.sr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sr-card { background: var(--sr-panel); border: 1px solid var(--sr-line-soft); border-radius: var(--sr-radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s; box-shadow: var(--sr-card-shadow); }
.sr-card:hover { border-color: var(--sr-line); transform: translateY(-2px); }
.sr-card.sr-lead { grid-column: span 2; background: linear-gradient(150deg, var(--sr-ink3), var(--sr-panel)); border-color: var(--sr-line); }
.sr-prov { display: flex; gap: 8px; flex-wrap: wrap; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; }
.sr-prov .sr-src { color: var(--sr-signal); border: 1px solid var(--sr-line); padding: 3px 8px; border-radius: 4px; }
.sr-prov .sr-src a { color: inherit; text-decoration: none; }
.sr-prov .sr-spot { color: var(--sr-air-faint); padding: 3px 0; }
.sr-card h3 { font-family: "Sora", sans-serif; font-weight: 700; font-size: 19px; line-height: 1.3; margin: 0; }
.sr-card h3 a { color: var(--sr-air); text-decoration: none; }
.sr-card h3 a:hover { color: var(--sr-signal); }
.sr-card.sr-lead h3 { font-size: 25px; }
.sr-card p { margin: 0; color: var(--sr-air-dim); font-size: 14.5px; }
.sr-why { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--sr-line-soft); font-size: 13.5px; color: var(--sr-air-dim); }
.sr-why b { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--sr-volt-text); font-weight: 600; display: block; margin-bottom: 3px; }
body.sr-home a.sr-explain { align-self: flex-start; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sr-on-signal); background: var(--sr-signal); text-decoration: none; font-weight: 600; padding: 7px 12px; border-radius: 6px; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
body.sr-home a.sr-explain:hover { background: var(--sr-volt); color: var(--sr-on-volt); }

/* ---------- 6. learning center ---------- */
.sr-learn-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.sr-lesson-main { background: linear-gradient(140deg, var(--sr-lesson-wash), var(--sr-panel) 55%); border: 1px solid var(--sr-line); border-radius: var(--sr-radius); padding: 26px; box-shadow: var(--sr-card-shadow); }
.sr-lesson-main .sr-prov .sr-src { color: var(--sr-volt-text); border-color: var(--sr-volt-line); }
.sr-lesson-main h3 { font-family: "Sora", sans-serif; font-weight: 700; font-size: clamp(22px, 3vw, 30px); margin: 10px 0 8px; line-height: 1.25; }
.sr-lesson-main p { color: var(--sr-air-dim); margin: 0 0 18px; max-width: 52ch; }
body.sr-home a.sr-btn-signal { display: inline-flex; align-items: center; background: var(--sr-signal); color: var(--sr-on-signal); border: none; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 9px; min-height: 48px; text-decoration: none; font-family: "IBM Plex Sans", system-ui, sans-serif; }
body.sr-home a.sr-btn-signal:hover { background: var(--sr-volt); color: var(--sr-on-volt); }
.sr-lesson-tiles { display: flex; flex-direction: column; gap: 12px; }
body.sr-home a.sr-lesson-tile { background: var(--sr-panel); border: 1px solid var(--sr-line-soft); border-radius: var(--sr-radius); padding: 16px 18px; text-decoration: none; color: var(--sr-air); display: flex; align-items: center; gap: 14px; min-height: 64px; }
body.sr-home a.sr-lesson-tile:hover { border-color: var(--sr-line); }
.sr-lesson-tile .sr-n { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--sr-signal); border: 1px solid var(--sr-line); border-radius: 6px; padding: 5px 8px; flex: none; }
.sr-lesson-tile .sr-t { font-weight: 600; font-size: 15px; line-height: 1.35; }
.sr-lesson-tile .sr-arr { margin-left: auto; color: var(--sr-air-faint); flex: none; }

/* ---------- 7. events (generated by tools/build-events.py) ---------- */
.sr-events { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sr-event { background: var(--sr-panel2); border: 1px solid var(--sr-line-soft); border-radius: var(--sr-radius); padding: 18px; box-shadow: var(--sr-card-shadow); }
.sr-event.sr-live { border-color: rgba(255, 90, 60, .55); }
.sr-event .sr-when { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sr-air-faint); }
.sr-event h3 { font-family: "Sora", sans-serif; font-size: 17px; margin: 7px 0 4px; font-weight: 700; line-height: 1.3; }
.sr-event h3 a { color: var(--sr-air); text-decoration: none; }
.sr-event h3 a:hover { color: var(--sr-signal); }
.sr-event .sr-where { color: var(--sr-air-dim); font-size: 13px; margin: 0; }
.sr-event .sr-count { margin-top: 12px; font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--sr-signal); font-weight: 600; text-transform: uppercase; }
.sr-event.sr-live .sr-count { color: var(--sr-coral); }
.sr-liveflag { display: inline-block; background: var(--sr-coral); color: #fff; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 600; letter-spacing: .12em; padding: 2px 7px; border-radius: 4px; vertical-align: 2px; margin-left: 6px; text-transform: uppercase; }

/* ---------- 8. newsletter band (black in BOTH themes) ---------- */
.sr-newsband { margin-top: 52px; background: #000; border-top: 1px solid var(--sr-line); border-bottom: 1px solid var(--sr-line); color: #EDF1F8; position: relative; z-index: 1; }
.sr-newsband .sr-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding-top: 34px; padding-bottom: 34px; }
.sr-newsband h2 { font-family: "Sora", sans-serif; font-weight: 700; font-size: 24px; margin: 0 0 4px; color: #EDF1F8; }
.sr-newsband p { margin: 0; color: #A9B4CC; font-size: 14.5px; }
.sr-news-form { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.sr-news-form input { background: #0E1528; border: 1px solid rgba(0, 194, 255, .3); border-radius: 9px; color: #EDF1F8; padding: 12px 16px; font-size: 15px; min-width: min(280px, 78vw); font-family: inherit; min-height: 48px; }
.sr-news-form input::placeholder { color: #6E7B99; }
.sr-news-form button { background: var(--sr-volt); color: #0A0F1E; border: none; font-weight: 700; font-size: 15px; padding: 12px 24px; border-radius: 9px; min-height: 48px; cursor: pointer; font-family: inherit; }

/* ---------- 9. glass newsroom ---------- */
.sr-glass-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.sr-stat { background: var(--sr-panel); border: 1px solid var(--sr-line-soft); border-radius: var(--sr-radius); padding: 22px; text-align: left; box-shadow: var(--sr-card-shadow); }
.sr-stat .sr-big { font-family: "Sora", sans-serif; font-weight: 800; font-size: 38px; color: var(--sr-signal); line-height: 1; }
.sr-stat .sr-lbl2 { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sr-air-dim); margin-top: 8px; }
.sr-stat p { color: var(--sr-air-dim); font-size: 13.5px; margin: 8px 0 0; }
.sr-btn-ghost { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--sr-signal); color: var(--sr-signal); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 9px; min-height: 48px; }
.sr-btn-ghost:hover { background: var(--sr-step-on-bg); }

/* ---------- previous briefings (homepage archive list) ---------- */
.sr-prev-list { display: grid; gap: 12px; }
.sr-prev .post-card { display: block; background: var(--sr-panel); border: 1px solid var(--sr-line-soft); border-radius: var(--sr-radius); padding: 18px 20px; text-decoration: none; color: var(--sr-air); box-shadow: var(--sr-card-shadow); }
.sr-prev .post-card:hover { border-color: var(--sr-line); }
.sr-prev .post-card .kicker { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sr-signal); }
.sr-prev .post-card h3 { font-family: "Sora", sans-serif; font-size: 19px; line-height: 1.3; font-weight: 700; margin: 7px 0 5px; }
.sr-prev .post-card p { font-size: 14.5px; line-height: 1.5; color: var(--sr-air-dim); margin: 0 0 7px; }
.sr-prev .post-card .meta { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--sr-air-faint); }

/* ---------- breaking news card (homepage; content managed by the
   breaking-news flow — CSS lives here since the Dec 4 fidelity pass) --- */
.breaking { border: 2px solid var(--sr-coral); border-radius: var(--sr-radius); background: var(--sr-panel); padding: 20px 22px 18px; margin: 26px 0 6px; }
.breaking-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.breaking-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sr-coral); flex: none; animation: breaking-pulse 1.6s ease-in-out infinite; }
@keyframes breaking-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
.breaking-label { font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--sr-coral); }
.breaking-time { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--sr-air-faint); margin-left: auto; text-align: right; white-space: nowrap; }
.breaking h2 { font-family: "Sora", sans-serif; font-weight: 700; font-size: 27px; line-height: 1.22; margin: 0 0 10px; color: var(--sr-air); }
.breaking p { font-size: 16.5px; line-height: 1.55; color: var(--sr-air-dim); margin: 0 0 12px; }
.breaking-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-family: "IBM Plex Mono", monospace; font-size: 12.5px; font-weight: 600; }
.breaking-links a { text-decoration: none; color: var(--sr-signal); }
.breaking-links a:hover { text-decoration: underline; }

/* ---------- newsletter band used inside posts/lessons/events pages
   (class-based markup from the builders; black in both themes) -------- */
.nl-band { margin: 28px 0 8px; padding: 24px 20px; border-radius: 14px; background: #070B16; border: 1px solid #263350; color: #EDF1F8; }
.nl-h { font-family: "Sora", sans-serif; font-weight: 700; font-size: 21px; line-height: 1.25; color: #EDF1F8; margin: 0 0 6px; }
.nl-h-sm { font-size: 19px; }
.nl-p { font-size: 15.5px; line-height: 1.5; color: #C7D3E8; margin: 0 0 16px; }
.nl-btn { display: block; text-align: center; background: #00C2FF; color: #0A0F1E; border-radius: 999px; padding: 13px 22px; font-family: "IBM Plex Mono", monospace; font-size: 15px; font-weight: 600; text-decoration: none; }
.nl-btn:hover { background: #33CFFF; }

/* smooth theme crossfade (colors only) */
body.sr-home, .sr-statusbar, .sr-card, .sr-player, .sr-pipeline-box, .sr-lesson-main, .sr-lesson-tile, .sr-event, .sr-stat, .sr-theme-toggle { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
:root[data-theme="light"] .sr-pipeline-box,
:root[data-theme="light"] .sr-lesson-tile,
:root[data-theme="light"] .sr-event,
:root[data-theme="light"] .sr-stat,
:root[data-theme="light"] .sr-player { box-shadow: var(--sr-card-shadow); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .sr-grid { grid-template-columns: 1fr 1fr; }
  .sr-card.sr-lead { grid-column: span 2; }
  .sr-events { grid-template-columns: 1fr 1fr; }
  .sr-pipe-track { grid-template-columns: repeat(4, 1fr); row-gap: 26px; }
  .sr-pipe-track::before, .sr-pipe-fill { display: none; }
}
@media (max-width: 620px) {
  .sr-grid { grid-template-columns: 1fr; }
  .sr-card.sr-lead { grid-column: span 1; }
  .sr-learn-grid { grid-template-columns: 1fr; }
  .sr-glass-stats { grid-template-columns: 1fr; }
  .sr-events { grid-template-columns: 1fr 1fr; }
  .sr-hero h1 { max-width: none; }
  .sr-player-top { flex-wrap: wrap; }
  .sr-player-time { margin-left: 0; text-align: left; }
  .sr-player-title { white-space: normal; }
  .sr-brand-name { font-size: 28px; }
  .sr-mast-date { text-align: left; }
  .sr-mast-right { align-items: flex-start; }
  .sr-news-form { margin-left: 0; width: 100%; }
  .sr-news-form input { flex: 1; }
  .sr-chapter .sr-jump { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sr-live-dot, .sr-eq i, .breaking-dot { animation: none; }
  body.sr-home, .sr-statusbar, .sr-card, .sr-player, .sr-pipeline-box, .sr-lesson-main, .sr-lesson-tile, .sr-event, .sr-stat, .sr-theme-toggle, .sr-theme-toggle button { transition: none; }
}
