/* AI Ready — design system v2: warm neutrals, one electric accent, no gradients */
:root {
  --bg: #f6f5f1;
  --bg-2: #efede7;
  --paper: #ffffff;
  --ink: #101216;
  --ink-2: #2a2e36;
  --muted: #5b6068;
  --faint: #8a8f98;
  --line: #e2dfd6;
  --line-strong: #cfcbbf;
  --accent: #2748ff;
  --accent-ink: #1a34d1;
  --accent-soft: #e8ecff;
  --lime: #d6ff3f;
  --ok: #0a7a4f;
  --ok-soft: #e1f4ea;
  --warn: #8a5a00;
  --warn-soft: #fbf0d4;
  --danger: #b42318;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(16, 18, 22, .04), 0 12px 32px -14px rgba(16, 18, 22, .16);
  --shadow-lg: 0 2px 4px rgba(16, 18, 22, .05), 0 30px 60px -24px rgba(16, 18, 22, .28);
  --c-writing: #2549d6;
  --c-math: #0e7490;
  --c-coding: #6d28d9;
  --c-creativity: #be185d;
  --c-safety: #047857;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink);
  background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.02; margin: 0 0 .45em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.8rem, 6.4vw, 5.1rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
h3, h4 { font-family: var(--font); font-weight: 650; line-height: 1.25; margin: 0 0 .4em; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); }
img, svg { max-width: 100%; }
ul { padding-left: 1.2em; }
button, input, textarea, select { font: inherit; color: inherit; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 200; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 245, 241, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.wordmark { font-family: var(--serif); font-size: 1.75rem; line-height: 1; letter-spacing: -0.01em; padding-bottom: 2px; }
.logo-mark { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: .98rem; padding: 10px 16px; border-radius: 999px; transition: background .2s, color .2s; }
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-links a[aria-current="page"] { color: #fff; background: var(--ink); }
.tabbar { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  border: 1.5px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, background .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(39, 72, 255, .7); }
.btn:active { transform: none; }
.btn.secondary { background: var(--paper); border-color: var(--line-strong); color: var(--ink); }
.btn.secondary:hover { border-color: var(--ink); background: var(--paper); box-shadow: none; }
.btn.dark { background: var(--ink); border-color: var(--ink); }
.btn.dark:hover { background: #000; border-color: #000; box-shadow: none; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; box-shadow: none; }
.btn.success { background: var(--ok); border-color: var(--ok); }
.btn.success:hover { background: #075f3d; border-color: #075f3d; box-shadow: none; }
.btn.sm { min-height: 42px; padding: 0 18px; font-size: .94rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn .ic { width: 18px; height: 18px; }

/* ---------- Layout ---------- */
main { flex: 1; outline: none; }
h1[tabindex="-1"]:focus { outline: none; }
.view { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
section.block { padding: 96px 0; }
section.block.tight { padding: 64px 0; }
section.block.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.18rem; }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .78rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 16px; }
.mark { box-shadow: inset 0 -.32em 0 var(--lime); padding: 0 .06em; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c5 { grid-template-columns: repeat(5, 1fr); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-soft); border-color: #bfe4d0; }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: #efd99b; }
.pill.blue { color: var(--accent-ink); background: var(--accent-soft); border-color: #cbd5ff; }
.pill .ic { width: 14px; height: 14px; stroke-width: 2.2; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%23cfcbbf'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; position: relative; }
.hero .lead { font-size: 1.28rem; color: var(--muted); max-width: 32em; margin: 24px 0 34px; }
.hero-meta { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 30px; color: var(--muted); font-size: .95rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .ic { color: var(--ok); width: 18px; height: 18px; stroke-width: 2.4; }

/* Mock “product” imagery */
.stage { position: relative; min-height: 520px; }
.mock { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); }
.cert-mock { position: absolute; left: 0; top: 24px; width: 82%; padding: 28px 30px 26px; transform: rotate(-2.5deg); z-index: 2; }
.cert-mock .rule { height: 1px; background: var(--line); margin: 18px 0; }
.cert-mock .cm-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.cert-mock .cm-title { font-family: var(--serif); font-size: 2.05rem; line-height: 1.05; margin: 8px 0 6px; }
.cert-mock .cm-name { font-size: 1.05rem; font-weight: 600; }
.cert-mock .cm-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; font-size: .78rem; color: var(--muted); }
.cert-mock .cm-foot b { display: block; color: var(--ink); font-size: .85rem; }
.seal { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 5px var(--accent-soft); }
.seal .ic { width: 28px; height: 28px; }
.li-mock { position: absolute; right: 0; bottom: 8px; width: 74%; padding: 22px; transform: rotate(1.8deg); z-index: 3; }
.li-mock .lm-h { font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; display: flex; justify-content: space-between; }
.li-row { display: flex; gap: 14px; align-items: flex-start; }
.li-row .seal { width: 46px; height: 46px; box-shadow: none; border-radius: 12px; }
.li-row .seal .ic { width: 22px; height: 22px; }
.li-row b { display: block; line-height: 1.25; font-size: .98rem; }
.li-row span { display: block; font-size: .84rem; color: var(--muted); }
.li-row .chipish { display: inline-block; margin-top: 8px; font-size: .78rem; font-weight: 600; padding: 4px 12px; border: 1.5px solid var(--accent); color: var(--accent-ink); border-radius: 999px; }
.badge-float { position: absolute; right: 6%; top: 0; z-index: 4; display: flex; gap: 12px; align-items: center; padding: 12px 18px 12px 12px; border-radius: 18px; animation: bob 7s ease-in-out infinite; }
.badge-float b { display: block; font-size: .9rem; line-height: 1.2; }
.badge-float span { font-size: .78rem; color: var(--muted); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Stat strip ---------- */
.stat-strip { background: var(--ink); color: #fff; border-radius: 28px; padding: 40px 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-strip b { display: block; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 400; line-height: 1; color: var(--lime); }
.stat-strip span { color: #c5c8cf; font-size: .98rem; display: block; margin-top: 8px; }

/* ---------- Where it shows up ---------- */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.use { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.use-art { height: 210px; background: var(--bg-2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; padding: 22px; }
.use-body { padding: 26px 28px 30px; }
.use-body h3 { font-size: 1.3rem; }
.use-body p { color: var(--muted); margin: 0; font-size: 1rem; }
.mini-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; width: 100%; max-width: 300px; box-shadow: var(--shadow); font-size: .88rem; }
.mini-card .row { display: flex; gap: 12px; align-items: center; }
.mini-card .seal { width: 38px; height: 38px; border-radius: 10px; box-shadow: none; }
.mini-card .seal .ic { width: 18px; height: 18px; }
.mini-card small { color: var(--muted); display: block; }
.mini-card hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.mini-card .line { height: 8px; border-radius: 4px; background: var(--bg-2); margin-bottom: 8px; }
.mini-card .line.k { background: var(--ink); width: 45%; }
.fineprint { color: var(--faint); font-size: .88rem; margin-top: 22px; }

/* ---------- Pathway ---------- */
.pathway { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; padding: 0; margin: 0; }
.step { position: relative; padding: 0 22px 0 0; }
.step-node { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line-strong); margin-bottom: 20px; position: relative; z-index: 1; color: var(--accent-ink); box-shadow: var(--shadow); }
.step-node .ic { width: 26px; height: 26px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: 68px; right: 12px; height: 0; border-top: 1.5px dashed var(--line-strong); }
.step .num { font-family: var(--mono); font-size: .74rem; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.step h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.step p { color: var(--muted); font-size: .98rem; margin: 0; }

/* ---------- Certificates ---------- */
.cert-card { position: relative; }
.cert-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.cert-seal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 0 0 5px var(--accent-soft); flex: none; }
.cert-seal .ic { width: 27px; height: 27px; }
.cert-card h3 { font-size: 1.4rem; margin: 0; }
.cert-card.adv .cert-seal { background: var(--ink); box-shadow: 0 0 0 5px var(--bg-2); }
.checklist { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .ic { color: var(--ok); width: 20px; height: 20px; stroke-width: 2.4; margin-top: 3px; }

/* ---------- Levels & categories ---------- */
.level-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s, border-color .2s, box-shadow .2s; }
.level-card:hover, .cat-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow-lg); }
.lvl-bars { display: flex; gap: 5px; margin-bottom: 18px; }
.lvl-bars i { width: 30px; height: 6px; border-radius: 3px; background: var(--line); }
.lvl-bars i.on { background: var(--accent); }
.level-card ul { color: var(--muted); font-size: .98rem; margin: 12px 0 18px; padding-left: 1.1em; }
.level-card .go { margin-top: auto; font-weight: 600; color: var(--accent-ink); }
.cat-card { text-decoration: none; color: inherit; padding: 24px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.cat-card h3 { font-size: 1.05rem; margin: 16px 0 4px; }
.cat-card p { color: var(--muted); font-size: .92rem; margin: 0; line-height: 1.45; }
.cat-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 10%, white); color: var(--cc); border: 1px solid color-mix(in srgb, var(--cc) 25%, white); flex: none; }
.cat-ic .ic { width: 24px; height: 24px; }
[data-cat="writing"] { --cc: var(--c-writing); }
[data-cat="math"] { --cc: var(--c-math); }
[data-cat="coding"] { --cc: var(--c-coding); }
[data-cat="creativity"] { --cc: var(--c-creativity); }
[data-cat="safety"] { --cc: var(--c-safety); }

/* ---------- Proof / testimonials ---------- */
.proof { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.quote-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.quote-card blockquote { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin: 0; }
.quote-card .who { display: flex; gap: 14px; align-items: center; color: #c5c8cf; font-size: .95rem; }
.quote-card .who b { color: #fff; display: block; }
.avatar-sm { width: 46px; height: 46px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.voice-slot { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 30px; background: transparent; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.voice-slot .stars { display: flex; gap: 4px; color: var(--line-strong); }
.voice-slot .stars .ic { width: 20px; height: 20px; fill: currentColor; stroke: none; }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: 200px 1fr; gap: 44px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 32px; padding: 44px; box-shadow: var(--shadow); }
.portrait { width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--serif); font-size: 3.6rem; box-shadow: 0 0 0 8px var(--accent-soft); margin-inline: auto; }
.founder blockquote { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }

/* ---------- CTA ---------- */
.cta-band { text-align: center; padding: 72px 28px; border-radius: 32px; background: var(--accent); color: #fff; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: #dbe2ff; font-size: 1.15rem; margin-bottom: 28px; }
.cta-band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-band .btn:hover { background: var(--lime); border-color: var(--lime); box-shadow: none; }
.cta-band .btn.secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.cta-band .btn.secondary:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ---------- Badge ---------- */
.badge { width: 68px; height: 68px; flex: none; }
.badge.lg { width: 108px; height: 108px; }
.badge.sm { width: 50px; height: 50px; }
.badge.locked { filter: grayscale(1) opacity(.35); }

/* ---------- Lessons ---------- */
.page-head { padding: 64px 0 28px; }
.page-head h1 { font-size: clamp(2.6rem, 5.4vw, 4.2rem); }
.page-head p.lead { color: var(--muted); font-size: 1.2rem; max-width: 36em; }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 26px; display: grid; gap: 22px; box-shadow: var(--shadow); }
.filter-group h3 { font-family: var(--mono); font-weight: 500; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 20px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line-strong); color: var(--ink); font-weight: 550; cursor: pointer; transition: background .18s, border-color .18s, color .18s, transform .15s; }
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip .ic { width: 20px; height: 20px; color: var(--cc, var(--muted)); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .ic { color: var(--lime); }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 18px; gap: 12px; flex-wrap: wrap; }
.result-bar strong { font-size: 1.05rem; }
.lesson-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 90px; }
.lesson-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; padding: 26px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s; }
.lesson-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow-lg); }
.lesson-card.done { background: #fbfdfb; border-color: #a9d6bf; }
.lesson-card h3 { font-size: 1.15rem; margin: 0; }
.lesson-card p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.lesson-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-meta .pill[style*="--cc"], .lesson-meta .pill[style*="color:var(--cc)"] { background: color-mix(in srgb, var(--cc) 8%, white); border-color: color-mix(in srgb, var(--cc) 22%, white); }
.lesson-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: .9rem; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.status.done { color: var(--ok); } .status.done .dot { background: var(--ok); }
.status.prog { color: var(--warn); } .status.prog .dot { background: #e0a100; }
.status.todo { color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; border: 1.5px dashed var(--line-strong); border-radius: 24px; grid-column: 1 / -1; color: var(--muted); }

/* ---------- Lesson detail ---------- */
.crumb { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; color: var(--accent-ink); padding: 8px 0; }
.crumb .ic { transform: rotate(180deg); width: 18px; height: 18px; }
.lesson-hero { display: flex; gap: 28px; align-items: center; padding: 20px 0 32px; }
.lesson-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin: 12px 0 0; }
.lesson-body { display: grid; gap: 20px; padding-bottom: 90px; }
.lb { padding: 30px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); }
.lb h2 { font-family: var(--font); font-weight: 650; font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.3; display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.lb h2 .n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; font-weight: 500; }
.lb ul { margin: 0; display: grid; gap: 10px; }
.chat { display: grid; gap: 12px; }
.bubble { padding: 16px 18px; border-radius: 18px; font-size: 1rem; }
.bubble small { display: block; font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; margin-bottom: 6px; color: var(--muted); }
.bubble.you { background: var(--accent-soft); margin-right: 8%; border-top-left-radius: 6px; }
.bubble.ai { background: var(--bg-2); margin-left: 8%; border-top-right-radius: 6px; }
.bubble.note { background: var(--warn-soft); }
textarea, input[type="text"], input[type="email"], input[type="password"], select { width: 100%; background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 14px 16px; min-height: 52px; }
textarea { min-height: 120px; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
label { font-weight: 600; display: block; margin-bottom: 8px; }
.field { margin-bottom: 20px; }
.hint { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.complete-bar { position: sticky; bottom: 20px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 22px; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.complete-bar.done { border-color: var(--ok); }

/* ---------- Progress ---------- */
.progress { height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.progress.green > i { background: var(--ok); }
.prog-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 10px; }
.prog-head strong { font-size: 1.05rem; }
.prog-head span { color: var(--muted); font-weight: 500; font-size: .95rem; }
.subtask { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); margin-top: 16px; }

/* ---------- Profile ---------- */
.profile-head { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 32px; }
.profile-head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.avatar { width: 116px; height: 116px; border-radius: 50%; border: 1.5px dashed var(--line-strong); display: grid; place-items: center; color: var(--faint); background: var(--bg); text-align: center; font-size: .72rem; font-weight: 600; line-height: 1.2; }
.avatar .ic { width: 32px; height: 32px; margin: 0 auto 2px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px 20px; min-width: 120px; }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 14px; }
.badge-tile { text-align: center; text-decoration: none; color: var(--ink); padding: 18px 10px; border-radius: 20px; border: 1px solid var(--line); background: var(--paper); transition: transform .2s, border-color .2s; font-size: .86rem; font-weight: 600; line-height: 1.3; display: block; }
.badge-tile:hover { transform: translateY(-3px); border-color: var(--ink); }
.badge-tile .badge { margin: 0 auto 10px; display: block; }
.mini-list { display: grid; gap: 12px; }
.mini { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.mini:hover { border-color: var(--ink); transform: translateX(3px); }
.mini b { display: block; line-height: 1.3; }
.mini small { color: var(--muted); }
.mini .go { margin-left: auto; color: var(--accent-ink); }
.notice { display: flex; gap: 14px; padding: 18px 22px; border-radius: 18px; background: var(--accent-soft); border: 1px solid #cbd5ff; }
.notice .ic { color: var(--accent-ink); margin-top: 3px; }
.notice p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.stack { display: grid; gap: 22px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.proto { border: 1.5px dashed var(--line-strong); border-radius: 18px; padding: 18px 22px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; color: var(--muted); }

/* ---------- Portfolio ---------- */
.pf-hero { text-align: center; padding: 64px 0 34px; }
.pf-avatar { width: 116px; height: 116px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--ink); color: var(--lime); font-family: var(--serif); font-size: 2.7rem; }
.pf-bar { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.seg { display: inline-flex; padding: 5px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--paper); }
.seg button { border: 0; background: transparent; padding: 10px 20px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--muted); min-height: 44px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill { padding: 9px 16px; border-radius: 999px; background: color-mix(in srgb, var(--cc) 8%, white); border: 1px solid color-mix(in srgb, var(--cc) 28%, white); color: color-mix(in srgb, var(--cc) 85%, black); font-weight: 600; font-size: .92rem; }
.project { display: flex; flex-direction: column; gap: 12px; }
.project .thumb { height: 120px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 9%, white); border: 1px solid color-mix(in srgb, var(--cc) 20%, white); color: var(--cc); }
.project .thumb .ic { width: 42px; height: 42px; stroke-width: 1.5; }
.project blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--ink); background: var(--bg); border-radius: 0 12px 12px 0; color: var(--ink-2); font-size: .96rem; }
.project.private { background: var(--bg); box-shadow: none; }
.switch { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 52px; height: 30px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 3px; }
.verify-card { background: var(--paper); border: 1px solid var(--line-strong); border-radius: 28px; padding: 34px; box-shadow: var(--shadow); position: relative; }
.verify-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); border-radius: 20px; pointer-events: none; }
.verify-card > * { position: relative; }
.verify-card dl { display: grid; grid-template-columns: 180px 1fr; gap: 14px 20px; margin: 24px 0; }
.verify-card dt { color: var(--muted); font-weight: 500; }
.verify-card dd { margin: 0; font-weight: 600; }
.verify-head { display: flex; align-items: center; gap: 16px; }
.verify-head h3 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); background: var(--bg-2); padding: 3px 10px; border-radius: 8px; font-size: .9rem; font-weight: 500; }

/* ---------- About ---------- */
.about-intro { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 32px; }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.principle { display: flex; gap: 16px; }
.principle h3 { font-size: 1.05rem; margin: 0 0 4px; }
.principle p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding: 64px 0 44px; margin-top: 40px; }
.site-footer .logo { color: #fff; }
.site-footer .muted { color: #b5b9c2; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 44px; }
.foot-grid h4 { font-family: var(--mono); font-weight: 500; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: #9297a1; }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-links a { color: #fff; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.signup { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input { flex: 1 1 200px; background: #1b1e25; border-color: #3a3f49; color: #fff; }
.signup .btn { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.site-footer .hint { color: #9297a1; }
.fine { color: #8a8f98; font-size: .86rem; margin-top: 40px; padding-top: 24px; border-top: 1px solid #2b2f38; }

/* ---------- Dialog & toast ---------- */
dialog { border: 1px solid var(--line-strong); border-radius: 28px; background: var(--paper); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(16, 18, 22, .55); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.dlg { padding: 34px; position: relative; }
.dlg h2 { font-size: 2rem; }
.dlg .close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg-2); cursor: pointer; display: grid; place-items: center; }
.dlg .close:hover { background: var(--line); }
.copy-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.copy-row .mono { flex: 1; overflow-wrap: anywhere; padding: 10px 12px; }
.copy-row label { margin: 0; min-width: 110px; font-size: .88rem; color: var(--muted); font-weight: 500; }
.celebrate { text-align: center; }
.celebrate .cert-seal { width: 92px; height: 92px; margin: 0 auto 22px; animation: pulse 2.2s ease-in-out infinite; }
.celebrate .cert-seal .ic { width: 44px; height: 44px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px var(--accent-soft); } 50% { box-shadow: 0 0 0 16px var(--accent-soft); } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 120; background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px; font-weight: 550; box-shadow: var(--shadow-lg); transition: opacity .3s, transform .3s; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: var(--lime); width: 20px; height: 20px; stroke-width: 2.6; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .stage { max-width: 560px; margin-inline: auto; width: 100%; }
  .grid.c5 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3, .lesson-grid, .uses { grid-template-columns: repeat(2, 1fr); }
  .pathway { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .step:nth-child(2)::after { display: none; }
  .proof { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .profile-head { grid-template-columns: auto 1fr; }
  .profile-head .actions { grid-column: 1 / -1; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  body { font-size: 1.03rem; }
  .nav-cta .btn { min-height: 42px; padding: 0 18px; font-size: .92rem; }
  section.block { padding: 64px 0; }
  .hero { padding: 36px 0 56px; }
  .complete-bar { bottom: 16px; }
  .toast { bottom: 24px; }
}
@media (max-width: 640px) {
  .grid.c2, .grid.c3, .lesson-grid, .two-col, .principles, .uses { grid-template-columns: 1fr; }
  .grid.c5 { grid-template-columns: 1fr 1fr; }
  .pathway { grid-template-columns: 1fr; row-gap: 0; }
  .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; padding: 0 0 30px; }
  .step-node { grid-row: span 3; margin: 0; }
  .step:not(:last-child)::after { top: 62px; bottom: 4px; left: 27px; right: auto; height: auto; width: 0; border-top: 0; border-left: 1.5px dashed var(--line-strong); }
  .stage { min-height: 470px; }
  .cert-mock { width: 92%; padding: 22px; }
  .cert-mock .cm-title { font-size: 1.7rem; }
  .li-mock { width: 88%; }
  .badge-float { right: 0; }
  .stat-strip { padding: 30px 24px; }
  .quote-card { padding: 30px 26px; }
  .founder { grid-template-columns: 1fr; padding: 30px 22px; text-align: center; }
  .founder .btn-row { justify-content: center; }
  .profile-head { grid-template-columns: 1fr; text-align: center; padding: 26px 20px; }
  .avatar { margin-inline: auto; }
  .stats { justify-content: center; }
  .profile-head .lesson-meta { justify-content: center; }
  .verify-card dl { grid-template-columns: 1fr; gap: 2px; }
  .verify-card dd { margin-bottom: 12px; }
  .foot-grid { grid-template-columns: 1fr; }
  .lesson-hero { flex-direction: column; align-items: flex-start; }
  .btn-row .btn { flex: 1 1 100%; }
  .filters { padding: 18px; }
  .chip { min-height: 48px; padding: 0 16px; }
  .complete-bar { padding: 14px 16px; }
  .complete-bar .btn { width: 100%; }
  .complete-bar .muted { display: none; }
  .bubble.you { margin-right: 0; } .bubble.ai { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Course overview extras ---------- */
.step-preview { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.step-preview li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.step-preview li.ok { background: var(--ok-soft); border-color: #bfe4d0; }
.step-preview .sp-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent-ink); flex: none; }
.step-preview li.ok .sp-ic { color: var(--ok); }
.step-preview .ic { width: 18px; height: 18px; }
.step-preview b { display: block; line-height: 1.25; }
.step-preview small { color: var(--muted); }
.cert-h { font-family: var(--font); font-weight: 650; font-size: 1.3rem; margin: 0 0 6px; letter-spacing: -.01em; line-height: 1.2; }

/* ---------- Course player ---------- */
body.in-player .site-footer { display: none; }
body.in-player { padding-bottom: 0; }
.player { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 36px; padding-top: 28px; padding-bottom: 60px; align-items: start; max-width: 1240px; }
.sidebar { position: sticky; top: 98px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); max-height: calc(100vh - 118px); overflow: auto; }
.sidebar .crumb { margin-bottom: 10px; }
.sb-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.sb-head b { display: block; line-height: 1.25; font-size: .98rem; }
.sb-head small { color: var(--muted); }
.sb-prog { padding: 14px 0 18px; border-block: 1px solid var(--line); margin-bottom: 14px; }
.sb-prog .prog-head { margin-bottom: 8px; }
.sb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; position: relative; }
.sb-step { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); transition: background .2s; }
a.sb-step:hover { background: var(--bg); }
.sb-step.cur { background: var(--ink); color: #fff; }
.sb-step.locked { color: var(--faint); cursor: not-allowed; }
.sb-ic { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; background: var(--paper); color: var(--muted); transition: background .3s, border-color .3s, color .3s; }
.sb-ic .ic { width: 16px; height: 16px; stroke-width: 2; }
.sb-step.ok .sb-ic { background: var(--ok); border-color: var(--ok); color: #fff; }
.sb-step.cur .sb-ic { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.sb-txt b { display: block; font-size: .93rem; line-height: 1.25; font-weight: 600; }
.sb-txt small { font-size: .78rem; color: var(--muted); }
.sb-step.cur small { color: #b5b9c2; }
.sb-step.locked small { color: var(--faint); }
.pane { min-width: 0; }
.mob-bar { display: none; }
.step-card { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 40px 44px 44px; box-shadow: var(--shadow); animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }
.step-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.step-of { font-family: var(--mono); font-size: .78rem; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.step-card h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: 22px; outline: none; }
.step-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; position: sticky; bottom: 16px; z-index: 6; background: rgba(246,245,241,.92); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; padding: 10px; box-shadow: var(--shadow); }
.read p { font-size: 1.12rem; line-height: 1.7; max-width: 40em; }
.read-h { margin: 26px 0 8px; font-size: 1.15rem; }
.read-list { display: grid; gap: 12px; font-size: 1.08rem; line-height: 1.6; padding-left: 1.3em; max-width: 40em; margin: 0 0 1em; }
.read-list li::marker { color: var(--accent); }
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: 16px; background: var(--lime); color: var(--ink); margin: 22px 0; max-width: 40em; }
.callout .ic { margin-top: 3px; }
.callout p { margin: 0; font-size: 1.02rem; font-weight: 500; }
.code { background: var(--ink); color: #e9ecf3; border-radius: 14px; padding: 18px 20px; font-family: var(--mono); font-size: .92rem; line-height: 1.6; overflow: auto; margin: 16px 0; white-space: pre; }
.read .chat { margin: 22px 0; max-width: 40em; }
/* questions */
.q + .q { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.q-num { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.q-text { font-size: 1.15rem; font-weight: 550; line-height: 1.5; margin: 0 0 16px; max-width: 40em; }
.opts { display: grid; gap: 10px; max-width: 46em; }
.opt { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s, transform .12s; font-size: 1.02rem; line-height: 1.5; }
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt:active:not(:disabled) { transform: scale(.995); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--danger); background: #fdecea; }
.opt:disabled { cursor: default; }
.opt-key { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; font-weight: 500; flex: none; background: var(--paper); }
.opt.sel .opt-key { background: var(--accent); color: #fff; border-color: var(--accent); }
.opt.right .opt-key { background: var(--ok); color: #fff; border-color: var(--ok); }
.opt.wrong .opt-key { background: var(--danger); color: #fff; border-color: var(--danger); }
.opt-box { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; background: var(--paper); margin-top: 1px; }
.opt.sel .opt-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt-box .ic { width: 15px; height: 15px; stroke-width: 3; }
.why { display: block; font-style: normal; font-size: .92rem; color: var(--muted); margin-top: 6px; }
.feedback { margin-top: 18px; padding: 14px 18px; border-radius: 14px; font-size: 1rem; max-width: 46em; }
.feedback.good { background: var(--ok-soft); border: 1px solid #bfe4d0; color: #0b4d33; }
.feedback.bad { background: #fdecea; border: 1px solid #f3c1bb; color: #7a1f16; }
.feedback.mixed { background: var(--warn-soft); border: 1px solid #efd99b; color: #5c3d00; }
.feedback .model { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.1); }
.q-actions { display: flex; gap: 14px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.sort-list { display: grid; gap: 10px; max-width: 52em; }
.sort-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 16px; flex-wrap: wrap; }
.sort-row.right { border-color: var(--ok); background: var(--ok-soft); }
.sort-row.wrong { border-color: var(--danger); background: #fdecea; }
.sort-text { flex: 1 1 260px; }
.sort-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg-btn { border: 1.5px solid var(--line-strong); background: var(--paper); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; font-size: .9rem; min-height: 40px; }
.seg-btn:hover:not(:disabled) { border-color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg-btn:disabled { cursor: default; }
.order-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 46em; }
.order-row { display: flex; gap: 14px; align-items: center; padding: 10px 12px 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 16px; background: var(--paper); }
.order-row.right { border-color: var(--ok); background: var(--ok-soft); }
.order-row.wrong { border-color: var(--danger); background: #fdecea; }
.order-n { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; flex: none; }
.order-text { flex: 1; }
.order-btns { display: inline-flex; gap: 4px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.answer-key { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: var(--bg); border: 1px dashed var(--line-strong); max-width: 46em; }
.answer-key ol { margin: 8px 0 0; padding-left: 1.3em; }
/* flashcards */
.fc-wrap { display: grid; gap: 18px; justify-items: center; }
.fc-count { display: flex; gap: 14px; align-items: center; font-family: var(--mono); font-size: .8rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.fc-dots { display: inline-flex; gap: 6px; }
.fc-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.fc-dots i.on { background: var(--ok); }
.fc-dots i.cur { box-shadow: 0 0 0 3px var(--accent-soft); background: var(--accent); }
.flashcard { width: 100%; max-width: 620px; min-height: 260px; border-radius: 26px; border: 1.5px solid var(--line-strong); background: var(--paper); box-shadow: var(--shadow-lg); cursor: pointer; padding: 28px; display: grid; grid-template-rows: auto 1fr auto; text-align: center; transition: transform .35s, background .3s; }
.flashcard:hover { transform: translateY(-2px); }
.flashcard.flipped { background: var(--ink); color: #fff; border-color: var(--ink); animation: flip .4s ease; }
@keyframes flip { from { transform: rotateX(70deg); opacity: .4; } to { transform: none; opacity: 1; } }
.fc-side { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.flashcard.flipped .fc-side { color: var(--lime); }
.fc-text { align-self: center; font-family: var(--serif); font-size: 2.2rem; line-height: 1.15; }
.fc-text.back { font-family: var(--font); font-size: 1.2rem; line-height: 1.55; font-weight: 500; }
.fc-hint { font-size: .8rem; color: var(--faint); }
.fc-nav { display: flex; gap: 12px; }
/* prompt gym */
.gym-dots { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.gd { width: 44px; height: 44px; border-radius: 14px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-family: var(--mono); font-weight: 500; color: var(--faint); background: var(--paper); transition: background .3s, color .3s; }
.gd.cur { border-color: var(--ink); color: var(--ink); }
.gd.a { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 700; }
.scenario { padding: 22px 24px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 16px; }
.need-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; font-size: .88rem; color: var(--muted); }
#gym-ta { min-height: 150px; font-size: 1.05rem; }
.grade-card { display: flex; gap: 18px; align-items: center; margin-top: 18px; padding: 16px 20px; border-radius: 18px; background: var(--warn-soft); border: 1px solid #efd99b; }
.grade-card.a { background: var(--ok-soft); border-color: #bfe4d0; }
.grade-letter { width: 64px; height: 64px; border-radius: 18px; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-family: var(--serif); font-size: 2.6rem; flex: none; }
.grade-card.a .grade-letter { background: var(--ok); color: #fff; }
.crit-list { display: grid; gap: 8px; margin-top: 12px; }
.crit { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.crit-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.crit.ok .crit-ic { background: var(--ok); color: #fff; }
.crit.no .crit-ic { background: var(--danger); color: #fff; }
.crit-ic .ic { width: 14px; height: 14px; stroke-width: 3; }
.crit small { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.gym-done { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: 20px; background: var(--ok-soft); border: 1px solid #bfe4d0; color: var(--ok); }
.gym-done .ic { width: 36px; height: 36px; stroke-width: 2.6; }
.gym-done h3 { color: var(--ink); margin: 0 0 2px; }
/* test result */
.result { display: flex; gap: 28px; align-items: center; padding: 26px 28px; border-radius: 24px; margin-bottom: 8px; flex-wrap: wrap; }
.result.pass { background: var(--ok-soft); border: 1px solid #bfe4d0; }
.result.fail { background: var(--warn-soft); border: 1px solid #efd99b; }
.result h3 { font-size: 1.5rem; margin-bottom: 4px; }
.score-ring { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--ink) calc(var(--p) * 1%), rgba(0,0,0,.1) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--paper); }
.score-ring b { position: relative; font-family: var(--serif); font-weight: 400; font-size: 1.9rem; }
.test-intro { margin-bottom: 26px; }
@media (max-width: 980px) {
  .player { grid-template-columns: 1fr; gap: 0; padding-top: 12px; }
  .sidebar { display: none; }
  .mob-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; position: sticky; top: 62px; z-index: 8; background: rgba(246,245,241,.94); backdrop-filter: blur(10px); padding: 10px 0; }
  .mob-bar .crumb { padding: 0; }
  .mob-prog { flex: 1; min-width: 0; }
  .mob-prog .prog-head strong { font-size: .88rem; }
  .step-card { padding: 26px 20px 30px; border-radius: 22px; }
  .step-foot { bottom: 12px; }
  .flashcard { min-height: 230px; }
  .fc-text { font-size: 1.8rem; }
}
@media (max-width: 640px) {
  .opt { padding: 12px 14px; }
  .sort-row { flex-direction: column; align-items: flex-start; }
  .result { padding: 20px; }
}

/* ---------- Header account ---------- */
.nav-cta { display: flex; gap: 10px; align-items: center; }
.acct { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; padding: 5px 16px 5px 5px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--paper); }
.acct:hover { border-color: var(--ink); }
.acct-av { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-size: .82rem; font-weight: 700; }

/* ---------- Auth ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 460px; gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 90px; }
.auth-side h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
.auth-card { padding: 30px; }
.auth-tabs { display: flex; width: 100%; margin-bottom: 22px; }
.seg-link { flex: 1; text-align: center; padding: 11px 14px; border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--muted); }
.seg-link[aria-selected="true"] { background: var(--ink); color: #fff; }
.pw { position: relative; }
.pw input[type="password"], .pw input[type="text"] { padding-right: 54px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.pw-toggle[aria-pressed="true"] { color: var(--accent-ink); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: .95rem; color: var(--ink-2); margin-bottom: 18px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-err { color: var(--danger); font-size: .95rem; min-height: 1.4em; margin: 0 0 10px; }
.gate { text-align: center; padding: 44px 30px; }

/* ---------- Rubric ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.toc .chip { min-height: 42px; padding: 0 16px; font-size: .92rem; }
.rb { margin-bottom: 44px; scroll-margin-top: 96px; }
.rb h2 { font-size: 2.2rem; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.tbl { width: 100%; border-collapse: collapse; font-size: .98rem; }
.tbl th, .tbl td { text-align: left; padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl thead th { font-family: var(--mono); font-weight: 500; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); background: var(--bg); }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody th { font-weight: 650; width: 30%; }
.engine { display: block; margin-top: 10px; color: var(--muted); font-size: .84rem; }
.engine a { color: inherit; }
@media (max-width: 980px) { .auth-wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; } }
@media (max-width: 820px) { .nav-start { display: none; } .acct-name { display: none; } .acct { padding: 5px; } }

/* ---------- Menu always lives in the header (two rows on small screens) ---------- */
@media (max-width: 820px) {
  .nav { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; row-gap: 8px; }
  .logo { order: 1; }
  .nav-cta { order: 2; margin-left: auto; }
  .nav-links { order: 3; display: flex; width: 100%; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links { gap: 0; justify-content: space-between; }
  .nav-links a { flex: 1 1 auto; text-align: center; padding: 9px 6px; font-size: .86rem; white-space: nowrap; }
  .nav-cta .btn { min-height: 40px; padding: 0 16px; font-size: .9rem; }
  .mob-bar { top: 108px; }
  section.block { scroll-margin-top: 120px; }
}


/* ---------- About ---------- */
.ab-hero { padding: 56px 0 32px; }
.ab-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.about-intro { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 26px; }
.portrait-card { position: relative; max-width: 380px; margin-inline: auto; width: 100%; filter: drop-shadow(0 30px 40px rgba(16,18,22,.18)); }
.portrait-card .ill { width: 100%; height: auto; display: block; }
.chip-float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line-strong); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); animation: bob 7s ease-in-out infinite; }
.chip-float .ic { width: 16px; height: 16px; color: var(--accent-ink); }
.chip-float.c1 { left: -6%; top: 14%; } .chip-float.c2 { right: -4%; top: 40%; animation-delay: -2s; } .chip-float.c3 { left: 6%; bottom: 8%; animation-delay: -4s; }
.ill-card { text-align: center; padding: 26px 26px 30px; }
.ill-card .ill { width: 100%; max-width: 240px; height: auto; margin: 0 auto 10px; background: var(--bg-2); border-radius: 20px; padding: 12px; box-sizing: content-box; }
.ill-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.ill-card p { color: var(--muted); margin: 0; }
.ab-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.ab-stats div { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 22px 12px; box-shadow: var(--shadow); }
.ab-stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 3rem; line-height: 1; }
.ab-stats span { color: var(--muted); font-size: .95rem; }
.mission { display: grid; grid-template-columns: 1fr 200px; gap: 24px; align-items: center; background: var(--ink); color: #fff; border-radius: 32px; padding: 44px 48px; }
.mission h2 { margin: 0; }
.mission-art { width: 100%; height: auto; }
.ab-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ab-tile { display: flex; align-items: center; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow); }
.ab-tile b { font-size: 1.05rem; line-height: 1.3; }
.isnt h3 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin-bottom: 16px; }
.isnt h3 .ic { width: 22px; height: 22px; }
.skill.off { background: var(--bg-2); border-color: var(--line-strong); color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.contact-art .seal { margin-bottom: 18px; }
@media (max-width: 980px) { .ab-hero-grid, .contact-grid { grid-template-columns: 1fr; } .ab-stats { grid-template-columns: repeat(2, 1fr); } .ab-tiles { grid-template-columns: repeat(2, 1fr); } .mission { grid-template-columns: 1fr 140px; padding: 32px; } }
@media (max-width: 640px) { .ab-tiles { grid-template-columns: 1fr; } .mission { grid-template-columns: 1fr; } .mission-art { max-width: 160px; } .chip-float.c1 { left: 0; } .chip-float.c2 { right: 0; } }
