[hidden] { display: none !important; }
:root {
  /* the Draw and Learn look: cream paper, purple, deep indigo titles, orange and green accents */
  --bg: #FBF7EF; --card: #FFFFFF; --ink: #2B1F57; --muted: #5D5470; --line: #ECE3D2;
  --navy: #3E2A78; --teal: #6A3DE8; --orange: #FF7043; --green: #2E9E5B; --red: #B3261E; --purple: #6A3DE8;
  --tint-navy: #EDE6FF; --tint-teal: #EDE6FF; --tint-orange: #FFE9E1; --tint-green: #E3F4EA; --tint-red: #FBE3E1;
  --accent: var(--teal); --shadow: 0 1px 3px rgba(62, 42, 120, .12), 0 8px 24px rgba(62, 42, 120, .08);
  --radius: 20px; --font: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --display: Fredoka, Roboto, sans-serif; --read: Roboto, system-ui, sans-serif;
  --top-h: 110px;   /* height of the sticky top bar (logo + menu row, then the search row); sticky bars sit below it */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17122B; --card: #211A3B; --ink: #EEEAF8; --muted: #B5AECB; --line: #352C57;
    --navy: #CDBDFF; --teal: #A88BFF; --orange: #FF9A76; --green: #6FD39A; --red: #F28B82; --purple: #A88BFF;
    --tint-navy: #2B2250; --tint-teal: #2B2250; --tint-orange: #3A2620; --tint-green: #1D3326; --tint-red: #3A1F1E;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
    --bg: #17122B; --card: #211A3B; --ink: #EEEAF8; --muted: #B5AECB; --line: #352C57;
    --navy: #CDBDFF; --teal: #A88BFF; --orange: #FF9A76; --green: #6FD39A; --red: #F28B82; --purple: #A88BFF;
    --tint-navy: #2B2250; --tint-teal: #2B2250; --tint-orange: #3A2620; --tint-green: #1D3326; --tint-red: #3A1F1E;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--teal); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px max(16px, calc((100% - 1100px) / 2)); background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; white-space: nowrap; }
.brand b { color: var(--teal); }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.topbar nav a:hover { background: var(--bg); color: var(--ink); }
.icon-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 36px; height: 36px;
  border-radius: 10px; cursor: pointer; font-size: 18px; }
@media (max-width: 560px) { .brand span { display: none; } .topbar nav a { padding: 6px 7px; font-size: 14px; } }

main:focus, main:focus-visible { outline: none; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
.loading { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* home */
.hero { padding: 36px 28px; background: linear-gradient(135deg, #1F3A5F, #12243D); color: #fff; border-radius: var(--radius);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; margin: 0 0 6px; }
.hero .sub { color: #7FD0D5; font-size: 20px; margin: 0 0 12px; }
.hero p { color: #D5DEE9; margin: 0 0 20px; }
.hero img { background: #fff; border-radius: 12px; padding: 8px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding: 26px 18px; } }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: 16px/1.4 var(--font);
  font-weight: 600; background: var(--orange); color: #fff; padding: 11px 18px; border-radius: 10px; }
.btn.secondary { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn.ghost { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 8px; }
.stats div { padding: 14px; text-align: center; }
.stats b { display: block; font-size: 26px; color: var(--teal); }
.stats span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

h2.section { margin: 30px 0 12px; font-size: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.chapter-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; color: inherit; text-decoration: none; transition: transform .15s; }
.chapter-card:hover { transform: translateY(-2px); border-color: var(--teal); }
.chapter-card .ch-thumb { display: block; margin: -16px -16px 4px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; background: var(--tint-navy); }
.chapter-card .ch-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ch-banner { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); margin: 4px 0 16px; }
.chapter-card .num { font-size: 13px; font-weight: 700; color: var(--teal); letter-spacing: .06em; }
.chapter-card h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.chapter-card p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: auto; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.badges span { background: var(--bg); border: 1px solid var(--line); padding: 2px 8px; border-radius: 20px; }
.badges .done { color: var(--green); border-color: var(--green); }

/* chapter */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.chapter-head h1 { margin: 2px 0 6px; font-size: clamp(26px, 4vw, 36px); line-height: 1.15; }
.chapter-head .kicker { color: var(--teal); font-weight: 700; font-size: 14px; letter-spacing: .08em; }
.chapter-head .intro { color: var(--muted); font-family: var(--read); font-style: italic; font-size: 18px; max-width: 760px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 18px 0 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a.on { color: var(--ink); border-color: var(--orange); }

.reading { max-width: 760px; font-family: var(--read); font-size: 18px; line-height: 1.7; }
.reading h3 { font-family: var(--font); color: var(--navy); font-size: 21px; margin: 28px 0 8px; }
.reading li { margin: 4px 0; }
.reading figure { margin: 22px 0; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.reading figure img { display: block; width: 100%; }
.reading figcaption { font: italic 14px/1.4 var(--font); color: #56606C; margin: 8px 0 10px; }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font: 14px/1.4 var(--font); }
th { background: #1F3A5F; color: #fff; text-align: left; padding: 9px 10px; }
td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) td { background: var(--bg); }
pre { background: #F3F5F8; color: #1D2733; border-left: 4px solid var(--teal); padding: 14px; border-radius: 8px; overflow-x: auto; font-size: 13.5px; line-height: 1.5; }
.note { border-left: 5px solid var(--navy); background: var(--tint-navy); padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-size: 16.5px; }
.note strong { font: 700 13px var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--navy); }
.note p { margin: 4px 0 0; }
.note.tip { border-color: var(--teal); background: var(--tint-teal); } .note.tip strong { color: var(--teal); }
.note.warn { border-color: var(--orange); background: var(--tint-orange); } .note.warn strong { color: var(--orange); }
.note.try { border-color: var(--green); background: var(--tint-green); } .note.try strong { color: var(--green); }
.summary { padding: 16px 20px; margin: 26px 0; border-left: 5px solid var(--teal); }
.summary h3 { margin: 0 0 6px; font: 700 15px var(--font); color: var(--teal); text-transform: uppercase; letter-spacing: .05em; }
.next-step { margin-top: 26px; }

/* lesson list */
.lesson-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.lesson-tile { padding: 12px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; }
.lesson-tile .thumb { display: block; background: #fff; border-radius: 8px; border: 1px solid var(--line); aspect-ratio: 16 / 10; overflow: hidden; }
.lesson-tile .thumb img { width: 100%; height: auto; display: block; }   /* topic cards: show the top of the card, full width */
.lesson-tile.diagram .thumb { display: flex; align-items: center; }
.lesson-tile.diagram .thumb img { height: 100%; object-fit: contain; padding: 6px; }
.lesson-tile .thumb.broken { background: linear-gradient(135deg, #1F3A5F, #1E8C93); }
.lesson-tile .thumb.broken img { display: none; }
.lesson-tile em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); }
.lesson-tile.diagram em { color: var(--orange); }
.muted { color: var(--muted); font-size: 14px; }
.reading h3 .watch, .summary-title .watch { display: inline-flex; align-items: center; gap: 7px; font: 700 15px var(--font); letter-spacing: .02em; text-decoration: none;
  color: #fff; padding: 9px 20px 9px 9px; margin: 4px 0 4px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap;
  background: linear-gradient(180deg, #FF9A6E 0%, #FF7043 55%, #E85A2C 100%);
  box-shadow: 0 5px 0 #B8431D, 0 9px 16px rgba(184, 67, 29, .35), inset 0 2px 0 rgba(255, 255, 255, .45);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .2); transition: transform .12s, box-shadow .12s, filter .12s; }
.reading h3 .watch .ico, .summary-title .watch .ico { width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23E85A2C'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .2); }
.reading h3 .watch:hover, .summary-title .watch:hover { filter: brightness(1.06); transform: translateY(-2px);
  box-shadow: 0 7px 0 #B8431D, 0 12px 20px rgba(184, 67, 29, .4), inset 0 2px 0 rgba(255, 255, 255, .45); }
.reading h3 .watch:active, .summary-title .watch:active { transform: translateY(4px); box-shadow: 0 1px 0 #B8431D, 0 3px 6px rgba(184, 67, 29, .3), inset 0 2px 0 rgba(255, 255, 255, .35); }
.reading h3 .watch:focus-visible, .summary-title .watch:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.stage { max-height: 78vh; overflow-y: auto; }
.lesson-tile b { font-size: 15px; line-height: 1.3; }
.lesson-tile span { font-size: 13px; color: var(--muted); }

/* lesson player */
.player { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .player { grid-template-columns: 1fr; } }
.stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.stage svg { width: 100%; height: auto; display: block; }
.stage svg > * { transition: opacity .35s, filter .35s; }
.stage.focusing svg > *:not(.on):not(title) { opacity: .18; }
.stage svg > g.on { filter: drop-shadow(0 0 7px rgba(229, 138, 52, .95)); }
.stage svg > g.part { cursor: pointer; }
.stage svg > g.part:hover { filter: drop-shadow(0 0 4px rgba(30, 127, 134, .8)); }
.speech { margin-top: 12px; padding: 16px 18px; min-height: 92px; font-size: 19px; line-height: 1.5; font-family: var(--read); }
.speech small { display: block; font: 700 12px var(--font); color: var(--orange); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.controls { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.controls .play { width: 56px; height: 56px; border-radius: 50%; justify-content: center; font-size: 22px; padding: 0; }
.controls .count { color: var(--muted); font-size: 14px; min-width: 60px; text-align: center; }
.side { padding: 14px; }
.side h2 { font-size: 17px; margin: 0 0 8px; }
.transcript { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 470px; overflow-y: auto; }
.transcript button { width: 100%; text-align: left; background: none; border: 1px solid transparent; color: var(--ink); font: 14.5px/1.4 var(--font);
  padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.transcript button:hover { background: var(--bg); }
.transcript button.on { background: var(--tint-orange); border-color: var(--orange); }
.transcript button.seen { color: var(--muted); }
.voice-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin: 10px 0 0; flex-wrap: wrap; }
.voice-row select { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); max-width: 100%; }
.tip-line { font-size: 13px; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* quiz */
.quiz { max-width: 700px; padding: 22px; }
.quiz .qn { color: var(--muted); font-size: 14px; }
.quiz h2 { font-size: 21px; margin: 6px 0 14px; line-height: 1.35; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { text-align: left; font: 16px/1.4 var(--font); padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; display: flex; gap: 10px; }
.choice b { color: var(--teal); }
.choice:hover:not(:disabled) { border-color: var(--teal); }
.choice.right { border-color: var(--green); background: var(--tint-green); }
.choice.wrong { border-color: var(--red); background: var(--tint-red); }
.choice:disabled { cursor: default; }
.feedback { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--bg); }
.score { text-align: center; padding: 30px 20px; }
.score .big { font-size: 54px; font-weight: 800; color: var(--teal); }

/* glossary / about */
.glossary { columns: 2 320px; column-gap: 28px; }
.glossary div { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.glossary b { color: var(--navy); }
.search { width: 100%; max-width: 420px; padding: 11px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); margin-bottom: 14px; }
.prose { max-width: 760px; }

.footer { border-top: 1px solid var(--line); padding: 22px max(16px, calc((100% - 1100px) / 2)); color: var(--muted); font-size: 14px; background: var(--card); }
.footer p { margin: 4px 0; }
.footer .fine { font-size: 12.5px; }

/* ---- Lessons: the same screen as Draw and Learn (picture, sentences, voice, quiz) ---- */
.lesson-screen { padding-bottom: 76px; }
.title-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; }
.title-card .arrow { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 26px;
  color: var(--teal); text-decoration: none; flex: none; }
.title-card .arrow:hover { background: var(--bg); }
.title-middle { flex: 1; text-align: center; min-width: 0; }
.title-middle .kicker { color: var(--teal); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.title-middle .name { margin: 2px 0; font-size: clamp(20px, 3vw, 28px); line-height: 1.2; color: var(--navy); }
.title-middle .count { color: var(--muted); font-size: 14px; }
.round.play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 20px;
  cursor: pointer; flex: none; box-shadow: 0 3px 10px rgba(200, 112, 31, .35); }
.round.play[hidden] { display: none; }

.lesson { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .lesson { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.lesson-side { position: sticky; top: var(--top-h); z-index: 2; background: var(--bg); padding-bottom: 6px; }
.lesson-art { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; box-shadow: var(--shadow);
  max-height: 72vh; overflow-y: auto; }
@media (max-width: 899px) { .lesson-art { max-height: 42vh; } }
.lesson-art svg, .lesson-art img { display: block; width: 100%; height: auto; }
.lesson-art .part { transition: opacity .35s, filter .35s; cursor: pointer; }
.lesson-art .part.dim { opacity: .25; }
.lesson-art .part.focus { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px rgba(255, 193, 7, .95)); }
.lesson-detail { margin: 10px 0 0; padding: 12px 14px; background: #FFF6D8; color: #3B2F0B; border-radius: 12px; font-size: 16px; line-height: 1.5; }
.lesson-detail b { display: block; color: #8A5A00; }

.lesson-audio { display: flex; align-items: center; gap: 10px; }
.lesson-audio > span { color: var(--muted); font-weight: 600; font-size: 14px; }
.toggles { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.toggles button { border: 0; background: var(--card); color: var(--ink); font: 600 15px var(--font); padding: 8px 16px; cursor: pointer; min-height: 40px; }
.toggles button.on { background: var(--tint-teal); color: var(--teal); }
.lesson-help { color: var(--muted); font-size: 14px; margin: 10px 2px 6px; }
.lesson-text { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: line; }
.lesson-text li { overflow-wrap: anywhere; padding: 11px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer;
  font: 17px/1.55 var(--read); transition: background .25s; }
.lesson-text li:hover { border-color: var(--teal); }
.lesson-text li.now { background: #FFE08A; color: #2A2205; border-color: #F2C744; }

.lesson-quiz { margin-top: 16px; padding: 18px; }
.lesson-quiz[hidden] { display: none; }
.quiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.quiz-head h2 { margin: 0; font-size: 21px; color: var(--navy); }
.quiz-head span { color: var(--muted); font-size: 14px; }
.quiz-question { font-size: 18px; font-weight: 600; margin: 12px 0; }
.choice.faded { opacity: .5; }
.quiz-result { min-height: 1.4em; font-size: 16px; }
.quiz-stars { font-size: 34px; color: #F2B705; margin: 8px 0; letter-spacing: 4px; }
.quiz-stars span { color: var(--line); }

.lesson-buttons { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(20, 30, 50, .06); }
.lesson-buttons .btn { flex: 1; max-width: 220px; justify-content: center; }
.btn.outlined { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }


/* ---- Draw and Learn format: display font, pill buttons, eyebrow, ticks, hero collage ---- */
h1, h2, h3, .brand, .chapter-card h3, .title-middle .name, .quiz-head h2, .stats b, .score .big { font-family: var(--display); font-weight: 600; }
.brand b { color: var(--orange); }
.btn { border-radius: 999px; background: var(--teal); padding: 12px 22px; box-shadow: 0 6px 18px rgba(106, 61, 232, .28);
  transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(106, 61, 232, .34); }
.btn.small { padding: 8px 14px; box-shadow: none; }
.btn.ghost, .btn.outlined { box-shadow: none; }
.btn.secondary { background: #fff; color: var(--teal); border: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .1); }
.round.play { background: var(--teal); box-shadow: 0 6px 18px rgba(106, 61, 232, .35); }
.topbar { background: rgba(251, 247, 239, .92); backdrop-filter: blur(10px); }
:root[data-theme="dark"] .topbar { background: rgba(23, 18, 43, .92); }
.card { border-color: var(--line); }
th { background: var(--navy); }
:root[data-theme="dark"] th { background: #3E2A78; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--tint-teal); color: var(--teal);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hero2 { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px 44px; align-items: center; padding: 26px 0 18px; }
.hero2::before { content: ''; position: absolute; inset: -40px -120px auto; height: 560px; z-index: 0; pointer-events: none;
  background: radial-gradient(420px 300px at 12% 20%, rgba(255, 112, 67, .16), transparent 70%),
              radial-gradient(460px 320px at 85% 10%, rgba(106, 61, 232, .16), transparent 70%),
              radial-gradient(380px 260px at 60% 90%, rgba(46, 158, 91, .12), transparent 70%); }
.hero2 > * { position: relative; z-index: 1; }
.hero2 h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.04; margin: 16px 0 14px; color: var(--ink); }
.hero2 h1 span { color: var(--orange); }
.hero2 .lead { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0 0 16px; max-width: 600px; }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; }
.ticks li { position: relative; padding-left: 30px; margin: 9px 0; line-height: 1.45; font-size: 17px; color: var(--ink); }
.ticks li::before { content: '\2713'; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.collage { position: relative; height: 380px; }
.collage img { position: absolute; height: auto; border-radius: 16px; box-shadow: 0 18px 44px rgba(43, 31, 87, .22);
  border: 4px solid #fff; background: #fff; }
.collage .c1 { left: 0; top: 10px; width: 66%; transform: rotate(-3deg); }
.collage .c2 { left: 28%; top: 150px; width: 62%; transform: rotate(2.5deg); }
.collage .c3 { right: 0; top: 0; width: 34%; transform: rotate(5deg); }
@media (max-width: 860px) { .hero2 { grid-template-columns: 1fr; } .collage { height: 300px; } }

/* ---- Sign in with Google ---- */
.account { position: relative; display: inline-flex; align-items: center; }
.google-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid #DADCE0; background: #fff; color: #3C4043; font: 500 14px var(--font); cursor: pointer; }
.google-btn:hover { background: #F8F9FA; border-color: #C6C9CE; }
.account .who { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--tint-teal);
  cursor: pointer; overflow: hidden; display: grid; place-items: center; }
.account .who img { width: 100%; height: 100%; object-fit: cover; }
.account .initial { font: 700 15px var(--font); color: var(--teal); }
.account-menu { position: absolute; right: 0; top: 46px; z-index: 30; min-width: 220px; max-width: 280px; padding: 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.account-menu[hidden] { display: none; }
.account-menu b { color: var(--ink); overflow-wrap: anywhere; }
.account-menu small { color: var(--muted); overflow-wrap: anywhere; margin-bottom: 8px; }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: #1E1B4B; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 50; transition: .25s; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }
.brand b { color: #4338CA; }
:root[data-theme="dark"] .brand b { color: #A5B4FC; }
@media (max-width: 560px) { .google-btn { padding: 0 10px; } }

/* ---- Admin ---- */
.admin { max-width: 1100px; }
.admin-gate { max-width: 460px; margin: 40px auto; padding: 28px; text-align: center; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head .search { margin: 0; }
.avatar { border-radius: 50%; display: block; }

/* ---- SEO pages (/learn, /ai-glossary) and the home page before the app starts ---- */
.static-list { max-width: 820px; line-height: 1.6; }
.static-list li { margin: 6px 0; color: var(--muted); }
.static-list a { font-weight: 600; }
.chapter-card .h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.summary .summary-title { margin: 0 0 6px; font: 700 15px var(--font); color: var(--teal); text-transform: uppercase; letter-spacing: .05em; }
dl.glossary dt { font-weight: 700; color: var(--navy); }
dl.glossary dd { margin: 2px 0 0; color: var(--ink); }
.topbar nav .btn.small { color: #fff; padding: 7px 14px; }

/* ---- Ad spaces (only shown when AdSense is set up in js/ads-config.js) ---- */
.ad-slot.on { margin: 26px auto; max-width: 970px; min-height: 120px; padding: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ad-label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* tutorials with pictures, Pro access, forms and messages */
.tut-card { display: flex; flex-direction: column; gap: 8px; padding: 0 0 16px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s; }
.tut-card:hover { transform: translateY(-3px); border-color: var(--teal); }
.tut-card figure { margin: 0 0 4px; background: #fff; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.tut-card figure img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.tut-card .num, .tut-card h3, .tut-card h2, .tut-card .cap { margin: 0; padding: 0 16px; }
.tut-card .num { font-size: 13px; font-weight: 700; color: var(--teal); letter-spacing: .06em; }
.tut-card h3, .tut-card h2 { font-size: 18px; line-height: 1.3; }
.tut-card .cap { color: var(--muted); font-size: 14.5px; font-style: italic; }
.pro-tag, .free-tag { display: inline-block; font: 700 11px var(--font); letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.pro-tag { background: linear-gradient(90deg, #FF7043, #F5B700); color: #2A1A00; }
.free-tag { background: var(--tint-green); color: var(--green); }
.gate { padding: 22px 24px; margin: 8px 0 24px; max-width: 760px; }
.gate h2 { margin: 10px 0 8px; }
.form-card { padding: 22px 24px; max-width: 760px; margin-bottom: 24px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form label small { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.form .btn { justify-self: start; }
.form-msg { margin: 0; color: var(--teal); font-weight: 600; min-height: 1.4em; }
.ok { color: var(--green); } .warn-text { color: var(--orange); }
.msg { padding: 14px 18px; margin-bottom: 12px; max-width: 760px; }
.msg .num { font-size: 12px; font-weight: 700; color: var(--teal); letter-spacing: .06em; }
.msg p { margin: 6px 0; white-space: pre-wrap; }
.reply { border-left: 4px solid var(--green); background: var(--tint-green); padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.admin .tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.admin .tabs button.on { color: var(--ink); border-color: var(--orange); }
.admin .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; }
.admin-item { padding: 14px 18px; margin-bottom: 12px; }
.admin-item .meta { color: var(--muted); font-size: 14px; }
.admin-item p { white-space: pre-wrap; margin: 8px 0; }
.admin-item textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.status { font: 700 12px var(--font); padding: 2px 8px; border-radius: 999px; background: var(--tint-teal); color: var(--teal); text-transform: uppercase; }
.status.approved, .status.answered { background: var(--tint-green); color: var(--green); }
.status.rejected, .status.closed { background: var(--tint-orange); color: var(--orange); }

/* ---------------------------------------------------------------- audio lessons: one bright look everywhere */
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.btn.audio { background: linear-gradient(135deg, #FF7043 0%, #E0457B 50%, #6A3DE8 100%); color: #fff; border: 0;
  box-shadow: 0 8px 22px rgba(224, 69, 123, .35); }
.btn.audio:hover { box-shadow: 0 12px 28px rgba(224, 69, 123, .45); }
.btn.audio .ico { animation: listen 1.6s ease-in-out infinite; }
@keyframes listen { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.badges span.audio-badge { display: inline-flex; align-items: center; gap: 4px; color: #fff; border: 0;
  background: linear-gradient(135deg, #FF7043, #E0457B 55%, #6A3DE8); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .btn.audio .ico { animation: none; } }
.eyebrow.audio-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: #fff;
  background: linear-gradient(135deg, #FF7043, #E0457B 55%, #6A3DE8); }

/* ---------------------------------------------------------------- audio lesson rows (inside each chapter page) */
.audio-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.audio-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; text-decoration: none; color: inherit;
  background: var(--bg); border: 1px solid var(--line); }
.audio-row:hover { border-color: #E0457B; }
.audio-row .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #FF7043, #E0457B 55%, #6A3DE8); }
.audio-row b { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.3; }
.audio-row .st { color: #E0457B; font-weight: 700; }
.audio-row.done .st { color: var(--green); }

/* business course: narrated lesson player under the title */
.chapter-head .lesson-audio.card { margin-top: 14px; padding: 10px 14px; flex-wrap: wrap; }
.lesson-audio audio { flex: 1; min-width: 220px; max-width: 460px; height: 40px; }

/* small screens: the menu scrolls sideways inside the top bar instead of making the whole page wider */
@media (max-width: 640px) {
  .topbar { gap: 8px; }
  .topbar nav { min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a, .topbar nav .btn.small { white-space: nowrap; flex: 0 0 auto; }
  .topbar .brand { flex: 0 0 auto; }
}

/* business course: narrated visual lesson (same picture + sentence player as the AI course) */
.biz-player { margin: 18px 0 26px; padding: 16px; scroll-margin-top: calc(var(--top-h) + 6px); }
.biz-head { display: flex; align-items: center; gap: 12px; }
.biz-head .h3 { margin: 2px 0 0; flex: 1; }
.biz-head .kicker { display: block; }
.biz-head > div, .biz-head > span { flex: 0 0 auto; }
@media (max-width: 600px) { .biz-head { flex-wrap: wrap; } .biz-head .kicker { flex-basis: 100%; } }
.biz-topics { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: thin; }
.biz-topics .chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px;
  padding: 7px 12px; font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.biz-topics .chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.biz-player .lesson-side { top: var(--top-h); }
.biz-player .lesson-art { max-height: 70vh; overflow: auto; }
/* animated scene: one moving picture per sentence, subtitles at the bottom */
.biz-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #3E2A78; box-shadow: var(--shadow); cursor: pointer; }
.biz-stage:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.biz-stage:fullscreen { border-radius: 0; display: flex; align-items: center; background: #000; }
.biz-scene, .biz-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.biz-cap { position: absolute; left: 0; right: 0; bottom: 4px; padding: 22px 14px 8px; text-align: center; color: #fff;
  font: 500 clamp(12px, 2.1vw, 17px)/1.35 var(--read); background: linear-gradient(transparent, rgba(16, 10, 40, .82)); pointer-events: none; }
.biz-stage:fullscreen .biz-cap { font-size: clamp(16px, 2.4vw, 30px); }
.biz-cap .w { opacity: .72; transition: color .15s, opacity .15s; }
.biz-cap .w.said { opacity: 1; }
.biz-cap .w.on { opacity: 1; color: #FFC24B; }
.biz-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.biz-bar i { display: block; height: 100%; width: 0; background: #FFC24B; transition: width .2s linear; }
.biz-big { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(255, 112, 67, .95);
  color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; padding-left: 5px; box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
  transition: opacity .25s, transform .25s; pointer-events: none; }
.biz-stage.playing .biz-big { opacity: 0; transform: scale(.6); }
.biz-gate { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; text-align: center; color: #fff; background: rgba(20, 12, 48, .78); backdrop-filter: blur(3px); cursor: default; }
.biz-gate b { font: 700 clamp(16px, 2.6vw, 22px)/1.25 var(--font); }
.biz-gate span { font-size: clamp(13px, 1.9vw, 15px); opacity: .9; max-width: 420px; }
.biz-gate .lock { font-size: clamp(26px, 5vw, 40px); opacity: 1; }
.biz-gate .btn { margin-top: 4px; }
.biz-gate .later { color: #fff; opacity: .85; font-size: 13px; }
.biz-gate .loading { color: #fff; }
.biz-fs { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .3); color: #fff;
  font-size: 18px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.biz-stage:hover .biz-fs, .biz-fs:focus-visible { opacity: 1; }
@media (hover: none) { .biz-fs { opacity: .8; } }
.biz-scene .pop, .biz-scene .stamp, .biz-scene .pulse, .biz-scene .spin { transform-box: fill-box; transform-origin: center; }
.biz-scene .pop { animation: bz-pop .65s cubic-bezier(.2, .9, .3, 1.35) both; }
.biz-scene .up { animation: bz-up .55s ease-out both; }
.biz-scene .slide { animation: bz-slide .55s ease-out both; }
.biz-scene .pt { transition: opacity .35s; }
.biz-scene .pt.wait { opacity: 0; }
.biz-scene .pt.wait .slide { animation: none; }
.biz-scene .draw { stroke-dasharray: 160; stroke-dashoffset: 160; animation: bz-draw .9s .7s ease-out forwards; }
.biz-scene .float { animation: bz-float 3.2s ease-in-out infinite; }
.biz-scene .stamp { animation: bz-stamp .45s 1.1s cubic-bezier(.3, 1.4, .5, 1) both; }
.biz-scene .pulse { animation: bz-pulse 1.4s ease-in-out infinite; }
.biz-scene .spin { animation: bz-spin 9s linear infinite; }
.biz-scene .steam { animation: bz-steam 1.8s ease-in-out infinite; }
.biz-scene .glow { animation: bz-pulse 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.biz-scene .drift { animation: bz-drift 14s linear infinite; }
.biz-scene .spark { animation: bz-twinkle 2.4s ease-in-out infinite; }
.biz-scene .type { animation: bz-type .35s steps(6) both; }
@keyframes bz-type { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes bz-pop { 0% { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes bz-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bz-slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes bz-draw { to { stroke-dashoffset: 0; } }
@keyframes bz-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes bz-stamp { from { opacity: 0; transform: scale(2.4) rotate(-30deg); } to { opacity: 1; transform: scale(1) rotate(-10deg); } }
@keyframes bz-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes bz-spin { to { transform: rotate(360deg); } }
@keyframes bz-steam { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-6px); opacity: .4; } }
@keyframes bz-drift { from { transform: translate(0, 0); } to { transform: translate(-40px, -40px); } }
@keyframes bz-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  .biz-scene * { animation: none !important; }
  .biz-scene .draw { stroke-dashoffset: 0; }
}
.biz-nav { margin-top: 12px; gap: 10px; }
.biz-nav .btn[disabled] { opacity: .45; cursor: default; }

/* business course: English / हिंदी / বাংলা switch, and fonts that have the letters */
.lang-switch { display: inline-flex; gap: 4px; margin: 4px 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang-switch a { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font: 600 14px var(--font); }
.lang-switch a:hover { background: var(--bg); }
.lang-switch a[aria-current="page"] { background: var(--teal); color: #fff; }
.lang-switch a[lang="hi"] { font-family: 'Noto Sans Devanagari', var(--font); }
.lang-switch a[lang="bn"] { font-family: 'Noto Sans Bengali', var(--font); }
.lang-flip { margin-left: auto; padding: 8px 16px; border: 2px solid var(--teal); border-radius: 999px; background: var(--card); color: var(--teal);
  font: 700 15px var(--font); cursor: pointer; white-space: nowrap; }
.lang-flip:hover, .lang-flip:focus-visible { background: var(--teal); color: #fff; }
.lang-flip[lang="hi"] { font-family: 'Noto Sans Devanagari', var(--font); }
@media (max-width: 560px) { .lang-flip { padding: 6px 10px; font-size: 13px; } }
html[lang="hi"] body { font-family: 'Noto Sans Devanagari', var(--font); }
html[lang="bn"] body { font-family: 'Noto Sans Bengali', var(--font); }
html[lang="hi"] .reading, html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] .intro { font-family: 'Noto Sans Devanagari', var(--read); }
html[lang="bn"] .reading, html[lang="bn"] h1, html[lang="bn"] h2, html[lang="bn"] h3, html[lang="bn"] .intro { font-family: 'Noto Sans Bengali', var(--read); }
html[lang="hi"] .intro, html[lang="bn"] .intro { font-style: normal; }

/* a locked chapter still shows its picture, with a lock on it */
.gate-thumb { position: relative; max-width: 760px; margin: 0 0 14px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.gate-thumb img { display: block; width: 100%; height: auto; filter: saturate(.85) brightness(.8); }
.gate-thumb span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 32px; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }

/* Google sign-in mark on locked lessons (instead of a lock) */
.g-logo { display: block; width: 100%; height: 100%; }
.biz-big.signin { background: #fff; padding: 16px; }
.biz-gate .lock.g { width: clamp(40px, 7vw, 56px); height: clamp(40px, 7vw, 56px); padding: 8px; background: #fff; border-radius: 50%; display: block; }
.btn.google-in { display: inline-flex; align-items: center; gap: 10px; }
.btn.google-in .g-logo { width: 22px; height: 22px; padding: 3px; background: #fff; border-radius: 50%; box-sizing: content-box; }
.gate-thumb span .g-logo { width: 40px; height: 40px; }

/* search (/search, js/search.js) */
.search-box { padding: 18px; margin: 8px 0 18px; }
.search-box input { width: 100%; box-sizing: border-box; font: inherit; font-size: 19px; padding: 14px 18px; border-radius: 14px;
  border: 2px solid var(--line, #d6dbe3); background: var(--card, #fff); color: var(--ink); }
.search-box input:focus { outline: none; border-color: var(--brand, #6a3de8); box-shadow: 0 0 0 4px rgba(106, 61, 232, .15); }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.search-chips a { padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--ink); text-decoration: none; font-size: 14px; border: 1px solid var(--line, #d6dbe3); }
.search-chips a:hover { border-color: var(--brand, #6a3de8); }
.search-hit .cap { margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* search box in the top bar of every page (js/quicksearch.js): its own row under the logo and menu, which already fill the bar */
.topbar { flex-wrap: wrap; row-gap: 8px; }
.nav-search { position: relative; order: 3; flex: 0 0 100%; display: flex; align-items: center; }
.nav-search > .ico { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.nav-search input { width: 100%; max-width: 640px; font: inherit; font-size: 16px; padding: 9px 14px 9px 38px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); -webkit-appearance: none; appearance: none; }
.nav-search input::placeholder { color: var(--muted); }
.nav-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(106, 61, 232, .18); }
.qs-list { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; max-width: 640px; max-height: 70vh; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); z-index: 20; }
.qs-list a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.qs-list li.on a, .qs-list a:hover { background: var(--tint-teal); }
.qs-kind { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal); }
.qs-title { font-size: 15px; line-height: 1.35; }
.qs-list a.qs-more { color: var(--teal); font-weight: 500; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
/* small screens: the menu keeps sharing the first row with the logo and scrolls sideways there */
@media (max-width: 640px) { .topbar nav { flex: 1 1 0; } }

/* admin overview (/admin, js/admin.js): Basic / Trial / Pro totals, activity, sign-ups chart, recent sign-ins */
.admin-sub { margin: 18px 0 0; color: var(--muted); font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.stats.plans .basic b { color: var(--muted); }
.stats.plans .trial b { color: var(--orange); }
.stats.plans .pro b { color: var(--green); }
#activityStats { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 640px) { #activityStats { grid-template-columns: repeat(2, 1fr); } }
.plan-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 4px 0 8px; }
.plan-bar span { display: block; height: 100%; }
.plan-tag.basic { background: var(--tint-teal); color: var(--teal); }
.plan-bar .basic { background: var(--muted); }
.plan-bar .trial { background: var(--orange); }
.plan-bar .pro { background: var(--green); }
.plan-tag { display: inline-block; font: 700 12px var(--font); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.plan-tag.trial { background: var(--tint-orange); color: var(--orange); }
.plan-tag.pro { background: var(--tint-green); color: var(--green); }
.admin-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin: 18px 0; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-panel { padding: 16px 18px; min-width: 0; }
.admin-panel h2 { margin: 0 0 12px; font-size: 17px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.bars .bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bars .bar i { position: relative; display: block; width: 100%; min-height: 2px; background: var(--teal); border-radius: 4px 4px 0 0; }
.bars .bar em { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 2px); font: 600 11px var(--font); font-style: normal; color: var(--ink); }
.recent, .top-pages { list-style: none; margin: 0; padding: 0; }
.recent li, .top-pages li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.recent li:last-child, .top-pages li:last-child { border-bottom: 0; }
.recent li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.recent li .muted { font-size: 13px; white-space: nowrap; }
.top-pages .pg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.plan-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.plan-filter button { font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.plan-filter button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.topbar nav .btn.outlined.small { color: var(--teal); }   /* the white text above is for filled buttons only */
.admin .tabs button { white-space: nowrap; flex: 0 0 auto; }

/* ---- certificate of completion (/certificate, js/certificate.js) and /verify (js/verify.js) ---- */
.cert-app { margin-bottom: 24px; }
.cert-card ul, .cert-card ol { margin: 8px 0 14px 20px; }
.cert-exam { display: grid; gap: 12px; max-width: 760px; }
.cert-q { border: 1px solid var(--line); padding: 16px 18px; margin: 0; display: grid; gap: 8px; }
.cert-q legend { float: left; width: 100%; font: 600 17px/1.4 var(--font); padding: 0 0 4px; color: var(--ink); }
.cert-q legend + * { clear: both; }
.cert-q label.choice { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cert-q label.choice input { margin-top: 3px; accent-color: var(--teal); flex: none; }
.cert-q label.choice:has(input:checked) { border-color: var(--teal); }
.cert-count { position: sticky; bottom: 0; margin: 0; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; text-align: center; font-weight: 600; }
.cert-claim { display: grid; gap: 14px; max-width: 560px; }
.cert-claim label { display: grid; gap: 6px; font-weight: 600; }
.cert-claim label.check { display: flex; gap: 10px; font-weight: 400; align-items: flex-start; }
.cert-claim input[type="text"], .verify-form input { font: 17px var(--font); padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.verify-form { display: grid; gap: 8px; }
.verify-form .row { flex-wrap: nowrap; }
.verify-form input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.verify-card { padding: 20px 24px; max-width: 760px; border-left: 6px solid var(--green); }
.verify-card.bad { border-left-color: var(--red); }
.verify-card p { margin: 6px 0; }
.cert-cta { border: 2px dashed var(--teal); }
.cert-cta .num { color: var(--teal); }
/* the certificate itself: fixed print colours, so it looks the same on screen, in dark mode and on paper */
.cert-sheet { max-width: 1000px; aspect-ratio: 297 / 210; margin: 0 auto 24px; background: #FFFDF7; color: #2B1F57; padding: 2.2%;
  border-radius: 6px; box-shadow: var(--shadow); container-type: inline-size; }
.cert-inner { height: 100%; box-sizing: border-box; border: 3px solid #6A3DE8; outline: 1px solid #C9B37E; outline-offset: -10px; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3% 6%; gap: .6cqw; }
.cert-brand { display: flex; align-items: center; gap: 1.2cqw; font: 700 2.4cqw var(--display); color: #3E2A78; }
.cert-brand img { width: 5cqw; height: 5cqw; }
.cert-kicker { margin: 1cqw 0 0; font: 700 4.2cqw/1.1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #6A3DE8; }
.cert-small { margin: 0; font: 1.75cqw/1.4 var(--read); color: #5D5470; }
.cert-name { margin: .4cqw 0; font: 700 5.2cqw/1.15 Georgia, 'Times New Roman', serif; color: #2B1F57; border-bottom: 2px solid #C9B37E; padding: 0 3cqw .4cqw; overflow-wrap: anywhere; }
.cert-course { margin: 0; font: 700 2.5cqw/1.3 var(--read); color: #3E2A78; }
.cert-foot { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3cqw; width: 100%; margin-top: 2.4cqw; }
.cert-foot div { display: grid; gap: .3cqw; border-top: 1.5px solid #ECE3D2; padding-top: .8cqw; }
.cert-foot b { font: 700 1.8cqw var(--read); color: #2B1F57; }
.cert-foot .cert-sign { font: italic 700 2.2cqw Georgia, serif; }
.cert-foot span { font: 1.35cqw var(--read); color: #5D5470; }
.cert-verify { margin: 1.2cqw 0 0; font: 1.35cqw var(--read); color: #3E2A78; }
.cert-fine { margin: .3cqw 0 0; font: 1.1cqw/1.4 var(--read); color: #7A7189; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body:has(.cert-sheet) { background: #fff !important; }
  body:has(.cert-sheet) .topbar, body:has(.cert-sheet) .footer, body:has(.cert-sheet) .crumbs, body:has(.cert-sheet) .chapter-head,
  body:has(.cert-sheet) .no-print, body:has(.cert-sheet) .cert-card, body:has(.cert-sheet) [data-ad] { display: none !important; }
  body:has(.cert-sheet) main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .cert-sheet { width: 297mm; height: 210mm; max-width: none; margin: 0; border-radius: 0; box-shadow: none; padding: 7mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
}

/* ---------------------------------------------------------------- the audio lessons inside a chapter page */
.ch-audio { padding: 16px; margin: 0 0 24px; scroll-margin-top: calc(var(--top-h) + 10px); }
.ch-audio-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ch-audio-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; }
.ch-audio-head h2 .ico { width: 22px; height: 22px; color: #E0457B; }
.ch-audio-head h2 .muted { font-size: 14px; font-weight: 500; }
.ch-audio .gate { margin-top: 10px; }

/* ---------------------------------------------------------------- the course list on the left (js/coursenav.js) */
:root { --cnav-w: 300px; }
.cnav { position: fixed; z-index: 9; top: var(--top-h); bottom: 0; left: 0; width: var(--cnav-w); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-right: 1px solid var(--line); padding: 10px 10px 80px; font-size: 14px; scrollbar-width: thin; }
.cnav-top { display: flex; align-items: center; gap: 6px; position: sticky; top: -10px; z-index: 1; background: var(--card); padding: 6px 0 8px; margin-top: -4px; }
.cnav-all { flex: 1; display: block; padding: 9px 12px; border-radius: 12px; font-weight: 700; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #6A3DE8, #3E2A78); }
.cnav-all[aria-current] { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #6A3DE8; }
.cnav-close { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer; }
.cnav-course { border: 1px solid var(--line); border-radius: 14px; margin: 8px 0; background: var(--bg); }
.cnav-course.current { border-color: var(--teal); }
.cnav-course > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 10px 12px; border-radius: 14px; }
.cnav-course > summary::-webkit-details-marker { display: none; }
.cnav-course > summary::after { content: '\25BE'; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); transition: transform .15s; }
.cnav-course:not([open]) > summary::after { transform: rotate(-90deg); }
.cnav-course .lbl { font: 700 11px var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--teal); }
.cnav-course .meta { grid-column: 1; font-size: 12px; color: var(--muted); }
.cnav-ctitle { grid-column: 1; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.3; }
.cnav-ctitle:hover { text-decoration: underline; }
.cnav-grp { margin: 8px 12px 4px; font: 700 11.5px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cnav-list { list-style: none; margin: 0; padding: 0 6px 8px; }
.cnav-item { border-radius: 10px; padding: 6px 6px 7px; }
.cnav-item + .cnav-item { margin-top: 2px; }
.cnav-item:hover { background: var(--card); }
.cnav-item.on { background: var(--tint-teal); box-shadow: inset 3px 0 0 var(--teal); }
.cnav-link { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); text-decoration: none; line-height: 1.3; }
.cnav-item.on .cnav-link { font-weight: 700; }
.cnav-link .n { flex: none; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; font: 700 12px var(--font);
  background: var(--card); border: 1.5px solid var(--line); color: var(--muted); }
.cnav-link .n.started { border-color: var(--orange); color: var(--orange); }
.cnav-link .n.done { background: var(--green); border-color: var(--green); color: #fff; }
.cnav-item.on .cnav-link .n { background: var(--teal); border-color: var(--teal); color: #fff; }
.cnav-link .t { padding-top: 2px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 0 32px; }
.chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.6;
  text-decoration: none; border: 1px solid var(--line); color: var(--muted); background: var(--card); }
.chip .ico { width: 12px; height: 12px; }
.chip.audio { color: #fff; border: 0; background: linear-gradient(135deg, #FF7043, #E0457B 55%, #6A3DE8); }
.chip.hi, .chip.bn { color: var(--navy); border-color: var(--teal); }
.chip.hi:hover, .chip.bn:hover, .chip.on { background: var(--teal); color: #fff; }
.chip.free { color: var(--green); background: var(--tint-green); border-color: transparent; }
.chips .mins { font-size: 11.5px; color: var(--muted); }
.cnav-toggle { display: none; }
.cnav-shade { display: none; }
@media (min-width: 1100px) {
  body.has-cnav main, body.has-cnav .footer { margin-left: calc(var(--cnav-w) + max(0px, (100% - var(--cnav-w) - 1100px) / 2)); }
  body.has-cnav .footer { padding-left: 24px; padding-right: 24px; }
  body.has-cnav .lesson-buttons { left: var(--cnav-w); }
}
@media (max-width: 1099px) {
  .cnav { top: 0; z-index: 30; width: min(340px, 88vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.cnav-open .cnav { transform: none; }
  .cnav-close { display: block; }
  .cnav-top { top: -10px; }
  body.has-cnav .cnav-toggle { display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 25; left: 12px; bottom: 14px;
    padding: 10px 16px; border: 0; border-radius: 999px; font: 700 14px var(--font); color: #fff; cursor: pointer;
    background: linear-gradient(135deg, #6A3DE8, #3E2A78); box-shadow: 0 8px 22px rgba(62, 42, 120, .35); }
  .cnav-toggle .ico { width: 18px; height: 18px; }
  body.has-cnav:has(.lesson-buttons) .cnav-toggle { bottom: 84px; }   /* above the lesson's Before / Next bar */
  body.cnav-open .cnav-shade { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(23, 18, 43, .45); }
}
@media (prefers-reduced-motion: reduce) { .cnav { transition: none; } }
@media print { .cnav, .cnav-toggle, .cnav-shade { display: none !important; } body.has-cnav main, body.has-cnav .footer { margin-left: 0; } }

/* ---------------------------------------------------------------- /courses: contents and schedule */
.course-card .go { display: block; margin-top: 8px; font-weight: 700; color: var(--teal); }
.plan { padding: 18px; margin: 0 0 22px; scroll-margin-top: calc(var(--top-h) + 10px); }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.plan-head h2 { margin: 2px 0 4px; }
.plan-head .num { font: 700 12px var(--font); letter-spacing: .07em; color: var(--teal); }
.plan-head p { margin: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.schedule { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.schedule th, .schedule td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.schedule thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); background: var(--tint-teal); }
.schedule tr.more td { border-top: 0; padding-top: 2px; }
.schedule tr.first td { border-top: 1px solid var(--line); }
.schedule td { border-bottom: 0; }
.schedule td.day { border-right: 1px solid var(--line); }
.schedule tr.grp th { background: var(--bg); color: var(--teal); font-size: 13px; border-top: 2px solid var(--teal); }
.schedule td.day { white-space: nowrap; font-weight: 700; color: var(--teal); }
.schedule td.mins { white-space: nowrap; color: var(--muted); }
.schedule td a { font-weight: 600; text-decoration: none; }
.schedule td a:hover { text-decoration: underline; }
.schedule td.langs { line-height: 2; }
.tag { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px 0 0; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--teal); color: var(--navy); white-space: nowrap; }
.tag .ico { width: 13px; height: 13px; }
.tag small { font-size: 11px; opacity: .85; }
.tag.audio { color: #fff; border: 0; background: linear-gradient(135deg, #FF7043, #E0457B 55%, #6A3DE8); }
td.langs a.tag:hover { background: var(--teal); color: #fff; text-decoration: none; }
@media (max-width: 640px) { .schedule th, .schedule td { padding: 8px 6px; } .schedule { font-size: 14px; } }

/* ---------------------------------------------------------------- AI Professional: syllabus on the course page */
.syllabus { padding: 16px 18px; margin: 0 0 16px; }
.syllabus h3 { margin: 0 0 10px; color: var(--navy); }
.syl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.syl li > a, .syl li.soon { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: inherit; text-decoration: none; }
.syl li > a:hover { border-color: var(--teal); }
.syl .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--teal); }
.syl b { flex: 1; font-weight: 600; line-height: 1.3; }
.syl .st { font-size: 13px; font-weight: 700; color: var(--teal); white-space: nowrap; }
.syl li.soon { opacity: .7; }
.syl li.soon .n { background: var(--muted); }
.syl li.soon .st { color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- the private trading course (/trading, js/trading.js) */
.trading-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.trading-nav a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 14px; }
.trading-nav a.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.trading-app .chapter-head .row { margin-top: 14px; }

/* home page: the AI Professional (Level 1) banner */
.pro-banner { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: center; padding: 18px; margin: 26px 0 8px;
  text-decoration: none; color: inherit; border: 2px solid var(--teal); }
.pro-banner img { width: 100%; border-radius: 12px; background: #fff; }
.pro-banner .num { font: 700 12px var(--font); letter-spacing: .07em; color: var(--orange); }
.pro-banner h2 { margin: 4px 0 6px; }
.pro-banner p { margin: 0 0 12px; color: var(--muted); }
.pro-banner:hover { box-shadow: 0 10px 28px rgba(62, 42, 120, .2); }
@media (max-width: 700px) { .pro-banner { grid-template-columns: 1fr; } }
.cnav-course.is-new { border: 2px solid var(--orange); }
.cnav-course .new-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10px; letter-spacing: .05em;
  color: #fff; background: var(--orange); vertical-align: 1px; }
.cnav-section { display: block; margin: 16px 4px 2px; font: 700 12px var(--font); letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; border-top: 1px solid var(--line); padding-top: 12px; }
.cnav-section:hover { color: var(--teal); }
.members-gate { padding: 22px; margin: 18px 0 26px; }
.members-gate h2 { margin: 8px 0 6px; }
.members-gate .btn { margin-top: 6px; }
