/* Cryptocurrency School
   Layout: one 1180px column. Lessons are a 46rem reading column with a side rail.
   Phones stack to one column and get a bottom tab bar on the three app pages.
   Theme: Midnight Neon (dark) is the default. Genesis (light) applies when the
   visitor's system prefers light or they switch with the toggle. */

:root {
  color-scheme: dark;
  --bg: #090B12; --bar: #0E111B; --surface: #121624; --raised: #1A2033; --line: #283049; --dash: #3A4566;
  --text: #EEF1FA; --soft: #9AA5C4; --para: #C5CDE3; --ghost: #EEF1FA;
  --done: #2BFF88; --done-ink: #090B12; --done-glow: 0 0 10px rgba(43, 255, 136, 0.35);
  --good: #2BFF88; --good-ink: #090B12; --good-tint: rgba(43, 255, 136, 0.12); --good-text: #2BFF88; --good-line: rgba(43, 255, 136, 0.45);
  --next: #FFE83D; --next-ink: #090B12; --next-tint: rgba(255, 232, 61, 0.14); --next-text: #FFE83D; --next-line: rgba(255, 232, 61, 0.45);
  --next-glow: 0 0 20px rgba(255, 232, 61, 0.4); --next-ring: 0 0 0 3px rgba(255, 232, 61, 0.3), 0 0 20px rgba(255, 232, 61, 0.6);
  --pick: #2CD9FF; --pick-ink: #090B12; --pick-tint: rgba(44, 217, 255, 0.1); --pick-text: #2CD9FF; --pick-line: rgba(44, 217, 255, 0.4);
  --bad: #FF5C7A; --bad-ink: #090B12; --bad-tint: rgba(255, 92, 122, 0.12); --bad-text: #FF5C7A; --bad-line: rgba(255, 92, 122, 0.4);
  --hero-bg: #121624; --hero-text: #EEF1FA; --hero-soft: #9AA5C4; --hero-line: #2BFF88; --hero-glow: 0 0 28px rgba(43, 255, 136, 0.2);
  --hero-track: #283049; --hero-fill: #2BFF88; --hero-done: #2BFF88; --hero-done-ink: #090B12; --hero-dash: #3A4566;
  --hero-inner: #1A2033; --hero-inner-text: #EEF1FA; --hero-inner-soft: #9AA5C4;
  --track: #283049; --bar-fill: #2BFF88; --key-bg: #283049; --key-ink: #C5CDE3; --opt-bg: #1A2033;
  --logo-bg: #1A2033; --logo-b: #2BFF88;
  --font-display: 'Unbounded', 'Figtree', system-ui, sans-serif; --ds: 0.78; --dls: 0em; --dlh: 1.22;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r-card: 20px; --r-btn: 14px; --r-tile: 10px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #F5F5F2; --bar: #FFFFFF; --surface: #FFFFFF; --raised: #F5F5F2; --line: #DEDCD5; --dash: #C9C5BB;
    --text: #15120E; --soft: #5A554D; --para: #3D3832; --ghost: #15120E;
    --done: #15120E; --done-ink: #F7931A; --done-glow: none;
    --good: #1E7A46; --good-ink: #FFFFFF; --good-tint: #E2F2E8; --good-text: #145A33; --good-line: #1E7A46;
    --next: #F7931A; --next-ink: #15120E; --next-tint: #FDE9CC; --next-text: #A85A00; --next-line: #F7931A;
    --next-glow: none; --next-ring: 0 0 0 4px #FDE3BF;
    --pick: #1F4FD8; --pick-ink: #FFFFFF; --pick-tint: #E6ECFC; --pick-text: #163BA6; --pick-line: #1F4FD8;
    --bad: #C0321F; --bad-ink: #FFFFFF; --bad-tint: #FBE7E3; --bad-text: #8F2416; --bad-line: #C0321F;
    --hero-bg: #15120E; --hero-text: #FAF8F3; --hero-soft: #B8B2A6; --hero-line: #15120E; --hero-glow: none;
    --hero-track: #2E2922; --hero-fill: #F7931A; --hero-done: #2E2922; --hero-done-ink: #F7931A; --hero-dash: #6B655B;
    --hero-inner: #FFFFFF; --hero-inner-text: #15120E; --hero-inner-soft: #5A554D;
    --track: #E9E7E0; --bar-fill: #15120E; --key-bg: #F5F5F2; --key-ink: #5A554D; --opt-bg: #FFFFFF; --logo-bg: #15120E; --logo-b: #FAF8F3;
    --font-display: 'Space Grotesk', 'Figtree', system-ui, sans-serif; --ds: 1; --dls: -0.02em; --dlh: 1.1;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F5F2; --bar: #FFFFFF; --surface: #FFFFFF; --raised: #F5F5F2; --line: #DEDCD5; --dash: #C9C5BB;
  --text: #15120E; --soft: #5A554D; --para: #3D3832; --ghost: #15120E;
  --done: #15120E; --done-ink: #F7931A; --done-glow: none;
  --good: #1E7A46; --good-ink: #FFFFFF; --good-tint: #E2F2E8; --good-text: #145A33; --good-line: #1E7A46;
  --next: #F7931A; --next-ink: #15120E; --next-tint: #FDE9CC; --next-text: #A85A00; --next-line: #F7931A;
  --next-glow: none; --next-ring: 0 0 0 4px #FDE3BF;
  --pick: #1F4FD8; --pick-ink: #FFFFFF; --pick-tint: #E6ECFC; --pick-text: #163BA6; --pick-line: #1F4FD8;
  --bad: #C0321F; --bad-ink: #FFFFFF; --bad-tint: #FBE7E3; --bad-text: #8F2416; --bad-line: #C0321F;
  --hero-bg: #15120E; --hero-text: #FAF8F3; --hero-soft: #B8B2A6; --hero-line: #15120E; --hero-glow: none;
  --hero-track: #2E2922; --hero-fill: #F7931A; --hero-done: #2E2922; --hero-done-ink: #F7931A; --hero-dash: #6B655B;
  --hero-inner: #FFFFFF; --hero-inner-text: #15120E; --hero-inner-soft: #5A554D;
  --track: #E9E7E0; --bar-fill: #15120E; --key-bg: #F5F5F2; --key-ink: #5A554D; --opt-bg: #FFFFFF; --logo-bg: #15120E; --logo-b: #FAF8F3;
  --font-display: 'Space Grotesk', 'Figtree', system-ui, sans-serif; --ds: 1; --dls: -0.02em; --dlh: 1.1;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.5; }
[hidden] { display: none !important; }
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: var(--pick-text); }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--pick); outline-offset: 2px; border-radius: 6px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.mono { font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.big { font-size: 1.125rem; }
.soft { color: var(--soft); }
.fine { font-size: 0.875rem; color: var(--soft); }
.sub { margin-top: 0.5rem; font-size: 1.125rem; color: var(--soft); max-width: 44rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--next); color: var(--next-ink); padding: 0.75rem 1rem; font-weight: 700; z-index: 20; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(1rem, 3vw, 1.5rem); }
.narrow { max-width: 760px; padding-block: 2.5rem 3.5rem; }
.stack { display: flex; flex-direction: column; gap: 2.25rem; padding-block: 2.25rem 3.5rem; }
.section { padding-block: 2.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); gap: 1rem; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }

/* ---------- type ---------- */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: var(--dls); line-height: var(--dlh); text-wrap: balance; }
.d1 { font-size: calc(clamp(2.5rem, 5.6vw, 4rem) * var(--ds)); }
.d1l { font-size: calc(clamp(2.1rem, 4.6vw, 2.9rem) * var(--ds)); }
.d2 { font-size: calc(clamp(1.8rem, 3.6vw, 2.5rem) * var(--ds)); }
.d3 { font-size: calc(clamp(1.5rem, 2.6vw, 2rem) * var(--ds)); }
.d4 { font-size: calc(1.5rem * var(--ds)); }
.d5 { font-size: calc(1.3rem * var(--ds)); }
.eyebrow { font-family: var(--font-mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.eyebrow-good { color: var(--good-text); }
.eyebrow-pick { color: var(--pick-text); }
.t-good { color: var(--good-text); }
.t-next { color: var(--next-text); }
.t-bar { color: var(--good-text); }
.lead { margin-top: 1.25rem; font-size: 1.25rem; color: var(--para); max-width: 34rem; }

/* ---------- buttons, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3rem; padding: 0 1.25rem; border-radius: var(--r-btn); border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { filter: brightness(1.06); }
.btn-lg { min-height: 3.25rem; padding: 0 1.5rem; font-size: 1.06rem; }
.btn-xl { min-height: 3.5rem; padding: 0 1.75rem; font-size: 1.125rem; }
.btn-next { background: var(--next); color: var(--next-ink); box-shadow: var(--next-glow); }
.btn-done { background: var(--good); color: var(--good-ink); }
.btn-pick { background: var(--pick); color: var(--pick-ink); }
.btn-ghost { background: transparent; color: var(--ghost); border-color: var(--ghost); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.tlink { background: none; border: 0; padding: 0; color: var(--pick-text); font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 2.75rem; display: inline-flex; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0 0.9rem; border-radius: 999px; font-family: var(--font-mono); font-weight: 700; font-size: 0.94rem; text-decoration: none; }
.pill-streak { background: var(--next-tint); color: var(--next-text); }
.pill-xp { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.icon-btn { width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chip { display: inline-flex; align-items: center; min-height: 2.1rem; padding: 0 0.8rem; border-radius: 999px; font-family: var(--font-mono); font-weight: 700; font-size: 0.875rem; }
.chip-next { background: var(--next); color: var(--next-ink); }
.tag { display: inline-flex; align-items: center; height: 1.6rem; padding: 0 0.6rem; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; }

/* ---------- header, footer, tabs ---------- */
.bar { background: var(--bar); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.5rem; padding-block: 0.6rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: calc(1.2rem * var(--ds)); letter-spacing: var(--dls); }
.logo-mark { width: 2rem; height: 2rem; flex: none; }
.lg-bg { fill: var(--logo-bg); } .lg-a { fill: var(--next); } .lg-b { fill: var(--logo-b); } .lg-c { stroke: var(--logo-b); }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; flex: 1 1 auto; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.85rem; border-radius: 10px; color: var(--soft); font-weight: 600; text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { background: var(--good-tint); color: var(--good-text); font-weight: 700; }
.bar-right { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.foot { border-top: 1px solid var(--line); background: var(--bar); margin-top: 1rem; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.75rem; padding-block: 1.5rem; font-size: 0.875rem; color: var(--soft); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.foot a, .foot nav button { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.foot nav button { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--pick-text); text-decoration: underline; cursor: pointer; }
.foot nav button:hover { text-decoration-thickness: 2px; }

/* ---------- tools: calculators and glossary ---------- */
.tool-page { padding-block: 2rem 3.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.tool-page > .eyebrow + h1 { margin-top: -1rem; }
.tool-page > h1 + .sub { margin-top: -0.9rem; }
.crumbs a { font-weight: 600; }
.tool-list { display: grid; gap: 1rem; }
.tool-card { display: flex; flex-direction: column; gap: 0.35rem; text-decoration: none; color: var(--text); }
.tool-card:hover { border-color: var(--pick-line); }
.tool-go { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; font-weight: 700; color: var(--pick-text); }
.tool-inline { background: var(--pick-tint); border-color: var(--pick-line); }
.calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.calc-in, .calc-out { display: flex; flex-direction: column; gap: 1rem; }
.calc-out { position: sticky; top: 5rem; gap: 0; }
.calc-out .eyebrow { margin-bottom: 0.5rem; }
.calc-big { display: flex; flex-direction: column; gap: 0.15rem; padding-bottom: 0.9rem; }
.calc-big .mono { font-size: 2rem; line-height: 1.15; color: var(--good-text); overflow-wrap: anywhere; }
.calc-out .kv .mono { text-align: right; overflow-wrap: anywhere; }
.calc-out .fine { margin-top: 0.75rem; color: var(--para); }
.calc-out .fine:empty { display: none; }
.calc-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rows { display: flex; flex-direction: column; gap: 0.75rem; }
.calc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0.75rem; align-items: end; }
.calc-row .icon-btn { font-size: 1.4rem; line-height: 1; }
.calc-row + .calc-row .field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.field select { width: 100%; min-height: 3rem; padding: 0 0.9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-weight: 500; }
.field select:focus-visible { border-color: var(--pick); outline-offset: 0; }
.tool-prose { max-width: 44rem; }
.tool-note { display: flex; gap: 0.6rem; align-items: flex-start; max-width: 44rem; }
.tool-note .ico { flex: none; margin-top: 0.15rem; color: var(--good-text); }
@media (max-width: 820px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-out { position: static; }
}
@media (max-width: 460px) {
  .calc-two { grid-template-columns: minmax(0, 1fr); }
}

/* certificate sharing */
.cert-share { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.6rem; }
.cert-share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.verify-invite { margin-top: 1rem; }

/* spot the scam */
.scamq-stage { display: flex; flex-direction: column; gap: 1rem; }
.scamq-card, .scamq-result, .scamq-intro { display: flex; flex-direction: column; gap: 1rem; }
.scamq-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.scamq-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.scamq-bar span { display: block; height: 100%; background: var(--next); border-radius: 999px; }
.scamq-msg { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--pick); border-radius: 12px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.scamq-from { font-size: 0.94rem; overflow-wrap: anywhere; }
.scamq-text { margin: 0; font-size: 1.08rem; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.scamq-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.scamq-actions .btn { width: 100%; }
.scamq-actions .btn:disabled { opacity: 1; cursor: default; }
.scamq-actions .btn.is-answer { border-color: var(--good-line); background: var(--good-tint); color: var(--good-text); }
.scamq-actions .btn.is-wrong { border-color: var(--bad-line); color: var(--bad-text); }
.scamq-feedback { display: flex; flex-direction: column; gap: 1rem; }
.scamq-feedback:empty { display: none; }
.scamq-challenge { border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 1rem; background: var(--next-tint); border: 1px solid var(--next-line); display: flex; flex-direction: column; gap: 0.35rem; }
.scamq-challenge p { margin: 0; }
.scamq-vs { margin: 0.4rem 0 0; color: var(--next-text); }
.scamq-vs[data-scamq-vs="win"] { color: var(--good-text); }
.scamq-why { border-radius: 12px; padding: 1rem 1.1rem; background: var(--good-tint); border: 1px solid var(--good-line); display: flex; flex-direction: column; gap: 0.5rem; }
.scamq-why.is-wrong { background: var(--bad-tint); border-color: var(--bad-line); }
.scamq-why p { margin: 0; color: var(--para); }
.scamq-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; }
.scamq-score .mono { font-size: 2.6rem; line-height: 1.1; color: var(--good-text); }
.scamq-share { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.scamq-field { width: 100%; min-height: 3rem; padding: 0 0.9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.scamq-missed ul { margin: 0.5rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; color: var(--para); }
.scamq-result:focus { outline: none; }
@media (max-width: 420px) { .scamq-actions { grid-template-columns: minmax(0, 1fr); } }

/* browser wallet guides */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wl-table, .wl-detail { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.wl-table th, .wl-table td, .wl-detail th, .wl-detail td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem 0.65rem 0; border-top: 1px solid var(--line); }
.wl-table thead th, .wl-detail thead th { border-top: 0; color: var(--soft); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.wl-table { min-width: 46rem; }
.wl-table th[scope="row"] a { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }
.wl-table th[scope="row"] a:hover span { text-decoration: underline; }
.coin-logo-xs { width: 1.5rem; height: 1.5rem; }
.wl-detail th[scope="row"] { width: 34%; color: var(--soft); font-weight: 500; }
.wl-detail td { color: var(--text); }
.wl-feat th[scope="row"] { width: 30%; color: var(--text); font-weight: 600; }
.wl-feat td:last-child { color: var(--para); }
.wl-mark { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.wl-mark-yes { background: var(--good-tint); color: var(--good-text); border: 1px solid var(--good-line); }
.wl-mark-part { background: var(--pick-tint); color: var(--pick-text); border: 1px solid var(--pick-line); }
.wl-mark-no { background: var(--surface); color: var(--soft); border: 1px solid var(--line); }
.wl-facts, .wl-table-card { display: flex; flex-direction: column; gap: 0.5rem; margin-block: 1.25rem; }
.wl-facts h2, .wl-table-card h2 { margin: 0; }
.wl-h { margin: 2rem 0 1rem; }
.lead-p { font-size: 1.15rem; color: var(--para); margin: 0.5rem 0 0; }
.wl-shots { margin-block: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.wl-shots h2 { margin: 0; }
.wl-shot-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.wl-shot { margin: 0; display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.wl-shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }

/* market data panel */
.market .supply { display: flex; flex-direction: column; gap: 0.4rem; }
.supply-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.supply-bar span { display: block; height: 100%; background: var(--pick); border-radius: 999px; }
.market .supply p, .market > p { margin: 0; }
.mchart { margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.35rem; }
.mchart-plot { position: relative; }
.mchart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.mc-grid { stroke: var(--line); stroke-width: 1; }
.mc-tick { fill: var(--soft); font: 500 10px var(--font-mono, monospace); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.mc-area { fill: var(--pick); opacity: 0.12; }
.mc-line { fill: none; stroke: var(--pick); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mc-end, .mc-dot { fill: var(--pick); stroke: var(--surface); stroke-width: 2; }
.mc-cross { stroke: var(--soft); stroke-width: 1; stroke-dasharray: 3 3; }
.mc-tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; background: var(--text); color: var(--bg); border-radius: 8px; padding: 0.3rem 0.55rem; font-size: 0.8rem; line-height: 1.3; white-space: nowrap; }
.mc-tip b { display: block; }
.mc-axis { display: flex; justify-content: space-between; }
.mc-table summary { cursor: pointer; }
.mc-table table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.mc-table th, .mc-table td { text-align: left; padding: 0.3rem 0; border-top: 1px solid var(--line); }
.mc-table td:last-child, .mc-table th:last-child { text-align: right; }

/* backup card */
.bcard-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
@media (max-width: 820px) { .bcard-grid { grid-template-columns: minmax(0, 1fr); } .bcard-preview { order: 2; } }
.bcard-preview { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.bcard-preview img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
.bcard-side { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.bcard-what ul { margin: 0.5rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; color: var(--para); }
.lead-gift { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.lead-gift .btn { gap: 0.5rem; }
.leadbox.leadbox-stack { flex-direction: column; align-items: stretch; gap: 1rem; }
.leadbox.leadbox-stack > * { flex: none; }

/* hardware wallet check */
.hwc-form { display: flex; flex-direction: column; gap: 1.4rem; }
.hwc-q { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.hwc-q legend { display: flex; align-items: center; gap: 0.7rem; padding: 0; margin-bottom: 0.7rem; font-size: 1.05rem; }
.hwc-opts { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.hwc-opt { display: flex; align-items: center; gap: 0.6rem; min-height: 3rem; padding: 0.6rem 0.9rem; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; line-height: 1.35; }
.hwc-opt input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--next); }
.hwc-opt:has(input:checked) { border-color: var(--good-line); background: var(--good-tint); }
.hwc-opt:has(input:focus-visible) { outline: 3px solid var(--focus, var(--next)); outline-offset: 2px; }
.hwc-result { display: flex; flex-direction: column; gap: 0.9rem; border-left: 6px solid var(--good-line); }
.hwc-result.is-no { border-left-color: var(--pick); }
.hwc-result:focus { outline: none; }
.hwc-result p, .hwc-notes, .hwc-next { margin: 0; color: var(--para); }
.hwc-notes, .hwc-next { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.hwc-result h3 { margin: 0.4rem 0 0.6rem; }

/* coin guides */
.coin-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.coin-card .eyebrow { color: var(--good-text); }
.facts { margin: 0; }
.facts .kv { align-items: baseline; }
.facts dt { color: var(--soft); font-size: 0.94rem; flex: 0 0 38%; }
.facts dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.coin-logo { display: block; flex: none; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.coin-card-head { display: flex; align-items: center; gap: 0.75rem; }
.coin-title { display: flex; align-items: center; gap: 1rem; }
.coin-title > div { min-width: 0; }
.coin-logo-lg { width: 4rem; height: 4rem; }
@media (max-width: 520px) { .coin-title { align-items: flex-start; } .coin-logo-lg { width: 3rem; height: 3rem; margin-top: 0.2rem; } }
.outline .coin-logo-sm { width: 2rem; height: 2rem; }
.chip-coin { gap: 0.45rem; padding-left: 0.4rem; }

/* glossary */
.gloss-find { max-width: 30rem; }
.gloss-az { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gloss-az a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; min-height: 2.4rem; padding: 0 0.5rem; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; text-decoration: none; color: var(--text); background: var(--surface); }
.gloss-az a:hover { border-color: var(--pick-line); color: var(--pick-text); }
.gloss-group { display: flex; flex-direction: column; gap: 0.75rem; }
.gloss-letter { font-size: 1.35rem; color: var(--good-text); scroll-margin-top: 5.5rem; }
.gloss-list { display: grid; gap: 0.75rem; margin: 0; }
.gloss-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.1rem 1.25rem; scroll-margin-top: 5.5rem; min-width: 0; }
.gloss-item:target { border-color: var(--pick); box-shadow: 0 0 0 3px var(--pick-tint); }
.gloss-item dt { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.gloss-also { font-weight: 500; font-size: 0.94rem; color: var(--soft); }
.gloss-item dd { margin: 0.35rem 0 0; }
.gloss-item dd p { margin: 0 0 0.5rem; color: var(--para); max-width: 44rem; }
.gloss-more { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.gloss-item dt a { color: var(--text); text-decoration: none; }
.gloss-item dt a:hover { color: var(--pick-text); text-decoration: underline; }
.gloss-term > .eyebrow + h1 { margin-top: -1rem; }
.gloss-aka { margin-top: -1rem; }
.gloss-def { font-size: 1.3rem; line-height: 1.5; max-width: 40rem; color: var(--text); }
.gloss-more-text { max-width: 44rem; }
.terms { display: flex; flex-direction: column; gap: 0.6rem; }
.terms-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.terms .chip { text-decoration: none; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-family: inherit; font-weight: 600; }
.terms .chip:hover { border-color: var(--pick-line); color: var(--pick-text); }

/* ---------- cookie notice (only when Tag Manager is on) ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bar); border-top: 1px solid var(--line); box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28); padding-bottom: env(safe-area-inset-bottom, 0px); }
.consent-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding-block: 0.9rem; }
.consent p { flex: 1 1 20rem; min-width: 0; margin: 0; font-size: 0.94rem; color: var(--para); }
.consent p strong { color: var(--text); }
.consent-btns { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.consent-btns .btn { min-height: 2.75rem; min-width: 6.5rem; }
.tabbar { display: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.4rem; min-width: 0; }
.card-pick { background: var(--pick-tint); border-color: var(--pick-line); }
.card h3 { font-size: 1.2rem; }
.card > p, .card h3 + p { color: var(--para); }
.hero { background: var(--hero-bg); color: var(--hero-text); border: 1px solid var(--hero-line); box-shadow: var(--hero-glow); border-radius: var(--r-card); padding: 1.75rem; min-width: 0; }
.hero .eyebrow, .hero .hero-meta, .hero .hero-note { color: var(--hero-soft); }
.hero-meta { margin-top: 0.5rem; }
.hero-note { margin-top: 0.6rem; font-size: 0.875rem; }
.hero .track { background: var(--hero-track); }
.hero .fill { background: var(--hero-fill); }
.hero .t-bar { color: var(--hero-fill); }
.hero .btn-ghost { color: var(--hero-text); border-color: var(--hero-text); }
.track { height: 0.75rem; border-radius: 999px; background: var(--track); overflow: hidden; margin-top: 0.6rem; }
.track-thin { height: 0.5rem; margin-top: 0; }
.fill { height: 100%; border-radius: 999px; background: var(--bar-fill); transition: width 0.4s ease; }
.fill-next { background: var(--next); }
.fill-pick { background: var(--pick); }

/* ---------- chain tiles ---------- */
.tiles { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0; }
.tile { width: 3rem; height: 3rem; border-radius: var(--r-tile); border: 2px dashed var(--dash); color: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 500; font-size: 0.94rem; text-decoration: none; }
a.tile:hover { border-style: solid; color: var(--text); }
.tile.is-done { background: var(--done); border: 0; color: var(--done-ink); font-weight: 700; box-shadow: var(--done-glow); }
.tile.is-next { background: var(--next); border: 0; color: var(--next-ink); font-weight: 700; box-shadow: var(--next-ring); }
.link { width: 0.6rem; height: 2px; background: var(--dash); }
.link.is-done { background: var(--done); }
.hero .tile { border-color: var(--hero-dash); color: var(--hero-soft); }
.hero .tile.is-done { background: var(--hero-done); color: var(--hero-done-ink); }
.hero .tile.is-next { color: var(--next-ink); }
.hero .link { background: var(--hero-dash); }
.hero .link.is-done { background: var(--hero-fill); }

/* ---------- landing ---------- */
.intro { display: flex; flex-wrap: wrap; align-items: center; gap: 3rem; padding-block: 4rem 3rem; }
.intro-text { flex: 1 1 28rem; min-width: 0; }
.intro-text .d1 { margin-top: 0.9rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.intro .fine { margin-top: 1rem; }
.preview { flex: 1 1 24rem; display: flex; flex-direction: column; gap: 1.25rem; border-radius: 24px; }
.preview-q { background: var(--hero-inner); color: var(--hero-inner-text); border-radius: 16px; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.preview-q .eyebrow { color: var(--hero-inner-soft); }
.preview-q .option { background: var(--surface); cursor: default; }
.preview-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.q { font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
.step-n { font-family: var(--font-mono); font-weight: 700; font-size: 2.1rem; line-height: 1; margin-bottom: 0.9rem; }
.n-pick { color: var(--pick-text); } .n-next { color: var(--next-text); } .n-good { color: var(--good-text); }
.level-card .d3 { margin: 0.35rem 0 0.75rem; }
.level-card .fine { margin-top: 0.9rem; }
.mod-list { border-top: 1px solid var(--line); }
.mod-list summary { display: flex; align-items: center; gap: 0.9rem; min-height: 3rem; cursor: pointer; list-style: none; }
.mod-list summary::-webkit-details-marker { display: none; }
.mod-list summary .mono { flex: 0 0 4rem; font-size: 0.875rem; color: var(--soft); }
.mod-list summary .soft { font-size: 0.875rem; white-space: nowrap; }
.mod-name { flex: 1 1 auto; font-weight: 600; }
.mod-list ol { list-style: none; padding: 0 0 0.75rem; display: flex; flex-direction: column; }
.mod-list li a { display: flex; align-items: center; gap: 0.9rem; min-height: 2.75rem; padding-left: 0.25rem; color: var(--para); text-decoration: none; }
.mod-list li a:hover { color: var(--pick-text); text-decoration: underline; }
.mod-list li .mono { flex: 0 0 3.75rem; font-size: 0.8rem; font-weight: 500; color: var(--soft); }
.feat h3 { margin-top: 0.75rem; font-size: 1.125rem; }
.feat p { font-size: 0.94rem; margin-top: 0.25rem; }
.feat-ico { display: inline-flex; font-size: 1.4rem; color: var(--text); }
.c-next { color: var(--next-text); } .c-pick { color: var(--pick-text); } .c-good { color: var(--good-text); }
.promise { padding: 2.25rem; border-radius: 24px; }
.promise .grid { margin-top: 1.5rem; gap: 1.75rem; }
.promise h3 { font-size: 1.2rem; }
.promise p { margin-top: 0.4rem; color: var(--para); }
.byline { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.94rem; color: var(--soft); }
.final { text-align: center; padding: 3rem 1.5rem; border-color: var(--next); box-shadow: var(--next-glow); border-radius: 24px; }
.final p { margin: 0.75rem auto 1.6rem; max-width: 30rem; font-size: 1.2rem; color: var(--hero-soft); }

/* ---------- dashboard ---------- */
.dash { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2rem; padding-block: 2.25rem 3.5rem; }
.dash-main { flex: 999 1 35rem; min-width: 0; display: flex; flex-direction: column; gap: 1.75rem; }
.dash-side { flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.continue { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem; }
.hero-main { flex: 1 1 21rem; min-width: 0; }
.hero-main .display { margin-top: 0.6rem; }
.hero-main .btn { margin-top: 1.25rem; }
.hero-side { flex: 0 1 15rem; min-width: 12rem; }
.chain { padding-bottom: 0.4rem; }
.chain-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; padding-bottom: 1rem; }
.mod { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding-block: 1rem; border-top: 1px solid var(--line); }
.mod-label { flex: 0 0 13rem; }
.mod-title { font-weight: 700; }
.mod-status { font-size: 0.82rem; color: var(--soft); }
.mod.is-active .mod-status { color: var(--next-text); font-weight: 600; }
.mod.is-complete .mod-status { color: var(--good-text); font-weight: 600; }
.streak-top { display: flex; align-items: center; gap: 0.9rem; }
.streak-n { font-family: var(--font-mono); font-weight: 700; font-size: 2.75rem; line-height: 1; color: var(--next-text); }
.week { display: flex; justify-content: space-between; gap: 0.25rem; margin: 1.1rem 0 0.9rem; }
.day { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.dot { width: 2rem; height: 2rem; border-radius: 999px; border: 2px dashed var(--dash); display: inline-flex; align-items: center; justify-content: center; }
.day-l { font-size: 0.75rem; font-weight: 600; color: var(--soft); }
.day.is-done .dot { background: var(--done); border: 0; }
.day.is-done .dot::after { content: ""; width: 0.75rem; height: 0.4rem; border-left: 3px solid var(--done-ink); border-bottom: 3px solid var(--done-ink); transform: rotate(-45deg) translateY(-2px); }
.day.is-today .dot { border: 3px solid var(--next); background: var(--next-tint); }
.day.is-today.is-done .dot { background: var(--done); border: 3px solid var(--next); }
.day.is-today .day-l { color: var(--text); font-weight: 700; }
.card-pick .big { margin-top: 0.25rem; }
.card-pick .btn { margin-top: 0.9rem; }
.card-pick .fine { color: var(--para); margin-top: 0.15rem; }

/* ---------- lesson ---------- */
.crumbbar { background: var(--bar); border-bottom: 1px solid var(--line); }
.crumb-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; padding-block: 0.3rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; font-size: 0.875rem; color: var(--soft); }
.crumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.crumbs .here { color: var(--text); font-weight: 600; }
.readbar { flex: 1 1 12rem; }
.lesson-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 3rem; padding-block: 2.5rem 4rem; }
.lesson { flex: 999 1 35rem; min-width: 0; max-width: 46rem; display: flex; flex-direction: column; gap: 1.75rem; }
.lesson-side { flex: 1 1 18.5rem; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.lesson-head .display { margin-top: 0.6rem; }
.prose { display: flex; flex-direction: column; gap: 1rem; color: var(--para); font-size: 1.06rem; line-height: 1.6; }
.prose > p:first-child { font-size: 1.25rem; line-height: 1.5; }
.prose h2 { font-family: var(--font-display); font-weight: 700; font-size: calc(1.7rem * var(--ds)); letter-spacing: var(--dls); line-height: 1.25; color: var(--text); margin-top: 1rem; text-wrap: balance; }
.prose h3 { font-size: 1.2rem; color: var(--text); margin-top: 0.5rem; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.prose td { font-variant-numeric: tabular-nums; vertical-align: top; }
.prose td:first-child { color: var(--text); font-weight: 600; }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-wrap table { min-width: 22rem; }
.table-wrap tr:last-child td { border-bottom: 0; }
.checkpoint { background: var(--pick-tint); border: 1px solid var(--pick-line); border-radius: 16px; padding: 1.4rem; }
.checkpoint .q { margin: 0.4rem 0 0.9rem; }
.cp-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cp-btn { flex: 1 1 12rem; min-height: 3.25rem; padding: 0.6rem 1rem; border-radius: 12px; border: 2px solid var(--pick); background: var(--surface); color: var(--text); font-weight: 600; text-align: left; cursor: pointer; }
.cp-btn.is-correct { border-color: var(--good); background: var(--good-tint); }
.cp-btn.is-wrong { border-color: var(--bad); background: var(--bad-tint); }
.cp-feedback { margin-top: 0.9rem; font-weight: 600; }
.takeaway { background: var(--next-tint); border: 1px solid var(--next-line); border-radius: 16px; padding: 1.4rem; display: flex; gap: 1rem; align-items: flex-start; }
.take-ico { font-size: 1.5rem; color: var(--next-text); display: inline-flex; }
.takeaway p { margin-top: 0.25rem; color: var(--text); }
.partner { background: var(--surface); border: 1px dashed var(--soft); border-radius: 16px; padding: 1.4rem; display: flex; flex-direction: column; gap: 0.9rem; }
.partner-main + .partner-main { border-top: 1px dashed var(--line); padding-top: 0.9rem; }
.partner-top, .partner-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.9rem; }
.quiz-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.1rem; }
.sources h2 { font-size: 1rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.sources ul { margin: 0.6rem 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.94rem; }
.prevnext { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.pn { flex: 1 1 14rem; display: flex; flex-direction: column; gap: 0.15rem; min-height: 3rem; text-decoration: none; color: var(--text); }
.pn-next { text-align: right; }
.pn:hover .strong { color: var(--pick-text); text-decoration: underline; }
.kv { display: flex; justify-content: space-between; gap: 0.75rem; padding-block: 0.6rem; border-top: 1px solid var(--line); }
.lesson-side .d5 { margin-bottom: 0.75rem; }
.note { margin-top: 0.6rem; padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--next-tint); font-size: 0.875rem; font-weight: 600; }
.outline { list-style: none; padding: 0; margin: 0.25rem 0 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; }
.outline a { display: flex; align-items: center; gap: 0.75rem; min-height: 2.9rem; padding: 0.3rem 0.5rem; border-radius: 10px; color: var(--para); text-decoration: none; font-size: 0.94rem; }
.outline a:hover { color: var(--text); background: var(--raised); }
.outline .is-here a { background: var(--next-tint); color: var(--text); font-weight: 700; }
.chip-n { flex: 0 0 2rem; height: 2rem; border-radius: 8px; border: 2px dashed var(--dash); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; color: var(--soft); }
.chip-n.is-done { background: var(--done); border: 0; color: var(--done-ink); font-weight: 700; }
.is-here .chip-n:not(.is-done) { background: var(--next); border: 0; color: var(--next-ink); font-weight: 700; }

/* ---------- quiz ---------- */
.quiz.is-live { background: none; border: 0; box-shadow: none; padding: 0; color: var(--text); display: flex; flex-direction: column; gap: 1rem; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.1rem, 4vw, 2rem); }
.qtop { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.segs { flex: 1 1 auto; display: flex; gap: 0.35rem; }
.seg { flex: 1 1 0; height: 0.6rem; border-radius: 999px; background: var(--track); }
.seg.is-done { background: var(--bar-fill); }
.seg.is-now { background: var(--next); }
.qprompt { font-size: 1.5rem; font-weight: 700; line-height: 1.25; margin: 0.5rem 0 1.4rem; text-wrap: balance; }
.options { display: flex; flex-direction: column; gap: 0.6rem; }
.option { display: flex; align-items: center; gap: 0.85rem; width: 100%; min-height: 3.75rem; padding: 0.7rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--opt-bg); color: var(--text); font-size: 1.06rem; font-weight: 600; text-align: left; cursor: pointer; }
button.option[disabled] { cursor: default; }
.opt-key { flex: 0 0 2rem; height: 2rem; border-radius: 8px; background: var(--key-bg); color: var(--key-ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 0.875rem; }
.opt-text { flex: 1 1 auto; min-width: 0; }
.option .ico { font-size: 1.1rem; }
.option.is-picked { border-color: var(--pick); background: var(--pick-tint); }
.option.is-picked .opt-key { background: var(--pick); color: var(--pick-ink); }
.option.is-correct { border-color: var(--good); background: var(--good-tint); }
.option.is-correct .opt-key { background: var(--good); color: var(--good-ink); }
.option.is-correct .ico { color: var(--good-text); }
.option.is-wrong { border-color: var(--bad); background: var(--bad-tint); }
.option.is-wrong .opt-key { background: var(--bad); color: var(--bad-ink); }
.option.is-wrong .ico { color: var(--bad-text); }
.qactions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.1rem; }
.feedback { margin-top: 1rem; border-radius: 14px; padding: 1.1rem 1.25rem; }
.feedback.is-good { background: var(--good-tint); border: 1px solid var(--good-line); }
.feedback.is-bad { background: var(--bad-tint); border: 1px solid var(--bad-line); }
.fb-title { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.125rem; }
.is-good .fb-title { color: var(--good-text); } .is-bad .fb-title { color: var(--bad-text); }
.feedback p { margin-top: 0.4rem; color: var(--para); }

/* ---------- result ---------- */
.result { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; padding: 2.5rem 1.5rem; border-radius: 24px; }
.result .eyebrow { color: var(--hero-fill); }
.result .tiles { justify-content: center; }
.result .tile { width: 3.5rem; height: 3.5rem; }
.result .tile.is-new { width: 5rem; height: 5rem; border-radius: 16px; font-size: 1.6rem; background: var(--next); color: var(--next-ink); border: 0; font-weight: 700; box-shadow: var(--next-ring); }
.stars { display: flex; gap: 0.35rem; justify-content: center; font-size: 1.6rem; color: var(--hero-soft); }
.stars .is-on { color: var(--next); }
.stars .is-on svg { fill: currentColor; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; align-items: start; }
.receipt .kv:first-of-type { margin-top: 0.75rem; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding-top: 0.85rem; border-top: 2px solid var(--text); }
.receipt-total .mono { font-size: 1.75rem; color: var(--next-text); }
.side-stack { display: flex; flex-direction: column; gap: 1rem; }
.rankup { background: var(--next-tint); border: 1px solid var(--next-line); border-radius: var(--r-card); padding: 1.4rem; }
.rankup .eyebrow { color: var(--next-text); }
.mini { display: flex; align-items: center; gap: 0.9rem; }
.mini .ico { font-size: 1.5rem; color: var(--next-text); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* ---------- achievements ---------- */
.stats { margin-top: 1.25rem; }
.stat-n { font-size: 1.9rem; font-weight: 700; line-height: 1.3; }
.stat-main { border-color: var(--next-line); }
.stat-main .stat-n { color: var(--next-text); }
.ranks { list-style: none; padding: 0; margin-top: 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0.75rem; }
.rank { border: 2px dashed var(--dash); border-radius: 14px; padding: 0.75rem 0.9rem; }
.rank-state { font-size: 0.82rem; color: var(--soft); }
.rank.is-reached { border: 0; padding: 0.875rem 1.025rem; background: var(--good-tint); }
.rank.is-reached .rank-state { color: var(--good-text); font-weight: 600; }
.rank.is-current { border: 0; padding: 0.875rem 1.025rem; background: var(--next); color: var(--next-ink); }
.rank.is-current .fine, .rank.is-current .rank-state { color: var(--next-ink); font-weight: 700; }
.rank.is-nextup .rank-state { color: var(--next-text); font-weight: 600; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: 1rem; }
.badge { display: flex; gap: 0.9rem; align-items: flex-start; border: 2px dashed var(--dash); border-radius: 16px; padding: 1rem; min-width: 0; }
.badge-ico { flex: 0 0 3rem; height: 3rem; border-radius: 14px; background: var(--raised); color: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.badge-text { min-width: 0; }
.badge-state { margin-top: 0.35rem; font-size: 0.82rem; color: var(--soft); }
.badge.is-earned { border: 1px solid var(--line); background: var(--surface); padding: calc(1rem + 1px); }
.badge.is-earned .badge-ico { background: var(--done); color: var(--done-ink); box-shadow: var(--done-glow); }
.badge.is-earned .badge-state { color: var(--good-text); font-weight: 700; }
.badge.is-progress { border: 1px solid var(--line); background: var(--surface); padding: calc(1rem + 1px); }
.badge.is-progress .badge-ico { background: var(--pick-tint); color: var(--pick-text); }
.badge.is-progress .badge-state { color: var(--pick-text); font-weight: 600; font-family: var(--font-mono); }
.cert-card .d4 { margin: 0.25rem 0 0.25rem; }
.cert-card .mono { margin-top: 0.5rem; }
.cert-card p { margin-top: 0.5rem; }
.cert-card .btn { margin-top: 0.9rem; }
.score { font-size: 1.5rem; color: var(--pick-text); }
.checklist { list-style: none; padding: 0; margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.25rem; }
.checklist label { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; cursor: pointer; }
.checklist input { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--pick); }

/* ---------- certificate ---------- */
.cert-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin: 1.25rem 0; }
.cert-form label { display: flex; flex-direction: column; gap: 0.3rem; flex: 1 1 16rem; font-weight: 600; font-size: 0.94rem; }
.cert-form input { min-height: 3rem; padding: 0 0.9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.cert-sheet { background: var(--surface); border: 2px solid var(--text); border-radius: 12px; padding: clamp(1.5rem, 6vw, 3.5rem); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.cert-sheet .logo-mark { width: 3rem; height: 3rem; }
.cert-name { font-family: var(--font-display); font-weight: 700; font-size: calc(2.2rem * var(--ds)); letter-spacing: var(--dls); border-bottom: 2px solid var(--line); padding: 0 1.5rem 0.4rem; min-width: 60%; overflow-wrap: anywhere; }
.cert-sheet .fine { max-width: 30rem; }

/* ---------- accounts, forms ---------- */
.t-bad { color: var(--bad-text); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-sm { min-height: 2.75rem; padding: 0 0.9rem; font-size: 0.94rem; border-width: 1.5px; }
.btn-bad { background: var(--bad); color: var(--bad-ink); }
.auth-slot { display: inline-flex; }
.auth-slot:empty { display: none; }
.avatar { width: 2.75rem; height: 2.75rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--good-tint); border: 1.5px solid var(--good-line); color: var(--good-text); font-weight: 700; text-decoration: none; }
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.6rem; }
.appbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.appbar-in { display: flex; align-items: center; gap: 0.75rem; padding-block: 0.55rem; }
.appbar-in img { border-radius: 10px; flex: none; }
.appbar-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.appbar-t .fine { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash { background: var(--good-tint); border-bottom: 1px solid var(--good-line); color: var(--text); }
.flash.is-bad { background: var(--bad-tint); border-color: var(--bad-line); }
.flash-in { display: flex; align-items: center; gap: 0.75rem; padding-block: 0.6rem; font-weight: 600; }
.flash .ico { color: var(--good-text); }
.flash.is-bad .ico { color: var(--bad-text); }
.flash-in > span { flex: 1 1 auto; min-width: 0; }
.flash-x { flex: none; width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; }
.flash .flash-x .ico { color: var(--soft); }
.auth { display: flex; justify-content: center; padding-block: clamp(1.5rem, 5vw, 3.5rem) 4rem; }
.auth-card { width: 100%; max-width: 30rem; padding: clamp(1.4rem, 5vw, 2.25rem); display: flex; flex-direction: column; gap: 1rem; }
.auth-card .sub { margin-top: 0; font-size: 1.06rem; }
.auth-card h1 { outline: none; }
.form { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.field { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.94rem; }
.field input, .lead-form input[type="email"], .copyrow input, .dump { width: 100%; min-height: 3rem; padding: 0 0.9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-weight: 500; }
.field input:focus-visible, .lead-form input:focus-visible, .copyrow input:focus-visible { border-color: var(--pick); outline-offset: 0; }
.hint { font-weight: 400; font-size: 0.82rem; color: var(--soft); }
.pw { position: relative; display: flex; }
.pw input { padding-right: 4.5rem; }
.pw-toggle { position: absolute; right: 0.3rem; top: 0.3rem; bottom: 0.3rem; min-width: 3.6rem; border: 0; border-radius: 9px; background: var(--raised); color: var(--text); font-weight: 600; font-size: 0.82rem; cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 0.75rem; min-height: 2.75rem; cursor: pointer; font-size: 0.94rem; color: var(--para); }
.check input { width: 1.3rem; height: 1.3rem; flex: none; margin: 0.1rem 0 0; accent-color: var(--pick); }
.form-msg { border-radius: 12px; padding: 0.7rem 0.9rem; font-weight: 600; font-size: 0.94rem; }
.form-msg.is-bad { background: var(--bad-tint); border: 1px solid var(--bad-line); color: var(--bad-text); }
.form-msg.is-good { background: var(--good-tint); border: 1px solid var(--good-line); color: var(--good-text); }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.or { display: flex; align-items: center; gap: 0.75rem; color: var(--soft); font-size: 0.82rem; margin-bottom: 1rem; }
.or::before, .or::after { content: ""; flex: 1 1 0; height: 1px; background: var(--line); }
.alt-login .btn { width: 100%; }
.auth-alt { color: var(--para); }
.safe-note { display: flex; gap: 0.6rem; align-items: flex-start; padding-top: 1rem; border-top: 1px solid var(--line); }
.safe-note .ico { color: var(--good-text); margin-top: 0.1rem; }
.notice { border: 1px solid var(--line); background: var(--raised); border-radius: 12px; padding: 0.8rem 1rem; font-size: 0.94rem; color: var(--para); }
.notice-pick { background: var(--pick-tint); border-color: var(--pick-line); }
.notice strong { color: var(--text); }

.card-save { background: var(--good-tint); border-color: var(--good-line); display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; }
.card-save .fine { color: var(--para); }
.card-save .btn { margin-top: 0.4rem; }
.synced .ico { color: var(--good-text); }
.synced .fine { overflow-wrap: anywhere; }

.leadbox { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; background: var(--pick-tint); border: 1px solid var(--pick-line); border-radius: var(--r-card); padding: clamp(1.4rem, 4vw, 2rem); }
.lead-text { flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.lead-text .eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; }
.lead-text p { color: var(--para); }
.lead-form { flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.lead-form form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.lead-form input[type="email"] { flex: 1 1 13rem; width: auto; background: var(--surface); }
.lead-done { font-weight: 700; color: var(--good-text); font-size: 1.06rem; }
.leadbox-slim { padding: 1.25rem 1.4rem; gap: 0.9rem 1.5rem; }

.acct-root { display: flex; flex-direction: column; gap: 1.25rem; }
.acct-head { display: flex; align-items: center; gap: 1rem; }
.acct-head .soft { overflow-wrap: anywhere; }
.acct { display: flex; flex-direction: column; gap: 0.9rem; }
.acct-stats { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; }
.acct-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; padding-block: 0.75rem; border-top: 1px solid var(--line); }
.acct-row:first-child { border-top: 0; padding-top: 0; }
.acct-danger { border-color: var(--bad-line); }
.dump { min-height: 12rem; padding: 0.9rem; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; line-height: 1.5; resize: vertical; }
.cert-id { font-size: 0.8rem; font-weight: 500; color: var(--soft); overflow-wrap: anywhere; }
.cert-verify { margin-top: 1.25rem; }
.copyrow { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.copyrow input { flex: 1 1 14rem; width: auto; font-family: var(--font-mono); font-size: 0.82rem; }
.verify-form { margin: 1.5rem 0; }
.verify-form input { font-family: var(--font-mono); }
.verify-result { display: flex; flex-direction: column; gap: 0.6rem; }
.verify-result.is-good { border-color: var(--good-line); box-shadow: var(--hero-glow); }
.verify-result.is-bad { border-color: var(--bad-line); }

/* ---------- curriculum ---------- */
.cur-level { display: flex; flex-direction: column; gap: 1.25rem; }
.cur-level .section-head { margin-bottom: 0; }
.cur-mod .d4 { margin: 0.3rem 0 0.75rem; }
.cur-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.cur-list li { border-top: 1px solid var(--line); }
.cur-list a { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.85rem 0.25rem; color: var(--text); text-decoration: none; }
.cur-list a:hover .strong { color: var(--pick-text); text-decoration: underline; }
.cur-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.cur-min { flex: none; padding-top: 0.2rem; font-weight: 500; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .has-tabs .nav { display: none; }
  .has-tabs .auth-slot { display: none; }
  .lead-form .btn, .form-actions .btn, .auth-card .form > .btn { width: 100%; }
  .cur-min { display: none; }
  .has-tabs { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--bar); border-top: 1px solid var(--line); padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px)); }
  .tabbar a { flex: 1 1 0; min-height: 3.25rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; border-radius: 12px; color: var(--soft); font-size: 0.75rem; font-weight: 600; text-decoration: none; }
  .tabbar a .ico { font-size: 1.1rem; }
  .tabbar a[aria-current="page"] { color: var(--good-text); background: var(--good-tint); font-weight: 700; }
  .has-tabs .logo span { display: none; }
  [data-page="lesson"] .logo span { display: none; }
  .mod-label { flex-basis: 100%; }
  .tile { width: 2.75rem; height: 2.75rem; font-size: 0.875rem; }
  .link { width: 0.35rem; }
  .intro { padding-block: 2rem 1.5rem; gap: 2rem; }
  .cta-row .btn, .hero-main .btn, .quiz-intro .btn, .qactions .btn, .result-actions .btn { width: 100%; }
  .promise { padding: 1.4rem; }
  .qprompt { font-size: 1.3rem; }
  .lesson-layout { gap: 2rem; padding-block: 1.5rem 3rem; }
  .pn-next { text-align: left; }
}
@media (max-width: 420px) {
  [data-page="landing"] .nav { display: none; }
  .logo { font-size: calc(1rem * var(--ds)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fill { transition: none; }
}

@media print {
  .bar, .foot, .tabbar, .flash, .consent, .cert-form, .no-print, .skip { display: none !important; }
  body { background: #fff; }
}

/* languages */
.langs { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding-top: 0.75rem; margin-top: 0.75rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
.langs a[aria-current] { font-weight: 700; text-decoration: none; color: var(--text); }
.lang-pick { position: relative; }
.lang-pick > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; height: 2.75rem; padding: 0 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; cursor: pointer; }
.lang-pick > summary::-webkit-details-marker { display: none; }
.lang-pick > summary:hover, .lang-pick[open] > summary { border-color: var(--soft); }
.lang-menu { position: absolute; z-index: 30; top: calc(100% + 0.4rem); right: 0; width: max-content; min-width: 13rem; max-width: calc(100vw - 2rem); max-height: min(78vh, 40rem); overflow-y: auto; margin: 0; padding: 0.35rem; list-style: none; background: var(--raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.18); }
.lang-menu a { display: flex; align-items: center; gap: 0.7rem; min-height: 2.75rem; padding: 0 0.7rem; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--good-tint); }
.lang-menu a[aria-current] { color: var(--good-text); }
.lang-code { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 1.6rem; border-radius: 6px; border: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; color: var(--soft); }
.lang-menu a[aria-current] .lang-code { border-color: currentColor; color: inherit; }
.lang-menu.to-left { right: auto; left: 0; }
.lang-name { flex: 1 1 auto; }
.lang-check { flex: none; }
/* The display faces have no Japanese, Korean or Vietnamese letters, so those pages use system fonts for headings. */
html:lang(ja), html:lang(ko), html:lang(vi) { --font-display: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans", sans-serif !important; --font-body: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans", sans-serif !important; --ds: 1 !important; --dls: 0em !important; }
html:lang(ja) body, html:lang(ko) body { line-break: strict; word-break: normal; overflow-wrap: anywhere; }
html:lang(ja) .eyebrow, html:lang(ko) .eyebrow { letter-spacing: 0.04em; }
