:root {
  --navy: #141F2A;
  --navy-2: #1f2f40;
  --orange: #E85D10;
  --orange-dark: #c24a08;
  --cream: #F4F2ED;
  --paper: #ffffff;
  --ink: #18222d;
  --muted: #5b6875;
  --line: #dcd8cf;
  --green: #1f8a4c;
  --green-bg: #e6f4ec;
  --red: #b3261e;
  --red-bg: #fbe9e7;
  --amber: #a86400;
  --amber-bg: #fff3dc;
  --radius: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.5; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--orange-dark); }


.site-header {
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.15rem; }
.brand img { border-radius: 8px; }
.top-nav { display: flex; gap: 4px; }
.top-nav a { color: #d7dee6; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.top-nav a:hover, .top-nav a.active { background: var(--navy-2); color: #fff; }

main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; outline: none; }
.site-footer { background: var(--navy); color: #aab6c2; font-size: .8rem; padding: 18px 16px; }
.site-footer p { max-width: 1040px; margin: 4px auto; }

h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; margin: 8px 0 8px; color: var(--navy); }
h2 { font-size: 1.3rem; margin: 24px 0 10px; color: var(--navy); }
h3 { margin: 0 0 6px; color: var(--navy); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 680px; margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 18px;
  border-radius: 10px; border: 2px solid transparent; font-weight: 700; text-decoration: none; background: var(--orange); color: #fff;
}
.btn:hover { background: var(--orange-dark); }
.btn.secondary { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.btn.secondary:hover { background: #eef1f4; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn.green { background: var(--green); } .btn.green:hover { background: #176b3b; }
.btn.red { background: var(--red); } .btn.red:hover { background: #8f1d17; }
.btn.amber { background: var(--amber); } .btn.amber:hover { background: #8a5200; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.module-card { display: flex; flex-direction: column; gap: 8px; position: relative; }
.module-card .code { font-size: 2.4rem; font-weight: 800; color: var(--navy); line-height: 1; }
.module-card .code span { font-size: .95rem; font-weight: 700; color: var(--muted); margin-right: 6px; }
.module-card.base { border: 2px solid var(--orange); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--navy); color: #fff; }
.badge.orange { background: var(--orange); }
.badge.soft { background: #e9edf1; color: var(--navy); }
.price { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.module-card .btn { margin-top: auto; }
.module-card .btn + .btn { margin-top: 0; }

.tabs { display: flex; gap: 4px; box-shadow: inset 0 -2px var(--line); margin: 16px 0 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--navy); border-bottom-color: var(--orange); }

label.field { display: block; font-weight: 700; margin: 10px 0 4px; }
select, input[type=text], textarea { width: 100%; max-width: 520px; padding: 10px 12px; border: 1px solid #b9b4a8; border-radius: 8px; background: #fff; }
textarea { min-height: 90px; }
.choice-set { display: flex; gap: 8px; flex-wrap: wrap; }
.choice-set button { min-height: 44px; padding: 8px 14px; border-radius: 8px; border: 2px solid var(--line); background: #fff; font-weight: 700; color: var(--navy); }
.choice-set button.on { border-color: var(--orange); background: #fff4ec; }

/* Question runner */
.q-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.q-stem { font-size: 1.15rem; font-weight: 600; margin: 6px 0 14px; }
.q-pic { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.feedback .q-pic { max-width: 420px; margin: 8px 0; }
.answers { display: grid; gap: 10px; }
.answer {
  text-align: left; display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 14px; min-height: 54px;
  border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 1rem;
}
.answer .letter { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #e9edf1; font-weight: 800; color: var(--navy); }
.answer:hover:not(:disabled) { border-color: var(--navy); }
.answer.picked { border-color: var(--orange); background: #fff4ec; }
.answer.right { border-color: var(--green); background: var(--green-bg); }
.answer.wrong { border-color: var(--red); background: var(--red-bg); }
.answer:disabled { cursor: default; }
.answer .why { display: block; font-size: .9rem; color: var(--muted); margin-top: 4px; }
.feedback { margin-top: 14px; padding: 14px; border-radius: 10px; border-left: 5px solid var(--navy); background: #eef1f4; }
.feedback.good { border-left-color: var(--green); background: var(--green-bg); }
.feedback.bad { border-left-color: var(--red); background: var(--red-bg); }
.cite { margin-top: 8px; font-size: .88rem; color: var(--navy); font-weight: 600; }
.runner-foot { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Exam */
.exam-bar { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.timer { font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 800; }
.timer.low { color: #ffb38a; }
.exam-bar .btn { min-height: 38px; padding: 6px 12px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.qgrid button { min-height: 42px; border-radius: 8px; border: 2px solid var(--line); background: #fff; font-weight: 700; color: var(--navy); position: relative; }
.qgrid button.done { background: #dfe6ee; }
.qgrid button.flag { border-color: var(--orange); }
.qgrid button.flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.qgrid button.cur { outline: 3px solid var(--navy); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 8px 0; }

.score-big { font-size: 3rem; font-weight: 800; color: var(--navy); line-height: 1; }
table.simple { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.simple th, table.simple td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.simple td.num, table.simple th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 4px; background: #e9edf1; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--orange); }

.stat-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat b { display: block; font-size: 1.6rem; color: var(--navy); }

.voice-card.chosen { border: 2px solid var(--orange); }
.voice-card audio { width: 100%; margin: 8px 0; }

.review-card .answer { cursor: default; }
.review-meta { font-size: .85rem; color: var(--muted); }
.review-actions { position: sticky; bottom: 0; background: var(--cream); padding: 10px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.review-actions .btn { min-height: 54px; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--amber-bg); border: 1px solid #ecd29a; margin: 10px 0; }

@media (max-width: 560px) {
  .brand span { font-size: 1rem; }
  .top-nav a { padding: 6px 8px; }
  .top-nav a, .top-nav button { white-space: nowrap; }
  main { padding: 14px 12px 32px; }
  .card { padding: 14px; }
  .tabs { gap: 0; justify-content: space-between; }
  .tabs a { padding: 10px 4px; font-size: min(.94rem, 3.75vw); }
  .notice .btn { margin-top: 8px; }
}

/* ---------- lesson player (matches the training-video look: navy, orange stripe, cream) ---------- */
:root { --sl-navy: #0D213D; --sl-orange: #E9741E; --sl-cream: #F4F2ED; }
.player { margin-top: 12px; }
.stage { aspect-ratio: 16 / 9; width: 100%; background: var(--sl-cream); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: relative; container-type: inline-size; }
.slide { position: absolute; inset: 0; padding: 4.5cqw 5cqw 4cqw 6cqw; display: flex; flex-direction: column; gap: 2cqw; background: var(--sl-cream); color: var(--sl-navy); }
.slide::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1.4cqw; background: var(--sl-orange); }
.sl-head h2 { margin: 0; font-size: 3.6cqw; line-height: 1.15; color: var(--sl-navy); }
.sl-badge { display: inline-block; font-size: 1.7cqw; font-weight: 800; color: #fff; background: var(--sl-orange); padding: .3cqw 1.2cqw; border-radius: 99px; margin-bottom: 1cqw; }
.sl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3cqw; }
.sl-list li { display: flex; gap: 1.6cqw; align-items: flex-start; font-size: 2.35cqw; line-height: 1.3; background: #fff; border-radius: 1cqw; padding: 1cqw 1.6cqw; box-shadow: 0 .2cqw .6cqw rgba(13,33,61,.08); }
.sl-list li .ico { font-size: 3cqw; line-height: 1; flex: none; width: 3.6cqw; text-align: center; }
.sl-list.compact li { font-size: 1rem; padding: 8px 12px; box-shadow: none; border: 1px solid var(--line); }
.sl-list.compact li .ico { font-size: 1.2rem; width: 1.6rem; }
.book-chip { margin-top: auto; align-self: flex-start; background: var(--sl-navy); color: #fff; font-size: 1.8cqw; padding: .8cqw 1.6cqw; border-radius: .8cqw; border-left: .6cqw solid var(--sl-orange); }
.book-chip b { color: #ffd2b0; }
.sl-title { background: var(--sl-navy); color: #fff; justify-content: center; }
.sl-title h1 { color: #fff; font-size: 6cqw; margin: 0; }
.sl-title p { font-size: 2.6cqw; color: #ffd2b0; margin: 0; }
.sl-eyebrow { font-weight: 800; letter-spacing: .15em; color: var(--sl-orange); font-size: 2cqw; }
.sl-brand { position: absolute; right: 4cqw; bottom: 3cqw; font-size: 1.6cqw; color: #9fb0c4; }
.sl-title .book-chip { margin-top: 2cqw; background: rgba(255,255,255,.08); }
.sl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4cqw; }
.sl-grid .tile { background: #fff; border-radius: 1cqw; padding: 1.4cqw; display: flex; flex-direction: column; gap: .4cqw; border: .25cqw solid transparent; }
.sl-grid .tile .ico { font-size: 3.4cqw; }
.sl-grid .tile b { font-size: 2.6cqw; }
.sl-grid .tile small { font-size: 1.7cqw; color: #4b5a6a; }
.sl-grid .tile.on { border-color: var(--sl-orange); background: #fff4ec; }
.sl-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2cqw; align-items: start; min-height: 0; }
.sl-split img { width: 100%; border-radius: 1cqw; background: #fff; border: 1px solid var(--line); }
.sl-split .sl-list li { font-size: 2cqw; }
.sl-table { width: 100%; border-collapse: separate; border-spacing: 0 .5cqw; font-size: 1.95cqw; }
.sl-table th { text-align: left; color: #fff; background: var(--sl-navy); padding: .7cqw 1.2cqw; }
.sl-table th:first-child { background: transparent; color: var(--sl-navy); }
.sl-table td { background: #fff; padding: .7cqw 1.2cqw; }
.sl-table td:first-child { font-weight: 700; }
/* Drills run up to 7 questions: compact rows, and the slide scrolls if answers still run past the fixed 16:9 stage. */
.slide.sl-scroll { overflow-y: auto; }
.sl-drill { margin: 0; padding-left: 3cqw; display: grid; gap: 1cqw; font-size: 2cqw; }
.sl-drill li { background: #fff; border-radius: 1cqw; padding: .8cqw 1.4cqw; display: flex; flex-flow: row wrap; gap: .4cqw 1.2cqw; align-items: center; justify-content: space-between; }
.sl-drill li > span { flex: 1 1 70%; }
.sl-drill .btn { min-height: 0; padding: .5cqw 1.4cqw; font-size: 1.7cqw; }
.sl-drill em { flex-basis: 100%; font-size: 1.8cqw; font-style: normal; font-weight: 700; color: var(--green); }
.sl-pros .sl-list li { border-left: .6cqw solid var(--green); }
.sl-cons .sl-list li { border-left: .6cqw solid var(--sl-orange); }
.sl-traps .sl-list li { border-left: .6cqw solid var(--red); }
.sl-note .sl-list li { border-left: .6cqw solid var(--sl-navy); }
.caption-bar { background: var(--sl-navy); color: #fff; border-left: 8px solid var(--sl-orange); padding: 10px 14px; border-radius: 0 0 10px 10px; font-size: 1rem; line-height: 1.45; margin-top: -4px; }
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.controls select { width: auto; padding: 6px 8px; }
.progress-line { height: 6px; background: #e3e0d8; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.progress-line span { display: block; height: 100%; background: var(--sl-orange); width: 0; transition: width .3s; }
.lesson-list { display: grid; gap: 8px; margin-top: 12px; }
.lesson-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.lesson-row .num { width: 36px; height: 36px; border-radius: 50%; background: var(--sl-navy); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.lesson-row .grow { flex: 1; }
.lesson-row.later { opacity: .65; }
.vote { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.vote button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 12px; font-size: 1rem; }
.vote button.on { border-color: var(--orange); background: #fff4ec; }
@media (max-width: 560px) { .sl-grid { grid-template-columns: repeat(2, 1fr); } .sl-split { grid-template-columns: 1fr; } .sl-split img { display: none; } }
/* karaoke captions */
/* Letters change color as they are spoken (no box): spoken text turns orange, the current word fills left to right. */
.caption-bar .w { color: #eef2f6; }
.caption-bar .w.said { color: #ffa04d; }
.caption-bar .w.now { color: transparent; background: linear-gradient(90deg, #ffa04d var(--p, 0%), #eef2f6 var(--p, 0%)); -webkit-background-clip: text; background-clip: text; }

/* ---------- dark ("developer") theme, switch in the header ---------- */
html.dark { color-scheme: dark; --cream: #0e1621; --paper: #16212e; --ink: #e3e9ef; --muted: #9aabbd; --line: #2a3a4c;
  --green-bg: #11301e; --red-bg: #3a1714; --amber-bg: #33270d; --sl-cream: #101b28; --sl-navy: #0a1a30; }
html.dark body { background: var(--cream); color: var(--ink); }
html.dark h1, html.dark h2, html.dark h3, html.dark .price, html.dark .score-big, html.dark .stat b, html.dark .module-card .code { color: #f1f5f9; }
html.dark a { color: #ff9a5c; }
html.dark a.btn { color: #fff; }
html.dark .tabs a { color: var(--muted); }
html.dark .tabs a.active { color: #fff; }
html.dark .answer, html.dark .choice-set button, html.dark .qgrid button, html.dark select, html.dark input[type=text], html.dark textarea,
html.dark .vote button, html.dark .btn.secondary { background: #1b2838; color: var(--ink); border-color: var(--line); }
html.dark .btn.secondary { border-color: #6f8399; }
html.dark .btn.ghost { color: var(--ink); }
html.dark .answer .letter, html.dark .badge.soft { background: #263548; color: #e3e9ef; }
html.dark .answer.picked, html.dark .choice-set button.on, html.dark .sl-grid .tile.on { background: #3a2412; }
html.dark .answer.right { background: var(--green-bg); }
html.dark .answer.wrong { background: var(--red-bg); }
html.dark .feedback { background: #1b2838; color: var(--ink); }
html.dark .feedback.good { background: var(--green-bg); } html.dark .feedback.bad { background: var(--red-bg); }
html.dark .cite { color: #ffc49c; }
html.dark .notice { border-color: #5b4518; color: var(--ink); }
html.dark .qgrid button.done { background: #2b3d52; }
html.dark .bar, html.dark .progress-line { background: #263548; }
html.dark .slide { color: #e3e9ef; }
html.dark .sl-head h2 { color: #f1f5f9; }
html.dark .sl-table th:first-child { color: #f1f5f9; }
html.dark .sl-list li, html.dark .sl-grid .tile, html.dark .sl-table td, html.dark .sl-drill li { background: #192637; color: #e3e9ef; box-shadow: none; }
html.dark .sl-grid .tile small { color: #a9b8c8; }
html.dark .sl-split img { border-color: var(--line); }
html.dark .stage { border-color: var(--line); }
html.dark .review-actions { background: var(--cream); }
.theme-btn { background: transparent; border: 1px solid #3a4b5e; color: #d7dee6; border-radius: 8px; padding: 6px 10px; font-weight: 600; }
.theme-btn:hover { background: var(--navy-2); color: #fff; }
html.dark .top-nav a { color: #d7dee6; }
html.dark .top-nav a:hover, html.dark .top-nav a.active { color: #fff; }
html.dark .brand { color: #fff; }

/* ---------- certificate ---------- */
.certificate { background: #fff; color: #0D213D; border: 3px solid #0D213D; outline: 8px solid #E9741E; outline-offset: -16px; border-radius: 6px; padding: 48px 56px; margin: 16px 0; text-align: center; position: relative; }
.cert-brand { display: flex; align-items: center; gap: 12px; justify-content: center; font-size: 1.2rem; }
.cert-title { font-size: 2.2rem; font-weight: 800; letter-spacing: .04em; margin: 18px 0 6px; color: #0D213D; }
.cert-small { margin: 6px 0; color: #4b5a6a; }
.cert-name { font-size: 2.1rem; font-weight: 700; border-bottom: 2px solid #E9741E; display: inline-block; padding: 0 24px 4px; margin: 6px 0 4px; }
.cert-course { font-size: 1.3rem; font-weight: 700; margin: 6px 0 18px; }
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; text-align: left; max-width: 680px; margin: 0 auto 22px; }
.cert-grid span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7785; }
.cert-grid b { font-size: .98rem; }
.cert-sign { display: flex; justify-content: space-around; gap: 24px; margin-top: 18px; text-align: center; }
.cert-sign .sig { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 1.7rem; border-bottom: 1px solid #0D213D; padding: 0 20px; }
.cert-sign .sig.small { font-family: inherit; font-size: 1.05rem; font-weight: 700; padding-bottom: 6px; }
.cert-sign span { font-size: .8rem; color: #4b5a6a; display: block; max-width: 300px; margin: 4px auto 0; }
.cert-foot { margin-top: 22px; font-size: .75rem; color: #6b7785; word-break: break-all; }
html.dark .certificate { background: #fff; color: #0D213D; }
@media screen and (max-width: 640px) {
  .certificate { padding: 36px 28px; }
  .cert-title { font-size: 1.6rem; letter-spacing: .02em; }
  .cert-name { font-size: 1.5rem; padding: 0 8px 4px; }
  .cert-sign { flex-direction: column; align-items: center; }
  .cert-sign span { overflow-wrap: anywhere; }
}
@media print {
  @page { size: landscape; margin: 10mm; }
  .site-header, .site-footer, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .certificate { margin: 0; page-break-after: always; }
  .cert-desc { border: none; }
  html.dark body { background: #fff; }
}

/* buying + legal */
.offer-list { display: grid; gap: 8px; margin: 8px 0 4px; }
.offer { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; }
.offer:has(input:checked) { border-color: var(--orange); background: #fff4ec; }
html.dark .offer:has(input:checked) { background: #3a2412; }
input[type=date], input[type=email], input[type=password], input[type=file] { width: 100%; max-width: 520px; padding: 10px 12px; border: 1px solid #b9b4a8; border-radius: 8px; background: #fff; }
html.dark input[type=date], html.dark input[type=email], html.dark input[type=password] { background: #1b2838; color: var(--ink); border-color: var(--line); }
.legal h1 { font-size: 1.7rem; } .legal h2 { font-size: 1.15rem; margin-top: 18px; } .legal p, .legal li { line-height: 1.6; }
.site-footer a { color: #ffb38a; }

/* ---------- coming soon courses: the watermark across the course icon ---------- */
.code.soon, .module-card .code.soon { position: relative; align-self: stretch; min-width: 200px; height: 128px; padding: 14px 12px 0; border-radius: 12px; overflow: hidden; background: #10233f; color: #fff; font-size: 3.9rem; font-weight: 800; line-height: 1; text-align: center; }
.code.soon span, .module-card .code.soon span { font-size: 1.05rem; font-weight: 700; color: #b9c8dc; margin-right: 8px; vertical-align: baseline; }
.code.soon i { position: absolute; left: -12%; right: -12%; bottom: 21px; transform: rotate(-7deg); padding: 5px 0; font-style: normal; font-size: 1.05rem; font-weight: 800; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; color: #fff; background: rgba(232, 93, 16, .9); }
.row > .code.soon { align-self: center; flex: 0 0 220px; }
.lp .code.soon { width: 240px; }
html.dark .code.soon, html.dark .module-card .code.soon { background: #1c3557; color: #fff; }

/* ---------- lesson slides: normal text sizes and drawings on a phone ---------- */
.flow .sl-table th:first-child { color: var(--sl-navy); }
html.dark .flow .sl-table th:first-child { color: #f1f5f9; }
.flow .slide.sl-scroll { overflow-y: auto; }
.flow .sl-drill { gap: 1cqw; font-size: 2cqw; }
.flow .sl-drill li { padding: .8cqw 1.4cqw; flex-flow: row wrap; gap: .4cqw 1.2cqw; align-items: center; justify-content: space-between; }
.flow .sl-drill li > span { flex: 1 1 70%; }
.flow .sl-drill em { flex-basis: 100%; font-size: 1.8cqw; }
@media (max-width: 380px) { .top-nav { gap: 0; } .top-nav a, .top-nav button { font-size: .92rem; padding-left: 6px; padding-right: 6px; } }
/* On a phone each slide is as tall as it needs to be, with normal text sizes and its drawing. */
@media (max-width: 700px) {
  .flow .stage { aspect-ratio: auto; border-radius: 12px 12px 0 0; }
  .flow .slide { position: relative; inset: auto; min-height: 200px; padding: 18px 14px 16px 20px; gap: 12px; }
  .flow .slide::before { width: 6px; }
  .flow .sl-head h2 { font-size: 1.25rem; }
  .flow .sl-badge { font-size: .78rem; padding: 3px 10px; margin-bottom: 6px; }
  .flow .sl-list { gap: 8px; }
  .flow .sl-list li, .flow .sl-split .sl-list li { font-size: 1rem; gap: 10px; padding: 9px 11px; border-radius: 8px; }
  .flow .sl-list li .ico { font-size: 1.2rem; width: 1.6rem; }
  .flow .book-chip { font-size: .85rem; padding: 7px 11px; border-radius: 6px; border-left-width: 4px; margin-top: 4px; }
  .flow .sl-title h1 { font-size: 1.6rem; line-height: 1.2; }
  .flow .sl-title p { font-size: 1rem; }
  .flow .sl-eyebrow { font-size: .78rem; }
  .flow .sl-brand { position: static; font-size: .78rem; }
  .flow .sl-grid { gap: 8px; grid-template-columns: repeat(2, 1fr); }
  .flow .sl-grid .tile { padding: 10px; border-radius: 8px; gap: 3px; border-width: 2px; }
  .flow .sl-grid .tile .ico { font-size: 1.3rem; }
  .flow .sl-grid .tile b { font-size: 1rem; line-height: 1.25; }
  .flow .sl-grid .tile small { font-size: .86rem; line-height: 1.35; }
  .flow .sl-split { gap: 10px; grid-template-columns: 1fr; }
  .flow .sl-split img { display: block; border-radius: 8px; }
  .flow .sl-table { font-size: .9rem; border-spacing: 0 4px; }
  .flow .sl-table th, .flow .sl-table td { padding: 7px 6px; vertical-align: top; }
  .flow .sl-table th { font-size: .82rem; }
  .flow .sl-table th:first-child, .flow .sl-table td:first-child { padding-left: 0; }
  /* Four or more columns don't fit a phone: each row becomes a card with the column names beside the values. */
  .flow .sl-table.wide, .flow .wide tbody, .flow .wide tr, .flow .wide td { display: block; }
  .flow .wide tr:first-child { display: none; }
  .flow .wide tr { margin-bottom: 10px; border-radius: 8px; overflow: hidden; }
  .flow .wide td, .flow .wide td:first-child { padding: 7px 11px; }
  .flow .wide td:first-child, html.dark .flow .wide td:first-child { background: var(--sl-navy); color: #fff; font-size: 1rem; }
  .flow .wide td:not(:first-child) { display: grid; grid-template-columns: 38% 1fr; gap: 10px; }
  .flow .wide td:not(:first-child)::before { content: attr(data-h); font-size: .82rem; font-weight: 700; opacity: .75; overflow-wrap: anywhere; }
  .flow .wide td:empty { display: none; }
  .flow .sl-drill { padding-left: 20px; gap: 8px; font-size: 1rem; }
  .flow .sl-drill li { padding: 9px 11px; gap: 8px; border-radius: 8px; }
  .flow .sl-drill li > span { flex: 1 1 100%; }
  .flow .sl-drill .btn { font-size: .9rem; min-height: 40px; padding: 8px 12px; }
  .flow .sl-drill em { font-size: .95rem; }
  .flow .sl-pros .sl-list li, .flow .sl-cons .sl-list li, .flow .sl-traps .sl-list li, .flow .sl-note .sl-list li { border-left-width: 4px; }
  .flow .controls { position: sticky; bottom: 0; background: var(--cream); padding: 8px 0; z-index: 2; }
  .flow .controls { justify-content: space-between; gap: 6px; }
  .flow .controls .btn { flex: 1; padding-left: 6px; padding-right: 6px; }
  .flow .controls .spacer { display: none; }
  .flow .controls .small { font-size: .78rem; white-space: nowrap; }
  .flow .controls select { font-size: .8rem; padding: 5px 2px; }
}
@media (max-width: 380px) { .flow .sl-table:not(.wide) { font-size: .82rem; } .flow .sl-table:not(.wide) th { font-size: .76rem; } .flow .sl-table:not(.wide) th, .flow .sl-table:not(.wide) td { padding-left: 4px; padding-right: 4px; } }

/* student reviews */
.stars { color: var(--orange); letter-spacing: 1px; white-space: nowrap; }
.stars i { color: #b9b4a8; font-style: normal; }
.review + .review, form.card.no-print { margin-top: 12px; }
.review p { margin: 0 0 8px; overflow-wrap: anywhere; }
.review p:last-child { margin-bottom: 0; }
.star-pick { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.star-pick legend { padding: 0; }
.star-pick label { position: relative; cursor: pointer; padding: 2px 6px; }
.star-pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.star-pick span { font-size: 32px; line-height: 1.1; color: #b9b4a8; }
.star-pick label:has(input:checked) span, .star-pick label:has(~ label input:checked) span { color: var(--orange); }
.star-pick b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.star-pick label:has(input:focus-visible) { outline: 2px solid var(--orange); border-radius: 6px; }

/* course pages, Texas pages and the guide on the home page */
.lp { max-width: 880px; }
.lp p, .lp li, .guide p { max-width: 74ch; }
.lp h2 { margin-top: 32px; }
.lp h3 { margin: 18px 0 6px; }
.lp li { margin-bottom: 5px; }
.lp .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0; }
.lp .fact { padding: 12px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.lp .fact b { display: block; font-size: 1.25em; }
.lp .cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.lp ol.outline { columns: 2; column-gap: 48px; }
.lp ol.outline li { break-inside: avoid; margin-bottom: 4px; }
.lp details { margin: 8px 0; }
.lp summary { cursor: pointer; font-weight: 600; }
.tw { margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); max-width: 780px; }
.tw table { width: 100%; border-collapse: collapse; }
.tw th, .tw td { text-align: left; vertical-align: top; padding: 9px 12px; overflow-wrap: break-word; }
.tw th { font-size: .85rem; color: var(--muted); }
.tw tr + tr td, .tw thead + tbody tr td { border-top: 1px solid var(--line); }
.yt { position: relative; max-width: 720px; aspect-ratio: 16 / 9; margin-bottom: 20px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.guide { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px 40px; }
.guide .courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 36px; }
.guide h3 { margin: 16px 0 4px; font-size: 1.05rem; }
.guide p { margin: 0 0 8px; }
.guide li { margin-bottom: 5px; }
.guide[hidden] { display: none; }
@media (max-width: 640px) { .lp ol.outline { columns: 1; } .tw th, .tw td { padding: 8px 9px; } }
