/* Rumple investor prototype: shared design system. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/fraunces-latin-wght.woff2") format("woff2"); }

:root {
    --violet-50: #f7f4ff;
    --violet-100: #efe9fe;
    --violet-200: #ddd3fd;
    --violet-300: #c4b2fb;
    --violet-400: #a585f7;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --violet-700: #6d28d9;
    --violet-800: #5b21b6;
    --violet-900: #3b1580;
    --ink: #1c1530;
    --ink-2: #463f5c;
    --ink-3: #6e6787;
    --line: #e9e4f5;
    --line-2: #dcd5ee;
    --bg: #fbfaff;
    --bg-soft: #f5f2fd;
    --card: #ffffff;
    --green: #12976a;
    --green-bg: #e3f7ee;
    --amber: #b86a00;
    --amber-bg: #fff3dd;
    --red: #d23c3c;
    --red-bg: #fde8e8;
    --blue: #2f6fe4;
    --blue-bg: #e7efff;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(40, 22, 90, 0.06), 0 1px 1px rgba(40, 22, 90, 0.04);
    --shadow: 0 8px 24px -12px rgba(52, 24, 120, 0.18), 0 2px 6px rgba(52, 24, 120, 0.05);
    --shadow-lg: 0 24px 60px -24px rgba(52, 24, 120, 0.35), 0 8px 20px -12px rgba(52, 24, 120, 0.12);
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --demo-bar: 40px;
    --header: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--demo-bar) + var(--header) + 12px); }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--violet-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1, h2, .serif { font-family: var(--serif); font-weight: 650; font-optical-sizing: auto; }
h3, h4 { font-weight: 650; }
p { margin: 0 0 0.9em; }
:focus-visible { outline: 3px solid var(--violet-400); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.78rem; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }

/* ---------- layout ---------- */
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }
main { min-height: calc(100vh - var(--header) - var(--demo-bar)); }
.page { padding: 40px 0 80px; animation: page-in 0.35s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet-700); margin-bottom: 10px; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }

/* ---------- demo bar ---------- */
.demo-bar {
    position: sticky; top: 0; z-index: 60; height: var(--demo-bar);
    display: flex; align-items: center; gap: 10px; padding: 0 16px;
    background: linear-gradient(90deg, #241447, #3b1d74); color: #ece6ff; font-size: 0.82rem;
}
.demo-bar .demo-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.7rem; background: rgba(255, 255, 255, 0.12); padding: 3px 9px; border-radius: 99px; }
.demo-bar .demo-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7ef0c1; box-shadow: 0 0 0 3px rgba(126, 240, 193, 0.18); }
.demo-bar .demo-note { opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo-bar button, .demo-bar select { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; border-radius: 8px; padding: 3px 10px; font-size: 0.8rem; cursor: pointer; }
.demo-bar select option { color: var(--ink); }
.demo-bar button:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: var(--demo-bar); z-index: 50; height: var(--header);
    background: rgba(251, 250, 255, 0.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgba(220, 213, 238, 0.7);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 28px; }
.wordmark { font-family: var(--serif); font-weight: 750; font-size: 1.65rem; letter-spacing: -0.02em; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.wordmark:hover { text-decoration: none; }
.wordmark .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--violet-500), var(--violet-800)); display: grid; place-items: center; color: #fff; font-size: 1.05rem; box-shadow: 0 6px 14px -6px rgba(109, 40, 217, 0.7); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); font-weight: 550; padding: 8px 12px; border-radius: 10px; font-size: 0.95rem; }
.nav a:hover { background: var(--violet-50); text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--violet-800); background: var(--violet-100); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-button:hover { border-color: var(--violet-300); color: var(--violet-700); }
.icon-button .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--violet-600); color: #fff; font-size: 0.66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.menu-button { display: none; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.user-chip:hover { border-color: var(--violet-300); }

/* ---------- buttons, inputs ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
    font-weight: 650; font-size: 0.96rem; cursor: pointer; white-space: nowrap;
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--violet-600), var(--violet-700)); color: #fff; box-shadow: 0 8px 18px -10px rgba(109, 40, 217, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.btn-primary:hover { background: linear-gradient(180deg, var(--violet-700), var(--violet-800)); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--violet-300); color: var(--violet-800); }
.btn-ghost { background: transparent; color: var(--violet-700); }
.btn-ghost:hover { background: var(--violet-50); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.86rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--violet-700); font-weight: 600; cursor: pointer; }
.input, .select, .textarea {
    width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2);
    background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--violet-400); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); }
label.field { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field-group { margin-bottom: 16px; }
.hint { font-size: 0.84rem; color: var(--ink-3); margin-top: 6px; }

/* ---------- cards, badges ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-hover { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--violet-200); }
.panel { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 0.74rem; font-weight: 650; background: var(--violet-100); color: var(--violet-800); white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: #f0eef5; color: var(--ink-2); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-demo { background: #241447; color: #e9e1ff; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.64rem; height: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-weight: 550; font-size: 0.88rem; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--violet-300); color: var(--violet-800); }
.chip[aria-pressed="true"], .chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.9rem; flex: none; }
.avatar-sm { width: 30px; height: 30px; font-size: 0.74rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--violet-50); border: 1px solid var(--violet-200); color: var(--ink-2); font-size: 0.92rem; }
.notice .icon { color: var(--violet-700); margin-top: 2px; }
.notice-amber { background: var(--amber-bg); border-color: #f5d79a; }
.notice-amber .icon { color: var(--amber); }
.progress { height: 8px; border-radius: 99px; background: var(--violet-100); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-500), var(--violet-700)); transition: width 0.4s var(--ease); }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--violet-800); border-bottom-color: var(--violet-600); }
.stars { display: inline-flex; gap: 2px; }
.star { width: 30px; height: 30px; border: 0; background: none; padding: 2px; cursor: pointer; color: #d9d2ea; }
.star.on { color: #f5a524; }
.star svg { width: 100%; height: 100%; }
.stars-static { color: #f5a524; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8em; padding: 2px 6px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); }

/* ---------- home ---------- */
.hero { position: relative; padding: 84px 0 64px; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -20% -10% auto; height: 640px; z-index: -1;
    background: radial-gradient(600px 300px at 20% 30%, rgba(167, 133, 247, 0.28), transparent 70%), radial-gradient(500px 280px at 85% 10%, rgba(124, 58, 237, 0.16), transparent 70%);
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: -0.03em; line-height: 1.02; max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--violet-700); font-weight: 600; }
.hero .lede { margin-top: 18px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.ask-box { margin-top: 32px; max-width: 760px; background: #fff; border: 1px solid var(--line-2); border-radius: 22px; padding: 10px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; }
.ask-box .icon { color: var(--violet-600); margin-left: 10px; width: 22px; height: 22px; }
.ask-box input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 1.08rem; padding: 12px 4px; background: transparent; }
.hero-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.hero-suggest { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--ink-3); font-size: 0.88rem; }
.trust-row { margin-top: 40px; display: flex; gap: 28px; flex-wrap: wrap; color: var(--ink-3); font-size: 0.9rem; }
.trust-row b { color: var(--ink); font-family: var(--serif); font-size: 1.4rem; display: block; }
.product-card { padding: 32px; border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.product-card h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 650; }
.product-card .tag { font-size: 1.05rem; color: var(--ink-2); margin: 6px 0 18px; }
.product-qa { background: linear-gradient(160deg, #fff 0%, var(--violet-50) 100%); }
.product-learn { background: linear-gradient(160deg, #fff 0%, #f0f7ff 100%); }
.preview { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.preview-q { font-weight: 650; margin-bottom: 10px; }
.preview-ans { display: flex; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg-soft); margin-top: 8px; font-size: 0.9rem; color: var(--ink-2); }
.preview-ans b { color: var(--ink); display: block; font-size: 0.82rem; }
.mini-course { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; }
.mini-course + .mini-course { margin-top: 6px; }
.mini-course .cover { border-radius: 10px; aspect-ratio: 4 / 3; }
.steps { counter-reset: step; }
.step-card { padding: 26px; position: relative; }
.step-card .num { width: 38px; height: 38px; border-radius: 12px; background: var(--violet-100); color: var(--violet-800); display: grid; place-items: center; font-weight: 750; margin-bottom: 14px; }
.step-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.model-card { padding: 24px; }
.model-card .price { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; margin: 8px 0; }
.cta-band { border-radius: var(--radius-lg); padding: 48px; background: radial-gradient(500px 240px at 90% 0%, rgba(167, 133, 247, 0.45), transparent 70%), linear-gradient(135deg, #2a1554, #4b1fa0); color: #fff; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 22ch; }
.cta-band p { color: #e2d8ff; margin: 8px 0 0; }
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--ink-3); font-size: 0.88rem; background: #fff; }
.site-footer .container { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }

/* ---------- Q&A ---------- */
.composer { padding: 18px; }
.composer textarea { min-height: 84px; }
.question-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 18px 20px; }
.question-row h3 { font-size: 1.05rem; line-height: 1.35; margin: 6px 0; }
.question-row h3 a { color: var(--ink); }
.question-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 0.82rem; color: var(--ink-3); }
.question-stats { display: flex; gap: 14px; text-align: center; }
.question-stats div { min-width: 56px; }
.question-stats b { display: block; font-size: 1.05rem; color: var(--ink); }
.question-stats span { font-size: 0.74rem; color: var(--ink-3); }
.list-stack { display: grid; gap: 10px; }
.side-card { padding: 20px; }
.side-card h3 { font-size: 1rem; margin-bottom: 12px; }
.expert-mini { display: flex; gap: 10px; align-items: center; padding: 8px 0; cursor: pointer; }
.expert-mini + .expert-mini { border-top: 1px solid var(--line); }
.answer { padding: 22px; }
.answer-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.answer-body p:last-child { margin-bottom: 0; }
.answer-body ul { padding-left: 20px; margin: 0 0 0.9em; }
.ai-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #a585f7, #6d28d9); color: #fff; flex: none; }
.answer-ai { border-color: var(--violet-200); background: linear-gradient(180deg, #fff, var(--violet-50)); }
.answer-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.flow { display: grid; gap: 16px; }
.flow-step { padding: 20px 22px; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.flow-step .dotnum { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-100); color: var(--violet-800); font-weight: 750; font-size: 0.9rem; }
.flow-step.done .dotnum { background: var(--green); color: #fff; }
.flow-step.active .dotnum { background: var(--violet-600); color: #fff; box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.15); }
.flow-step.pending { opacity: 0.5; }
.flow-step h3 { font-size: 1rem; margin: 6px 0 8px; }
.diff { display: grid; gap: 8px; }
.diff .before { text-decoration: line-through; text-decoration-color: rgba(210, 60, 60, 0.5); color: var(--ink-3); }
.diff .after { font-weight: 600; }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-400); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.confidence { display: flex; gap: 10px; align-items: center; }
.confidence .progress { flex: 1; max-width: 220px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.compare-table th, .compare-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }

/* ---------- learn ---------- */
.learn-hero { padding: 56px 0 28px; background: radial-gradient(700px 260px at 80% 0%, rgba(167, 133, 247, 0.22), transparent 70%); }
.learn-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 18ch; letter-spacing: -0.025em; }
.search-xl { margin-top: 24px; max-width: 700px; position: relative; }
.search-xl .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 20px; height: 20px; }
.search-xl input { width: 100%; min-height: 58px; border-radius: 18px; border: 1px solid var(--line-2); padding: 0 18px 0 50px; font-size: 1.05rem; background: #fff; box-shadow: var(--shadow); }
.search-xl input:focus { outline: none; border-color: var(--violet-400); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), var(--shadow); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.course-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); height: 100%; }
.course-card:hover { text-decoration: none; }
.course-card .cover { aspect-ratio: 16 / 9; }
.course-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card h3 { font-size: 1.02rem; line-height: 1.35; }
.course-card .desc { font-size: 0.88rem; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.course-card .foot { margin-top: auto; display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 0.8rem; color: var(--ink-3); flex-wrap: wrap; }
.cover { width: 100%; background: var(--violet-100); }
.cover svg { width: 100%; height: 100%; }
.cat-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.category-tile { padding: 18px; display: flex; gap: 14px; align-items: center; color: var(--ink); cursor: pointer; text-align: left; width: 100%; font: inherit; }
.category-tile .swatch { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex: none; }
.category-tile b { display: block; }
.path-card { padding: 22px; display: grid; gap: 12px; }
.path-card ol { margin: 0; padding-left: 18px; font-size: 0.9rem; color: var(--ink-2); }
.continue-card { display: grid; grid-template-columns: 180px 1fr auto; gap: 20px; align-items: center; padding: 16px; }
.continue-card .cover { border-radius: 12px; aspect-ratio: 16 / 10; overflow: hidden; }
.disclosure { display: flex; gap: 10px; align-items: center; font-size: 0.84rem; color: var(--ink-3); padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.disclosure .icon { color: var(--violet-600); }

/* ---------- course player ---------- */
.player-top { position: sticky; top: calc(var(--demo-bar) + var(--header)); z-index: 30; background: rgba(251, 250, 255, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.player-top .progress { border-radius: 0; height: 4px; background: transparent; }
.course-header { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: center; padding: 36px 0 28px; }
.course-header h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -0.02em; }
.course-header .cover { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--shadow-lg); }
.player { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.lesson-nav { position: sticky; top: calc(var(--demo-bar) + var(--header) + 24px); }
.lesson-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lesson-nav a { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-size: 0.9rem; }
.lesson-nav a:hover { background: var(--violet-50); text-decoration: none; }
.lesson-nav a.current { background: var(--violet-100); color: var(--violet-900); font-weight: 600; }
.lesson-nav .n { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 0.74rem; font-weight: 700; background: #fff; }
.lesson-nav a.done .n { background: var(--green); border-color: var(--green); color: #fff; }
.reading { font-size: 1.07rem; line-height: 1.75; max-width: 70ch; }
.reading h2 { font-size: 1.7rem; margin: 0 0 16px; }
.reading h3 { font-size: 1.12rem; margin: 26px 0 10px; font-family: var(--sans); }
.reading ul, .reading ol { padding-left: 22px; }
.reading li + li { margin-top: 6px; }
.lesson { padding: 34px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 150px; }
.lesson-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 0.82rem; color: var(--ink-3); }
.callout { padding: 16px 18px; border-radius: 14px; background: var(--violet-50); border-left: 4px solid var(--violet-500); font-size: 1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.fact { padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.fact b { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--violet-800); line-height: 1.1; margin-bottom: 4px; }
.fact span { font-size: 0.86rem; color: var(--ink-2); line-height: 1.4; display: block; }
.tablewrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tablewrap table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; }
.tablewrap th, .tablewrap td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tablewrap th { background: var(--bg-soft); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.tablewrap tr:last-child td { border-bottom: 0; }
.activity { margin: 22px 0; padding: 20px; border-radius: 18px; border: 1px solid var(--violet-200); background: linear-gradient(180deg, #fff, var(--violet-50)); }
.activity .eyebrow { margin-bottom: 4px; }
.activity-prompt { font-weight: 600; }
.flip-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.flip-card { text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; min-height: 96px; font-size: 0.95rem; line-height: 1.45; transition: border-color 0.2s, background 0.2s; }
.flip-card:hover { border-color: var(--violet-400); }
.flip-card[aria-expanded="true"] { background: var(--violet-100); border-color: var(--violet-400); }
.choices { display: grid; gap: 8px; }
.choice { text-align: left; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-size: 0.96rem; line-height: 1.45; }
.choice:hover:not([disabled]) { border-color: var(--violet-400); }
.choice.good { border-color: var(--green); background: var(--green-bg); }
.choice.bad { border-color: #f0a8a8; background: var(--red-bg); }
.feedback { margin-top: 10px; font-size: 0.94rem; color: var(--ink-2); }
.sort-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); margin-top: 8px; font-size: 0.94rem; }
.sort-buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sort-buttons button { border: 1px solid var(--line-2); background: #fff; border-radius: 9px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer; }
.sort-buttons button.picked-good { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.sort-buttons button.picked-bad { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.sort-note { grid-column: 1 / -1; font-size: 0.84rem; color: var(--ink-3); }
.sort-note:empty { display: none; }
.activity-hint { font-size: 0.84rem; color: var(--ink-3); margin: 10px 0 0; }
.slider-demo input[type="range"] { width: 100%; accent-color: var(--violet-600); }
.token-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.token { padding: 6px 10px; border-radius: 9px; background: #fff; border: 1px solid var(--line-2); font-family: ui-monospace, Menlo, monospace; font-size: 0.86rem; }
.token.prob { border-color: var(--violet-300); background: var(--violet-50); }
.locked { position: relative; padding: 28px; border-radius: 18px; text-align: center; background: linear-gradient(180deg, #fff, var(--violet-50)); border: 1px dashed var(--violet-300); margin: 20px 0; }
.locked h3 { margin: 8px 0; font-family: var(--serif); font-size: 1.3rem; }
.quiz-q { padding: 22px; margin-top: 14px; }
.quiz-q h3 { font-size: 1.04rem; margin-bottom: 12px; line-height: 1.45; }
.quiz-q .explain { margin-top: 10px; font-size: 0.92rem; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); }
.readaloud { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.readaloud .speaking { color: var(--violet-700); font-weight: 600; font-size: 0.86rem; }
.completion { text-align: center; padding: 40px 24px; border-radius: var(--radius-lg); background: radial-gradient(400px 200px at 50% 0%, rgba(167, 133, 247, 0.35), transparent 70%), #fff; border: 1px solid var(--violet-200); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.completion h2 { font-size: 2rem; margin: 12px 0 8px; }
.completion .medal { width: 96px; height: 96px; margin: 0 auto; animation: pop 0.6s var(--ease); }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.4s ease-in forwards; opacity: 0.9; }
@keyframes fall { to { transform: translateY(460px) rotate(540deg); opacity: 0; } }
.score-ring { display: inline-flex; gap: 22px; margin: 18px 0; flex-wrap: wrap; justify-content: center; }
.score-ring div { padding: 12px 18px; border-radius: 14px; background: var(--bg-soft); min-width: 110px; }
.score-ring b { display: block; font-family: var(--serif); font-size: 1.6rem; }

/* ---------- personalize ---------- */
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.option { padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; text-align: left; transition: border-color 0.15s, box-shadow 0.15s; }
.option b { display: block; font-size: 0.95rem; }
.option span { font-size: 0.82rem; color: var(--ink-3); }
.option[aria-pressed="true"] { border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); background: var(--violet-50); }
.gen-steps { display: grid; gap: 10px; margin: 20px 0; }
.gen-step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink-3); }
.gen-step.done { color: var(--ink); }
.gen-step.active { border-color: var(--violet-300); color: var(--ink); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1); }
.gen-step .state { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; }
.gen-step.done .state { background: var(--green); border-color: var(--green); color: #fff; }
.gen-step.active .state { border-color: var(--violet-500); border-top-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- pricing ---------- */
.billing-toggle { display: inline-flex; padding: 4px; border-radius: 14px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.billing-toggle button { border: 0; background: none; padding: 9px 18px; border-radius: 10px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.billing-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.save-tag { color: var(--green); font-weight: 700; font-size: 0.8rem; margin-left: 4px; }
.plan { padding: 30px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.featured { border: 2px solid var(--violet-500); box-shadow: var(--shadow-lg); }
.plan .ribbon { position: absolute; top: -13px; left: 30px; }
.plan h3 { font-size: 1.2rem; }
.plan .amount { font-family: var(--serif); font-size: 3rem; font-weight: 700; line-height: 1; }
.plan .amount small { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; color: var(--ink-3); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.94rem; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.check-list .icon { color: var(--green); }
.faq details { padding: 16px 0; border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 650; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }

/* ---------- dashboards ---------- */
.kpi { padding: 18px 20px; }
.kpi .label { font-size: 0.84rem; color: var(--ink-3); font-weight: 600; }
.kpi .value { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1.1; margin: 6px 0; }
.kpi .delta { font-size: 0.8rem; font-weight: 650; color: var(--green); }
.kpi .delta.down { color: var(--red); }
.kpi svg.spark { width: 100%; height: 36px; margin-top: 6px; }
.chart-card { padding: 22px; }
.chart-card h3 { font-size: 1rem; margin-bottom: 4px; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--ink-3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-2); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 700; }
.data-table td.wrap { white-space: normal; }
.table-scroll { overflow-x: auto; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 56px; gap: 12px; align-items: center; font-size: 0.88rem; margin-top: 10px; }
.bar-row .progress { height: 10px; }
.simulated { display: inline-flex; gap: 6px; align-items: center; font-size: 0.78rem; font-weight: 650; color: var(--amber); background: var(--amber-bg); padding: 4px 10px; border-radius: 99px; }
.role-hero { padding: 30px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #fff, var(--violet-50)); border: 1px solid var(--violet-200); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.review-form .check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.review-form .check input { width: 18px; height: 18px; accent-color: var(--violet-600); margin-top: 3px; }

/* ---------- messages / notifications ---------- */
.messages { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 560px; overflow: hidden; }
.thread-list { border-right: 1px solid var(--line); overflow-y: auto; }
.thread { display: flex; gap: 10px; padding: 14px 16px; cursor: pointer; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.thread[aria-current="true"] { background: var(--violet-50); }
.thread .preview-text { font-size: 0.82rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.convo { display: flex; flex-direction: column; min-width: 0; }
.convo-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.convo-body { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; background: var(--bg); max-height: 460px; }
.bubble { max-width: 76%; padding: 10px 14px; border-radius: 16px; font-size: 0.94rem; line-height: 1.45; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.bubble.me { align-self: flex-end; background: var(--violet-600); color: #fff; border-color: var(--violet-600); }
.bubble time { display: block; font-size: 0.7rem; opacity: 0.7; margin-top: 4px; }
.convo-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.popover { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 80; overflow: hidden; }
.popover header { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.88rem; cursor: pointer; }
.notif.unread { background: var(--violet-50); }
.notif .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--violet-100); color: var(--violet-700); flex: none; }
.menu-pop { width: 260px; padding: 6px; }
.menu-pop a, .menu-pop button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink); background: none; border: 0; font-size: 0.92rem; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--violet-50); text-decoration: none; }

/* ---------- modal, toast, tour ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(22, 12, 48, 0.45); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 28px; animation: rise 0.25s var(--ease); position: relative; }
.modal-wide { width: min(760px, 100%); }
@keyframes rise { from { transform: translateY(12px) scale(0.98); opacity: 0; } }
.modal h2 { font-size: 1.6rem; margin-bottom: 6px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--bg-soft); cursor: pointer; display: grid; place-items: center; }
.order-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.order-total { font-weight: 750; font-size: 1.1rem; border-bottom: 0; }
.pay-method { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--violet-300); background: var(--violet-50); }
.card-glyph { width: 46px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #3b1d74, #7c3aed); color: #fff; font-size: 0.6rem; font-weight: 800; display: grid; place-items: center; letter-spacing: 0.05em; }
.success-check { width: 72px; height: 72px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; margin: 0 auto 14px; animation: pop 0.5s var(--ease); }
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 0.92rem; display: flex; gap: 10px; align-items: center; animation: rise 0.25s var(--ease); }
.toast .icon { color: #7ef0c1; }
.tour { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: min(360px, calc(100% - 24px)); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--violet-200); padding: 20px; animation: rise 0.3s var(--ease); }
.tour h3 { font-family: var(--serif); font-size: 1.2rem; margin: 6px 0; }
.tour p { font-size: 0.92rem; color: var(--ink-2); }
.tour .tour-dots { display: flex; gap: 5px; }
.tour .tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-200); }
.tour .tour-dots i.on { background: var(--violet-600); width: 18px; border-radius: 99px; }
/* While the tour is open: room to scroll every control clear of the card,
   scrollIntoView keeps targets above it, and toasts sit above it. */
html.touring { scroll-padding-bottom: calc(var(--tour-h, 0px) + 32px); }
html.touring body { padding-bottom: calc(var(--tour-h, 0px) + 32px); }
html.touring .toast-host { bottom: calc(var(--tour-h, 0px) + 32px); }
.tour-pill { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--violet-200); box-shadow: var(--shadow-lg); color: var(--ink); font-weight: 650; font-size: 0.88rem; cursor: pointer; animation: rise 0.25s var(--ease); }
.tour-pill .icon { color: var(--violet-600); }
.tour-pill-cta { color: var(--violet-700); }
.ext-link { text-decoration-style: dotted; text-underline-offset: 2px; }
.status-table td, .status-table th { vertical-align: top; font-size: 0.84rem; }
.question-attribution { align-items: flex-start; }
.question-attribution .icon { margin-top: 2px; flex: none; }
.spotlight { animation: glow 1.6s ease-in-out 2; border-radius: 14px; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); } 50% { box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.35); } }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
    .course-header { grid-template-columns: 1fr; }
    .course-header .cover { max-width: 520px; }
    .player { grid-template-columns: 1fr; }
    .lesson-nav { position: static; }
}
@media (max-width: 860px) {
    .nav, .header-actions .hide-sm { display: none; }
    .menu-button { display: grid; }
    .site-header .container { gap: 12px; }
    .nav.open { display: grid; position: absolute; top: var(--header); left: 0; right: 0; background: #fff; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .compare { grid-template-columns: 1fr; }
    .messages { grid-template-columns: 1fr; }
    .thread-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 220px; }
    .continue-card { grid-template-columns: 110px 1fr; }
    .continue-card .btn { grid-column: 1 / -1; }
    .demo-bar .demo-note { display: none; }
}
@media (max-width: 560px) {
    :root { --header: 60px; }
    .container, .narrow { width: calc(100% - 32px); }
    .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
    .section { padding: 52px 0; }
    .hero { padding: 48px 0 40px; }
    .ask-box { flex-wrap: wrap; border-radius: 18px; }
    .ask-box input { width: calc(100% - 50px); }
    .ask-box .btn { width: 100%; }
    .question-row { grid-template-columns: 1fr; }
    .question-stats { justify-content: flex-start; }
    .cta-band { padding: 30px 22px; }
    .card-pad, .product-card, .plan { padding: 20px; }
    .kpi .value { font-size: 1.55rem; }
    .bar-row { grid-template-columns: 96px 1fr 44px; }
    .demo-bar { gap: 6px; padding: 0 10px; }
    .demo-bar .hide-xs { display: none; }
    .wordmark { font-size: 1.4rem; }
    .user-chip span.name { display: none; }
    .user-chip { padding-right: 4px; }
    .sort-item { grid-template-columns: 1fr; }
    .sort-buttons { justify-content: flex-start; }
    .tour { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 12px 14px; border-radius: 16px; }
    .tour h3 { font-size: 1.02rem; margin: 2px 0; }
    .tour p { font-size: 0.84rem; margin: 0 0 8px; line-height: 1.4; }
    .tour-pill { right: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Grid children may shrink below their content width (prevents mobile overflow). */
.grid > *, .split > *, .player > *, .course-header > *, .compare > *, .messages > * { min-width: 0; }
.flow-step { grid-template-columns: 34px minmax(0, 1fr); }
.site-footer .stack { display: grid; gap: 8px; }
.site-footer .stack > * + * { margin-top: 0; }
.site-footer .link-btn { text-align: left; font-weight: 500; }
.confidence .progress { flex: none; width: 160px; }
@media (max-width: 560px) { .ask-box input { font-size: 0.98rem; } .ask-box .icon { margin-left: 4px; } }
.nav .mobile-only { display: none; }
@media (max-width: 860px) { .nav.open .mobile-only { display: block; border-top: 1px solid var(--line); border-radius: 0; } .nav.open .mobile-only ~ .mobile-only { border-top: 0; } }
