/* ==========================================================================
   PHOSPHOR WIRE v1.0 — 1996 Teletext, Local-on-the-8s Weather & Daily Desk
   4 Themes: CRT '96 | DARK | OFFICE | TURBO '96
   ========================================================================== */

:root,
[data-theme="crt"] {
  --font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Consolas", "Cascadia Mono", "Courier New", monospace;

  --bg-app: #080f14;
  --bg-panel: #101921;
  --bg-panel-alt: #15222d;
  --bg-surface: #0b131a;
  --bg-input: #070d12;

  --border: #223545;
  --border-hi: #345066;

  --text-main: #e6f3ec;
  --text-muted: #8ea7b6;
  --text-dim: #627b8c;

  --accent: #39ff88;
  --accent-bg: rgba(57, 255, 136, 0.12);
  --accent-text: #06180d;
  --amber: #ffb84d;
  --cyan: #4cc9f0;
  --magenta: #f472b6;
  --red: #ff5c77;

  --radius: 5px;
  --radius-lg: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  --scanline-opacity: 0.07;
}

[data-theme="dark"] {
  --font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Consolas", "Cascadia Mono", "SFMono-Regular", monospace;

  --bg-app: #111317;
  --bg-panel: #181c23;
  --bg-panel-alt: #202631;
  --bg-surface: #14181f;
  --bg-input: #0e1015;

  --border: #2b313e;
  --border-hi: #3e4759;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent: #7aa2f7;
  --accent-bg: rgba(122, 162, 247, 0.14);
  --accent-text: #0b101b;
  --amber: #f59e0b;
  --cyan: #67e8f9;
  --magenta: #f472b6;
  --red: #f87171;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.36);
  --scanline-opacity: 0;
}

[data-theme="office"] {
  --font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", monospace;

  --bg-app: #f1f5f9;
  --bg-panel: #ffffff;
  --bg-panel-alt: #f8fafc;
  --bg-surface: #f4f7fb;
  --bg-input: #ffffff;

  --border: #cbd5e1;
  --border-hi: #94a3b8;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --accent: #1d4ed8;
  --accent-bg: rgba(29, 78, 216, 0.09);
  --accent-text: #ffffff;
  --amber: #b45309;
  --cyan: #0369a1;
  --magenta: #be185d;
  --red: #dc2626;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
  --scanline-opacity: 0;
}

[data-theme="turbo"] {
  --font-ui: "Consolas", "Cascadia Mono", "Courier New", monospace;
  --font-mono: "Consolas", "Cascadia Mono", "Courier New", monospace;

  --bg-app: #020804;
  --bg-panel: #041208;
  --bg-panel-alt: #061c0d;
  --bg-surface: #030e06;
  --bg-input: #010502;

  --border: #0f6f34;
  --border-hi: #00ff66;

  --text-main: #7affaa;
  --text-muted: #34c76e;
  --text-dim: #1f8a4b;

  --accent: #00ff66;
  --accent-bg: rgba(0, 255, 102, 0.14);
  --accent-text: #011407;
  --amber: #ffb000;
  --cyan: #00f0ff;
  --magenta: #ff2e93;
  --red: #ff4757;

  --radius: 0px;
  --radius-lg: 0px;
  --shadow: 0 0 18px rgba(0, 255, 102, 0.16);
  --scanline-opacity: 0.2;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.48;
  min-height: 100vh;
  overflow-x: hidden;
}

.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--scanline-opacity);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.55) 3px,
    transparent 4px
  );
}
[data-theme="dark"] .crt-scanlines,
[data-theme="office"] .crt-scanlines { display: none; }

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 54px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 12px;
  display: grid;
  place-items: center;
  letter-spacing: 0.4px;
}

.brand-title {
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ver-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.proof-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  background: var(--accent-bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.controls-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.action-pill {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-panel-alt);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.action-pill:hover { border-color: var(--accent); color: var(--accent); }

.theme-switch {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}

.theme-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: calc(var(--radius) - 1px);
  cursor: pointer;
  white-space: nowrap;
}
.theme-btn:hover { color: var(--text-main); }
.theme-btn.active { background: var(--accent); color: var(--accent-text); }

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.icon-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* SHELL */
.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: calc(100vh - 54px);
}

.sidebar {
  position: sticky;
  top: 54px;
  height: calc(100vh - 54px);
  overflow-y: auto;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-sidebar-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}
.guide-sidebar-btn:hover {
  background: var(--accent);
  color: var(--accent-text);
}

.sidebar-footer-stack {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar-card.brand-card {
  border-style: dashed;
  border-color: var(--border-hi);
}

.scard-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

.scard-text {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.42;
}

.scard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-panel-alt);
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}
.scard-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.bcard-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: var(--text-main);
}
.bcard-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.bcard-links {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.55;
  text-align: center;
}
.bcard-links a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}
.bcard-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.bcard-links.legal a { color: var(--text-muted); font-size: 11px; }

.teletext-dial-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border-hi);
  font-family: var(--font-mono);
}
.dial-lbl { font-size: 10px; font-weight: 800; color: var(--text-dim); letter-spacing: 0.8px; }
.dial-readout { font-size: 15px; font-weight: 900; color: var(--accent); letter-spacing: 1.5px; }

.nav-section-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: var(--text-dim);
  padding: 2px 4px;
}

.tool-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tool-tab {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.tool-tab:hover { background: var(--bg-panel-alt); border-color: var(--border); }
.tool-tab.active {
  background: var(--accent-bg);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.ch-num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 6px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  background: var(--bg-input);
  border: 1px solid var(--border-hi);
}
.ch-world { color: #39ff88; border-color: rgba(57, 255, 136, 0.45); }
.ch-tech { color: #4cc9f0; border-color: rgba(76, 201, 240, 0.45); }
.ch-weather { color: #60a5fa; border-color: rgba(96, 165, 250, 0.45); }
.ch-markets { color: #ffb84d; border-color: rgba(255, 184, 77, 0.45); }
.ch-sports { color: #fb7185; border-color: rgba(251, 113, 133, 0.45); }
.ch-mywire { color: #c084fc; border-color: rgba(192, 132, 252, 0.45); }

[data-theme="office"] .ch-num { background: #0f172a; }

.tab-body { display: flex; flex-direction: column; min-width: 0; }
.tab-name { font-weight: 800; font-size: 13px; line-height: 1.2; }
.tab-desc { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-hint {
  padding: 9px 10px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hint-title { font-family: var(--font-mono); font-size: 10px; font-weight: 800; color: var(--accent); margin-bottom: 2px; }
.hint-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hint-row code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.suite-drawer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.suite-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.suite-links a {
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 5px;
  text-align: center;
  white-space: nowrap;
}
.suite-links a:hover { color: var(--accent); border-color: var(--accent); }

/* MAIN STAGE & TELETEXT BANNER */
.main-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 16px 24px;
  gap: 12px;
}

.tt-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border-hi);
  border-left: 4px solid var(--accent);
  font-family: var(--font-mono);
}
.tt-banner-left, .tt-banner-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tt-page-tag {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 900;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 4px;
}
.tt-ch-title { font-weight: 900; font-size: 14px; letter-spacing: 0.7px; }
.tt-status-chip {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tt-status-chip.live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-bg); }
.tt-status-chip.error { color: var(--red); border-color: var(--red); }
.tt-clock { font-size: 12px; font-weight: 800; color: var(--amber); letter-spacing: 0.6px; }

.tt-btn {
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-panel-alt);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.tt-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ALMANAC DECK (CH 401) */
.almanac-deck {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.almanac-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.almanac-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.7px;
}
.exchange-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.ex-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ex-top, .ex-bot { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.ex-code { font-family: var(--font-mono); font-size: 11px; font-weight: 900; }
.ex-city { font-size: 11px; color: var(--text-muted); }
.ex-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-main); font-weight: 700; }
.ex-led {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 3px;
}
.ex-led.open { background: rgba(57, 255, 136, 0.2); color: #39ff88; border: 1px solid #39ff88; }
.ex-led.pre { background: rgba(255, 184, 77, 0.2); color: #ffb84d; border: 1px solid #ffb84d; }
.ex-led.closed { background: var(--bg-input); color: var(--text-dim); border: 1px solid var(--border); }
[data-theme="office"] .ex-led.open { background: #dcfce7; color: #15803d; border-color: #16a34a; }

.lunar-box { display: flex; flex-direction: column; gap: 8px; }
.lunar-hero { display: flex; align-items: center; gap: 10px; }
.lunar-ico { font-size: 28px; line-height: 1; }
.lunar-phase { font-weight: 800; font-size: 14px; }
.lunar-sub { font-size: 11.5px; color: var(--text-muted); }
.lunar-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.lunar-stat {
  flex: 1 1 115px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  font-size: 11px;
}
.lunar-stat span { color: var(--text-dim); font-family: var(--font-mono); font-size: 10px; }
.lunar-stat strong { font-family: var(--font-mono); font-size: 11.5px; }

/* WIRE TOOLBAR — LEFT-JUSTIFIED FOR ULTRAWIDE ERGONOMICS */
.wire-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tb-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  margin: 0 6px;
  background: var(--border-hi);
  opacity: 0.65;
  flex-shrink: 0;
}
.wire-search-wrap { flex: 0 1 260px; min-width: 190px; }
.wire-input {
  width: 100%;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 13px;
}
.wire-input:focus { outline: none; border-color: var(--accent); }

.source-pills { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.src-pill {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.src-pill.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.wire-toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spoiler-btn, .mute-pill {
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.spoiler-btn.active { background: rgba(251, 113, 133, 0.16); border-color: #fb7185; color: #fb7185; }
.mute-pill.has-muted { border-color: var(--amber); color: var(--amber); }

/* SPLIT WIRE + BRIEFING READER */
.wire-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.wire-list {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.wire-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s ease;
}
.wire-row:last-child { border-bottom: none; }
.wire-row:hover { background: var(--bg-panel-alt); }
.wire-row.active {
  background: var(--accent-bg);
  box-shadow: inset 3px 0 0 var(--accent);
}

.wr-idx {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 900;
  color: var(--text-dim);
  padding-top: 2px;
  width: 22px;
  flex-shrink: 0;
}
.wire-row.active .wr-idx { color: var(--accent); }

.wr-main { flex: 1; min-width: 0; }
.wr-title { font-weight: 700; font-size: 14px; line-height: 1.35; color: var(--text-main); }
.wr-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}
.wr-src { color: var(--cyan); font-weight: 800; }
.wr-clean { color: var(--accent); opacity: 0.88; }
.wr-shield { color: #fb7185; font-weight: 800; }

.wr-star {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.wr-star:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(255, 184, 77, 0.12);
  transform: scale(1.06);
}
.wr-star.starred {
  color: var(--amber);
  border-color: var(--amber);
  background: rgba(255, 184, 77, 0.16);
}

.wr-snippet {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.48;
  margin-top: 5px;
}
.wr-snippet.lite {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wr-snippet.full {
  color: var(--text-main);
  opacity: 0.88;
}

.wr-ext {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
}
.wr-ext:hover { text-decoration: underline; }

.wire-loading, .wire-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* BRIEFING PANE */
.briefing-pane {
  position: sticky;
  top: 68px;
  background: var(--bg-panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}
.briefing-empty { text-align: center; padding: 28px 12px; color: var(--text-muted); }
.briefing-empty-ico { font-size: 32px; margin-bottom: 8px; }
.briefing-empty h3 { margin: 0 0 6px; color: var(--text-main); }

.briefing-card { display: flex; flex-direction: column; gap: 13px; }
.briefing-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.briefing-source {
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 900;
}
.briefing-time { color: var(--text-muted); }
.briefing-clean { color: var(--amber); font-weight: 800; margin-left: auto; }

.briefing-title { margin: 0; font-size: 19px; line-height: 1.3; color: var(--text-main); }
.briefing-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.62;
  color: var(--text-main);
  opacity: 0.92;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.briefing-url-box {
  padding: 9px 11px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}
.briefing-url-lbl { font-size: 9.5px; color: var(--text-dim); font-weight: 800; letter-spacing: 0.7px; margin-bottom: 3px; }
.briefing-url-val { font-size: 11px; color: var(--cyan); word-break: break-all; }
.briefing-burned {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 10.5px;
  line-height: 1.4;
  word-break: break-all;
}
.briefing-burned.stripped { color: var(--amber); }
.briefing-burned.stripped .burn-lbl { font-weight: 900; }
.briefing-burned.stripped s { color: var(--red); opacity: 0.92; text-decoration-thickness: 1.5px; }
.briefing-burned.clean { color: var(--accent); opacity: 0.88; }

.briefing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-panel-alt);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.btn-sec:hover { border-color: var(--accent); color: var(--accent); }
.btn-sec.starred { border-color: var(--amber); color: var(--amber); }

.briefing-note { font-size: 11.5px; color: var(--text-dim); line-height: 1.45; }

/* 301 WEATHER — 1996 "LOCAL ON THE 8s" MONITOR */
.weather-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.weather-form { display: flex; gap: 8px; max-width: 560px; }
.weather-quick-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wq-lbl { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.wq-chip, .unit-toggle {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-hi);
  background: var(--bg-panel);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.wq-chip:hover, .unit-toggle:hover { border-color: var(--accent); color: var(--accent); }
.unit-toggle { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }

.local8-monitor {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: linear-gradient(180deg, #0b2454 0%, #091a3d 48%, #07122b 100%);
  border: 2px solid #3b82f6;
  color: #f1f5f9;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
[data-theme="dark"] .local8-monitor {
  background: linear-gradient(180deg, #162033 0%, #121826 100%);
  border-color: var(--border-hi);
}
[data-theme="office"] .local8-monitor {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border-color: #93c5fd;
  color: #0f172a;
}
[data-theme="turbo"] .local8-monitor {
  background: #031107;
  border-color: #00ff66;
  color: #7affaa;
}

.local8-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
[data-theme="office"] .local8-header { border-bottom-color: #cbd5e1; }
.local8-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.l8-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 4px;
  background: #f59e0b;
  color: #111827;
  letter-spacing: 0.7px;
}
.l8-loc { font-family: var(--font-mono); font-size: 15px; font-weight: 900; letter-spacing: 0.6px; }
.l8-meta { font-family: var(--font-mono); font-size: 11px; opacity: 0.78; }

.local8-hero {
  display: grid;
  grid-template-columns: 100px minmax(200px, 1fr) minmax(260px, 1.25fr);
  gap: 18px;
  align-items: center;
}
.w-art-box { width: 96px; height: 96px; }
.w-art-box svg { width: 100%; height: 100%; display: block; }
.w-temp-now { font-family: var(--font-mono); font-size: 48px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.w-cond-text { font-size: 17px; font-weight: 800; margin-top: 4px; color: #fde047; }
[data-theme="office"] .w-cond-text { color: #1d4ed8; }
[data-theme="turbo"] .w-cond-text { color: #00ff66; }
.w-hi-lo { font-family: var(--font-mono); font-size: 12px; opacity: 0.86; margin-top: 4px; }

.w-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.wt-cell {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
[data-theme="office"] .wt-cell { background: #f8fafc; border-color: #cbd5e1; }
.wt-cell span { font-family: var(--font-mono); font-size: 9.5px; opacity: 0.74; letter-spacing: 0.7px; }
.wt-cell strong { font-family: var(--font-mono); font-size: 13px; }

.local8-section-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fde047;
}
[data-theme="office"] .local8-section-lbl { color: #1d4ed8; }
[data-theme="turbo"] .local8-section-lbl { color: #00ff66; }

.w-hourly-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 7px;
}
.wh-card {
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
[data-theme="office"] .wh-card { background: #f8fafc; border-color: #cbd5e1; }
.wh-time { font-family: var(--font-mono); font-size: 10.5px; opacity: 0.8; }
.wh-ico { width: 32px; height: 32px; }
.wh-ico svg { width: 100%; height: 100%; }
.wh-temp { font-family: var(--font-mono); font-size: 13px; font-weight: 900; }
.wh-pop { font-family: var(--font-mono); font-size: 10px; color: #7dd3fc; }
[data-theme="office"] .wh-pop { color: #0369a1; }

.w-daily-grid { display: flex; flex-direction: column; gap: 6px; }
.wd-row {
  display: grid;
  grid-template-columns: 58px 30px 1fr 42px 38px minmax(64px, 140px) 38px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 12px;
}
[data-theme="office"] .wd-row { background: #f8fafc; border-color: #cbd5e1; }
.wd-day { font-weight: 900; }
.wd-ico { width: 28px; height: 28px; }
.wd-ico svg { width: 100%; height: 100%; }
.wd-cond { font-family: var(--font-ui); font-size: 12.5px; opacity: 0.9; }
.wd-pop { color: #7dd3fc; font-size: 11px; text-align: right; }
[data-theme="office"] .wd-pop { color: #0369a1; }
.wd-lo { opacity: 0.72; text-align: right; }
.wd-hi { font-weight: 900; }
.wd-bar-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
[data-theme="office"] .wd-bar-track { background: #e2e8f0; }
.wd-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #facc15, #fb923c);
}

/* 601 MY WIRE */
.mywire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mywire-col { display: flex; flex-direction: column; gap: 14px; }
.mw-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mw-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mw-head-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.mw-kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 900; color: var(--accent); letter-spacing: 0.7px; }
.mw-desc { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.mw-form { display: flex; gap: 6px; flex-wrap: wrap; }
.mw-form .wire-input { flex: 1 1 180px; }
.mw-name-in { max-width: 150px; }
.mw-status { font-family: var(--font-mono); font-size: 11.5px; color: var(--amber); min-height: 16px; }
.mw-empty { font-size: 12.5px; color: var(--text-dim); padding: 10px; background: var(--bg-surface); border-radius: var(--radius); border: 1px dashed var(--border); }

.byo-list, .clip-list { display: flex; flex-direction: column; gap: 8px; }
.byo-item, .clip-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
}
.byo-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.byo-name { font-weight: 800; font-size: 13px; }
.byo-url { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); word-break: break-all; }
.byo-del, .clip-del {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}
.byo-del:hover, .clip-del:hover { border-color: var(--red); color: var(--red); }

.mute-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mute-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 184, 77, 0.14);
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
}
.mute-chip button { background: none; border: none; color: inherit; cursor: pointer; font-weight: 900; padding: 0; }

.clip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cyan);
  margin-bottom: 4px;
}
.clip-title { display: block; font-weight: 800; font-size: 13.5px; color: var(--text-main); text-decoration: none; }
.clip-title:hover { color: var(--accent); text-decoration: underline; }
.clip-sum { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* FULL-SCREEN 2ND-MONITOR TELETEXT WALLBOARD */
.wallboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #04090e;
  color: #e6f3ec;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
}
.wb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #0a1520;
  border-bottom: 2px solid #39ff88;
  flex-wrap: wrap;
}
.wb-brand, .wb-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wb-page { background: #39ff88; color: #04150a; font-weight: 900; font-size: 16px; padding: 4px 10px; border-radius: 4px; }
.wb-title { font-size: 18px; font-weight: 900; letter-spacing: 1px; color: #e6f3ec; }
.wb-weather-mini { font-size: 13px; color: #7dd3fc; font-weight: 700; }
.wb-clock { font-size: 15px; color: #ffb84d; font-weight: 900; }
.wb-btn {
  padding: 6px 11px;
  border-radius: 4px;
  border: 1px solid #345066;
  background: #10202e;
  color: #e6f3ec;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.wb-btn:hover { border-color: #39ff88; color: #39ff88; }
.wb-exit { border-color: #ff5c77; color: #ff5c77; }

.wb-progress { height: 4px; background: #10202e; width: 100%; }
.wb-progress-fill { height: 100%; width: 0%; background: #39ff88; transition: width 0.2s linear; }

.wb-body { flex: 1; padding: 20px; overflow-y: auto; }
.wb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 1500px;
  margin: 0 auto;
}
.wb-card {
  background: #0c1721;
  border: 1px solid #243b4e;
  border-left: 4px solid #4cc9f0;
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wb-card-top { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.wb-num { color: #39ff88; font-weight: 900; }
.wb-src { color: #ffb84d; font-weight: 900; }
.wb-time { color: #8ea7b6; margin-left: auto; }
.wb-hl { font-family: var(--font-ui); font-size: 19px; font-weight: 800; line-height: 1.3; color: #ffffff; }
.wb-sum { font-family: var(--font-ui); font-size: 13.5px; color: #9cb3c2; line-height: 1.45; }

.wb-ticker {
  display: flex;
  align-items: stretch;
  height: 40px;
  background: #07121b;
  border-top: 2px solid #ffb84d;
  overflow: hidden;
}
.wb-ticker-tag {
  background: #ffb84d;
  color: #0b1117;
  font-weight: 900;
  font-size: 12px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.wb-ticker-viewport { flex: 1; overflow: hidden; display: flex; align-items: center; }
.wb-ticker-track { display: flex; width: max-content; animation: wbScroll 55s linear infinite; }
.wbt-group { display: flex; align-items: center; gap: 16px; padding-right: 16px; white-space: nowrap; font-size: 13.5px; }
.wbt-src { color: #39ff88; margin-right: 4px; }
.wbt-sep { color: #ffb84d; font-size: 10px; }
@keyframes wbScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-window {
  width: min(560px, 100%);
  background: var(--bg-panel);
  border: 1.5px solid var(--border-hi);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-panel-alt);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}
.modal-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
}
.modal-body { padding: 16px; font-size: 13.5px; }
.proof-list { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }

/* PRINT BROADSHEET ("THE PHOSPHOR WIRE — MORNING PAPER") */
.print-paper { display: none; }
@media print {
  .no-print, .crt-scanlines { display: none !important; }
  body { background: #ffffff !important; color: #000000 !important; }
  .print-paper {
    display: block !important;
    font-family: Georgia, "Times New Roman", serif;
    color: #000000;
    padding: 0;
  }
  .pp-masthead { text-align: center; border-bottom: 3px double #000; padding-bottom: 10px; margin-bottom: 14px; }
  .pp-edition { font-family: "Consolas", monospace; font-size: 9pt; letter-spacing: 1.5px; }
  .pp-name { font-size: 28pt; margin: 4px 0; letter-spacing: 2px; }
  .pp-dateline {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #000;
    padding-top: 5px;
    font-family: "Consolas", monospace;
    font-size: 8.5pt;
    font-weight: bold;
  }
  .pp-weather { margin-top: 6px; font-family: "Consolas", monospace; font-size: 9pt; font-weight: bold; }
  .pp-columns { column-count: 2; column-gap: 22px; column-rule: 1px solid #bbb; }
  .pp-story { break-inside: avoid; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #ddd; }
  .pp-src { font-family: "Consolas", monospace; font-size: 8pt; font-weight: bold; text-transform: uppercase; color: #333; }
  .pp-story h2 { font-size: 12pt; margin: 3px 0 4px; line-height: 1.25; }
  .pp-story p { font-size: 9.5pt; margin: 0 0 4px; line-height: 1.4; }
  .pp-url { font-family: "Consolas", monospace; font-size: 7.5pt; color: #444; word-break: break-all; }
}

/* ==========================================================================
   V1.1 ADDITIONS: MARKETS SPARKLINES, LIVE SCOREBOARD, WRITTEN FORECAST,
   SAVED BADGE, DENSITY SWITCH, FRAMED MORNING PAPER & QUICK GUIDE
   ========================================================================== */
.saved-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--amber);
  color: #111827;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  vertical-align: middle;
}

.density-switch {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}
.dens-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: calc(var(--radius) - 1px);
  cursor: pointer;
  white-space: nowrap;
}
.dens-btn.active { background: var(--accent); color: var(--accent-text); }

/* DECK PANELS (401 MARKETS + 501 SCORES) */
.markets-deck, .scores-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.deck-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.deck-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.deck-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.deck-loading {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 4px;
}

/* 401 MARKET BENCHMARK CARDS + SPARKLINES */
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1080px) {
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .market-grid { grid-template-columns: minmax(0, 1fr); }
}
.mk-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2.5px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mk-card.up { border-top-color: #39ff88; }
.mk-card.down { border-top-color: #ff5c77; }
[data-theme="office"] .mk-card.up { border-top-color: #16a34a; }
[data-theme="office"] .mk-card.down { border-top-color: #dc2626; }

.mk-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mk-name { font-weight: 800; font-size: 13px; color: var(--text-main); }
.mk-sym { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.mk-price-col { text-align: right; font-family: var(--font-mono); }
.mk-price { font-size: 14.5px; font-weight: 900; color: var(--text-main); }
.mk-chg { font-size: 11px; font-weight: 800; }
.mk-chg.up, .mk-stats strong.up { color: #39ff88; }
.mk-chg.down, .mk-stats strong.down { color: #ff5c77; }
[data-theme="office"] .mk-chg.up, [data-theme="office"] .mk-stats strong.up { color: #15803d; }
[data-theme="office"] .mk-chg.down, [data-theme="office"] .mk-stats strong.down { color: #dc2626; }

.mk-spark { width: 100%; height: 44px; display: block; color: var(--text-muted); }

.mk-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.mk-stats strong { color: var(--text-main); }

/* 501 ZERO-BETTING SCOREBOARD STRIP */
.league-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.lg-btn {
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.lg-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.score-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
}
.sc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--font-mono);
}
.sc-card.live { border-color: #39ff88; box-shadow: 0 0 12px rgba(57, 255, 136, 0.12); }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 9.5px; }
.sc-badge { padding: 1px 5px; border-radius: 3px; font-weight: 900; }
.sc-badge.live { background: rgba(57, 255, 136, 0.2); color: #39ff88; }
.sc-badge.final { background: var(--bg-input); color: var(--text-muted); }
.sc-badge.pre { background: rgba(76, 201, 240, 0.16); color: var(--cyan); }
.sc-detail { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-team { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.sc-team.winner { color: var(--text-main); font-weight: 900; }
.sc-abbr { font-weight: 900; color: var(--text-main); min-width: 38px; }
.sc-rec { font-size: 10px; color: var(--text-dim); }
.sc-pts { margin-left: auto; font-size: 14px; font-weight: 900; color: var(--text-main); }

/* 301 WRITTEN FORECAST + WEATHER ALMANAC */
.written-fc-box {
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
[data-theme="office"] .written-fc-box { background: #f8fafc; border-color: #cbd5e1; }
.written-fc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.written-fc-src { font-family: var(--font-mono); font-size: 10.5px; opacity: 0.74; }
.written-fc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.wfc-item {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 9px 11px;
}
[data-theme="office"] .wfc-item { background: #ffffff; border-color: #cbd5e1; }
.wfc-name { font-family: var(--font-mono); font-size: 11px; font-weight: 900; color: #fde047; margin-bottom: 4px; text-transform: uppercase; }
[data-theme="office"] .wfc-name { color: #1d4ed8; }
[data-theme="turbo"] .wfc-name { color: #00ff66; }
.wfc-text { font-size: 12.5px; line-height: 1.5; opacity: 0.94; }

.weather-almanac-card {
  margin-top: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* WALLBOARD CHANNEL TABS & FULLSCREEN BUTTON (LEFT-JUSTIFIED PICKS) */
.wb-ch-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.wb-ch-pill {
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid #2c465c;
  background: #0d1c29;
  color: #9bb3c2;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.wb-ch-pill.active { background: #39ff88; border-color: #39ff88; color: #04150a; }
.wb-fs { border-color: #4cc9f0; color: #4cc9f0; }

/* TOAST */
.wire-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 700;
  padding: 10px 15px;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1.5px solid var(--amber);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

/* FRAMED MORNING PAPER PREVIEW MODAL */
.modal-paper-win {
  width: min(940px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.paper-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.paper-ctrl-group, .paper-ctrl-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.paper-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
}
.paper-select {
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 12.5px;
}
.paper-preview-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: #2b313a;
}
.paper-sheet-frame {
  max-width: 780px;
  margin: 0 auto;
  background: #fdfcf8;
  color: #111111;
  padding: 28px 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  font-family: Georgia, "Times New Roman", serif;
}
.paper-sheet-frame .pp-masthead { text-align: center; border-bottom: 3px double #111; padding-bottom: 10px; margin-bottom: 16px; }
.paper-sheet-frame .pp-edition { font-family: "Consolas", monospace; font-size: 10px; letter-spacing: 1.5px; color: #333; }
.paper-sheet-frame .pp-name { font-size: 32px; margin: 4px 0; letter-spacing: 2px; color: #000; }
.paper-sheet-frame .pp-dateline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid #111;
  padding-top: 6px;
  font-family: "Consolas", monospace;
  font-size: 10px;
  font-weight: bold;
}
.paper-sheet-frame .pp-weather { margin-top: 7px; font-family: "Consolas", monospace; font-size: 11px; font-weight: bold; color: #1e3a8a; }
.paper-sheet-frame .pp-columns { column-count: 2; column-gap: 24px; column-rule: 1px solid #d1d5db; }
.paper-sheet-frame .pp-story { break-inside: avoid; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; }
.paper-sheet-frame .pp-src { font-family: "Consolas", monospace; font-size: 9.5px; font-weight: bold; text-transform: uppercase; color: #444; }
.paper-sheet-frame .pp-story h2 { font-size: 15px; margin: 3px 0 5px; line-height: 1.28; color: #000; }
.paper-sheet-frame .pp-story p { font-size: 12px; margin: 0 0 5px; line-height: 1.45; color: #222; }
.paper-sheet-frame .pp-url { font-family: "Consolas", monospace; font-size: 9px; color: #555; word-break: break-all; }

/* QUICK GUIDE MODAL */
.modal-guide-win { width: min(740px, 95vw); }
.guide-body { display: flex; flex-direction: column; gap: 12px; max-height: 78vh; overflow-y: auto; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.guide-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.guide-block h4 { margin: 0 0 8px; font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.guide-block ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-muted); }
.guide-block strong { color: var(--text-main); }
.guide-sources {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .guide-grid { grid-template-columns: 1fr; }
  .paper-sheet-frame { padding: 18px 16px; }
  .paper-sheet-frame .pp-columns { column-count: 1; }
}

/* RESPONSIVE */
@media (max-width: 1080px) {
  .wire-split { grid-template-columns: minmax(0, 1fr); }
  .briefing-pane { position: static; order: -1; min-width: 0; }
  .almanac-deck { grid-template-columns: minmax(0, 1fr); }
  .mywire-grid { grid-template-columns: minmax(0, 1fr); }
  .local8-hero { grid-template-columns: 84px minmax(0, 1fr); }
  .w-telemetry-grid { grid-column: 1 / -1; }
  .wb-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .brand-sub, .proof-pill { display: none; }
  .topbar { padding: 8px 10px; }
  .controls-cluster { width: 100%; justify-content: space-between; }
  .theme-switch { flex-wrap: wrap; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar,
  .main-stage,
  .wire-stage,
  .weather-stage,
  .mywire-stage,
  .wire-list-pane,
  .briefing-pane,
  .local8-monitor { min-width: 0; max-width: 100%; }
  .main-stage { padding: 10px 10px 20px; }
  .sidebar { position: static; height: auto; overflow-y: visible; border-right: none; border-bottom: 1px solid var(--border); padding: 10px; gap: 8px; }
  .sidebar-card { display: none; }
  .sidebar-footer-stack { margin-top: 4px; padding-top: 0; }
  .tb-sep { display: none; }
  .tool-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tool-tab { min-width: 0; padding: 7px; gap: 7px; overflow: hidden; }
  .tab-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-section-lbl { grid-column: 1 / -1; }
  .tt-banner { padding: 9px 10px; }
  .briefing-pane { padding: 14px; }
  .weather-form { flex-wrap: wrap; max-width: 100%; }
  .weather-form .wire-input { min-width: 0; flex: 1 1 180px; }
  .local8-monitor { padding: 14px 12px; }
  .local8-hero { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .w-art-box { width: 72px; height: 72px; }
  .w-temp-now { font-size: 38px; }
  .w-telemetry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-hourly-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wd-row { grid-template-columns: 44px 24px minmax(0, 1fr) 32px 32px; gap: 6px; padding: 7px 8px; }
  .wd-bar-track, .wd-pop { display: none; }
}

/* ==========================================================================
   STANDARDIZED 8-POINT PRIVACY PROOF MODAL & FOOTER PARITY (PHASE 2 SYNC)
   ========================================================================== */
.proof-pill { white-space: nowrap; }
.proof-checklist {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px;
}
.proof-checklist li {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 9px;
  font-size: 12px; line-height: 1.42; color: var(--text-muted);
}
.proof-checklist li strong { color: var(--text-main); }
.proof-checklist code {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-panel); border: 1px solid var(--border);
  padding: 1px 4px; border-radius: 3px; color: var(--accent);
}
.proof-status-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--green) 10%, var(--bg-input));
  border: 1px solid color-mix(in srgb, var(--green) 42%, var(--border));
  font-family: var(--font-mono); font-size: 11px; color: var(--green);
}
.proof-status-bar a { color: var(--accent); font-weight: 800; text-decoration: none; }
.proof-status-bar a:hover { text-decoration: underline; }
