/* Base compartida del sitio: estilo «Instrumento de vuelo» (elegido el 17/11/2026).
   Spec: docs/superpowers/plans/2026-11-17-rediseno-ux-sitio.md, sección 4.
   - Texto siempre claro sobre fondo oscuro: el Brave del teléfono del usuario aclara cualquier texto oscuro.
   - Los números van con .num (tabular-nums) para que no «bailen» al actualizarse.
   - Nada se sale de la pantalla: si no entra, baja de línea (overflow-wrap) en vez de cortarse.
     break-word y no anywhere: anywhere también achica el ancho mínimo y las tablas cortaban
     las palabras letra por letra («Pe/río/do») a 360 px. */

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/static/fonts/ibm-plex-sans-latin.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0f14;
  --s1: #111821;
  --s2: #17212d;
  --line: #243244;
  --tx: #e8f1f8;
  --mut: #8ea3b8;
  --acc: #38e1ff;
  --btn: #0e7490;
  --btn-tx: #ffffff;
  --live: #7dff5a;
  --warn: #fbbf24;
  --err: #f87171;
  --r: 2px;
  --rl: 3px;
  --font: 'IBM Plex Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
a { color: var(--acc); text-decoration: none; }
/* Enlaces dentro del texto: subrayados, porque el celeste solo no se distingue del texto (WCAG 1.4.1). */
p a, li a { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* La lista que abre un <select> la dibuja el navegador: en Android salía con fondo BLANCO y heredaba el texto claro
   del tema, así que las opciones no se leían salvo la resaltada (estela del vivo, Bragado 22/11/2026). Colores
   explícitos para todas las páginas; `color-scheme: dark` sola no alcanza en el teléfono. */
select option, select optgroup { background-color: var(--s2); color: var(--tx); }

.num { font-variant-numeric: tabular-nums; }
.mut { color: var(--mut); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r);
  font: 600 15px var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--tx);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-p { background: var(--btn); color: var(--btn-tx); }
.btn-p:hover { background: #0b6178; }
.btn-g { border-color: var(--line); }
.btn-g:hover { border-color: var(--acc); color: var(--acc); }
.btn:disabled { opacity: .55; cursor: default; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--s1);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); flex: none; }

.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--rl); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--mut); }
.field input, .field select, .field textarea {
  min-height: 44px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg); color: var(--tx); font: 15px var(--font);
}
.field textarea { padding: 10px 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--acc); outline: none; }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--mut);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Encabezado común (js/site-nav.js, 17/11/2026) ─────────────────────────────
   Escritorio: marca a la izquierda, enlaces y cuenta a la derecha. Teléfono (≤760px): marca y «Menú»;
   los enlaces se despliegan debajo, en columna, sin tapar nada mientras están cerrados. */
.site-nav { position: relative; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sn-bar { display: flex; align-items: center; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 0 16px; min-height: 56px; }
.sn-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--tx); font-weight: 700; font-size: 16px; text-decoration: none; margin-right: auto; }
.sn-brand:hover { text-decoration: none; }
.sn-menu { display: flex; align-items: center; gap: 4px; }
.sn-menu a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r); color: var(--mut); font-weight: 500; text-decoration: none; white-space: nowrap; }
.sn-menu a:hover { color: var(--tx); background: var(--s1); text-decoration: none; }
.sn-menu a[aria-current="page"] { color: var(--acc); }
.sn-account { margin-left: 8px; border: 1px solid var(--line); color: var(--tx) !important; }
.sn-login { background: var(--btn); border-color: var(--btn); color: var(--btn-tx) !important; }
.sn-login:hover { background: #0b6178 !important; }
.sn-toggle { display: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: none; color: var(--tx); font: 600 14px var(--font); cursor: pointer; }
@media (max-width: 760px) {
  .sn-toggle { display: inline-flex; align-items: center; }
  .sn-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav.sn-open .sn-menu { display: flex; }
  .sn-menu a { min-height: 46px; font-size: 16px; }
  .sn-account { margin: 8px 0 0; justify-content: center; }
}
