/* Nebula Prep. Night-sky navy with one warm "star" gold for the main action; reading happens on calm white paper
   in a bookish serif. Space Grotesk for headings, Inter for interface text, Source Serif 4 for passages. */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --ink: #121731;
  --muted: #5a6280;
  --line: #dde1ec;
  --accent: #3d36b8;
  --accent-soft: #ecebfb;
  --star: #f2b33d;
  --star-ink: #1c1606;
  --night: #0d1230;
  --night-2: #171d45;
  --good: #16794d;
  --good-bg: #e5f4ec;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --mark: #fff0a0;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --read: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --radius: 10px;
  --top-h: 64px;
  --lbar-h: 96px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f22; --surface: #131833; --surface-2: #1a2042; --ink: #e9ebf5; --muted: #9ba2bf; --line: #272d4c;
    --accent: #a59dff; --accent-soft: rgba(165, 157, 255, .14); --star: #f6c35c; --star-ink: #1c1606;
    --night: #070a1c; --night-2: #11173a; --good: #5fd39a; --good-bg: rgba(95, 211, 154, .13); --bad: #ff8a80;
    --bad-bg: rgba(255, 138, 128, .13); --mark: rgba(246, 195, 92, .28); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 2px; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.fine { font-size: 13.5px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.center { justify-content: center; }
.eyebrow { font-family: var(--head); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--star); margin: 0 0 8px; }
.eyebrow-dark { color: var(--accent); }

/* buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--surface); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.15); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-wide { width: 100%; }
.btn-star { background: var(--star); border-color: var(--star); color: var(--star-ink); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink); filter: none; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-quiet { background: transparent; color: var(--bad); border-color: var(--line); }
.btn-review { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 14px; }
.link-quiet { color: var(--ink); text-decoration: none; font-weight: 500; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.chip-quiet { background: var(--surface-2); color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pill-on { background: var(--accent-soft); color: var(--accent); }
.pill-done { background: var(--good-bg); color: var(--good); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: var(--night); color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 1180px; margin: 0 auto; min-height: var(--top-h); display: flex; align-items: center; gap: 18px;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.mark { width: 30px; height: 30px; color: #c9c5ff; flex: none; }
.mark-star { fill: var(--star); }
.nav { display: flex; gap: 4px; }
.nav a { color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .09); }
.acct { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top .link-quiet { color: rgba(255, 255, 255, .85); }
.top .btn { background: var(--star); border-color: var(--star); color: var(--star-ink); }
.top .chip { background: rgba(255, 255, 255, .1); color: #fff; }
.top .chip-quiet { color: rgba(255, 255, 255, .7); }

/* hero */
.hero { position: relative; overflow: hidden; background: var(--night); color: #fff; padding: 72px 0 84px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(60% 70% at 78% 30%, rgba(122, 92, 240, .42), transparent 70%),
              radial-gradient(40% 55% at 92% 75%, rgba(230, 103, 155, .22), transparent 70%),
              radial-gradient(45% 50% at 62% 85%, rgba(64, 120, 230, .25), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .75;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='30' r='1'/%3E%3Ccircle cx='70' cy='12' r='.7'/%3E%3Ccircle cx='140' cy='48' r='1.2'/%3E%3Ccircle cx='200' cy='20' r='.8'/%3E%3Ccircle cx='40' cy='110' r='.8'/%3E%3Ccircle cx='110' cy='90' r='.6'/%3E%3Ccircle cx='180' cy='130' r='1'/%3E%3Ccircle cx='20' cy='180' r='.7'/%3E%3Ccircle cx='90' cy='170' r='1.1'/%3E%3Ccircle cx='160' cy='200' r='.7'/%3E%3Ccircle cx='210' cy='90' r='.6'/%3E%3C/g%3E%3C/svg%3E"); }
.hero-in { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.hero h1 { font-size: clamp(48px, 9vw, 96px); margin: 0 0 18px; letter-spacing: -.035em; line-height: .95; }
.hero-lede { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; max-width: 40ch; color: rgba(255, 255, 255, .88); margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 16px 0 0; font-size: 14px; color: rgba(255, 255, 255, .65); }

/* sections */
.band { padding: 64px 0; }
.band-alt { background: var(--surface); border-block: 1px solid var(--line); }
.band-tight { padding: 32px 0 56px; }
.section-title { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 22px; }
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.page-head-tight { padding: 32px 0 28px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 52px); margin: 0 0 12px; }
.lede { font-size: 18.5px; max-width: 62ch; color: var(--muted); margin: 0; }
.lede-sm { font-size: 17px; max-width: 70ch; color: var(--muted); }
.crumbs { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.cards { display: grid; gap: 18px; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 22px; }
.card p { margin: 0; }
.card-link { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-muted { background: transparent; }
.card-kicker { font-family: var(--head); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.card-muted .card-kicker { color: var(--muted); }
.card-more { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: s; }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 14px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--head); font-weight: 700; color: var(--accent); font-size: 14px; letter-spacing: .08em; }
.steps h3 { margin: 6px 0 6px; font-size: 20px; }
.steps p { margin: 0; color: var(--muted); }
.split { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 12px 42px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 15px; top: 17px; width: 14px; height: 14px; background: var(--star);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 760px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.empty { text-align: center; max-width: 520px; margin: 0 auto; padding: 32px 0; }
.empty-mark { width: 64px; height: 64px; color: var(--accent); }
.empty h1, .empty h2 { margin: 8px 0; }

/* English lesson list */
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lesson { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.lesson-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 20px; background: var(--surface-2); color: var(--muted); }
.lesson-open .lesson-num { background: var(--night); color: var(--star); }
.lesson h3 { margin: 0 0 4px; font-size: 19px; }
.lesson h3 a { color: inherit; text-decoration: none; }
.lesson p { margin: 0; color: var(--muted); }
.lesson .lesson-meta { margin-top: 8px; }
.lesson:not(.lesson-open) { background: transparent; }
@media (max-width: 560px) { .lesson { grid-template-columns: 44px minmax(0, 1fr); } .lesson > .btn { grid-column: 2; justify-self: start; } }
.parts { width: 100%; border-collapse: collapse; font-size: 15px; }
.parts th { text-align: left; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 8px 6px 0; }
.parts td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.parts td:nth-child(2) { white-space: nowrap; color: var(--muted); }
.cta-card { background: var(--night); color: #fff; border-radius: var(--radius); padding: 28px; display: grid; gap: 12px; justify-items: start; }
.cta-card h2 { margin: 0; font-size: 24px; }
.cta-card p { margin: 0; color: rgba(255, 255, 255, .8); }
.cta-card .fine { color: rgba(255, 255, 255, .65); }
.cta-card a:not(.btn) { color: var(--star); }
.loading { color: var(--muted); padding: 40px 0; }

/* forms */
.auth { padding: 56px 20px 72px; display: grid; place-items: start center; }
.auth-card { width: min(100%, 440px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; }
.auth-card h1 { margin: 0 0 6px; font-size: 30px; }
.auth-alt { margin: 14px 0 0; font-size: 15px; text-align: center; }
.form { display: grid; gap: 6px; margin-top: 18px; }
.form label { font-weight: 600; font-size: 14.5px; margin-top: 8px; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="date"], .form select {
  width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.form input:focus, .form select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0 6px; }
.form .check input { margin-top: 5px; width: 18px; height: 18px; }
.form .btn { margin-top: 12px; }
.form-msg { margin: 6px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 14.5px; }
.form-done h2 { margin: 18px 0 8px; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 18px; align-items: end; }
.form-grid > .row, .form-grid > .form-msg, .form-grid > .gf-total { grid-column: 1 / -1; }
.gf-total { font-size: 16px; }

/* dashboard */
.dash { padding: 36px 0 72px; }
.dash-head h1 { font-size: clamp(30px, 4.5vw, 42px); margin: 0 0 22px; }
.dash-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel-title { margin: 0 0 10px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-family: var(--head); }
.countdown-panel { background: var(--night); border-color: var(--night); color: #fff; position: relative; overflow: hidden; }
.countdown-panel::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; background: radial-gradient(closest-side, rgba(122, 92, 240, .45), transparent); }
.countdown-panel .panel-title { color: rgba(255, 255, 255, .65); }
.cd-days { margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--head); }
#cd-num { font-size: clamp(64px, 10vw, 96px); font-weight: 700; line-height: 1; color: var(--star); font-variant-numeric: tabular-nums; }
#cd-unit { font-size: 22px; font-weight: 600; }
.cd-sub { margin: 10px 0 0; color: rgba(255, 255, 255, .8); }
.goal-total { margin: 0; font-family: var(--head); }
#goal-total { font-size: 56px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.goal-split { display: flex; gap: 28px; margin: 12px 0 16px; }
.goal-split dt { font-size: 13px; color: var(--muted); }
.goal-split dd { margin: 0; font-family: var(--head); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.goal-form-panel { margin-top: 18px; border-color: var(--accent); }
.dash-sec { margin-top: 40px; font-size: 24px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--star); border-radius: 999px; transition: width .4s; }
.account p { margin: 0 0 12px; }
.confirm-box { margin-top: 14px; padding: 16px; border: 1.5px solid var(--bad); border-radius: var(--radius); background: var(--bad-bg); }
.confirm-box p { margin: 0 0 12px; }

/* prose (guide, privacy) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 30px; margin: 0 0 14px; }
.prose h3 { font-size: 22px; margin: 32px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.prose li { margin: 4px 0; }

/* lesson workspace */
.lbar { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); z-index: 15; background: var(--surface); border-bottom: 1px solid var(--line); }
.lbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding-top: 6px; padding-bottom: 6px; }
.ltabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 520px; min-width: 0; }
.ltab { flex: none; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.ltab:hover { color: var(--ink); background: var(--surface-2); }
.ltab[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.ltab .tick { color: var(--good); }
.ltab .part, .ltab .opt { font-size: 12px; color: var(--muted); font-weight: 500; }
.lprog { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.lprog .meter { width: 120px; }
.lbody { padding-top: 24px; padding-bottom: 64px; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); }
.h2 { font-size: 28px; margin: 0 0 10px; }
.h3 { font-size: 20px; margin: 28px 0 10px; }
.done-line { color: var(--good); font-weight: 700; margin: 8px 0; }
.todo-line { margin: 8px 0; }
.pbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pchip { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; font-family: var(--head); }
.pchip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.pchip.chip-sub { border-color: var(--star); }
.pchip.chip-done { border-color: var(--good); color: var(--good); }
.pchip.chip-done[aria-pressed="true"] { background: var(--good); color: #fff; }
.spread-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.spread-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-weight: 600; }
.spread-head .muted { margin-left: auto; font-weight: 500; font-size: 14px; }
.sq { width: 26px; height: 26px; display: grid; place-items: center; background: var(--ink); color: var(--surface); border-radius: 5px; font-family: var(--head); font-size: 14px; }
.src { margin: 0; padding: 14px 20px 0; font-family: var(--read); font-style: italic; color: var(--muted); max-width: 80ch; }
.spread { display: grid; grid-template-columns: minmax(0, 1fr); }
.passage { padding: 18px 20px 24px; min-width: 0; container: passage / inline-size; font-family: var(--read); }
.questions { padding: 6px 20px 24px; min-width: 0; font-family: var(--read); }
@media (min-width: 760px) {
  .spread { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
  .passage { position: sticky; top: calc(var(--top-h) + var(--lbar-h) + env(safe-area-inset-top, 0px)); align-self: start;
    max-height: calc(100vh - var(--top-h) - var(--lbar-h) - env(safe-area-inset-top, 0px)); overflow: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); }
  .questions { padding-top: 18px; }
}
.lines { font-size: 16.5px; line-height: 1.65; }
.ln { display: grid; grid-template-columns: 3em minmax(0, 1fr); border-radius: 3px; transition: background-color .3s; }
.ln .no { font-family: var(--ui); font-size: 12px; color: var(--muted); text-align: right; padding-right: 1em; padding-top: .3em; font-variant-numeric: tabular-nums; user-select: none; }
.ln.ind .tx { text-indent: 1.6em; }
.ln.hl { background: var(--mark); }
@container passage (min-width: 540px) { .ln .tx { white-space: nowrap; } }
@container passage (max-width: 539px) {
  .lines { line-height: 1.75; }
  .ln { display: inline; }
  .ln.ind::before { content: ""; display: block; height: .6em; }
  .ln.ind:first-child::before { height: 0; }
  .ln .tx::after { content: " "; }
  .ln .no { display: inline-block; padding: 0 4px; margin-right: 3px; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; line-height: 1.4; vertical-align: 2px; }
  .ln .no:empty, .ln.first .no { display: none; }
  .ln.ind .tx { text-indent: 0; }
}
.q { display: grid; grid-template-columns: 2.1em minmax(0, 1fr); gap: 0 6px; padding: 14px 0 16px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + var(--lbar-h) + 16px); }
.q.q-todo { box-shadow: inset 3px 0 0 var(--bad); padding-left: 8px; }
.qn { font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.45; }
.qtype { font-family: var(--ui); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stem { margin: 0 0 10px; }
.qtext { margin: 0 0 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 6px; }
.choices { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choice { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 8px; align-items: start; cursor: pointer; padding: 6px 8px 6px 4px; border-radius: 6px; }
.choice:hover { background: var(--surface-2); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bub { width: 1.65em; height: 1.65em; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-family: var(--ui); font-weight: 600; font-size: 13.5px; }
.choice input:checked + .bub { background: var(--ink); color: var(--surface); }
.choice input:focus-visible + .bub { outline: 2px solid var(--accent); outline-offset: 2px; }
.is-sub .choice, .sheet .choice:has(input:disabled) { cursor: default; }
.choice.right { background: var(--good-bg); }
.choice.right .bub { border-color: var(--good); color: var(--good); }
.choice.right input:checked + .bub { background: var(--good); color: #fff; }
.choice.wrong { background: var(--bad-bg); }
.choice.wrong input:checked + .bub { background: var(--bad); border-color: var(--bad); color: #fff; }
.verdict { font-family: var(--ui); margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; }
.v-ok { color: var(--good); font-weight: 700; }
.v-no { color: var(--bad); font-weight: 700; }
.expl { margin: 6px 0 0; padding-left: 12px; border-left: 3px solid var(--line); font-size: 15.5px; }
.lref { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.qfoot { padding-top: 18px; font-family: var(--ui); }
.result { display: grid; gap: 8px; }
.score { font-family: var(--head); font-size: 24px; font-weight: 700; margin: 0; }
.tutor { border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; font-size: 14.5px; }

/* article (magazine) */
.mag { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-family: var(--read); }
.mhead { padding: 36px clamp(20px, 5vw, 64px) 8px; }
.section-tag { font-family: var(--head); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 13.5px; color: var(--accent); }
.mtitle { font-family: var(--read); font-weight: 800; font-size: clamp(38px, 6.5vw, 66px); line-height: 1; letter-spacing: -.02em; margin: 10px 0 14px; }
.dek { font-size: clamp(19px, 2.4vw, 24px); line-height: 1.35; font-style: italic; margin: 0 0 12px; max-width: 46ch; }
.byline { font-family: var(--ui); font-size: 13.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 20px; }
.inbrief { border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 12px 0 6px; margin: 6px 0 18px; }
.inbrief h4, .box h4, .more h4 { font-family: var(--head); font-size: 13.5px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px; }
.inbrief ul { margin: 0; padding-left: 20px; font-family: var(--ui); font-size: 15.5px; }
.inbrief li { margin: 6px 0; }
.mpage { padding: 6px clamp(20px, 5vw, 64px) 26px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.65; }
.folio { font-family: var(--ui); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 8px 0 6px; }
.mpage p { margin: 0 0 .9em; }
.mpage > p, .mpage > h3, .mpage > blockquote, .mpage > aside, .mpage > figure { max-width: 68ch; }
@media (min-width: 960px) {
  .mpage:not(.summary):not(.more) { column-count: 2; column-gap: 40px; column-rule: 1px solid var(--line); }
  .mpage:not(.summary) > p, .mpage:not(.summary) > h3, .mpage:not(.summary) > blockquote, .mpage:not(.summary) > aside { max-width: none; }
  .mpage .folio, .mpage figure.arcs { column-span: all; }
  .mpage > figure.arcs { max-width: none; }
  .mpage > aside, .mpage > blockquote, .mpage > h3 { break-inside: avoid; }
}
.lede::first-letter { float: left; font-size: 4.1em; line-height: .8; padding: 6px 8px 0 0; font-weight: 800; color: var(--accent); }
.mpage h3 { font-family: var(--head); font-size: 20px; letter-spacing: .01em; margin: 1.2em 0 .4em; }
.pull { margin: .6em 0 1em; padding: 12px 0; border-top: 3px solid var(--star); border-bottom: 1px solid var(--star); font-size: 23px; line-height: 1.3; font-weight: 600; }
.box { background: var(--surface-2); padding: 14px 16px; margin: .4em 0 1em; font-family: var(--ui); font-size: 15px; border-radius: 6px; }
.box p { margin: 0 0 .6em; }
.box dl { margin: 0; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 4px 14px; }
.box dt { font-weight: 700; }
.box dd { margin: 0; }
figure.arcs { margin: 10px 0 18px; padding: 14px 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
figure.arcs figcaption { font-family: var(--ui); font-size: 14.5px; max-width: 80ch; }
figure.arcs svg { display: block; width: 100%; max-width: 720px; margin: 8px auto 0; font-family: var(--ui); }
.arcs .base { stroke: var(--line); stroke-width: 1; }
.arcs .arc { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; }
.arcs .arcname { fill: var(--ink); font-size: 15px; font-weight: 600; }
.more { font-family: var(--ui); font-size: 14.5px; }
.more ul { padding-left: 18px; }
.summary textarea { width: 100%; min-height: 280px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); padding: 14px; line-height: 1.65; resize: vertical; font-family: var(--read); font-size: 17px; }
.summary textarea:focus { border-color: var(--accent); outline: none; }
.summary .row { font-family: var(--ui); margin: 10px 0; }
.wc { font-family: var(--ui); font-variant-numeric: tabular-nums; font-weight: 600; }
.wc.ok { color: var(--good); }
.rubric { padding-left: 20px; font-family: var(--ui); font-size: 15px; }
.model { background: var(--surface-2); padding: 14px 18px; border-radius: 6px; }

/* vocabulary */
.vgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 16px; }
.vcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.vcard p { margin: 6px 0 0; font-size: 15px; }
.vword { font-family: var(--head); font-size: 22px; font-weight: 700; }
.vsent { font-family: var(--read); font-size: 16px !important; }
.vsent mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
.extra { columns: 2 260px; padding-left: 20px; }

/* videos, khan */
.vids { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 16px; }
.vid { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; align-content: start; }
.vid h3 { margin: 0; font-size: 18px; }
.vid p { margin: 0; }
.vid ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--muted); }
.vid [aria-pressed="true"] { color: var(--good); border-color: var(--good); }
.tag { justify-self: start; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.khan { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.khan ol { margin: 8px 0; padding-left: 22px; }
.khan .muted { font-size: 14px; margin: 0; }
.mini { background: var(--surface-2); padding: 4px 20px 12px; border-radius: var(--radius); margin-bottom: 20px; }

/* footer */
.foot { background: var(--night); color: rgba(255, 255, 255, .78); padding: 40px 0 calc(32px + env(safe-area-inset-bottom, 0px)); margin-top: 0; }
.foot-in { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: grid; gap: 14px; }
.foot-brand { display: grid; gap: 2px; }
.foot-brand strong { color: #fff; font-family: var(--head); font-size: 18px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-nav a { color: #fff; text-decoration: none; font-weight: 500; }
.foot .fine { color: rgba(255, 255, 255, .55); margin: 0; }

@media (max-width: 640px) {
  .top-in { gap: 10px; }
  .brand { font-size: 17px; gap: 7px; }
  .mark { width: 26px; height: 26px; }
  .nav { gap: 0; }
  .top .btn-sm { padding: 6px 12px; }
  .acct .link-quiet { display: none; }
  .nav a { padding: 8px 8px; }
  .acct { gap: 8px; }
  .acct .chip { display: none; }
  .hero { padding: 52px 0 60px; }
  .band { padding: 44px 0; }
  .passage, .questions, .src { padding-left: 14px; padding-right: 14px; }
  .lprog .meter { width: 80px; }
}
@media (max-width: 370px) { .nav a { padding: 8px 5px; font-size: 14.5px; } .brand { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
