/* ==========================================================
   KitCal Medicine AI — estilos base
   Estilo producto: fondo claro, titulares azul marino,
   tarjetas blancas superpuestas y un único azul de marca (logo).
   ========================================================== */

:root {
    --bg: #f7f8fa;
    --bg-2: #eef1f5;
    --card: #ffffff;
    --ink: #121a33;          /* azul marino del logo */
    --ink-2: #4a5270;
    --ink-3: #8a91a8;
    --line: #e3e7ee;

    --brand: #0b7fc7;        /* azul cielo del logo, oscurecido para contraste */
    --brand-ink: #0a6aa6;
    --brand-soft: #e6f3fb;
    --ok: #16a34a;

    --shadow-sm: 0 1px 2px rgb(18 26 51 / .06);
    --shadow: 0 1px 2px rgb(18 26 51 / .04), 0 6px 16px -8px rgb(18 26 51 / .08);
    --shadow-lg: 0 1px 3px rgb(18 26 51 / .04), 0 12px 28px -14px rgb(18 26 51 / .12);

    --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --ease: cubic-bezier(.2, .7, .1, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1222;
        --bg-2: #121933;
        --card: #161e38;
        --ink: #eef1f8;
        --ink-2: #aab2c8;
        --ink-3: #6f7894;
        --line: #252e4b;
        --brand: #38a9ea;
        --brand-ink: #5bbcf1;
        --brand-soft: rgb(56 169 234 / .12);
        --shadow: 0 6px 16px -8px rgb(0 0 0 / .35);
        --shadow-lg: 0 12px 28px -14px rgb(0 0 0 / .45);
    }
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 17px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* Evita el desplazamiento lateral en móviles sin romper position: sticky */
html, body { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }
.mono { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ---------- Tipografía ---------- */
.eyebrow {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--brand);
}

.hero__title, .section__title, .chapter__title, .cta__title {
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.04;
    color: var(--ink);
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: 600 16px/1 var(--sans);
    border: 1px solid var(--brand);
    transition: transform .3s var(--ease), background .3s, box-shadow .3s, border-color .3s;
    position: relative;
    overflow: hidden;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
/* Efecto al tocar: sigue la forma redondeada del botón */
.btn::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: currentColor; opacity: 0; transition: opacity .25s;
    pointer-events: none;
}
.btn:active { transform: scale(.97); }
.btn:active::after { opacity: .14; transition: none; }
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgb(11 127 199 / .6); }
.btn--sm { height: 42px; padding: 0 20px; font-size: 15px; }
.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--card); border-color: var(--ink-3); box-shadow: var(--shadow-sm); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: #fff; border-color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); }
.btn--ghost-light:hover { background: rgb(255 255 255 / .08); border-color: #fff; box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background .3s, box-shadow .3s;
}
.site-header.is-scrolled {
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(1.6) blur(16px);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    box-shadow: 0 1px 0 var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 40px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand img { border-radius: 8px; width: 32px; height: 32px; }
.brand em { color: var(--brand); }
.brand__ver { display: none; }
.nav { display: flex; gap: 32px; font-size: 16px; font-weight: 500; color: var(--ink); }
.nav a { transition: color .2s; }
.nav a:hover { color: var(--brand); }
.site-header .btn--sm { margin-left: auto; }
.site-header .header-cuenta + .btn--sm { margin-left: 0; }
.header-cuenta { margin-left: auto; margin-right: -16px; font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; transition: color .2s; }
.header-cuenta:hover { color: var(--brand); }

/* Menú del celular (botón de 3 líneas) */
.menu-btn, .menu-movil { display: none; }
.menu-btn {
    place-items: center;
    width: 42px; height: 42px;
    margin-right: -9px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--ink);
    cursor: pointer;
}
.menu-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn__cerrar, .menu-btn[aria-expanded="true"] .menu-btn__abrir { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__cerrar { display: inline; }
.menu-movil {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}
.menu-movil .wrap { display: flex; flex-direction: column; padding-block: 6px 16px; }
.menu-movil a { padding: 13px 0; font-size: 16px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.menu-movil a:last-child { border-bottom: 0; }
.menu-movil a:hover { color: var(--brand); }
.menu-movil .menu-movil__cuenta { margin-top: 12px; padding: 0; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(24px, 4vw, 56px) 0 0; }
.hero__grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.hero__title { font-size: clamp(42px, 5vw, 66px); }
.hero__lede { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 30ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__meta { display: flex; margin-top: 16px; }
.hero__meta > div { padding-right: 28px; }
.hero__meta > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.hero__meta dt { font-size: clamp(28px, 2.8vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
.hero__meta dd { margin-top: 4px; font-size: 15px; color: var(--ink-2); }

/* ---------- Escenario del hero: tarjetas superpuestas ---------- */
.stage { position: relative; padding: 48px 0 64px 40px; }

.monitor {
    position: relative;
    z-index: 2;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0 22px 18px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.monitor__bar {
    display: flex; align-items: center; gap: 10px;
    margin: 0 -22px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line);
    font-size: 15px; font-weight: 600;
}
.monitor__bar img { border-radius: 6px; }
.monitor__label { color: var(--ink); }
.monitor__step { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.monitor__screens { position: relative; min-height: 300px; }

.screen {
    position: absolute;
    inset: 0;
    padding: 20px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
    /* la pantalla saliente se apaga rápido... */
    transition: opacity .25s ease, transform .25s ease, filter .25s ease;
    pointer-events: none;
}
.screen.is-active {
    opacity: 1; transform: none; filter: none; pointer-events: auto;
    /* ...y la entrante aparece cuando la anterior ya se fue */
    transition: opacity .6s var(--ease) .25s, transform .6s var(--ease) .25s, filter .6s var(--ease) .25s;
}
.screen__kicker { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.screen__row { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-2); padding: 9px 0; border-bottom: 1px solid var(--line); }
.screen__row b { color: var(--ink); font-weight: 600; }
.screen__big { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -.04em; margin-top: auto; color: var(--ink); }
.screen__big small { font-size: 18px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.screen__result { display: flex; justify-content: space-between; align-items: center; background: var(--brand-soft); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.screen__result span { color: var(--ink-2); }
.screen__result b { font-weight: 700; color: var(--brand-ink); }

.gauge { width: 62%; margin: 0 auto; }
.gauge path { fill: none; stroke-width: 12; stroke-linecap: round; }
.gauge__track { stroke: var(--bg-2); }
.gauge__fill { stroke: var(--brand); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s var(--ease) .3s; }
/* IMC 24.2 en escala 15–35 */
.screen.is-active .gauge__fill { stroke-dashoffset: 54; }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bars li { display: grid; grid-template-columns: 84px 1fr 40px; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }
.bars i { height: 8px; border-radius: 4px; background: var(--bg-2); position: relative; overflow: hidden; }
.bars i::after {
    content: ""; position: absolute; inset: 0; background: var(--brand); border-radius: inherit;
    transform-origin: left;
    /* escala 1.70–1.90 m² para que las diferencias entre fórmulas se vean */
    transform: scaleX(0);
    transition: transform 1s var(--ease) .3s;
}
.is-active .bars i::after { transform: scaleX(calc((var(--v) - 1.70) / .20)); }
.bars li:nth-child(2) i::after { transition-delay: .38s; }
.bars li:nth-child(3) i::after { transition-delay: .46s; }
.bars li:nth-child(4) i::after { transition-delay: .54s; }
.bars li:nth-child(5) i::after { transition-delay: .62s; }
.bars b { text-align: right; color: var(--ink); font-weight: 600; }

.search {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px;
    font-size: 15px; background: var(--bg); min-height: 48px;
}
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.caret { width: 2px; height: 18px; background: var(--brand); animation: blink 1s steps(1) infinite; margin-left: -6px; border-radius: 1px; }
.codes { display: flex; flex-direction: column; }
.codes li {
    display: flex; gap: 14px; align-items: baseline; padding: 12px 2px; border-bottom: 1px solid var(--line);
    font-size: 15px; color: var(--ink-2);
    opacity: 0; transform: translateX(-8px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.codes li:last-child { border-bottom: 0; }
.codes li b { color: var(--brand-ink); font-weight: 700; min-width: 54px; }
.codes.is-shown li { opacity: 1; transform: none; }
.codes.is-shown li:nth-child(2) { transition-delay: .12s; }
.codes.is-shown li:nth-child(3) { transition-delay: .24s; }

.ecg { width: 100%; height: 40px; margin-top: 8px; }
.ecg path {
    fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round;
    stroke-dasharray: 160 1200; animation: sweep 3.2s linear infinite;
}

/* Tarjetas flotantes */
.float {
    position: absolute;
    z-index: 3;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: var(--shadow);
    min-width: 190px;
    animation: bob 7s ease-in-out infinite;
}
.float--top { top: 0; right: -12px; }
.float--bottom { bottom: 8px; left: 0; animation-delay: -3.5s; }
.float__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.float__value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.float__value small { font-size: 15px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.float__sub { font-size: 13px; color: var(--ink-3); }
.float__bar { height: 6px; border-radius: 3px; background: var(--bg-2); margin: 6px 0 8px; overflow: hidden; }
.float__bar i { display: block; height: 100%; width: 78%; background: var(--ok); border-radius: inherit; }

/* Cinta de funciones */
.ticker {
    margin-top: clamp(24px, 3vw, 40px);
    border-block: 1px solid var(--line);
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.ticker span {
    padding: 16px 36px; display: flex; align-items: center; gap: 12px;
    font-size: 17px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.ticker img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.ticker:hover .ticker__track { animation-play-state: paused; }

/* ---------- Secciones ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
/* La primera sección tras la cinta va más cerca */
.hero + .section { padding-top: clamp(32px, 4.5vw, 56px); }
.section__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(40px, 6vw, 64px); max-width: 720px; }
.section__title { font-size: clamp(36px, 4.6vw, 58px); }
.section__lede { color: var(--ink-2); max-width: 54ch; font-size: 19px; }

/* Índice de funciones */
/* Funciones y el primer capítulo, más juntos */
#funciones { padding-bottom: clamp(20px, 3vw, 40px); }
#funciones + .chapter { padding-top: clamp(20px, 3vw, 40px); }
#funciones .section__head { margin-bottom: clamp(16px, 2vw, 24px); }
.index-group + .index-group { margin-top: clamp(20px, 2.5vw, 32px); }
.index-group__title {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 700; letter-spacing: -.02em;
    padding-bottom: 16px; border-bottom: 1px solid var(--line);
}

.index-item {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.35fr) 120px;
    gap: 24px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    isolation: isolate;
}
.index-item::before {
    content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5); z-index: -1;
    background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
    transform: scale(.98); opacity: 0; transition: transform .4s var(--ease), opacity .3s;
}
.index-item:hover::before { transform: none; opacity: 1; }
.index-item__num { font-size: 14px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; transition: color .3s; }
.index-item:hover .index-item__num { color: var(--brand); }
.index-item__name { font-size: clamp(18px, 1.8vw, 21px); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.index-item__desc { font-size: 15.5px; color: var(--ink-2); }

.tag {
    justify-self: end;
    font-size: 13px; font-weight: 600;
    padding: 5px 12px; border-radius: 999px;
    color: var(--ink-2); background: var(--bg-2);
}
.tag--ia { color: var(--brand-ink); background: var(--brand-soft); }

/* ---------- Capítulos ---------- */
.chapter { padding: clamp(20px, 3vw, 44px) 0 clamp(32px, 5vw, 72px); }
.chapter--alt { background: var(--card); border-block: 1px solid var(--line); }
.chapter--alt .win { background: var(--bg); }
.chapter__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 96px); align-items: start; }
.chapter--alt .chapter__copy { order: 2; }
.chapter__copy { display: flex; flex-direction: column; gap: 20px; color: var(--ink-2); font-size: 18px; }
.chapter__title { font-size: clamp(34px, 4.2vw, 52px); }

.checks { display: flex; flex-direction: column; gap: 12px; font-size: 17px; color: var(--ink); }
.checks li { display: flex; gap: 12px; align-items: center; }
.checks li::before {
    content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%;
    background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7fc7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; font-weight: 600; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--bg); }

/* Ventanas de app (dosis, simulacro, búsqueda) */
.win {
    --pad: clamp(18px, 2.6vw, 28px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0 var(--pad) var(--pad);
    box-shadow: var(--shadow-lg);
}
.win__bar {
    display: flex; align-items: center; gap: 10px;
    margin: 0 calc(var(--pad) * -1) 4px;
    padding: 14px var(--pad);
    border-bottom: 1px solid var(--line);
    font-size: 15px; font-weight: 600; color: var(--ink);
}
.win__bar img { border-radius: 6px; }

/* Demo de dosis */
.dose { display: flex; flex-direction: column; gap: 24px; }
.dose__scale { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 18px; }
.dose__track { position: relative; height: 6px; border-radius: 3px; background: var(--bg-2); }
.dose__track i {
    position: absolute; top: 50%; left: var(--p, 33%);
    width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
    background: #fff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgb(18 26 51 / .2);
}
.dose__track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 33%); background: var(--brand); border-radius: inherit; }
.dose__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dose__grid > div { padding: 16px; display: flex; flex-direction: column; gap: 6px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.dose__grid small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.dose__grid b { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.dose__hl { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff; }
.dose__hl small { color: rgb(255 255 255 / .75); }
.dose__note { font-size: 13px; color: var(--ink-3); }

/* Demo de examen */
.quiz { display: flex; flex-direction: column; gap: 18px; }
.quiz__meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 18px; }
.quiz__q { font-size: 17px; line-height: 1.55; color: var(--ink); font-weight: 600; }
.quiz__opts { display: flex; flex-direction: column; gap: 8px; }
.quiz__opts li {
    display: flex; gap: 14px; align-items: center;
    padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; background: var(--card);
    transition: background .4s, border-color .4s, color .4s;
}
.quiz__opts b { font-size: 13px; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); transition: inherit; }
.quiz__opts li.is-picked { border-color: var(--ok); }
.quiz.is-answered .is-correct { background: rgb(22 163 74 / .08); color: #15803d; border-color: var(--ok); }
.quiz.is-answered .is-correct b { background: var(--ok); color: #fff; }
.quiz__progress { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.quiz__progress i { display: block; height: 100%; width: 13%; background: var(--brand); border-radius: inherit; transition: width 1.2s var(--ease); }
.quiz.is-answered .quiz__progress i { width: 14%; }

/* Demo de búsqueda con IA */
.chat { display: flex; flex-direction: column; gap: 10px; }
.search--lg { font-size: 16px; margin-top: 18px; background: var(--card); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.codes--lg li { font-size: 16px; padding: 15px 4px; }

/* ---------- Cifras ---------- */
.figures { padding: clamp(28px, 4vw, 56px) 0; }
.figures + .section { padding-top: clamp(28px, 4vw, 56px); }
.figures__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.figures__grid > div { padding: 4px 28px; display: flex; flex-direction: column; gap: 6px; }
.figures__grid > div:first-child { padding-left: 0; }
.figures__grid > div + div { border-left: 1px solid var(--line); }
.figures b { font-size: clamp(44px, 5vw, 64px); font-weight: 700; line-height: 1; letter-spacing: -.04em; color: var(--brand); }
.figures span { font-size: 16px; color: var(--ink-2); max-width: 22ch; }

/* ---------- FAQ ---------- */
#preguntas { padding-bottom: clamp(36px, 5vw, 72px); }
#preguntas .section__head { margin-bottom: 0; }
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(20px, 5vw, 72px); align-items: start; }
.faq .section__head { position: sticky; top: 110px; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.faq__item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; transition: box-shadow .3s; }
.faq__item[open] { box-shadow: var(--shadow); }
.faq__item summary:active { opacity: .7; }
.faq__item summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 16px 0; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item h3 { font-size: 15.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.faq__item summary span { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--bg-2); transition: background .3s; }
.faq__item summary span::before, .faq__item summary span::after {
    content: ""; position: absolute; left: 9px; right: 9px; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--ink); transition: transform .35s var(--ease), background .3s;
}
.faq__item summary span::after { transform: rotate(90deg); }
.faq__item[open] summary span { background: var(--brand); }
.faq__item[open] summary span::before, .faq__item[open] summary span::after { background: #fff; }
.faq__item[open] summary span::after { transform: rotate(0); }
.faq__item p { padding: 0 0 18px; font-size: 15.5px; color: var(--ink-2); animation: fadeDown .45s var(--ease); }

/* ---------- CTA ---------- */
.cta {
    /* Franja de borde a borde: esquinas rectas */
    background: var(--ink); color: #fff;
    padding: clamp(44px, 7vw, 88px) 0;
}
@media (prefers-color-scheme: dark) { .cta { background: var(--card); border-block: 1px solid var(--line); } }
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.cta__copy { display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* Código QR */
.qr { display: none; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr__code {
    width: 168px; height: 168px; padding: 12px;
    background: #fff; border-radius: 16px;
}
.qr__code img, .qr__code canvas { width: 100% !important; height: 100% !important; display: block; image-rendering: pixelated; }
.qr figcaption { font-size: 14px; line-height: 1.45; max-width: 24ch; }
.qr figcaption strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.qr--cta figcaption strong { color: #fff; }
.qr--page figcaption strong { color: var(--ink); }
.qr--cta figcaption { color: rgb(255 255 255 / .72); }
.qr--page { margin-top: 12px; }
.qr--page .qr__code { border: 1px solid var(--line); }
.qr--page figcaption { color: var(--ink-2); }

/* El QR solo tiene sentido en computadora (no se escanea la propia pantalla) */
@media (min-width: 961px) and (hover: hover) and (pointer: fine) {
    .qr { display: flex; }
    .cta__inner { flex-direction: row; justify-content: center; gap: clamp(48px, 7vw, 96px); text-align: left; }
    .cta__copy { align-items: flex-start; max-width: 600px; }
}

/* Página /download (computadora o vista previa) */
.download { padding: clamp(32px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.download__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.download__logo { border-radius: 20px; box-shadow: var(--shadow); }
.download__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.035em; line-height: 1.08; }
.download__lede { font-size: 19px; color: var(--ink-2); }
.download__cta { justify-content: center; }

.cta__title { font-size: clamp(36px, 5.4vw, 68px); color: #fff; }
.cta__title em { color: #6cc6f5; }
.cta p { color: rgb(255 255 255 / .72); font-size: 19px; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; font-size: 15px; color: var(--ink-2); }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 44ch; }
.site-footer__brand .brand { color: var(--ink); }
.site-footer__nav { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 36px; justify-content: end; align-content: start; }
.site-footer__nav a:hover { color: var(--brand); }
.site-footer__legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }

/* ---------- Animación de entrada ---------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Desvanecido al pasar bajo el menú (--fade lo calcula main.js).
   Va en filter y no en opacity para no chocar con la transición de entrada. */
.js [data-reveal].is-fading {
    filter: opacity(var(--fade, 1)) blur(calc((1 - var(--fade, 1)) * 6px));
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes sweep { from { stroke-dashoffset: 160; } to { stroke-dashoffset: -1200; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .nav { gap: 22px; font-size: 15px; }
}
@media (max-width: 960px) {
    .hero__grid, .chapter__grid, .faq { grid-template-columns: 1fr; }
    .chapter--alt .chapter__copy { order: 0; }
    .faq .section__head { position: static; }
    .stage { padding: 40px 0 56px; width: 100%; max-width: 640px; margin: 0 auto; }
    .float--top { right: 0; }
    .index-item { grid-template-columns: 34px 1fr auto; gap: 6px 14px; align-items: baseline; }
    .index-item__desc { grid-column: 2 / -1; }
    .tag { grid-row: 1; grid-column: 3; }
    .figures__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
    .figures__grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
}
/* Tablet: una columna centrada para que la portada use todo el ancho */
@media (min-width: 641px) and (max-width: 960px) {
    .hero__copy { align-items: center; text-align: center; }
    .hero__lede { max-width: 40ch; }
    .hero__cta, .hero__meta { justify-content: center; }
    .hero__meta > div:last-child { padding-right: 0; }
}
@media (max-width: 760px) {
    .nav, .header-cuenta { display: none; }
    .site-header__inner { gap: 12px; }
    .menu-btn { display: inline-grid; }
    .menu-movil:not([hidden]) { display: block; }
    .brand { white-space: nowrap; }
}
/* Celulares angostos: logo, "Descargar" y menú en una sola línea */
@media (max-width: 400px) {
    .site-header__inner { gap: 8px; }
    .brand { font-size: 16px; gap: 8px; }
    .site-header .btn--sm { height: 38px; padding: 0 14px; font-size: 14px; }
}
@media (max-width: 350px) {
    .brand em { display: none; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .site-header__inner { height: 64px; }
    .brand { font-size: 17px; }
    .hero__meta > div { padding-right: 16px; }
    .hero__meta > div + div { padding-left: 16px; }
    .hero__meta dd { font-size: 13px; }
    .monitor__screens { min-height: 310px; }
    .float { min-width: 0; padding: 10px 14px; }
    .float__value { font-size: 24px; }
    /* La tarjeta de arriba queda sobre el borde de la principal, sin tapar su título */
    .stage { padding-top: 84px; }
    .dose__grid { grid-template-columns: 1fr 1fr; }
    .dose__hl { grid-column: 1 / -1; }
    .figures__grid > div { padding: 4px 16px; }
    .site-footer__inner { grid-template-columns: 1fr; }
    .site-footer__nav { justify-content: start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================
   Página legal (Términos de Servicio y Política de Privacidad)
   ========================================================== */
.legal { padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 7vw, 96px); }
.legal__head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.legal__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.035em; line-height: 1.08; }
.legal__meta { font-size: 15px; color: var(--ink-3); }

.legal__summary {
    margin: clamp(24px, 3vw, 36px) 0;
    padding: clamp(18px, 2.4vw, 26px);
    background: var(--brand-soft);
    border-radius: 18px;
}
.legal__summary h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.legal__summary .checks { font-size: 16px; }
.legal__summary .checks li { align-items: flex-start; }
.legal__summary .checks li::before { background-color: var(--card); margin-top: 2px; }

.legal__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }

.legal__toc { position: sticky; top: 96px; }
.legal__toc summary {
    font-size: 14px; font-weight: 700; color: var(--ink);
    padding: 0 0 12px; cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.legal__toc summary::-webkit-details-marker { display: none; }
.legal__toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); transition: transform .3s; }
.legal__toc details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.legal__toc ol { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.legal__toc a {
    display: flex; gap: 8px; padding: 6px 12px; margin-left: -1px;
    font-size: 14px; line-height: 1.4; color: var(--ink-2);
    border-left: 2px solid transparent; transition: color .2s, border-color .2s;
}
.legal__toc a span { color: var(--ink-3); min-width: 20px; font-variant-numeric: tabular-nums; }
.legal__toc a:hover { color: var(--brand); }
.legal__toc a.is-current { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }

.legal__body { max-width: 760px; min-width: 0; overflow-wrap: anywhere; }
.legal__body section + section { margin-top: clamp(32px, 4vw, 44px); padding-top: clamp(32px, 4vw, 44px); border-top: 1px solid var(--line); }
.legal__body h2 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 14px; scroll-margin-top: 96px; }
.legal__n { color: var(--brand); }
.legal__body h3 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; }
.legal__body p, .legal__body li { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.legal__body p + p, .legal__body ul + p, .legal__body p + ul { margin-top: 12px; }
.legal__body ul { display: flex; flex-direction: column; gap: 8px; }
.legal__body ul li { position: relative; padding-left: 20px; }
.legal__body ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.legal__body strong { color: var(--ink); font-weight: 600; }
.legal__body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal__body em { font-style: normal; font-weight: 600; color: var(--ink); }
.legal__alert { padding: 16px 18px; border-radius: 14px; background: #fff7ed; border: 1px solid #fed7aa; margin-bottom: 14px; }
.legal__alert p { color: #9a3412; }
.legal__alert strong { color: #7c2d12; }
@media (prefers-color-scheme: dark) {
    .legal__alert { background: rgb(251 146 60 / .1); border-color: rgb(251 146 60 / .3); }
    .legal__alert p, .legal__alert strong { color: #fdba74; }
}

@media (max-width: 960px) {
    .legal__grid { grid-template-columns: 1fr; gap: 24px; }
    .legal__toc { position: static; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
    .legal__toc summary { padding: 0; }
    .legal__toc details[open] summary { padding-bottom: 12px; }
}

/* ==========================================================
   Páginas de función (artículo + herramienta)
   ========================================================== */
.article__hero { padding: clamp(20px, 3vw, 44px) 0 clamp(32px, 5vw, 64px); }
.article__hero-grid { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: clamp(28px, 5vw, 64px); align-items: start; }
.article__intro { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.article__title { font-size: clamp(34px, 4.6vw, 58px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.article__lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 40ch; }

.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--brand); }
.crumbs a:hover { text-decoration: underline; }

/* Calculadora */
.calc { display: flex; flex-direction: column; gap: 16px; }
.calc .win__bar { margin-bottom: 2px; }
.calc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; }
.field small { font-weight: 500; color: var(--ink-3); }
.field__input {
    display: flex; align-items: center;
    border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
}
.field__input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field__input input, .field__input select {
    flex: 1; min-width: 0; width: 100%;
    border: 0; background: transparent; outline: none;
    font: 600 17px/1 var(--sans); color: var(--ink);
    padding: 12px 14px;
    -moz-appearance: textfield; appearance: none;
}
.field__input select { cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a91a8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; padding-right: 34px; }
.field__input input::-webkit-outer-spin-button, .field__input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__input em { padding-right: 14px; font-size: 14px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.calc__conc { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.calc__conc b { font-size: 14px; font-weight: 500; color: var(--ink-3); }

.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.seg__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg-2); border-radius: 12px; padding: 4px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: 9px 10px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s; }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.calc__out { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-top: 4px; }
.calc__main { background: var(--brand); color: #fff; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.calc__main small { font-size: 13px; font-weight: 500; opacity: .8; }
.calc__main b { font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc__main > span { font-size: 14px; opacity: .9; }
.calc__side { display: grid; gap: 10px; }
.calc__side > div { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); }
.calc__side small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.calc__side b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc__warn { font-size: 14px; line-height: 1.5; color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 10px 14px; }
.calc__note { font-size: 13px; color: var(--ink-3); }
.calc__ref { font-size: 13.5px; line-height: 1.5; color: var(--brand-ink); background: var(--brand-soft); border-radius: 10px; padding: 9px 12px; margin-top: -4px; }
.calc__more { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1px dashed var(--brand); border-radius: 14px; background: var(--bg); }
.calc__more p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.calc__more strong { color: var(--ink); }
.field[hidden] { display: none; }

/* Tabla de referencia */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ref-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.ref-table th, .ref-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.ref-table thead th { font-size: 13px; font-weight: 700; color: var(--ink-3); background: var(--bg); }
.ref-table tbody th { font-weight: 700; color: var(--ink); white-space: nowrap; }
.ref-table tbody th a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ref-table td { color: var(--ink-2); }
.ref-table tr:last-child > * { border-bottom: 0; }

/* Cuerpo del artículo */
.article__body { padding-bottom: clamp(40px, 6vw, 80px); overflow-wrap: anywhere; }
/* Columna de lectura alineada a la izquierda, con la cabecera */
.article__body > * { max-width: 820px; }
.article__body > section + section { margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.article__body h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 14px; }
.article__body h3 { font-size: 18px; font-weight: 700; margin: 22px 0 8px; }
.article__body p, .article__body li { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.article__body p + p { margin-top: 12px; }
.article__body strong { color: var(--ink); font-weight: 600; }
.article__body .faq__list { margin-top: 8px; }
.article__body .faq__item p { font-size: 15.5px; }

.formula { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.formula p { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 12px; color: var(--ink); font-size: 17px; }
.formula em { font-style: normal; }
.formula p + p { margin-top: 0; }
.formula span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 14px; }
.formula b { font-weight: 700; }

.steps { counter-reset: s; display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 36px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.compare > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.compare h3 { margin: 0 0 6px; color: var(--brand); }
.compare p { font-size: 15.5px; }
.compare__ex { margin-top: 10px; font-size: 14px !important; font-weight: 600; color: var(--ink) !important; background: var(--bg-2); border-radius: 8px; padding: 8px 10px; }

.bullets { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }


.article__disclaimer { margin-top: clamp(32px, 4vw, 48px); font-size: 14px !important; color: var(--ink-3) !important; border-top: 1px solid var(--line); padding-top: 20px; }

/* Enlace en el índice de funciones */
.index-item__name a { transition: color .2s; }
.index-item__name a::after { content: " →"; color: var(--brand); opacity: 0; transition: opacity .2s; }
.index-item:hover .index-item__name a { color: var(--brand); }
.index-item:hover .index-item__name a::after { opacity: 1; }
.chapter__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand); font-size: 17px; }
.chapter__link:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 960px) {
    .article__hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .calc__grid, .compare, .calc__out { grid-template-columns: 1fr; }
    .calc__side { grid-template-columns: 1fr 1fr; }
}
@media (prefers-color-scheme: dark) {
    .calc__warn { background: rgb(251 146 60 / .1); border-color: rgb(251 146 60 / .3); color: #fdba74; }
}

/* Páginas por fármaco */
.ref-table--num td, .ref-table--num thead th + th { text-align: right; font-variant-numeric: tabular-nums; }
.ref-table--num tbody tr:nth-child(even) { background: var(--bg); }
.table-note { font-size: 14px !important; color: var(--ink-3) !important; margin-top: -6px; }
.drug-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.drug-links a { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 16px; font-weight: 600; color: var(--ink); transition: border-color .2s, color .2s; }
.drug-links a span { color: var(--brand); }
.drug-links a:hover { border-color: var(--brand); color: var(--brand); }

/* Calculadora de IMC */
.imc { --t-bajo: #38bdf8; --t-normal: #22c55e; --t-sobre: #facc15; --t-ob1: #fb923c; --t-ob2: #ef4444; --t-ob3: #b91c1c; }
.imc__out { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.imc__value small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.imc__value b { display: block; font-size: clamp(40px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.imc__value em { font-style: normal; font-size: 16px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.imc__cat { font-size: 15px; font-weight: 700; padding: 7px 14px; border-radius: 999px; color: var(--ink); background: var(--bg-2); }
.imc__cat[data-tono="bajo"]   { background: color-mix(in srgb, var(--t-bajo) 22%, transparent); }
.imc__cat[data-tono="normal"] { background: color-mix(in srgb, var(--t-normal) 22%, transparent); }
.imc__cat[data-tono="sobre"]  { background: color-mix(in srgb, var(--t-sobre) 30%, transparent); }
.imc__cat[data-tono="ob1"]    { background: color-mix(in srgb, var(--t-ob1) 25%, transparent); }
.imc__cat[data-tono="ob2"], .imc__cat[data-tono="ob3"] { background: color-mix(in srgb, var(--t-ob2) 20%, transparent); }

.imc__scale { position: relative; padding: 6px 0; }
.imc__bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.imc__bar i { display: block; height: 100%; }
.imc__bar i[data-tono="bajo"]   { background: var(--t-bajo); }
.imc__bar i[data-tono="normal"] { background: var(--t-normal); }
.imc__bar i[data-tono="sobre"]  { background: var(--t-sobre); }
.imc__bar i[data-tono="ob1"]    { background: var(--t-ob1); }
.imc__bar i[data-tono="ob2"]    { background: var(--t-ob2); }
.imc__bar i[data-tono="ob3"]    { background: var(--t-ob3); }
.imc__marker {
    position: absolute; top: 0; width: 22px; height: 22px; margin-left: -11px;
    border-radius: 50%; background: var(--card); border: 3px solid var(--ink);
    box-shadow: 0 2px 6px rgb(18 26 51 / .25);
    transition: left .4s var(--ease);
}
.imc__side { grid-template-columns: 1fr 1fr; }
.imc__ref { font-size: 14px !important; line-height: 1.35; }

/* Superficie corporal: comparación de fórmulas */
.sc__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc__list li { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); }
.sc__list li > span { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.sc__list b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Delta peso del recién nacido */
.delta__dias { grid-column: 1 / -1; }
.delta__msg { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.delta__msg:empty { display: none; }

/* Clasificación en tablas: punto de color */
.tono { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* Tarjeta "Calcúlalo en la app" (páginas sin calculadora web) */
.app-card { display: flex; flex-direction: column; gap: 16px; }
.app-card .win__bar { margin-bottom: 2px; }
.app-card__text { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.app-card .checks { font-size: 15px; }
.app-card .btn { align-self: flex-start; }

/* ==========================================================
   Inicio de sesión y cuenta
   ========================================================== */
.auth { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.auth__wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.auth__card {
    width: 100%; max-width: 440px;
    background: var(--card); border: 1px solid var(--line); border-radius: 24px;
    box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 36px);
}
.auth__title { font-size: clamp(26px, 3vw, 32px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.auth__lede { margin-top: 8px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.auth__view { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.auth__view[hidden] { display: none; }

.auth__terms { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.auth__terms input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--brand); cursor: pointer; }
.auth__terms a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.auth__metodos { display: flex; flex-direction: column; gap: 10px; }
.auth__btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 50px; border-radius: 999px; border: 1px solid var(--line);
    font: 600 15.5px/1 var(--sans); cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .2s, opacity .2s, border-color .2s;
}
.auth__btn svg { width: 20px; height: 20px; flex: none; }
.auth__btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.auth__btn:not(:disabled):active { transform: scale(.98); }
.auth__btn:disabled { opacity: .45; cursor: not-allowed; }
.auth__btn--correo { background: var(--brand); border-color: var(--brand); color: #fff; }
.auth__btn--google { background: #fff; color: #1f1f1f; }
.auth__btn--apple  { background: #000; border-color: #000; color: #fff; }

/* Carga: el ícono se reemplaza por un indicador */
.is-loading { pointer-events: none; }
.auth__btn.is-loading svg { visibility: hidden; }
.auth__btn.is-loading::before, .auth__submit.is-loading::before {
    content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: girar .7s linear infinite;
}
.auth__btn.is-loading::before { left: calc(50% - 9px); }
.auth__btn.is-loading span { opacity: 0; }
.auth__submit.is-loading { color: transparent; }
.auth__submit.is-loading::before { border-color: #fff; border-right-color: transparent; z-index: 1; }
@keyframes girar { to { transform: rotate(360deg); } }

.auth__volver {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
    background: none; border: 0; padding: 0; font: 600 14.5px/1 var(--sans); color: var(--ink-2); cursor: pointer;
}
.auth__volver svg { width: 18px; height: 18px; }
.auth__volver:hover { color: var(--brand); }
.auth .field__input input { font-size: 16px; }
.auth__submit { width: 100%; margin-top: 2px; }
.auth__links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.auth__link { background: none; border: 0; padding: 0; font: 600 14.5px/1.4 var(--sans); color: var(--brand); cursor: pointer; text-align: left; }
.auth__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth__link[hidden] { display: none; }

.auth__error, .auth__ok { font-size: 14.5px; line-height: 1.5; padding: 10px 14px; border-radius: 12px; }
.auth__error { color: #b42318; background: #fef3f2; }
.auth__ok { color: #166534; background: #f0fdf4; }
.auth__error[hidden], .auth__ok[hidden] { display: none; }
.auth__nota { font-size: 14.5px; color: var(--ink-2); text-align: center; max-width: 440px; }
.auth__nota a { color: var(--brand); font-weight: 600; }

.cuenta__perfil { display: flex; align-items: center; gap: 16px; }
.cuenta__avatar {
    width: 64px; height: 64px; border-radius: 50%; flex: none; object-fit: cover;
    display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
    font-size: 26px; font-weight: 700;
}
.cuenta__nombre { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.cuenta__correo { color: var(--ink-2); font-size: 15px; margin-top: 2px; overflow-wrap: anywhere; }
.cuenta__datos { margin: 24px 0 20px; border-top: 1px solid var(--line); }
.cuenta__datos > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cuenta__datos dt { color: var(--ink-3); font-weight: 500; }
.cuenta__datos dd { font-weight: 600; text-align: right; }
.cuenta__salir { width: 100%; margin-top: 4px; }

@media (prefers-color-scheme: dark) {
    .auth__btn--google { border-color: #fff; }
    .auth__btn--apple { background: #fff; color: #000; border-color: #fff; }
    .auth__error { color: #fda29b; background: rgb(240 68 56 / .14); }
    .auth__ok { color: #86efac; background: rgb(34 197 94 / .14); }
}

/* ==========================================================
   Suscripción Premium (Yape / Plin)
   ========================================================== */
.premium { padding-bottom: clamp(56px, 8vw, 96px); }
.premium__hero { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(24px, 3vw, 36px); }
.premium__title { margin-top: 10px; font-size: clamp(38px, 5.4vw, 64px); font-weight: 700; letter-spacing: -.04em; line-height: 1.04; }
.premium__lede { margin-top: 14px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.premium__paso { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.premium__paso span {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--ink); color: var(--bg); font-size: 15px;
}
.premium__nota { margin-top: 14px; font-size: 14.5px; color: var(--ink-3); }
.premium__h { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; letter-spacing: -.03em; margin-bottom: 18px; }
.premium__sub { margin-top: 20px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }

.planes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    background: var(--card); border: 1.5px solid var(--line); border-radius: 20px;
    padding: 20px 20px 18px; cursor: pointer; box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .25s, transform .25s var(--ease);
}
.plan:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.plan--off { cursor: not-allowed; background: var(--bg); box-shadow: none; }
.plan--off:hover { transform: none; box-shadow: none; }
.plan--off .plan__nombre, .plan--off .plan__precio, .plan--off .plan__mes { color: var(--ink-3); }
.plan--off .plan__check { display: none; }
.plan--off .plan__top { padding-right: 0; }
.plan:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.plan__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-right: 30px; }
.plan__nombre { font-size: 16px; font-weight: 700; }
.plan__etiqueta { font-size: 13px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.plan__precio { margin-top: 6px; font-size: clamp(28px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan__mes { font-size: 14px; color: var(--ink-2); }
.plan__mes b { color: var(--ok); font-weight: 700; }
.plan__precio small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; line-height: 1.3; color: var(--ink-3); }
.pago__igv { font-size: 12px; }
.plan__activa { font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.plan__info { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.plan__check {
    position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid var(--line); transition: background .2s, border-color .2s;
}
.plan:has(input:checked) .plan__check {
    border-color: var(--brand);
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.premium__grid { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: clamp(40px, 5vw, 64px); }
.premium__incluye .checks { font-size: 16px; gap: 11px; }

.pago { display: flex; flex-direction: column; gap: 18px; }
.pago .win__bar { margin-bottom: 0; }
.pago__resumen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pago__resumen > div { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.pago__resumen small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.pago__resumen b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pago__login { display: flex; flex-direction: column; gap: 14px; }
.pago__login p { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }

.pago__metodos { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pago__metodos legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.metodo { position: relative; cursor: pointer; }
.metodo input { position: absolute; opacity: 0; pointer-events: none; }
.metodo span {
    display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px;
    border: 1.5px solid var(--line); border-radius: 14px; font-weight: 700; font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
}
.metodo img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; }
.metodo input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg-2); }
.metodo input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }

.pago__qr { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: center; }
.pago__qr-img {
    width: 132px; height: 132px; border-radius: 16px; border: 1.5px dashed var(--ink-3);
    display: grid; place-items: center; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-3);
    transition: border-color .2s;
}
.pago__qr-img:has(img) { width: 168px; height: auto; aspect-ratio: 514 / 629; border: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.pago__qr-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-metodo="yape"] [data-qr-metodo="plin"], [data-metodo="plin"] [data-qr-metodo="yape"] { display: none; }
[data-metodo="yape"] .pago__qr-img { border-color: #742284; }
[data-metodo="plin"] .pago__qr-img { border-color: #00a19a; }
.pago__pasos { counter-reset: paso; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.pago__pasos li { counter-increment: paso; position: relative; padding-left: 24px; }
.pago__pasos li::before { content: counter(paso) "."; position: absolute; left: 0; font-weight: 700; color: var(--ink); }
.pago__pasos b { color: var(--ink); }

.pago__form { display: flex; flex-direction: column; gap: 14px; }
.pago__form[hidden] { display: none; }
.pago__intro { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.pago__form .field > small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.field__input--fijo { background: var(--bg-2); }
.field__input--fijo:focus-within { border-color: var(--line); box-shadow: none; }
.field__input--fijo input { color: var(--ink-2); cursor: default; }
.field__input--pre em { order: -1; padding: 0 0 0 14px; color: var(--ink-2); }
.field__input--pre input { padding-left: 8px; }
.pago__confirmo { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; cursor: pointer; }
.pago__confirmo input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); cursor: pointer; }
.pago__enviar { width: 100%; }
.pago__cuenta { font-size: 13.5px; color: var(--ink-3); text-align: center; overflow-wrap: anywhere; }
.pago__cuenta b { color: var(--ink-2); }

.pago__listo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 0 4px; }
.pago__listo[hidden] { display: none; }
.pago__listo h3 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.pago__listo p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.pago__listo .btn { margin-top: 6px; }
.pago__soporte { font-size: 14px !important; }
.pago__soporte[hidden] { display: none; }
.pago__soporte b { color: var(--ink); letter-spacing: .04em; }
.pago__enviar.is-loading { color: transparent; pointer-events: none; }
.pago__enviar.is-loading::before {
    content: ""; position: absolute; left: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #fff; border-right-color: transparent; animation: girar .7s linear infinite; z-index: 1;
}
.pago__ok { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pago__ok svg { width: 26px; height: 26px; }

.premium__faq { margin-top: clamp(48px, 6vw, 80px); }
.premium__faq > * { max-width: 860px; }

.cuenta__premium {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; background: var(--brand-soft);
}
.cuenta__premium b { font-size: 15.5px; }
.cuenta__premium p { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); margin-top: 2px; }
.cuenta__premium .btn { flex: none; }

@media (max-width: 1020px) {
    .planes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .premium__grid { grid-template-columns: 1fr; }
    .premium__grid .pago { order: -1; }
}
@media (max-width: 520px) {
    .planes { grid-template-columns: 1fr; gap: 10px; }
    .plan { padding: 16px 18px; }
    .pago__qr { grid-template-columns: 1fr; justify-items: center; }
    .pago__qr-img:has(img) { width: min(240px, 100%); }
    .pago__pasos { align-self: stretch; }
}

/* QR: toque para ampliar */
.pago__qr-btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pago__qr-btn:active { transform: scale(.98); }
.pago__qr-zoom {
    position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; background: rgb(255 255 255 / .92); color: var(--ink);
    box-shadow: 0 2px 6px rgb(18 26 51 / .2);
}
.pago__qr-zoom svg { width: 18px; height: 18px; }
.pago__tip { color: var(--ink-3); }
[data-metodo="yape"] .pago__qr-btn[data-qr-metodo="plin"], [data-metodo="plin"] .pago__qr-btn[data-qr-metodo="yape"] { display: none; }

.qr-modal {
    width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 20px;
    border: 0; background: transparent; color: #fff;
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    cursor: zoom-out;
}
.qr-modal[open] { display: flex; animation: qr-in .25s var(--ease); }
.qr-modal::backdrop { background: rgb(8 12 26 / .88); }
.qr-modal img {
    width: auto; height: auto; max-width: min(92vw, 560px); max-height: calc(100dvh - 120px);
    border-radius: 18px; background: #fff; cursor: default;
}
.qr-modal p { font-size: 15px; font-weight: 600; opacity: .85; text-align: center; }
.qr-modal__cerrar {
    position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; border: 0; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer;
}
.qr-modal__cerrar svg { width: 22px; height: 22px; }
@keyframes qr-in { from { opacity: 0; transform: scale(.96); } }

/* Subir comprobante */
.subir { position: relative; display: block; cursor: pointer; }
.subir input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.subir__vacio {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px;
    border: 1.5px dashed var(--ink-3); border-radius: 14px; background: var(--bg); text-align: center;
    transition: border-color .2s, background .2s;
}
.subir:hover .subir__vacio, .subir:focus-within .subir__vacio { border-color: var(--brand); background: var(--brand-soft); }
.subir__vacio svg { width: 26px; height: 26px; color: var(--brand); }
.subir__vacio b { font-size: 15px; }
.subir__vacio small, .subir__lleno small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.subir__vacio[hidden], .subir__lleno[hidden] { display: none; }
.subir__lleno { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.subir__lleno img { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; background: #fff; flex: none; }
.subir__lleno > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.subir__lleno b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================
   Panel de administración
   ========================================================== */
.adm { background: var(--bg); }
.adm-header { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); }
.adm-header__inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.adm-header .brand { font-size: 17px; }
.adm-nav { display: flex; gap: 6px; }
.adm-nav a, .adm-tabs a { padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.adm-nav a:hover, .adm-tabs a:hover { background: var(--bg-2); }
.adm-nav a[aria-current], .adm-tabs a[aria-current] { background: var(--ink); color: var(--bg); }
.adm-yo { margin-left: auto; font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30ch; }
.adm-main { padding-top: 28px; padding-bottom: 64px; }
.adm-titulo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.adm-h1 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.adm-h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin: 32px 0 12px; }
.adm-muted { color: var(--ink-3); font-size: 14.5px; }
.adm-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.adm-code { background: var(--bg-2); border-radius: 10px; padding: 12px 14px; font-size: 14px; overflow-x: auto; }
.adm-flash { padding: 12px 16px; border-radius: 12px; font-size: 15px; margin-bottom: 16px; }
.adm-flash--ok { background: #f0fdf4; color: #166534; }
.adm-flash--error { background: #fef3f2; color: #b42318; }
.adm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.adm-tabs a span { margin-left: 4px; opacity: .7; font-variant-numeric: tabular-nums; }
.adm-vacio { padding: 28px; text-align: center; color: var(--ink-3); background: var(--card); border: 1px dashed var(--line); border-radius: 16px; }

.adm-tabla { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.adm-tabla table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14.5px; }
.adm-tabla th, .adm-tabla td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-tabla tbody tr:last-child td { border-bottom: 0; }
.adm-tabla th { font-size: 12.5px; font-weight: 700; color: var(--ink-3); background: var(--bg); white-space: nowrap; }
.adm-tabla td small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.adm-link { font-weight: 700; color: var(--brand); }
.adm-link:hover { text-decoration: underline; }
.adm-thumb img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: block; }
.adm-thumb:hover img { border-color: var(--brand); }
.adm-estado { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.adm-estado--pendiente { background: #fef9c3; color: #854d0e; }
.adm-estado--verificado { background: #dcfce7; color: #166534; }
.adm-estado--rechazado { background: var(--bg-2); color: var(--ink-2); }
.adm-acciones { display: flex; gap: 6px; margin-top: 10px; }
.adm-acciones .btn--sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.adm-buscar { display: flex; gap: 8px; width: min(100%, 520px); }
.adm-buscar .field__input { flex: 1; }
.adm-buscar input { font-size: 15px; }
.adm-volver { display: inline-block; margin-bottom: 14px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.adm-perfil__top { display: flex; align-items: center; gap: 14px; }
.adm-perfil__top img { border-radius: 50%; object-fit: cover; }
.adm-perfil__top .adm-estado { margin-left: auto; font-size: 14px; padding: 6px 14px; }
.adm-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 24px; border-top: 1px solid var(--line); }
.adm-datos > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.adm-datos dt { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.adm-datos dd { font-size: 14.5px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) {
    .adm-estado--pendiente { background: rgb(234 179 8 / .18); color: #fde047; }
    .adm-estado--verificado { background: rgb(34 197 94 / .16); color: #86efac; }
    .adm-flash--ok { background: rgb(34 197 94 / .14); color: #86efac; }
    .adm-flash--error { background: rgb(240 68 56 / .14); color: #fda29b; }
}
@media (max-width: 640px) {
    .adm-header__inner { gap: 12px; }
    .adm-yo { display: none; }
    .adm-header .brand span { display: none; }
}

.adm-col-usuario { display: none; }
.adm-ver-usuarios .adm-col-usuario { display: table-cell; }
.adm-toggle {
    float: right; margin-top: 4px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--card); font: 600 13.5px var(--sans); color: var(--ink-2); cursor: pointer;
}
.adm-toggle:hover { border-color: var(--ink-3); }
.adm-toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.adm-h2-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.adm-h2-fila .adm-h2 { margin: 0; }
.adm-h2-fila .adm-toggle { float: none; margin: 0; }

.adm-mini { display: inline-block; margin-left: 8px; vertical-align: middle; }
.adm-mini .btn--sm { height: 30px; padding: 0 12px; font-size: 13px; }
.adm-tabla td .adm-estado, .adm-tabla td .adm-muted { vertical-align: middle; }
.adm-dd-accion { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adm-dd-accion .adm-mini { margin-left: 0; }

.adm-foto { padding: 0; border: 0; background: none; border-radius: 50%; cursor: zoom-in; flex: none; transition: transform .2s var(--ease), box-shadow .2s; }
.adm-foto:hover { transform: scale(1.06); box-shadow: 0 0 0 3px var(--brand-soft); }
.adm-foto img { display: block; border-radius: 50%; object-fit: cover; }
[data-foto-modal] img { width: min(80vw, 480px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 24px; background: var(--bg-2); }

.adm-restante { font-weight: 700; color: var(--ok); white-space: nowrap; }
.adm-restante--fin { color: var(--ink-3); font-weight: 500; }
.adm-datos dd .adm-restante { display: block; font-size: 13px; margin-top: 2px; }

/* Panel: certificados */
.cert-form { max-width: none; margin-bottom: 8px; }
.cert-form__titulo { margin: 0 0 4px; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cert-form .field > small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.cert-form .field__input input, .cert-form .field__input select { font-size: 15px; font-weight: 500; }
.cert-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
    font: 500 15px/1.55 var(--sans); color: var(--ink); resize: vertical;
}
.cert-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cert-campo { margin-top: 14px; }
.cert-carta { margin-top: 18px; border: 1.5px dashed var(--line); border-radius: 16px; padding: 14px 16px; transition: border-color .2s, background .2s; }
.cert-carta.is-on { border-style: solid; border-color: #e2b53f; background: color-mix(in srgb, #e2b53f 8%, transparent); }
.cert-carta__texto { display: none; margin-top: 14px; }
.cert-carta.is-on .cert-carta__texto { display: flex; }
.cert-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; }
.cert-switch input { position: absolute; opacity: 0; }
.cert-switch small { display: block; font-size: 13px; color: var(--ink-3); }
.cert-switch__pista { width: 46px; height: 26px; border-radius: 26px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.cert-switch__pista::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: left .2s; }
.cert-switch input:checked + .cert-switch__pista { background: #e2b53f; }
.cert-switch input:checked + .cert-switch__pista::after { left: 23px; }
.cert-switch input:focus-visible + .cert-switch__pista { outline: 2px solid var(--brand); outline-offset: 2px; }
.cert-botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cert-lista-titulo { margin-top: 28px; }
.cert-lista-titulo .adm-h2 { margin: 0; }
.cert-mini { width: 38px; height: 46px; object-fit: cover; border-radius: 6px; display: block; }
.cert-mini--sin { display: grid; place-items: center; background: var(--bg-2); color: var(--ink-3); font-size: 9.5px; text-align: center; line-height: 1.1; }
.cert-nowrap { white-space: nowrap; }
.cert-acciones { margin-top: 0; flex-wrap: wrap; }
.cert-acciones form { display: inline; }
.cert-anular { background: #c0392b; border-color: #c0392b; }
.cert-anular:hover { background: #a93226; border-color: #a93226; }
.cert-qr { border: 0; border-radius: 20px; padding: 24px; text-align: center; width: min(92vw, 340px); background: var(--card); color: var(--ink); }
.cert-qr::backdrop { background: rgb(8 12 26 / .6); }
.cert-qr h3 { font-size: 18px; font-weight: 700; }
.cert-qr__img { display: flex; justify-content: center; margin: 14px 0; }
.cert-qr__img img, .cert-qr__img canvas { background: #fff; padding: 8px; border-radius: 10px; }
.cert-qr__url { font-size: 12.5px; color: var(--ink-3); word-break: break-all; }
.cert-qr .cert-botones { justify-content: center; margin-top: 14px; }
