/* ============================================================
   STEM ACADEMY DESIGN SYSTEM (styles.css)
   ------------------------------------------------------------
   One stylesheet for the whole site. Colours, spacing and type
   are defined as CSS variables below. Change the brand here
   and every page updates.
   ============================================================ */

:root {
  /* brand */
  --brand: #4f46e5;          /* indigo, primary actions */
  --brand-deep: #4338ca;
  --accent: #22d3ee;         /* cyan, highlights on dark */
  --navy: #0b1220;           /* dark hero background */
  --navy-2: #131f3d;

  /* subject colours */
  --science: #8b5cf6;
  --technology: #0891b2;
  --engineering: #ea8a00;
  --mathematics: #0e9f6e;

  /* neutrals */
  --ink: #101a2c;
  --muted: #57677f;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --line: #e3e9f3;

  /* misc */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16,26,44,.05), 0 8px 24px -12px rgba(16,26,44,.14);
  --shadow-lift: 0 2px 4px rgba(16,26,44,.06), 0 16px 36px -14px rgba(16,26,44,.22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

/* ---------- reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img, svg { display: inline-block; vertical-align: middle; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: 2.4rem; } h2 { font-size: 1.7rem; } h3 { font-size: 1.15rem; }
p { color: var(--muted); }
:focus-visible { outline: 3px solid rgba(79,70,229,.45); outline-offset: 2px; border-radius: 4px; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.95rem var(--font); padding: 12px 22px; border-radius: 10px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(79,70,229,.55); }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eef2ff; }
.btn-danger { background: #fff1f1; color: #c02626; border-color: #f3c6c6; }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.linklike { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }

/* ---------- navbar ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 26px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 1.12rem; letter-spacing: -0.02em; }
.logo span b { color: var(--brand); font-weight: 800; }
.logo span { font-weight: 700; }
.logo-mark { width: 30px; height: 30px; color: var(--brand); }
.nav-links { display: flex; gap: 4px; margin-left: 6px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .93rem; padding: 8px 11px; border-radius: 8px; }
.nav-links a:hover { color: var(--ink); background: #eef2fb; }
.nav-links a.active { color: var(--brand); background: #eef0ff; font-weight: 600; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.nav-user { color: var(--muted); font-size: .9rem; margin-right: 2px; }
.hamburger { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }

/* ---------- hero (dark) ---------- */
.hero { background:
  radial-gradient(900px 420px at 82% -10%, rgba(79,70,229,.5), transparent 60%),
  radial-gradient(700px 380px at 12% 110%, rgba(34,211,238,.18), transparent 60%),
  var(--navy);
  color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(720px 480px at 55% 30%, #000, transparent 75%); }
.hero-inner { position: relative; padding: 88px 0 72px; max-width: 780px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
.hero h1 .hl { color: var(--accent); }
.hero-sub { color: #b9c4d8; font-size: 1.13rem; margin: 18px 0 30px; max-width: 620px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.stat b { display: block; font-size: 1.55rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.stat span { color: #8fa0bb; font-size: .88rem; }

/* category-tinted section hero */
.section-hero { color: #fff; position: relative; overflow: hidden; background: var(--navy); }
.section-hero .hero-inner { padding: 62px 0 54px; }
.section-hero.cat-science { background: linear-gradient(120deg, #2a1a55, #0b1220 70%); }
.section-hero.cat-technology { background: linear-gradient(120deg, #093a4d, #0b1220 70%); }
.section-hero.cat-engineering { background: linear-gradient(120deg, #4d2f05, #0b1220 70%); }
.section-hero.cat-mathematics { background: linear-gradient(120deg, #0a3d2b, #0b1220 70%); }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--navy); color: #fff; }
.section-dark h2 { color: #fff; }
.section-dark p { color: #b9c4d8; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head h2 { margin-bottom: 8px; }
.section-head .kicker { color: var(--brand); font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.spread { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head { padding: 46px 0 8px; }
.page-head h1 { font-size: 2rem; }
.page-head p { max-width: 640px; margin-top: 8px; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }

/* subject tiles (home) */
.cat-tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); color: var(--ink); transition: transform .14s ease, box-shadow .14s ease; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cat-tile .tile-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.cat-tile h3 { margin-bottom: 6px; }
.cat-tile p { font-size: .92rem; }
.cat-tile .tile-count { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .88rem; color: var(--brand); }
.tile-icon.cat-science { background: rgba(139,92,246,.13); color: var(--science); }
.tile-icon.cat-technology { background: rgba(8,145,178,.12); color: var(--technology); }
.tile-icon.cat-engineering { background: rgba(234,138,0,.13); color: var(--engineering); }
.tile-icon.cat-mathematics { background: rgba(14,159,110,.12); color: var(--mathematics); }

/* ---------- course cards ---------- */
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cc-band { height: 6px; }
.cc-band.cat-science { background: linear-gradient(90deg, var(--science), #c4b5fd); }
.cc-band.cat-technology { background: linear-gradient(90deg, var(--technology), #67e8f9); }
.cc-band.cat-engineering { background: linear-gradient(90deg, var(--engineering), #fcd34d); }
.cc-band.cat-mathematics { background: linear-gradient(90deg, var(--mathematics), #6ee7b7); }
.cc-body { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { font-size: .74rem; font-weight: 700; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; }
.chip.cat-science { background: rgba(139,92,246,.13); color: #6d28d9; }
.chip.cat-technology { background: rgba(8,145,178,.12); color: #0e7490; }
.chip.cat-engineering { background: rgba(234,138,0,.14); color: #b45309; }
.chip.cat-mathematics { background: rgba(14,159,110,.13); color: #047857; }
.level { font-size: .76rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; }
.level-advanced { color: #b02a2a; border-color: #eecaca; background: #fdf3f3; }
.cc-body h3 { font-size: 1.06rem; }
.cc-body > p { font-size: .9rem; flex: 1; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 13px; margin-top: 4px; flex-wrap: wrap; }
.meta { color: var(--muted); font-size: .82rem; }
.cc-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.price-tag { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.price-tag.free { color: var(--mathematics); }
.cc-sub { font-size: .74rem; color: var(--mathematics); font-weight: 600; }
.cc-sub-off { color: var(--muted); font-weight: 500; }
.cc-progress { display: flex; align-items: center; gap: 10px; min-width: 150px; flex: 1; }
.cc-progress .progress { flex: 1; }
.pct { font-size: .8rem; font-weight: 700; color: var(--brand); white-space: nowrap; }

/* ---------- progress bar ---------- */
.progress { height: 8px; background: #e8ecf5; border-radius: 999px; overflow: hidden; min-width: 60px; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .4s ease; }

/* ---------- email capture ---------- */
.email-capture { display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: linear-gradient(120deg, #eef0ff, #e6fbff); border: 1px solid #dfe3fb; border-radius: var(--radius); padding: 30px 34px; flex-wrap: wrap; }
.ec-text h3 { margin-bottom: 4px; }
.ec-text p { font-size: .92rem; max-width: 420px; }
.capture-form { display: flex; gap: 10px; flex-wrap: wrap; }
.capture-form input[type="email"] { min-width: 220px; }
.capture-form input, .capture-form select { padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.capture-form input:focus, .capture-form select:focus { border-color: var(--brand); outline: none; }
.capture-done { font-weight: 600; color: var(--mathematics); }
.ec-footer { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.ec-footer h3 { color: #fff; } .ec-footer p { color: #9fb0c9; }

/* upcoming cards */
.upcoming-card h3 { margin: 10px 0 6px; }
.soon { font-size: .78rem; font-weight: 700; color: var(--engineering); background: rgba(234,138,0,.12); padding: 3px 10px; border-radius: 999px; }

/* how-it-works steps */
.step-num { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; }
.step h3 { margin-bottom: 6px; } .step p { font-size: .93rem; }

/* ---------- pricing ---------- */
.plan-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); }
.plan-featured { border-color: var(--brand); box-shadow: 0 10px 34px -12px rgba(79,70,229,.4); }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.plan-card h3 { font-size: 1.08rem; }
.plan-tagline { font-size: .88rem; margin-top: 3px; }
.plan-price { margin: 18px 0 4px; font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; }
.plan-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan-feats { list-style: none; margin: 18px 0 24px; flex: 1; }
.plan-feats li { padding: 7px 0 7px 28px; position: relative; color: var(--muted); font-size: .92rem; border-bottom: 1px dashed var(--line); }
.plan-feats li::before { content: '✓'; position: absolute; left: 2px; color: var(--mathematics); font-weight: 800; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 10px; font-size: .93rem; }

/* ---------- forms & auth ---------- */
.auth-wrap { max-width: 440px; margin: 60px auto 80px; padding: 0 22px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.form-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.form-card > p { font-size: .93rem; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; font: inherit; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.form-msg { display: none; padding: 11px 14px; border-radius: 10px; font-size: .9rem; font-weight: 500; margin-bottom: 16px; }
.form-msg.err { display: block; background: #fdf1f1; color: #b02a2a; border: 1px solid #f3d2d2; }
.form-msg.ok { display: block; background: #eefbf4; color: #047857; border: 1px solid #c8ecd9; }
.auth-alt { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.demo-creds { margin-top: 18px; background: #f2f5fb; border: 1px dashed #c9d4e8; border-radius: 10px; padding: 12px 16px; font-size: .84rem; color: var(--muted); }
.demo-creds code { font-family: var(--mono); font-size: .8rem; color: var(--ink); background: #fff; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: #93a5c4; margin-bottom: 18px; }
.breadcrumb a { color: #b6c6e2; }
.breadcrumb a:hover { color: #fff; }

/* ---------- course page ---------- */
.course-hero { background: radial-gradient(800px 400px at 85% -20%, rgba(79,70,229,.45), transparent 60%), var(--navy); color: #fff; }
.course-hero-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 44px; padding: 52px 0 56px; align-items: start; }
.course-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 12px 0 14px; }
.course-hero .hero-sub { margin: 0 0 22px; }
.course-facts { display: flex; gap: 26px; flex-wrap: wrap; }
.fact b { display: block; color: #fff; font-size: .98rem; }
.fact span { color: #8fa0bb; font-size: .8rem; }

.buy-card { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-lift); position: sticky; top: 86px; }
.buy-price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.buy-price small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.buy-note { font-size: .86rem; color: var(--muted); margin: 6px 0 16px; }
.buy-note.good { color: #047857; font-weight: 600; }
.buy-card .btn { margin-bottom: 10px; }
.buy-includes { list-style: none; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.buy-includes li { font-size: .87rem; color: var(--muted); padding: 4px 0 4px 26px; position: relative; }
.buy-includes li::before { content: '✓'; position: absolute; left: 2px; color: var(--brand); font-weight: 700; }
.buy-progress { margin: 4px 0 14px; display: flex; align-items: center; gap: 10px; }

.outcomes { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.outcomes li { position: relative; padding-left: 30px; color: var(--muted); font-size: .95rem; }
.outcomes li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 6px;
  background: rgba(14,159,110,.12); color: var(--mathematics); font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; }

.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.acc { border-bottom: 1px solid var(--line); }
.acc:last-child { border-bottom: 0; }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 22px;
  background: none; border: 0; cursor: pointer; font: 600 .98rem var(--font); color: var(--ink); text-align: left; }
.acc-head:hover { background: #f7f9fe; }
.acc-head .acc-sub { color: var(--muted); font-weight: 500; font-size: .82rem; }
.acc-head .caret { transition: transform .2s ease; color: var(--muted); flex-shrink: 0; }
.acc.open .caret { transform: rotate(180deg); }
.acc-body { display: none; }
.acc.open .acc-body { display: block; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px dashed var(--line); font-size: .92rem; color: var(--ink); }
a.lesson-row:hover { background: #f7f9fe; }
.lesson-row .l-ic { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: #eef0ff; color: var(--brand); flex-shrink: 0; font-size: .78rem; }
.lesson-row.done .l-ic { background: rgba(14,159,110,.14); color: var(--mathematics); }
.lesson-row.locked { color: #9aa8c0; }
.lesson-row.locked .l-ic { background: #f0f3f9; color: #9aa8c0; }
.lesson-row .l-time { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.lesson-row .l-tag { font-size: .7rem; font-weight: 700; color: var(--brand); background: #eef0ff; border-radius: 999px; padding: 2px 9px; }

.practical-box { background: linear-gradient(120deg, #fff8ec, #fff); border: 1px solid #f3e2bf; border-radius: var(--radius); padding: 24px 26px; }
.practical-box h3 { margin-bottom: 12px; }
.practical-box li { margin-left: 20px; color: var(--muted); padding: 4px 0; }

/* ---------- lesson page ---------- */
.lesson-top { background: var(--navy); color: #fff; padding: 14px 0; position: sticky; top: 0; z-index: 40; }
.lesson-top-inner { display: flex; align-items: center; gap: 18px; }
.lesson-top .logo { color: #fff; font-size: 1rem; }
.lesson-top .logo-mark { color: var(--accent); width: 24px; height: 24px; }
.lesson-top .lt-course { color: #b9c4d8; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-top .progress { flex: 1; max-width: 300px; background: rgba(255,255,255,.14); }
.lesson-top .pct { color: var(--accent); }
.lesson-top .btn { margin-left: auto; }

.lesson-layout { display: grid; grid-template-columns: 290px 1fr; gap: 34px; padding: 34px 0 70px; align-items: start; }
.lesson-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; }
.side-module { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.side-module:first-child { margin-top: 0; }
.side-lesson { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; font-size: .88rem; color: var(--ink); }
.side-lesson:hover { background: #f2f5fc; }
.side-lesson .dot { width: 8px; height: 8px; border-radius: 50%; background: #cfd9ea; flex-shrink: 0; }
.side-lesson.done .dot { background: var(--mathematics); }
.side-lesson.now { background: #eef0ff; font-weight: 600; color: var(--brand); }
.side-lesson.now .dot { background: var(--brand); }
.side-lesson.locked { color: #9aa8c0; }

.lesson-main { max-width: 760px; }
.lesson-main .lm-kicker { color: var(--brand); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.lesson-main h1 { font-size: 1.9rem; margin: 6px 0 22px; }
.lesson-main .body-text p { margin-bottom: 16px; font-size: 1rem; color: #3c4b63; }

.objectives { background: #eef0ff; border: 1px solid #dfe3fb; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 26px; }
.objectives h3 { font-size: .95rem; margin-bottom: 10px; color: var(--brand-deep); }
.objectives li { margin-left: 20px; color: #454f6d; padding: 3px 0; font-size: .95rem; }

.keyterms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.keyterm { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.keyterm b { display: block; font-size: .9rem; margin-bottom: 3px; }
.keyterm span { font-size: .85rem; color: var(--muted); }

.worked { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 22px 26px; margin: 26px 0; }
.worked h3 { margin-bottom: 14px; }
.worked ol { margin-left: 20px; }
.worked li { padding: 6px 0; color: #3c4b63; font-size: .95rem; }

.callout { background: linear-gradient(120deg, #fff8ec, #fff); border: 1px solid #f3e2bf; border-radius: var(--radius); padding: 20px 24px; margin: 26px 0; }
.callout h3 { font-size: .95rem; color: #92610a; margin-bottom: 8px; }
.callout p { font-size: .93rem; }

.code-block { background: #0d1526; border-radius: var(--radius); margin: 24px 0; overflow: hidden; }
.code-block .cb-label { font: 600 .78rem var(--mono); color: #8fa0bb; padding: 10px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.code-block pre { padding: 18px; overflow-x: auto; }
.code-block code { font: .84rem/1.65 var(--mono); color: #d7e4f7; white-space: pre; }

.practice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 26px 0; }
.practice h3 { margin-bottom: 12px; }
.practice li { margin-left: 20px; padding: 5px 0; color: #3c4b63; font-size: .95rem; }

.placeholder-note { background: #f2f5fb; border: 1px dashed #c9d4e8; border-radius: var(--radius); padding: 16px 20px; font-size: .88rem; color: var(--muted); margin: 26px 0; }

.lesson-actions { display: flex; align-items: center; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lesson-actions .spacer { flex: 1; }
.done-badge { color: var(--mathematics); font-weight: 700; font-size: .92rem; }

/* ---------- quiz ---------- */
.quiz-wrap { max-width: 680px; margin: 0 auto; padding: 40px 22px 80px; }
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.q-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.q-tag { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); background: #eef0ff; padding: 4px 12px; border-radius: 999px; }
.q-count { color: var(--muted); font-size: .85rem; font-weight: 600; }
.q-card h2 { font-size: 1.25rem; margin-bottom: 20px; white-space: pre-line; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 18px; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; font: 500 .95rem var(--font); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s; }
.option:hover { border-color: var(--brand); background: #fafbff; }
.option .opt-key { width: 26px; height: 26px; border-radius: 8px; background: #eef0ff; color: var(--brand); font-weight: 700; font-size: .8rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.option.sel { border-color: var(--brand); background: #eef0ff; }
.option.correct { border-color: var(--mathematics); background: #eefbf4; }
.option.correct .opt-key { background: var(--mathematics); color: #fff; }
.option.wrong { border-color: #d64545; background: #fdf1f1; }
.option.wrong .opt-key { background: #d64545; color: #fff; }
.option[disabled] { cursor: default; }
.short-answer { display: flex; gap: 10px; flex-wrap: wrap; }
.short-answer input { flex: 1; min-width: 200px; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }
.feedback { margin-top: 18px; padding: 16px 20px; border-radius: 10px; font-size: .93rem; display: none; }
.feedback.show { display: block; }
.feedback.ok { background: #eefbf4; border: 1px solid #c8ecd9; color: #065f46; }
.feedback.no { background: #fdf1f1; border: 1px solid #f3d2d2; color: #9b2c2c; }
.feedback b { display: block; margin-bottom: 4px; }
.quiz-nav { display: flex; justify-content: flex-end; margin-top: 20px; gap: 10px; }
.quiz-progress { display: flex; gap: 6px; margin-bottom: 22px; }
.quiz-progress i { flex: 1; height: 5px; border-radius: 99px; background: #e4e9f4; }
.quiz-progress i.on { background: var(--brand); }
.quiz-progress i.good { background: var(--mathematics); }
.quiz-progress i.bad { background: #d64545; }
.score-big { font-size: 3rem; font-weight: 800; letter-spacing: -0.04em; color: var(--brand); }
.review-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-top: 10px; font-size: .9rem; }
.review-item.ok { border-left: 4px solid var(--mathematics); }
.review-item.no { border-left: 4px solid #d64545; }
.review-item p { font-size: .85rem; margin-top: 4px; }

/* ---------- dashboard ---------- */
.dash-head { background: var(--navy); color: #fff; padding: 42px 0; }
.dash-head h1 { font-size: 1.7rem; }
.dash-head p { color: #b9c4d8; margin-top: 4px; }
.dash-head .plan-pill { display: inline-block; margin-top: 12px; font-size: .78rem; font-weight: 700; color: var(--accent);
  border: 1px solid rgba(34,211,238,.35); background: rgba(34,211,238,.1); padding: 4px 13px; border-radius: 999px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.stat-card b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-card span { color: var(--muted); font-size: .85rem; }
.continue-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.continue-card h3 { font-size: 1.02rem; }
.continue-card .cc-lessons { font-size: .86rem; color: var(--muted); }
.continue-card .cc-lessons b { color: var(--ink); font-weight: 600; }
.continue-card .bar-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.dash-section { padding: 34px 0 6px; }
.dash-section h2 { font-size: 1.25rem; margin-bottom: 18px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 13px 18px; border-bottom: 1px solid var(--line); background: #f9fafd; white-space: nowrap; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.score-pill { font-weight: 700; padding: 3px 11px; border-radius: 999px; font-size: .8rem; }
.score-pill.good { background: #eefbf4; color: #047857; }
.score-pill.mid { background: #fff8ec; color: #92610a; }
.score-pill.low { background: #fdf1f1; color: #b02a2a; }
.recent-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; color: var(--ink); font-size: .92rem; }
.recent-list a:hover { border-color: var(--brand); }
.recent-list .rl-course { color: var(--muted); font-size: .8rem; margin-left: auto; text-align: right; }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--navy); color: #cfd9ea; padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.admin-side .logo { color: #fff; margin-bottom: 6px; padding: 0 10px; }
.admin-side .logo-mark { color: var(--accent); }
.admin-side .as-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #6e80a1; padding: 14px 10px 6px; }
.admin-side a, .admin-side button.as-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  color: #cfd9ea; font: 500 .92rem var(--font); background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.admin-side a:hover, .admin-side button.as-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side a.active { background: var(--brand); color: #fff; font-weight: 600; }
.admin-side .as-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
.admin-main { padding: 34px 38px 70px; background: var(--bg); }
.admin-headbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-headbar h1 { font-size: 1.45rem; }
.admin-headbar p { font-size: .9rem; }
.pill { font-size: .74rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; letter-spacing: .03em; }
.pill.published { background: #eefbf4; color: #047857; }
.pill.draft { background: #fff8ec; color: #92610a; }
.pill.archived { background: #f0f3f9; color: #6e80a1; }
.icon-btn { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer;
  font: 600 .8rem var(--font); color: var(--ink); }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn.danger:hover { border-color: #d64545; color: #d64545; }
.admin-form h2 { font-size: 1.05rem; margin: 30px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.admin-form h2:first-child { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 500; margin: 10px 0; }
.check-row input { width: 17px; height: 17px; accent-color: var(--brand); }

.mod-block { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcff; margin-bottom: 14px; overflow: hidden; }
.mod-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #f2f5fc; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mod-head input { flex: 1; min-width: 160px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 8px; font: 600 .92rem var(--font); }
.lesson-line { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.lesson-line:last-child { border-bottom: 0; }
.lesson-line input[type="text"] { flex: 1; min-width: 140px; padding: 7px 11px; border: 1.5px solid var(--line); border-radius: 8px; font: .88rem var(--font); }
.lesson-line input.min-in { width: 64px; flex: 0 0 auto; padding: 7px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: .88rem var(--font); }
.q-block { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcff; padding: 16px; margin-bottom: 12px; }
.q-block textarea { width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; font: .9rem var(--font); resize: vertical; }
.q-block .opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.q-block .opt-grid input { padding: 8px 11px; border: 1.5px solid var(--line); border-radius: 8px; font: .86rem var(--font); width: 100%; }
.q-meta-row { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.q-meta-row select { padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; font: .85rem var(--font); background: #fff; }
.save-bar { position: sticky; bottom: 0; background: rgba(246,248,252,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line);
  padding: 14px 0; margin-top: 30px; display: flex; gap: 10px; align-items: center; }

/* admin login */
.admin-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(700px 400px at 70% 10%, rgba(79,70,229,.4), transparent 60%), var(--navy); padding: 22px; }
.admin-login-page .form-card { width: 100%; max-width: 420px; }
.admin-badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--engineering); background: rgba(234,138,0,.12); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: #9fb0c9; margin-top: 70px; padding: 54px 0 30px; }
.footer-capture { margin-bottom: 44px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; }
.footer-brand p { color: #8296b3; font-size: .9rem; margin-top: 14px; max-width: 340px; }
.footer .logo { color: #fff; }
.footer .logo-mark { color: var(--accent); }
.footer-col h4 { color: #fff; font-size: .86rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; color: #9fb0c9; font-size: .92rem; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 40px; padding-top: 22px; font-size: .82rem; color: #6e80a1; flex-wrap: wrap; }
.footer-build { margin: 10px 0 0; font-size: .75rem; color: #8296b3; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy); color: #fff;
  padding: 13px 22px; border-radius: 12px; font-size: .92rem; font-weight: 500; box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 100; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- filters (catalogue) ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 26px 0 30px; }
.filter-bar input[type="search"] { flex: 1; min-width: 220px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.filter-bar input[type="search"]:focus { border-color: var(--brand); outline: none; }
.fpill { border: 1.5px solid var(--line); background: #fff; color: var(--muted); font: 600 .86rem var(--font);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.fpill:hover { border-color: var(--brand); color: var(--brand); }
.fpill.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-bar select { padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.result-count { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .course-hero-inner { grid-template-columns: 1fr; }
  .buy-card { position: static; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: block; margin-left: auto; }
  .nav-cta { margin-left: 0; }
  body.nav-open .nav-links { display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 22px 20px; box-shadow: var(--shadow-lift); }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-side { position: static; max-height: none; order: 2; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-side .as-foot { margin-top: 0; border: 0; padding: 0; }
  .admin-main { padding: 24px 20px 60px; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr; }
  .keyterms { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 60px 0 50px; }
  .hero-stats { gap: 24px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .email-capture { padding: 24px; }
  .nav-cta .btn-ghost { display: none; }
}

/* ============================================================
   DEVELOPMENT PACKAGE 001: onboarding, guide, pathway, review
   (additive styles only; uses the existing design tokens)
   ============================================================ */

/* onboarding choice cards */
.onb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.onb-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow); color: var(--ink); transition: transform .14s ease, box-shadow .14s ease; }
.onb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.onb-card h3 { margin-bottom: 6px; }
.onb-card p { font-size: .92rem; margin-bottom: 14px; }
.onb-ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 16px; }

/* academy guide flow */
.guide-wrap { max-width: 660px; margin: 44px auto 90px; padding: 0 22px; }
.g-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.g-dots i { flex: 1; height: 5px; border-radius: 99px; background: #e4e9f4; }
.g-dots i.on { background: var(--brand); }
.g-dots i.half { background: #b9c2f5; }
.g-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.g-kicker { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.g-card h2 { font-size: 1.35rem; margin-bottom: 8px; }
.g-note { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.g-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.g-opt { width: 100%; text-align: left; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; font: 500 .95rem var(--font); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s; }
.g-opt:hover { border-color: var(--brand); background: #fafbff; }
.g-opt.sel { border-color: var(--brand); background: #eef0ff; font-weight: 600; }
.g-multi { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.g-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }

/* pathway steps */
.path-steps { display: flex; flex-direction: column; gap: 10px; }
.path-step { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 16px; }
.path-step.future { background: #f8fafd; border-style: dashed; }
.ps-num { width: 34px; height: 34px; border-radius: 50%; background: #eef0ff; color: var(--brand);
  font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ps-num.done { background: rgba(14,159,110,.14); color: var(--mathematics); }
.ps-num.now { background: var(--brand); color: #fff; }
.ps-num.future { background: #f0f3f9; color: #9aa8c0; }
.ps-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1; flex-wrap: wrap; }
.ps-body a { color: var(--ink); }
.ps-body a:hover b { color: var(--brand); }
.ps-state { font-size: .76rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: #eef0ff; color: var(--brand); }
.ps-state.done { background: #eefbf4; color: #047857; }
.ps-state.ready { background: #eef0ff; color: var(--brand-deep); }
.ps-state.now { background: #eef0ff; color: var(--brand-deep); }
.ps-state.future { background: #f0f3f9; color: #6e80a1; }

/* dashboard: next step + review today */
.next-step-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(120deg, #eef0ff, #e6fbff); border: 1px solid #dfe3fb; border-radius: var(--radius); padding: 24px 28px; }
.next-step-card h3 { margin-bottom: 4px; }
.next-step-card p { font-size: .92rem; max-width: 520px; }
.review-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 13px 18px; margin-bottom: 8px; flex-wrap: wrap; }
.review-row b { font-size: .95rem; }
.rv-meta { color: var(--muted); font-size: .84rem; }
.review-row .btn { margin-left: auto; }

@media (max-width: 860px) {
  .onb-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   DEVELOPMENT PACKAGE 002: rich subject landing pages
   (additive styles only; existing design tokens)
   ============================================================ */
.concept-card { border-left: 4px solid var(--line); padding: 22px 24px; }
.concept-card h3 { font-size: 1.02rem; }
.concept-card.cat-science { border-left-color: var(--science); }
.concept-card.cat-technology { border-left-color: var(--technology); }
.concept-card.cat-engineering { border-left-color: var(--engineering); }
.concept-card.cat-mathematics { border-left-color: var(--mathematics); }

.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.app-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 14px; text-align: center; font-weight: 600; font-size: .9rem; color: var(--ink);
  box-shadow: var(--shadow); border-bottom: 3px solid var(--line); }
.app-tile.cat-science { border-bottom-color: var(--science); }
.app-tile.cat-technology { border-bottom-color: var(--technology); }
.app-tile.cat-engineering { border-bottom-color: var(--engineering); }
.app-tile.cat-mathematics { border-bottom-color: var(--mathematics); }

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

/* ============================================================
   DEVELOPMENT PACKAGE 003: courses-first subject pages,
   feedback components and interest capture (additive only)
   ============================================================ */
.start-strip { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.start-strip.cat-science { border-left-color: var(--science); }
.start-strip.cat-technology { border-left-color: var(--technology); }
.start-strip.cat-engineering { border-left-color: var(--engineering); }
.start-strip.cat-mathematics { border-left-color: var(--mathematics); }
.start-strip .ss-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 2px; }
.start-strip b { font-size: 1.04rem; }
.start-strip p { font-size: .88rem; margin-top: 4px; max-width: 640px; }

.acc-pad { padding: 20px 22px; }
.acc-pad .card { border: 1px solid var(--line); }

.fb-box { background: #f8fafd; border: 1px dashed #cdd8ea; border-radius: var(--radius); padding: 18px 20px; margin: 26px 0 4px; }
.fb-q { font-weight: 600; color: var(--ink); font-size: .95rem; margin-bottom: 10px; }
.fb-opts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   DEVELOPMENT PACKAGE 004: Programming Lab (additive only)
   ============================================================ */
.lab-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; margin: 18px 0 26px; box-shadow: var(--shadow); border-top: 4px solid var(--technology); }
.lab-block.passed { border-top-color: var(--mathematics); }
.lab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.lab-head h3 { font-size: 1.1rem; }
.lab-badge { font-size: .78rem; font-weight: 800; color: #047857; background: #eefbf4; border: 1px solid #c8ecd9;
  padding: 4px 13px; border-radius: 999px; white-space: nowrap; }
.lab-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.lab-tag { font-size: .72rem; font-weight: 600; color: var(--muted); background: #f2f5fb; border-radius: 999px; padding: 3px 10px; }
.lab-instructions { font-size: .95rem; color: #3c4b63; margin-bottom: 14px; }
.lab-editor { border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.lab-editor .CodeMirror { height: auto; min-height: 150px; font: .88rem/1.6 var(--mono); padding: 6px 0; }
.lab-ta { width: 100%; min-height: 170px; border: 0; padding: 14px 16px; font: .88rem/1.6 var(--mono);
  color: var(--ink); background: #fbfcff; resize: vertical; display: block; }
.lab-ta:focus { outline: none; }
.lab-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lab-attempts { margin-left: auto; font-size: .8rem; color: var(--muted); }
.lab-status { font-size: .85rem; color: var(--muted); background: #f2f5fb; border: 1px dashed #c9d4e8;
  border-radius: 8px; padding: 9px 13px; margin-top: 10px; }
.lab-console { background: #0d1526; border-radius: 10px; margin-top: 12px; overflow: hidden; }
.lab-console .lc-label { font: 600 .72rem var(--mono); color: #8fa0bb; padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,.08);
  letter-spacing: .08em; text-transform: uppercase; }
.lab-console pre { padding: 12px 16px; font: .86rem/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; margin: 0; }
.lc-out { color: #d7e4f7; }
.lc-err { color: #ff9d9d; }
.lc-muted { color: #6e80a1; }
.lab-tests { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.lab-test { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }
.lab-test .lt-dot { width: 10px; height: 10px; border-radius: 50%; background: #cfd9ea; flex-shrink: 0; }
.lab-test.ok { color: #047857; font-weight: 600; }
.lab-test.ok .lt-dot { background: var(--mathematics); }
.lab-test.no { color: #b02a2a; font-weight: 600; }
.lab-test.no .lt-dot { background: #d64545; }
.lab-feedback { margin-top: 14px; border-radius: 10px; padding: 14px 18px; font-size: .92rem; }
.lab-feedback.ok { background: #eefbf4; border: 1px solid #c8ecd9; color: #065f46; }
.lab-feedback.no { background: #fff8ec; border: 1px solid #f3e2bf; color: #6b4e0c; }
.lab-hint { margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--engineering); }
.lab-solution { margin-top: 8px; padding: 10px 12px; background: #fff; border-radius: 8px; border: 1px solid var(--line); color: #3c4b63; }
.lab-note { font-size: .8rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 620px) { .lab-block { padding: 18px; } .lab-attempts { margin-left: 0; width: 100%; } }

/* Package 005: Programming Lab stabilisation */
.pill.info { background: #eef0ff; color: #4338ca; }
.pill.viewed { background: #f3efff; color: #6d28d9; }
.lab-state { white-space: nowrap; align-self: flex-start; }
.lab-goal { font-size: .9rem; font-weight: 600; color: var(--ink); background: #f8fafd;
  border: 1px dashed #cdd8ea; border-radius: 8px; padding: 9px 13px; margin-bottom: 14px; }

/* Package 007: Module 1 content pass */
.callout.warn { background: #fdf3f3; border-color: #f3d2d2; }
.callout.warn h3 { color: #9b2c2c; }

/* ============================================================
   PACKAGE 008: lesson readability and hierarchy pass
   Restyles existing lesson classes so content reads as one
   flowing lesson. Cascade overrides only; nothing removed.
   ============================================================ */

/* compact learning objectives strip */
.lesson-main .objectives { padding: 14px 18px; margin-bottom: 22px; border: 0; border-left: 4px solid var(--brand); background: #f5f6ff; border-radius: var(--radius-sm); }
.lesson-main .objectives h3 { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-deep); margin-bottom: 6px; }
.lesson-main .objectives li { font-size: .9rem; padding: 2px 0; }

/* quiet subheadings inside the lesson flow */
.lm-sub { font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 28px 0 8px; }

/* key terms: flowing definition list instead of cards */
.lesson-main .keyterms { display: block; margin: 8px 0 24px; border-top: 1px solid var(--line); }
.lesson-main .keyterm { display: flex; gap: 16px; align-items: baseline; padding: 9px 2px; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.lesson-main .keyterm b { flex: 0 0 190px; font-size: .9rem; color: var(--brand-deep); }
.lesson-main .keyterm span { font-size: .9rem; }
@media (max-width: 620px) { .lesson-main .keyterm { flex-direction: column; gap: 2px; } .lesson-main .keyterm b { flex: none; } }

/* worked examples and guided tasks: part of the flow, subtle accent */
.lesson-main .worked { background: transparent; border: 0; border-left: 3px solid var(--brand); border-radius: 0; padding: 2px 0 2px 18px; margin: 24px 0; box-shadow: none; }
.lesson-main .worked h3 { font-size: .95rem; margin-bottom: 8px; }
.lesson-main .worked li { font-size: .93rem; padding: 4px 0; }

/* callouts: slim accent strips, not heavy cards */
.lesson-main .callout { background: #fffdf6; border: 0; border-left: 4px solid var(--engineering); border-radius: var(--radius-sm); padding: 14px 18px; margin: 24px 0; }
.lesson-main .callout h3 { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.lesson-main .callout p { font-size: .92rem; }
.lesson-main .callout.warn { background: #fef7f7; border-left-color: #d64545; }

/* quiet inline practice link replaces the old coloured box */
.lm-more { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

/* interactive knowledge check stays a distinct card, slightly calmer */
.lesson-main .practice { box-shadow: var(--shadow); }
.lesson-main .practice[data-lesson-check] h3 { color: var(--brand-deep); }

/* ============================================================
   PACKAGE 009: accessibility and linear lesson flow
   ============================================================ */
/* compact key terms as single definition lines */
.lesson-main .kt-line { font-size: .9rem; color: var(--muted); padding: 7px 2px; margin: 0; border-bottom: 1px solid var(--line); }
.lesson-main .kt-line b { color: var(--brand-deep); font-weight: 600; }

/* calm collapsible support content */
.lm-details { margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.lm-details summary { padding: 12px 16px; font-weight: 600; font-size: .92rem; color: var(--ink); cursor: pointer; }
.lm-details summary:hover { color: var(--brand); }
.lm-details .ld-body { padding: 0 16px 14px; }
.lm-details .ld-body p { font-size: .92rem; color: #3c4b63; margin-bottom: 8px; }
.lm-details.warn { border-left: 4px solid #d64545; }
.lm-details.warn summary { color: #9b2c2c; }
.lm-details.warn[open] { background: #fef9f9; }

/* where this is used: quiet end note */
.lm-practical { font-size: .93rem; color: var(--muted); max-width: 700px; margin-bottom: 4px; }

/* steadier rhythm for the linear path */
.lesson-main .lm-sub { margin-top: 32px; }
.lesson-main .body-text p { max-width: 700px; }

/* ============ Foundation Mathematics: workbook practice blocks ============ */
.w-problem { font-weight: 600; color: var(--ink); margin: 2px 0 10px; }
.w-answer { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.w-note { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.mp-block { border: 1px solid var(--line); border-left: 3px solid var(--mathematics); border-radius: 12px; padding: 18px 20px; margin: 14px 0; background: #fff; }
.mp-block.passed { background: #f6fbf8; }
.mp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.mp-prompt { font-weight: 600; color: var(--ink); margin: 4px 0 12px; }
.mp-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mp-input { flex: 0 1 220px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font: 1rem/1.4 var(--mono); background: #fcfdff; }
.mp-input:focus { outline: 2px solid var(--mathematics); outline-offset: 1px; border-color: var(--mathematics); }
.mp-fb { margin-top: 12px; border-radius: 9px; padding: 12px 14px; font-size: .92rem; }
.mp-fb.ok { background: rgba(14,159,110,.08); border: 1px solid rgba(14,159,110,.25); }
.mp-fb.no { background: #fbf9f2; border: 1px solid #ece4cf; }
.mp-hint { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.mp-opts { margin-top: 4px; }
.mp-graph { display: block; max-width: 300px; margin: 4px 0 10px; background: #fcfdff; border: 1px solid var(--line); border-radius: 10px; }

/* ============ PACKAGE 014: maths visual learning blocks ============ */
.mv-figure { margin: 14px 0 18px; }
.mv-svg { display: block; max-width: 360px; background: #fcfdff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.mv-caption { font-size: .84rem; color: var(--muted); margin-top: 6px; }
.eq-block { border: 1px solid var(--line); border-left: 3px solid var(--mathematics); border-radius: 10px; background: #fcfdff; padding: 14px 18px; max-width: 420px; }
.eq-main { font: 600 1.12rem/1.7 var(--mono); color: var(--ink); }
.eq-sub { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.ld-block { border: 1px solid var(--line); border-radius: 10px; background: #fcfdff; padding: 12px 18px; max-width: 250px; }
.ld-rung { font: 600 1rem var(--mono); color: var(--ink); padding: 3px 0; }
.ld-step { display: flex; gap: 18px; font-size: .82rem; color: var(--mathematics); font-weight: 600; padding-left: 10px; }
.ld-step .ld-up { color: var(--muted); font-weight: 500; }
.bal-block { display: flex; align-items: center; gap: 12px; max-width: 420px; }
.bal-pan { flex: 1; border: 1.5px solid var(--mathematics); border-radius: 10px; background: #fcfdff; padding: 12px 14px; text-align: center; font: 600 1.05rem var(--mono); color: var(--ink); }
.bal-pivot { font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.bal-move { font-size: .84rem; color: var(--mathematics); font-weight: 600; margin-top: 6px; text-align: center; max-width: 420px; }

/* ============ PACKAGE 015: Physics Lab ============ */
:root { --science: #7c5cd6; }
.pl-formula { border: 1px solid var(--line); border-left: 3px solid var(--science); border-radius: 10px; background: #fcfdff; padding: 12px 16px; margin: 4px 0 12px; max-width: 420px; }
.pl-eq { font: 600 1.1rem/1.6 var(--mono); color: var(--ink); }
.pl-plain { font-size: .84rem; color: var(--muted); margin-top: 3px; }
.pl-given { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chip { font: 600 .82rem var(--mono); background: #f2f0fb; color: var(--ink); border: 1px solid #e2ddf5; border-radius: 999px; padding: 2px 10px; }
.pl-slider-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; max-width: 420px; }
.pl-slider-name { font: 600 .88rem var(--mono); color: var(--ink); min-width: 84px; }
.pl-slider-row input[type=range] { flex: 1; accent-color: var(--science); }
.pl-slider-val { font: 600 .88rem var(--mono); color: var(--science); min-width: 44px; text-align: right; }
.pl-result { margin-top: 10px; }
.pl-result [data-out] { font: 700 1rem var(--mono); color: var(--ink); }
.pl-bar-wrap { height: 10px; background: #eef1f6; border-radius: 999px; margin-top: 6px; max-width: 420px; overflow: hidden; }
.pl-bar { height: 100%; background: var(--science); border-radius: 999px; transition: width .15s ease; }
.build-tag { font-size: .72rem; color: var(--muted); opacity: .7; margin-top: 6px; }

/* ---------- Spreadsheet Lab (Package 017) ---------- */
.sl-grid { border-collapse: collapse; margin: 10px 0; font-size: 0.85rem; }
.sl-grid th { background: #eef1f6; color: #5b6474; font-weight: 600; padding: 4px 10px; border: 1px solid #cfd6e2; min-width: 34px; text-align: center; }
.sl-grid td { border: 1px solid #cfd6e2; padding: 4px 10px; background: #fff; min-width: 58px; text-align: right; }
.sl-grid td.sl-sel { outline: 2px solid var(--technology, #2f6fd6); outline-offset: -2px; }
.sl-grid td.sl-target { background: #fdf6e3; color: #b58900; font-weight: 700; text-align: center; }
.sl-grid td.sl-flag { background: #fdecea; }
.sl-grid td.sl-done { background: #e8f5ec; color: #1c7c3c; font-weight: 600; }
.sl-bar { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.sl-bar-cell { background: #eef1f6; border: 1px solid #cfd6e2; padding: 4px 10px; font-weight: 700; font-size: 0.85rem; border-radius: 4px; }
.sl-input { flex: 1; font-family: ui-monospace, monospace; font-size: 0.9rem; padding: 6px 10px; border: 1px solid #cfd6e2; border-radius: 4px; }
.sl-bar-formula { font-family: ui-monospace, monospace; font-size: 0.9rem; }
.sl-note { font-size: 0.8rem; color: #5b6474; margin-top: 4px; }
.sl-feedback { margin-top: 8px; }
.sl-hintrow { margin-top: 6px; }
.sl-formula { font-family: ui-monospace, monospace; text-align: left !important; }
.sl-abs { color: #b5127a; }
.sl-pivot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sl-pivot-arrow { font-size: 1.5rem; color: #5b6474; }
.sl-note-wide { flex-basis: 100%; }
.sl-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sl-card { border: 1px solid #cfd6e2; border-radius: 8px; padding: 10px 16px; background: #fff; text-align: center; }
.sl-card-value { font-size: 1.3rem; font-weight: 700; }
.sl-card-label { font-size: 0.75rem; color: #5b6474; }

.sl-rel-key { background: #fdf6e3 !important; color: #b58900 !important; }
.sl-rel-link { font-size: 1rem; letter-spacing: -1px; }
.sl-rel-one, .sl-rel-many { font-weight: 700; color: #2f6fd6; padding: 0 3px; }
.sl-codebox { font-family: ui-monospace, monospace; font-size: 0.82rem; background: #1c2536; color: #e8ecf4; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.sl-code-title { color: #9fb3d9; margin-bottom: 6px; font-weight: 600; }
.sl-code-line { white-space: pre-wrap; }
.sl-code-num { display: inline-block; width: 22px; color: #5b6a8a; user-select: none; }

/* ---------- CNC Code Lab (Package 018) ---------- */
.cnc-editor textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 0.85rem; border: 1px solid #cfd6e2; border-radius: 6px; padding: 8px 10px; background: #fcfdff; }
.cnc-btns { display: flex; gap: 10px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.cnc-modal { font-size: 0.78rem; color: #5b6474; background: #eef1f6; border-radius: 6px; padding: 6px 10px; margin: 8px 0; }
.cnc-warn { font-size: 0.8rem; background: #fdf6e3; border: 1px solid #e2c96f; border-radius: 6px; padding: 8px 12px; margin: 8px 0; }
.cnc-warn ul { margin: 4px 0 0 18px; }
.cnc-code { margin-top: 8px; }
.cnc-path { background: #fff; border: 1px solid #eef1f6; border-radius: 6px; }


/* ============ Package 020: private beta states ============ */
.chip-beta { background: #e7f6ec; color: #1c7c3c; border: 1px solid #b7e0c4; }
.chip-soon { background: #fdf2e3; color: #a05c12; border: 1px solid #ecd3ae; }
.chip-lab { background: #eef1fb; color: #3f4d8f; border: 1px solid #cdd6f2; }
.cc-coming-soon { opacity: .92; }
.cc-coming-soon .cc-band { opacity: .45; }
.cc-soon-cta { color: #a05c12; font-weight: 600; }
.beta-note { margin-top: 12px; font-size: .86rem; color: #ffe9c9; background: rgba(0,0,0,.22); border-left: 3px solid #e8b36a; padding: 8px 12px; border-radius: 6px; max-width: 620px; }


/* ============ Package 020: homepage interaction (motion-safe) ============ */
.hero-rotor { margin: 6px 0 10px; min-height: 1.6em; }
.rotor-word { display: inline-block; font-size: 1.25rem; font-weight: 700; color: var(--accent, #8ea2ff); transition: opacity .4s ease, transform .4s ease; }
.rotor-out { opacity: 0; transform: translateY(6px); }

.pathway-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.pathway-tab { border: 1.5px solid var(--line); background: var(--card, #fff); border-radius: 999px; padding: 10px 18px; font: 600 .92rem var(--font); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.pathway-tab:hover { transform: translateY(-2px); border-color: var(--accent); }
.pathway-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pathway-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pathway-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 26px; align-items: start; }
.pathway-side { background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
@media (max-width: 860px) { .pathway-grid { grid-template-columns: 1fr; } }

.lab-card { display: flex; flex-direction: column; gap: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.lab-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(20, 30, 60, .10); }
.lab-card .meta { margin-top: auto; font-weight: 600; }
.lab-prev { border-radius: 10px; border: 1px solid var(--line); background: #f7f9fd; min-height: 74px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 3px; overflow: hidden; }
.lp-code { background: #1c2536; color: #cfe3ff; font: 600 .8rem var(--mono, monospace); }
.lp-cursor { animation: lpBlink 1.1s steps(1) infinite; }
@keyframes lpBlink { 50% { opacity: 0; } }
.lp-graph { flex-direction: row; align-items: flex-end; gap: 7px; padding-bottom: 8px; }
.lp-graph i { width: 16%; background: linear-gradient(180deg, #7d8ff2, #4f46e5); border-radius: 4px 4px 0 0; animation: lpGrow .9s ease both; }
.lp-graph i:nth-child(2) { animation-delay: .12s } .lp-graph i:nth-child(3) { animation-delay: .24s } .lp-graph i:nth-child(4) { animation-delay: .36s } .lp-graph i:nth-child(5) { animation-delay: .48s }
@keyframes lpGrow { from { transform: scaleY(0); transform-origin: bottom } }
.lp-formula { font: 600 .95rem var(--font); color: var(--ink); } .lp-formula .lp-dim { color: var(--muted); font-size: .85rem; }
.lp-circuit { flex-direction: row; align-items: center; gap: 8px; }
.lp-wire { flex: 1; height: 3px; background: #5b6474; border-radius: 2px; }
.lp-led { width: 16px; height: 16px; border-radius: 50%; background: #e5533c; box-shadow: 0 0 10px rgba(229, 83, 60, .8); animation: lpPulse 2.2s ease-in-out infinite; }
@keyframes lpPulse { 50% { box-shadow: 0 0 3px rgba(229, 83, 60, .35); } }
.lp-grid { font: 600 .85rem var(--mono, monospace); color: #1c7c3c; } .lp-grid i:first-child { color: #3f4d8f; font-style: normal } .lp-grid i { font-style: normal }
.lp-toolpath svg { width: 100%; height: 56px; }
.lp-path { stroke: #c96f2f; stroke-width: 2.5; stroke-dasharray: 160; stroke-dashoffset: 160; animation: lpDraw 2.6s ease forwards infinite alternate; }
@keyframes lpDraw { to { stroke-dashoffset: 0; } }

.rise-in { animation: riseIn .5s ease both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } }

/* motion safety: one switch calms everything (Package 020, Stage 14) */
@media (prefers-reduced-motion: reduce) {
  .rotor-word, .pathway-tab, .lab-card { transition: none; }
  .rise-in, .lp-graph i, .lp-cursor, .lp-led, .lp-path { animation: none; }
  .lp-path { stroke-dashoffset: 0; }
  .lp-graph i { transform: none; }
}

/* 020 admin beta dashboard helpers */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.admin-cols ul { padding-left: 18px; font-size: .92rem; } .admin-cols li { margin-bottom: 7px; }
.admin-sub { color: var(--muted); margin: 6px 0 14px; max-width: 720px; }
@media (max-width: 860px) { .admin-cols { grid-template-columns: 1fr; } }


/* ============ Package 020B: header cleanup ============ */
.nav-dd { position: relative; }
.nav-dd summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: 8px; font: 500 .95rem var(--font); color: inherit; display: inline-flex; align-items: center; gap: 5px; }
.nav-dd summary::-webkit-details-marker { display: none; }
.nav-dd summary::after { content: "▾"; font-size: .7em; opacity: .7; }
.nav-dd summary:hover, .nav-dd summary.active { color: var(--accent); }
.nav-dd summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-dd[open] > summary::after { content: "▴"; }
.nav-dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(20,30,60,.14); padding: 8px; display: flex; flex-direction: column; z-index: 60; }
.nav-dd-menu a, .nav-dd-btn { padding: 9px 12px; border-radius: 8px; font: 500 .92rem var(--font); color: var(--ink); text-align: left; background: none; border: 0; cursor: pointer; text-decoration: none; }
.nav-dd-menu a:hover, .nav-dd-btn:hover { background: #f2f5fb; color: var(--accent); }
.nav-dd-right { left: auto; right: 0; }
.nav-account summary { border: 1.5px solid var(--line); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
@media (max-width: 860px) {
  .nav-dd-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; }
}


/* 020B: integrated hero beta flag + pathway alignment */
.beta-flag { display: inline-block; margin-left: 12px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.85); vertical-align: middle; }
.pw-h { margin: 0 0 14px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pw-sub { margin: 0 0 8px; font-size: .95rem; font-weight: 700; color: var(--ink); }
.pathway-grid { align-items: start; }

/* 020B: catalogue split */
.cat-split { margin-bottom: 38px; }
.cat-split-h { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; margin: 26px 0 16px; }


/* 020C: nav baseline alignment + dropdown group labels */
.nav-links { align-items: center; }
.nav-dd { display: flex; align-items: center; }
.nav-dd summary { padding: 8px 11px; font-size: .93rem; font-weight: 500; color: var(--muted); line-height: 1.4; }
.nav-dd summary:hover { color: var(--ink); background: #eef2fb; border-radius: 8px; }
.nav-dd summary.active { color: var(--brand); font-weight: 600; }
.nav-dd-label { display: block; padding: 8px 12px 2px; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.nav-dd-label + .nav-dd-label, .nav-dd-menu a + .nav-dd-label { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.nav-account summary { color: var(--ink); }

/* 023: maths rebuild block styles */
.mb-sort-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.mb-sort-val { font-weight: 700; min-width: 84px; font-family: var(--mono, monospace); }
.mb-step-pool { display: flex; gap: 6px; flex-wrap: wrap; }
.mb-keys { display: flex; flex-direction: column; gap: 8px; }
.mb-keyopt { text-align: left; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: .95rem; }
.mb-keyopt:hover { border-color: var(--accent); }
.mb-keyopt.on { border-color: var(--brand); background: #eef0ff; }
.mb-keyopt:focus-visible, .mb-sort-row .fpill:focus-visible, .mb-step-pool .fpill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mb-sform { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mb-sform input, .mb-est input, .mb-part input { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; font: .95rem var(--font); }
.mb-sf-x { font-weight: 700; }
.mb-est { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mb-part { margin-bottom: 8px; }
.mp-pass { color: #1c7c3c; }

/* 024A: the STEM Academy signature */
.footer-sig { border-left: 3px solid var(--brand, #4f46e5); padding-left: 12px; margin: 10px 0 12px; font-size: .95rem; font-weight: 600; color: #dbe3f5; font-style: italic; }

/* 024B: foundational block styles */
.mb-pv-cols { display: flex; gap: 8px; margin-bottom: 10px; }
.mb-pv-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mb-pv-name { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mb-pv-slot { width: 40px; height: 46px; border: 2px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; font: 700 1.3rem var(--mono, monospace); cursor: pointer; }
.mb-pv-slot.on { border-color: var(--brand); border-style: solid; }
.mb-pv-slot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mb-pv-digits { display: flex; gap: 5px; flex-wrap: wrap; }
.mb-cmp { display: flex; align-items: center; gap: 10px; font: 700 1.2rem var(--mono, monospace); }
.mb-cmp-sym { font-size: 1.1rem; min-width: 44px; }
.mb-arr-ctl { display: flex; gap: 18px; margin-bottom: 10px; }
.mb-arr-row { display: flex; gap: 5px; margin-bottom: 5px; }
.mb-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--mathematics, #0e9f6e); opacity: .85; }
.pv-table { border-collapse: collapse; } .pv-table th, .pv-table td { border: 1px solid var(--line); padding: 6px 12px; text-align: center; }
.pv-table th { font-size: .7rem; text-transform: uppercase; color: var(--muted); }
.pv-digit { font: 700 1.25rem var(--mono, monospace); } .pv-worth { font-size: .8rem; color: var(--muted); }
.cc-calc { font: 600 1.15rem var(--mono, monospace); display: inline-block; }
.cc-carry { color: #c96f2f; font-size: .85rem; } .cc-rule { border-top: 2px solid var(--ink); margin: 3px 0; }

/* 026: refresher in-lesson section index + trig/power explorer bits */
.lm-secnav{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 6px}
.lm-secnav a{font-size:.82rem;padding:5px 11px;border:1px solid var(--line,#d7deea);border-radius:999px;color:var(--muted);text-decoration:none}
.lm-secnav a:hover,.lm-secnav a:focus-visible{color:var(--ink);border-color:var(--mathematics)}
.mb-pr label,.mb-eg label,.mb-rt label,.mb-as label,.mb-tg label{font-size:.9rem;margin-right:10px}
.mb-keys .mb-keyopt.on,.mb-sp .mb-keyopt.on{outline:2px solid var(--mathematics)}
