/* ════════════════════════════════════════════════════════════════
   ugh.fyi — application styles on top of the Deep October theme
   ════════════════════════════════════════════════════════════════ */

:root {
  /* Per-periscope accent colors — each viewport peers into a
     different-colored world.  UFC = matrix green-cyan.  Markets = amber.
     Network = steel.  Crypto/Weather = muted while locked. */
  --ufc-green:       #00F090;
  --ufc-green-dim:   #008A55;
  --net-steel:       var(--do-steel);
  --mkt-amber:       var(--do-amber);
}

/* ═══ FULLSCREEN TOGGLE (overlayed on command banner) ═════════════
   .banner-row wraps the pulsing banner + a sibling button so the
   button doesn't inherit the banner's opacity animation.  Button is
   absolutely positioned over the banner's right edge — no extra row,
   the banner scoots up, button shares the strip.
   ═══════════════════════════════════════════════════════════════ */

.banner-row { position: relative; }

.fs-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);

  width: 28px;
  height: 28px;
  padding: 0;

  background: var(--do-panel);
  border: 1px solid var(--do-border);
  color: var(--do-crimson-dim);

  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: var(--do-font-display);

  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.fs-btn:hover,
.fs-btn:focus-visible {
  color: var(--do-crimson);
  border-color: var(--do-border-bright);
  box-shadow: 0 0 10px rgba(196, 48, 48, 0.35), inset 0 0 4px rgba(196, 48, 48, 0.08);
  outline: none;
}

.fs-btn:active { transform: translateY(calc(-50% + 1px)); }

.fs-icon { width: 14px; height: 14px; display: block; }
.fs-icon-compress { display: none; }

body.is-fullscreen .fs-btn { color: var(--do-crimson); border-color: var(--do-border-bright); }
body.is-fullscreen .fs-icon-expand   { display: none; }
body.is-fullscreen .fs-icon-compress { display: block; }


/* ═══ HERO ═══════════════════════════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 24px 0 20px;
  position: relative;
}

.hero-left { min-width: 0; }

.hero-tagline {
  margin-top: 14px;
  font-family: var(--do-font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--do-text-dim);
  line-height: 1.6;
  max-width: 640px;
}

.hero-right {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 6px;
  align-content: end;
}

.hero-field {
  min-width: 0;
}

.do-field-value.do-wx-broadcast {
  color: #00B8E6;
  text-shadow: 0 0 8px rgba(0,184,230,0.25);
}

.do-field-value.do-mm-gold {
  color: #FFC820;
  text-shadow: 0 0 8px rgba(255,200,32,0.25);
}

.do-field-value.do-crypto-cyan {
  color: #5DD8FF;
  text-shadow: 0 0 8px rgba(93,216,255,0.25);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 520px) {
  .hero-right { grid-template-columns: 1fr 1fr; }
}

/* ═══ TELEMETRY BAND ═══════════════════════════════════════════════
   Three wide live wires (SURFACE WX · MKT BAND · CRYPTO RAIL) lifted
   out of the hero into a horizontal band that sits above the periscope
   array.  Reads as a pre-array readout — same visual language as the
   small hero fields, but its own row so the title block stays lean.
   Stacks to a single column on portrait mobile.
   ═══════════════════════════════════════════════════════════════════ */

.telemetry-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 4px;
}

.telemetry-strip {
  min-width: 0;
}

.telemetry-strip .do-field-value {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .telemetry-band { grid-template-columns: 1fr; gap: 6px; }
}

/* ═══ TACTICAL ALERT — in-cone CRIT storm warning ═════════════════
   Hidden by default.  Revealed by app.js when a CRIT storm event
   arrives via SSE and its lat/lon sits inside the 500km radius of
   the visitor's coarse coords.  Klaxon stripe + crimson border +
   slow inhale-exhale pulse to read as live. */

.tactical-alert {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 9px 22px;
  margin: 14px 0 0;
  border: 1px solid var(--do-crimson);
  background:
    repeating-linear-gradient(135deg,
      rgba(196,48,48,0.04) 0 8px,
      rgba(196,48,48,0.10) 8px 16px),
    rgba(58, 12, 12, 0.55);
  font-family: var(--do-font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--do-crimson-bright, #E84040);
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(196,48,48,0.15) inset, 0 0 24px rgba(196,48,48,0.08);
  animation: tactical-alert-pulse 1.6s ease-in-out infinite;
}

.tactical-alert[hidden] { display: none; }

.tactical-alert-stripe {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--do-crimson-bright, #E84040), var(--do-crimson));
  box-shadow: 0 0 12px rgba(232,64,64,0.7);
}

.tactical-alert-warn {
  font-family: var(--do-font-display);
  font-size: 18px;
  color: var(--do-crimson-bright, #E84040);
  text-shadow: 0 0 12px rgba(232,64,64,0.5);
  flex-shrink: 0;
}

.tactical-alert-text {
  flex: 1;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tactical-alert-dismiss {
  background: none;
  border: 1px solid var(--do-crimson);
  color: var(--do-crimson-bright, #E84040);
  font-family: var(--do-font-display);
  font-weight: 900;
  font-size: 14px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tactical-alert-dismiss:hover,
.tactical-alert-dismiss:focus-visible {
  background: rgba(196, 48, 48, 0.18);
  outline: none;
}

@keyframes tactical-alert-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(196,48,48,0.15) inset, 0 0 24px rgba(196,48,48,0.08); }
  50%      { box-shadow: 0 0 22px rgba(196,48,48,0.30) inset, 0 0 36px rgba(196,48,48,0.20); }
}


/* ═══ PERISCOPE GRID ═══════════════════════════════════════════════
   Big hero tile on the left (2 rows tall), 4 smaller tiles on the right
   arranged 2x2. On narrow viewports everything collapses to a single column.
   ═══════════════════════════════════════════════════════════════════ */

.periscope-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 14px;
}

.periscope-grid .periscope.primary {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

@media (max-width: 1100px) {
  .periscope-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
  }
  .periscope-grid .periscope.primary { grid-column: 1 / -1; grid-row: auto; }
}

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

/* ═══ PERISCOPE (tile) ═══════════════════════════════════════════ */

.periscope {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--do-panel);
  border: 1px solid var(--do-border);
  overflow: hidden;
  text-decoration: none;
  color: var(--do-text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.periscope::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--do-crimson), var(--do-crimson-bright), var(--do-crimson), transparent);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 3;
}

a.periscope:hover,
a.periscope:focus-visible {
  border-color: var(--do-border-bright);
  box-shadow: 0 0 30px rgba(196, 48, 48, 0.18), inset 0 0 0 1px rgba(196, 48, 48, 0.08);
  outline: none;
  transform: translateY(-1px);
}
a.periscope:hover::before,
a.periscope:focus-visible::before { opacity: 1; }

/* CRIT klaxon — fired on a CRIT routing alert via JS class toggle.
   Brief crimson border + glow flare + the top strip lights up.  The
   reflow trick in app.js restarts the animation if back-to-back CRITs
   land. */
.periscope.crit-pulse { animation: do-crit-pulse 600ms ease-out; }
.periscope.crit-pulse::before { animation: do-crit-strip 600ms ease-out; }

@keyframes do-crit-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(196, 48, 48, 0); border-color: var(--do-border); }
  25%  {
    box-shadow:
      0 0 38px 4px rgba(196, 48, 48, 0.55),
      inset 0 0 0 1px rgba(196, 48, 48, 0.45);
    border-color: var(--do-crimson-bright, #E84040);
  }
  100% { box-shadow: 0 0 0 0 rgba(196, 48, 48, 0); border-color: var(--do-border); }
}
@keyframes do-crit-strip {
  0%, 100% { opacity: 0; }
  20%, 70% { opacity: 1; }
}

.periscope-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(196, 48, 48, 0.05);
  border-bottom: 1px solid var(--do-border);
  font-family: var(--do-font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--do-crimson-dim);
}

.periscope-num {
  font-family: var(--do-font-display);
  font-weight: 900;
  font-size: 11px;
  color: var(--do-crimson);
  min-width: 20px;
  text-shadow: 0 0 6px rgba(196, 48, 48, 0.3);
}
.periscope-label {
  flex: 1;
  color: var(--do-text);
  letter-spacing: 3px;
}
.periscope-status { flex-shrink: 0; }

/* ═══ VIEWPORT (the "periscope view") ═══════════════════════════ */

.viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  background: #02060A;
  overflow: hidden;
  /* Slight inset shadow makes it feel like a recessed optical port */
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(68,136,187,0.08);
  color: var(--ufc-green); /* used by octagon SVG via currentColor */
}

.periscope.primary .viewport { min-height: 360px; }

.viewport-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.viewport-octagon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  color: var(--ufc-green);
  filter: drop-shadow(0 0 6px rgba(0, 240, 144, 0.45));
  animation: do-pulse 6s ease-in-out infinite;
}

/* Bezel corner brackets — metal-frame feel */
.viewport-bezel {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  z-index: 3;
}
.bezel-corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--do-border-bright);
  opacity: 0.7;
}
.bezel-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.bezel-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.bezel-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.bezel-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.bezel-reticle {
  position: absolute;
  top: 50%; left: 50%;
  width: 140px; height: 140px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 240, 144, 0.18);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 30px rgba(0, 240, 144, 0.08), inset 0 0 20px rgba(0, 240, 144, 0.06);
}
.bezel-reticle::before,
.bezel-reticle::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  background: rgba(0, 240, 144, 0.25);
}
.bezel-reticle::before { width: 160px; height: 1px; transform: translate(-50%, -50%); }
.bezel-reticle::after  { width: 1px; height: 160px; transform: translate(-50%, -50%); }

.viewport-meta {
  position: absolute;
  left: 14px; right: 14px; bottom: 10px;
  display: flex;
  gap: 14px;
  font-family: var(--do-font-display);
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(0, 240, 144, 0.85);
  text-shadow: 0 0 6px rgba(0, 240, 144, 0.4);
  z-index: 4;
  flex-wrap: wrap;
}
.viewport-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.viewport-meta-item .do-status-dot {
  background: var(--ufc-green);
  box-shadow: 0 0 6px var(--ufc-green);
}

.viewport-overlay {
  position: absolute;
  left: 14px; bottom: 10px;
  font-family: var(--do-font-display);
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(68, 136, 187, 0.8);
  z-index: 4;
}

/* Per-viewport color overrides */
.viewport-steel { color: var(--do-steel); }
.viewport-steel .bezel-reticle { border-color: rgba(68,136,187,0.18); box-shadow: 0 0 24px rgba(68,136,187,0.08), inset 0 0 16px rgba(68,136,187,0.05); }
.viewport-steel .bezel-reticle::before,
.viewport-steel .bezel-reticle::after { background: rgba(68,136,187,0.25); }

.viewport-amber { color: var(--do-amber); }
.viewport-amber .bezel-reticle { border-color: rgba(212,160,48,0.18); box-shadow: 0 0 24px rgba(212,160,48,0.08), inset 0 0 16px rgba(212,160,48,0.05); }
.viewport-amber .bezel-reticle::before,
.viewport-amber .bezel-reticle::after { background: rgba(212,160,48,0.25); }
.viewport-amber .viewport-overlay { color: rgba(212,160,48,0.8); }

/* Hackers-cyan — viewport into routing.ugh.fyi (NORAD threat board theme) */
.viewport-cyan { color: #00D4FF; }
.viewport-cyan .bezel-reticle { border-color: rgba(0,212,255,0.18); box-shadow: 0 0 24px rgba(0,212,255,0.08), inset 0 0 16px rgba(0,212,255,0.05); }
.viewport-cyan .bezel-reticle::before,
.viewport-cyan .bezel-reticle::after { background: rgba(0,212,255,0.25); }
.viewport-cyan .viewport-overlay { color: rgba(0,212,255,0.8); }

/* Broadcast-cyan — viewport into weather.ugh.fyi (Doppler News theme).
   Slightly more turquoise than routing's hackers-cyan so the two
   adjacent sonar tiles read as different stations. */
.viewport-broadcast { color: #00B8E6; }
.viewport-broadcast .bezel-reticle { border-color: rgba(0,184,230,0.18); box-shadow: 0 0 24px rgba(0,184,230,0.08), inset 0 0 16px rgba(0,184,230,0.05); }
.viewport-broadcast .bezel-reticle::before,
.viewport-broadcast .bezel-reticle::after { background: rgba(0,184,230,0.25); }
.viewport-broadcast .viewport-overlay { color: rgba(0,184,230,0.8); }

/* Mad-Markets gold — viewport into markets.ugh.fyi (Cramer/Fast Money
   broadcast theme).  Hotter than the do-amber readout color so the
   tile reads as the loud cable-news cousin of the steel-toned
   subsystems. */
.viewport-mm-gold { color: #FFC820; }
.viewport-mm-gold .bezel-reticle { border-color: rgba(255,200,32,0.18); box-shadow: 0 0 24px rgba(255,200,32,0.08), inset 0 0 16px rgba(255,200,32,0.05); }
.viewport-mm-gold .bezel-reticle::before,
.viewport-mm-gold .bezel-reticle::after { background: rgba(255,200,32,0.25); }
.viewport-mm-gold .viewport-overlay { color: rgba(255,200,32,0.8); }

/* Block-rain ledger cyan — viewport into crypto.ugh.fyi (datacenter
   palette + ledger fiction).  Lighter than routing's hackers-cyan
   so the rain reads as a different signal layer; the tile's title
   uses ledger-green to lock in the blockchain genre identity. */
.viewport-crypto { color: #5DD8FF; }
.viewport-crypto .bezel-reticle { border-color: rgba(93,216,255,0.18); box-shadow: 0 0 24px rgba(93,216,255,0.08), inset 0 0 16px rgba(93,216,255,0.05); }
.viewport-crypto .bezel-reticle::before,
.viewport-crypto .bezel-reticle::after { background: rgba(93,216,255,0.25); }
.viewport-crypto .viewport-overlay { color: rgba(93,216,255,0.8); }

.viewport-locked {
  background:
    repeating-linear-gradient(45deg, rgba(68,80,102,0.04) 0 10px, transparent 10px 20px),
    #02060A;
  color: var(--do-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewport-locked-text {
  font-family: var(--do-font-display);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--do-muted);
  text-align: center;
  z-index: 4;
  text-shadow: 0 0 10px rgba(68,80,102,0.4);
}
.viewport-locked-sub {
  margin-top: 6px;
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--do-text-dim);
}

/* ═══ PERISCOPE BODY (text + CTA) ═══════════════════════════════ */

.periscope-body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--do-border);
  position: relative;
}

.periscope-title {
  font-family: var(--do-font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--do-crimson);
  text-shadow: 0 0 10px rgba(196, 48, 48, 0.3);
  line-height: 1;
  margin-bottom: 8px;
}
.periscope-title.do-steel-title { color: var(--do-steel); text-shadow: 0 0 10px rgba(68,136,187,0.3); }
.periscope-title.do-amber-title { color: var(--do-amber); text-shadow: 0 0 10px rgba(212,160,48,0.3); }
.periscope-title.do-cyan-title  { color: #00D4FF;       text-shadow: 0 0 10px rgba(0,212,255,0.3); }
.periscope-title.do-broadcast-title { color: #FFD000;   text-shadow: 0 0 10px rgba(255,208,0,0.3); }
.periscope-title.do-mm-gold-title   { color: #FFC820;   text-shadow: 0 0 10px rgba(255,200,32,0.3); }
.periscope-title.do-crypto-title    { color: #5AFFAB;   text-shadow: 0 0 10px rgba(90,255,171,0.3); }

.periscope-blurb {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--do-text-dim);
  letter-spacing: 0.5px;
  margin: 0 0 0 0;
}

.periscope.small .periscope-title { font-size: 13px; margin-bottom: 4px; }
.periscope.small .periscope-blurb { font-size: 10.5px; line-height: 1.4; }

/* Big CTA on the primary periscope */
.periscope-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(196,48,48,0.15), rgba(196,48,48,0.02));
  border: 1px solid var(--do-border-bright);
  font-family: var(--do-font-display);
  transition: all 0.2s;
}
a.periscope:hover .periscope-cta {
  background: linear-gradient(90deg, rgba(196,48,48,0.25), rgba(196,48,48,0.05));
  box-shadow: inset 0 0 20px rgba(196,48,48,0.1);
}
.cta-chevron {
  font-size: 16px;
  color: var(--do-crimson);
  text-shadow: 0 0 10px rgba(196,48,48,0.6);
  animation: do-pulse 2s ease-in-out infinite;
}
.cta-text {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  flex: 1;
}
.cta-sub {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--do-crimson);
}

/* Dim the locked/incoming tiles */
.periscope.locked { opacity: 0.7; }
.periscope.locked:hover { opacity: 0.85; }

/* ═══ BRIEFING GRID ═════════════════════════════════════════════ */

.briefing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 800px) {
  .briefing-grid { grid-template-columns: 1fr; }
}

.events-table th, .events-table td {
  white-space: nowrap;
}
.events-table td.event-code {
  font-family: var(--do-font-display);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--do-crimson);
}
.events-table td.event-window {
  color: var(--do-text-dim);
  font-size: 10px;
}
.events-table td.event-countdown {
  font-family: var(--do-font-display);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--do-amber);
  text-align: right;
}
.events-table td.event-countdown.soon { color: var(--do-crimson); animation: do-pulse 2s ease-in-out infinite; }
.events-table td.event-name { color: var(--do-text); font-size: 11px; }

.events-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ═══ GLOBAL STATION CLOCKS ═══════════════════════════════════════
   Rack of synchronized city clocks — each card is a "station":
   brushed steel bezel, amber LCD time display under glass, 24h
   day/night bar with a crimson current-time tick, fake DSN callsign.
   ═══════════════════════════════════════════════════════════════ */

.station-clocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.station-clocks.expanded { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.station-clocks.compact  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .station-clocks.compact  { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1100px) { .station-clocks { grid-template-columns: repeat(3, minmax(0,1fr)); }
                              .station-clocks.expanded { grid-template-columns: repeat(3, minmax(0,1fr)); }
                              .station-clocks.compact  { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px)  { .station-clocks { grid-template-columns: repeat(2, minmax(0,1fr)); }
                              .station-clocks.expanded { grid-template-columns: repeat(2, minmax(0,1fr)); }
                              .station-clocks.compact  { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 420px)  { .station-clocks { grid-template-columns: 1fr; }
                              .station-clocks.expanded { grid-template-columns: 1fr; }
                              .station-clocks.compact  { grid-template-columns: 1fr; } }

/* MUSTER toggle chip — looks like a do-chip but acts like a button */
.do-chip-action {
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--do-steel);
  background: rgba(68, 136, 187, 0.06);
  border: 1px solid rgba(68, 136, 187, 0.35);
  padding: 2px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  text-transform: uppercase;
}
.do-chip-action:hover,
.do-chip-action:focus-visible {
  color: var(--do-steel-bright, #88B8E0);
  border-color: rgba(68, 136, 187, 0.7);
  background: rgba(68, 136, 187, 0.12);
  outline: none;
}
.do-chip-action[aria-pressed="true"] {
  color: var(--do-amber);
  border-color: rgba(212, 160, 48, 0.55);
  background: rgba(212, 160, 48, 0.08);
}

/* Pin button — top-right of each station-clock card */
.sc-pin {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  color: rgba(68, 136, 187, 0.5);
  background: transparent;
  border: 1px solid rgba(68, 136, 187, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.sc-pin:hover,
.sc-pin:focus-visible {
  color: var(--do-amber);
  border-color: rgba(212, 160, 48, 0.6);
  outline: none;
  transform: scale(1.1);
}
.sc-pin.is-pinned {
  color: var(--do-amber);
  border-color: rgba(212, 160, 48, 0.6);
  background: rgba(212, 160, 48, 0.08);
  text-shadow: 0 0 4px rgba(212, 160, 48, 0.5);
}
.sc-pin.disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.sc-pin.disabled:hover {
  transform: none;
  color: rgba(68, 136, 187, 0.5);
  border-color: rgba(68, 136, 187, 0.25);
}

/* Pinned card — soft amber accent on top edge */
.station-clock.pinned::before {
  background: linear-gradient(90deg, transparent, var(--do-amber), rgba(212,160,48,0.5), var(--do-amber), transparent);
  opacity: 0.5;
}

/* Rotator slot — subtle scan-line ripple so the eye knows it's the rotating one */
.station-clock.rotator {
  border-color: rgba(68, 136, 187, 0.45);
}
.station-clock.rotator::before {
  background: linear-gradient(90deg, transparent, var(--do-steel), var(--do-steel-bright, #88B8E0), var(--do-steel), transparent);
  opacity: 0.6;
  animation: do-rotator-shimmer 2.5s ease-in-out infinite;
}
@keyframes do-rotator-shimmer {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.85; }
}

.station-clock {
  position: relative;
  background:
    linear-gradient(180deg, rgba(68,136,187,0.04), transparent 40%),
    var(--do-panel);
  border: 1px solid var(--do-border-steel);
  padding: 10px 14px 12px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}

/* Brushed-steel top edge highlight */
.station-clock::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--do-steel), var(--do-steel-dim), var(--do-steel), transparent);
  opacity: 0.35;
}
.station-clock:hover { border-color: rgba(68,136,187,0.55); }
.station-clock:hover::before { opacity: 0.7; }

/* Tiny rivet dots in each corner for that machined-panel feel */
.station-clock::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 6px 6px, rgba(68,136,187,0.25) 0, rgba(68,136,187,0.25) 1px, transparent 1.5px),
    radial-gradient(circle at calc(100% - 6px) 6px, rgba(68,136,187,0.25) 0, rgba(68,136,187,0.25) 1px, transparent 1.5px),
    radial-gradient(circle at 6px calc(100% - 6px), rgba(68,136,187,0.25) 0, rgba(68,136,187,0.25) 1px, transparent 1.5px),
    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), rgba(68,136,187,0.25) 0, rgba(68,136,187,0.25) 1px, transparent 1.5px);
}

/* Reference clock (ZULU) — steel-tinted LCD instead of amber */
.station-clock.reference {
  border-color: rgba(68,136,187,0.55);
  background:
    linear-gradient(180deg, rgba(68,136,187,0.08), transparent 40%),
    var(--do-panel);
}
.station-clock.reference::before { opacity: 0.7; }

/* Local-timezone highlight — the operator's own station glows crimson */
.station-clock.local {
  border-color: var(--do-crimson);
  box-shadow: inset 0 0 22px rgba(196,48,48,0.07), 0 0 18px rgba(196,48,48,0.12);
}
.station-clock.local::before {
  background: linear-gradient(90deg, transparent, var(--do-crimson), var(--do-crimson-bright), var(--do-crimson), transparent);
  opacity: 1;
}

/* ── Header: LED + IATA + city + day/night pill ─────────── */
.sc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--do-font-display);
  font-size: 10px;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}
.sc-led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--do-steel);
  box-shadow: 0 0 8px var(--do-steel), inset 0 0 1px rgba(255,255,255,0.6);
  animation: do-sonar-blink 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
.station-clock.reference .sc-led { background: var(--do-amber); box-shadow: 0 0 8px var(--do-amber), inset 0 0 1px rgba(255,255,255,0.7); }
.station-clock.local .sc-led     { background: var(--do-crimson); box-shadow: 0 0 8px var(--do-crimson), inset 0 0 1px rgba(255,255,255,0.7); }

.sc-iata {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--do-steel);
  text-shadow: 0 0 6px rgba(68,136,187,0.3);
  flex-shrink: 0;
}
.station-clock.reference .sc-iata { color: var(--do-amber); text-shadow: 0 0 6px rgba(212,160,48,0.35); }
.station-clock.local .sc-iata     { color: var(--do-crimson); text-shadow: 0 0 6px rgba(196,48,48,0.4); }

.sc-city {
  flex: 1;
  color: var(--do-text-dim);
  letter-spacing: 1.5px;
  font-size: 9px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}
.sc-dn {
  font-size: 8px;
  letter-spacing: 1.5px;
  padding: 1px 6px;
  border: 1px solid currentColor;
  color: var(--do-text-dim);
  font-weight: 700;
  flex-shrink: 0;
}
.sc-dn.day       { color: var(--do-steel); }
.sc-dn.twilight  { color: var(--do-amber); }
.sc-dn.night     { color: var(--do-muted); }

/* ── LCD display surround — amber glass with scanlines & glare ── */
.sc-display {
  position: relative;
  padding: 7px 10px 9px;
  margin: 2px 0 8px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,160,48,0.10), rgba(10,6,2,0.6) 70%),
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
  border: 1px solid rgba(212,160,48,0.28);
  box-shadow:
    inset 0 0 22px rgba(0,0,0,0.65),
    inset 0 0 2px rgba(212,160,48,0.18),
    0 0 10px rgba(212,160,48,0.08);
  overflow: hidden;
  z-index: 1;
}
.station-clock.reference .sc-display {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(68,136,187,0.12), rgba(2,6,10,0.6) 70%),
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
  border-color: rgba(68,136,187,0.35);
  box-shadow:
    inset 0 0 22px rgba(0,0,0,0.65),
    inset 0 0 2px rgba(68,136,187,0.22),
    0 0 10px rgba(68,136,187,0.12);
}
.sc-display::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.20) 2px 3px);
  pointer-events: none;
}
.sc-display-glare {
  position: absolute;
  top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent);
  pointer-events: none;
}

.sc-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  font-family: var(--do-font-display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 2px;
  color: var(--do-amber);
  text-shadow: 0 0 14px rgba(212,160,48,0.55), 0 0 2px rgba(255,220,140,0.6);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.station-clock.reference .sc-time {
  color: var(--do-steel);
  text-shadow: 0 0 14px rgba(68,136,187,0.55), 0 0 2px rgba(200,230,255,0.7);
}
.sc-colon {
  display: inline-block;
  margin: 0 3px;
  animation: do-colon-blink 1s steps(2, end) infinite;
  transform: translateY(-1px);
}
.sc-ss {
  font-size: 0.45em;
  color: var(--do-amber-dim);
  letter-spacing: 1.5px;
  align-self: flex-end;
  margin-left: 8px;
  padding-bottom: 2px;
  text-shadow: 0 0 4px rgba(212,160,48,0.3);
  font-weight: 700;
}
.station-clock.reference .sc-ss {
  color: var(--do-steel-dim);
  text-shadow: 0 0 4px rgba(68,136,187,0.3);
}

/* ── Meta row: UTC offset · weekday ── */
.sc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 2px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.sc-offset {
  font-family: var(--do-font-display);
  color: var(--do-text);
  font-weight: 700;
}
.sc-day {
  font-family: var(--do-font-display);
  font-weight: 700;
  color: var(--do-text-dim);
}
.sc-day.next { color: var(--do-amber); }
.sc-day.prev { color: var(--do-steel-dim); }

/* ── 24h day/night bar with current-time tick ── */
.sc-daybar { position: relative; z-index: 1; }
.sc-daybar-track {
  position: relative;
  height: 7px;
  background: linear-gradient(90deg,
    rgba(20,26,40,0.85) 0%,
    rgba(20,26,40,0.85) 22%,
    rgba(212,160,48,0.30) 26%,
    rgba(68,136,187,0.28) 32%,
    rgba(68,136,187,0.28) 68%,
    rgba(212,160,48,0.30) 74%,
    rgba(20,26,40,0.85) 78%,
    rgba(20,26,40,0.85) 100%
  );
  border: 1px solid rgba(68,136,187,0.25);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.4);
}
/* Tick marks at 06, 12, 18 */
.sc-daybar-track::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, transparent calc(25% - 0.5px), rgba(68,136,187,0.45) calc(25% - 0.5px), rgba(68,136,187,0.45) calc(25% + 0.5px), transparent calc(25% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(68,136,187,0.55) calc(50% - 0.5px), rgba(68,136,187,0.55) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(75% - 0.5px), rgba(68,136,187,0.45) calc(75% - 0.5px), rgba(68,136,187,0.45) calc(75% + 0.5px), transparent calc(75% + 0.5px));
}
.sc-daybar-marker {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 2px;
  background: var(--do-crimson);
  box-shadow: 0 0 8px rgba(196,48,48,0.8), inset 0 0 1px rgba(255,255,255,0.5);
  transition: left 0.9s linear;
  will-change: left;
}
.station-clock.reference .sc-daybar-marker {
  background: var(--do-amber);
  box-shadow: 0 0 8px rgba(212,160,48,0.8), inset 0 0 1px rgba(255,255,255,0.5);
}
.sc-daybar-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--do-text-dim);
  font-family: var(--do-font-display);
}

/* ── Callsign footer: fake DSN designation + comm frequency ── */
.sc-callsign {
  margin-top: 8px;
  padding-top: 5px;
  border-top: 1px dashed rgba(68,136,187,0.14);
  font-family: var(--do-font-display);
  font-size: 7px;
  letter-spacing: 2.5px;
  color: var(--do-text-dim);
  text-align: center;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-callsign .freq { color: var(--do-steel-dim); }
.station-clock.reference .sc-callsign .freq { color: var(--do-amber-dim); }

/* ── Colon blink keyframe ── */
@keyframes do-colon-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}

/* ═══ SYSTEM LOG ═══════════════════════════════════════════════ */

/* Briefing-grid: events panel drives the row height; the syslog panel
   stretches to match.  We want the inner .syslog to fill that stretched
   height so there's no dead band at the bottom — but without its 60-line
   buffer pushing the row taller.  Trick: only the syslog panel goes
   flex column; its body is a positioning anchor with flex-basis 0 so
   it doesn't contribute to the panel's intrinsic height; the .syslog
   itself is absolutely positioned and fills the body, scrolling its
   own overflow. */
.briefing-grid > .do-panel:has(.syslog) {
  display: flex;
  flex-direction: column;
}
.briefing-grid > .do-panel:has(.syslog) > .do-panel-body {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
}
.syslog {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 10px 14px;
  font-family: var(--do-font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--do-text-dim);
}
.syslog-line {
  display: grid;
  grid-template-columns: 68px auto 1fr;
  gap: 8px;
  animation: do-slide-down 0.25s ease;
}
.syslog-time { color: var(--do-text-dim); }
.syslog-tag {
  font-family: var(--do-font-display);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 1px 0 0;
}
.syslog-tag.info  { color: var(--do-steel); }
.syslog-tag.warn  { color: var(--do-amber); }
.syslog-tag.alert { color: var(--do-crimson); }
.syslog-tag.ok    { color: var(--do-green); }
.syslog-tag.recv  { color: #6BD4E8; text-shadow: 0 0 5px rgba(107,212,232,0.4); }
.syslog-msg { color: var(--do-text); }

/* ═══ BOTTOM GRID ═══════════════════════════════════════════════ */

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 14px;
}
@media (max-width: 900px) { .bottom-grid { grid-template-columns: 1fr; } }

/* ═══ RADIO TICKER ═══════════════════════════════════════════════ */

.radio-ticker {
  margin-top: 28px;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--do-border);
  background: var(--do-panel);
  overflow: hidden;
}
.radio-ticker-label {
  padding: 8px 14px;
  font-family: var(--do-font-display);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--do-crimson);
  background: rgba(196,48,48,0.08);
  border-right: 1px solid var(--do-border-bright);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.radio-ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.radio-ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 0;
  font-family: var(--do-font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--do-text);
  animation: ticker-scroll 60s linear infinite;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ═══ FOOTER ═════════════════════════════════════════════════════ */

.do-app-footer {
  padding: 20px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 10px;
  letter-spacing: 3px;
}
.do-app-footer a:hover { color: var(--do-crimson) !important; }

/* ═══ MARKET WIRE INTERCEPTS ═════════════════════════════════════
   CNBC RSS news list — server-fetched, cached, stale-tolerant.
   Visually a sibling of the syslog: same scroll/density rhythm,
   but each row is an anchor that opens the source article.
   ═══════════════════════════════════════════════════════════════ */

.news-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}

.news-line {
  display: grid;
  grid-template-columns: 56px 44px 1fr;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid rgba(68,80,102,0.12);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s, border-color 0.15s;
}
.news-line:first-child { border-top: none; }
.news-line:hover,
.news-line:focus-visible {
  background: rgba(196,48,48,0.05);
  outline: none;
}
.news-line:hover .news-title,
.news-line:focus-visible .news-title {
  color: #fff;
  text-shadow: 0 0 6px rgba(196,48,48,0.25);
}

.news-time {
  font-family: var(--do-font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--do-text-dim);
  padding-top: 1px;
  white-space: nowrap;
}

.news-tag {
  font-family: var(--do-font-display);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--do-amber);
  padding-top: 2px;
  text-shadow: 0 0 4px rgba(212,160,48,0.3);
  white-space: nowrap;
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.news-title {
  font-family: var(--do-font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--do-text);
  letter-spacing: 0.3px;
  transition: color 0.15s;
}
.news-desc {
  font-family: var(--do-font-mono);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--do-text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-empty {
  padding: 28px 14px;
  text-align: center;
  font-family: var(--do-font-display);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--do-text-dim);
}

@media (max-width: 520px) {
  .news-line { grid-template-columns: 48px 36px 1fr; gap: 8px; padding: 8px 12px; }
  .news-title { font-size: 11.5px; }
  .news-desc  { font-size: 10px; }
}

/* ═══ HELPERS ════════════════════════════════════════════════════ */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ═══ DIVE CLEARANCE MODAL ════════════════════════════════════════
   First-visit consent gate.  Klaxon stripe across the top, crimson-
   bordered modal slams in.  Two answers persist a flag so we don't
   ask again.  Withdrawal lives in the footer (RETURN TO SURFACE).
   ═══════════════════════════════════════════════════════════════ */

.dive-clearance {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(8, 14, 20, 0.92), rgba(0, 0, 0, 0.97));
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dc-fade-in 0.3s ease-out;
}
.dive-clearance[hidden] { display: none; }
@keyframes dc-fade-in { from { opacity: 0; } to { opacity: 1; } }

.dive-klaxon {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--do-crimson) 0 8px,
    #1a0810 8px 16px
  );
  animation: dc-klaxon 0.6s linear infinite;
}
@keyframes dc-klaxon {
  from { background-position: 0 0; }
  to   { background-position: 32px 0; }
}

.dive-modal {
  position: relative;
  width: 92%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 16px;
  animation: dc-slam-in 0.45s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes dc-slam-in {
  from { transform: translateY(-30px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

.dive-modal-frame {
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(196, 48, 48, 0.04) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #08121C, #050A10);
  border: 2px solid var(--do-crimson);
  box-shadow:
    0 0 40px rgba(196, 48, 48, 0.35),
    inset 0 0 60px rgba(196, 48, 48, 0.06);
  padding: 32px 28px 24px;
}

.dc-corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--do-crimson-bright, #E84848);
  pointer-events: none;
}
.dc-corner.tl { top: -3px; left:  -3px; border-right: none; border-bottom: none; }
.dc-corner.tr { top: -3px; right: -3px; border-left:  none; border-bottom: none; }
.dc-corner.bl { bottom: -3px; left:  -3px; border-right: none; border-top: none; }
.dc-corner.br { bottom: -3px; right: -3px; border-left:  none; border-top: none; }

.dive-modal-warning {
  font-family: var(--do-font-display);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--do-crimson);
  text-shadow: 0 0 10px rgba(196, 48, 48, 0.6);
  text-align: center;
  margin-bottom: 6px;
  animation: dc-pulse 1.4s ease-in-out infinite;
}
@keyframes dc-pulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; text-shadow: 0 0 18px rgba(196, 48, 48, 0.8); }
}
.dive-modal-subtitle {
  font-family: var(--do-font-display);
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--do-steel);
  text-align: center;
  margin-bottom: 12px;
}
.dive-modal-rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--do-crimson), transparent);
  margin: 0 0 16px;
  opacity: 0.6;
}

.dive-modal-body {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--do-text, #C8D2DC);
  margin-bottom: 18px;
}
.dive-modal-body p { margin: 0 0 10px; }
.dc-list-label {
  font-family: var(--do-font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--do-amber);
}
.dc-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 11.5px;
}
.dc-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.dc-list li::before {
  content: '▸';
  position: absolute; left: 0; top: 0;
  color: var(--do-amber);
}
.dc-fineprint {
  font-size: 11px;
  color: var(--do-text-dim);
  font-style: italic;
}

.dive-modal-briefing {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(68, 136, 187, 0.05);
  border: 1px solid rgba(68, 136, 187, 0.2);
}
.dive-modal-briefing[hidden] { display: none; }
.dc-briefing-title {
  font-family: var(--do-font-display);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--do-steel);
  margin-bottom: 8px;
}
.dc-briefing-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 4px 10px;
  font-size: 11px;
  align-items: baseline;
}
.dc-key {
  font-family: var(--do-font-display);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--do-text-dim);
  text-transform: uppercase;
}
.dc-val { color: var(--do-text, #C8D2DC); }

.dive-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dc-btn {
  font-family: var(--do-font-display);
  font-size: 11px;
  letter-spacing: 2.5px;
  padding: 10px 14px;
  cursor: pointer;
  background: transparent;
  transition: all 0.15s;
  text-align: center;
  text-transform: uppercase;
}
.dc-btn-primary {
  color: var(--do-crimson-bright, #E84848);
  border: 1px solid var(--do-crimson);
  background: rgba(196, 48, 48, 0.08);
  box-shadow: inset 0 0 16px rgba(196, 48, 48, 0.06);
  animation: dc-primary-pulse 2.2s ease-in-out infinite;
}
@keyframes dc-primary-pulse {
  0%, 100% { box-shadow: inset 0 0 16px rgba(196, 48, 48, 0.06), 0 0 0 rgba(196, 48, 48, 0); }
  50%      { box-shadow: inset 0 0 22px rgba(196, 48, 48, 0.12), 0 0 22px rgba(196, 48, 48, 0.25); }
}
.dc-btn-primary:hover,
.dc-btn-primary:focus-visible {
  background: rgba(196, 48, 48, 0.18);
  outline: none;
}
.dc-btn-decline {
  color: var(--do-text-dim);
  border: 1px solid var(--do-border);
}
.dc-btn-decline:hover,
.dc-btn-decline:focus-visible {
  color: var(--do-text);
  border-color: var(--do-border-bright);
  outline: none;
}
.dc-btn-link {
  color: var(--do-steel);
  border: none;
  font-size: 10px;
  padding: 4px;
}
.dc-btn-link:hover,
.dc-btn-link:focus-visible {
  color: var(--do-steel-bright, #88B8E0);
  outline: none;
}

/* RETURN TO SURFACE chip in the footer — withdrawal of consent */
.dive-revoke {
  font-family: var(--do-font-display);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--do-text-dim);
  background: transparent;
  border: 1px solid rgba(68, 136, 187, 0.2);
  padding: 1px 6px;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s;
}
.dive-revoke[hidden] { display: none; }
.dive-revoke:hover,
.dive-revoke:focus-visible {
  color: var(--do-amber);
  border-color: rgba(212, 160, 48, 0.5);
  outline: none;
}

/* ═══ EVENTS TABLE WRAP ═════════════════════════════════════════════
   Holds the dense fight-card table.  Code / window / countdown cells
   stay nowrap so they read as one-line readouts; event-name cells
   wrap (rule above) so the table fits on desktop without a horizontal
   scrollbar.  Wrapper still allows horizontal scroll if the panel is
   narrower than the smallest reasonable rendering.
   ═══════════════════════════════════════════════════════════════════ */
.events-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ═══ THEMED SCROLLBARS ═════════════════════════════════════════════
   The scrollable panels (combat ops table, syslog, financial cables)
   default to bright OS chrome that clashes with the deep-october dark
   theme.  Recolor them as thin steel rails with a crimson hover so
   they read as bridge instrumentation rather than browser chrome.
   ═══════════════════════════════════════════════════════════════════ */
.events-table-wrap,
.syslog,
.news-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(68, 136, 187, 0.40) transparent;
}
.events-table-wrap::-webkit-scrollbar,
.syslog::-webkit-scrollbar,
.news-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}
.events-table-wrap::-webkit-scrollbar-track,
.syslog::-webkit-scrollbar-track,
.news-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.30);
  border-left: 1px solid rgba(68, 136, 187, 0.10);
}
.events-table-wrap::-webkit-scrollbar-thumb,
.syslog::-webkit-scrollbar-thumb,
.news-list::-webkit-scrollbar-thumb {
  background: rgba(68, 136, 187, 0.35);
  border: 1px solid rgba(68, 136, 187, 0.55);
  box-shadow: inset 0 0 4px rgba(68, 136, 187, 0.25);
}
.events-table-wrap::-webkit-scrollbar-thumb:hover,
.syslog::-webkit-scrollbar-thumb:hover,
.news-list::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 48, 48, 0.45);
  border-color: rgba(196, 48, 48, 0.65);
  box-shadow: inset 0 0 4px rgba(196, 48, 48, 0.30);
}
.events-table-wrap::-webkit-scrollbar-corner,
.syslog::-webkit-scrollbar-corner,
.news-list::-webkit-scrollbar-corner {
  background: transparent;
}

/* ═══ MOBILE PORTRAIT FIXES ═════════════════════════════════════════
   Side-effects of the kitchen-sink build that wired up all five
   periscopes — sections that flex-laid-out without wrap, banners with
   wide letter-spacing, and a hero that was carrying telemetry strips
   it shouldn't have. Telemetry strips are now in their own band; the
   rules below catch the remaining overflow points.
   ═══════════════════════════════════════════════════════════════════ */

/* Section headers carry a heading + 1-5 chips. Without wrap they
   overflow on phones. Allow wrap; tighten padding/gap so wrapped
   chips read as a second row instead of falling off the right. */
.do-section-header {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* Periscope header on narrow: let the OPERATIONAL badge drop under the
   label rather than fighting for the same line. Label flex-grows to
   fill. */
@media (max-width: 480px) {
  .periscope-header {
    flex-wrap: wrap;
    row-gap: 4px;
    padding: 8px 12px;
    letter-spacing: 1.5px;
  }
  .periscope-label { letter-spacing: 2px; font-size: 9.5px; }
}

/* Tactical alert — long crit text needs to wrap, not overflow. */
@media (max-width: 600px) {
  .tactical-alert {
    padding: 8px 12px 8px 18px;
    gap: 8px;
    letter-spacing: 1px;
    font-size: 11px;
  }
  .tactical-alert-text { min-width: 0; }
}

/* Hero on narrow: the title + 4 small fields (ZULU/DEPTH/BEARING/COORDS)
   were squeezing at 2-col under 520px. Tighten field padding + letter-
   spacing so the values stay legible. Below 380px, drop to a single
   column so values aren't truncated mid-readout. */
@media (max-width: 520px) {
  .hero { padding: 18px 0 16px; gap: 16px; }
  .hero-right .do-field { padding: 6px 8px; }
  .hero-tagline { font-size: 11px; letter-spacing: 1.5px; }
}
@media (max-width: 380px) {
  .hero-right { grid-template-columns: 1fr; }
}

/* Telemetry strips: tighten value font on phones so 5-segment lines
   like "BTC 79,858 +1.91% · ETH 2,370 +2.65% · SOL 84.90 · USDT.D 6.9%"
   read as one line instead of ellipsis-ing aggressively. */
@media (max-width: 600px) {
  .telemetry-strip { padding: 6px 8px; }
  .telemetry-strip .do-field-value { font-size: 11px; letter-spacing: 0.5px; }
}

/* Command banner: 3px letter-spacing + a long rotating string can edge
   over on the smallest phones. Soft-tighten + allow word wrap. */
@media (max-width: 520px) {
  .do-command-banner {
    letter-spacing: 2px;
    padding: 6px 36px 6px 12px; /* leave room for the fs-btn on the right */
    font-size: 8.5px;
  }
}

/* Section heading + chip row: tighten chip letter-spacing slightly so
   wrapped rows don't carry extra inter-letter air. */
@media (max-width: 520px) {
  .do-section-header { padding: 10px 12px; gap: 8px; }
  .do-chip, .do-chip-action { letter-spacing: 0.5px; }
}

/* Status bar already wraps via the theme; just tighten gap on phones
   so the dot rows pack tighter. */
@media (max-width: 520px) {
  .do-status-bar { gap: 14px; letter-spacing: 1.5px; }
}

/* Footer: long " · " separator runs sit fine but tighten letter-spacing
   to keep wrapped rows tidy. */
@media (max-width: 520px) {
  .do-app-footer { letter-spacing: 2px; gap: 8px; }
}
