/* TwiddleLab release shell: design system tokens and the page components from the Figma file
   (Design system page, Web section 1-9). Loaded after friendly.css and app.css.
   Sections: tokens, base and a11y, nav, tab bar, footer, cards and chips, states, home, catalog, course,
   welcome, onboarding, auth, paywall, profile and settings. */

/* ---------- tokens (Figma "TwiddleLab tokens") ---------- */
:root {
  --canvas: #FAF7F2; --canvas-2: #F3EEE6; --surface: #FFFFFF;
  --ink-3: #676F92;           /* Figma ink-3 #7A82A3, darkened to pass 4.5:1 on canvas for small text */
  --pip-btn: #F25C2A;
  --ai: #8B7CFF; --ai-ink: #5A49DB; --ai-soft: #F3F1FF;
  --math: #4DA3FF; --math-ink: #1B6CC9; --math-soft: #EEF6FF;
  --code: #FFC93C; --code-ink: #946500; --code-soft: #FFF7E0;
  --phys: #F0506E; --phys-ink: #C42C4A; --phys-soft: #FFEEF1;
  --ok-btn: #13A673; --ok-ink: #0B7A54; --ok-soft: #E9F8F1;
  --xp: #FFC93C; --xp-ink: #946500; --xp-soft: #FFF7E0;
  --danger: #D93A3A; --danger-soft: #FDECEC;
  --focus: #1B6CC9;
  --shadow-pop: 0 18px 44px -18px rgba(31, 42, 85, .28), 0 0 0 1px rgba(31, 42, 85, .05);
}

/* ---------- base and accessibility ---------- */
body:not(.lesson-body) { background: var(--canvas); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 10px; }
main:focus, main[tabindex="-1"]:focus-visible { outline: none; }
.page-pad { padding: 40px 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-l { min-height: 52px; }
.btn-ghost { --bg: transparent; --edge: transparent; --fg: var(--ink); box-shadow: none; }
.btn-ghost:hover { --bg: var(--canvas-2); box-shadow: none; transform: none; }
.btn-ink { --bg: #1F2A55; --edge: #0F1736; --fg: #fff; }
.link-arrowless { font-weight: 700; text-decoration: none; color: var(--ink); }
.link-arrowless:hover { text-decoration: underline; text-decoration-color: var(--pip); text-decoration-thickness: 2px; text-underline-offset: 4px; }
h1, h2, h3 { text-wrap: balance; }

/* ---------- nav ---------- */
.nav { background: var(--surface); border-bottom: 1px solid var(--line); backdrop-filter: none; }
.nav-in { height: 72px; gap: 24px; }
.logo { font-weight: 800; font-size: 22px; }
.logo img { height: 28px; }
.nav-links { margin-left: 16px; gap: 4px; }
.nav-links a { font-size: 16px; font-weight: 600; padding: 9px 14px; border-radius: 10px; color: var(--ink-2); }
.nav-links a[aria-current] { background: var(--canvas-2); color: var(--ink); font-weight: 700; }
.nav-right { gap: 10px; }
.stat-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 9px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; font-variant-numeric: tabular-nums; }
.stat-chip svg { width: 18px; height: 18px; }
.chip-streak { background: var(--pip-soft); color: var(--pip-edge); }
.chip-xp { background: var(--xp-soft); color: var(--xp-ink); }
.chip-free { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 600; }
.nav .avatar { width: 38px; height: 38px; font-size: 16px; text-decoration: none; }
.nav .avatar[aria-current] { box-shadow: 0 0 0 2px var(--ai); }
.nav-out .nav-links a { font-weight: 600; }
.nav-out .nav-right { gap: 8px; }
@media (max-width: 760px) {
  .nav-in { height: 60px; gap: 12px; }
  .logo { font-size: 20px; }
  .stat-chip { height: 32px; padding: 0 10px 0 7px; font-size: 14px; }
  .nav-out .nav-right .btn-ghost { display: none; }
}
@media (max-width: 380px) { .chip-xp { display: none; } }

/* ---------- phone tab bar ---------- */
@media (max-width: 760px) {
  .tabbar { padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12.5px; padding: 4px 4px 6px; color: var(--ink-2); background: none !important; }
  .tabbar a i { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--ink); font-weight: 700; }
  .tabbar a[aria-current] i { background: var(--pip-soft); color: var(--pip-edge); }
  body:not(.lesson-body) #app { padding-bottom: 68px; }
}

/* ---------- footer ---------- */
.app-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer-in { align-items: flex-start; }
.footer-note { color: var(--ink-2); font-size: 15px; margin-top: 8px; max-width: 30em; }
.footer-links { gap: 8px 22px; flex-wrap: wrap; }
.footer-links a { font-size: 15px; font-weight: 600; }
@media (max-width: 760px) { .app-footer { padding-bottom: 32px; margin-top: 48px; } }

/* ---------- cards, chips, progress ---------- */
.card { background: var(--surface); border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line); }
.tchip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--canvas-2); color: var(--ink-2); white-space: nowrap; }
.tchip.ai { background: var(--ai-soft); color: var(--ai-ink); }
.tchip.math { background: var(--math-soft); color: var(--math-ink); }
.tchip.code { background: var(--code-soft); color: var(--code-ink); }
.tchip.physics { background: var(--phys-soft); color: var(--phys-ink); }
.tchip.line { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.tchip.done { background: var(--ok-soft); color: var(--ok-ink); }
.tchip.new { background: var(--pip-soft); color: var(--pip-edge); }
.tchip.pro { background: var(--ink); color: #fff; }
.prog { height: 8px; border-radius: 99px; background: var(--canvas-2); overflow: hidden; }
.prog i { display: block; height: 100%; min-width: 8px; border-radius: 99px; background: var(--c, var(--pip)); }
.prog.zero i { min-width: 0; }
.eyebrow { font-weight: 700; font-size: 14px; color: var(--ink-3); letter-spacing: 0; }
.t-ai { --c: var(--ai); --ink-c: var(--ai-ink); --soft: var(--ai-soft); }
.t-math { --c: var(--math); --ink-c: var(--math-ink); --soft: var(--math-soft); }
.t-code { --c: var(--code); --ink-c: var(--code-ink); --soft: var(--code-soft); }
.t-physics { --c: var(--phys); --ink-c: var(--phys-ink); --soft: var(--phys-soft); }
.art-tile { display: grid; place-items: center; flex: none; background: var(--soft, var(--canvas-2)); border-radius: 14px; overflow: hidden; }
.art-tile svg { width: 86%; height: 86%; }

/* ---------- states ---------- */
.state { text-align: center; padding: 72px 0 40px; display: flex; flex-direction: column; align-items: center; }
.state-pip { width: 160px; height: 160px; object-fit: contain; margin-bottom: 8px; }
.state h1 { font-size: clamp(32px, 4vw, 44px); }
.state .lead { margin: 12px auto 0; max-width: 32em; }
.state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.state-note { margin-top: 18px; color: var(--ink-3); font-size: 15px; }
.state-404 { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: clamp(110px, 16vw, 160px); line-height: 1; color: var(--ink); margin: 0 0 8px; }
.state-404 img { width: clamp(100px, 14vw, 150px); height: auto; }
.skel { background: var(--canvas-2); border-radius: 8px; animation: skel 1.4s ease-in-out infinite; }
@keyframes skel { 50% { opacity: .55; } }
.skel-grid { display: grid; grid-template-columns: 1fr 368px; gap: 24px; }
.skel-grid > div:first-child { display: grid; gap: 18px; align-content: start; }
.skel-card { background: var(--surface); border-radius: 24px; padding: 32px; display: grid; gap: 14px; }
.skel-side { display: grid; gap: 20px; align-content: start; }
@media (max-width: 900px) { .skel-grid { grid-template-columns: 1fr; } }
.offline-bar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; text-align: center; }
.offline-bar svg { width: 18px; height: 18px; color: var(--xp); flex: none; }
.app-loading { padding: 0; }
.app-boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ink-3); font-weight: 600; }

/* ---------- shared page bits ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.sec-head h2 { font-size: clamp(22px, 2.2vw, 26px); letter-spacing: -0.015em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stat { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pip-ink { color: var(--pip-edge); }

/* ---------- home ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 24px; align-items: start; }
.home-main { display: grid; gap: 14px; min-width: 0; }
.cont-card { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; align-items: center; padding: 36px 32px 36px 40px; border-radius: 28px; background: var(--soft); }
.cont-course { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 15px; color: var(--ink-c); }
.cont-card h1 { font-size: clamp(32px, 3.2vw, 40px); line-height: 1.12; margin-top: 12px; letter-spacing: -0.025em; }
.cont-meta { margin-top: 12px; color: var(--ink-2); font-size: 17px; }
.cont-prog { height: 10px; max-width: 380px; margin-top: 16px; background: rgba(255,255,255,.85); }
.cont-next { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.cont-next span { color: var(--ink-3); font-weight: 700; font-size: 14px; margin-right: 6px; }
.cont-next svg { width: 18px; height: 18px; color: var(--ink-c); flex: none; }
.cont-card .btn-row { margin-top: 22px; }
.cont-art { position: relative; width: 250px; height: 250px; }
.cont-disc { position: absolute; inset: 10px 10px 10px 10px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.cont-disc svg { width: 82%; height: 82%; }
.cont-art .pip { position: absolute; right: -6px; bottom: -8px; }
.cont-art .pip::after { display: none; }
.yc { margin-top: 26px; }
.yc-list { list-style: none; margin: 0; padding: 0; }
.yc-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 180px auto; gap: 18px; align-items: center; padding: 16px 20px; }
.yc-row + .yc-row { border-top: 1px solid var(--line); }
.yc-name small { display: block; font-weight: 700; font-size: 13px; color: var(--ink-c); }
.yc-name b { display: block; font-size: 17px; line-height: 1.3; }
.yc-prog small { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.home-side { display: grid; gap: 20px; }
.side-card { padding: 24px; display: grid; gap: 14px; }
.st-row { display: flex; align-items: center; gap: 14px; }
.st-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--pip-soft); display: grid; place-items: center; flex: none; }
.st-ico svg { width: 30px; height: 30px; }
.st-sub { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.st-pill { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--canvas); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.st-pill.ok { background: var(--ok-soft); color: var(--ok-ink); }
.st-pill svg { width: 18px; height: 18px; flex: none; }
.wk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.wk-goal { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.wk-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 104px; }
.wk-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.wk-col i { width: 26px; max-width: 100%; border-radius: 6px; background: var(--canvas-2); }
.wk-col i.full { background: var(--xp); }
.wk-col i.part { background: var(--xp-soft); box-shadow: inset 0 0 0 1.5px var(--xp); }
.wk-col small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.wk-col.is-today small { color: var(--ink); font-weight: 800; }
.practice-card { background: var(--soft); box-shadow: none; }
.practice-card .eyebrow { color: var(--ink-c); }
.pr-ico { background: var(--surface); color: var(--ink-c); width: 44px; height: 44px; border-radius: 50%; }
.pr-ico svg { width: 22px; height: 22px; }
.pr-title { font-weight: 700; font-size: 18px; }
.practice-card > p { color: var(--ink-2); font-size: 16px; }
.home-tracks { margin-top: 48px; }
.trk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.trk-card { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 22px; border-radius: 24px; background: var(--soft); text-decoration: none; color: var(--ink); transition: transform .15s ease; }
.trk-card:hover { transform: translateY(-2px); }
.trk-art { display: grid; place-items: center; height: 120px; border-radius: 18px; background: var(--surface); overflow: hidden; }
.trk-art svg { height: 112px; width: auto; }
.trk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trk-head b { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.015em; }
.trk-head small { font-weight: 700; font-size: 13px; color: var(--ink-c); }
.trk-line { font-weight: 500; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.empty-hero { display: flex; align-items: center; gap: 40px; padding: 40px; }
.empty-hero .pip::after { display: none; }
.empty-hero h1 { font-size: clamp(32px, 3.4vw, 42px); }
.empty-hero .lead { margin-top: 10px; }
.empty-hero .btn-row { margin-top: 22px; }
.home > section + section { margin-top: 40px; }
.ccard2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.ccard2 { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; position: relative; }
a.ccard2:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 24px -14px rgba(31,42,85,.3); }
.ccard2-art { display: grid; place-items: center; height: 132px; background: var(--soft); }
.ccard2-art svg { height: 112px; width: auto; }
.ccard2-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.ccard2-body b { font-size: 16px; line-height: 1.3; }
.ccard2-body small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .trk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .page-pad { padding-top: 22px; }
  .cont-card { grid-template-columns: 1fr; padding: 24px 20px; }
  .cont-art { display: none; }
  .cont-card .btn-row .btn { flex: 1 1 auto; }
  .yc-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px 14px; padding: 14px 16px; }
  .yc-row .art-tile { width: 48px !important; height: 48px !important; }
  .yc-prog { grid-column: 2 / 3; grid-row: 2; }
  .yc-row .btn { grid-row: 1; grid-column: 3; }
  .trk-grid { gap: 12px; }
  .trk-card { padding: 12px 12px 14px; gap: 8px; }
  .trk-art { height: 88px; }
  .trk-art svg { height: 80px; }
  .trk-head { flex-direction: column; gap: 0; }
  .trk-head b { font-size: 19px; }
  .empty-hero { flex-direction: column; text-align: center; padding: 28px 20px; gap: 12px; }
  .empty-hero .btn-row { justify-content: center; }
  .ccard2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ccard2-art { height: 104px; }
  .ccard2-art svg { height: 88px; }
}

/* ---------- welcome (logged-out landing) ---------- */
.welcome { background: var(--canvas); }
.w-hero { padding: 64px 0 56px; }
.w-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 56px; align-items: center; }
.w-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.w-hero h1 { font-size: clamp(48px, 5.4vw, 68px); line-height: 1.03; letter-spacing: -0.035em; margin-top: 20px; font-weight: 700; max-width: 9em; }
.w-hero .lead { margin-top: 20px; max-width: 30em; }
.w-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.w-ok { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.w-ok svg { width: 20px; height: 20px; color: var(--ok-btn); flex: none; }
.w-demo { position: relative; min-width: 0; }
.w-demo-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--canvas-2); margin-bottom: 14px; }
.w-demo-tabs button { border: 0; background: transparent; cursor: pointer; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.w-demo-tabs button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.w-demo-tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px -2px rgba(31,42,85,.18); }
.w-demo-card { background: var(--surface); border-radius: 28px; padding: 22px 24px 20px; box-shadow: var(--shadow-pop); }
.w-demo-top { display: flex; align-items: center; gap: 12px; }
.w-demo-top .prog { flex: 1; }
.w-demo-kicker { margin-top: 14px; font-weight: 700; font-size: 14px; color: var(--ink-c); }
.w-demo-title { font-size: 22px; line-height: 1.25; margin-top: 4px; letter-spacing: -0.015em; }
.w-demo-stage.stage { margin-top: 14px; padding: 10px; min-height: 240px; box-shadow: inset 0 0 0 1px var(--line); }
.w-demo-stage svg { max-height: 330px; margin: 0 auto; }
.w-demo-wait { color: var(--ink-3); font-weight: 600; text-align: center; padding: 90px 10px; }
.w-demo-done { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ok-soft); color: var(--ok-ink); font-size: 15px; }
.w-demo-done b { font-weight: 800; }
.w-demo-note { position: absolute; right: 18px; bottom: -18px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-pop); }
.w-demo-note svg { width: 18px; height: 18px; flex: none; }
.w-sec { padding: 40px 0; }
.w-sec-head { margin-bottom: 22px; }
.w-sec-head h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.025em; }
.w-sec-head p { margin-top: 8px; color: var(--ink-2); font-size: 18px; max-width: 40em; }
.w-tracks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.w-track { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 24px; background: var(--soft); color: var(--ink); text-decoration: none; transition: transform .15s ease; }
.w-track:hover { transform: translateY(-2px); }
.w-track-art { display: grid; place-items: center; height: 140px; border-radius: 18px; background: var(--surface); overflow: hidden; }
.w-track-art svg { height: 130px; width: auto; }
.w-track h3 { font-size: 22px; font-weight: 700; margin-top: 2px; }
.w-track p { color: var(--ink-2); font-size: 15px; line-height: 1.45; flex: 1; }
.w-track-meta { font-weight: 700; font-size: 13px; color: var(--ink-c); }
.w-steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.w-steps li { counter-increment: st; background: var(--surface); border-radius: 24px; padding: 24px; box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 6px; align-content: start; }
.w-steps li::before { content: counter(st); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--pip-soft); color: var(--pip-edge); font-family: var(--display); font-weight: 700; font-size: 20px; margin-bottom: 6px; }
.w-steps b { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.w-steps span { color: var(--ink-2); font-size: 16px; }
.w-band { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; }
.w-band-solo { grid-template-columns: 1fr; }
.w-price { padding: 32px; border-radius: 28px; display: grid; gap: 12px; align-content: start; }
.w-price h2, .w-parents h2 { font-size: clamp(26px, 2.6vw, 30px); letter-spacing: -0.02em; }
.w-price-rows { margin: 4px 0 8px; display: grid; }
.w-price-rows div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 10px 0; }
.w-price-rows div + div { border-top: 1px solid var(--line); }
.w-price-rows dt { font-weight: 700; }
.w-price-rows dd { margin: 0; color: var(--ink-2); }
.w-parents { padding: 32px; border-radius: 28px; background: var(--ink); color: #fff; display: grid; gap: 12px; align-content: start; }
.w-parents .eyebrow { color: var(--xp); }
.w-parents p:last-child { color: #DDD7CD; }
.w-final { text-align: center; padding-bottom: 24px; }
.w-final .wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.w-final .pip::after { display: none; }
.w-final h2 { font-size: clamp(30px, 3.4vw, 42px); }
.w-final .lead { margin: 0 auto 10px; }
@media (max-width: 1100px) {
  .w-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .w-tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-band { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .w-hero { padding: 28px 0 40px; }
  .w-hero h1 { font-size: 42px; }
  .w-cta .btn { flex: 1 1 auto; }
  .w-demo-card { padding: 16px; border-radius: 22px; }
  .w-demo-tabs { display: flex; width: 100%; }
  .w-demo-tabs button { flex: 1; justify-content: center; padding: 8px 6px; font-size: 14px; }
  .w-demo-note { position: static; margin-top: 12px; }
  .w-tracks { gap: 12px; }
  .w-track { padding: 12px; }
  .w-track-art { height: 96px; }
  .w-track-art svg { height: 88px; }
  .w-steps { grid-template-columns: 1fr; gap: 12px; }
  .w-price, .w-parents { padding: 24px 20px; }
  .w-price-rows div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- onboarding flow ---------- */
.flow-body { background: var(--canvas); }
.flow-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.flow-top-link { font-weight: 600; font-size: 15px; color: var(--ink-2); }
.flow-main { width: min(1160px, 100% - 32px); margin: 0 auto; padding: 24px 0 64px; display: flex; flex-direction: column; gap: 24px; }
.flow-main.narrow-col { width: min(440px, 100% - 32px); }
.flow-main.center { align-items: center; text-align: center; max-width: 620px; }
.flow-main h1 { font-size: clamp(32px, 3.6vw, 40px); letter-spacing: -0.025em; }
.flow-main .lead { margin: 8px auto 0; }
.flow-main.narrow-col .lead { margin-left: 0; }
.stepper { display: flex; align-items: center; gap: 6px; align-self: center; }
.flow-main.narrow-col .stepper { align-self: flex-start; }
.stepper i { width: 8px; height: 8px; border-radius: 4px; background: var(--line-2); }
.stepper i.on { background: var(--pip); }
.stepper i.now { width: 28px; }
.stepper span { margin-left: 8px; font-weight: 600; font-size: 13px; color: var(--ink-3); }
.track-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.track-opt { border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .12s ease, box-shadow .12s ease; }
.track-opt:hover { transform: translateY(-2px); }
.track-opt[aria-checked=true] { box-shadow: inset 0 0 0 3px var(--pip), var(--shadow-pop); }
.track-opt-art { display: grid; place-items: center; height: 200px; border-radius: 18px; background: var(--soft); overflow: hidden; }
.track-opt-art svg { height: 180px; width: auto; }
.track-opt-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 0; }
.track-opt-head b { font-family: var(--display); font-weight: 700; font-size: 22px; }
.track-opt .tick { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); display: grid; place-items: center; color: #fff; }
.track-opt[aria-checked=true] .tick { background: var(--pip-btn); box-shadow: none; }
.track-opt .tick svg { width: 16px; height: 16px; }
.track-opt small { font-size: 15px; color: var(--ink-2); padding: 0 4px; line-height: 1.45; }
.flow-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.flow-fine { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.opt-list { display: grid; gap: 10px; }
.radio-opt { border: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: left; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.radio-opt b { display: block; font-weight: 700; font-size: 17px; }
.radio-opt small { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.radio-opt .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px var(--line-2); background: #fff; }
.radio-opt[aria-checked=true] { background: var(--pip-soft); box-shadow: inset 0 0 0 2px var(--pip); }
.radio-opt[aria-checked=true] .dot { box-shadow: inset 0 0 0 2px var(--pip-btn), inset 0 0 0 6px #fff; background: var(--pip-btn); }
.flow-note { padding: 24px; text-align: left; display: grid; gap: 6px; }
@media (max-width: 900px) { .track-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .track-opt-art { height: 140px; } .track-opt-art svg { height: 124px; } }
@media (max-width: 520px) {
  .flow-top { height: 60px; }
  .flow-top-link { font-size: 14px; }
  .track-pick { gap: 10px; }
  .track-opt { padding: 10px; gap: 8px; border-radius: 18px; }
  .track-opt-art { height: 96px; border-radius: 12px; }
  .track-opt-art svg { height: 84px; }
  .track-opt-head b { font-size: 18px; }
  .track-opt small { font-size: 13px; }
}

/* ---------- catalog ---------- */
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cat-head h1 { font-size: clamp(36px, 3.6vw, 44px); letter-spacing: -0.03em; }
.cat-head .lead { margin-top: 8px; font-size: 18px; max-width: 40em; }
.search { position: relative; display: flex; align-items: center; width: min(340px, 100%); height: 48px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.search > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 40px 0 42px; font: inherit; font-size: 16px; color: var(--ink); border-radius: 12px; }
.search input:focus { outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { position: absolute; right: 6px; width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.search-x svg { width: 18px; height: 18px; }
.cat-filters { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.seg-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--canvas-2); flex-wrap: wrap; }
.seg-tabs button { border: 0; background: transparent; cursor: pointer; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.seg-tabs button:not(.t-all)::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.seg-tabs button[aria-pressed=true] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 2px 6px -2px rgba(31,42,85,.18); }
.grade-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.grade-chips span { font-size: 14px; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.grade-chips button { height: 34px; min-width: 34px; padding: 0 12px; border-radius: 999px; border: 0; cursor: pointer; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.grade-chips button[aria-pressed=true] { background: var(--ink); color: #fff; box-shadow: none; }
.cat-track2 { margin-top: 40px; }
.cat-track2-head { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cat-track2-head h2 { font-size: 28px; letter-spacing: -0.02em; }
.cat-track2-head p { color: var(--ink-2); font-size: 16px; margin-top: 2px; }
.cat-track2-head .track-link { margin-left: auto; color: var(--ink-c); white-space: nowrap; font-size: 15px; }
.cat-area2 { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 22px 0; }
.cat-area2 + .cat-area2 { border-top: 1px solid var(--line); }
.cat-area2-head h3 { font-family: var(--body); font-weight: 700; font-size: 17px; letter-spacing: 0; line-height: 1.3; }
.cat-area2-head small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.catalog2 .ccard2-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; }
.ccard2-art { position: relative; }
.ccard2-art .tchip { position: absolute; left: 12px; top: 12px; }
.ccard2-prog { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ccard2-prog .prog { flex: 1; height: 6px; }
.ccard2-prog em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--ink-c); }
.ccard2-st { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 4px; line-height: 1.35; }
.ccard2-st svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--ink-3); }
.ccard2.is-soon { box-shadow: inset 0 0 0 1px var(--line); background: #FCFBF8; }
.ccard2.is-soon .ccard2-art svg, .ccard2.is-locked .ccard2-art svg { opacity: .55; filter: grayscale(.5); }
.ccard2.is-soon .ccard2-st { color: var(--ink-3); }
.tchip.big { height: 36px; padding: 0 14px; font-size: 15px; border: 0; cursor: pointer; }
.cat-empty { padding-top: 48px; }
.cat-empty h2 { font-size: clamp(24px, 2.6vw, 30px); }
@media (max-width: 860px) {
  .cat-area2 { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
  .cat-area2-head { display: flex; align-items: baseline; gap: 10px; }
}
@media (max-width: 760px) {
  .search { width: 100%; }
  .cat-filters { margin-top: 18px; gap: 12px; }
  .seg-tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .seg-tabs button { padding: 8px 12px; flex: none; }
  .grade-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .grade-chips button { flex: none; }
  .cat-track2-head { flex-wrap: wrap; }
  .cat-track2-head .track-link { margin-left: 72px; }
  .catalog2 .ccard2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.search-x[hidden] { display: none; }

/* ---------- course page ---------- */
.crumbs2 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-3); margin-bottom: 20px; }
.crumbs2 a { color: var(--ink-2); text-decoration: none; }
.crumbs2 a:hover { color: var(--ink); text-decoration: underline; }
.crumbs2 [aria-current] { color: var(--ink); }
.course2-grid { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 40px; align-items: start; }
.course2-side { position: sticky; top: 92px; padding: 20px; display: grid; gap: 14px; border-radius: 24px; }
.course2-art { aspect-ratio: 1; border-radius: 20px; background: var(--soft); display: grid; place-items: center; overflow: hidden; }
.course2-art svg { width: 82%; height: 82%; }
.course2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.course2-side h1 { font-size: 30px; line-height: 1.12; letter-spacing: -0.025em; }
.course2-area { font-weight: 700; font-size: 14px; color: var(--ink-c); margin-top: -6px; }
.course2-desc { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.course2-prog p { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.course2-prog .xp-earned { color: var(--xp-ink); font-weight: 700; }
.course2-prog .prog i { background: var(--c); }
.course2-action .btn { width: 100%; }
.course2-action .lock-note { font-size: 15px; }
.course2-more { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.course2-more .eyebrow { font-family: var(--body); font-size: 14px; font-weight: 700; color: var(--ink-3); }
.course2-more .prereqs { margin: 0 0 6px; font-size: 15px; }
.course2-more .prereqs li { font-weight: 600; }
.course2-more .small { font-size: 14px; }
.course2-path-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.course2-path-head h2 { font-size: clamp(26px, 2.6vw, 30px); letter-spacing: -0.02em; }
.legend { display: flex; gap: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.lg-done::before { background: var(--ok-btn); }
.lg-now::before { background: var(--c); }
.lg-locked::before { background: var(--line-2); }
.course2-intro { color: var(--ink-2); font-size: 16px; margin: 6px 0 18px; max-width: 40em; }
.course2-path .cpath { max-width: none; }
@media (max-width: 960px) {
  .course2-grid { grid-template-columns: 1fr; gap: 28px; }
  .course2-side { position: static; grid-template-columns: 140px minmax(0, 1fr); column-gap: 20px; }
  .course2-art { grid-row: span 4; align-self: start; }
  .course2-side > :not(.course2-art) { grid-column: 2; }
  .course2-prog, .course2-action, .course2-more { grid-column: 1 / -1 !important; }
}
@media (max-width: 560px) {
  .course2-side { grid-template-columns: 1fr; }
  .course2-art { grid-row: auto; width: 140px; }
  .course2-side > :not(.course2-art) { grid-column: 1; }
  .course2-side h1 { font-size: 26px; }
}

/* ---------- profile and settings ---------- */
.profile2 { display: grid; gap: 24px; }
.prof2-head { display: flex; align-items: center; gap: 24px; padding: 28px 32px; border-radius: 28px; }
.prof2-av { width: 104px; height: 104px; border-radius: 50%; background: var(--ai-soft); display: grid; place-items: center; flex: none; }
.prof2-av img { width: 88px; height: 88px; }
.prof2-who { flex: 1; min-width: 0; }
.prof2-who h1 { font-size: clamp(30px, 3.2vw, 40px); overflow-wrap: anywhere; }
.prof2-who p { color: var(--ink-2); margin-top: 4px; font-size: 17px; }
.pstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.pstat { padding: 22px 24px; display: grid; gap: 8px; align-content: start; }
.pstat p:last-child { color: var(--ink-2); font-weight: 600; font-size: 15px; }
.pstat-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.pstat-ico svg { width: 22px; height: 22px; }
.pstat-ico.xp { background: var(--xp-soft); }
.pstat-ico.pip { background: var(--pip-soft); }
.pstat-ico.math { background: var(--math-soft); color: var(--math-ink); }
.pstat-ico.ok { background: var(--ok-soft); color: var(--ok-ink); }
.prof2-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.prof2-courses h2, .prof2-settings-title { font-size: 24px; letter-spacing: -0.015em; margin-bottom: 12px; }
.prof2-settings-title { margin: 16px 0 -8px; scroll-margin-top: 90px; }
.pc-list { overflow: hidden; }
.pc-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.pc-row + .pc-row { border-top: 1px solid var(--line); }
.pc-row:hover { background: #FCFBF8; }
.pc-name { flex: 1; min-width: 0; display: grid; gap: 6px; }
.pc-name b { font-weight: 700; font-size: 16px; }
.pc-name .prog { height: 6px; }
.pc-row small { font-weight: 700; font-size: 13px; color: var(--ink-c); }
.pc-empty { padding: 20px; color: var(--ink-2); }
.settings2 { display: grid; gap: 20px; }
.scard { padding: 0; overflow: hidden; }
.scard h3 { font-size: 20px; padding: 20px 24px 6px; letter-spacing: -0.01em; }
.scard .settings { box-shadow: none; border-radius: 0; background: transparent; }
.scard .set { border-top: 1px solid var(--line); }
.scard .set .what b { font-weight: 700; }
.scard .set .what span { font-size: 15px; }
.scard-dev { box-shadow: inset 0 0 0 1.5px var(--line-2); background: repeating-linear-gradient(135deg, #fff, #fff 12px, #FCFBF8 12px, #FCFBF8 24px); }
.set-danger .what b { color: var(--danger); }
.btn-danger { --fg: var(--danger); }
.switch[disabled] { opacity: .6; cursor: not-allowed; }
.lang-pick.seg button[aria-checked=true] { background: #fff; }
@media (max-width: 900px) { .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .prof2-courses { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .prof2-head { flex-wrap: wrap; padding: 20px; gap: 16px; }
  .prof2-av { width: 72px; height: 72px; }
  .prof2-av img { width: 60px; height: 60px; }
  .prof2-head .btn-row { width: 100%; }
  .pstat { padding: 16px; }
  .stat { font-size: 26px; }
  .scard h3 { padding: 18px 18px 4px; }
}

/* ---------- paywall ---------- */
.pw-top { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.pw-close svg { width: 24px; height: 24px; }
.paywall2 { padding: 16px 0 56px; }
.pw-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 64px; align-items: start; }
.pw-main { display: grid; gap: 16px; }
.pw-main h1 { font-size: clamp(40px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.pw-main .lead { margin: 0; }
.pw-limit { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--pip-soft); color: var(--pip-edge); font-weight: 600; font-size: 15px; }
.pw-limit svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.pw-plans { display: grid; gap: 10px; margin-top: 4px; }
.pw-plan { padding: 16px 18px; }
.pw-plan-t { flex: 1; }
.pw-plan .tchip { flex: none; }
.pw-timeline { list-style: none; margin: 4px 0 0; padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 14px; position: relative; }
.pw-timeline li { display: flex; gap: 14px; align-items: flex-start; position: relative; }
.pw-timeline li + li::before { content: ""; position: absolute; left: 17px; top: -14px; height: 14px; width: 2px; background: var(--line-2); }
.tl-ico { width: 36px; height: 36px; border-radius: 50%; background: var(--pip-soft); color: var(--pip-edge); display: grid; place-items: center; flex: none; }
.pw-timeline li:nth-child(2) .tl-ico { background: var(--xp-soft); color: var(--xp-ink); }
.pw-timeline li:nth-child(3) .tl-ico { background: var(--canvas-2); color: var(--ink-2); }
.tl-ico svg { width: 18px; height: 18px; }
.pw-timeline b { display: block; font-size: 15px; }
.pw-timeline span { display: block; font-size: 15px; color: var(--ink-2); }
.pw-hint { font-size: 15px; color: var(--ink-2); }
.pw-cta { display: grid; gap: 12px; margin-top: 4px; }
.pw-fine { font-size: 14px; color: var(--ink-2); text-align: center; }
.pw-test { color: var(--ink-3); }
.pw-msg { padding: 10px 14px; border-radius: 12px; background: var(--canvas-2); font-weight: 600; font-size: 15px; text-align: center; }
.pw-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 600; }
.pw-links a, .pw-links .link-btn { color: var(--ink-3); text-decoration: none; font-size: 14px; }
.pw-links a:hover, .pw-links .link-btn:hover { color: var(--ink); text-decoration: underline; }
.pw-side { display: grid; gap: 20px; }
.pw-art { position: relative; height: 220px; border-radius: 28px; background: var(--ai-soft); overflow: hidden; }
.pw-tile { position: absolute; top: 34px; width: 140px; height: 140px; border-radius: 30px; background: var(--surface); display: grid; place-items: center; transform: rotate(var(--r)); box-shadow: 0 10px 24px -14px rgba(31,42,85,.35); }
.pw-tile svg { width: 82%; height: 82%; }
.pw-tile:nth-child(1) { left: 6%; } .pw-tile:nth-child(2) { left: 34%; top: 44px; } .pw-tile:nth-child(3) { left: 62%; top: 28px; }
.pw-art img { position: absolute; right: 4%; bottom: 0; width: 120px; height: auto; }
.pw-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.pw-table th, .pw-table td { padding: 14px 20px; text-align: center; font-size: 15px; border-top: 1px solid var(--line); }
.pw-table thead th { border-top: 0; font-weight: 700; color: var(--ink-2); }
.pw-table tbody th { text-align: left; font-weight: 500; }
.pw-table td { width: 90px; color: var(--ink-2); font-weight: 600; }
.pw-table td.pro { color: var(--ink); }
.pw-table td svg { width: 20px; height: 20px; color: var(--ink-2); vertical-align: middle; }
.pw-table td.pro svg { color: var(--ok-btn); }
.pw-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 0; }
.pw-done .lead { margin: 0 auto; }
.pw-sheet .preview { color: var(--ink); }
.pw-sheet-btns { margin-top: 18px; }
.pw-sheet .pw-fine { margin-top: 14px; text-align: left; }
@media (max-width: 1000px) { .pw-grid { grid-template-columns: 1fr; gap: 32px; } .pw-main { max-width: 560px; } }
@media (max-width: 600px) {
  .pw-top { height: 60px; }
  .pw-main h1 { font-size: 36px; }
  .pw-art { height: 160px; }
  .pw-tile { width: 96px; height: 96px; border-radius: 22px; top: 26px; }
  .pw-tile:nth-child(2) { top: 34px; }
  .pw-art img { width: 84px; }
  .pw-table th, .pw-table td { padding: 12px 12px; font-size: 14px; }
  .pw-table td { width: 64px; }
  .pw-sheet-btns .btn { flex: 1 1 auto; }
}

/* ---------- auth (account page signed out) ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 624px); gap: 16px; padding: 16px; min-height: 100vh; }
.auth-left { display: flex; flex-direction: column; min-width: 0; }
.auth-top { width: 100%; padding: 0 32px; height: 64px; }
.auth-main { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
.auth-col { width: min(400px, 100%); display: grid; gap: 16px; }
.auth-col > div { display: grid; gap: 16px; }
.auth-col h1 { font-size: clamp(30px, 3vw, 36px); letter-spacing: -0.025em; line-height: 1.1; }
.auth-lead { color: var(--ink-2); font-size: 16px; }
.auth-form { display: grid; gap: 14px; }
.auth-form .input { height: 52px; font-size: 17px; }
.auth-form .input:focus { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 4px rgba(31,42,85,.12); }
.input:disabled { background: var(--canvas-2); color: var(--ink-3); }
.field label { font-size: 15px; font-weight: 700; }
.auth-check { font-size: 15px; align-items: flex-start; gap: 10px; }
.auth-check input { width: 22px; height: 22px; border-radius: 6px; }
.auth-check input:checked { background: var(--ink); }
.auth-fine { font-size: 14px; color: var(--ink-2); }
.auth-msg { padding: 12px 14px; border-radius: 12px; background: var(--canvas-2); font-weight: 600; font-size: 15px; }
.auth-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--pip-soft); color: var(--pip-edge); display: grid; place-items: center; }
.auth-ico svg { width: 28px; height: 28px; }
.otp { font-family: var(--display); font-weight: 700; font-size: 30px !important; letter-spacing: .5em; text-align: center; height: 64px !important; padding-left: .5em; }
.auth-legal { display: flex; justify-content: center; gap: 20px; padding: 12px; font-size: 13px; }
.auth-legal a { color: var(--ink-3); text-decoration: none; font-weight: 600; }
.auth-legal a:hover { color: var(--ink); text-decoration: underline; }
.auth-panel { position: relative; border-radius: 28px; background: var(--canvas-2); overflow: hidden; min-height: 560px; }
.auth-tile { position: absolute; width: 150px; height: 150px; border-radius: 34px; background: var(--soft); display: grid; place-items: center; box-shadow: 0 12px 28px -16px rgba(31,42,85,.35); }
.auth-tile svg { width: 80%; height: 80%; }
.auth-tile.at0 { left: 9%; top: 8%; transform: rotate(-6deg); }
.auth-tile.at1 { right: 9%; top: 6%; transform: rotate(5deg); }
.auth-tile.at2 { left: 10%; bottom: 8%; transform: rotate(4deg); }
.auth-tile.at3 { right: 9%; bottom: 9%; transform: rotate(-5deg); }
.auth-panel-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 80%); text-align: center; display: grid; justify-items: center; gap: 6px; }
.auth-panel-mid img { width: 180px; height: auto; }
.auth-panel-mid h2 { font-size: 26px; letter-spacing: -0.02em; }
.auth-panel-mid p { color: var(--ink-2); font-size: 15px; }
.auth .scard { margin-top: 8px; }
.account2 { display: grid; gap: 20px; width: min(760px, 100% - 32px); }
.account2 h1 { font-size: clamp(32px, 3.4vw, 40px); }
.scard .set .what span { display: block; }
@media (max-width: 1000px) {
  .auth { grid-template-columns: 1fr; padding: 0; }
  .auth-panel { display: none; }
  .auth-top { padding: 0 16px; }
  .auth-main { place-items: start center; padding-top: 24px; }
}
:focus-visible { outline-color: var(--focus) !important; }

/* Sign in with Google (account page) */
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-google .g-mark { flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 14px; margin: 16px 0 4px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #E9E5DE); }

/* ---------- sign-in flow (js/views/auth.js) ---------- */
.nav-login, .nav-out .nav-login { display: inline-block; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; padding: 8px 4px; }
.nav-login:hover { text-decoration: underline; text-decoration-color: var(--pip); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.nav .avatar-guest { background: var(--canvas-2); color: var(--ink-2); }
.avatar-ico { display: grid; place-items: center; }
.avatar-ico svg { width: 20px; height: 20px; }
.auth-box { display: grid; gap: 14px; }
.auth-box .auth-or { margin: 2px 0; }
.auth-hint { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.auth-consent { font-size: 13.5px; color: var(--ink-3); line-height: 1.45; }
.auth-consent .link { color: var(--ink-2); }
.auth-msg.is-bad { background: var(--pip-soft); color: var(--pip-edge); }
.auth-code-head { display: flex; gap: 14px; align-items: flex-start; }
.auth-code-head .auth-code-title { display: block; font-size: 18px; }
.auth-code-head span { color: var(--ink-2); font-size: 15px; }
.auth-code-head .auth-ico { flex: none; width: 48px; height: 48px; border-radius: 16px; }
.save-offer { width: min(520px, 100%); margin: 24px auto 8px; padding: 24px; display: grid; gap: 16px; }
.save-offer-head { display: flex; gap: 14px; align-items: center; }
.save-offer-head img { flex: none; width: 64px; height: 64px; }
.save-offer-head h2 { font-size: 22px; letter-spacing: -0.015em; }
.save-offer-head p { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.save-offer-head .auth-ico { flex: none; color: var(--mint-ink); background: var(--mint-soft); }
.save-offer .center { margin: 0; }
.save-remind .sr-ico { background: var(--canvas-2); color: var(--ink-2); }
.save-remind .st-sub { font-size: 14px; }
@media (max-width: 760px) { .save-offer { padding: 18px; } }
.toast { position: fixed; z-index: 90; left: 50%; top: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 12px 32px -12px rgba(31,42,85,.5); animation: toast-in .25s ease-out; transition: opacity .25s, transform .25s; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast > svg { color: var(--mint); }
.toast.is-bad { background: var(--pip-edge); }
.toast-x { flex: none; border: 0; background: transparent; color: inherit; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; opacity: .8; }
.toast-x:hover { opacity: 1; background: rgba(255,255,255,.12); }
.toast.is-out { opacity: 0; transform: translate(-50%, -8px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.calm .toast { animation: none; transition: none; }
@media (max-width: 760px) { .toast { top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); } }
.auth-slot:has([data-acc="sent"]) + .auth-fine { display: none; }
