/* StudyVault — editorial & bold, warm paper, teal accent, geometric sans.
   Tweak variants are driven by data-* attributes on .sv-root. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Hanken+Grotesk:wght@400;500;600;700;800&display=swap');

/* ── React-home island visibility (toggled by the SPA via body.sv-home-active) ── */
#sv-home-root { display: none; }
body.sv-home-active #sidebar,
body.sv-home-active #topbar,
body.sv-home-active #app { display: none !important; }
body.sv-home-active #sv-home-root { display: block; }
body.sv-home-active { background: #faf7f0; }

:root {
  --paper: #faf7f0;
  --paper-2: #f3eee3;
  --card: #fffefb;
  --ink: #181612;
  --ink-2: #6c6557;
  --ink-3: #9a9384;
  --line: #e7e0d2;
  --line-2: #d9d1bf;
  --accent-h: 172;
  --accent: oklch(0.52 0.072 var(--accent-h));
  --accent-deep: oklch(0.42 0.07 var(--accent-h));
  --accent-soft: oklch(0.95 0.03 var(--accent-h));
  --accent-ink: oklch(0.45 0.08 var(--accent-h));
  --shadow: 0 1px 2px rgba(40,34,20,.04), 0 8px 24px -12px rgba(40,34,20,.14);
  --shadow-lg: 0 2px 6px rgba(40,34,20,.05), 0 24px 60px -20px rgba(40,34,20,.28);
  --r: 14px;
  --maxw: 1180px;
  --font-d: 'Space Grotesk', system-ui, sans-serif;
  --font-b: 'Hanken Grotesk', system-ui, sans-serif;
}

.sv-root * { box-sizing: border-box; }
.sv-root {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-b);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.sv-root .ic { display: block; flex: none; }
.sv-root button { font-family: inherit; cursor: pointer; }
.sv-root ::selection { background: var(--accent-soft); }

.sv-root .wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ───────────── App bar ───────────── */
.sv-root .appbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; }
.brand-mark .ic { color: var(--paper); }
.appbar-search {
  margin-left: 8px; flex: 1; max-width: 360px; display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-3); background: var(--card); font-size: 14px; white-space: nowrap;
}
.appbar-spacer { flex: 1; }
.appbar-actions { display: flex; align-items: center; gap: 10px; }
.sv-root .btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sv-root .btn:hover { border-color: var(--ink); }
.sv-root .btn:active { transform: translateY(1px); }
.btn-solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-solid:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--paper-2); border-color: transparent; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; }
.icon-btn { width: 40px; height: 40px; padding: 0; justify-content: center; }

/* ───────────── Trial ticker ───────────── */
.ticker {
  background: var(--ink); color: var(--paper); font-size: 13.5px; font-weight: 500;
}
.ticker-in { display: flex; align-items: center; gap: 12px; height: 40px; overflow: hidden; }
.ticker .pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; flex: none; }
.ticker-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker .accent { color: oklch(0.8 0.11 var(--accent-h)); font-weight: 700; }
.ticker-close { margin-left: auto; color: var(--paper); opacity: .65; background: none; border: none; display: grid; place-items: center; }
.ticker-close:hover { opacity: 1; }

/* ───────────── My-path banner ───────────── */
.mypath {
  border: 1px solid var(--line-2); background: var(--card); border-radius: var(--r);
  box-shadow: var(--shadow); margin-top: 22px;
  display: flex; align-items: center; gap: 16px; padding: 14px 16px;
}
.mypath .badge { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: oklch(0.95 0.03 var(--ph, 172)); color: oklch(0.45 0.09 var(--ph, 172)); }
.mypath .mp-label { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 700; }
.mypath .mp-name { font-family: var(--font-d); font-weight: 600; font-size: 17px; margin-top: 1px; }
.mypath .mp-actions { margin-left: auto; display: flex; gap: 8px; }

/* ───────────── Hero ───────────── */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(22px, 3vw, 34px); }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.hero-kicker .ic { color: var(--accent); }
.hero h1 {
  font-family: var(--font-d); font-weight: 700; letter-spacing: -.035em; line-height: .98;
  font-size: clamp(40px, 8.5vw, 92px); margin: 18px 0 0; text-wrap: balance;
}
.hero h1 .em { color: var(--accent); font-style: normal; }
.hero p.lede { font-size: clamp(17px, 2.2vw, 21px); color: var(--ink-2); max-width: 46ch; margin: 22px 0 0; line-height: 1.5; text-wrap: pretty; }
.hero-stats { display: flex; align-items: baseline; gap: clamp(20px, 4vw, 44px); margin-top: 30px; flex-wrap: wrap; }
.stat .num { font-family: var(--font-d); font-weight: 700; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 14px; color: var(--ink-2); margin-top: 6px; font-weight: 600; }
.stat-div { width: 1px; align-self: stretch; background: var(--line-2); margin: 4px 0; }

/* hero variant: split (lede sits to the right on wide screens) */
.sv-root[data-hero="split"] .hero-grid { display: grid; gap: 12px clamp(24px, 5vw, 64px); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) {
  .sv-root[data-hero="split"] .hero-grid { grid-template-columns: 1.25fr .9fr; }
  .sv-root[data-hero="split"] .hero h1 { margin-top: 0; }
  .sv-root[data-hero="split"] p.lede { margin-top: 6px; }
}
/* hero variant: centered */
.sv-root[data-hero="centered"] .hero { text-align: center; }
.sv-root[data-hero="centered"] .hero p.lede { margin-left: auto; margin-right: auto; }
.sv-root[data-hero="centered"] .hero-stats { justify-content: center; }
.sv-root[data-hero="centered"] .hero-kicker { justify-content: center; }
/* hero variant: mega-numbers */
.sv-root[data-hero="mega"] .hero h1 { font-size: clamp(44px, 10vw, 112px); }
.sv-root[data-hero="mega"] .hero-stats .num { font-size: clamp(40px, 7vw, 76px); }

/* ───────────── Mode tabs ───────────── */
.tabsbar { position: sticky; top: 64px; z-index: 30; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; padding: 12px 0; }
.tab {
  display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; background: transparent;
  color: var(--ink-2); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  transition: background .15s, color .15s, border-color .15s;
}
.tab .ic { color: var(--ink-3); transition: color .15s; }
.tab:hover { background: var(--paper-2); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tab[aria-selected="true"] .ic { color: var(--paper); }
.tab .tab-count { font-size: 12px; font-weight: 700; opacity: .6; font-variant-numeric: tabular-nums; }

/* tabs variant: segmented (boxed pill group) */
.sv-root[data-tabs="segmented"] .tabs { background: var(--paper-2); padding: 5px; border-radius: 999px; gap: 0; width: fit-content; border: 1px solid var(--line); margin: 10px 0; }
.sv-root[data-tabs="segmented"] .tab { height: 40px; }
.sv-root[data-tabs="segmented"] .tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sv-root[data-tabs="segmented"] .tab[aria-selected="true"] .ic { color: var(--accent); }

/* tabs variant: underline (editorial) */
.sv-root[data-tabs="underline"] .tabs { gap: clamp(14px, 4vw, 40px); padding: 0; }
.sv-root[data-tabs="underline"] .tab { height: 56px; border-radius: 0; padding: 0 2px; border-bottom: 2.5px solid transparent; font-family: var(--font-d); font-size: clamp(16px, 2.2vw, 19px); }
.sv-root[data-tabs="underline"] .tab:hover { background: transparent; color: var(--ink); }
.sv-root[data-tabs="underline"] .tab[aria-selected="true"] { background: transparent; color: var(--ink); border-bottom-color: var(--accent); }
.sv-root[data-tabs="underline"] .tab[aria-selected="true"] .ic { color: var(--accent); }

/* ───────────── Mode content shell ───────────── */
.mode { padding: clamp(26px, 4vw, 40px) 0 120px; animation: svfade .35s ease both; }
@keyframes svfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mode-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.mode-head h2 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.025em; font-size: clamp(24px, 3.4vw, 34px); margin: 0; }
.mode-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; }

/* ───────────── Domains ───────────── */
.domain-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); align-items: stretch; }
.dcard {
  --h: 172; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: clip;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.dcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: oklch(0.8 0.05 var(--h)); }

.dcard-head { display: flex; flex-direction: column; height: 100%; padding: 22px; text-align: left; background: none; border: none; width: 100%; }
.dh-row { display: flex; align-items: flex-start; justify-content: space-between; }
.dcard-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; background: oklch(0.95 0.04 var(--h)); color: oklch(0.46 0.1 var(--h)); }
.dcard-count { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.dcard-count b { font-family: var(--font-d); font-weight: 700; font-size: 32px; letter-spacing: -.04em; color: oklch(0.47 0.11 var(--h)); font-variant-numeric: tabular-nums; }
.dcard-count small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; margin-top: 5px; }
.dcard-name { font-family: var(--font-d); font-weight: 600; font-size: 22px; letter-spacing: -.025em; margin-top: 18px; }
.dcard-blurb { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin-top: 8px; text-wrap: pretty; }
.dcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 16px; font-size: 13px; font-weight: 600; border-top: 1px solid var(--line); }
.dcard-foot { margin-top: 18px; }
.dcard-folders-n { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.dcard-folders-n .ic { color: var(--ink-3); }
.dcard-explore { display: inline-flex; align-items: center; gap: 6px; color: oklch(0.46 0.1 var(--h)); }
.dcard-explore .ic { transition: transform .18s ease; }
.dcard:hover .dcard-explore .ic { transform: translateX(3px); }

/* domain card variants */
.sv-root[data-cards="block"] .dcard { background: oklch(0.97 0.025 var(--h)); border-color: oklch(0.9 0.04 var(--h)); }
.sv-root[data-cards="block"] .dcard-ic { background: oklch(0.46 0.1 var(--h)); color: #fff; }
.sv-root[data-cards="bar"] .dcard { border-left: 4px solid oklch(0.55 0.12 var(--h)); }
.sv-root[data-cards="bar"] .dcard-ic { background: transparent; border: 1.5px solid oklch(0.8 0.06 var(--h)); border-radius: 12px; }
.sv-root[data-cards="minimal"] .dcard { box-shadow: none; }
.sv-root[data-cards="minimal"] .dcard:hover { box-shadow: var(--shadow); }
.sv-root[data-cards="minimal"] .dcard-ic { background: transparent; color: var(--ink); width: 40px; height: 40px; }

/* ───────────── Roadmaps ───────────── */
.rm-group { margin-bottom: 38px; }
.rm-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rm-group-head .ic { color: var(--accent); }
.rm-group-head h3 { font-family: var(--font-d); font-weight: 700; font-size: 20px; letter-spacing: -.02em; margin: 0; }
.rm-group-head .line { flex: 1; height: 1px; background: var(--line); }
.rm-group-head .cnt { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.rm-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.rmcard {
  --h: 172; text-align: left; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); position: relative;
  display: flex; flex-direction: column; gap: 14px; min-height: 168px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
}
.rmcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.rmcard.is-path { border-color: oklch(0.6 0.12 var(--h)); box-shadow: 0 0 0 1px oklch(0.6 0.12 var(--h)), var(--shadow); }
.rmcard-top { display: flex; align-items: center; gap: 12px; }
.rmcard-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: oklch(0.95 0.035 var(--h)); color: oklch(0.46 0.1 var(--h)); flex: none; }
.rmcard-name { font-family: var(--font-d); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.rmcard-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.chip .ic { color: var(--ink-3); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip.accent .ic { color: var(--accent); }
.rmcard-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.rmcard-foot .open-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); }
.rmcard .path-flag { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: oklch(0.46 0.1 var(--h)); }
.rmcard .path-flag .ic { color: oklch(0.55 0.12 var(--h)); }

/* ───────────── Levels ladder ───────────── */
.ladder { display: flex; flex-direction: column; gap: 14px; }
.tier { --h: 172; border: 1px solid var(--line); border-radius: var(--r); overflow: clip; background: var(--card); box-shadow: var(--shadow); }
.tier-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: linear-gradient(90deg, oklch(0.96 0.035 var(--h)), color-mix(in srgb, var(--card) 80%, transparent)); }
.tier-num { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: oklch(0.46 0.1 var(--h)); color: #fff; font-family: var(--font-d); font-weight: 700; font-size: 20px; flex: none; }
.tier-titles .t-tag { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: oklch(0.46 0.1 var(--h)); }
.tier-titles .t-name { font-family: var(--font-d); font-weight: 600; font-size: 19px; letter-spacing: -.02em; display: block; }
.tier-bar { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.tier-bar .seg { width: 22px; height: 6px; border-radius: 3px; background: var(--line-2); }
.tier-bar .seg.on { background: oklch(0.55 0.12 var(--h)); }
.tier-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px; padding: 8px; }
.lcard { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 10px; text-align: left; background: transparent; border: none; width: 100%; transition: background .14s; }
.lcard:hover { background: var(--paper-2); }
.lcard .lc-ic { width: 34px; height: 34px; border-radius: 9px; background: oklch(0.95 0.03 var(--h)); color: oklch(0.46 0.1 var(--h)); display: grid; place-items: center; flex: none; }
.lcard .lc-body { flex: 1; min-width: 0; }
.lcard .lc-track { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); display: block; }
.lcard .lc-title { font-weight: 600; font-size: 14.5px; margin-top: 2px; display: block; }
.lcard .go { color: var(--ink-3); }
.lcard:hover .go { color: var(--accent); }

/* ───────────── Overlays (plan / folder / lesson) ───────────── */
.overlay { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; }
.overlay-scrim { position: absolute; inset: 0; background: rgba(24,20,12,.42); backdrop-filter: blur(2px); animation: svfade .25s ease both; }
.sheet {
  position: relative; width: min(640px, 100%); height: 100%; background: var(--paper);
  box-shadow: var(--shadow-lg); overflow-y: auto; animation: svslideIn .32s cubic-bezier(.22,1,.36,1) both;
  display: flex; flex-direction: column;
}
@keyframes svslideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.sheet-bar .crumbs { font-size: 13px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 7px; min-width: 0; }
.sheet-bar .crumbs .ic { color: var(--ink-3); }
.sheet-body { padding: clamp(20px, 4vw, 32px); }

.plan-head { --h: 172; border-radius: var(--r); padding: 24px; color: #fff; background: linear-gradient(135deg, oklch(0.5 0.11 var(--h)), oklch(0.4 0.09 var(--h))); }
.plan-head .ph-ic { width: 52px; height: 52px; border-radius: 13px; background: rgba(255,255,255,.16); display: grid; place-items: center; margin-bottom: 16px; }
.plan-head h2 { font-family: var(--font-d); font-weight: 700; font-size: clamp(26px, 5vw, 34px); letter-spacing: -.03em; margin: 0; }
.plan-head .ph-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.plan-head .ph-blurb { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.9); max-width: 52ch; }
.plan-head .ph-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.16); white-space: nowrap; }
.plan-cta { display: flex; gap: 10px; margin: 20px 0 8px; flex-wrap: wrap; }
.plan-cta .btn-accent { background: var(--ink); border-color: var(--ink); }
.plan-cta .btn-accent.active { background: oklch(0.5 0.11 var(--ph,172)); border-color: oklch(0.5 0.11 var(--ph,172)); }

/* domain sheet — folder list */
.dsheet-label { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-3); margin: 24px 0 12px; }
.dsheet-folders { display: flex; flex-direction: column; gap: 10px; }
.dsheet-folder { --h: 172; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); width: 100%; text-align: left; box-shadow: var(--shadow); transition: border-color .15s, transform .12s, box-shadow .2s; }
.dsheet-folder:hover { border-color: oklch(0.7 0.09 var(--h)); transform: translateX(3px); box-shadow: var(--shadow-lg); }
.dsf-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: oklch(0.95 0.04 var(--h)); color: oklch(0.46 0.1 var(--h)); }
.dsf-body { flex: 1; min-width: 0; }
.dsf-name { display: block; font-family: var(--font-d); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.dsf-meta { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.dsheet-folder .go { color: var(--ink-3); }
.dsheet-folder:hover .go { color: oklch(0.5 0.1 var(--h)); }

.phase { margin-top: 26px; }
.phase-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.phase-num { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 13px; font-weight: 700; font-family: var(--font-d); flex: none; }
.phase-head h4 { margin: 0; font-family: var(--font-d); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.phase-head .pcount { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.steps { display: flex; flex-direction: column; gap: 6px; padding-left: 13px; border-left: 2px solid var(--line); margin-left: 12px; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; transition: border-color .15s, transform .12s; }
.step:hover { border-color: var(--ink); transform: translateX(2px); }
.step .s-num { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; width: 20px; flex: none; }
.step .s-ic { color: var(--accent); }
.step .s-title { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 0; }
.step .s-folder { font-size: 12px; color: var(--ink-3); }
.step .go { color: var(--ink-3); }
.step:hover .go { color: var(--accent); }

/* ───────────── Mobile bottom nav (variant) ───────────── */
.botnav { display: none; }
@media (max-width: 720px) {
  .sv-root[data-mobilenav="bottom"] .tabsbar { display: none; }
  .sv-root[data-mobilenav="bottom"] .botnav {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line-2);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }
  .sv-root[data-mobilenav="bottom"] .botnav .bn {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 12px;
    background: none; border: none; color: var(--ink-3); font-size: 11.5px; font-weight: 600;
  }
  .sv-root[data-mobilenav="bottom"] .botnav .bn .ic { color: var(--ink-3); }
  .sv-root[data-mobilenav="bottom"] .botnav .bn[aria-selected="true"] { color: var(--ink); background: var(--paper-2); }
  .sv-root[data-mobilenav="bottom"] .botnav .bn[aria-selected="true"] .ic { color: var(--accent); }
  .sv-root[data-mobilenav="bottom"] .mode { padding-bottom: 96px; }
}

/* ───────────── Responsive ───────────── */
.only-wide { display: inline-flex; }
.only-narrow { display: none; }
@media (max-width: 860px) {
  .appbar-search { display: none; }
}
@media (max-width: 640px) {
  .appbar-in { gap: 10px; }
  .only-wide { display: none !important; }
  .only-narrow { display: inline-flex; }
  .domain-grid, .rm-grid, .tier-cards { grid-template-columns: 1fr; }
  .mypath { flex-wrap: wrap; }
  .mypath .mp-actions { margin-left: 0; width: 100%; }
  .mypath .mp-actions .btn { flex: 1; justify-content: center; }
  .overlay { justify-content: stretch; }
  .sheet { width: 100%; }
  .hero-stats { gap: 22px; }
  .stat-div { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-root * { animation-duration: .001ms !important; }
}

/* ───────────── Fixes / additions ───────────── */
/* Sign-in button stays readable on hover (was going all-black) */
.sv-root .btn-solid,
.sv-root .btn-solid:hover { color: var(--paper); }
.sv-root .btn-solid .ic { color: var(--paper); }

/* Appbar live search */
.appbar-search { position: relative; }
.appbar-search-input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font: inherit; font-size: 14px; color: var(--ink); }
.appbar-search-input::placeholder { color: var(--ink-3); }
.appbar-search-pop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; max-height: 60vh; overflow-y: auto; }
.asr { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: none; background: transparent; border-radius: 9px; text-align: left; cursor: pointer; }
.asr:hover { background: var(--paper-2); }
.asr .ic { color: var(--accent); flex: none; }
.asr-body { display: flex; flex-direction: column; min-width: 0; }
.asr-track { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.asr-title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asr-empty { padding: 14px; color: var(--ink-3); font-size: 14px; }

/* Appbar logged-in user */
.appbar-user { gap: 8px; }
.appbar-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.appbar-plan { font-size: 10px; font-weight: 800; letter-spacing: .06em; background: var(--accent-soft); color: var(--accent-ink); padding: 2px 6px; border-radius: 999px; }

/* Roadmap card: clamp long outcome so cards don't look weird */
.rmcard .chip.accent { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; align-items: flex-start; line-height: 1.35; max-width: 100%; }

/* Sheets: long descriptions wrap (no horizontal scroll) */
.overlay, .sheet, .sheet-body { overflow-x: hidden; }
.plan-head .ph-chip { white-space: normal; }
.plan-head .ph-chips { max-width: 100%; }
.sheet-body .s-title, .sheet-body .lc-title, .sheet-body .dsf-name, .sheet-body .ph-blurb { overflow-wrap: anywhere; }

/* Hero lottie — square orbital animation that fills the column */
.hero-lottie { width: 100%; max-width: 280px; aspect-ratio: 1 / 1; height: auto; margin: -10px 0 6px; }
.hero-lottie lottie-player { width: 100%; height: 100%; display: block; }
@media (max-width: 900px) { .hero-lottie { max-width: 210px; margin: 6px auto 8px 0; } }

/* Logged-in user menu */
.appbar-usermenu { position: relative; }
.appbar-user { gap: 7px; }
.appbar-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 224px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.appbar-menu-head { display: flex; align-items: center; gap: 11px; padding: 10px 11px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.appbar-menu-id { display: flex; flex-direction: column; min-width: 0; }
.appbar-menu-id strong { font-family: var(--font-d); font-size: 15px; color: var(--ink); }
.appbar-menu-id span { font-size: 12px; color: var(--ink-3); }
.appbar-avatar.lg { width: 36px; height: 36px; font-size: 15px; }
.appbar-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; border: none; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.appbar-menu-item:hover { background: var(--paper-2); }
.appbar-menu-item .ic { color: var(--ink-3); }
.appbar-menu-item.danger { color: #c0392b; }
.appbar-menu-item.danger .ic { color: #c0392b; }
