/* Maneja en USA — colors taken from the logo */
:root {
  --slate: #2c343f;      /* logo background */
  --slate-deep: #232a33;
  --navy: #2b3f58;       /* car body */
  --ice: #c8ecfb;        /* logo lettering */
  --ice-soft: #eaf6fc;
  --red: #e0322f;        /* star + "Clases de manejo" */
  --red-dark: #c3231f;
  --ink: #1d2733;
  --muted: #5a6776;
  --bg: #f6f9fb;
  --card: #ffffff;
  --line: #dde5ec;
  --green: #1d8a4a;
  --green-soft: #e6f5ec;
  --red-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 39, 51, .06), 0 8px 24px rgba(29, 39, 51, .08);
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 800; }
h3, .h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.12rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.stack > * + * { margin-top: 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-ice { background: var(--ice); color: var(--slate); }
.btn-ice:hover { background: #fff; color: var(--slate); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.08rem; }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: .95rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.inline-form { display: inline; margin: 0; }

/* Header */
.site-header { background: var(--slate); color: var(--ice); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.brand img { height: 72px; width: auto; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ice); padding: 8px; cursor: pointer; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav > a:not(.btn), .site-nav .link-button { color: var(--ice); text-decoration: none; font-weight: 600; font-size: .98rem; }
.site-nav > a:not(.btn):hover, .site-nav .link-button:hover { color: #fff; text-decoration: underline; }
.site-nav > a.active { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; }

@media (max-width: 820px) {
  .brand img { height: 56px; }
  .header-inner { min-height: 70px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--slate); padding: 8px 16px 18px; border-top: 1px solid rgba(255,255,255,.08);
  }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.btn), .site-nav .inline-form { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav .btn { margin-top: 14px; }
}

/* Eyebrow + star */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ice); margin-bottom: 12px; }
.eyebrow .star, .tagline-grid .star { color: var(--red); }
.eyebrow-dark { color: var(--red-dark); }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #3a4d66 0%, transparent 60%), var(--slate); color: #fff; padding: 48px 0 32px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.4vw, 3.3rem); }
.hero-sub { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--ice); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center-actions { justify-content: center; }
.hero-note { color: var(--ice); font-size: .95rem; }
.hero-voice { display: flex; align-items: center; gap: 10px; margin: 24px 0 0; color: var(--ice); }
.hero-voice strong { color: #fff; }
.mic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; }

.hero-card { display: flex; justify-content: center; }
.hero-video { margin: 0; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; background: #0b1730; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35), 0 0 0 1px rgba(200,236,251,.15); }
.hero-video video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0b1730; }
.quiz-preview { background: #fff; color: var(--ink); border-radius: 20px; padding: 22px; width: 100%; max-width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,.35); transform: rotate(1.5deg); }
.quiz-preview-top { display: flex; justify-content: space-between; margin-bottom: 14px; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--ice-soft); color: var(--navy); }
.pill-muted { background: #f0f2f4; color: var(--muted); }
.quiz-preview-sign { display: flex; justify-content: center; margin: 6px 0 12px; }
.quiz-preview-q { font-weight: 700; text-align: center; margin-bottom: 12px; }
.quiz-preview-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quiz-preview-options li { border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .95rem; display: flex; justify-content: space-between; }
.quiz-preview-options li.correct { border-color: var(--green); background: var(--green-soft); font-weight: 700; color: var(--green); }

.trust-row { list-style: none; margin: 40px 0 0; padding: 20px 0 0; border-top: 1px solid rgba(255,255,255,.12); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-row li { display: flex; flex-direction: column; }
.trust-row strong { color: #fff; font-size: 1.05rem; }
.trust-row span { color: var(--ice); font-size: .9rem; }

@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .quiz-preview { transform: none; }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
}

/* Sections */
.section { padding: 64px 0; }
.section-tight { padding: 32px 0 56px; }
.section-tint { background: var(--ice-soft); }
.section-dark { background: var(--slate); color: #fff; }
.section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }

.page-head { background: var(--slate); color: #fff; padding: 48px 0; }
.page-head h1 { color: #fff; }
.page-head .lead { color: var(--ice); }
.page-head-sm { padding: 32px 0; }
.back-link { display: inline-block; color: var(--ice); text-decoration: none; margin-bottom: 12px; font-weight: 600; }
.back-link:hover { color: #fff; }
.back-link.dark { color: var(--navy); }
.back-link.dark:hover { color: var(--red-dark); }

/* Narrator */
.narrator { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; max-width: 900px; }
.narrator-avatar { position: relative; width: 170px; height: 170px; border-radius: 50%; background: linear-gradient(145deg, var(--navy), var(--slate)); display: grid; place-items: center; box-shadow: 0 0 0 6px var(--ice), var(--shadow); }
.narrator-avatar > span:first-child { font-size: 3.2rem; font-weight: 800; color: var(--ice); letter-spacing: .02em; }
.narrator-mic { position: absolute; right: 6px; bottom: 6px; width: 48px; height: 48px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; border: 4px solid #fff; }
.narrator-mic svg { width: 22px; height: 22px; }
@media (max-width: 640px) {
  .narrator { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .narrator-avatar { margin: 0 auto; width: 140px; height: 140px; }
}

/* Plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 860px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan .btn { margin-top: auto; }
.plan-featured { border: 3px solid var(--red); position: relative; }
.plan-badge { position: absolute; top: -15px; left: 28px; background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin: 0; }
.plan-price { font-size: 2.6rem; font-weight: 800; color: var(--slate); margin: 0 0 16px; line-height: 1; }
.plan-price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

.checklist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: .78rem; font-weight: 800; display: grid; place-items: center; }

/* Topics */
.topics { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.topics li { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.topics h3 { margin-bottom: 4px; }
.topics p { margin: 0; color: var(--muted); }
.topic-num { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--ice); font-weight: 800; display: grid; place-items: center; }
@media (max-width: 720px) { .topics { grid-template-columns: 1fr; } }

/* Taglines */
.taglines { padding: 48px 0; }
.tagline-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
.tagline-grid li { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; color: var(--ice); background: rgba(255,255,255,.05); border: 1px solid rgba(200,236,251,.2); border-radius: 999px; padding: 10px 18px; }

/* FAQ */
.faq { margin-top: 24px; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.quiz-card { display: flex; flex-direction: column; }
.quiz-card p:not(.card-meta) { color: var(--muted); }
.quiz-card .btn { margin-top: auto; }
.card-meta { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red-dark); margin-bottom: 6px; }
.note { margin-top: 20px; color: var(--muted); }

.upsell { margin-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 20px; padding: 26px 28px; }
.upsell h2, .upsell h3 { color: #fff; margin-bottom: 4px; }
.upsell p { margin: 0; color: var(--ice); }
.upsell-light { background: var(--ice-soft); color: var(--ink); border: 1px solid var(--ice); }
.upsell-light h2 { color: var(--ink); }
.upsell-light p { color: var(--muted); }

.alert { background: var(--red-soft); color: var(--red-dark); border: 1px solid #f6c3c2; border-radius: 10px; padding: 10px 14px; font-weight: 600; }

/* Quiz */
.quiz-form { display: grid; gap: 18px; }
.question { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 20px; margin: 0; }
.question legend { font-weight: 700; font-size: 1.08rem; padding: 0; margin-bottom: 14px; display: flex; gap: 10px; float: left; width: 100%; }
.question legend + * { clear: both; }
.question-num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--ice); font-size: .85rem; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: flex-start; gap: 12px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.option:hover { border-color: #b7c6d4; }
.option input { margin-top: 5px; accent-color: var(--red); width: 18px; height: 18px; flex: none; }
.option:has(input:checked) { border-color: var(--navy); background: var(--ice-soft); }
.quiz-submit { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 24px 0 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.quiz-submit p { margin: 0; }

.score-card { display: flex; align-items: center; gap: 24px; border-radius: 20px; padding: 24px 28px; margin-bottom: 28px; }
.score-card.passed { background: var(--green-soft); border: 2px solid var(--green); }
.score-card.failed { background: var(--red-soft); border: 2px solid var(--red); }
.score-card p { margin: 0; }
.score-num { font-size: 3rem; font-weight: 800; line-height: 1; }
.passed .score-num { color: var(--green); }
.failed .score-num { color: var(--red-dark); }

.review { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.review-item { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 12px; padding: 18px 20px; }
.review-item.is-wrong { border-left-color: var(--red); }
.review-q { font-weight: 700; display: flex; gap: 10px; }
.review-answer { margin: 0 0 6px; }
.review-answer.wrong { color: var(--red-dark); }
.review-answer.right { color: var(--green); }
.review-expl { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Course */
.progress-wrap { max-width: 460px; margin-top: 8px; }
.progress-wrap p { color: var(--ice); margin: 8px 0 0; }
.progress-wrap a { color: #fff; font-weight: 700; }
.progress { height: 12px; border-radius: 999px; background: rgba(43, 63, 88, .15); overflow: hidden; }
.page-head .progress { background: rgba(255,255,255,.15); }
.progress span { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.card .progress { margin: 8px 0 12px; }

.module + .module { margin-top: 36px; }
.module-title { font-size: 1.3rem; display: flex; flex-direction: column; gap: 2px; }
.module-title span { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--red-dark); }
.lesson-list { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.lesson-row + .lesson-row { border-top: 1px solid var(--line); }
.lesson-icon { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ice-soft); color: var(--navy); font-size: .85rem; }
.lesson-row.done .lesson-icon { background: var(--green); color: #fff; }
.lesson-row.locked { color: var(--muted); }
.lesson-row.locked .lesson-icon { background: #f0f2f4; }
.quiz-row { background: #fbfcfd; }
.lesson-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lesson-info a { font-weight: 600; text-decoration: none; }
.lesson-info a:hover { text-decoration: underline; }
.lesson-dur { font-size: .88rem; color: var(--muted); white-space: nowrap; }
.tag { font-size: .75rem; font-weight: 700; background: var(--ice); color: var(--slate); padding: 2px 8px; border-radius: 999px; }

.lesson-title { margin-bottom: 20px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--slate-deep); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ice); }
.video-placeholder p { margin: 0; font-weight: 700; }
.mic-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; }
.mic-lg svg { width: 30px; height: 30px; }
.narrated-by { display: flex; align-items: center; gap: 6px; margin: 12px 0 24px; color: var(--muted); font-size: .95rem; }
.narrated-by svg { color: var(--red); }
.key-points { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 4px; margin-bottom: 24px; }
.lesson-actions { margin-bottom: 8px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 600; }
.lesson-nav a { text-decoration: none; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; max-width: 980px; }
.checkout-summary h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.checkout-card { display: grid; gap: 14px; }
.checkout-line { display: flex; justify-content: space-between; }
.checkout-total { border-top: 1px solid var(--line); padding-top: 12px; font-size: 1.15rem; }
.checkout-card p { margin: 0; }
.terms-check { display: flex; gap: 12px; align-items: flex-start; background: var(--ice-soft); border: 2px solid var(--ice); border-radius: 12px; padding: 14px; cursor: pointer; }
.terms-check input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--red); flex: none; }
@media (max-width: 820px) { .checkout { grid-template-columns: 1fr; gap: 28px; } }

/* Auth */
.auth { max-width: 460px; }
.auth-card { display: grid; gap: 16px; }
.auth-card h1 { font-size: 1.8rem; margin: 0; }
.auth-card p { margin: 0; }
.auth-card label { display: grid; gap: 6px; font-weight: 600; }
.auth-card small { font-weight: 400; color: var(--muted); }
.auth-card input { font: inherit; font-weight: 400; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.auth-card input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--ice); }

/* Account */
.attempts { list-style: none; padding: 0; margin: 0; }
.attempts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.attempts li:last-child { border-bottom: 0; }
.attempt-score { font-weight: 700; }
.attempt-score.passed { color: var(--green); }
.attempt-score.failed { color: var(--red-dark); }

/* Legal */
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.8em; }
.legal-updated { color: var(--muted); font-size: .95rem; margin-bottom: 24px; }

/* Footer */
.site-footer { background: var(--slate-deep); color: var(--ice); padding: 40px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--ice); }
.site-footer a:hover { color: #fff; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand img { height: 56px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { text-decoration: none; font-weight: 600; }
.footer-disclaimer { margin: 20px 0 10px; font-size: .85rem; color: #a9bccb; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .8rem; color: #a9bccb; margin: 0 0 6px; }
.footer-legal span:not(:last-child)::after { content: "·"; margin: 0 8px; }
.footer-copy { font-size: .8rem; color: #8699a9; margin: 0; }

/* Passwordless login */
.tabs { display: none; grid-template-columns: 1fr 1fr; gap: 4px; background: #eef2f5; padding: 4px; border-radius: 12px; }
.tab { font: inherit; font-weight: 700; font-size: .95rem; border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 9px; cursor: pointer; }
.tab[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.auth-form { display: grid; gap: 14px; }
.js .auth-form[data-hidden] { display: none; }
.dev-banner { background: #fff7e0; border: 1px dashed #d9a400; color: #6b5200; border-radius: 10px; padding: 10px 14px; font-size: .92rem; }
.big-icon { font-size: 2.6rem; line-height: 1; color: var(--red); }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; }
.js .tabs { display: grid; }

/* Admin */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: 70vh; max-width: 1280px; margin: 0 auto; }
.admin-side { border-right: 1px solid var(--line); padding: 28px 16px; }
.admin-label { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 12px; }
.admin-side nav { display: grid; gap: 2px; position: sticky; top: 100px; }
.admin-side a { padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--ink); }
.admin-side a:hover { background: #eef2f5; }
.admin-side a.active { background: var(--navy); color: #fff; }
.admin-main { padding: 28px 24px 64px; min-width: 0; display: grid; gap: 20px; align-content: start; }
.admin-main h1 { font-size: 1.8rem; margin: 0; }
.admin-main h2 { font-size: 1.3rem; margin: 0; }
.admin-main > .card, .admin-main .stack > .card { box-shadow: none; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notice { background: var(--green-soft); color: var(--green); border: 1px solid #b9e2c8; border-radius: 10px; padding: 10px 14px; font-weight: 600; margin: 0; }
.admin-main .alert { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 2px; }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--slate); }
.stat-sub { font-size: .82rem; color: var(--muted); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.admin-list li:last-child { border-bottom: 0; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafbfc; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-filters input, .admin-filters select, .admin-form input:not([type=checkbox]):not([type=radio]), .admin-form select, .admin-form textarea {
  font: inherit; font-size: .98rem; font-weight: 400; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; width: 100%;
}
.admin-filters input { flex: 1; min-width: 220px; width: auto; }
.admin-filters select { width: auto; }
.admin-form { display: grid; gap: 16px; }
.admin-form label { display: grid; gap: 6px; font-weight: 600; }
.admin-form small { font-weight: 400; color: var(--muted); }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--ice); }
.admin-form label.check { display: flex; align-items: center; gap: 10px; }
.admin-form label.check input { width: 18px; height: 18px; accent-color: var(--red); }
.form-row { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 14px; }
.form-row:has(> :nth-child(2):last-child) { grid-template-columns: 1fr 2fr; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.advanced summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.option-editor { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.option-editor legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.option-edit { display: flex; align-items: center; gap: 10px; }
.option-edit input[type=radio] { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.q-admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.q-admin { box-shadow: none; padding: 18px 20px; }
.q-admin-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.q-admin-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.q-admin-options { list-style: none; padding: 0; margin: 6px 0 0 38px; display: grid; gap: 4px; font-size: .95rem; color: var(--muted); }
.q-admin-options .correct { color: var(--green); font-weight: 700; }
.q-admin .review-expl { margin-left: 38px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; }
.icon-btn:hover { background: #eef2f5; }
.tag-warn { background: #fff1d6; color: #7a5600; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; }
.danger-zone { border-color: #f3c6c5; display: grid; gap: 12px; }
.inline-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-row input { font: inherit; padding: 6px 10px; border: 2px solid var(--line); border-radius: 8px; margin-left: 6px; width: 140px; }
.danger-link { color: var(--red-dark); font-weight: 600; text-decoration: underline; }
.danger-inline { margin: 0; }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .admin-label { display: none; }
  .admin-side nav { display: flex; overflow-x: auto; position: static; }
  .admin-side a { white-space: nowrap; }
  .admin-main { padding: 20px 16px 48px; }
  .admin-cols, .form-row, .form-row:has(> :nth-child(2):last-child) { grid-template-columns: 1fr; }
}
[hidden] { display: none !important; }

/* Admin view bar on public pages */
.admin-bar { background: #fff7e0; border-bottom: 1px solid #f0d98a; color: #5c4600; font-size: .9rem; }
.admin-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
.admin-bar .link-button { font-weight: 700; text-decoration: underline; color: #5c4600; }

/* Study guides */
.crumbs { font-size: .9rem; color: var(--ice); margin-bottom: 12px; }
.crumbs a { color: var(--ice); }
.guide .review-q { font-size: 1.05rem; line-height: 1.4; margin-bottom: 10px; }
.guide-options { list-style: none; padding: 0; margin: 0 0 10px 38px; display: grid; gap: 4px; color: var(--muted); }
.guide-options .correct { color: var(--green); font-weight: 700; }
.guide .review-answer, .guide .review-expl { margin-left: 38px; }
.quiz-guide-link { text-align: center; margin: 10px 0 0; }

/* Coming soon */
.soon-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--slate); color: #fff; }
.soon { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 48px 16px 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.soon-logo { width: min(340px, 80vw); margin-bottom: 28px; }
.soon h1 { color: #fff; font-size: clamp(1.9rem, 5.5vw, 3rem); }
.soon-sub { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--ice); margin-bottom: 20px; }
.soon-note { color: #d8e6ef; max-width: 520px; }
.soon-voice { justify-content: center; }
.soon-footer { padding: 20px 16px 28px; text-align: center; }
.soon-footer .footer-legal { justify-content: center; }
.soon-footer a { color: var(--ice); }
.launch-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.launch-card p { margin: 0; }
.launch-card.is-soon { border: 2px solid #f0d98a; background: #fffbea; }
.launch-card.is-live { border: 2px solid #b9e2c8; background: var(--green-soft); }
.admin-bar a { color: #5c4600; font-weight: 700; }

/* Lesson resources */
.resources { margin: 0; scroll-margin-top: 100px; }
.course-layout.has-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; max-width: 1120px; }
.course-main { min-width: 0; }
.course-side { position: sticky; top: 108px; max-height: calc(100vh - 128px); overflow-y: auto; padding: 2px; }
.course-side .resources > h2 { margin: 0 0 12px; font-size: 1.3rem; }
.course-side .resource-link { padding: 12px 14px; }
@media (max-width: 900px) {
  .course-layout.has-side { grid-template-columns: 1fr; max-width: 780px; gap: 8px; }
  .course-side { position: static; max-height: none; overflow: visible; padding: 0; margin-top: 28px; }
}
.resource-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.resource-link { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.resource-link:hover { border-color: var(--navy); background: var(--ice-soft); }
.resource-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--ice-soft); display: inline-grid; place-items: center; font-size: 1.1rem; }
.resource-text { display: grid; min-width: 0; }
.resource-title { font-weight: 700; overflow-wrap: anywhere; }
.resource-video { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; }
.resource-video .resource-title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.resource-video .video-frame { margin-top: 10px; }
.resources-locked { scroll-margin-top: 100px; background: var(--ice-soft); border: 1px dashed #9fc9dd; border-radius: var(--radius); padding: 14px 16px; margin: 0; color: var(--navy); }

/* Admin: lesson resources */
.resources-admin { display: grid; gap: 16px; box-shadow: none; }
.resources-admin h2, .resources-admin h3 { margin: 0; }
.resource-admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.resource-admin { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.resource-admin-head { display: flex; align-items: center; gap: 12px; }
.resource-admin-head .grow { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.resource-add { border-top: 1px solid var(--line); padding-top: 16px; }
.resource-admin .advanced form + form { margin-top: 10px; }
