/* Academia de Inversiones — tema bolsa */
:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-2: #e8edf3;
    --ink: #0a1628;
    --ink-2: #1e3a5f;
    --muted: #5c6b7e;
    --line: #d4dce6;
    --brand: #0c2340;
    --brand-2: #1a4d7c;
    --brand-soft: #e8f0f8;
    --bull: #059669;
    --bull-light: #34d399;
    --bull-soft: #ecfdf5;
    --bear: #dc2626;
    --gold: #b8860b;
    --gold-light: #d4a847;
    --gold-soft: #fef9e7;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 1px 2px rgba(10,22,40,.05), 0 6px 20px rgba(10,22,40,.07);
    --shadow-lg: 0 8px 30px rgba(10,22,40,.12);
    --font: 'DM Sans', system-ui, sans-serif;
    --display: 'Instrument Serif', Georgia, serif;
    --nav: 64px;
    --bottom-nav-h: 60px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --ease: cubic-bezier(.22,1,.36,1);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a0f18;
    --surface: #121a27;
    --surface-2: #1a2433;
    --ink: #e8edf3;
    --ink-2: #c5d0de;
    --muted: #8b9cb3;
    --line: #2a3548;
    --brand: #5b9fd4;
    --brand-2: #3d7ab5;
    --brand-soft: rgba(61, 122, 181, 0.18);
    --bull: #34d399;
    --bull-light: #6ee7b7;
    --bull-soft: rgba(52, 211, 153, 0.12);
    --gold: #d4a847;
    --gold-light: #e8c56a;
    --gold-soft: rgba(212, 168, 71, 0.12);
    --shadow: 0 1px 2px rgba(0,0,0,.25), 0 6px 20px rgba(0,0,0,.35);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.45);
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 70% 45% at 90% 0%, rgba(5,150,105,.07), transparent),
        radial-gradient(ellipse 50% 40% at 0% 100%, rgba(184,134,11,.05), transparent),
        linear-gradient(rgba(12,35,64,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12,35,64,.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    transition: background-color .25s ease, color .25s ease;
}

html[data-theme="dark"] body:not(.login-page) {
    background-image:
        radial-gradient(ellipse 70% 45% at 90% 0%, rgba(52,211,153,.06), transparent),
        radial-gradient(ellipse 50% 40% at 0% 100%, rgba(212,168,71,.04), transparent),
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
}

a { color: inherit; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.55s var(--ease) both; }

/* ── Login — terminal de mercado ── */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #061018 0%, #0c2340 40%, #0a2e1f 100%);
    overflow-x: hidden;
}

.login-page::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
}

.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(52,211,153,.08), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(212,168,71,.06), transparent 35%);
    pointer-events: none;
    z-index: 0;
}

.login-shell {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
    width: 100%;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.login-hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: clamp(32px, 5vw, 56px) clamp(28px, 4vw, 64px);
    color: #fff;
    overflow: hidden;
}

.login-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
}

.login-hero-bg .chart-deco {
    position: absolute;
    bottom: 8%;
    left: clamp(20px, 4vw, 48px);
    right: clamp(20px, 4vw, 48px);
    width: auto;
    max-width: none;
    height: auto;
    opacity: 1;
}

.login-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.login-hero-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.login-hero h1 {
    font-family: var(--display);
    font-size: clamp(1.85rem, 3.2vw, 2.75rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 16px;
}

.login-hero p {
    font-size: 1rem;
    opacity: .88;
    line-height: 1.65;
    margin-bottom: 4px;
}

.login-hero .brand-row,
.login-side .brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    font-weight: 600;
    font-size: .95rem;
}

.login-hero .brand-row .logo,
.login-side .brand-row .logo { width: 40px; height: 40px; flex-shrink: 0; }

.ticker,
.login-ticker {
    overflow: hidden;
    background: rgba(0,0,0,.35);
    border-top: 1px solid rgba(52,211,153,.25);
    padding: 10px 0;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.ticker-track {
    display: flex;
    gap: 40px;
    animation: ticker 25s linear infinite;
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(255,255,255,.7);
}

.ticker-track span { color: var(--bull-light); }

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

.login-features {
    list-style: none;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .92rem;
    opacity: .9;
}

.login-features li::before {
    content: '✓';
    width: 22px;
    height: 22px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .7rem;
    flex-shrink: 0;
}

.login-form-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px clamp(16px, 3vw, 32px) 24px 8px;
    background: transparent;
    border-left: none;
    box-shadow: none;
}

html[data-theme="dark"] .login-form-side {
    background: var(--bg);
}

html[data-theme="dark"] .login-card {
    border-color: var(--line);
    box-shadow: var(--shadow-lg);
}

.login-card {
    width: 100%;
    max-width: 320px;
    padding: 22px 24px 24px;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06);
    animation: fadeInUp 0.6s var(--ease) 0.1s both;
}

.login-card-eyebrow {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--bull);
    margin-bottom: 6px;
}

.login-card h2 {
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 400;
    margin-bottom: 4px;
    color: var(--ink);
    line-height: 1.2;
}

.login-card .sub {
    color: var(--muted);
    margin-bottom: 18px;
    font-size: .82rem;
}

.login-page .field { margin-bottom: 12px; }

.login-page .field label {
    font-size: .75rem;
    margin-bottom: 4px;
}

.login-page .field input {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .9rem;
}

.login-page .btn-full {
    margin-top: 4px;
    padding: 11px 16px;
    font-size: .88rem;
}

/* ── Forms ── */
.field { margin-bottom: 20px; }

.field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s, background .25s;
}

html[data-theme="dark"] .alert {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

html[data-theme="dark"] .player-ph {
    background: #000;
    color: #64748b;
}

html[data-theme="dark"] .bottom-nav {
    background: rgba(18, 26, 39, .96);
    border-top-color: var(--line);
}

html[data-theme="dark"] .watch-mobile-btn {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink-2);
}

html[data-theme="dark"] .kbd-hint kbd {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--muted);
}

.field input:focus {
    outline: none;
    border-color: var(--bull);
    box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}

.alert {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: .88rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s var(--ease);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(12,35,64,.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a2e52 0%, #1e5a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(12,35,64,.3);
}

.btn-outline {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.btn-outline:hover { border-color: var(--brand-2); color: var(--brand); }

.btn-full { width: 100%; padding: 14px; }
.btn-sm { padding: 9px 16px; font-size: .82rem; }
.btn-disabled { opacity: .45; cursor: not-allowed; }

/* ── Tema claro / oscuro ── */
.theme-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, border-color .2s, color .2s, transform .15s;
}

.theme-toggle:hover {
    border-color: var(--bull);
    color: var(--bull);
    background: var(--bull-soft);
}

.theme-toggle:active { transform: scale(.96); }

.theme-toggle-inner {
    position: relative;
    width: 18px;
    height: 18px;
    display: block;
}

.theme-toggle .theme-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    transition: opacity .2s ease, transform .2s ease;
}

.theme-toggle .theme-icon-moon {
    opacity: 0;
    transform: scale(.85);
    pointer-events: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
    opacity: 0;
    transform: scale(.85);
    pointer-events: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-moon {
    opacity: 1;
    transform: scale(1);
    pointer-events: none;
}

.login-form-tools {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 320px;
    margin-bottom: 12px;
}

/* ── Nav ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 40px);
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s, background .25s;
}

html[data-theme="dark"] .topbar {
    background: rgba(18, 26, 39, .92);
}

html[data-theme="dark"] .topbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
}

.topbar.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 4px 20px rgba(15,23,42,.06);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: .95rem;
    color: var(--ink);
}

.topbar-brand .logo { width: 32px; height: 32px; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--surface-2);
    border-radius: 999px;
    font-size: .82rem;
    color: var(--ink-2);
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--bull));
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
}

.back-btn:hover { color: var(--brand); }
.back-btn svg { width: 18px; height: 18px; flex-shrink: 0; display: block; }

.topbar svg:not(.logo) {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

/* ── Layout ── */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px clamp(20px, 4vw, 40px) 80px;
}

/* ── Hero ── */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 44px 48px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(5,150,105,.14), transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--bull), var(--gold-light), var(--brand-2));
}

.hero-inner { position: relative; z-index: 1; }

.welcome {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.welcome strong { color: var(--ink-2); }

.hero-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bull-soft);
    color: var(--bull);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid rgba(5,150,105,.15);
}

.hero h1 {
    font-family: var(--display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 12px;
}

.hero > p {
    color: var(--muted);
    font-size: 1.02rem;
    max-width: 560px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.stat-box {
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .2s, transform .2s;
}

.stat-box:hover {
    border-color: var(--bull);
    transform: translateY(-2px);
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--bull), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-lbl {
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 4px;
}

/* ── Modules ── */
.section-h {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 16px;
}

.modules {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.mod-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
}

.mod-card.featured .mod-top { height: auto; min-height: 200px; }
.mod-card.featured .mod-body { padding: 32px 36px; justify-content: center; }
.mod-card.featured .mod-body h2 { font-size: 1.65rem; }

.mod-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s var(--ease), box-shadow .25s;
    display: flex;
    flex-direction: column;
}

.mod-card:hover:not(.locked) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.mod-card.locked { opacity: .55; }

.mod-top {
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.mod-top::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.mod-num {
    position: absolute;
    top: 12px;
    right: 20px;
    font-family: var(--display);
    font-size: 4rem;
    font-weight: 400;
    opacity: .15;
    line-height: 1;
}

.mod-top.m1 { background: linear-gradient(135deg, #0c2340 0%, #0f3d2e 60%, #059669 100%); }
.mod-top.m2 { background: linear-gradient(135deg, #1a1240 0%, #312e81 50%, #6d28d9 100%); }
.mod-top.m3 { background: linear-gradient(135deg, #0c2340 0%, #1a365d 50%, #2563eb 100%); }
.mod-top.m4 { background: linear-gradient(135deg, #07332e 0%, #0f5132 50%, #0d9488 100%); }
.mod-top.m5 { background: linear-gradient(135deg, #1a2e1a 0%, #3d3520 50%, #b8860b 100%); }
.mod-top.m6 { background: linear-gradient(135deg, #2d1b4e 0%, #4c1d95 50%, #7c3aed 100%); }
.mod-top.m8 { background: linear-gradient(135deg, #3d2b1f 0%, #6b4423 50%, #a16207 100%); }
.mod-top.m9 { background: linear-gradient(135deg, #0f2942 0%, #1e5a8a 50%, #0284c7 100%); }

.mod-top span {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .9;
}

.mod-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }

.mod-body h2 {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1.3;
}

.mod-body p {
    font-size: .88rem;
    color: var(--muted);
    flex: 1;
    margin-bottom: 18px;
    line-height: 1.6;
}

.chip {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.chip-ok { background: var(--bull-soft); color: var(--bull); border: 1px solid rgba(5,150,105,.15); }
.chip-wait { background: var(--surface-2); color: var(--muted); }

.prog { margin: 12px 0 18px; }
.prog-track {
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
}
.prog-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bull), var(--gold-light));
    border-radius: 3px;
    transition: width .8s var(--ease);
}
.prog-label {
    font-size: .75rem;
    color: var(--muted);
    margin-top: 6px;
}

/* ── Module page ── */
.mod-header {
    margin-bottom: 36px;
    padding: 32px 36px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--brand);
    font-weight: 500;
}

.breadcrumb a:hover { text-decoration: underline; }
.mod-header h1 {
    font-family: var(--display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 400;
    margin: 12px 0 8px;
}
.mod-header p { color: var(--muted); max-width: 600px; }

.lessons { display: flex; flex-direction: column; gap: 10px; }

.lesson-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: all .25s var(--ease);
}

.lesson-row:hover {
    border-color: var(--bull);
    box-shadow: var(--shadow-lg);
    transform: translateX(6px);
    background: linear-gradient(90deg, var(--bull-soft), var(--surface));
}

.lesson-idx {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bull-soft);
    color: var(--bull);
    font-weight: 700;
    font-size: .9rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.lesson-row:hover .lesson-idx { background: var(--bull); color: #fff; }

.lesson-txt { flex: 1; }
.lesson-txt h3 { font-size: .95rem; font-weight: 600; }
.lesson-txt p { font-size: .8rem; color: var(--muted); margin-top: 2px; }

.lesson-go {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    color: var(--brand);
    font-size: .75rem;
    transition: all .2s;
}

.lesson-row:hover .lesson-go { background: var(--brand); color: #fff; }

/* ── Watch ── */
.watch-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.player {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow-lg);
}

.player iframe, .player video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.player-ph {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #94a3b8;
    min-height: 200px;
}

.watch-info { margin-top: 28px; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.watch-info .ep { font-size: .75rem; font-weight: 700; color: var(--bull); text-transform: uppercase; letter-spacing: .08em; }
.watch-info h1 { font-family: var(--display); font-size: 1.75rem; font-weight: 400; margin: 8px 0 16px; }

.watch-nav {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.watch-nav a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink-2);
    transition: all .2s;
}

.watch-nav a:hover { background: var(--bull-soft); color: var(--bull); }
.watch-nav a.disabled { opacity: .35; pointer-events: none; }

.sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--nav) + 16px);
}

.sidebar-h {
    padding: 14px 18px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.sidebar-list { max-height: 70vh; overflow-y: auto; padding: 6px; }

.sb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: .84rem;
    color: var(--ink-2);
    transition: background .15s;
}

.sb-item:hover { background: var(--surface-2); }
.sb-item.on {
    background: var(--bull-soft);
    color: var(--bull);
    font-weight: 600;
    border-left: 3px solid var(--bull);
}

.sb-n {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--surface-2);
    font-size: .7rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.sb-item.on .sb-n { background: var(--bull); color: #fff; }

.empty {
    text-align: center;
    padding: 60px 24px;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

.logo { flex-shrink: 0; }

.site-footer {
    text-align: center;
    padding: 32px 20px 48px;
    font-size: .8rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    margin-top: 20px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .mod-card.featured { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .login-hero {
        padding: 28px 24px 32px;
        align-items: flex-start;
    }

    .login-hero-bg .chart-deco {
        bottom: 0;
        opacity: .5;
    }

    .login-hero-content { max-width: none; }

    .login-stat { margin-top: 20px; padding-top: 16px; }

    .login-form-side {
        padding: 0 24px 28px;
        justify-content: center;
    }

    .login-card {
        max-width: 360px;
        border-color: var(--line);
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 768px) {
    .login-hero h1 { font-size: 1.65rem; }

    .login-features { display: none; }

    .login-stat div strong { font-size: 1.5rem; }
    .watch-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .modules { grid-template-columns: 1fr; }
    .user-badge span:not(.avatar) { display: none; }
    .lesson-go { display: none; }
    .hero { padding: 32px 28px; }
}

@media (max-width: 480px) {
    .hero { padding: 28px 24px; }
    .modules { grid-template-columns: 1fr; }
    .hero-layout { flex-direction: column; }
    .nav-link { display: none; }
}

/* ── v6 enhancements ── */
.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content { flex: 1; min-width: 0; }

.progress-ring {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    position: relative;
}

.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.progress-ring .ring-bg {
    fill: none;
    stroke: var(--line);
    stroke-width: 8;
}

.progress-ring .ring-fill {
    fill: none;
    stroke: url(#ringGrad);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s var(--ease);
}

.progress-ring .ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-ring .ring-pct {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bull);
    line-height: 1;
}

.progress-ring .ring-lbl {
    font-size: .65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 2px;
}

.continue-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #0c2340 0%, #0f4c3a 50%, #059669 100%);
    border-radius: var(--radius);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(5,150,105,.25);
    border: 1px solid rgba(52,211,153,.2);
    transition: transform .25s var(--ease), box-shadow .25s;
}

.continue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(5,150,105,.35);
    color: #fff;
}

.continue-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,.15);
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.continue-icon svg { width: 22px; height: 22px; }

.continue-text { flex: 1; }
.continue-text strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.continue-text span { font-size: .85rem; opacity: .85; }

.continue-arrow {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.nav-link {
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color .2s, background .2s;
}

.nav-link:hover { color: var(--bull); background: var(--bull-soft); }

.topbar-brand span { font-weight: 700; }

.chip-lock::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 1a5 5 0 00-5 5v3H6a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V11a2 2 0 00-2-2h-1V6a5 5 0 00-5-5zm-3 8V6a3 3 0 116 0v3H9z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.lesson-row .lesson-tag {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bull);
    background: var(--bull-soft);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.lesson-row:hover .lesson-tag { background: var(--bull); color: #fff; }

.watch-player-area {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.video-mode-tabs {
    display: flex;
    gap: 6px;
    padding: 0 4px 10px;
}

.video-mode-tab {
    flex: 1;
    appearance: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.video-mode-tab:hover {
    color: var(--text);
    border-color: rgba(52, 211, 153, .35);
}

.video-mode-tab.is-active {
    background: linear-gradient(135deg, var(--bull-soft), rgba(251, 191, 36, .12));
    border-color: rgba(52, 211, 153, .45);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(52, 211, 153, .12);
}

.player-mode[hidden] {
    display: none !important;
}

.player-shell--dual {
    position: relative;
}

.player-shell--dual::before {
    content: '';
    display: block;
    padding-top: 56.25%;
}

.player-shell--dual .player-mode {
    position: absolute;
    inset: 3px;
}

.player-shell--dual .player-mode .player {
    height: 100%;
    aspect-ratio: auto;
}

.supplement-mode-link {
    margin: 10px 4px 0;
    font-size: .82rem;
    text-align: center;
}

.supplement-mode-link a {
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
}

.supplement-mode-link a:hover {
    text-decoration: underline;
}

.lesson-supplement-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gold);
    background: rgba(251, 191, 36, .12);
    border: 1px solid rgba(251, 191, 36, .25);
    padding: 4px 9px;
    border-radius: 999px;
}

.player-shell {
    position: relative;
    border-radius: var(--radius);
    padding: 3px;
    background: linear-gradient(135deg, var(--bull), var(--gold-light), var(--brand-2));
    box-shadow: var(--shadow-lg);
}

.player-shell .player {
    border-radius: calc(var(--radius) - 2px);
    box-shadow: none;
}

.kbd-hint {
    margin-top: 12px;
    font-size: .75rem;
    color: var(--muted);
    text-align: center;
}

.kbd-hint kbd {
    display: inline-block;
    padding: 2px 7px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 5px;
    font-family: inherit;
    font-size: .7rem;
    font-weight: 600;
}

.watch-mobile-nav { display: none; }

.sb-item .sb-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ticker campus */
.campus-ticker {
    background: linear-gradient(90deg, #061018, #0c2340);
    border-bottom: 1px solid rgba(52,211,153,.15);
    overflow: hidden;
    padding: 8px 0;
}

.campus-ticker .ticker-track {
    color: rgba(255,255,255,.65);
    font-size: .72rem;
    animation-duration: 35s;
}

.campus-ticker .ticker-track span { color: var(--bull-light); }

.mod-theme {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    opacity: .75;
    margin-bottom: 4px;
}

.login-stat {
    display: flex;
    gap: clamp(20px, 4vw, 36px);
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.15);
}

.login-stat div strong {
    display: block;
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
}

.login-stat div span {
    font-size: .8rem;
    opacity: .7;
}

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

/* ══════════════════════════════════════════
   App móvil — experiencia tipo aplicación
   ══════════════════════════════════════════ */

.bottom-nav {
    display: none;
}

.bottom-nav svg {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    flex-shrink: 0;
    display: block;
    pointer-events: none;
}

.bottom-nav-item span {
    line-height: 1.1;
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
        visibility: hidden;
        pointer-events: none;
        height: 0;
        overflow: hidden;
    }
}

.desktop-only { display: block; }

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.app-shell .app-main,
.app-shell > .wrap {
    flex: 1;
    width: 100%;
    min-width: 0;
}

.btn,
.field input,
.back-btn,
.lesson-row,
.bottom-nav-item,
.watch-mobile-btn {
    touch-action: manipulation;
}

@media (max-width: 768px) {
    body {
        background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
    }

    .desktop-only { display: none !important; }

    /* —— Topbar compacta —— */
    .app-shell .topbar {
        position: sticky;
        top: 0;
        height: calc(52px + var(--safe-top));
        padding: var(--safe-top) max(14px, var(--safe-left)) 0 max(14px, var(--safe-right));
    }

    .topbar-brand span {
        font-size: .88rem;
        max-width: 42vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .back-btn {
        font-size: .82rem;
        max-width: 55vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-right { gap: 8px; }

    .theme-toggle {
        width: 34px;
        height: 34px;
        border-radius: 50%;
    }

    .nav-link,
    .topbar-logout,
    .user-name { display: none !important; }

    .user-badge {
        padding: 2px;
        background: transparent;
    }

    .avatar {
        width: 34px;
        height: 34px;
        font-size: .75rem;
    }

    .campus-ticker { display: none; }

    .site-footer { display: none; }

    /* —— Contenido con espacio para barra inferior —— */
    .app-shell > .wrap {
        max-width: none;
        padding: 14px max(14px, var(--safe-left)) calc(var(--bottom-nav-h) + var(--safe-bottom) + 20px) max(14px, var(--safe-right));
    }

    .field input,
    .login-page .field input {
        font-size: 16px;
        min-height: 44px;
    }

    .btn {
        min-height: 44px;
    }

    /* —— Hero campus —— */
    .hero {
        padding: 18px 16px;
        margin-bottom: 16px;
        border-radius: var(--radius);
    }

    .hero-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .hero h1 {
        font-size: 1.45rem;
        margin-bottom: 8px;
    }

    .hero-content > p,
    .hero > p {
        font-size: .88rem;
    }

    .welcome { font-size: .82rem; margin-bottom: 6px; }

    .progress-ring {
        width: 88px;
        height: 88px;
        align-self: center;
    }

    .progress-ring .ring-pct { font-size: 1.2rem; }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 16px;
        padding-top: 16px;
    }

    .stat-box {
        padding: 10px 8px;
        text-align: center;
    }

    .stat-num { font-size: 1.35rem; }

    .stat-lbl {
        font-size: .62rem;
        letter-spacing: .03em;
    }

    .continue-card {
        gap: 14px;
        padding: 14px 16px;
        margin-bottom: 20px;
    }

    .continue-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .continue-text strong { font-size: .88rem; }
    .continue-text span { font-size: .78rem; }

    .continue-arrow {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .section-h { margin-bottom: 12px; }

    /* —— Módulos —— */
    .modules { gap: 14px; }

    .mod-card.featured {
        grid-template-columns: 1fr;
    }

    .mod-card.featured .mod-top { min-height: 100px; }

    .mod-card.featured .mod-body {
        padding: 18px 16px 20px;
    }

    .mod-card.featured .mod-body h2 { font-size: 1.25rem; }

    .mod-top { height: 88px; padding: 16px; }

    .mod-num { font-size: 2.75rem; top: 8px; right: 14px; }

    .mod-body { padding: 16px; }

    .mod-body h2 { font-size: 1.15rem; }

    .mod-body p { font-size: .84rem; margin-bottom: 14px; }

    /* —— Página módulo —— */
    .mod-header {
        padding: 18px 16px;
        margin-bottom: 16px;
        border-radius: var(--radius);
    }

    .mod-header h1 {
        font-size: 1.45rem;
        margin: 8px 0 6px;
    }

    .mod-header p { font-size: .88rem; }

    .breadcrumb { font-size: .78rem; margin-bottom: 12px; }

    .lesson-row {
        padding: 14px 14px;
        gap: 12px;
        border-radius: 12px;
    }

    .lesson-idx {
        width: 38px;
        height: 38px;
        font-size: .82rem;
        border-radius: 10px;
    }

    .lesson-txt h3 { font-size: .9rem; }

    .lesson-txt p { font-size: .75rem; }

    /* —— Reproductor —— */
    .page-watch > .wrap {
        padding-left: 0;
        padding-right: 0;
        padding-top: 0;
    }

    .page-watch .video-mode-tabs {
        padding: 10px max(14px, var(--safe-left)) 8px max(14px, var(--safe-right));
        gap: 8px;
    }

    .page-watch .video-mode-tab {
        font-size: .78rem;
        padding: 9px 10px;
    }

    .page-watch .player-shell {
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }

    .page-watch .player-shell .player {
        border-radius: 0;
    }

    .page-watch .watch-info {
        margin-top: 0;
        padding: 16px max(14px, var(--safe-left)) 12px max(14px, var(--safe-right));
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .page-watch .watch-info h1 {
        font-size: 1.2rem;
        margin: 6px 0 0;
    }

    .page-watch .watch-nav { display: none; }

    .page-watch .sidebar {
        display: none;
        margin: 0 max(14px, var(--safe-left)) 12px max(14px, var(--safe-right));
        border-radius: var(--radius);
        position: static;
    }

    .page-watch.playlist-open .sidebar {
        display: block;
    }

    .page-watch .sidebar-list {
        max-height: 50vh;
    }

    .watch-mobile-nav {
        display: flex;
        gap: 8px;
        padding: 0 max(14px, var(--safe-left)) 8px max(14px, var(--safe-right));
    }

    .watch-mobile-btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 10px 8px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        font: inherit;
        font-size: .78rem;
        font-weight: 600;
        color: var(--ink-2);
        text-decoration: none;
        cursor: pointer;
    }

    .watch-mobile-btn--next {
        background: var(--bull-soft);
        border-color: rgba(5,150,105,.2);
        color: var(--bull);
    }

    .watch-mobile-btn.disabled {
        opacity: .35;
        pointer-events: none;
    }

    .watch-playlist-toggle {
        flex: 0.85;
        background: var(--brand-soft);
        border-color: rgba(12,35,64,.1);
        color: var(--brand);
    }

    /* —— Barra inferior fija —— */
    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        height: auto;
        max-height: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
        background: rgba(255,255,255,.94);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid var(--line);
        padding: 4px max(6px, var(--safe-right)) calc(6px + var(--safe-bottom)) max(6px, var(--safe-left));
        box-shadow: 0 -8px 30px rgba(10,22,40,.08);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 48px;
        max-height: 56px;
        padding: 6px 4px;
        border-radius: 10px;
        text-decoration: none;
        font-size: .62rem;
        font-weight: 700;
        letter-spacing: .02em;
        color: var(--muted);
        transition: color .15s, background .15s;
        overflow: hidden;
    }

    .bottom-nav-item svg {
        width: 22px !important;
        height: 22px !important;
        max-width: 22px;
        max-height: 22px;
    }

    .bottom-nav-item.on {
        color: var(--bull);
        background: var(--bull-soft);
    }

    .bottom-nav-item:active {
        transform: scale(.97);
    }

    /* —— Login móvil —— */
    .login-page {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-hero {
        padding: max(16px, var(--safe-top)) max(16px, var(--safe-left)) 20px max(16px, var(--safe-right));
    }

    .login-hero h1 { font-size: 1.55rem; }

    .login-hero p { font-size: .92rem; }

    .login-hero .brand-row { margin-bottom: 20px; }

    .login-features { display: none; }

    .login-stat {
        margin-top: 16px;
        padding-top: 16px;
        gap: 20px;
    }

    .login-stat div strong { font-size: 1.5rem; }

    .login-form-side {
        padding: 0 max(16px, var(--safe-left)) max(12px, var(--safe-bottom)) max(16px, var(--safe-right));
    }

    .login-card {
        max-width: none;
        width: 100%;
    }

    .login-ticker {
        padding-bottom: max(10px, var(--safe-bottom));
    }
}

@media (max-width: 380px) {
    .bottom-nav-item span { font-size: .58rem; }

    .stats { grid-template-columns: 1fr 1fr 1fr; }

    .stat-lbl { font-size: .58rem; }
}

/* ── Quiz ── */
.lesson-done-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 14px;
    background: var(--bull-soft);
    color: var(--bull);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
}

.lesson-quiz-hint {
    margin-top: 12px;
    font-size: .85rem;
    color: var(--muted);
}

.open-quiz-btn { margin-top: 10px; }

.quiz-panel {
    margin-top: 24px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.quiz-panel--visible {
    display: block;
}

.quiz-panel[hidden] { display: none !important; }

.quiz-panel--open {
    border-color: var(--bull);
    box-shadow: 0 0 0 1px rgba(5,150,105,.15), var(--shadow-lg);
}

.quiz-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.quiz-title {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.quiz-subtitle {
    font-size: .88rem;
    color: var(--muted);
}

.quiz-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    flex-shrink: 0;
}

.quiz-q {
    border: none;
    margin: 0 0 20px;
    padding: 0;
}

.quiz-q legend {
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.45;
}

.quiz-q-num {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: var(--bull-soft);
    color: var(--bull);
    border-radius: 6px;
    font-size: .75rem;
    margin-right: 6px;
}

.quiz-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.quiz-opt:hover { border-color: var(--bull); background: var(--bull-soft); }

.quiz-opt input { margin-top: 3px; flex-shrink: 0; }

.quiz-opt span { font-size: .88rem; line-height: 1.4; }

.quiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.quiz-score.ok { color: var(--bull); }
.quiz-score.fail { color: var(--bear); }

.quiz-score-box {
    text-align: center;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.quiz-score-box.ok {
    background: var(--bull-soft);
    border: 1px solid rgba(5,150,105,.2);
}

.quiz-score-box.fail {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

html[data-theme="dark"] .quiz-score-box.fail {
    background: rgba(220,38,38,.12);
    border-color: rgba(248,113,113,.3);
}

.quiz-score-big {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.quiz-score-box.ok .quiz-score-big { color: var(--bull); }
.quiz-score-box.fail .quiz-score-big { color: var(--bear); }

.quiz-score-detail {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.quiz-score-msg {
    font-size: .95rem;
    font-weight: 600;
}

.quiz-result:not([hidden]) {
    display: block;
    margin-top: 8px;
}

.quiz-feedback {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.quiz-feedback li {
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
}

.quiz-feedback li.ok {
    background: var(--bull-soft);
    color: var(--bull);
}

.quiz-feedback li.fail {
    background: #fef2f2;
    color: var(--bear);
}

html[data-theme="dark"] .quiz-feedback li.fail {
    background: rgba(220,38,38,.12);
    color: #fca5a5;
}

.quiz-hint { font-size: .85rem; color: var(--muted); margin-top: 8px; }

.quiz-pass-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bull-soft);
    color: var(--bull);
    font-size: 2rem;
    display: grid;
    place-items: center;
    margin: 8px auto 16px;
}

.lesson-row.lesson-done { border-color: rgba(5,150,105,.25); }

.lesson-row.lesson-done .lesson-idx {
    background: var(--bull);
    color: #fff;
}

.lesson-row.lesson-locked {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.sb-item.done .sb-n { background: var(--bull); color: #fff; }

.sb-item.locked {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Panel de administración ── */
.page-admin .admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.admin-sidebar {
    position: sticky;
    top: calc(var(--nav) + 16px);
    align-self: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.admin-sidebar-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 12px;
    padding: 0 8px;
}

.admin-nav { display: flex; flex-direction: column; gap: 4px; }

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: background .2s, color .2s;
}

.admin-nav-item:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav-item.on { background: var(--brand-soft); color: var(--brand); }

.admin-nav-icon {
    width: 22px;
    text-align: center;
    opacity: .7;
}

.admin-main { min-width: 0; padding: 0 !important; }

.admin-head { margin-bottom: 24px; }
.admin-head h1 {
    font-family: var(--display);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 6px;
}
.admin-head p { color: var(--muted); }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.admin-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bull);
    line-height: 1.1;
}

.admin-stat-lbl {
    font-size: .82rem;
    color: var(--muted);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-grid--2 { grid-template-columns: 340px 1fr; }

.admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.admin-card--wide { grid-column: span 1; }
.admin-card--narrow { max-width: 560px; }

/* -------------------------------------------------
   Campus redesign v7 - modern organized experience
   ------------------------------------------------- */

:root {
    --font: 'Manrope', 'DM Sans', system-ui, sans-serif;
    --display: 'Fraunces', 'Instrument Serif', Georgia, serif;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 1px 2px rgba(9, 20, 37, .06), 0 12px 30px rgba(9, 20, 37, .08);
    --shadow-lg: 0 18px 50px rgba(9, 20, 37, .14);
    --bg: #f2f6fb;
    --surface: #ffffff;
    --surface-2: #eaf0f8;
    --ink: #0f1f33;
    --ink-2: #2c3f57;
    --muted: #5a6c83;
    --line: #d7e2ee;
    --brand: #123a6b;
    --brand-2: #2d6fb8;
    --brand-soft: #e7f0fb;
    --bull: #0f8b6b;
    --bull-light: #35b88f;
    --bull-soft: #e8f8f2;
    --gold: #b17814;
    --gold-light: #d39d3d;
}

body {
    background-image:
        radial-gradient(1200px 420px at 88% -8%, rgba(45, 111, 184, .18), transparent 58%),
        radial-gradient(900px 360px at -10% 100%, rgba(15, 139, 107, .12), transparent 60%),
        linear-gradient(180deg, #f5f9ff 0%, #edf3fb 100%);
    background-attachment: fixed;
}

.topbar {
    background: rgba(255, 255, 255, .9);
    border-bottom-color: rgba(215, 226, 238, .85);
}

.topbar-brand span {
    letter-spacing: .01em;
}

.nav-link {
    font-weight: 700;
    color: var(--ink-2);
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--brand);
    border-color: #dbe8f6;
    background: #f3f8ff;
}

.hero {
    background:
        linear-gradient(130deg, rgba(18, 58, 107, .96) 0%, rgba(19, 82, 136, .94) 60%, rgba(17, 122, 98, .92) 100%);
    border: 1px solid rgba(151, 185, 221, .45);
    color: #f8fcff;
    box-shadow: 0 16px 45px rgba(17, 57, 99, .28);
}

.hero .welcome,
.hero .hero-content > p,
.hero .hero > p,
.hero .stat-lbl,
.hero .ring-lbl { color: rgba(236, 247, 255, .82); }

.hero .welcome strong,
.hero h1,
.hero .ring-pct { color: #fff; }

.hero .hero-tag {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border-color: rgba(255, 255, 255, .25);
}

.new-campus-badge {
    display: inline-block;
    margin: 6px 0 10px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #103f73;
    background: linear-gradient(135deg, #d7ecff 0%, #f3fbff 100%);
    border: 1px solid rgba(255, 255, 255, .45);
}

.hero .stats {
    border-top-color: rgba(255, 255, 255, .2);
}

.hero .stat-box {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .24);
}

.hero .stat-num {
    background: linear-gradient(135deg, #e8fff5 0%, #fff8df 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.continue-card {
    background: linear-gradient(130deg, #102f58 0%, #145f74 55%, #0d8d70 100%);
    border-radius: 20px;
}

.campus-quick {
    margin-bottom: 28px;
}

.campus-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.campus-quick-card {
    display: block;
    text-decoration: none;
    padding: 18px 18px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.campus-quick-card:hover {
    transform: translateY(-3px);
    border-color: #b8d2ef;
    box-shadow: var(--shadow-lg);
}

.campus-quick-card .quick-kicker {
    display: inline-block;
    padding: 4px 8px;
    font-size: .68rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #0f5f8a;
    background: #e9f4ff;
    border-radius: 999px;
    margin-bottom: 8px;
    font-weight: 800;
}

.campus-quick-card strong {
    display: block;
    font-size: .99rem;
    color: var(--ink);
    margin-bottom: 6px;
}

.campus-quick-card span:last-child {
    display: block;
    color: var(--muted);
    font-size: .83rem;
    line-height: 1.45;
}

.section-h {
    color: #4a5f79;
}

.mod-card {
    border-color: #d6e3f1;
    border-radius: 18px;
}

.mod-card:hover:not(.locked) {
    transform: translateY(-6px);
}

.mod-top {
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.mod-top.m2,
.mod-top.m3,
.mod-top.m4,
.mod-top.m5,
.mod-top.m6,
.mod-top.m8,
.mod-top.m9 {
    background: linear-gradient(135deg, #123764 0%, #1b5d8c 58%, #1f846f 100%);
}

.mod-body h2 {
    font-size: 1.42rem;
}

.mod-outcome {
    background: #f4f9ff;
    border: 1px solid #d9e6f5;
    border-radius: 12px;
    padding: 10px 12px;
}

.mod-topics-label {
    margin-top: 2px;
    margin-bottom: 6px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #60748e;
    font-weight: 800;
}

.mod-highlights {
    margin: 0 0 12px;
    padding-left: 16px;
    color: var(--ink-2);
    font-size: .84rem;
}

.mod-highlights li { margin-bottom: 2px; }

.mod-header {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(242, 248, 255, .97));
    border-color: #d3e2f1;
    box-shadow: var(--shadow-lg);
}

.module-roadmap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.roadmap-step {
    border: 1px solid #d8e5f3;
    background: #f7fbff;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 10px;
}

.roadmap-index {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .78rem;
    background: #e2edf9;
    color: #1f5f96;
    flex-shrink: 0;
}

.roadmap-step strong {
    display: block;
    font-size: .86rem;
    margin-bottom: 2px;
    color: var(--ink);
}

.roadmap-step p {
    margin: 0;
    font-size: .76rem;
    color: var(--muted);
    line-height: 1.35;
}

.roadmap-step.is-done {
    border-color: rgba(15, 139, 107, .32);
    background: #ebfbf4;
}

.roadmap-step.is-done .roadmap-index {
    background: #0f8b6b;
    color: #fff;
}

.roadmap-step.is-active {
    border-color: rgba(177, 120, 20, .38);
    background: #fff9ec;
}

.lessons-grid {
    gap: 10px;
}

.lesson-row {
    border-radius: 14px;
}

.lesson-row:hover {
    transform: translateY(-2px);
}

.watch-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
}

.watch-info {
    border-radius: 16px;
}

.watch-info h1 {
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.watch-nav a {
    border: 1px solid #dce8f6;
    background: #f4f8fd;
}

.sidebar {
    border-radius: 16px;
}

.sidebar-h {
    background: #f6faff;
}

.sb-item.on {
    background: #e9f7f2;
}

.bottom-nav {
    border-top-color: #cfe0f1;
}

.bottom-nav-item.on {
    background: #e8f6f1;
}

@media (max-width: 1100px) {
    .campus-quick-grid {
        grid-template-columns: 1fr;
    }

    .module-roadmap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        border-radius: 16px;
    }

    .campus-quick-card {
        padding: 14px;
    }

    .watch-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------
   Campus redesign v8 - structural layout overhaul
   ------------------------------------------------- */

.campus-shell {
    max-width: 1320px;
}

.campus-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.campus-sidebar {
    position: sticky;
    top: calc(var(--nav) + 14px);
    background: #0f2a4a;
    color: #e8f3ff;
    border-radius: 20px;
    padding: 18px;
    border: 1px solid rgba(136, 176, 222, .35);
    box-shadow: 0 18px 40px rgba(6, 19, 35, .3);
}

.campus-profile-card h2 {
    font-family: var(--display);
    font-size: 1.55rem;
    margin: 4px 0 6px;
}

.campus-profile-card p {
    margin: 0;
    font-size: .86rem;
    line-height: 1.45;
    color: rgba(232, 243, 255, .82);
}

.campus-kicker {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9fd0ff;
}

.campus-progress-card {
    width: 132px;
    height: 132px;
    margin: 18px auto;
    position: relative;
}

.campus-progress-card svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.campus-progress-card .ring-bg {
    fill: none;
    stroke: rgba(232, 243, 255, .2);
    stroke-width: 8;
}

.campus-progress-card .ring-fill {
    fill: none;
    stroke: url(#ringGrad);
    stroke-width: 8;
    stroke-linecap: round;
}

.campus-progress-card .ring-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
}

.campus-progress-card .ring-pct {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.campus-progress-card .ring-lbl {
    display: block;
    font-size: .66rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(232, 243, 255, .78);
    margin-top: 2px;
}

.campus-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.campus-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
}

.campus-metric strong {
    font-size: 1.05rem;
    color: #fff;
}

.campus-metric span {
    font-size: .76rem;
    color: rgba(232, 243, 255, .86);
}

.campus-links {
    display: grid;
    gap: 6px;
}

.campus-links a {
    text-decoration: none;
    color: #d8ebff;
    font-size: .82rem;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .04);
}

.campus-links a:hover {
    background: rgba(255, 255, 255, .12);
}

.campus-content {
    display: grid;
    gap: 14px;
}

.campus-header {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px 22px;
}

.campus-header h1 {
    font-family: var(--display);
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    margin: 4px 0 8px;
}

.campus-header p {
    margin: 0;
    color: var(--muted);
}

.campus-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.campus-action-card {
    display: block;
    text-decoration: none;
    border: 1px solid #d3e1ef;
    border-radius: 14px;
    background: #f8fbff;
    padding: 14px;
    color: var(--ink);
}

.campus-action-card strong {
    display: block;
    font-size: 1rem;
    margin: 4px 0;
}

.campus-action-card p {
    margin: 0;
    font-size: .82rem;
    color: var(--muted);
}

.campus-action-step {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    color: #1d5f95;
}

.campus-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    border: 1px solid #cfe3d0;
    background: #ecfaf0;
    border-radius: 12px;
    padding: 12px 14px;
    color: #0a5f47;
}

.campus-banner strong {
    font-size: .92rem;
}

.campus-banner span {
    font-size: .82rem;
}

.campus-route,
.campus-method {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}

.campus-route-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.campus-route-head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.35rem;
}

.campus-route-head span {
    font-size: .8rem;
    color: var(--muted);
}

.campus-module-row {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) 140px;
    gap: 12px;
    align-items: center;
    border: 1px solid #d7e4f2;
    border-radius: 14px;
    background: #fcfdff;
    padding: 12px;
    margin-bottom: 10px;
}

.campus-module-row.locked {
    opacity: .55;
}

.campus-module-index {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #e8f0fa;
    color: #1f5f96;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.campus-module-label {
    margin: 0 0 2px;
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #5f7390;
    font-weight: 800;
}

.campus-module-main h3 {
    margin: 0 0 4px;
    font-size: 1.03rem;
}

.campus-module-desc {
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.38;
}

.campus-module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.campus-module-tags span {
    font-size: .7rem;
    border-radius: 999px;
    padding: 4px 8px;
    background: #edf5ff;
    color: #205f95;
    border: 1px solid #d8e8f9;
}

.campus-module-side {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.campus-method {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.campus-method-block h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.campus-method-block ol,
.campus-method-block ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.campus-method-block li {
    border: 1px solid #d9e5f2;
    background: #f9fbff;
    border-radius: 10px;
    padding: 10px;
    font-size: .83rem;
    color: var(--ink-2);
}

.campus-method-block ol li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.campus-method-block ol li span {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #e6f3ef;
    color: #0f7d60;
    font-size: .72rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.campus-method-block li p {
    margin: 4px 0 0;
    color: var(--muted);
}

.module-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: start;
}

.module-agenda {
    display: grid;
    gap: 10px;
}

.module-lesson-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 96px;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border: 1px solid #d8e5f3;
    border-radius: 14px;
    background: #fbfdff;
    padding: 12px;
    color: inherit;
}

.module-lesson-card.is-done {
    border-color: #bee4d8;
    background: #f0fbf6;
}

.module-lesson-card.is-locked {
    opacity: .6;
}

.module-lesson-index {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e8f0fa;
    color: #225f95;
    font-weight: 800;
    font-size: .75rem;
    display: grid;
    place-items: center;
}

.module-lesson-card.is-done .module-lesson-index {
    background: #0f8b6b;
    color: #fff;
}

.module-lesson-main h3 {
    margin: 0 0 3px;
    font-size: .98rem;
}

.module-lesson-main p {
    margin: 0;
    font-size: .8rem;
    color: var(--muted);
}

.module-lesson-cta {
    justify-self: end;
    font-size: .75rem;
    font-weight: 800;
    color: #145f8e;
    text-transform: uppercase;
}

.module-sidepanel {
    position: sticky;
    top: calc(var(--nav) + 16px);
    display: grid;
    gap: 10px;
}

.resources-panel {
    margin: 24px 0 32px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(12,35,64,.04), rgba(12,35,64,.02));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.resources-panel--dedicated {
    background:
        radial-gradient(circle at 100% 0%, rgba(26,77,124,.14), transparent 40%),
        linear-gradient(180deg, rgba(12,35,64,.05), rgba(12,35,64,.02));
}

.resources-panel-head {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.resources-panel h2 {
    font-family: var(--display);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 400;
    margin-top: 2px;
}

.resources-empty {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,.75);
    border: 1px dashed var(--line);
    color: var(--muted);
}

.resources-empty p + p {
    margin-top: 4px;
}

.resources-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    max-height: min(72vh, 920px);
}

.resources-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.resources-table th,
.resources-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.resources-table th {
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: .85rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1;
}

.resources-table tbody tr:last-child td {
    border-bottom: none;
}

.resources-table tbody tr:nth-child(even) td {
    background: rgba(12,35,64,.02);
}

.resources-table tbody tr:hover td {
    background: rgba(26,77,124,.08);
}

.resources-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 14px;
}

.resources-search {
    flex: 1 1 320px;
}

.resources-search label {
    display: block;
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 700;
}

.resources-search input {
    width: 100%;
    max-width: 540px;
    height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.resources-search input:focus {
    outline: none;
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(26,77,124,.16);
}

.resources-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.resources-link-card {
    margin: 18px 0 0;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.resources-link-card h2 {
    margin: 4px 0 8px;
    font-family: var(--display);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 400;
}

.resources-link-card p {
    margin-bottom: 12px;
    color: var(--muted);
}

.module-side-box {
    border: 1px solid #d6e4f2;
    border-radius: 14px;
    background: #f8fbff;
    padding: 12px;
}

.module-side-kicker {
    margin: 0 0 4px;
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #5d7490;
    font-weight: 800;
}

.module-side-box strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f1f33;
    line-height: 1.1;
}

.module-side-box span {
    font-size: .79rem;
    color: var(--muted);
}

.module-side-exam h4 {
    margin: 0 0 4px;
    font-size: .92rem;
}

.module-side-exam p {
    margin: 0 0 10px;
    font-size: .8rem;
    color: var(--muted);
}

@media (max-width: 1100px) {
    .campus-layout,
    .module-workspace {
        grid-template-columns: 1fr;
    }

    .campus-sidebar,
    .module-sidepanel {
        position: static;
    }

    .campus-actions,
    .campus-method {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .campus-shell {
        padding-top: 10px;
    }

    .campus-sidebar,
    .campus-header,
    .campus-route,
    .campus-method,
    .module-roadmap {
        border-radius: 14px;
    }

    .campus-module-row,
    .module-lesson-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .campus-module-side,
    .module-lesson-cta {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

.admin-card h2 {
    font-size: 1.05rem;
    margin-bottom: 16px;
    color: var(--ink-2);
}

.admin-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.admin-dl div:last-child { border-bottom: none; }
.admin-dl dt { color: var(--muted); font-size: .88rem; }
.admin-dl dd { font-weight: 600; text-align: right; }

.admin-form .field { margin-bottom: 16px; }

.admin-select,
.admin-textarea,
.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-inline-form input,
.admin-inline-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

.admin-textarea { resize: vertical; min-height: 90px; }

.field-hint {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 6px;
}

.admin-table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.admin-table th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

.chip-gold {
    background: var(--gold-soft);
    color: var(--gold);
}

.admin-details summary { cursor: pointer; list-style: none; }
.admin-details summary::-webkit-details-marker { display: none; }

.admin-card-subsection {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg);
}

.admin-card-subsection h3 {
    margin-bottom: 8px;
}

.admin-card-subsection .admin-form {
    margin-top: 14px;
}

.admin-inline-form {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    min-width: 220px;
}

.admin-delete-form { margin-top: 8px; }

.admin-btn-danger {
    border-color: var(--bear) !important;
    color: var(--bear) !important;
}

.admin-btn-danger:hover {
    background: rgba(220, 38, 38, .08) !important;
}

.admin-modules {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-module-meta { font-size: .82rem; color: var(--muted); }

.admin-warn {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--gold-soft);
    border: 1px solid rgba(184, 134, 11, .3);
    border-radius: 10px;
    font-size: .88rem;
    color: var(--ink-2);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
}

.admin-module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-delete-module-form {
    margin-top: 10px;
}

.admin-module-block {
    scroll-margin-top: 80px;
}

.admin-lessons-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.admin-lessons-section h3 {
    font-size: 1rem;
    margin-bottom: 14px;
}

.admin-lessons-table .admin-lesson-details summary {
    font-weight: 600;
    color: var(--ink);
}

.admin-lesson-actions {
    white-space: nowrap;
}

.chip-video-local {
    background: var(--bull-soft);
    color: var(--bull);
}

.chip-video-remote {
    background: var(--gold-soft);
    color: var(--gold);
}

.chip-video-none {
    background: var(--surface-2);
    color: var(--muted);
}

.admin-video-path {
    display: block;
    font-size: .72rem;
    color: var(--muted);
    margin-top: 4px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-dl-status {
    display: block;
    font-size: .72rem;
    margin-top: 4px;
    font-weight: 600;
}

.admin-dl-status.is-running { color: var(--brand); }
.admin-dl-status.is-done { color: var(--bull); }
.admin-dl-status.is-error { color: var(--bear); }

.admin-empty-lessons {
    font-size: .88rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.admin-add-lesson {
    margin-top: 16px;
}

.admin-add-lesson summary {
    display: inline-block;
    cursor: pointer;
    list-style: none;
}

.field-hint {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 6px;
}

.admin-progress-cell { min-width: 140px; }

.alert-ok {
    background: var(--bull-soft);
    border-color: rgba(5, 150, 105, .3);
    color: var(--bull);
}

.alert-error {
    background: rgba(220, 38, 38, .08);
    border-color: rgba(220, 38, 38, .25);
    color: var(--bear);
}

.nav-link-admin { color: var(--gold) !important; font-weight: 600; }

@media (max-width: 900px) {
    .page-admin .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: static;
    }
    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-grid,
    .admin-grid--2 { grid-template-columns: 1fr; }
    .admin-form-grid { grid-template-columns: 1fr; }
}

/* ── Transcripciones ── */
.transcript-stats {
    margin-top: 16px;
    font-size: .9rem;
    color: var(--muted);
}

.transcript-module {
    margin-top: 32px;
}

.transcript-module-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.transcript-module-head h2 {
    margin: 8px 0 0;
    font-size: 1.25rem;
}

.transcript-view-head {
    margin-bottom: 24px;
}

.transcript-view-head h1 {
    font-family: var(--font-serif, 'Instrument Serif', serif);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 12px 0 8px;
    line-height: 1.2;
}

.transcript-meta {
    color: var(--muted);
    margin: 0 0 16px;
}

.transcript-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.transcript-body {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 16px);
    padding: clamp(20px, 4vw, 32px);
    line-height: 1.75;
    font-size: 1rem;
    color: var(--text);
    max-width: 820px;
}

.transcript-body p,
.transcript-body {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 640px) {
    .transcript-module-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .transcript-actions .btn {
        flex: 1 1 auto;
    }
}

/* ── Metodología (campus) ── */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.method-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 16px);
    padding: 20px;
}

.method-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--bull);
}

.method-card p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
}

.method-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.method-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 16px);
    padding: 22px 24px;
}

.method-panel h3 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.phases-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.phases-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: .92rem;
    line-height: 1.5;
}

.phases-list li:last-child { border-bottom: 0; }

.phase-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bull);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.examples-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.examples-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.examples-list li:last-child { border-bottom: 0; }

.examples-list strong {
    display: block;
    margin-bottom: 4px;
    font-size: .95rem;
}

.examples-list span {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
}

.mod-topics-label {
    margin: 14px 0 8px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

.mod-outcome {
    margin-top: 12px;
    color: var(--bull);
    font-weight: 500;
    max-width: 680px;
}

.mod-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.mod-highlights li {
    font-size: .78rem;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(5, 150, 105, .1);
    color: var(--bull);
    border: 1px solid rgba(5, 150, 105, .2);
}

.lesson-summary {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.65;
    max-width: 720px;
}

.lesson-transcript-link {
    margin: 14px 0 0;
}

@media (max-width: 960px) {
    .methodology-grid { grid-template-columns: repeat(2, 1fr); }
    .method-panels { grid-template-columns: 1fr; }
}

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

/* ── Exámenes y diploma ── */
.exam-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 32px;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 16px);
    flex-wrap: wrap;
}

.exam-card--ready {
    border-color: rgba(5, 150, 105, .35);
    box-shadow: 0 0 0 1px rgba(5, 150, 105, .1);
}

.exam-card--done {
    border-color: rgba(5, 150, 105, .25);
}

.exam-card h2 {
    margin: 10px 0 8px;
    font-size: 1.2rem;
}

.exam-card-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .9rem;
}

.diploma-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.diploma-card {
    max-width: 820px;
    margin: 0 auto;
}

.diploma-border {
    padding: 12px;
    border: 3px double var(--bull);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(5,150,105,.06), rgba(212,168,71,.08));
}

.diploma-inner {
    padding: clamp(28px, 5vw, 48px);
    text-align: center;
    background: var(--card);
    border-radius: 14px;
    border: 1px solid var(--border);
}

.diploma-eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .75rem;
    color: var(--bull);
    margin: 0 0 12px;
}

.diploma-card h1 {
    font-family: var(--font-serif, 'Instrument Serif', serif);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin: 0 0 20px;
}

.diploma-lead {
    color: var(--muted);
    margin: 0 0 8px;
}

.diploma-name {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--bull);
    margin: 0 0 20px;
}

.diploma-body {
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.7;
    color: var(--text);
}

.diploma-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.diploma-meta-label {
    display: block;
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}

.diploma-note {
    font-size: .82rem;
    color: var(--muted);
    margin: 0;
}

@media print {
    .topbar, .bottom-nav, .diploma-actions, .site-footer--print-hide { display: none !important; }
    .diploma-card { max-width: none; }
    body { background: #fff; }
}

@media (max-width: 640px) {
    .diploma-meta { grid-template-columns: 1fr; }
}

/* Modo cine: ver assets/css/cinema.css */

/* ── Catálogo flipbook ── */
.page-catalog .app-main {
    max-width: 1180px;
}

.catalog-header {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 14px;
}

.catalog-header h1 {
    font-family: var(--display);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    margin: 8px 0;
}

.catalog-header p {
    margin: 0;
    color: var(--muted);
}

.catalog-empty {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
}

.catalog-stage {
    background: linear-gradient(180deg, #1a2433 0%, #0f1724 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--shadow-lg);
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 4px 2px 10px;
}

.catalog-toolbar-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.catalog-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #eef6ff;
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.catalog-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(52, 211, 153, .35);
}

.catalog-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.catalog-btn--ghost {
    background: transparent;
}

.catalog-page-label {
    font-size: .82rem;
    font-weight: 700;
    color: rgba(232, 243, 255, .9);
    letter-spacing: .02em;
}

.catalog-viewport {
    position: relative;
    min-height: min(72vh, 760px);
    display: grid;
    place-items: center;
    padding: 10px 0 18px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 0%, rgba(52, 211, 153, .08), transparent 55%),
        linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .32));
}

.catalog-viewport:fullscreen {
    padding: 24px;
    background: #0b111a;
}

.catalog-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    gap: 12px;
    place-items: center;
    color: rgba(232, 243, 255, .86);
    font-size: .9rem;
    background: rgba(11, 17, 26, .72);
}

.catalog-loading[hidden] {
    display: none !important;
}

.catalog-loading-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .18);
    border-top-color: var(--bull-light);
    animation: catalogSpin .8s linear infinite;
}

@keyframes catalogSpin {
    to { transform: rotate(360deg); }
}

.catalog-flipbook {
    width: 100%;
    max-width: 980px;
}

.catalog-flipbook .page {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.catalog-flipbook .page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 768px) {
    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-toolbar-group {
        justify-content: center;
    }

    .catalog-page-label {
        text-align: center;
    }

    .catalog-viewport {
        min-height: 58vh;
    }
}

/* ── Analizador academia ── */
.analyzer-header {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 14px;
}

.analyzer-header h1 {
    font-family: var(--display);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    margin: 8px 0;
}

.analyzer-header p {
    margin: 0;
    color: var(--muted);
}

.analyzer-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 20px 22px;
}

.analyzer-form label {
    display: block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.analyzer-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.analyzer-form-row input {
    flex: 1;
    min-width: 140px;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-2, #f4f7fb);
    color: var(--ink);
}

.analyzer-loading {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 36px 12px;
    color: var(--muted);
}

.analyzer-loading[hidden],
.analyzer-result[hidden] {
    display: none !important;
}

.analyzer-verdict {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.analyzer-verdict.is-go {
    background: rgba(5, 150, 105, .1);
    border-color: rgba(5, 150, 105, .35);
}

.analyzer-verdict.is-wait {
    background: rgba(212, 168, 71, .12);
    border-color: rgba(212, 168, 71, .35);
}

.analyzer-verdict.is-no {
    background: rgba(220, 70, 70, .08);
    border-color: rgba(220, 70, 70, .28);
}

.analyzer-kicker {
    margin: 0;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.analyzer-verdict h2 {
    margin: 4px 0 6px;
    font-size: 1.5rem;
}

.analyzer-verdict p {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
}

.analyzer-score {
    text-align: center;
    min-width: 88px;
}

.analyzer-score strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.analyzer-score span {
    color: var(--muted);
    font-size: .8rem;
}

.analyzer-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.analyzer-pillars > div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(5, 150, 105, .05);
}

.analyzer-pillars span {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.analyzer-pillars strong {
    display: block;
    margin-top: 4px;
}

.analyzer-pillars em {
    font-style: normal;
    font-size: .75rem;
    color: var(--muted);
}

.analyzer-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.analyzer-metrics > div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, .02);
}

.analyzer-metrics span {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 4px;
}

.analyzer-metrics strong {
    font-size: .95rem;
}

.analyzer-block {
    margin-top: 18px;
}

.analyzer-block h3 {
    margin: 0 0 8px;
    font-size: .95rem;
}

.analyzer-rules,
.analyzer-ai {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.analyzer-rules li,
.analyzer-ai li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    font-size: .88rem;
}

.analyzer-rules li.pass {
    border-color: rgba(5, 150, 105, .28);
    background: rgba(5, 150, 105, .06);
}

.analyzer-rules li.fail {
    border-color: rgba(220, 70, 70, .2);
    background: rgba(220, 70, 70, .04);
}

.analyzer-rules .mark {
    font-weight: 800;
    min-width: 1rem;
}

.analyzer-lessons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analyzer-lesson-link {
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink);
}

.analyzer-lesson-link:hover {
    border-color: rgba(5, 150, 105, .4);
}

.analyzer-disclaimer,
.analyzer-error {
    margin-top: 16px;
    font-size: .8rem;
    color: var(--muted);
}

.analyzer-sources,
.analyzer-muted {
    margin: 10px 0 14px;
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.45;
}

.analyzer-source-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    color: var(--muted);
    vertical-align: middle;
}

.analyzer-finviz h4 {
    margin: 14px 0 8px;
    font-size: .9rem;
}

.analyzer-news a {
    color: inherit;
    font-weight: 600;
}

.analyzer-news em,
.analyzer-finviz em {
    color: var(--muted);
    font-style: normal;
    font-size: .75rem;
}

.analyzer-metrics-finviz {
    margin-top: 8px;
}

.analyzer-options-checklist {
    border: 1px solid rgba(5, 150, 105, .25);
    background: linear-gradient(180deg, rgba(5, 150, 105, .06), transparent 140px);
}

.oc-header {
    display: grid;
    gap: 12px;
    margin-bottom: 10px;
}

.oc-header h3 {
    margin: 4px 0 6px;
}

.oc-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.oc-meta > div {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.oc-meta span {
    display: block;
    font-size: .68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.oc-meta strong {
    font-size: .92rem;
}

.oc-summary {
    margin: 0 0 12px;
    font-size: .82rem;
    color: var(--muted);
}

.oc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.oc-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.oc-no {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .8rem;
    background: rgba(15, 23, 42, .06);
}

.oc-body strong {
    display: block;
    margin-bottom: 4px;
}

.oc-body p {
    margin: 0;
    font-size: .82rem;
    color: var(--ink);
}

.oc-body em {
    display: block;
    margin-top: 4px;
    font-size: .75rem;
    color: var(--muted);
    font-style: normal;
}

.oc-status {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.oc-item.is-pass .oc-status,
.oc-item.is-clear .oc-status { color: #047857; }
.oc-item.is-warn .oc-status,
.oc-item.is-manual .oc-status { color: #b45309; }
.oc-item.is-fail .oc-status { color: #b42318; }
.oc-item.is-risk .oc-status { color: #b42318; }

.oc-item.is-pass,
.oc-item.is-clear { border-color: rgba(5, 150, 105, .35); }
.oc-item.is-risk,
.oc-item.is-fail { border-color: rgba(180, 35, 24, .3); }

.oc-trade {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}

.oc-trade h4 {
    margin: 0 0 6px;
    font-size: .9rem;
}

.oc-meta-form {
    margin-bottom: 12px;
}

.oc-meta-form label,
.oc-fields label,
.oc-notes-global {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.oc-meta-form input,
.oc-fields select,
.oc-fields input,
.oc-notes-global textarea {
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    color: var(--ink);
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.oc-fields {
    display: grid;
    grid-template-columns: minmax(140px, 180px) 1fr;
    gap: 8px;
    margin-top: 8px;
}

.oc-item-form {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.oc-auto-detail {
    margin: 0;
    font-size: .82rem;
}

.oc-hint {
    display: block;
    margin-top: 4px;
    font-size: .75rem;
    color: var(--muted);
    font-style: normal;
}

.oc-notes-global {
    margin-top: 14px;
}

.oc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.oc-history-load {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 8px 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.oc-history-load:hover strong {
    color: #047857;
}

.analyzer-subhead {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.analyzer-ranges-upload {
    margin-bottom: 14px;
}

.ranges-upload-form {
    margin-top: 10px;
}

.oc-optimal {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(5, 150, 105, .35);
    background: rgba(5, 150, 105, .06);
}

.oc-optimal.is-computed {
    border-color: rgba(37, 99, 235, .35);
    background: rgba(37, 99, 235, .06);
}

.oc-optimal strong {
    display: block;
    margin-bottom: 8px;
}

.oc-optimal .oc-meta {
    margin: 0;
}

@media (max-width: 700px) {
    .oc-item {
        grid-template-columns: 28px 1fr;
    }
    .oc-status {
        grid-column: 2;
    }
    .oc-fields {
        grid-template-columns: 1fr;
    }
    .oc-history-load {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.analyzer-error {
    color: #b42318;
}

.analyzer-history {
    margin-top: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 18px;
}

.analyzer-history h2 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.analyzer-history ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.analyzer-history li {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 10px;
    align-items: center;
    font-size: .84rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.analyzer-history li:last-child {
    border-bottom: none;
}

.analyzer-history time {
    color: var(--muted);
    font-size: .75rem;
}

@media (max-width: 640px) {
    .analyzer-history li {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .analyzer-verdict {
        flex-direction: column;
        align-items: flex-start;
    }
}

.cinema-card-link .continue-icon {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: var(--gold-light);
}
