/* ==========================================================================
   JoeHomebuyer Coaching — premium course UI
   Type: Outfit (body/UI) + Bricolage Grotesque (display headings)
   Palette: exact JoeHomebuyer brand tokens (navy / brand-red / gold / mint)
   Light landing + light course reader; navy "aurora" rail (JHB signature).
   ========================================================================== */

:root {
  /* Brand */
  --navy: #1e3a5f;
  --navy-deep: #142741;
  --navy-soft: #2a5078;
  --red: #c0303d;
  --red-deep: #a52833;
  --red-soft: #d03a4a;
  --gold: #e7b445;
  --mint: #1f9d84;
  --green: #0b9f5d;

  /* Surfaces */
  --paper: #f8fafc;
  --s0: #ffffff;
  --s1: #fafbfd;
  --s2: #f4f6fb;
  --s3: #eef1f7;

  /* Ink */
  --ink: #0f172a;
  --ink-body: #334155;
  --ink-muted: #64748b;
  --ink-faint: #94a3b8;

  /* Lines */
  --line-strong: rgba(148, 163, 184, 0.55);
  --line: rgba(148, 163, 184, 0.32);
  --line-soft: rgba(148, 163, 184, 0.18);

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
  --sh-md: 0 4px 12px -2px rgba(15, 23, 42, 0.10), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
  --sh-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.22), 0 8px 20px -8px rgba(15, 23, 42, 0.12);
  --sh-red: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 14px 28px -8px rgba(182, 44, 56, 0.45);
  --sh-navy: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 14px 28px -8px rgba(30, 58, 95, 0.45);

  /* Type — Outfit everywhere (display + body). */
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font);

  /* Metrics */
  --rail-w: 300px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-body);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-app { background: var(--s2); overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(1.1rem, 4vw, 2rem); width: 100%; }
.muted { color: var(--ink-muted); }
.grad { color: var(--red-deep); }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--red-deep);
}

/* ---- boot splash -------------------------------------------------------- */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 1.4rem; justify-items: center; background: var(--paper); }
.boot__mark { width: 54px; height: 54px; background: url('/logo-mark.svg') center/contain no-repeat; filter: drop-shadow(0 10px 20px rgba(30, 58, 95, 0.28)); }
.boot__spin { width: 26px; height: 26px; border: 3px solid var(--s3); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- brand lockup ------------------------------------------------------- */
/* The logo is white "joe" + red "homebuyer" — built for dark backgrounds, so it
   sits in a navy chip that keeps it legible on the light landing AND the rail. */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__chip { display: inline-flex; align-items: center; padding: 0.46rem 0.72rem; border-radius: 12px; background: linear-gradient(135deg, #0e2746, #1a4f7b); box-shadow: var(--sh-sm); }
.brand__logo { display: block; height: 30px; width: auto; }
.brand__tag { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red-deep); }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 700; font-size: 0.95rem; padding: 0.72rem 1.25rem; border-radius: 999px;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(135deg, var(--red) 0%, var(--red-soft) 100%); color: #fff; box-shadow: var(--sh-red); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 18px 34px -8px rgba(182,44,56,.5); }
.btn--ghost { background: var(--s0); color: var(--ink); border-color: var(--line); box-shadow: var(--sh-sm); }
.btn--ghost:hover { border-color: var(--line-strong); background: var(--s1); }
.btn--google { background: #fff; color: #1f2937; border: 1px solid var(--line-strong); box-shadow: var(--sh-sm); }
.btn--google:hover { background: #fff; box-shadow: var(--sh-md); transform: translateY(-1px); }
.btn--lg { padding: 0.95rem 1.8rem; font-size: 1.05rem; }
.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }
.btn--done { background: var(--s2); color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.gglyph { display: inline-flex; }

.pill { display: inline-flex; align-items: center; padding: 0.32rem 0.8rem; border-radius: 999px; background: var(--s0); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; color: var(--ink-body); box-shadow: var(--sh-sm); }

/* ========================================================================
   LANDING
   ======================================================================== */
.landing { min-height: 100vh; }

.nav { position: sticky; top: 0; z-index: 40; background: rgba(248, 250, 252, 0.82); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-soft); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__link { font-weight: 600; font-size: 0.92rem; color: var(--ink-body); transition: color 0.15s; }
.nav__link:hover { color: var(--navy); }

.alert { display: flex; align-items: center; gap: 0.7rem; margin: 1rem 0 0; padding: 0.85rem 1.1rem; border-radius: var(--r); background: color-mix(in srgb, var(--red) 8%, #fff); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); color: var(--red-deep); font-weight: 500; }
.alert__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }

/* hero */
.hero { padding: clamp(2.4rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 340px at 88% -8%, rgba(30, 58, 95, 0.10), transparent 62%),
    radial-gradient(560px 300px at 4% 8%, rgba(192, 48, 61, 0.07), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero__title { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 800; margin: 0.9rem 0 0; }
.hero__lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--ink-body); margin: 1.1rem 0 0; max-width: 34ch; }
.hero__cta { display: flex; gap: 0.8rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero__meta { display: flex; gap: 0.55rem; margin-top: 1.6rem; flex-wrap: wrap; }

/* hero preview card */
.hero__card { perspective: 1400px; }
.preview {
  background: var(--s0); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); overflow: hidden; transform: rotateY(-6deg) rotateX(2deg); transform-style: preserve-3d;
}
.preview__bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 0.9rem; background: var(--navy-deep); }
.preview__dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.preview__title { margin-left: auto; font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.preview__body { display: grid; grid-template-columns: 118px 1fr; min-height: 260px; }
.preview__rail { background: linear-gradient(180deg, #0e2746, #13426b); padding: 0.7rem 0.5rem; display: flex; flex-direction: column; gap: 0.28rem; }
.preview__mod { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.4rem; border-radius: 8px; }
.preview__mod.is-on { background: rgba(255, 255, 255, 0.12); }
.preview__moddot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.preview__mod.is-on .preview__moddot { background: var(--red-soft); }
.preview__modt { font-size: 0.66rem; color: rgba(255, 255, 255, 0.82); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview__main { padding: 1.1rem; }
.preview__ey { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-deep); }
.preview__main h4 { font-size: 1.12rem; margin: 0.35rem 0 0.9rem; }
.preview__lines { display: flex; flex-direction: column; gap: 0.5rem; }
.preview__lines span { height: 8px; border-radius: 4px; background: var(--s3); }
.preview__lines span.short { width: 55%; }
.preview__chipRow { display: flex; gap: 0.4rem; margin-top: 1rem; }
.preview__chip { font-size: 0.66rem; font-weight: 700; padding: 0.28rem 0.55rem; border-radius: 999px; background: var(--s2); color: var(--navy); }

/* value band */
.band { padding: clamp(1.5rem, 4vw, 2.6rem) 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--s0); }
.band__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.vcard { position: relative; padding: 1.4rem 1.4rem 1.4rem; border-radius: var(--r); }
.vcard__n { font-family: var(--font-display); font-weight: 800; font-size: 0.9rem; color: var(--red); }
.vcard h3 { font-size: 1.2rem; margin: 0.5rem 0 0.4rem; }
.vcard p { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }

/* sections */
.section { padding: clamp(2.4rem, 6vw, 4.5rem) 0; }
.section--tint { background: linear-gradient(180deg, var(--s2), var(--s0)); }
.section__head { max-width: 640px; margin: 0 auto 2.4rem; text-align: center; }
.section__title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; margin: 0.6rem 0 0; }
.section__lede { color: var(--ink-muted); font-size: 1.05rem; margin: 0.8rem 0 0; }

/* curriculum */
.curric { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.ccard {
  display: flex; flex-direction: column; background: var(--s0); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.3rem; transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s; box-shadow: var(--sh-sm);
  position: relative; overflow: hidden;
}
.ccard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line-strong); }
.ccard__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.ccard__num { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--s3); -webkit-text-stroke: 1px var(--line-strong); }
.ccard__tag { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-deep); background: color-mix(in srgb, var(--red) 8%, #fff); padding: 0.28rem 0.6rem; border-radius: 999px; }
.ccard__title { font-size: 1.16rem; margin: 0 0 0.4rem; }
.ccard__sum { color: var(--ink-muted); font-size: 0.9rem; margin: 0; flex: 1; }
.ccard__foot { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line-soft); font-size: 0.82rem; font-weight: 600; color: var(--ink-muted); }
.ccard__count { color: var(--navy); }

/* proof */
.proof { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.proof__list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 1rem; }
.proof__li { display: grid; gap: 0.15rem; padding-left: 1.2rem; position: relative; }
.proof__li::before { content: ''; position: absolute; left: 0; top: 0.55rem; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.proof__li strong { color: var(--ink); font-size: 1.02rem; }
.proof__li span { color: var(--ink-muted); font-size: 0.92rem; }
.proof__stat { display: grid; gap: 1rem; }
.statbig { background: var(--navy-deep); color: #fff; border-radius: var(--r); padding: 1.4rem; box-shadow: var(--sh-navy); }
.statbig__num { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; display: block; color: var(--gold); }
.statbig__label { color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; }

/* resources teaser */
.reslist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.9rem; }
.rescard { display: flex; align-items: center; gap: 0.9rem; background: var(--s0); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--sh-sm); }
.rescard__ic { display: grid; place-content: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--navy) 8%, #fff); color: var(--navy); font-size: 1.1rem; flex: none; }
.rescard h4 { font-size: 0.98rem; margin: 0 0 0.15rem; font-family: var(--font); font-weight: 700; color: var(--ink); }
.rescard p { margin: 0; font-size: 0.84rem; color: var(--ink-muted); }
.rescard__tag { margin-left: auto; font-size: 0.68rem; font-weight: 700; color: var(--mint); background: color-mix(in srgb, var(--mint) 12%, #fff); padding: 0.25rem 0.55rem; border-radius: 999px; white-space: nowrap; }

/* final cta */
.cta-final { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta-final__box {
  text-align: center; background: linear-gradient(160deg, #0c2740 0%, #13426b 64%, #2a5e8b 100%);
  color: #fff; border-radius: var(--r-xl); padding: clamp(2.2rem, 5vw, 3.6rem);
  box-shadow: var(--sh-lg); position: relative; overflow: hidden;
}
.cta-final__box::before { content: ''; position: absolute; inset: 0; background: radial-gradient(500px 200px at 80% 0%, rgba(231,180,69,0.16), transparent 60%); pointer-events: none; }
.cta-final__box h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cta-final__box p { color: rgba(255, 255, 255, 0.8); margin: 0.8rem auto 1.6rem; max-width: 46ch; }
.cta-final .btn--primary { position: relative; }
.fineprint { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); margin-top: 1rem; }

/* not-a-student gate */
.gate { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.gate__box { max-width: 620px; margin: 0 auto; text-align: center; background: var(--s0); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.2rem); box-shadow: var(--sh-lg); }
.gate__ic { font-size: 3rem; line-height: 1; display: block; margin-bottom: 0.8rem; }
.gate__title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
.gate__lede { color: var(--ink-body); font-size: 1.04rem; margin: 0.9rem 0 0; }
.gate__cta { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.gate__fine { font-size: 0.85rem; color: var(--ink-muted); margin: 1.4rem 0 0; }
.gate__fine a { color: var(--navy); font-weight: 600; text-decoration: underline; }

/* footer */
.foot { border-top: 1px solid var(--line-soft); padding: 2rem 0 3rem; background: var(--s0); }
.foot__inner { display: flex; flex-direction: column; gap: 0.8rem; align-items: center; text-align: center; }
.foot__brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--ink); }
.foot__legal { font-size: 0.8rem; color: var(--ink-faint); max-width: 62ch; margin: 0; }

/* ========================================================================
   COURSE APP
   ======================================================================== */
.app { display: grid; grid-template-columns: var(--rail-w) 1fr; height: 100vh; }
.scrim { display: none; }

/* rail — the JHB aurora-navy signature */
.rail {
  position: relative; overflow: hidden auto; display: flex; flex-direction: column;
  background:
    radial-gradient(circle 380px at 92% 0%, rgba(96, 165, 250, 0.20), transparent 60%),
    radial-gradient(circle 320px at 8% 100%, rgba(168, 50, 60, 0.18), transparent 60%),
    radial-gradient(circle 240px at 50% 50%, rgba(167, 139, 250, 0.09), transparent 65%),
    linear-gradient(180deg, #081a30 0%, #0e2746 35%, #13426b 70%, #1a4f7b 100%);
  box-shadow: 18px 0 44px rgba(15, 23, 42, 0.18);
  border-right: 1px solid rgba(148, 163, 184, 0.10);
}
.rail__top { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.1rem 0.6rem; }
/* On the dark rail the chip blends in — make it a subtle glass panel, tag gold. */
.rail__top .brand__chip { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.10); box-shadow: none; }
.rail__top .brand__tag { color: var(--gold); }
.rail__close { display: none; background: rgba(255, 255, 255, 0.08); border: none; color: #fff; width: 34px; height: 34px; border-radius: 9px; align-items: center; justify-content: center; }
.rail__close svg { width: 18px; height: 18px; }

.rail__prog { display: flex; align-items: center; gap: 0.8rem; margin: 0.4rem 1.1rem 0.9rem; padding: 0.8rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r); }
.rail__progmeta { display: flex; flex-direction: column; }
.rail__proglabel { color: #fff; font-weight: 700; font-size: 0.92rem; }
.rail__progsub { color: rgba(255, 255, 255, 0.6); font-size: 0.78rem; }

.rail__nav { flex: 1; padding: 0 0.7rem 0.7rem; }
.railmod { margin-bottom: 0.2rem; }
.railmod__head {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
  background: transparent; border: none; color: #dbe4f0; padding: 0.55rem 0.5rem; border-radius: 10px;
}
.railmod__head:hover { background: rgba(148, 163, 184, 0.10); }
.railmod__meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.railmod__tag { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.railmod__title { font-size: 0.86rem; font-weight: 600; color: #eef4fb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.railmod__chev { margin-left: auto; color: rgba(255, 255, 255, 0.5); display: inline-flex; transition: transform 0.2s; }
.railmod__chev svg { width: 16px; height: 16px; }
.railmod.is-collapsed .railmod__chev { transform: rotate(-90deg); }
.raillessons { list-style: none; margin: 0.15rem 0 0.4rem; padding: 0; display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.25s ease; }
.railmod.is-collapsed .raillessons { grid-template-rows: 0fr; }
.raillessons > li { min-height: 0; overflow: hidden; }
.raillesson {
  position: relative; display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.6rem 0.5rem 1.5rem;
  border-radius: 8px; color: rgba(226, 232, 240, 0.82); font-size: 0.85rem; margin: 1px 0;
}
.raillesson::before { content: ''; position: absolute; left: 0.55rem; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--red); transform: scaleY(0); transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1); }
.raillesson:hover { background: rgba(148, 163, 184, 0.12); color: #fff; }
.raillesson:hover::before { transform: scaleY(0.7); }
.raillesson.is-active { background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(30, 58, 95, 0.30)); color: #fff; }
.raillesson.is-active::before { transform: scaleY(1); }
.raillesson__tick { width: 16px; height: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.25); color: transparent; }
.raillesson__tick svg { width: 11px; height: 11px; }
.raillesson.is-done .raillesson__tick { background: var(--green); border-color: var(--green); color: #fff; }
.raillesson__t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raillesson__min { font-size: 0.72rem; color: rgba(255, 255, 255, 0.4); }

.rail__foot { display: flex; gap: 1rem; padding: 0.9rem 1.3rem 1.3rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.rail__footlink { font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.rail__footlink:hover { color: #fff; }

/* rings */
.ring-wrap { display: inline-flex; flex: none; }
.ring__bg { stroke: rgba(148, 163, 184, 0.25); }
.ring__fg { stroke: var(--gold); transition: stroke-dashoffset 0.5s ease; }
.ring__txt { font-family: var(--font); font-weight: 800; font-size: 12px; fill: #fff; }
.railmod__head .ring__fg { stroke: var(--red-soft); }
.railmod__head .ring__bg { stroke: rgba(255, 255, 255, 0.18); }

/* main column */
.app__main { display: flex; flex-direction: column; min-width: 0; height: 100vh; background: var(--s2); }
.topbar { display: flex; align-items: center; gap: 1rem; height: 62px; padding: 0 clamp(1rem, 3vw, 2rem); background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); flex: none; z-index: 5; }
.topbar__menu { display: none; background: var(--s2); border: 1px solid var(--line); border-radius: 9px; width: 38px; height: 38px; align-items: center; justify-content: center; color: var(--ink); }
.topbar__menu svg { width: 20px; height: 20px; }
.topbar__crumb { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.topbar__tag { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-deep); }
.topbar__sep { color: var(--ink-faint); }
.topbar__now { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__right { margin-left: auto; }
.topbar__user { display: flex; align-items: center; gap: 0.6rem; }
.topbar__name { font-size: 0.9rem; font-weight: 600; color: var(--ink-body); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--sh-sm); }
.avatar--init { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); color: #fff; font-weight: 700; }

/* reader */
.reader { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.lesson { max-width: 780px; margin: 0 auto; padding: clamp(1.6rem, 4vw, 3rem) clamp(1.1rem, 4vw, 2rem) 5rem; }
.lesson__head { margin-bottom: 1.8rem; }
.lesson__eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-deep); }
.lesson__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 0.5rem 0 0; }
.lesson__facts { display: flex; gap: 1.1rem; margin-top: 0.9rem; flex-wrap: wrap; }
.lesson__fact { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--ink-muted); font-weight: 600; }
.lesson__fact svg { width: 15px; height: 15px; }
.lesson__fact--done { color: var(--green); }
.objective { display: grid; gap: 0.2rem; margin-top: 1.4rem; padding: 1rem 1.2rem; background: color-mix(in srgb, var(--navy) 5%, #fff); border: 1px solid color-mix(in srgb, var(--navy) 22%, transparent); border-radius: var(--r); }
.objective__label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); }
.objective__text { margin: 0; color: var(--ink-body); font-weight: 500; }

/* lesson body blocks */
.lesson__body > * + * { margin-top: 1.15rem; }
.lp { font-size: 1.04rem; color: var(--ink-body); margin: 0; }
.lp em { color: var(--ink); font-style: italic; }
.lh { font-size: 1.4rem; font-weight: 700; margin-top: 2rem; padding-top: 0.4rem; }
.lh3 { font-size: 1.12rem; font-weight: 700; color: var(--ink); margin-top: 1.4rem; }
.llist { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; color: var(--ink-body); }
.llist li { padding-left: 0.2rem; }
.llist li::marker { color: var(--red); }
.llist--ord li::marker { font-weight: 700; color: var(--navy); }

/* steps */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.step { display: flex; gap: 0.9rem; background: var(--s0); border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem 1.1rem; box-shadow: var(--sh-sm); }
.step__n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); color: #fff; font-weight: 700; font-size: 0.9rem; display: inline-flex; align-items: center; justify-content: center; }
.step__body { display: grid; gap: 0.1rem; }
.step__t { color: var(--ink); font-size: 1rem; }
.step__d { color: var(--ink-muted); font-size: 0.94rem; }

/* callouts */
.callout { display: flex; gap: 0.8rem; padding: 1rem 1.2rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--s0); box-shadow: var(--sh-sm); }
.callout__ic { flex: none; font-size: 1.15rem; display: inline-flex; }
.callout__ic svg { width: 20px; height: 20px; }
.callout__title { display: block; margin-bottom: 0.2rem; color: var(--ink); }
.callout__body { color: var(--ink-body); font-size: 0.96rem; }
.callout--tip { background: color-mix(in srgb, var(--navy) 5%, #fff); border-color: color-mix(in srgb, var(--navy) 22%, transparent); }
.callout--tip .callout__ic { color: var(--navy); }
.callout--key { background: color-mix(in srgb, var(--gold) 12%, #fff); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.callout--key .callout__ic { color: #b0870f; }
.callout--warn { background: color-mix(in srgb, var(--red) 7%, #fff); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.callout--warn .callout__ic { color: var(--red-deep); }

/* script cards */
.scriptcard { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-sm); background: var(--s0); }
.scriptcard__head { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.9rem; background: var(--navy-deep); }
.scriptcard__label { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.scriptcard__title { font-size: 0.85rem; font-weight: 600; color: rgba(255, 255, 255, 0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scriptcard__copy { margin-left: auto; display: inline-flex; align-items: center; gap: 0.35rem; background: rgba(255, 255, 255, 0.12); color: #fff; border: none; border-radius: 999px; padding: 0.3rem 0.7rem; font-size: 0.76rem; font-weight: 600; }
.scriptcard__copy svg { width: 13px; height: 13px; }
.scriptcard__copy:hover { background: rgba(255, 255, 255, 0.22); }
.scriptcard__copy.is-copied { background: var(--green); }
.scriptcard__body { padding: 1rem 1.1rem; font-size: 0.95rem; color: var(--ink-body); background: var(--s1); font-family: var(--font); line-height: 1.7; }

/* table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); }
.ltable { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 420px; }
.ltable th { text-align: left; background: var(--s2); color: var(--ink); font-weight: 700; padding: 0.7rem 0.95rem; border-bottom: 1px solid var(--line); }
.ltable td { padding: 0.7rem 0.95rem; border-bottom: 1px solid var(--line-soft); color: var(--ink-body); vertical-align: top; }
.ltable tr:last-child td { border-bottom: none; }
.ltable tr:nth-child(even) td { background: var(--s1); }

/* quote / kpi */
.pullquote { margin: 0; padding: 1rem 1.4rem; border-left: 4px solid var(--red); background: var(--s1); border-radius: 0 var(--r) var(--r) 0; font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; color: var(--ink); font-style: italic; }
.kpirow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; }
.kpi { background: var(--navy-deep); color: #fff; border-radius: var(--r); padding: 1.1rem 1.2rem; box-shadow: var(--sh-navy); }
.kpi__v { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--gold); }
.kpi__l { display: block; color: rgba(255, 255, 255, 0.78); font-size: 0.86rem; margin-top: 0.3rem; }

/* panels */
.panel { margin-top: 2rem; padding: 1.4rem 1.5rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s0); box-shadow: var(--sh-sm); }
.panel__title { display: flex; align-items: center; gap: 0.55rem; font-size: 1.15rem; font-weight: 700; margin: 0 0 1rem; }
.panel__title svg { width: 20px; height: 20px; }
.panel--key { background: color-mix(in srgb, var(--gold) 8%, #fff); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.panel--key .panel__title { color: #96710a; }
.takeaways { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.takeaways li { position: relative; padding-left: 1.7rem; color: var(--ink-body); }
.takeaways li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.panel--do { background: color-mix(in srgb, var(--red) 4%, #fff); border-color: color-mix(in srgb, var(--red) 22%, transparent); }
.panel--do .panel__title { color: var(--red-deep); }
.actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.actions li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-body); }
.actions__box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--red); margin-top: 1px; }

/* resource downloads */
.panel--res .panel__title { color: var(--navy); }
.resgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.7rem; }
.resdl { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--s1); transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s; }
.resdl:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--navy); }
.resdl__ic { flex: none; display: grid; place-content: center; width: 38px; height: 38px; border-radius: 9px; background: color-mix(in srgb, var(--mint) 12%, #fff); color: var(--mint); font-size: 1.05rem; }
.resdl__meta { display: grid; min-width: 0; }
.resdl__meta strong { font-size: 0.92rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resdl__kind { font-size: 0.74rem; color: var(--ink-muted); }
.resdl__dl { margin-left: auto; color: var(--navy); display: inline-flex; }
.resdl__dl svg { width: 18px; height: 18px; }

/* quiz */
.panel--quiz .panel__title { color: var(--navy); }
.quizq { margin-bottom: 1.2rem; }
.quizq__q { font-weight: 600; color: var(--ink); margin: 0 0 0.7rem; }
.quizq__opts { display: grid; gap: 0.5rem; }
.quizopt { display: flex; align-items: center; gap: 0.7rem; text-align: left; width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--s0); color: var(--ink-body); font-size: 0.95rem; transition: border-color 0.15s, background 0.15s; }
.quizopt:hover:not(:disabled) { border-color: var(--navy); background: var(--s1); }
.quizopt__mk { flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--s2); color: var(--ink-muted); font-weight: 700; font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; }
.quizopt.is-picked { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 6%, #fff); }
.quizopt.is-picked .quizopt__mk { background: var(--navy); color: #fff; }
.quizopt.is-right { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, #fff); }
.quizopt.is-right .quizopt__mk { background: var(--green); color: #fff; }
.quizopt.is-wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, #fff); }
.quizopt.is-wrong .quizopt__mk { background: var(--red); color: #fff; }
.quizopt:disabled { cursor: default; }
.quizq__fb { display: none; margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-muted); padding-left: 0.2rem; }
.quizq__fb.is-shown { display: block; }
.quizq__fb .ok { color: var(--green); font-weight: 700; }
.quizq__fb .no { color: var(--red-deep); font-weight: 700; }
.quiz__foot { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; flex-wrap: wrap; }
.quizresult { display: none; font-size: 0.95rem; color: var(--ink-body); }
.quizresult.is-shown { display: block; }
.quizresult.is-pass { color: var(--green); }
.quizresult.is-fail { color: var(--red-deep); }

/* complete + nav */
.completebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; padding: 1.2rem 1.4rem; background: var(--s0); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); flex-wrap: wrap; }
.completebar__hint { color: var(--ink-muted); font-size: 0.92rem; }
.completebar .btn svg { width: 17px; height: 17px; }
.lessonnav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }
.lessonnav__btn { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.9rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--s0); max-width: 48%; box-shadow: var(--sh-sm); transition: border-color 0.15s, transform 0.15s; }
.lessonnav__btn:hover { border-color: var(--navy); transform: translateY(-2px); }
.lessonnav__btn--next { text-align: right; margin-left: auto; }
.lessonnav__dir { font-size: 0.74rem; font-weight: 700; color: var(--red-deep); text-transform: uppercase; letter-spacing: 0.05em; }
.lessonnav__t { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__card { display: none; }
  .band__grid { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav__links .nav__link { display: none; }
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--rail-w)); z-index: 60;
    transform: translateX(-100%); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .rail-open .rail { transform: translateX(0); }
  .rail__close { display: inline-flex; }
  .topbar__menu { display: inline-flex; }
  .topbar__name { display: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 55; }
  .rail-open .scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .lessonnav__btn { max-width: 100%; flex: 1; }
  .completebar { flex-direction: column; align-items: stretch; }
  .completebar .btn { width: 100%; }
}

/* ========================================================================
   ENGAGEMENT — stat chips, celebrations, notes, highlighter, breaks, profile
   ======================================================================== */

/* topbar stat cluster */
.topbar__right { display: flex; align-items: center; gap: 0.55rem; margin-left: auto; }
.statchip { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); background: var(--s0); border-radius: 999px; padding: 0.32rem 0.55rem; box-shadow: var(--sh-sm); transition: transform 0.12s, box-shadow 0.15s; }
.statchip:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.statchip--xp { padding-left: 0.5rem; }
.statchip__lvl { font-size: 0.74rem; font-weight: 800; color: var(--navy); }
.statchip__bar { width: 46px; height: 6px; border-radius: 999px; background: var(--s3); overflow: hidden; }
.statchip__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #f0c862); transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.statchip--streak { font-weight: 800; color: var(--ink-muted); font-size: 0.82rem; }
.statchip--streak.is-hot { color: var(--red-deep); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.statchip__n { font-variant-numeric: tabular-nums; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--s0); color: var(--ink-body); box-shadow: var(--sh-sm); }
.bell:hover { background: var(--s1); }
.bell svg { width: 18px; height: 18px; }
.bell__count { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.64rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--s0); }
.topbar__user { display: flex; align-items: center; gap: 0.5rem; background: none; border: none; padding: 0.2rem; border-radius: 999px; }
.topbar__user:hover { background: var(--s2); }

/* popovers (notification center) */
.popover { position: fixed; z-index: 250; width: min(340px, calc(100vw - 16px)); background: var(--s0); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg); overflow: hidden; animation: pop-in 0.16s ease; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.popover__head { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line-soft); }
.popover__clear { background: none; border: none; color: var(--ink-muted); font-size: 0.8rem; font-weight: 600; }
.popover__clear:hover { color: var(--red-deep); }
.popover__empty { padding: 1.6rem 1rem; text-align: center; color: var(--ink-muted); }
.notiflist { max-height: 60vh; overflow-y: auto; }
.notif { display: flex; gap: 0.7rem; width: 100%; text-align: left; background: none; border: none; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line-soft); }
.notif:hover { background: var(--s1); }
.notif.is-unread { background: color-mix(in srgb, var(--gold) 8%, #fff); }
.notif__ic { font-size: 1.1rem; flex: none; }
.notif__body { display: grid; gap: 0.1rem; min-width: 0; }
.notif__body strong { font-size: 0.9rem; color: var(--ink); }
.notif__sub { font-size: 0.82rem; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; }

/* confetti + overlays */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }
.overlay { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 1.2rem; background: rgba(9, 20, 34, 0.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.22s; }
.overlay.show { opacity: 1; }
.overlay.leaving { opacity: 0; }

/* celebration card */
.celebrate { position: relative; background: var(--s0); border-radius: var(--r-xl); padding: 2.4rem 2rem 1.8rem; text-align: center; max-width: 360px; box-shadow: var(--sh-lg); transform: scale(0.85); opacity: 0; animation: celebrate-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes celebrate-pop { to { transform: scale(1); opacity: 1; } }
.celebrate__burst { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%); pointer-events: none; }
.celebrate__icon { font-size: 3.4rem; line-height: 1; margin-bottom: 0.6rem; animation: badge-bounce 0.6s ease 0.2s both; }
@keyframes badge-bounce { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.2) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.celebrate__title { font-size: 1.6rem; font-weight: 800; }
.celebrate__sub { color: var(--ink-muted); margin: 0.5rem 0 1.4rem; }

/* 60-second break */
.overlay--break { background: linear-gradient(160deg, rgba(12, 39, 64, 0.92), rgba(30, 58, 95, 0.92)); backdrop-filter: blur(8px); }
.break { text-align: center; color: #fff; max-width: 380px; }
.break__eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.break__ring { position: relative; width: 190px; height: 190px; margin: 1.4rem auto; display: grid; place-items: center; }
.break__orb { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.28), rgba(255,255,255,0.06)); border: 2px solid rgba(255, 255, 255, 0.35); }
.break__orb.breathe { animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.72); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }
.break__count { position: relative; font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.break__tip { color: rgba(255, 255, 255, 0.86); margin: 0 0 1.4rem; }
.overlay--break .btn--ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.25); }

/* floating XP + mini toasts */
.xp-toasts, .mini-toasts { position: fixed; z-index: 400; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; pointer-events: none; }
.xp-toast { background: linear-gradient(135deg, var(--gold), #f0c862); color: #4a3400; font-weight: 800; font-size: 0.9rem; padding: 0.5rem 0.9rem; border-radius: 999px; box-shadow: var(--sh-md); opacity: 0; transform: translateY(10px) scale(0.9); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s; }
.xp-toast.go { opacity: 1; transform: translateY(0) scale(1); }
.mini-toast { background: var(--navy-deep); color: #fff; font-weight: 600; font-size: 0.85rem; padding: 0.55rem 0.95rem; border-radius: 999px; box-shadow: var(--sh-md); opacity: 0; transform: translateY(10px); transition: transform 0.3s, opacity 0.3s; }
.mini-toast.go { opacity: 1; transform: translateY(0); }

/* study-tools bar */
.toolsbar { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); background: var(--s0); border-radius: 999px; padding: 0.4rem 0.8rem; font-size: 0.84rem; font-weight: 600; color: var(--ink-body); box-shadow: var(--sh-sm); transition: transform 0.12s, border-color 0.15s, background 0.15s; }
.tool:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.tool svg { width: 15px; height: 15px; }
.tool.is-on { background: color-mix(in srgb, var(--navy) 8%, #fff); border-color: var(--navy); color: var(--navy); }
.tool__lbl { font-weight: 700; }

/* highlighter marks + toolbar */
.hl { border-radius: 3px; padding: 0.05em 0.1em; cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hl--yellow { background: color-mix(in srgb, var(--gold) 45%, #fff); }
.hl--mint { background: color-mix(in srgb, var(--mint) 34%, #fff); }
.hl--pink { background: color-mix(in srgb, var(--red) 24%, #fff); }
.hl:hover { filter: brightness(0.95); }
.hl-toolbar { position: absolute; z-index: 350; display: flex; align-items: center; gap: 0.35rem; background: var(--navy-deep); border-radius: 999px; padding: 0.35rem 0.5rem; box-shadow: var(--sh-lg); animation: pop-in 0.14s ease; }
.hl-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); cursor: pointer; }
.hl-dot--yellow { background: var(--gold); }
.hl-dot--mint { background: var(--mint); }
.hl-dot--pink { background: var(--red-soft); }
.hl-dot:hover { transform: scale(1.12); }
.hl-note { background: rgba(255, 255, 255, 0.14); color: #fff; border: none; border-radius: 999px; padding: 0.25rem 0.7rem; font-size: 0.76rem; font-weight: 700; }
.hl-note:hover { background: rgba(255, 255, 255, 0.26); }

/* drawer (notes + profile) */
.drawer-overlay { position: fixed; inset: 0; z-index: 270; background: rgba(9, 20, 34, 0.5); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.26s; display: flex; justify-content: flex-end; }
.drawer-overlay.show { opacity: 1; }
.drawer { width: min(420px, 100vw); max-width: 100vw; height: 100%; background: var(--s1); box-shadow: var(--sh-lg); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.drawer-overlay.show .drawer { transform: translateX(0); }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.2rem 1.3rem; border-bottom: 1px solid var(--line); background: var(--s0); }
.drawer__title { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.drawer__sub { display: block; font-size: 0.82rem; color: var(--ink-muted); }
.drawer__close { background: var(--s2); border: none; width: 34px; height: 34px; border-radius: 9px; color: var(--ink-body); display: grid; place-items: center; }
.drawer__close:hover { background: var(--s3); }
.drawer__close svg { width: 18px; height: 18px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1.2rem 1.3rem 2rem; }

/* notepad */
.notes__hint { font-size: 0.86rem; color: var(--ink-muted); margin: 0 0 0.8rem; }
.notes__ta { width: 100%; min-height: 44vh; resize: vertical; border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem 1rem; font-family: var(--font); font-size: 0.98rem; line-height: 1.6; color: var(--ink-body); background: var(--s0); }
.notes__ta:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 14%, transparent); }
.notes__foot { display: flex; justify-content: flex-end; margin-top: 0.6rem; }
.notes__save { font-size: 0.8rem; color: var(--green); font-weight: 600; min-height: 1.2em; }

/* profile tabs + lists */
.ptabs { display: flex; gap: 0.3rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ptab { background: none; border: none; padding: 0.55rem 0.7rem; font-size: 0.88rem; font-weight: 700; color: var(--ink-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.ptab.is-on { color: var(--navy); border-bottom-color: var(--red); }
.pempty { padding: 2rem 1rem; text-align: center; color: var(--ink-muted); }
.plist { display: grid; gap: 0.6rem; }
.pitem { display: flex; align-items: center; gap: 0.6rem; text-align: left; width: 100%; background: var(--s0); border: 1px solid var(--line); border-radius: var(--r); padding: 0.8rem 0.9rem; box-shadow: var(--sh-sm); }
.pitem:hover { border-color: var(--navy); }
.pitem strong { font-size: 0.92rem; color: var(--ink); display: block; }
.pitem__note { display: block; font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.pitem__ic { color: var(--gold); display: inline-flex; }
.pitem__ic svg { width: 16px; height: 16px; }
.pitem--hl { justify-content: space-between; }
.pitem__hlbtn { display: flex; gap: 0.6rem; align-items: flex-start; background: none; border: none; text-align: left; flex: 1; min-width: 0; }
.pitem__hltext { display: block; font-size: 0.9rem; color: var(--ink); }
.hl-swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; margin-top: 3px; }
.pitem__rm { background: none; border: none; color: var(--ink-faint); width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.pitem__rm:hover { background: var(--s2); color: var(--red-deep); }
.pitem__rm svg { width: 15px; height: 15px; }

/* level card + xp bar + flame + stats + badges */
.psection { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin: 1.6rem 0 0.8rem; }
.levelcard { background: linear-gradient(150deg, #0c2740, #1e3a5f); color: #fff; border-radius: var(--r-lg); padding: 1.3rem; box-shadow: var(--sh-navy); }
.levelcard__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.levelcard__lvl { display: flex; align-items: baseline; gap: 0.5rem; }
.levelcard__n { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; }
.levelcard__t { font-size: 0.9rem; font-weight: 700; color: var(--gold); }
.flame { display: flex; flex-direction: column; align-items: center; opacity: 0.55; }
.flame.is-hot { opacity: 1; }
.flame.is-hot .flame__ic { animation: flicker 1.8s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(3deg); } }
.flame__ic { font-size: 1.5rem; }
.flame__n { font-weight: 800; font-size: 1.1rem; }
.flame__l { font-size: 0.62rem; color: rgba(255, 255, 255, 0.7); }
.xpbar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.xpbar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #f4d27a); transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.levelcard__meta { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-top: 1rem; }
.pstat { background: var(--s0); border: 1px solid var(--line); border-radius: var(--r); padding: 0.7rem 0.4rem; text-align: center; }
.pstat__v { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--navy); }
.pstat__l { display: block; font-size: 0.66rem; color: var(--ink-muted); margin-top: 0.1rem; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; text-align: center; background: var(--s0); border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem 0.5rem; filter: grayscale(1); opacity: 0.5; transition: transform 0.15s; }
.badge.is-earned { filter: none; opacity: 1; border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 7%, #fff); }
.badge.is-earned:hover { transform: translateY(-2px); }
.badge__ic { font-size: 1.6rem; }
.badge__t { font-size: 0.7rem; font-weight: 700; color: var(--ink-body); line-height: 1.15; }

/* settings + switch */
.psettings { display: grid; gap: 0.4rem; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); }
.setting strong { display: block; font-size: 0.95rem; color: var(--ink); }
.setting__desc { display: block; font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.1rem; }
.setting--danger strong { color: var(--red-deep); }
.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track { position: absolute; inset: 0; border-radius: 999px; background: var(--s3); transition: background 0.2s; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform 0.2s; }
.switch input:checked + .switch__track { background: var(--green); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }

@media (max-width: 560px) {
  .statchip--xp .statchip__bar { display: none; }
  .topbar__name { display: none; }
  .pstats { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .break__orb.breathe { animation: none !important; }
}
