/* ============ Tokens ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2328;
  --text-2: #5b6470;
  --line: #e3e6ea;
  --line-2: #d0d5db;
  --brand: #188038;
  --brand-ink: #0d652d;
  --ok: #188038;
  --ok-bg: #e6f4ea;
  --bad: #c5221f;
  --bad-bg: #fce8e6;
  --sel: #1a73e8;
  --sel-bg: rgba(26, 115, 232, .10);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --accent: var(--brand);
  --tint: #e6f4ea;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'Roboto Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: clip; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-soft); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; white-space: nowrap; }
kbd { font-family: var(--font); font-size: .78em; font-weight: 600; background: #fff; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: .1em .45em; white-space: nowrap; }
.muted { color: var(--text-2); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
[hidden] { display: none !important; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: 600 14px/1 var(--font); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--text); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--bg-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(.93); }
.btn.ghost { background: transparent; }
.btn.lg { padding: 14px 22px; font-size: 15px; }

/* ============ Header / footer ============ */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 16px; }
.site-nav { display: flex; gap: 4px; overflow-x: auto; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: 14px; color: var(--text-2); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { background: var(--bg-soft); color: var(--text); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0; font-size: 13px; color: var(--text-2); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ============ Home ============ */
.hero { background: linear-gradient(180deg, #f3f8f4 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand-ink); background: var(--ok-bg); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.025em; }
.hl { color: var(--brand); }
.lead { font-size: 18px; color: var(--text-2); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-demo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.demo-name { font-weight: 600; min-width: 34px; }
.demo-fx { color: var(--text-2); font-style: italic; }
.demo-formula { font-family: var(--mono); }
.demo-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.demo-grid th { background: #f8f9fa; color: var(--text-2); font-weight: 500; font-size: 12px; border: 1px solid var(--line); padding: 3px 8px; width: 36px; }
.demo-grid td { border: 1px solid var(--line); padding: 6px 10px; }
.demo-grid td.n { text-align: right; font-variant-numeric: tabular-nums; }
.demo-grid td.active { outline: 2px solid var(--sel); outline-offset: -2px; background: var(--sel-bg); font-weight: 600; }
.demo-check { position: absolute; right: 14px; bottom: 14px; background: var(--ok); color: #fff; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow); }
.section-title { font-size: 24px; margin: 48px 0 20px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.course-card { display: flex; flex-direction: column; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: box-shadow .15s, transform .15s, border-color .15s; }
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent); }
.course-card p { color: var(--text-2); font-size: 14px; flex: 1; margin: 0 0 16px; }
.course-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--tint); color: var(--accent); display: grid; place-items: center; font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.course-icon.big { width: 64px; height: 64px; font-size: 32px; margin: 0; flex: none; }
.meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.progress { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-step { background: var(--bg-soft); border-radius: var(--radius); padding: 22px; }
.how-step .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; }
.how-step h3 { font-size: 17px; }
.how-step p { margin: 0; color: var(--text-2); font-size: 14px; }

/* ============ Course page ============ */
.course-hero { background: var(--tint); border-bottom: 1px solid var(--line); padding: 20px 0 28px; }
.course-hero-row { display: flex; gap: 20px; align-items: center; margin: 12px 0 20px; }
.course-hero h1 { font-size: 34px; margin: 0; }
.course-hero .lead { margin: 4px 0 0; }
.course-progress { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.course-progress .progress { width: 220px; background: #fff; }
.crumbs { font-size: 13px; color: var(--text-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 4px; opacity: .6; }
.lesson-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.lesson-list a { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
.lesson-list a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.lnum { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--bg-soft); color: var(--text-2); font-size: 14px; }
.is-done .lnum { background: var(--accent); color: #fff; }
.ltitle { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.ltitle small { font-weight: 400; color: var(--text-2); font-size: 13px; }
.lgo { font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ============ Lesson page ============ */
.lesson-page { padding: 20px 0 0; }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 10px 0 18px; }
.lesson-head h1 { font-size: 28px; margin: 6px 0 0; }
.lesson-meta { font-size: 13px; color: var(--text-2); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; background: var(--tint); color: var(--accent); padding: 3px 9px; border-radius: 999px; margin-right: 6px; }
.done-pill { background: var(--ok-bg); color: var(--ok); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.complete-banner { display: flex; align-items: center; gap: 16px; background: var(--ok-bg); border: 1px solid #b7dfc3; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; animation: pop .35s ease; }
.complete-banner .party { font-size: 28px; }
.complete-banner div { flex: 1; display: flex; flex-direction: column; }
.complete-banner span { font-size: 14px; color: var(--text-2); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.lesson-body { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.instructions { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.intro { font-size: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.intro p:first-child { margin-top: 0; }
.intro ul { padding-left: 20px; }
.panel-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-bottom: 12px; }
.tasks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.task { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; transition: background .2s, border-color .2s; }
.task .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line); }
.task.ok { background: var(--ok-bg); border-color: #b7dfc3; }
.task.ok .tick { background: var(--ok); color: #fff; border-color: var(--ok); }
.task.bad { border-color: #f1b8b3; }
.task.bad .tick { background: var(--bad-bg); color: var(--bad); border-color: #f1b8b3; }
.task-main { min-width: 0; }
.task-msg { font-size: 14px; color: var(--bad); margin-top: 4px; }
.task-msg:empty { display: none; }
.task-hint { font-size: 14px; background: #fff8e1; border: 1px solid #f6e3a1; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { padding: 9px 14px; }
.kb-help { margin-top: 18px; font-size: 14px; color: var(--text-2); }
.kb-help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.kb-help ul { padding-left: 18px; margin: 8px 0 0; }
.kb-help li { margin-bottom: 4px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ============ Spreadsheet ============ */
.sheet-app, .doc-app { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sheet-title { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.file-icon { width: 24px; height: 24px; border-radius: 5px; background: #188038; color: #fff; display: grid; place-items: center; font-size: 14px; }
.file-icon.doc { background: #1a73e8; }
.fbar-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); height: 34px; }
.name-box { width: 90px; padding: 0 10px; display: flex; align-items: center; font-size: 13px; font-weight: 500; border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.fx { display: flex; align-items: center; padding: 0 10px; color: #80868b; font-style: italic; font-family: Georgia, serif; border-right: 1px solid var(--line); }
.fbar { flex: 1; border: 0; outline: 0; padding: 0 10px; font: 14px var(--mono); color: var(--text); min-width: 0; }
.fbar:focus { box-shadow: inset 0 -2px 0 var(--sel); }
.grid-wrap { overflow: auto; max-height: 520px; }
.grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13.5px; user-select: none; outline: none; }
.grid th { background: #f8f9fa; color: #5f6368; font-weight: 500; font-size: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); height: 26px; position: sticky; z-index: 2; }
.grid thead th { top: 0; }
.grid th.rowh { left: 0; z-index: 1; }
.grid th.corner { left: 0; z-index: 3; }
.grid th.hl { background: #d3e3fd; color: #041e49; font-weight: 600; }
.grid td { height: 26px; padding: 0 6px; border-right: 1px solid #e8eaed; border-bottom: 1px solid #e8eaed; white-space: nowrap; overflow: hidden; text-overflow: clip; cursor: cell; position: relative; }
.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid td.bool { text-align: center; }
.grid td.err { color: var(--bad); font-weight: 600; text-align: right; }
.grid td.hdr { font-weight: 700; background: #f6f8f6; }
.grid td.target { background: #fff8e1; }
.grid td.target::after { content: ''; position: absolute; inset: 0; border: 1px dashed #e0b400; pointer-events: none; }
.grid td.in-sel { background: var(--sel-bg); }
.grid td.active { box-shadow: inset 0 0 0 2px var(--sel); background: #fff; }
.grid td.active.target { background: #fffbeb; }
.grid td.editing { text-align: left; font-family: var(--mono); font-size: 13px; overflow: visible; z-index: 1; }
.grid td.copied { outline: 2px dashed var(--sel); outline-offset: -3px; }
.sheet-tabs { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); background: #f8f9fa; padding: 0 10px; height: 34px; font-size: 13px; }
.sheet-tab { background: #fff; border: 1px solid var(--line); border-top: 0; padding: 5px 14px; color: var(--sel); font-weight: 600; border-radius: 0 0 6px 6px; margin-top: -1px; }
.sheet-status { color: var(--text-2); }

/* ============ Doc editor ============ */
.doc-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: #f8f9fa; flex-wrap: wrap; }
.doc-toolbar button { min-width: 32px; height: 30px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; font: 15px var(--font); color: var(--text); padding: 0 8px; }
.doc-toolbar button:hover { background: #e8eaed; }
.doc-toolbar button.on { background: #d3e3fd; color: #041e49; }
.doc-toolbar select { height: 30px; border: 1px solid transparent; background: transparent; border-radius: 6px; font: 14px var(--font); padding: 0 6px; cursor: pointer; }
.doc-toolbar select:hover { background: #e8eaed; }
.doc-toolbar .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 6px; }
.doc-canvas { background: #f1f3f4; padding: 28px 20px; max-height: 560px; overflow: auto; }
.doc-page { background: #fff; max-width: 680px; min-height: 420px; margin: 0 auto; padding: 56px 64px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); outline: none; font: 15px/1.6 Arial, sans-serif; color: #202124; }
.doc-page h1 { font-size: 26px; font-weight: 400; margin: 0 0 12px; }
.doc-page h2 { font-size: 20px; font-weight: 400; margin: 0 0 10px; }
.doc-page p { margin: 0 0 10px; }

/* ============ Shortcut drill ============ */
.drill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drill-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.drill-list li.current { background: var(--tint); font-weight: 600; }
.drill-list .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line); }
.drill-list li.ok .tick { background: var(--ok); color: #fff; border-color: var(--ok); }
.drill-list li.shown .tick { background: #fff8e1; color: #a07800; border-color: #f6e3a1; }
.drill-list .dname { flex: 1; }
.drill-list .dkeys { font-size: 13px; }
.drill-card, .quiz-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px 40px; text-align: center; min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; outline: none; transition: border-color .2s, background .2s; }
.drill-count { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--bg-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 18px; }
.drill-card h2 { font-size: 34px; margin: 4px 0 8px; }
.drill-card .muted { margin: 0; }
.drill-desc { color: var(--text-2); margin: 0; }
.pressed { margin: 28px 0 10px; min-height: 52px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-2); border: 2px dashed var(--line-2); border-radius: 12px; padding: 10px 24px; min-width: 260px; }
.pressed kbd, .answer-keys kbd { font-size: 20px; padding: .2em .6em; }
.plus { margin: 0 6px; color: var(--text-2); }
.answer-keys { margin: 6px 0 4px; padding: 10px 18px; background: #fff8e1; border-radius: 10px; }
.drill-actions, .quiz-actions { display: flex; gap: 10px; margin-top: 22px; justify-content: center; }
.drill-card.hit { border-color: var(--ok); background: var(--ok-bg); }
.drill-card.hit .pressed { border-color: var(--ok); color: var(--ok); }
.drill-card.miss .pressed { animation: shake .35s; border-color: #f1b8b3; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.big-check { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 36px; display: grid; place-items: center; margin-bottom: 16px; }
.big-check.retry { background: #f9ab00; }

/* ============ Quiz ============ */
.quiz-card { text-align: left; align-items: stretch; justify-content: flex-start; padding: 32px; }
.quiz-card .drill-count { align-self: flex-start; }
.quiz-card.done { align-items: center; text-align: center; justify-content: center; }
.quiz-card h2 { font-size: 22px; margin-bottom: 20px; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; text-align: left; font: 15px var(--font); padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; color: var(--text); transition: border-color .15s, background .15s; }
.option:hover:not(:disabled) { border-color: var(--accent); background: var(--tint); }
.option:disabled { cursor: default; }
.option .letter { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); font-weight: 700; font-size: 13px; }
.option.correct { border-color: var(--ok); background: var(--ok-bg); }
.option.correct .letter { background: var(--ok); color: #fff; }
.option.wrong { border-color: var(--bad); background: var(--bad-bg); }
.option.wrong .letter { background: var(--bad); color: #fff; }
.explain { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.explain.ok { background: var(--ok-bg); }
.explain.bad { background: var(--bad-bg); }
.quiz-actions { justify-content: flex-end; }
.quiz-card.done .quiz-actions { justify-content: center; }
.quiz-dots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.quiz-dots span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-2); }
.quiz-dots .cur { border-color: var(--accent); color: var(--accent); }
.quiz-dots .ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.quiz-dots .bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.empty { padding: 80px 24px; text-align: center; }

/* ============ Header extras ============ */
.header-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.block { display: flex; justify-content: center; width: 100%; }
.plan-pill { display: inline-flex; align-items: center; gap: 4px; background: #fef7e0; color: #8a5a00; border: 1px solid #f6e3a1; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap; }

/* ============ Access tags & locks ============ */
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag.free { background: var(--ok-bg); color: var(--ok); }
.tag.pro { background: #fef7e0; color: #8a5a00; }
.tag.soon { background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.course-card.soon { opacity: .7; border-style: dashed; cursor: default; }
.course-card.soon:hover { transform: none; box-shadow: none; border-color: var(--line); }
.hero-tags { margin-bottom: 6px; }
.lesson-list a.is-locked .ltitle { color: var(--text-2); }
.lesson-list a.is-locked .lnum { font-size: 13px; }
.lesson-list a.is-locked .lgo { color: #8a5a00; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head a { font-weight: 600; font-size: 14px; color: var(--brand); text-decoration: none; white-space: nowrap; }
.page-title { font-size: 34px; margin: 32px 0 8px; }
.section-title.center { text-align: center; }
.pro-teaser { margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: linear-gradient(120deg, #0d652d, #188038); color: #fff; border-radius: 16px; padding: 32px 36px; }
.pro-teaser h2 { font-size: 26px; }
.pro-teaser p { margin: 0; opacity: .9; max-width: 620px; }
.pro-teaser .btn.primary { background: #fff; color: var(--brand-ink); border-color: #fff; }

/* ============ Pricing ============ */
.pricing-head { text-align: center; }
.pricing-head .lead { margin: 0 auto; }
.billing-toggle { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-top: 24px; }
.billing-toggle button { font: 600 14px var(--font); border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--text-2); }
.billing-toggle button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.save { font-size: 11px; background: var(--ok-bg); color: var(--ok); padding: 2px 6px; border-radius: 999px; margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 24px; margin-top: 32px; }
.plan { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 28px; background: #fff; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan h3 { font-size: 18px; }
.ribbon { position: absolute; top: -12px; right: 20px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 4px; }
.price .amt { font-size: 42px; font-weight: 800; letter-spacing: -.02em; }
.price .per { color: var(--text-2); }
.price-note { font-size: 13px; color: var(--text-2); }
.feat { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; flex: 1; font-size: 15px; }
.feat li { padding-left: 26px; position: relative; }
.feat li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 800; }
.included { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.included > * { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.included a:hover { border-color: var(--accent); }
.included .course-icon { margin: 0; width: 38px; height: 38px; font-size: 18px; flex: none; }
.included small { display: block; color: var(--text-2); font-size: 13px; }
.included .soon { border-style: dashed; opacity: .75; }
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--text-2); }

/* ============ Checkout ============ */
.checkout { max-width: 560px; padding-top: 24px; }
.checkout-card { border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-top: 12px; box-shadow: var(--shadow); }
.checkout-card h1 { font-size: 26px; }
.test-banner { background: #fff8e1; border: 1px solid #f6e3a1; color: #6b4e00; font-size: 13px; font-weight: 600; padding: 10px 12px; border-radius: 10px; margin-bottom: 18px; }
.summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg-soft); border-radius: 12px; padding: 16px; }
.summary small { display: block; color: var(--text-2); font-size: 13px; }
.sum-price { font-size: 24px; font-weight: 800; white-space: nowrap; }
.sum-price small { display: inline; font-weight: 500; }
.fine { font-size: 13px; color: var(--text-2); margin: 14px 0 0; }

/* ============ Paywall ============ */
.paywall { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 420px; }
.paywall-preview { padding: 28px; filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; max-height: 420px; overflow: hidden; }
.paywall-card { position: absolute; inset: 0; margin: auto; width: min(520px, calc(100% - 32px)); height: fit-content; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(16, 24, 40, .16); padding: 32px; text-align: center; }
.paywall-card .lock { font-size: 34px; }
.paywall-card h2 { margin-top: 8px; }
.paywall-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* ============ Account ============ */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.plan-status { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.acct-courses { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; font-size: 14px; }
.acct-courses li { display: flex; justify-content: space-between; }
.acct-courses a { text-decoration: none; }
.acct-courses a:hover { text-decoration: underline; }
.dev-tools { margin-top: 20px; border-style: dashed; }
.dev-tools .btn { margin: 4px 6px 0 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #202124; color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); z-index: 50; transition: opacity .4s, transform .4s; max-width: calc(100% - 32px); text-align: center; }
.toast.out { opacity: 0; transform: translate(-50%, 10px); }

/* ============ Waitlist & legal ============ */
.waitlist-card h1 { margin-top: 14px; }
.wl-form { display: grid; gap: 16px; margin-top: 20px; }
.wl-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.wl-form input, .wl-form select { font: 16px var(--font); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--text); }
.wl-form input:focus, .wl-form select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.wl-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-error { color: var(--bad); background: var(--bad-bg); border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 14px; }
.wl-done { text-align: center; padding: 16px 0 4px; }
.wl-done .big-check { margin: 0 auto 12px; }
.price-note.center { text-align: center; margin-top: 10px; }
.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin-top: 28px; }
.legal p, .legal li { color: #3c4043; }
.small-print { font-size: 13px; margin-top: 16px; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .lesson-body { grid-template-columns: 1fr; }
  .instructions { position: static; max-height: none; }
  .how-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .pro-teaser { padding: 24px; }
  .paywall-card { position: relative; inset: auto; margin: -300px auto 16px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .logo span:last-child { display: none; }
  .header-right { gap: 6px; }
  .site-nav a { padding: 8px 8px; }
  .site-nav a[data-nav="account"] { display: none; } /* still reachable from the footer and Pro pill */
  .lesson-head { flex-direction: column; align-items: flex-start; }
  .complete-banner { flex-wrap: wrap; }
  .drill-card, .quiz-card { padding: 28px 18px; }
  .drill-card h2 { font-size: 26px; }
  .doc-page { padding: 28px 22px; }
  .pressed { min-width: 0; width: 100%; }
}
