/* ISS Tracking · marca «Mission control» (27-09-2026).
   Se carga después del <style> de cada página: cambia las variables de color,
   la tipografía y la cabecera y navegación comunes. Los colores sueltos de cada
   página ya se pasaron a esta paleta en el HTML. */
@font-face{font-family:"Inter";font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Inter";font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
/* Cifras (velocidad, horas, coordenadas) en JetBrains Mono, también servida desde aquí */
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400 600;font-display:swap;src:url(/fonts/jetbrainsmono-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400 600;font-display:swap;src:url(/fonts/jetbrainsmono-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400 600;font-display:swap;src:url(/fonts/jetbrainsmono-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

:root {
    --bg-primary: #0B0F14;
    --bg-secondary: #121820;
    --surface-2: #19212B;
    --surface-3: #212B37;
    --line: #263241;
    --accent-glow: #4D9DFF;
    --accent-blue: #1A66D6;
    --accent-soft: rgba(77, 157, 255, 0.14);
    --text-main: #E6EDF5;
    --text-2: #A3B0BF;
    --text-muted: #8B98A9;
    --panel-border: rgba(148, 170, 199, 0.16);
    --success: #3DDC97;
    --warning: #F2B544;
    --alert: #FF5C6C;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { font-family: var(--font); }
body { background-color: var(--bg-primary); color: var(--text-main); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(77, 157, 255, 0.35); }
:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 2px; }

/* --- Cabecera: logo + nombre, sin degradados ni halos --- */
header::before { display: none !important; }
header { border-bottom-color: var(--line); animation: none; }
h1 {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--text-main);
    animation: none !important;
    letter-spacing: -0.005em;
}
.logo-home-link { gap: 12px; border-radius: 12px; }
.site-logo { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; transition: none; }
.logo-home-link:hover .site-logo { transform: none; filter: none; }
.site-logo .logo-caja { fill: var(--surface-2); stroke: var(--line); }
.site-logo .logo-eq { fill: none; stroke: #7F8D9D; stroke-width: 1.25; stroke-dasharray: 1.5 2.5; }
.site-logo .logo-traza { fill: none; stroke: var(--text-main); stroke-width: 2; stroke-linecap: round; }
.site-logo .logo-iss { fill: var(--accent-glow); stroke: var(--surface-2); stroke-width: 1.5; }
.brand-name { display: block; font-size: 13px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; color: var(--text-main); margin-bottom: 3px; white-space: nowrap; }
.brand-name span { font-weight: 400; color: var(--text-2); }
.logo-home-link > .brand-name { font-size: 17px; margin: 0; }

/* --- Iconos SVG (sprite /icons.svg) --- */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* --- Navegación de escritorio --- */
.main-nav {
    background: var(--bg-secondary);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 4px; gap: 2px;
}
.nav-link {
    gap: 7px; padding: 8px 12px;
    border-radius: 10px; border: 0;
    color: var(--text-2); font-size: 13px; font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { color: var(--text-main); background: var(--surface-2); }
.nav-link.active { color: var(--accent-glow); background: var(--accent-soft); border: 0; box-shadow: none; }

/* Pestañas de sección (Tripulación / Historia) */
.section-tabs { border-radius: 14px; border-color: var(--line); background: var(--bg-secondary); }
.section-tab { border-radius: 10px; color: var(--text-2); }
.section-tab:hover { color: var(--text-main); background: var(--surface-2); }
.section-tab.active { background: var(--accent-soft); color: var(--accent-glow); box-shadow: none; }
.section-tab .ico { width: 17px; height: 17px; }

/* --- Barra inferior en móvil: pegada abajo, icono en píldora y texto siempre visible --- */
@media (max-width: 720px) {
    body { padding-bottom: 92px; }
    .bottom-nav {
        left: 0; right: 0; bottom: 0;
        border-radius: 0; border: 0; border-top: 1px solid var(--line);
        background: rgba(11, 15, 20, 0.94);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
        box-shadow: none;
    }
    .bottom-nav-link {
        gap: 4px; padding: 2px 0; border-radius: 0;
        font-size: 11px; font-weight: 600; letter-spacing: 0;
        color: var(--text-muted); background: none;
        min-height: 48px; justify-content: center;
    }
    .bottom-nav-link .bn-icon {
        display: flex; align-items: center; justify-content: center;
        width: 48px; height: 28px; border-radius: 999px;
        font-size: 0; transition: background 0.15s ease;
    }
    .bottom-nav-link .bn-icon .ico { width: 21px; height: 21px; }
    .bottom-nav-link.active { color: var(--text-main); background: none; }
    .bottom-nav-link.active .bn-icon { background: var(--accent-soft); color: var(--accent-glow); }
}
@media (max-width: 360px) {
    .bottom-nav-link { font-size: 10px; }
    .bottom-nav-link .bn-icon { width: 40px; }
}

/* --- Controles de la cabecera --- */
.theme-btn, .lang-btn, .unit-toggle { border-radius: 8px; border-color: var(--line); }
.theme-btn, .lang-btn { background: var(--bg-secondary); color: var(--text-main); }
.theme-btn:hover, .lang-btn:hover { background: var(--surface-2); }
.unit-btn { background: var(--bg-secondary); }
.unit-btn.active { background: var(--accent-soft); color: var(--accent-glow); }
.status-badge { background: var(--bg-secondary); border-color: var(--line); color: var(--text-2); font-weight: 600; }
/* Punto de «en directo» en rojo, como en la app */
.pulse-dot { background-color: var(--alert); box-shadow: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* --- Ordenador ancho (1100 px o más): como la app v3, la navegación pasa a un
   raíl fijo a la izquierda con el logo arriba, y la cabecera es una barra de
   lado a lado. En tablet sigue la barra de píldoras y en móvil la de abajo. --- */
@media (min-width: 1100px) {
    body { padding-left: 124px !important; overflow-x: hidden; }
    header {
        margin: -20px -20px 20px; padding: 12px 20px; min-height: 64px;
        background: var(--bg-secondary); border-bottom: 1px solid var(--line);
        flex-wrap: nowrap;
    }
    .main-nav {
        position: fixed; z-index: 800; top: 0; bottom: 0; left: 0; width: 104px;
        flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
        padding: 76px 8px 16px; border: 0; border-right: 1px solid var(--line); border-radius: 0;
        background: var(--bg-secondary); overflow-y: auto; scrollbar-width: none;
    }
    .nav-link {
        flex-direction: column; justify-content: center; gap: 6px;
        min-height: 72px; padding: 4px 2px; border-radius: 10px;
        font-size: 12.5px; font-weight: 500; line-height: 1.15; text-align: center; overflow-wrap: anywhere;
        background: none !important;
    }
    .nav-link .ico { box-sizing: content-box; width: 22px; height: 22px; padding: 6px 19px; border-radius: 999px; transition: background 0.15s ease; }
    .nav-link:hover .ico { background: var(--surface-2); }
    .nav-link.active { color: var(--text-main); font-weight: 600; }
    .nav-link.active .ico { background: var(--accent-soft); color: var(--accent-glow); }
    /* El logo sube a lo alto del raíl; el nombre se queda en la barra */
    header .logo-home-link .site-logo { position: fixed; z-index: 801; top: 14px; left: 32px; width: 40px; height: 40px; }
}

/* --- Páginas interiores v3 (28-09-2026): cabecera con Idioma / Tema / Compartir
   como la portada, título de página en formato frase debajo de la miga de pan y
   contenido centrado. Solo afecta a <body class="pag-interior">; la portada
   lleva sus propias reglas en línea. --- */
.pag-interior header { gap: 8px 16px; animation: none; }
.pag-interior .logo-home-link { min-width: 0; }
.pag-interior .cab-acciones { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.pag-interior .btn-cab { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 52px; min-height: 48px; padding: 4px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--text-main); font: inherit; cursor: pointer; transition: background-color 0.16s; }
.pag-interior .btn-cab:hover, .pag-interior .btn-cab:focus-within { background: rgba(230, 237, 245, 0.07); }
.pag-interior .btn-cab .ico { width: 20px; height: 20px; }
.pag-interior .btn-cab .et { font: 500 11px/1.1 var(--font); white-space: nowrap; color: var(--text-2); }
.pag-interior .cod-idioma { display: grid; place-items: center; min-width: 26px; height: 20px; padding: 0 4px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px currentColor; font: 600 11px/1 var(--mono); letter-spacing: 0.02em; }
.pag-interior .btn-cab select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }

.pagina { max-width: 1116px; margin: 0 auto; }
.pag-interior .breadcrumb { margin: 4px 0 10px; font-size: 12.5px; animation: none; }
.pag-interior .breadcrumb .current { color: var(--text-2); font-weight: 500; }
.pag-cab { margin: 0 0 26px; }
.pag-cab h1 { margin: 0; font-size: clamp(27px, 1.4vw + 20px, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--text-main); }
.pag-cab p { margin: 8px 0 0; max-width: 72ch; font-size: 15px; line-height: 1.5; color: var(--text-2); }

@media (min-width: 1100px) {
    .pag-interior header { margin-bottom: 24px; padding-top: 8px; padding-bottom: 8px; }
    .pag-interior .btn-cab { grid-auto-flow: column; gap: 8px; min-height: 44px; padding: 0 12px; }
    .pag-interior .btn-cab .et { font-size: 13px; color: var(--text-main); }
}
@media (max-width: 720px) {
    .pag-interior header { padding-bottom: 12px; margin-bottom: 14px; flex-wrap: nowrap; }
    .pag-interior .btn-cab { min-width: 46px; padding: 4px 2px; }
    .pag-cab { margin-bottom: 20px; }
    .pag-cab p { font-size: 14px; }
}
@media (max-width: 380px) {
    .pag-interior .logo-home-link > .brand-name { font-size: 15px; }
    .pag-interior .btn-cab { min-width: 42px; }
}

/* Tema claro: se invierte la página entera desde <html> (así lo fijo, como el
   raíl o la barra de abajo, sigue fijo) y se vuelven a invertir las fotos, los
   vídeos y los iframes para que no queden en negativo. */
html[data-theme="light"]:has(> body.pag-interior) { filter: invert(1) hue-rotate(180deg); background: #0B0F14; }
html[data-theme="light"] body.pag-interior :is(img, video, iframe, canvas, .foto-fondo) { filter: invert(1) hue-rotate(180deg); }
