/* cubawatch — dark mobile, periodismo serio.
   Geist + Geist Mono. Densidad respirable, contraste alto.
   Adaptado del prototipo (React mock) a HTML estático + vanilla JS. */

:root {
  /* Default: LIGHT theme */
  --bg-page:    oklch(0.96 0.005 250);
  --bg-app:     oklch(0.99 0.003 250);
  --bg-elev:    oklch(0.96 0.005 250);
  --bg-elev-2:  oklch(0.93 0.007 250);
  --bg-tabbar:  oklch(0.99 0.003 250);
  --bg-sheet:   oklch(0.99 0.003 250);
  --bg-overlay: color-mix(in oklab, oklch(0.2 0.01 250) 40%, transparent);

  --line:       oklch(0.85 0.008 250);
  --line-soft:  oklch(0.90 0.006 250);
  --line-strong:oklch(0.70 0.012 250);

  --t-1: oklch(0.18 0.012 250);
  --t-2: oklch(0.34 0.012 250);
  --t-3: oklch(0.50 0.012 250);
  --t-4: oklch(0.60 0.012 250);
  --t-5: oklch(0.70 0.012 250);

  --accent:     oklch(0.55 0.14 240);
  --accent-dim: oklch(0.55 0.14 240 / 0.14);

  /* Levels */
  --l-green:    oklch(0.62 0.18 145);
  --l-yellow:   oklch(0.72 0.18 80);
  --l-orange:   oklch(0.66 0.20 50);
  --l-red:      oklch(0.56 0.22 25);

  --l-green-bg:  oklch(0.62 0.18 145 / 0.12);
  --l-yellow-bg: oklch(0.72 0.18 80  / 0.18);
  --l-orange-bg: oklch(0.66 0.20 50  / 0.14);
  --l-red-bg:    oklch(0.56 0.22 25  / 0.12);

  color-scheme: light;

  /* Type */
  --f-sans: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --f-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --base: 17px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --tap: 44px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  height: 100dvh;
  overflow: hidden;
}
html { background: var(--bg-page); }
body {
  font-family: var(--f-sans);
  font-size: var(--base);
  line-height: 1.45;
  color: var(--t-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* =================================================================
   Phone-shaped column centered on dark canvas
================================================================= */
.canvas {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(1200px 800px at 50% -10%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 70%),
    var(--bg-page);
}
.device {
  width: 100%;
  max-width: 460px;
  height: 100%;
  background: var(--bg-app);
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
}
@media (max-width: 480px) {
  .device { border-left: none; border-right: none; }
}

/* =================================================================
   App bar
================================================================= */
.appbar {
  flex: 0 0 auto;
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-app);
  padding-top: max(env(safe-area-inset-top, 0px), 14px);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.brand-stack { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--t-1);
  line-height: 1.05;
}
.brand-sub {
  font-size: 11.5px;
  color: var(--t-4);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Day counter (top-right) */
.day-counter {
  text-align: right;
  line-height: 1.15;
  font-size: 10px;
  color: var(--t-3);
  white-space: nowrap;
}
.day-counter .d-label { font-size: 10px; color: var(--t-4); }
.day-counter .d-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--t-1);
  letter-spacing: -0.01em;
}
.day-counter .d-sub { font-size: 9.5px; color: var(--t-4); margin-top: 1px; }

/* Smaller icon button variant */
.icon-btn.icon-btn-sm { width: 32px; height: 32px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: var(--t-2);
  position: relative;
}
.icon-btn:hover { background: var(--bg-elev); }
.icon-btn svg { display: block; }
.icon-btn .icon-moon { display: none; }
.theme-dark .icon-btn .icon-sun  { display: none; }
.theme-dark .icon-btn .icon-moon { display: block; }

/* Install CTA card (shown in Más tab when supported / iOS) */
.install-card {
  margin: 14px 18px 0;
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: none;
}
.install-card.is-visible { display: block; }
.install-card .t {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t-1);
  display: flex; align-items: center; gap: 8px;
}
.install-card .d {
  font-size: 13.5px;
  color: var(--t-3);
  margin: 6px 0 12px;
  line-height: 1.45;
}
.install-card .ios-hint {
  font-size: 13px;
  color: var(--t-2);
  background: var(--bg-elev-2);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}
.install-card .ios-hint kbd {
  display: inline-flex; align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-app);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-1);
  margin: 0 2px;
}
.install-card button {
  height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--t-1);
  color: var(--bg-app);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
}

/* Sub-strip with level/score/time */
.status-strip {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px 12px;
  flex-wrap: wrap;
  background: var(--bg-app);
  border-bottom: 1px solid var(--line-soft);
}
.pill-level {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--lvl-bg);
  color: var(--lvl-c);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid color-mix(in oklab, var(--lvl-c) 35%, transparent);
}
.pill-level .pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lvl-c);
  animation: pulse-soft 2s ease-in-out infinite;
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.status-score {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--t-2);
}
.status-score b { color: var(--t-1); font-weight: 700; }
.status-score i {
  font-style: normal;
  color: var(--t-4);
  font-size: 11px;
  margin-left: 1px;
}
.status-time {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-4);
  letter-spacing: 0.04em;
}

/* =================================================================
   Pull-to-refresh
================================================================= */
.ptr {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(-100%);
  transition: transform 200ms cubic-bezier(.2,.7,.2,1);
  color: var(--t-3);
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 4;
  pointer-events: none;
}
.ptr .ptr-spinner {
  width: 14px; height: 14px;
  border: 1.5px solid var(--line-strong);
  border-top-color: var(--t-1);
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}
.ptr.is-armed .ptr-spinner { border-top-color: var(--accent); }
.ptr.is-loading .ptr-spinner { animation: spin 800ms linear infinite; }
.ptr.is-armed .ptr-text::before { content: "Suelta para actualizar"; }
.ptr:not(.is-armed):not(.is-loading) .ptr-text::before { content: "Tira para actualizar"; }
.ptr.is-loading .ptr-text::before { content: "Sincronizando…"; }
.ptr .ptr-text { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =================================================================
   Tab body / panes
================================================================= */
.tab-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.tab-body::-webkit-scrollbar { width: 4px; }
.tab-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.scroll-pad { padding-bottom: 24px; }

.pane { display: none; }
.pane.is-active { display: block; }

/* =================================================================
   Bottom tab bar
================================================================= */
.tabbar {
  flex: 0 0 auto;
  z-index: 30;
  background: color-mix(in oklab, var(--bg-tabbar) 92%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid var(--line);
  padding: 8px 2px calc(env(safe-area-inset-bottom, 18px) + 4px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 6px;
  border-radius: 12px;
  color: var(--t-4);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  position: relative;
  transition: color 160ms ease;
}
.tab svg { display: block; }
.tab.is-active { color: var(--t-1); }
.tab .tab-icon-wrap { position: relative; }
.tab .badge {
  position: absolute;
  top: -3px; right: -10px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--l-orange);
  color: oklch(0.15 0.01 250);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg-tabbar);
}

/* =================================================================
   Atoms
================================================================= */
.lvl {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--lvl-c, var(--t-3));
  box-shadow: 0 0 0 3px var(--lvl-bg, transparent);
  flex-shrink: 0;
}
.lvl.lg { width: 14px; height: 14px; box-shadow: 0 0 0 4px var(--lvl-bg, transparent); }
.lvl.sm { width: 7px; height: 7px;  box-shadow: 0 0 0 2px var(--lvl-bg, transparent); }

.lvl-GREEN    { --lvl-c: var(--l-green);  --lvl-bg: var(--l-green-bg); }
.lvl-YELLOW   { --lvl-c: var(--l-yellow); --lvl-bg: var(--l-yellow-bg); }
.lvl-ORANGE   { --lvl-c: var(--l-orange); --lvl-bg: var(--l-orange-bg); }
.lvl-RED, .lvl-CRITICAL { --lvl-c: var(--l-red); --lvl-bg: var(--l-red-bg); }
.lvl-LOW    { --lvl-c: var(--l-green);  --lvl-bg: var(--l-green-bg); }
.lvl-MEDIUM { --lvl-c: var(--l-yellow); --lvl-bg: var(--l-yellow-bg); }
.lvl-HIGH   { --lvl-c: var(--l-orange); --lvl-bg: var(--l-orange-bg); }

.mono, .meta {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--t-3);
}
.meta-up { text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; }

/* Source chip */
.src {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-2);
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center;
}
.src .cat {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--cat-c, var(--t-4));
}
.cat-cuba_independiente, .cat-indep   { --cat-c: oklch(0.78 0.10 220); }
.cat-cuba_oficial,        .cat-oficial { --cat-c: oklch(0.72 0.14 25);  }
.cat-exilio                            { --cat-c: oklch(0.80 0.10 80);  }
.cat-agencia                           { --cat-c: oklch(0.85 0.04 250); }
.cat-gobierno_us,         .cat-usgov   { --cat-c: oklch(0.74 0.10 280); }
.cat-social                            { --cat-c: oklch(0.78 0.10 170); }

/* AI seal */
.ai-seal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--t-2);
}
.ai-seal .pip { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--t-2);
  font-weight: 500;
  white-space: nowrap;
}
.pill.is-active, .pill.active { background: var(--t-1); color: var(--bg-app); border-color: var(--t-1); }

/* Chips row */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 18px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips .pill { flex-shrink: 0; }
.chips .chip-divider {
  width: 1px;
  flex-shrink: 0;
  background: var(--line);
  margin: 4px 4px;
  align-self: stretch;
}

/* =================================================================
   FEED
================================================================= */
.feed { padding: 4px 0 0; list-style: none; margin: 0; }
.feed-item {
  position: relative;
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  cursor: pointer;
  transition: background 120ms ease;
}
.feed-item:active { background: var(--bg-elev); }
.feed-item .gutter {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding-top: 6px;
}
.feed-item .topic-glyph {
  width: 24px; height: 24px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--t-3);
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
}
.feed-item .topic-glyph svg { width: 14px; height: 14px; }
.feed-item[data-level="HIGH"] .topic-glyph,
.feed-item[data-level="CRITICAL"] .topic-glyph {
  color: var(--lvl-c, var(--accent));
}
.feed-item .body { min-width: 0; }
.feed-item .row1 {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.feed-item .row1 > * { white-space: nowrap; }
.feed-item .row1 .dot-sep { color: var(--t-5); }
.feed-item .head {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.32;
  color: var(--t-1);
  text-wrap: pretty;
}
.feed-item.is-visited .head { color: var(--t-2); font-weight: 500; }
.feed-item .excerpt {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--t-3);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-item .row2 {
  margin-top: 10px;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}

/* Empty */
.empty-state {
  padding: 60px 30px;
  text-align: center;
  color: var(--t-3);
}
.empty-state .empty-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-elev);
  margin: 0 auto 14px;
  border: 1px solid var(--line);
}
.empty-state p {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.45;
}

/* =================================================================
   CRITICAL BANNER
================================================================= */
.crit-banner {
  margin: 10px 14px 4px;
  padding: 14px 14px 14px 18px;
  border-radius: var(--radius);
  background: var(--l-red-bg);
  border: 1px solid oklch(0.66 0.22 25 / 0.5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  color: var(--t-1);
  text-decoration: none;
}
.crit-banner .pulse-ring {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--l-red);
  display: grid; place-items: center;
  position: relative;
}
.crit-banner .pulse-ring::after {
  content: ""; position: absolute; inset: -4px;
  border: 1.5px solid var(--l-red);
  border-radius: 50%;
  opacity: 0.7;
  animation: ring 1.8s ease-out infinite;
}
@keyframes ring {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}
.crit-banner .label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--l-red);
  display: block;
  margin-bottom: 3px;
}
.crit-banner .head {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t-1);
  line-height: 1.3;
}

/* =================================================================
   Live indicator
================================================================= */
.pill-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: oklch(0.66 0.22 25 / 0.14);
  border: 1px solid oklch(0.66 0.22 25 / 0.4);
  color: var(--l-red);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pill-live .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--l-red);
  box-shadow: 0 0 0 0 var(--l-red);
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 oklch(0.66 0.22 25 / 0.6); }
  100% { box-shadow: 0 0 0 8px oklch(0.66 0.22 25 / 0); }
}

/* =================================================================
   HOY — contador Geiger
================================================================= */

/* Gauge semi-circular (mock geiger) */
.geiger-wrap {
  padding: 14px 18px 6px;
  text-align: center;
}
.geiger {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 4px 14px color-mix(in oklab, var(--lvl-c, var(--accent)) 18%, transparent));
}
.geiger-story {
  margin-top: -6px;
  font-size: 13px;
  color: var(--t-3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: wrap;
}
.geiger-story .story-delta { font-weight: 600; }
.geiger-story .story-up   { color: var(--l-red); }
.geiger-story .story-down { color: var(--l-green); }
.geiger-story .story-flat { color: var(--t-3); }
.geiger-story .story-sep  { color: var(--t-5); }
.geiger-story .story-streak { color: var(--t-2); }

/* Una sola frase — el titular */
.oneline-wrap {
  padding: 14px 20px 16px;
}
.oneline {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--t-1);
  text-wrap: pretty;
}

/* ECG pulse line */
.ecg-wrap { padding: 4px 20px 8px; }
.ecg-head {
  display: flex; justify-content: space-between;
  font-size: 10.5px;
  color: var(--t-4);
  margin-bottom: 6px;
}
.ecg-head .muted { color: var(--t-5); }
.ecg {
  width: 100%;
  height: 48px;
  display: block;
}

/* Frase serif al pie */
.serif-foot {
  padding: 22px 20px 30px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--t-3);
  border-top: 1px solid var(--line-soft);
  margin-top: 18px;
}

.hoy-meta-line {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--t-4);
  letter-spacing: 0.02em;
}

/* Toggle "ver original" en item sheet */
.orig-toggle {
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--t-3);
  cursor: pointer;
  font-family: var(--f-mono);
  letter-spacing: 0.02em;
}
.orig-toggle:hover { background: var(--bg-elev-2); color: var(--t-2); }

/* Feed-item level word (en lugar de "CRITICAL · 95") */
.level-word {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--t-3);
}
.level-word-CRITICAL, .level-word-RED { color: var(--l-red); }
.level-word-HIGH,     .level-word-ORANGE { color: var(--l-orange); }
.level-word-MEDIUM,   .level-word-YELLOW { color: var(--l-yellow); }
.level-word-LOW,      .level-word-GREEN  { color: var(--t-4); }

/* Tab dot indicator (no número) */
.tab .badge-dot {
  position: absolute;
  top: -2px; right: -6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--l-red);
  box-shadow: 0 0 0 2px var(--bg-tabbar), 0 0 8px var(--l-red);
  animation: live-pulse 2s ease-out infinite;
}

/* =================================================================
   HOY — visual blocks (los que quedan: temas, donut, severidad)
================================================================= */

/* Big circular gauge for the score */
.gauge-wrap {
  position: relative;
  padding: 22px 18px 14px;
  display: grid;
  place-items: center;
}
.gauge {
  width: 220px;
  height: 220px;
  transform: rotate(0deg);
  filter: drop-shadow(0 2px 16px color-mix(in oklab, var(--accent) 15%, transparent));
}
.gauge .gauge-track {
  stroke: var(--bg-elev-2);
}
.gauge .gauge-fill {
  transition: stroke-dasharray 600ms cubic-bezier(.2,.7,.2,1);
}
.gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.gauge-num {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}
.gauge-label {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
  color: var(--t-2);
}
.gauge-sub {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-4);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Block container (reused across Hoy visuals) */
.hoy-block {
  padding: 22px 20px 18px;
  border-top: 1px solid var(--line-soft);
}
.hoy-block.two-col {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: center;
}
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.block-head h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-4);
  margin: 0;
}
.block-meta {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--t-5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Topic bars */
.topic-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.topic-bar {
  display: grid;
  grid-template-columns: 28px 90px 1fr auto;
  gap: 10px;
  align-items: center;
}
.topic-ico {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  display: grid; place-items: center;
  color: var(--t-2);
}
.topic-lbl {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t-1);
  letter-spacing: -0.005em;
}
.topic-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-elev);
  overflow: hidden;
  position: relative;
}
.topic-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 70%, var(--l-orange)));
  border-radius: inherit;
  transition: width 600ms cubic-bezier(.2,.7,.2,1);
}
.topic-num {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--t-1);
  min-width: 22px;
  text-align: right;
}

/* Donut chart */
.donut-wrap {
  position: relative;
  width: 130px; height: 130px;
  margin: 0 auto;
}
.donut-wrap.small { width: 110px; height: 110px; }
.donut {
  width: 100%; height: 100%;
  transform: rotate(0deg);
}
.donut .donut-bg { stroke: var(--bg-elev); }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.donut-center .big {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.03em; line-height: 1;
  color: var(--t-1);
}
.donut-center .sub {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--t-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  line-height: 1.3;
}

/* Legend (donut etc.) */
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.legend.inline {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.legend.inline::-webkit-scrollbar { display: none; }
.legend li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--t-2);
}
.legend li .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend li b {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--t-1);
  font-weight: 700;
}

/* Severity segmented bar */
.seg-bar {
  height: 28px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elev);
  gap: 2px;
}
.seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 18px;
}
.seg span { mix-blend-mode: difference; }

/* =================================================================
   HOY — narrativa (existing styles kept; topic-glyph added below)
================================================================= */
.hoy-hero {
  padding: 18px 20px 24px;
  display: grid;
  gap: 16px;
}
.hoy-level {
  display: flex; align-items: center; gap: 14px;
}
.hoy-level .ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--lvl-bg);
  display: grid; place-items: center;
  border: 1px solid var(--lvl-c);
}
.hoy-level .ring .inner {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--lvl-c);
}
.hoy-level .text small {
  display: block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--t-4);
  margin-bottom: 2px;
}
.hoy-level .text strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--t-1);
}
.hoy-score-big {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 2px;
}
.hoy-score-big .num {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--lvl-c, var(--t-1));
}
.hoy-score-big .denom {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--t-4);
}
.hoy-score-big .label {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--t-4);
}

.hoy-spark {
  height: 40px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.hoy-spark .bar {
  flex: 1;
  background: var(--bar-c, var(--t-5));
  border-radius: 1px;
  min-height: 4px;
}
.hoy-spark .bar.now { box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 3px var(--bar-c); }
.hoy-spark.big { height: 64px; gap: 4px; }
.hoy-spark.big .bar { border-radius: 2px; }
.hoy-spark-labels {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 10px;
  color: var(--t-4);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.hoy-section {
  padding: 22px 20px 6px;
  border-top: 1px solid var(--line-soft);
}
.hoy-section h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-4);
  margin: 0 0 12px;
}
.hoy-narrative {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--t-1);
  text-wrap: pretty;
}
.hoy-narrative p { margin: 0 0 14px; }
.hoy-narrative ul { margin: 14px 0 0; padding: 0; list-style: none; }
.hoy-narrative ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  line-height: 1.55;
  font-size: 15px;
  color: var(--t-2);
}
.hoy-narrative ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hoy-event {
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  color: var(--t-1);
  text-decoration: none;
}
.hoy-event:active { background: var(--bg-elev); }
.hoy-event .e-meta {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--t-4);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hoy-event .e-head {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--t-1);
  text-wrap: pretty;
}
.hoy-event .chev { color: var(--t-3); }

.hoy-history-row {
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.hoy-history-row .h-score {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--t-1);
  min-width: 28px;
}
.hoy-history-row .h-summary {
  font-size: 13.5px;
  color: var(--t-3);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hoy-history-row .h-time {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-4);
  letter-spacing: 0.04em;
}

/* =================================================================
   ALERTAS
================================================================= */
.al-toggle-card {
  margin: 14px 18px;
  padding: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.al-toggle-card .t {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t-1);
}
.al-toggle-card .d {
  font-size: 13.5px;
  color: var(--t-3);
  margin-top: 4px;
  line-height: 1.45;
}

.switch {
  --w: 50px; --h: 30px;
  width: var(--w); height: var(--h);
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  position: relative;
  transition: background 200ms ease, border-color 200ms ease;
  flex-shrink: 0;
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: calc(var(--h) - 6px); height: calc(var(--h) - 6px);
  border-radius: 50%;
  background: var(--t-2);
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), background 200ms ease;
}
.switch:checked,
.switch.on { background: oklch(0.74 0.16 145 / 0.4); border-color: var(--l-green); }
.switch:checked::after,
.switch.on::after { transform: translateX(calc(var(--w) - var(--h))); background: var(--l-green); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }

.al-section { padding: 16px 18px 6px; }
.al-section h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-4);
  margin: 0 0 10px;
}
.al-hint {
  padding: 8px 18px 0;
  font-size: 12.5px;
  color: var(--t-4);
  line-height: 1.45;
}
.al-hint b { color: var(--t-2); font-weight: 600; }

.threshold-row {
  display: flex; gap: 6px;
  padding: 0 18px;
}
.threshold-row .step {
  flex: 1;
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t-3);
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
}
.threshold-row .step.on {
  background: var(--bg-elev-2);
  border-color: var(--t-2);
  color: var(--t-1);
}
.threshold-row .step.is-current {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--t-1);
}

/* Notification log */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-row {
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.notif-row .ch-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--t-2);
}
.notif-row .ch-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--t-1);
  letter-spacing: -0.005em;
  display: flex; align-items: center; gap: 8px;
}
.notif-row .ch-target {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--t-3);
  margin-top: 2px;
  word-break: break-all;
}
.notif-row .ch-error {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--l-red);
  margin-top: 4px;
}
.notif-row .right {
  text-align: right;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-3);
  letter-spacing: 0.04em;
}
.notif-row .right .ok { color: var(--l-green); }
.notif-row .right .fail { color: var(--l-red); }

/* Email form */
.email-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 18px 0;
}
.email-form input,
.email-form select {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--t-1);
  font-size: 15px;
}
.email-form input::placeholder { color: var(--t-4); }
.email-form input:focus,
.email-form select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev-2);
}
.email-form button[type="submit"] {
  height: 46px;
  border-radius: 12px;
  background: var(--t-1);
  color: var(--bg-app);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
}
.form-feedback {
  padding: 8px 18px 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}
.form-feedback.is-ok { color: var(--l-green); }
.form-feedback.is-error { color: var(--l-red); }

/* =================================================================
   Pipeline status cards (Más)
================================================================= */
.pipeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 6px;
}
.pipe-card {
  padding: 14px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  position: relative;
}
.pipe-card .pipe-ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-elev-2);
  display: grid; place-items: center;
  color: var(--t-3);
}
.pipe-card .pipe-name {
  grid-column: 2;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t-1);
  letter-spacing: -0.005em;
}
.pipe-card .pipe-status {
  grid-column: 2;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--t-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.pipe-card.is-on {
  border-color: color-mix(in oklab, var(--l-green) 50%, var(--line));
}
.pipe-card.is-on .pipe-ico {
  background: var(--l-green-bg);
  color: var(--l-green);
}
.pipe-card.is-on .pipe-status {
  color: var(--l-green);
}
.pipe-card::after {
  content: "";
  position: absolute;
  top: 12px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--t-5);
}
.pipe-card.is-on::after {
  background: var(--l-green);
  box-shadow: 0 0 0 0 var(--l-green);
  animation: live-pulse 2.2s ease-out infinite;
}

/* =================================================================
   MÁS (Sources + about)
================================================================= */
.more-section h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-4);
  margin: 18px 18px 8px;
}
.more-list {
  background: var(--bg-elev);
  margin: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}
.more-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
  color: var(--t-1);
}
.more-row:first-child { border-top: 0; }
.more-row:active { background: var(--bg-elev-2); }
.more-row .glyph { color: var(--t-2); }
.more-row .lbl { font-size: 15.5px; font-weight: 500; letter-spacing: -0.005em; }
.more-row .val { font-family: var(--f-mono); font-size: 12px; color: var(--t-3); }
.more-row .chev { color: var(--t-4); }

.health-summary {
  padding: 0 18px 12px;
  display: flex;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--t-3);
}
.health-summary > span { display: inline-flex; align-items: center; gap: 6px; }

.cat-header {
  padding: 14px 18px 6px;
  background: var(--bg-page);
}
.cat-header .meta-up { color: var(--t-4); }

.src-row {
  padding: 13px 18px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.src-row .s-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--l-green);
}
.src-row.warn .s-dot { background: var(--l-yellow); }
.src-row.down .s-dot { background: var(--l-red); }
.src-row.unknown .s-dot { background: var(--t-5); }
.src-row .s-name { font-size: 15px; font-weight: 600; color: var(--t-1); letter-spacing: -0.005em; }
.src-row .s-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-3);
  margin-top: 3px;
  letter-spacing: 0.03em;
  word-break: break-all;
}
.src-row.down .s-meta { color: var(--l-red); }
.src-row .s-right { text-align: right; }
.src-row .s-right .n { font-family: var(--f-mono); font-size: 13px; color: var(--t-1); font-weight: 600; }
.src-row .s-right .l {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--t-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* About inside Más */
.about-body { padding: 8px 22px 32px; }
.about-body h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 18px 0 12px;
  color: var(--t-1);
}
.about-body p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--t-2);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.about-pipeline { display: grid; gap: 8px; margin: 14px 0 22px; }
.about-pipeline .row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 14px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14.5px;
  color: var(--t-1);
  line-height: 1.4;
}
.about-pipeline .row .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
}
.about-pipeline .row .lbl {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-4);
  display: block;
  margin-bottom: 4px;
}
.about-pipeline .row.tier1 .dot { background: var(--l-green); }
.about-pipeline .row.tier2 .dot { background: var(--l-yellow); }
.about-pipeline .row.tier3 .dot { background: var(--l-orange); }

/* =================================================================
   ITEM DETAIL SHEET
================================================================= */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg-overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.sheet-overlay.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%;
  max-width: 460px;
  max-height: 88dvh;
  background: var(--bg-sheet);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1);
  border-top: 1px solid var(--line);
}
.sheet-overlay.is-open .sheet { transform: translateY(0); }
.sheet .handle {
  width: 38px; height: 4px;
  border-radius: 4px;
  background: var(--line-strong);
  margin: 9px auto 0;
  flex-shrink: 0;
}
.sheet-head {
  padding: 18px 20px 12px;
  flex-shrink: 0;
}
.sheet-head .row1 {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.sheet-head h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.22;
  margin: 0;
  text-wrap: pretty;
  color: var(--t-1);
}
.sheet-body {
  overflow-y: auto;
  padding: 0 20px 24px;
  flex: 1;
}
.sheet-body .reason-line {
  font-size: 14px;
  color: var(--t-3);
  font-style: italic;
  border-left: 2px solid var(--line-strong);
  padding-left: 10px;
  margin: 0 0 16px;
}

.tag-row {
  margin-top: 16px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tag {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--t-2);
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px calc(env(safe-area-inset-bottom, 14px) + 10px);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--bg-sheet);
}
.btn {
  flex: 1;
  height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--t-1);
}
.btn.primary { background: var(--t-1); color: var(--bg-app); border-color: var(--t-1); }

/* =================================================================
   Footer
================================================================= */
.footer {
  padding: 18px 22px calc(env(safe-area-inset-bottom, 18px) + 18px);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-4);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =================================================================
   Density tweak
================================================================= */
.density-compact .feed-item { padding: 12px 18px 13px; }
.density-compact .feed-item .excerpt { -webkit-line-clamp: 1; }
.density-compact .feed-item .head { font-size: 15.5px; }

/* =================================================================
   RADAR (FR24) — pane + mini-card en Hoy
================================================================= */
.radar-head {
  padding: 18px 20px 8px;
}
.radar-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--t-1);
}
.radar-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--t-3);
  line-height: 1.4;
}

.radar-map-wrap {
  padding: 8px 18px 12px;
}
.radar-map {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}
.radar-map a circle {
  cursor: pointer;
  transition: r 200ms ease, opacity 200ms ease;
}
.radar-map a:hover circle:first-child { r: 5; }

/* Lista de vuelos */
.radar-list { list-style: none; padding: 0; margin: 0; }
.radar-item {
  border-bottom: 1px solid var(--line-soft);
  transition: background 120ms ease;
}
.radar-item:active { background: var(--bg-elev); }
.radar-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 14px 18px;
  color: var(--t-1);
  text-decoration: none;
  align-items: center;
}
.radar-link .cat-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  align-self: flex-start;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in oklab, currentColor 0%, transparent);
}
.radar-link .r-body { min-width: 0; }
.radar-link .r-row1 {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.radar-link .r-cat {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.radar-link .r-head {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--t-1);
  line-height: 1.3;
}
.radar-link .r-meta {
  margin-top: 3px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t-3);
  letter-spacing: 0.02em;
}
.radar-link .ext-ico {
  color: var(--t-4);
  align-self: flex-start;
  margin-top: 4px;
}

.radar-attribution {
  padding: 14px 18px calc(env(safe-area-inset-bottom, 18px) + 18px);
  text-align: center;
  font-size: 11px;
  color: var(--t-4);
  border-top: 1px solid var(--line-soft);
}
.radar-attribution a {
  color: var(--t-3);
  text-decoration: underline;
}

/* Mini-card del Radar dentro del Hoy */
.radar-mini {
  display: block;
  margin: 0 18px 8px;
  padding: 12px 14px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--t-1);
  transition: background 160ms ease;
}
.radar-mini:active { background: var(--bg-elev-2); }
.radar-mini .r-mini-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--t-3);
}
.radar-mini .r-mini-head svg { color: var(--accent); }
.radar-mini .r-mini-more {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--t-4);
}
.radar-mini .r-mini-counts {
  margin: 8px 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--t-1);
  letter-spacing: -0.005em;
}
.radar-mini .r-mini-map {
  width: 100%;
  height: 70px;
  border-radius: 8px;
  display: block;
}

/* Categoría dot (text color) por categoría */
.cat-militar_us { color: #f97316; }
.cat-drone      { color: #eab308; }
.cat-vip_gov    { color: #8b5cf6; }
.cat-cargo_mil  { color: #dc2626; }
.cat-anomalia   { color: #ef4444; }
.cat-cubana     { color: #3b82f6; }

/* Tratamiento visual del item de vuelo en el feed normal */
.feed-item[data-kind="flight"] {
  background: color-mix(in oklab, var(--bg-elev) 50%, transparent);
}
.feed-item[data-kind="flight"] .src {
  font-weight: 600;
  color: var(--t-2);
}
.feed-item[data-kind="flight"] .topic-glyph {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* =================================================================
   Dark theme override (light is default)
================================================================= */
.theme-dark {
  --bg-page:    oklch(0.10 0.006 250);
  --bg-app:     oklch(0.17 0.008 250);
  --bg-elev:    oklch(0.21 0.010 250);
  --bg-elev-2:  oklch(0.25 0.012 250);
  --bg-tabbar:  oklch(0.13 0.006 250);
  --bg-sheet:   oklch(0.19 0.009 250);
  --bg-overlay: color-mix(in oklab, black 60%, transparent);
  --line:       oklch(0.30 0.014 250 / 0.7);
  --line-soft:  oklch(0.28 0.013 250 / 0.5);
  --line-strong:oklch(0.42 0.016 250);
  --t-1: oklch(0.97 0.004 250);
  --t-2: oklch(0.80 0.010 250);
  --t-3: oklch(0.62 0.012 250);
  --t-4: oklch(0.48 0.013 250);
  --t-5: oklch(0.38 0.013 250);
  --accent:     oklch(0.78 0.10 220);
  --accent-dim: oklch(0.78 0.10 220 / 0.18);
  --l-green:    oklch(0.74 0.16 145);
  --l-yellow:   oklch(0.86 0.17 95);
  --l-orange:   oklch(0.74 0.17 50);
  --l-red:      oklch(0.66 0.22 25);
  --l-green-bg:  oklch(0.74 0.16 145 / 0.14);
  --l-yellow-bg: oklch(0.86 0.17 95  / 0.14);
  --l-orange-bg: oklch(0.74 0.17 50  / 0.16);
  --l-red-bg:    oklch(0.66 0.22 25  / 0.18);
  color-scheme: dark;
}
