/* AhaTrek design system. Tokens first; every component below uses them. */

@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(assets/fonts/rubik-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(assets/fonts/rubik-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(assets/fonts/fredoka-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(assets/fonts/fredoka-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Brand inks, sampled from the approved logos */
  --brand-blue: #0a8aff;
  --brand-purple: #722ade;
  --brand-pink: #fd57ea;

  /* Surfaces and text */
  --bg: #fffdf9;
  --surface: #ffffff;
  --tint: #f6f2ff;
  --tint-blue: #eef6ff;
  --line: #e9e3f4;
  --line-strong: #d4cae9;
  --ink: #1a1538;
  --ink-2: #433e5e;
  --ink-3: #5c5779;

  /* Colour with a job: action, progress, discovery */
  --action: #0b63d1;
  --action-strong: #5a1fb8;
  --done: #5a1fb8;
  --aha: #c4129f;
  --ok: #17703f;
  --ok-tint: #e8f7ee;
  --ok-line: #8fd3ab;
  --bad: #b42318;
  --bad-tint: #fff1ef;
  --bad-line: #f3b4ab;
  --grad-action: linear-gradient(115deg, #0b6fe6 0%, #4a49e2 48%, #722ade 100%);
  --grad-brand: linear-gradient(115deg, var(--brand-blue), var(--brand-purple));
  --grad-wash: linear-gradient(150deg, #eef6ff 0%, #f6f0ff 60%, #fff4fd 100%);

  /* Type */
  --font-display: 'Fredoka', 'Rubik', system-ui, sans-serif;
  --font-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --fs-xs: 0.9375rem;
  --fs-sm: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.3125rem;
  --fs-xl: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --fs-2xl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --fs-3xl: clamp(2rem, 1.35rem + 2.8vw, 3.25rem);

  /* Space, shape, depth */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 34px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(26, 21, 56, 0.05), 0 6px 18px -8px rgba(26, 21, 56, 0.12);
  --shadow-2: 0 2px 6px rgba(26, 21, 56, 0.05), 0 22px 48px -18px rgba(70, 40, 170, 0.28);
  --shadow-action: 0 10px 24px -10px rgba(76, 52, 224, 0.65);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-mid: 280ms;
  --t-slow: 520ms;

  --page: 1120px;
  --column: 880px;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-md)/1.65 var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 30rem at 12% -6%, rgba(10, 138, 255, 0.09), transparent 70%),
    radial-gradient(38rem 30rem at 96% 8%, rgba(114, 42, 222, 0.08), transparent 70%),
    radial-gradient(40rem 28rem at 70% 108%, rgba(253, 87, 234, 0.06), transparent 70%);
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; color: var(--ink); text-wrap: balance; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: var(--action); text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus-visible { outline: none; }
::selection { background: #e4d6ff; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: var(--s-4); top: -60px; z-index: 50; padding: 10px 18px; background: var(--ink); color: #fff; border-radius: var(--r-pill); font-weight: 500; text-decoration: none; }
.skip-link:focus { top: var(--s-3); }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon.back { transform: scaleX(-1); }

.boot { min-height: 100vh; display: grid; place-content: center; gap: var(--s-4); justify-items: center; color: var(--ink-3); }
.boot img { width: 72px; animation: breathe 1.6s var(--ease) infinite alternate; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: var(--r-pill);
  font: 600 1.0625rem/1.2 var(--font-display); letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-mid) var(--ease), background-color var(--t-fast), filter var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad-action); color: #fff; box-shadow: var(--shadow-action); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(76, 52, 224, 0.75); filter: saturate(1.08) brightness(1.04); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary .icon { transition: transform var(--t-mid) var(--ease); }
.btn-primary:hover .icon.flip { transform: translateX(3px); }
.btn-xl { min-height: 62px; padding: 0 34px; font-size: 1.25rem; }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1.5px var(--action), var(--shadow-1); color: var(--action); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f1ecff; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: var(--fs-sm); }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 4px;
  background: none; border: 0;
  color: var(--action); font-weight: 500; font-size: var(--fs-sm);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.3em; text-decoration-color: rgba(11, 99, 209, 0.35);
}
.text-link:hover { text-decoration-color: currentColor; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; padding: 0;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--tint); color: var(--ink); }
.icon-btn.is-on { color: var(--action-strong); background: var(--tint); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 76px; padding: 10px var(--gutter);
  background: rgba(255, 253, 249, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(233, 227, 244, 0.8);
}
.topbar:has(+ .view-home), .topbar:has(+ .view-about), .topbar:has(+ .view-finish) { border-bottom-color: transparent; background: transparent; position: relative; -webkit-backdrop-filter: none; backdrop-filter: none; }
.brand { display: block; flex: none; padding: 6px 4px; border-radius: var(--r-sm); }
.brand img { width: 188px; }
.brand-space { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.top-link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--ink-2); font-weight: 500; font-size: var(--fs-sm); text-decoration: none;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.top-link:hover { background: var(--tint); color: var(--ink); }
.top-menu { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); }
.top-menu:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface); }
.focus-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: var(--fs-xs); margin-inline-end: var(--s-2); }

/* ---------- page frame ---------- */
.view { display: block; padding: var(--s-6) var(--gutter) var(--s-8); max-width: var(--page); margin: 0 auto; }
.view.is-entering { animation: enter var(--t-slow) var(--ease) both; }
.view:focus { outline: none; }
.page-head { max-width: var(--column); margin: 0 auto var(--s-6); }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head > p { margin-top: var(--s-3); color: var(--ink-2); font-size: var(--fs-md); max-width: var(--measure); }
.muted { color: var(--ink-3); }

.site-footer { padding: var(--s-6) var(--gutter) var(--s-7); text-align: center; color: var(--ink-3); font-size: var(--fs-xs); }
.site-footer p { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.preview-badge { display: inline-block; padding: 2px 10px; border-radius: var(--r-pill); background: var(--tint); color: var(--action-strong); font-weight: 500; }
.storage-warning { margin-bottom: var(--s-3); color: #8a1c1c; font-weight: 500; }

/* ---------- home ---------- */
.view-home { padding-top: 0; }
.home-hero { max-width: 860px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-logo img { width: min(540px, 82vw); margin: 0 auto var(--s-6); }
.home-title { font-size: var(--fs-3xl); line-height: 1.18; max-width: 22ch; }
.home-title .hl { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.home-sub { margin-top: var(--s-4); font-size: var(--fs-lg); line-height: 1.55; color: var(--ink-2); max-width: 40ch; }
.home-cta { margin-top: var(--s-6); display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.home-hello { font-size: var(--fs-xl); color: var(--ink-2); font-weight: 500; }
.resume { margin-top: var(--s-4); display: flex; flex-direction: column; align-items: center; }
.resume-kicker { font-weight: 500; color: var(--action-strong); letter-spacing: 0.01em; }
.resume-title { margin-top: var(--s-1); font-size: var(--fs-2xl); }
.resume-lead { margin-top: var(--s-3); color: var(--ink-2); max-width: 46ch; font-size: var(--fs-md); }
.resume-pos { margin-top: var(--s-3); display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--tint-blue); color: var(--action); font-size: var(--fs-xs); font-weight: 500; }
.resume-pos .icon { width: 1em; height: 1em; }

.home-trail { max-width: 1100px; margin: var(--s-7) auto 0; text-align: center; }
.trail-wrap { position: relative; }
.trail { width: 100%; height: auto; overflow: visible; }
.trail-compact { display: none; max-width: 520px; margin: 0 auto; }
.trail-seg { fill: none; stroke: var(--line-strong); stroke-width: 5; stroke-linecap: round; }
.trail-seg.is-lit { stroke-width: 6; }
.trail-node circle { fill: #fff; stroke: var(--line-strong); stroke-width: 3; }
.trail-node.is-done circle { stroke: none; }
.trail-node.is-current circle:not(.trail-halo) { stroke: var(--brand-purple); stroke-width: 4.5; }
.trail-halo { fill: rgba(253, 87, 234, 0.16) !important; stroke: none !important; transform-box: fill-box; transform-origin: center; animation: halo 2.4s var(--ease) infinite; }
.trail-check { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.trail-spark path { fill: none; stroke: #e7dcf7; stroke-width: 4.5; stroke-linecap: round; }
.trail-spark.is-lit path { stroke: var(--brand-pink); }
.trail-tag {
  position: absolute; transform: translate(-50%, calc(-100% - 26px));
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow-1);
}
.trail-tag::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: var(--ink); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.trail-caption { margin-top: var(--s-3); color: var(--ink-2); font-weight: 500; }
.home-facts { margin-top: var(--s-6); text-align: center; color: var(--ink-3); font-size: var(--fs-xs); }

/* ---------- lesson ---------- */
.view-lesson { padding-top: var(--s-5); }
.lesson { max-width: var(--column); margin: 0 auto; }
.lesson-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--action-strong); font-weight: 500; font-size: var(--fs-sm); }
.kicker-part { color: var(--ink-3); font-weight: 400; display: inline-flex; align-items: center; gap: 14px; }
.kicker-part::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.done-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 10px; border-radius: var(--r-pill); background: #efe7ff; color: var(--done); font-size: var(--fs-xs); }
.done-badge .icon { width: 1em; height: 1em; }
.lesson-title { margin-top: var(--s-2); font-size: var(--fs-3xl); line-height: 1.12; }
.lesson-lead { margin-top: var(--s-3); font-size: var(--fs-lg); line-height: 1.55; color: var(--ink-2); max-width: var(--measure); }

.stage { margin-top: var(--s-6); position: relative; }
.stage::before {
  content: ''; position: absolute; inset: 8% 6% -6%; z-index: -1;
  background: radial-gradient(closest-side, rgba(10, 138, 255, 0.28), transparent), radial-gradient(closest-side at 80% 60%, rgba(114, 42, 222, 0.26), transparent);
  filter: blur(36px);
}

.video-wait {
  aspect-ratio: 5 / 2; border-radius: var(--r-lg);
  display: grid; place-items: center; padding: var(--s-6);
  background: var(--grad-wash); box-shadow: inset 0 0 0 1px var(--line);
  text-align: center; overflow: hidden; position: relative;
}
.video-wait-inner { max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.video-wait-mark { width: 84px; opacity: 0.95; margin-bottom: var(--s-2); animation: breathe 3.2s var(--ease) infinite alternate; }
.video-wait-title { font: 600 var(--fs-xl)/1.25 var(--font-display); color: var(--ink); }
.video-wait p:last-child { color: var(--ink-2); }

.lesson-tools { margin-top: var(--s-4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.lesson-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.meta { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.meta .icon { width: 1.1em; height: 1.1em; }
.meta-video { color: var(--ink-2); font-weight: 500; }
.meta-soon { color: var(--ink-3); }
.tag { display: inline-flex; padding: 2px 10px; border-radius: var(--r-pill); font-size: 0.875rem; font-weight: 500; }
.tag-draft { background: #fff3e0; color: #8a4b00; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500;
  transition: box-shadow var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}
.tool-btn:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); }
.tool-btn[aria-expanded="true"], .tool-btn[aria-pressed="true"] { background: var(--tint); color: var(--action-strong); box-shadow: inset 0 0 0 1.5px #cdb8f5; }
.tool-dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-pink); }

.drawer { margin-top: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); animation: drop var(--t-mid) var(--ease) both; }
.drawer-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: var(--s-3); }
.drawer-head h2 { font-size: var(--fs-lg); }
.note-status { color: var(--ink-3); font-size: var(--fs-xs); }
.notes-field { width: 100%; min-height: 160px; resize: vertical; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: #fffefb; line-height: 1.6; }
.notes-field:focus-visible { outline: 3px solid var(--action); outline-offset: 1px; border-color: transparent; }
.transcript { max-height: 420px; overflow: auto; padding-inline-end: var(--s-2); color: var(--ink-2); }
.transcript h3 { font-size: var(--fs-md); margin: var(--s-4) 0 var(--s-1); color: var(--ink); }
.transcript h3:first-child { margin-top: 0; }
.transcript p + p { margin-top: var(--s-2); }

.takeaways { margin-top: var(--s-7); }
.takeaways h2, .practice h2 { font-size: var(--fs-xl); }
.goal { margin-top: var(--s-2); color: var(--ink-2); max-width: var(--measure); }
.goal-label { font-weight: 600; color: var(--action-strong); }
.takeaway-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.takeaway-list li { display: flex; flex-direction: column; gap: var(--s-2); padding-top: var(--s-4); border-top: 2px solid var(--line); }
.takeaway-num { font: 600 2.25rem/1 var(--font-display); background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.takeaway-list p { font-size: var(--fs-md); line-height: 1.55; color: var(--ink); }

.practice { margin-top: var(--s-7); padding: var(--s-6); border-radius: var(--r-xl); background: var(--grad-wash); box-shadow: inset 0 0 0 1px rgba(205, 184, 245, 0.55); }
.practice-head { display: flex; align-items: center; gap: var(--s-3); }
.practice-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 16px; background: var(--surface); color: var(--action-strong); box-shadow: var(--shadow-1); }
.practice-icon .icon { width: 26px; height: 26px; }
.practice-optional { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; }
.practice-task { margin-top: var(--s-4); font-size: var(--fs-md); max-width: var(--measure); }
.prompt-box { margin-top: var(--s-4); padding: var(--s-5); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.prompt-label { font-size: var(--fs-xs); font-weight: 600; color: var(--action-strong); margin-bottom: var(--s-2); }
.prompt-text { font-size: 1.0625rem; line-height: 1.7; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.slot { background: #efe6ff; color: var(--action-strong); padding: 1px 5px; border-radius: 6px; font-weight: 500; }
.prompt-foot { margin-top: var(--s-4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.prompt-hint { color: var(--ink-3); font-size: var(--fs-xs); flex: 1 1 260px; }
.copy-btn.is-copied { color: var(--done); box-shadow: inset 0 0 0 1.5px #cdb8f5; background: var(--tint); }
.example-image { margin: var(--s-5) 0 0; }
.example-image img { width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.example-image figcaption { margin-top: var(--s-2); color: var(--ink-3); font-size: var(--fs-xs); }

.deeper { margin-top: var(--s-6); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.deeper summary { list-style: none; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px var(--s-4); padding: var(--s-5); cursor: pointer; border-radius: var(--r-lg); }
.deeper summary::-webkit-details-marker { display: none; }
.deeper summary:hover { background: #fcfaff; }
.deeper-title { font: 600 var(--fs-lg)/1.3 var(--font-display); }
.deeper-sub { grid-column: 1; color: var(--ink-3); font-size: var(--fs-xs); }
.deeper-chevron { grid-column: 2; grid-row: 1 / span 2; width: 26px; height: 26px; color: var(--ink-3); transition: transform var(--t-mid) var(--ease); }
[dir] .deeper summary .icon.deeper-chevron { transform: rotate(90deg); }
[dir] .deeper[open] summary .icon.deeper-chevron { transform: rotate(-90deg); }
.deeper-body { padding: 0 var(--s-5) var(--s-6); display: grid; gap: var(--s-5); animation: drop var(--t-mid) var(--ease) both; }
.deeper-section h3 { font-size: var(--fs-md); margin-bottom: var(--s-1); }
.deeper-section p { color: var(--ink-2); max-width: var(--measure); }
.flow ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.flow li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: var(--r-pill); background: var(--tint); font-weight: 500; color: var(--ink); }
.flow li + li::before { content: ''; width: 18px; height: 2px; background: var(--line-strong); margin-inline-start: -18px; margin-inline-end: 0; position: relative; inset-inline-start: -8px; }
.flow-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad-brand); color: #fff; font: 600 0.9375rem/1 var(--font-display); }
.example h3 { font-size: var(--fs-md); margin-bottom: var(--s-3); }
.chat { display: grid; gap: var(--s-2); max-width: 600px; }
.bubble { padding: 12px 16px; border-radius: 20px; max-width: 88%; }
.bubble-who { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.bubble-you { justify-self: end; background: var(--grad-action); color: #fff; border-end-end-radius: 6px; }
.bubble-you .bubble-who { color: rgba(255, 255, 255, 0.85); }
.bubble-ai { justify-self: start; background: var(--tint); border-end-start-radius: 6px; }
.bubble-ai .bubble-who { color: var(--action-strong); }
.example-plain { margin: 0; padding-inline-start: 1.2em; display: grid; gap: var(--s-1); color: var(--ink); }
.example-note { margin-top: var(--s-3); color: var(--ink-2); }
.source { color: var(--ink-3); font-size: var(--fs-xs); }
.source a { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.source .icon { width: 1em; height: 1em; }

.next-step {
  margin-top: var(--s-7); padding: var(--s-5) var(--s-5) var(--s-5) var(--s-6);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4);
  border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line);
}
.next-kicker { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; }
.next-title { font: 600 var(--fs-lg)/1.3 var(--font-display); margin-top: 2px; }
.next-secondary { margin-top: var(--s-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding: 0 var(--s-2); }

/* ---------- player ---------- */
.player {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r-lg); background: #0c0a22; color: #fff;
  box-shadow: 0 30px 70px -34px rgba(40, 20, 120, 0.7), 0 0 0 1px rgba(114, 42, 222, 0.25);
  isolation: isolate;
}
.player:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.player:-webkit-full-screen { border-radius: 0; width: 100%; height: 100%; }
.player-video { width: 100%; height: 100%; object-fit: contain; background: #000; cursor: pointer; }
.player.is-idle, .player.is-idle .player-video { cursor: none; }
.player-video::cue { font-family: var(--font-body); font-size: clamp(15px, 2.3vw, 24px); line-height: 1.4; color: #fff; background: rgba(12, 10, 34, 0.8); }
.player-start { position: absolute; inset: 0 0 64px; display: grid; place-items: center; border: 0; background: transparent; padding: 0; opacity: 0; pointer-events: none; transition: opacity var(--t-mid) var(--ease); }
.player[data-state="ready"] .player-start { opacity: 1; pointer-events: auto; }
.player-start-disc { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--grad-action); color: #fff; box-shadow: 0 16px 40px -10px rgba(10, 6, 40, 0.75), 0 0 0 10px rgba(255, 255, 255, 0.14); transition: transform var(--t-mid) var(--ease-spring); }
.player-start-disc .icon { width: 38px; height: 38px; margin-inline-start: 5px; }
.player-start:hover .player-start-disc { transform: scale(1.06); }
.player-start:focus-visible { outline: none; }
.player-start:focus-visible .player-start-disc { outline: 3px solid #fff; outline-offset: 4px; }
.player-spinner { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.22); border-top-color: #fff; opacity: 0; pointer-events: none; animation: spin 0.9s linear infinite; }
.player[data-state="loading"] .player-spinner { opacity: 1; }
.player-bar {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; align-items: center; gap: 4px;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(8, 6, 26, 0.86), rgba(8, 6, 26, 0));
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.player.is-idle .player-bar { opacity: 0; transform: translateY(6px); }
.player-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #fff; padding: 0; }
.player-btn:hover { background: rgba(255, 255, 255, 0.16); }
.player-btn:focus-visible, .player-rate select:focus-visible, .player-seek:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.player-btn .icon { width: 24px; height: 24px; }
.player-btn[aria-pressed="false"] { color: rgba(255, 255, 255, 0.6); }
.player-time { font-size: 0.9375rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.92); padding: 0 6px; white-space: nowrap; }
.player-time-sep { margin: 0 4px; opacity: 0.6; }
.player-seek { flex: 1; min-width: 60px; margin: 0 8px; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; --pct: 0%; }
.player-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--brand-blue), var(--brand-pink) var(--pct), rgba(255, 255, 255, 0.28) var(--pct)); }
.player-seek::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.28); }
.player-seek::-moz-range-progress { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--brand-blue), var(--brand-pink)); }
.player-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.player-seek::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; }
.player-rate select { height: 36px; padding: 0 10px; border-radius: var(--r-pill); border: 1.5px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; font-size: 0.9375rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.player-rate option { color: var(--ink); }
.player-chip { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: var(--r-pill); background: rgba(12, 10, 34, 0.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 0.9375rem; animation: drop var(--t-mid) var(--ease) both; }
.player-chip button { min-height: 34px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 500; }
.player-chip button:hover { background: rgba(255, 255, 255, 0.26); }
.player-panel { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3); padding: var(--s-5); text-align: center; background: rgba(12, 10, 34, 0.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.player-panel p { max-width: 420px; color: rgba(255, 255, 255, 0.88); }
.player-panel-title { font: 600 var(--fs-xl)/1.25 var(--font-display); color: #fff !important; }
.player-panel-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-2); }

/* ---------- lessons list ---------- */
.progress { margin-top: var(--s-5); max-width: 520px; }
.progress-track { height: 10px; border-radius: 10px; background: var(--tint); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.progress-track span { display: block; height: 100%; min-width: 0; border-radius: 10px; background: var(--grad-brand); transition: width var(--t-slow) var(--ease); }
.progress-text { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--ink-2); font-weight: 500; }
.trail-list { max-width: var(--column); margin: 0 auto; display: grid; gap: var(--s-6); }
.part-title { font-size: var(--fs-sm); font-family: var(--font-body); font-weight: 600; letter-spacing: 0.04em; color: var(--action-strong); margin-bottom: var(--s-2); padding-inline-start: 4px; }
.stops { list-style: none; margin: 0; padding: 0; position: relative; }
.stops-plain { max-width: var(--column); margin: 0 auto; }
.stop { position: relative; }
.stop:not(:last-child)::before { content: ''; position: absolute; top: 46px; bottom: -14px; inset-inline-start: 39px; width: 3px; border-radius: 3px; background: var(--line); z-index: 0; }
.stop.is-done:not(:last-child)::before { background: linear-gradient(var(--brand-blue), var(--brand-purple)); }
.stop-link {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 50px 1fr auto; align-items: start; gap: var(--s-4);
  padding: 14px 16px 14px 14px; border-radius: var(--r-md);
  color: inherit; text-decoration: none;
  transition: background-color var(--t-fast), box-shadow var(--t-mid) var(--ease);
}
.stop-link:hover { background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.stop-node { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--line-strong); font: 600 1.25rem/1 var(--font-display); color: var(--ink-3); }
.stop.is-done .stop-node { background: var(--grad-brand); box-shadow: none; color: #fff; }
.stop.is-done .stop-node .icon { width: 24px; height: 24px; stroke-width: 2.6; }
.stop.is-current .stop-node, .stop.is-start .stop-node { color: var(--brand-purple); box-shadow: inset 0 0 0 3.5px var(--brand-purple), 0 0 0 7px rgba(253, 87, 234, 0.16); background: #fff; }
.stop-body { display: grid; gap: 3px; min-width: 0; padding-top: 2px; }
.stop-title { font: 600 var(--fs-lg)/1.3 var(--font-display); color: var(--ink); }
.stop-lead { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stop-meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.meta-status { font-weight: 500; color: var(--ink-2); }
.stop.is-done .meta-status { color: var(--done); }
.stop.is-current .meta-status, .stop.is-start .meta-status { color: var(--aha); }
.meta-saved { color: var(--action-strong); }
.stop-go { align-self: center; color: var(--ink-3); opacity: 0.6; transition: transform var(--t-mid) var(--ease), opacity var(--t-fast); }
.stop-link:hover .stop-go { opacity: 1; transform: translateX(3px); }

/* ---------- library, notebook, empty ---------- */
.library, .notebook { list-style: none; margin: 0 auto; padding: 0; max-width: var(--column); display: grid; gap: var(--s-5); }
.library-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.library-from { font: 600 var(--fs-md)/1.35 var(--font-display); color: var(--ink); }
.library-item .prompt-box { margin-top: var(--s-2); }
.note-card { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.note-text { margin: var(--s-2) 0 var(--s-2); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.empty { max-width: 460px; margin: var(--s-7) auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-4); color: var(--ink-2); }
.empty img { width: 88px; opacity: 0.9; }

/* ---------- settings ---------- */
.settings-group { max-width: 720px; margin: 0 auto var(--s-5); padding: var(--s-5) var(--s-6); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.settings-group h2 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.settings-group > p { color: var(--ink-2); max-width: var(--measure); }
.button-row { margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-text { display: grid; gap: 2px; }
.switch-label { font-weight: 500; color: var(--ink); }
.switch-desc { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }
.switch { position: relative; flex: none; width: 56px; height: 34px; padding: 0; border: 0; border-radius: var(--r-pill); background: #a9a6b6; transition: background-color var(--t-mid) var(--ease); }
.switch::after { content: ''; position: absolute; inset: -6px; }
.switch-thumb { position: absolute; top: 4px; inset-inline-start: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(26, 21, 56, 0.25); transition: transform var(--t-mid) var(--ease-spring); }
.switch[aria-checked="true"] { background: var(--grad-action); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(22px); }
.volume-row { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.volume-row label { font-weight: 500; min-width: 4.5em; }
.range { flex: 1; accent-color: var(--brand-purple); height: 28px; }
.range:disabled { opacity: 0.45; }
.sound-controls .btn { margin-top: var(--s-2); }
.about { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-strong); }

/* ---------- finish ---------- */
.finish { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.finish-mark { position: relative; width: 240px; margin-bottom: var(--s-5); }
.finish-mark img { position: relative; z-index: 1; width: 100%; }
.finish-sparks { position: absolute; inset: 0; pointer-events: none; }
.finish-sparks i { position: absolute; top: 38%; left: 50%; width: 8px; height: 22px; margin: -11px 0 0 -4px; border-radius: 6px; background: var(--brand-pink); opacity: 0; transform: rotate(var(--a)) translateY(0); }
.finish-sparks i:nth-child(3n + 1) { background: var(--brand-blue); }
.finish-sparks i:nth-child(3n + 2) { background: var(--brand-purple); }
.is-celebrating .finish-sparks i { animation: spark 1.3s var(--ease) var(--d) both; }
.finish h1 { font-size: var(--fs-3xl); }
.finish-lead { margin-top: var(--s-3); font-size: var(--fs-lg); color: var(--ink-2); max-width: 40ch; }
.finish-remaining { margin-top: var(--s-6); width: 100%; text-align: start; }
.finish-remaining h2 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.can-do { max-width: 720px; margin: var(--s-7) auto 0; }
.can-do h2 { font-size: var(--fs-xl); }
.check-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.check-list li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-md); }
.check-list .icon { margin-top: 3px; width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--grad-brand); color: #fff; stroke-width: 3; }
.mission { max-width: 720px; margin: var(--s-7) auto 0; }
.share { max-width: 720px; margin: var(--s-7) auto 0; padding: var(--s-6); border-radius: var(--r-xl); text-align: center; background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.share h2 { font-size: var(--fs-xl); }
.share p { margin: var(--s-2) auto var(--s-5); color: var(--ink-2); max-width: 46ch; }
.finish-actions { max-width: 720px; margin: var(--s-6) auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }

/* ---------- dialogs ---------- */
.dlg { padding: 0; border: 0; color: var(--ink); background: var(--surface); box-shadow: 0 30px 80px -20px rgba(26, 21, 56, 0.45); max-width: 100vw; max-height: 100dvh; overflow: auto; overscroll-behavior: contain; }
.dlg::backdrop { background: rgba(26, 21, 56, 0.36); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg-inner { padding: var(--s-5) var(--s-5) var(--s-6); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.dlg-head h2 { font-size: var(--fs-xl); }
.dlg-sheet { margin: 0; margin-inline-start: auto; height: 100dvh; width: min(420px, 100vw); border-start-start-radius: var(--r-xl); border-end-start-radius: var(--r-xl); animation: sheet-in var(--t-mid) var(--ease) both; }
.dlg-panel, .dlg-search, .dlg-confirm { width: min(560px, calc(100vw - 32px)); border-radius: var(--r-xl); margin: auto; animation: pop-in var(--t-mid) var(--ease) both; }
.dlg-search { margin-top: 10vh; }
.dlg-panel .muted { margin-bottom: var(--s-2); }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: var(--s-4); width: 100%; min-height: 64px; padding: 10px 14px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); text-align: start; text-decoration: none; transition: background-color var(--t-fast); }
.menu-item:hover { background: var(--tint); }
.menu-item > .icon { width: 24px; height: 24px; color: var(--action-strong); }
.menu-text { display: grid; }
.menu-label { font-weight: 500; font-size: var(--fs-md); }
.menu-desc { font-size: var(--fs-xs); color: var(--ink-3); }
.menu-extra { margin-top: var(--s-4); padding: 0 14px; border-top: 1px solid var(--line); }
.menu-home { display: inline-flex; margin: var(--s-4) 14px 0; min-height: 44px; align-items: center; color: var(--ink-3); font-size: var(--fs-xs); }
.search-field { position: relative; display: flex; align-items: center; }
.search-field > .icon { position: absolute; inset-inline-start: 16px; color: var(--ink-3); pointer-events: none; }
.search-field input { width: 100%; min-height: 56px; padding: 0 18px; padding-inline-start: 50px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: #fffefb; font-size: var(--fs-md); }
.search-field input:focus-visible { outline: 3px solid var(--action); outline-offset: 1px; border-color: transparent; }
.search-status { margin: var(--s-3) 4px; color: var(--ink-3); font-size: var(--fs-xs); }
.search-group h3 { font-size: var(--fs-xs); font-family: var(--font-body); font-weight: 600; letter-spacing: 0.04em; color: var(--action-strong); margin: var(--s-4) 4px var(--s-1); }
.search-group ul { list-style: none; margin: 0; padding: 0; }
.search-hit { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); color: inherit; text-decoration: none; }
.search-hit:hover { background: var(--tint); }
.search-hit-title { font-weight: 500; }
.search-hit-text { font-size: var(--fs-xs); color: var(--ink-2); }
.search-hit mark { background: #ffe1f8; color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- feedback ---------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px)); padding: 12px 20px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: 500; font-size: var(--fs-sm); text-align: center; box-shadow: 0 16px 40px -14px rgba(26, 21, 56, 0.6); }
.toast.is-in { animation: toast-in var(--t-mid) var(--ease) both; }
.burst { position: fixed; z-index: 70; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; width: 6px; height: 16px; margin: -8px 0 0 -3px; border-radius: 4px; background: var(--brand-pink); transform: rotate(var(--a)) translateY(-30px); animation: burst 0.8s var(--ease) both; }
.burst i:nth-child(odd) { background: var(--brand-blue); }
.burst i:nth-child(3n) { background: var(--brand-purple); }
.load-error { text-align: center; display: grid; justify-items: center; gap: var(--s-4); padding-top: 20vh; }

/* ---------- focus mode ---------- */
.in-focus body::before { opacity: 0.4; }
.in-focus .site-footer, .in-focus .deeper, .in-focus .next-secondary { display: none; }
.topbar.is-focus { background: rgba(255, 253, 249, 0.94); }

/* ---------- motion ---------- */
@keyframes enter { from { opacity: 0.2; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes sheet-in { from { opacity: 0.4; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes halo { 0%, 100% { transform: scale(0.85); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes breathe { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spark { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-40px) scaleY(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) scaleY(1); } }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-20px) scaleY(0.5); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-70px) scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .finish-sparks { display: none; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
.reduce-motion .finish-sparks { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hide-md { display: none; }
}
@media (max-width: 820px) {
  .takeaway-list { grid-template-columns: 1fr; gap: 0; }
  .takeaway-list li { flex-direction: row; align-items: flex-start; gap: var(--s-4); padding: var(--s-4) 0; }
  .takeaway-num { font-size: 1.875rem; min-width: 1.1em; }
}
@media (max-width: 640px) {
  :root { --fs-md: 1.0625rem; --fs-lg: 1.1875rem; }
  .topbar { min-height: 64px; padding: 8px 12px; gap: 6px; }
  .brand img { width: 150px; }
  .hide-sm { display: none; }
  .top-link { padding: 0 12px; }
  .view { padding-top: var(--s-4); }
  .hero-logo img { width: 232px; margin-bottom: var(--s-5); }
  .home-sub { font-size: var(--fs-md); }
  .home-cta .btn { width: 100%; max-width: 360px; }
  .trail-wide { display: none; }
  .trail-compact { display: block; }
  .home-trail { margin-top: var(--s-6); }
  .lesson-title { font-size: 2rem; }
  .stage { margin-left: calc(var(--gutter) * -1 + 8px); margin-right: calc(var(--gutter) * -1 + 8px); }
  .player { border-radius: 18px; }
  .player-time .player-time-sep, .player-time [data-p-duration] { display: none; }
  .player-start-disc { width: 76px; height: 76px; }
  .player-rate select { padding: 0 6px; }
  .video-wait { aspect-ratio: auto; min-height: 220px; border-radius: 20px; }
  .lesson-tools { flex-direction: column; align-items: stretch; }
  .tool-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .tool-btn { justify-content: center; gap: 6px; padding: 0 8px; font-size: var(--fs-xs); white-space: nowrap; }
  .practice { padding: var(--s-5) var(--s-4); border-radius: var(--r-lg); margin-left: -8px; margin-right: -8px; }
  .prompt-box { padding: var(--s-4); }
  .prompt-foot .btn { width: 100%; }
  .next-step { padding: var(--s-5); border-radius: var(--r-lg); }
  .next-btn { width: 100%; }
  .btn-xl { font-size: 1.125rem; padding: 0 24px; }
  .stop-link { grid-template-columns: 42px 1fr; gap: var(--s-3); padding: 12px 8px; }
  .stop-node { width: 42px; height: 42px; font-size: 1.0625rem; }
  .stop:not(:last-child)::before { top: 40px; inset-inline-start: 28px; }
  .stop-go { display: none; }
  .stop-lead { -webkit-line-clamp: 1; }
  .settings-group { padding: var(--s-4); }
  .dlg-sheet { margin: auto 0 0; width: 100vw; height: auto; max-height: 88dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; animation-name: pop-in; }
  .dlg-search { margin-top: 4vh; }
  .menu-item { min-height: 58px; }
}
@media (max-width: 380px) {
  .brand img { width: 128px; }
  .top-menu span { display: none; }
  .top-menu { padding: 0 12px; }
}

/* Keep captions clear of the control bar while it is showing (Chromium and Safari render cues here). */
.player-video::-webkit-media-text-track-container { transition: transform var(--t-mid) var(--ease); transform: translateY(-58px); }
.player.is-idle .player-video::-webkit-media-text-track-container, .player[data-state="ended"] .player-video::-webkit-media-text-track-container { transform: translateY(-14px); }

/* Narrow phones: every player control must stay on screen. */
@media (max-width: 420px) {
  .player-bar { gap: 2px; padding: 22px 6px 6px; }
  .player-btn { width: 40px; height: 40px; }
  .player-btn .icon { width: 22px; height: 22px; }
  .player-time { padding: 0 2px; font-size: 0.875rem; }
  .player-seek { min-width: 36px; margin: 0 4px; }
  .player-rate select { height: 32px; padding: 0 2px 0 6px; font-size: 0.875rem; }
}
.transcript:focus-visible { outline: 3px solid var(--action); outline-offset: 4px; }

/* ---------- course page (sales) ---------- */
.view-about { padding-top: 0; }
.sell-hero { max-width: 860px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-logo.is-compact img { width: min(400px, 70vw); margin-bottom: var(--s-5); }
.sell-kicker { margin-bottom: var(--s-3); padding: 6px 16px; border-radius: var(--r-pill); background: var(--tint); color: var(--action-strong); font-weight: 500; font-size: var(--fs-sm); }
.cta-note { color: var(--ink-3); font-size: var(--fs-xs); }
.sell-facts { margin-top: var(--s-4); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; }
.sell-preview { position: relative; display: block; max-width: var(--column); margin: var(--s-7) auto 0; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0c0a22; box-shadow: 0 30px 70px -34px rgba(40, 20, 120, 0.7), 0 0 0 1px rgba(114, 42, 222, 0.25); color: #fff; text-decoration: none; isolation: isolate; }
.sell-preview > img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.sell-preview:hover > img { transform: scale(1.02); }
.sell-preview-blank { display: grid; place-items: center; height: 100%; background: var(--grad-wash); }
.sell-preview-blank img { width: 96px; }
.sell-preview-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--grad-action); box-shadow: 0 16px 40px -10px rgba(10, 6, 40, 0.75), 0 0 0 10px rgba(255, 255, 255, 0.16); transition: transform var(--t-mid) var(--ease-spring); }
.sell-preview-play .icon { width: 38px; height: 38px; margin-inline-start: 5px; }
.sell-preview:hover .sell-preview-play { transform: scale(1.06); }
.sell-preview-label { position: absolute; inset: auto 0 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 48px 22px 18px; background: linear-gradient(to top, rgba(8, 6, 26, 0.85), rgba(8, 6, 26, 0)); text-align: start; }
.sell-preview-title { font: 600 var(--fs-lg)/1.3 var(--font-display); }
.sell-preview-time { font-variant-numeric: tabular-nums; opacity: 0.85; font-size: var(--fs-sm); }
.tag-free { background: var(--ok-tint); color: var(--ok); }
.sell-preview .tag-free { background: #fff; }

.sell-section { max-width: var(--column); margin: var(--s-9) auto 0; }
.sell-h2 { font-size: var(--fs-2xl); text-align: center; }
.sell-lead { margin: var(--s-3) auto 0; max-width: 52ch; text-align: center; color: var(--ink-2); }
.sell-steps { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); counter-reset: step; }
.sell-steps li { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.sell-step-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--grad-brand); color: #fff; margin-bottom: var(--s-1); }
.sell-step-icon .icon { width: 24px; height: 24px; }
.sell-step-name { font: 600 var(--fs-lg)/1.2 var(--font-display); }
.sell-step-name::before { counter-increment: step; content: counter(step) ". "; color: var(--action-strong); }
.sell-step-text { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
.sell-outcomes .check-list { margin-top: var(--s-6); grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-6); }

.sell-real { padding: var(--s-7) var(--s-6); border-radius: var(--r-xl); background: var(--grad-wash); box-shadow: inset 0 0 0 1px rgba(205, 184, 245, 0.55); }
.real-pairs { margin-top: var(--s-6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: start; }
.real-pairs .chat { max-width: none; }
.real-pairs .bubble-ai { background: var(--surface); }
.bubble-wrong { box-shadow: inset 0 0 0 2px var(--bad-line); }
.real-verdict { display: flex; gap: 8px; align-items: flex-start; margin-top: var(--s-2); color: var(--bad); font-weight: 500; font-size: var(--fs-sm); }
.real-verdict .icon { margin-top: 2px; }
.real-close { margin-top: var(--s-6); text-align: center; font: 600 var(--fs-lg)/1.35 var(--font-display); }
.real-source { margin-top: var(--s-2); text-align: center; color: var(--ink-3); font-size: var(--fs-xs); }
.real-source .text-link { font-size: var(--fs-xs); }

.sell-part { margin-top: var(--s-5); }
.sell-lead + .sell-part { margin-top: var(--s-6); }
.sell-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sell-row-link { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: var(--s-4); padding: 12px 14px; border-radius: var(--r-md); color: inherit; text-decoration: none; transition: background-color var(--t-fast), box-shadow var(--t-mid) var(--ease); }
.sell-row-link:hover { background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.sell-row-num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); font: 600 1.0625rem/1 var(--font-display); color: var(--ink-3); }
.sell-row-body { display: grid; gap: 2px; min-width: 0; }
.sell-row-title { font: 600 var(--fs-md)/1.3 var(--font-display); }
.sell-row-lead { color: var(--ink-2); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sell-row-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 12px; }

.why-grid { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.why-grid li { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.why-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--action-strong); margin-bottom: var(--s-3); }
.why-grid h3 { font-size: var(--fs-md); }
.why-grid p { margin-top: var(--s-1); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }

.fit-grid { margin-top: var(--s-6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.fit { padding: var(--s-5) var(--s-6); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.fit h3 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.fit ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.fit li { display: flex; gap: var(--s-3); align-items: flex-start; }
.fit li .icon { flex: none; width: 24px; height: 24px; padding: 4px; margin-top: 2px; border-radius: 50%; stroke-width: 3; }
.fit-yes li .icon { background: var(--grad-brand); color: #fff; }
.fit-no li .icon { background: #efedf4; color: var(--ink-3); }
.fit-no li { color: var(--ink-2); }

.offer-card { max-width: 600px; margin: 0 auto; padding: var(--s-7) var(--s-6); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); text-align: center; position: relative; overflow: hidden; }
.offer-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--grad-brand); }
.offer-terms { margin-top: var(--s-2); color: var(--ink-2); font-weight: 500; }
.offer-card .check-list { margin: var(--s-5) auto 0; max-width: 400px; text-align: start; }
.offer-actions { margin-top: var(--s-6); display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.soon-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: var(--r-pill); background: var(--tint); color: var(--action-strong); font: 600 1.0625rem/1.2 var(--font-display); }
.offer-preview { color: var(--ink-3); font-size: var(--fs-xs); }
.guarantee { margin-top: var(--s-4); display: inline-flex; gap: 8px; align-items: flex-start; color: var(--ink-2); font-size: var(--fs-sm); text-align: start; }
.guarantee .icon { color: var(--ok); margin-top: 2px; }

.faq { margin-top: var(--s-5); border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; padding: var(--s-3) var(--s-2); cursor: pointer; font-weight: 500; font-size: var(--fs-md); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--action); }
[dir] .faq-item .faq-chevron { flex: none; width: 22px; height: 22px; color: var(--ink-3); transform: rotate(90deg); transition: transform var(--t-mid) var(--ease); }
[dir] .faq-item[open] .faq-chevron { transform: rotate(-90deg); }
.faq-item p { padding: 0 var(--s-2) var(--s-4); color: var(--ink-2); max-width: var(--measure); animation: drop var(--t-mid) var(--ease) both; }
.sell-contact { margin-top: var(--s-4); text-align: center; color: var(--ink-2); }

.sell-final { max-width: var(--column); margin: var(--s-9) auto 0; padding: var(--s-7) var(--s-6); border-radius: var(--r-xl); background: var(--grad-wash); box-shadow: inset 0 0 0 1px rgba(205, 184, 245, 0.55); text-align: center; display: flex; flex-direction: column; align-items: center; }
.sell-final h2 { font-size: var(--fs-2xl); }
.sell-final > p { margin-top: var(--s-2); color: var(--ink-2); }
.sell-final .home-cta { margin-top: var(--s-5); }

.buybar { display: none; }

/* ---------- lesson: quick question and practice ---------- */
.check { margin-top: var(--s-7); padding: var(--s-6); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.check-head { display: flex; align-items: center; gap: var(--s-3); }
.check-head h2 { font-size: var(--fs-xl); }
.check-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 16px; background: var(--tint-blue); color: var(--action); }
.check-icon .icon { width: 26px; height: 26px; }
.check-sub { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; }
.check-q { margin-top: var(--s-4); font: 600 var(--fs-lg)/1.4 var(--font-display); max-width: var(--measure); }
.check-options { margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.check-option { display: flex; align-items: flex-start; gap: var(--s-3); width: 100%; min-height: 56px; padding: 12px 16px; border: 0; border-radius: var(--r-md); background: #fffefb; box-shadow: inset 0 0 0 1.5px var(--line-strong); text-align: start; line-height: 1.5; transition: box-shadow var(--t-fast), background-color var(--t-fast), opacity var(--t-fast); }
.check-option:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--action); background: #fff; }
.check-option > span:last-child { padding-top: 3px; }
.check-mark { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--action-strong); font: 600 0.9375rem/1 var(--font-display); }
.check-option:disabled { cursor: default; }
.check-option.is-right { background: var(--ok-tint); box-shadow: inset 0 0 0 2px var(--ok-line); color: var(--ink); }
.check-option.is-right .check-mark { background: var(--ok); color: #fff; }
.check-option.is-wrong { background: var(--bad-tint); box-shadow: inset 0 0 0 1.5px var(--bad-line); color: var(--ink-2); }
.check-option.is-wrong .check-mark { background: var(--bad); color: #fff; }
.check.is-solved .check-option:not(.is-right):not(.is-wrong) { opacity: 0.55; }
.check-feedback { margin-top: var(--s-3); color: var(--ink-2); max-width: var(--measure); }
.check-feedback:empty { display: none; }
.check-feedback strong { color: var(--bad); }
.check.is-solved .check-feedback strong { color: var(--ok); }

.try-apps { margin-top: var(--s-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.try-label { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.app-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.app-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); font-weight: 500; font-size: var(--fs-sm); text-decoration: none; transition: box-shadow var(--t-fast), color var(--t-fast); }
.app-link:hover { box-shadow: inset 0 0 0 1.5px var(--action); color: var(--action); }
.app-link .icon { width: 0.95em; height: 0.95em; color: var(--ink-3); }
.try-check { margin-top: var(--s-5); }
.try-check > p { font-weight: 600; font-size: var(--fs-sm); }
.try-check ul { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; gap: var(--s-1); }
.try-check li { display: flex; gap: var(--s-2); align-items: flex-start; color: var(--ink-2); }
.try-check li .icon { margin-top: 4px; width: 1em; height: 1em; color: var(--action-strong); }
.tried-btn { margin-top: var(--s-5); }
.tried-btn.is-tried { background: var(--ok-tint); color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok-line); }
.meta-tried { color: var(--ok); }
.free-done { margin-top: var(--s-6); padding: var(--s-6); border-radius: var(--r-xl); background: var(--grad-wash); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.free-done h2 { font-size: var(--fs-xl); }
.free-done p { color: var(--ink-2); }

/* ---------- finish: certificate ---------- */
.cert { max-width: 720px; margin: var(--s-7) auto 0; padding: var(--s-6); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.cert > p { margin-top: var(--s-3); color: var(--ink-2); }
.cert .muted { display: flex; gap: 8px; align-items: center; }
.cert-form { margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cert-input { flex: 1 1 240px; min-height: 52px; padding: 0 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: #fffefb; font-size: var(--fs-md); }
.cert-input:focus-visible { outline: 3px solid var(--action); outline-offset: 1px; border-color: transparent; }
.cert-note { margin-top: var(--s-3); color: var(--ink-3); font-size: var(--fs-xs); }
.cheat-cta { max-width: 720px; margin: var(--s-5) auto 0; display: flex; justify-content: center; }

/* ---------- cheat sheet ---------- */
.cheat-head .btn { margin-top: var(--s-4); }
.cheat-grid { max-width: var(--column); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.cheat-box { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cheat-box h2 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.cheat-box ol { margin: 0; padding-inline-start: 1.3em; display: grid; gap: var(--s-2); color: var(--ink-2); }
.cheat-never { background: var(--bad-tint); box-shadow: inset 0 0 0 1px var(--bad-line); }
.cheat-prompts, .cheat-notes { max-width: var(--column); margin: var(--s-6) auto 0; }
.cheat-prompts h2, .cheat-notes h2 { font-size: var(--fs-xl); margin-bottom: var(--s-3); }
.cheat-prompts ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.cheat-prompts li, .cheat-note { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cheat-note + .cheat-note { margin-top: var(--s-3); }
.cheat-from { font-weight: 600; font-size: var(--fs-sm); color: var(--action-strong); }
.cheat-prompt { margin-top: var(--s-1); white-space: pre-wrap; overflow-wrap: anywhere; }
.cheat-note p:last-child { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.cheat-foot { max-width: var(--column); margin: var(--s-6) auto 0; color: var(--ink-3); font-size: var(--fs-xs); text-align: center; }

@media print {
  .topbar, .site-footer, .no-print, .toast, .skip-link, .buybar { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  body::before { display: none; }
  .view { padding: 0; max-width: none; animation: none !important; }
  .cheat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cheat-box, .cheat-prompts li, .cheat-note { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .cheat-never { background: #fff; }
}

@media (max-width: 900px) {
  .sell-steps, .why-grid { grid-template-columns: 1fr 1fr; }
  .cheat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-logo.is-compact img { width: 168px; margin-bottom: var(--s-4); }
  .sell-kicker { font-size: var(--fs-xs); }
  .sell-preview { margin-top: var(--s-6); margin-left: calc(var(--gutter) * -1 + 8px); margin-right: calc(var(--gutter) * -1 + 8px); border-radius: 18px; }
  .sell-preview-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .sell-preview-play .icon { width: 30px; height: 30px; }
  .sell-preview-label { padding: 36px 14px 12px; }
  .sell-preview-title { font-size: var(--fs-md); }
  .sell-section { margin-top: var(--s-8); }
  .sell-h2, .sell-final h2 { font-size: 1.75rem; }
  .sell-steps, .why-grid, .fit-grid, .real-pairs { grid-template-columns: 1fr; }
  .sell-outcomes .check-list { grid-template-columns: 1fr; }
  .sell-steps li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: var(--s-3); padding: var(--s-4); }
  .sell-step-icon { width: 40px; height: 40px; border-radius: 13px; margin: 0; }
  .sell-step-text { flex-basis: 100%; }
  .sell-real, .sell-final { padding: var(--s-6) var(--s-4); margin-left: -8px; margin-right: -8px; border-radius: var(--r-lg); }
  .sell-row-link { grid-template-columns: 36px 1fr; gap: var(--s-3); padding: 10px 6px; }
  .sell-row-num { width: 36px; height: 36px; font-size: 1rem; }
  .sell-row-meta { grid-column: 2; justify-content: flex-start; }
  .fit { padding: var(--s-5) var(--s-4); }
  .offer-card { padding: var(--s-6) var(--s-4); }
  .offer-actions .btn { width: 100%; }
  .faq-item summary { font-size: var(--fs-sm); }
  .sell-final .home-cta { width: 100%; }
  .view-about, .view-home:has(.sell-hero) { padding-bottom: 96px; }
  .buybar:not([hidden]) { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: var(--s-2); padding: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 18px 40px -16px rgba(26, 21, 56, 0.45), inset 0 0 0 1px var(--line); animation: pop-in var(--t-mid) var(--ease) both; }
  .buybar .btn { flex: 1; min-height: 48px; }
  .buybar-price { display: grid; place-items: center; min-width: 64px; min-height: 48px; padding: 0 14px; border-radius: var(--r-pill); background: var(--tint); color: var(--action-strong); font: 600 1.0625rem/1 var(--font-display); text-decoration: none; }
  .check { padding: var(--s-5) var(--s-4); border-radius: var(--r-lg); margin-left: -8px; margin-right: -8px; }
  .tried-btn { width: 100%; }
  .cert { padding: var(--s-5) var(--s-4); }
  .cert-form .btn { width: 100%; }
}
