/* =====================================================================
   Student area lab: styles.
   Layout concept: the nurses' station. A dark shell frames a light work
   surface (02-BRAND.md "dark shell, light body"): a left rail on desktop,
   a top bar plus a bottom tab bar on a phone, the same shape a phone app
   would have, so these screens carry over to iPhone and Android.
   Colors are the live site's Brand+ values (shift-change shared.css) and
   02-BRAND.md; dark values are derived from them with color-mix, never
   invented. Every animation moves only transform, opacity or an SVG
   stroke offset, so it stays cheap on a slow laptop or phone.
   ===================================================================== */
:root {
  --font-head: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --fs: 1;                                   /* text size switch (A- / A+) */

  --bg: #F5F4FA; --surface: #FFFFFF; --surface-2: #FAF9FE; --sunk: #EFEDF7;
  --ink: #16112F; --ink-2: #2E2A4F; --muted: #5C6880;
  --line: rgba(22, 17, 47, .10); --line-2: rgba(22, 17, 47, .18);
  --shell: #171233; --shell-2: #221B4A; --shell-ink: #FFFFFF; --shell-muted: #B9B4DA; --shell-line: rgba(255, 255, 255, .10);
  --act: #6742F5; --act-deep: #4F2BE0; --act-tint: #EEEAFE; --act-ink: #FFFFFF;
  --act-fill: #6742F5; --act-fill-hover: #4F2BE0;   /* filled controls with white text (5.7:1) */
  --good: #12B886; --good-deep: #0A7C5A; --good-tint: #DDF7EE;
  --warn: #F2A516; --warn-deep: #976000; --warn-tint: #FEF1D6;
  --bad: #E2466B; --bad-deep: #B8284D; --bad-tint: #FDE6EC;
  --alt: #1FB1E0; --alt-deep: #0A7498; --alt-tint: #E1F5FC;
  --pop: #D9449A; --pop-deep: #B02C7B; --pop-tint: #FCE6F2;
  --series-1: #6742F5; --series-2: #0A7498;  /* validated pair (dataviz six checks, light) */
  --grid: rgba(22, 17, 47, .08); --axis: rgba(22, 17, 47, .24);
  --heat-0: #EFEDF7;
  --heat-1: color-mix(in oklab, #6742F5 18%, #FFFFFF);
  --heat-2: color-mix(in oklab, #6742F5 38%, #FFFFFF);
  --heat-3: color-mix(in oklab, #6742F5 62%, #FFFFFF);
  --heat-4: #6742F5;
  --monitor: #100A2A; --monitor-2: #1C1446; --m1: #3DDC97; --m2: #FF6FB0; --m3: #A58BFF; --m4: #FFC04D;
  --scrim: rgba(16, 10, 42, .46);
  --shadow: 0 1px 2px rgba(22, 17, 47, .05), 0 10px 28px -14px rgba(22, 17, 47, .22);
  --shadow-lift: 0 2px 4px rgba(22, 17, 47, .06), 0 18px 40px -16px rgba(22, 17, 47, .28);
  --btn-shadow: 0 8px 20px -8px rgba(103, 66, 245, .55);
  --r: 16px; --r-sm: 12px; --r-xs: 8px;
  --spring: cubic-bezier(.34, 1.56, .64, 1); --out: cubic-bezier(.16, 1, .3, 1);
  --top-h: 56px; --tab-h: 64px; --rail-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100A2A; --surface: #171233; --surface-2: #1C1640; --sunk: #0C0822;
    --ink: #F3F1FF; --ink-2: #D6D1F5; --muted: #A39FC4;
    --line: rgba(255, 255, 255, .10); --line-2: rgba(255, 255, 255, .18);
    --shell: #0C0822; --shell-2: #1C1640;
    --act: #8B6BFF; --act-deep: color-mix(in oklab, #8B6BFF 62%, #FFFFFF); --act-tint: color-mix(in oklab, #8B6BFF 20%, #171233);
    --good: #3DDC97; --good-deep: #3DDC97; --good-tint: color-mix(in oklab, #3DDC97 16%, #171233);
    --warn: #FFC04D; --warn-deep: #FFC04D; --warn-tint: color-mix(in oklab, #FFC04D 15%, #171233);
    --bad: #E2466B; --bad-deep: color-mix(in oklab, #E2466B 65%, #FFFFFF); --bad-tint: color-mix(in oklab, #E2466B 20%, #171233);
    --alt: #1FB1E0; --alt-deep: color-mix(in oklab, #1FB1E0 70%, #FFFFFF); --alt-tint: color-mix(in oklab, #1FB1E0 18%, #171233);
    --pop: #FF6FB0; --pop-deep: color-mix(in oklab, #FF6FB0 70%, #FFFFFF); --pop-tint: color-mix(in oklab, #FF6FB0 18%, #171233);
    --series-1: #8B6BFF; --series-2: #18A0CD;  /* validated pair (dark) */
    --grid: rgba(255, 255, 255, .08); --axis: rgba(255, 255, 255, .26);
    --heat-0: #1F1948;
    --heat-1: color-mix(in oklab, #8B6BFF 30%, #171233);
    --heat-2: color-mix(in oklab, #8B6BFF 52%, #171233);
    --heat-3: color-mix(in oklab, #8B6BFF 76%, #171233);
    --heat-4: color-mix(in oklab, #8B6BFF 82%, #FFFFFF);
    --monitor: #0A0620; --monitor-2: #150F38;
    --scrim: rgba(4, 2, 16, .62);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px -16px rgba(0, 0, 0, .6);
    --btn-shadow: 0 8px 20px -8px rgba(139, 107, 255, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #100A2A; --surface: #171233; --surface-2: #1C1640; --sunk: #0C0822;
  --ink: #F3F1FF; --ink-2: #D6D1F5; --muted: #A39FC4;
  --line: rgba(255, 255, 255, .10); --line-2: rgba(255, 255, 255, .18);
  --shell: #0C0822; --shell-2: #1C1640;
  --act: #8B6BFF; --act-deep: color-mix(in oklab, #8B6BFF 62%, #FFFFFF); --act-tint: color-mix(in oklab, #8B6BFF 20%, #171233);
  --good: #3DDC97; --good-deep: #3DDC97; --good-tint: color-mix(in oklab, #3DDC97 16%, #171233);
  --warn: #FFC04D; --warn-deep: #FFC04D; --warn-tint: color-mix(in oklab, #FFC04D 15%, #171233);
  --bad: #E2466B; --bad-deep: color-mix(in oklab, #E2466B 65%, #FFFFFF); --bad-tint: color-mix(in oklab, #E2466B 20%, #171233);
  --alt: #1FB1E0; --alt-deep: color-mix(in oklab, #1FB1E0 70%, #FFFFFF); --alt-tint: color-mix(in oklab, #1FB1E0 18%, #171233);
  --pop: #FF6FB0; --pop-deep: color-mix(in oklab, #FF6FB0 70%, #FFFFFF); --pop-tint: color-mix(in oklab, #FF6FB0 18%, #171233);
  --series-1: #8B6BFF; --series-2: #18A0CD;
  --grid: rgba(255, 255, 255, .08); --axis: rgba(255, 255, 255, .26);
  --heat-0: #1F1948;
  --heat-1: color-mix(in oklab, #8B6BFF 30%, #171233);
  --heat-2: color-mix(in oklab, #8B6BFF 52%, #171233);
  --heat-3: color-mix(in oklab, #8B6BFF 76%, #171233);
  --heat-4: color-mix(in oklab, #8B6BFF 82%, #FFFFFF);
  --monitor: #0A0620; --monitor-2: #150F38;
  --scrim: rgba(4, 2, 16, .62);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px -16px rgba(0, 0, 0, .6);
  --btn-shadow: 0 8px 20px -8px rgba(139, 107, 255, .55);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { font-size: calc(100% * var(--fs)); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font-body);
  font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
a { color: var(--act-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--act); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.sr:focus { position: fixed !important; z-index: 100; left: 12px; top: 12px; width: auto; height: auto; clip: auto; padding: 10px 14px; border-radius: 10px; background: var(--surface); color: var(--act-deep); box-shadow: var(--shadow-lift); font-weight: 700; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-head); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--act-deep); }
sup.r { font-size: .55em; vertical-align: .55em; margin-left: .04em; font-weight: 600; }
svg { display: block; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 24px; height: 24px; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; }
.rail { display: none; }
/* phone and tablet: the sign-in pages' floating pill bar (W2's look; the owner's walkthrough, W27: no dark band), 12 px in, light by day with the coloured mark, dark by night with the white one; the computer's bar below is unchanged */
/* R110 (22 Nov 2026, the owner's walkthrough: "a little crop", the title should "pop out more"): the pill is solid, and a
   strip of page colour sits behind it (the 12 px gap and the sides, fading out 16 px below), so the page never shows
   through or around the title; both are pseudo-elements because a child drawn behind the bar paints over its background */
.topbar { --tb-bar: #FFFFFF; --tb-ring: rgba(255, 255, 255, .7); --tb-shadow: 0 10px 30px -14px rgba(22, 17, 47, .25);
  --tb-day: block; --tb-night: none; --shell-ink: var(--ink); --shell-2: var(--sunk);
  position: sticky; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 30; display: flex; align-items: center; gap: 12px;
  height: var(--top-h); margin: 12px 12px 0; padding: 0 10px 0 16px; border-radius: 999px;
  background: transparent; color: var(--shell-ink); box-shadow: none; }
.topbar::before { content: ""; position: absolute; z-index: -2; left: -12px; right: -12px; top: calc(-12px - env(safe-area-inset-top, 0px)); bottom: -16px;
  background: linear-gradient(to bottom, var(--bg) calc(100% - 16px), transparent); pointer-events: none; }
.topbar::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: 999px; background: var(--tb-bar);
  box-shadow: inset 0 0 0 1px var(--tb-ring), var(--tb-shadow); pointer-events: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar { --tb-bar: #171233; --tb-ring: rgba(255, 255, 255, .12);
    --tb-shadow: 0 10px 30px -14px rgba(0, 0, 0, .5); --tb-day: none; --tb-night: block; --shell-2: #1C1640; }
}
:root[data-theme="dark"] .topbar { --tb-bar: #171233; --tb-ring: rgba(255, 255, 255, .12);
  --tb-shadow: 0 10px 30px -14px rgba(0, 0, 0, .5); --tb-day: none; --tb-night: block; --shell-2: #1C1640; }
.topbar .mark { height: 22px; width: auto; flex: none; }
.topbar .mk-day { display: var(--tb-day); }
.topbar .mk-night { display: var(--tb-night); }
.topbar .ttl { font-family: var(--font-head); font-weight: 800; font-size: 1rem; letter-spacing: -.015em; flex: 1; min-width: 0; line-height: 1.15;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: var(--ink); }
.topbar .ttl.long { font-size: .875rem; line-height: 1.1; }   /* up to three lines on a phone, so "Practice Computerized Adaptive Test (CAT)" shows in full (owner, 14 Oct 2026) */
/* the page's sidebar tile before the title (R110): a copy of the rail link's icon, coloured as the rail colours it; the
   copy is made by lab.js / the site's area.js (data-tile = the page); no rail link, no tile */
.topbar .tb-ico { width: 28px; height: 28px; padding: 6px; box-sizing: border-box; border-radius: 9px; stroke-width: 2.2; flex: none;
  background: #8B6BFF; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); margin-right: -2px; animation: tb-pop .28s var(--spring) both; }
.topbar .tb-ico:is([data-tile="practice"], [data-tile="flashcards"]) { background: #D9449A; }
.topbar .tb-ico:is([data-tile="progress"], [data-tile="cat"]) { background: #12B886; }
.topbar .tb-ico:is([data-tile="review"], [data-tile="account"]) { background: #F2A516; }
.topbar .tb-ico:is([data-tile="plan"], [data-tile="study-plan"]) { background: #1FB1E0; }
@keyframes tb-pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
/* a title that does not fit beside the tools (a 360 px phone, the wide "Set exam date" chip): lab.js / area.js add these
   one at a time until it fits: the old 14 px, then no tile, then 13 px, then a fourth line; phones and tablets here (a
   computer's steps are in its own block below, R128) */
@media (max-width: 1023.98px) {
  .topbar.fit-1 .ttl { font-size: .875rem; }
  .topbar.fit-2 .tb-ico { display: none; }
  .topbar.fit-3 .ttl { font-size: .8125rem; letter-spacing: -.02em; }
  /* last: the Practice CAT's full name beside the wide chip still needs a fourth line, so the pill grows to hold it */
  .topbar.fit-4 { height: auto; min-height: var(--top-h); padding-top: 6px; padding-bottom: 6px; }
  .topbar.fit-4 .ttl { -webkit-line-clamp: 4; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }   /* a 360 px phone: "Computer-ized" (a plain break where a browser has no hyphen list) */
}
.topbar .tools { display: flex; align-items: center; gap: 8px; }
.tb-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px;
  background: var(--shell-2); color: var(--shell-ink); font-family: var(--font-head); font-weight: 700; font-size: .8125rem;
  border: 0; white-space: nowrap; }
.tb-chip .ico { width: 16px; height: 16px; }
.tb-chip.streak .ico { color: var(--m2); }
.tb-chip.count .ico { color: var(--m4); }
.tb-btn { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: transparent;
  color: var(--shell-ink); border: 0; }
.tb-btn:hover { background: var(--shell-2); }
.avatar { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; border: 0;
  background: linear-gradient(135deg, var(--act), var(--pop)); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .9375rem; }

.main { padding: 16px 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom, 0px)); }
.page { max-width: 1240px; margin: 0 auto; display: grid; gap: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; padding: 4px 0; }
.page-head h1 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.page-head .sub { color: var(--muted); font-size: .9375rem; margin-top: 4px; }
.page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* bottom tab bar: what a phone app would show */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none;
  color: var(--muted); font-family: var(--font-head); font-weight: 700; font-size: .75rem; }
.tabbar a .pill-bg { position: absolute; top: 8px; width: 56px; height: 30px; border-radius: 999px; background: var(--act-tint);
  transform: scale(.4); opacity: 0; transition: transform .35s var(--spring), opacity .2s; }
.tabbar a .ico { position: relative; width: 22px; height: 22px; margin-top: 2px; }
.tabbar a span { position: relative; }
.tabbar a[aria-current="page"] { color: var(--act-deep); }
.tabbar a[aria-current="page"] .pill-bg { transform: scale(1); opacity: 1; }

/* ---------- cards and shared pieces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--act-tint); border-color: transparent; box-shadow: none; }
.card-h { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.card-h > div:first-child { flex: 1 1 220px; min-width: 0; }
.card-h h2 { font-size: 1.125rem; font-weight: 800; line-height: 1.25; }
.card-h .hint { color: var(--muted); font-size: .875rem; margin-top: 2px; line-height: 1.4; }
.card-h .side { display: flex; gap: 8px; align-items: center; flex: none; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-family: var(--font-head); font-weight: 700; font-size: .9375rem; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--out), background .2s, border-color .2s; }
.btn:hover { border-color: var(--act); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--act-fill); border-color: var(--act-fill); color: var(--act-ink); box-shadow: var(--btn-shadow); }
.btn.primary:hover { background: var(--act-fill-hover); border-color: var(--act-fill-hover); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--act-deep); padding: 0 8px; }
.btn.quiet:hover { background: var(--act-tint); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .875rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.wrap { white-space: normal; text-align: center; line-height: 1.2; padding-top: 9px; padding-bottom: 9px; }   /* a long name wraps inside the button instead of spilling out (14 Oct 2026) */
.btn[disabled], .btn.locked { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn .ico { width: 18px; height: 18px; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .9375rem; font-weight: 600;
  transition: background .2s, border-color .2s, color .2s, transform .15s var(--out); }
.chip:active { transform: scale(.96); }
.chip .n { color: var(--muted); font-weight: 600; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--act-tint); border-color: var(--act); color: var(--act-deep); }
.chip[aria-pressed="true"] .n { color: var(--act-deep); }
.chip .tick { width: 0; overflow: hidden; transition: width .2s var(--out); }
.chip[aria-pressed="true"] .tick { width: 16px; }
.chip .sdot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.chip:disabled { opacity: .5; cursor: not-allowed; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-family: var(--font-head); font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--sunk); color: var(--ink-2); }
.pill .ico { width: 14px; height: 14px; stroke-width: 2.4; }
.pill.good { background: var(--good-tint); color: var(--good-deep); }
.pill.warn { background: var(--warn-tint); color: var(--warn-deep); }
.pill.bad { background: var(--bad-tint); color: var(--bad-deep); }
.pill.act { background: var(--act-tint); color: var(--act-deep); }
.pill.alt { background: var(--alt-tint); color: var(--alt-deep); }
.pill.pop { background: var(--pop-tint); color: var(--pop-deep); }
.pill.idea { background: var(--warn-tint); color: var(--warn-deep); letter-spacing: .08em; text-transform: uppercase; font-size: .6875rem; }

.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px;
  background: var(--sunk); gap: 0; isolation: isolate; }
.seg button { position: relative; z-index: 1; min-height: 40px; padding: 0 10px; border: 0; background: transparent; border-radius: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: .875rem; color: var(--muted); transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 10px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(22, 17, 47, .1), 0 4px 10px -4px rgba(22, 17, 47, .2); transition: transform .35s var(--spring); }

.switch { position: relative; width: 46px; height: 28px; flex: none; border-radius: 999px; border: 0; background: var(--line-2);
  transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
.switch[aria-checked="true"] { background: var(--act); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.opt:first-child { border-top: 0; }
.opt b { display: block; font-weight: 700; color: var(--ink); }
.opt small { display: block; color: var(--muted); font-size: .875rem; line-height: 1.4; }

.meter { position: relative; height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 999px; background: var(--act);
  transform-origin: left center; transform: scaleX(var(--v, 0)); transition: transform .9s var(--out); }

.infob { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -6px 0 -6px 2px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); vertical-align: middle; }
.infob:hover { background: var(--sunk); color: var(--act-deep); }
.infob.dark { color: #B9B4DA; }
.infob.dark:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* status words: always an icon AND a word, never color alone */
.st-good { color: var(--good-deep); } .st-warn { color: var(--warn-deep); } .st-bad { color: var(--bad-deep); } .st-none { color: var(--muted); }

/* ---------- Today ---------- */
.hello { display: grid; gap: 4px; }
.hello h1 { font-size: 1.5rem; font-weight: 800; }
.hello .sub { color: var(--muted); font-size: .9375rem; }
.shift { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.shift .ringbox { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 128px; height: 128px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .trk { stroke: var(--act-tint); }
.ring .val { stroke: var(--act); stroke-linecap: round; transition: stroke-dashoffset 1s var(--out), stroke .3s; }
.ring.done .val { stroke: var(--good); }
.ring .mid { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.ring .mid b { font-family: var(--font-head); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--ink); }
.ring .mid small { color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.ring .pop { position: absolute; right: 2px; top: 2px; width: 34px; height: 34px; opacity: 0; transform: scale(0); }
.ring.done .pop { opacity: 1; transform: scale(1); }
.ring.sm .mid b { font-size: 1.625rem !important; }
.ringtxt b { font-family: var(--font-head); font-size: 1.0625rem; font-weight: 800; display: block; }
.ringtxt span { color: var(--muted); font-size: .9375rem; }
.tasks { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .tbox { position: relative; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; padding: 0; }
.task .tbox svg { width: 20px; height: 20px; overflow: visible; }
.task .tbox .tk { fill: none; stroke: var(--good); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.task.done .tbox { border-color: var(--good); background: var(--good-tint); }
.task.done .tbox .tk { stroke-dashoffset: 0; }
.task .tt b { display: block; font-weight: 700; color: var(--ink); line-height: 1.3; }
.task .tt small { display: block; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.task.done .tt b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.pencil { position: absolute; width: 26px; height: 26px; left: 8px; top: -14px; pointer-events: none; color: var(--warn-deep); }

/* the vitals monitor: a dark bedside-monitor panel, four channels */
.monitor { position: relative; overflow: hidden; border-radius: var(--r); padding: 16px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, var(--monitor-2), var(--monitor) 70%); border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: var(--shadow); isolation: isolate; }
.monitor .mh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.monitor .mh h2 { color: #fff; font-size: 1.0625rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.monitor .mh .live { width: 8px; height: 8px; border-radius: 999px; background: var(--m1); box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: livepulse 2s 2; }   /* twice, then rests: nothing loops */
.monitor .mh small { color: #B9B4DA; font-size: .8125rem; }
.chans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chan { position: relative; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); min-width: 0; }
.chan .cl { display: flex; align-items: center; gap: 6px; color: #CFCAEE; font-size: .75rem; font-family: var(--font-head); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.chan .cl i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chan .cv { font-family: var(--font-head); font-weight: 800; font-size: 1.75rem; line-height: 1.1; margin-top: 4px; color: #fff; }
.chan .cv small { font-size: .875rem; font-weight: 700; color: #CFCAEE; margin-left: 4px; }
.chan .cd { font-size: .8125rem; color: #B9B4DA; }
.chan .cd .up { color: var(--m1); font-weight: 700; }
.chan svg.wave { width: 100%; height: 34px; margin-top: 6px; overflow: visible; }
.chan svg.wave path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chan svg.wave .area { stroke: none; opacity: .14; }
.chan svg.wave .end { stroke: var(--monitor); stroke-width: 2; }

.prio { display: grid; gap: 0; }
.prow { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; padding-top: 4px; }
.prow .rank { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 800; font-size: .875rem; background: var(--act-tint); color: var(--act-deep); }
.prow .pn { font-weight: 700; color: var(--ink); line-height: 1.3; }
.prow .pm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; color: var(--muted); font-size: .875rem; }
.prow .pa { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px;
  border-radius: var(--r); background: var(--warn-tint); color: var(--ink); border: 1px solid color-mix(in oklab, var(--warn) 35%, transparent); }
.banner .ico { color: var(--warn-deep); margin-top: 2px; }
.banner b { font-weight: 700; }
.banner .acts { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.banner.info { background: var(--act-tint); border-color: color-mix(in oklab, var(--act) 30%, transparent); }
.banner.info .ico { color: var(--act-deep); }
.banner.good { background: var(--good-tint); border-color: color-mix(in oklab, var(--good) 35%, transparent); }
.banner.good .ico { color: var(--good-deep); }

.resume { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.resume .rico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--alt-tint); color: var(--alt-deep); }
.resume .rb b { display: block; font-weight: 700; line-height: 1.3; }
.resume .rb small { color: var(--muted); font-size: .875rem; }
.resume .meter { grid-column: 1 / -1; }
.resume .btn { grid-column: 1 / -1; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.wd .dn { font-size: .75rem; font-family: var(--font-head); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wd .dd { font-family: var(--font-head); font-weight: 800; font-size: 1rem; color: var(--ink); }
.wd .dq { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wd .ico { width: 16px; height: 16px; color: var(--muted); }
.wd.today { background: var(--act-tint); border-color: var(--act); }
.wd.today .dd, .wd.today .dn { color: var(--act-deep); }
.wd.cat .ico { color: var(--alt-deep); }
.wd.exam { background: var(--pop-tint); border-color: var(--pop); }

.sbar { display: grid; gap: 10px; }
.sbar .sl { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.sbar .sl b { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800;
  background: var(--sunk); color: var(--ink-2); font-size: .875rem; }
.sbar .sl p { line-height: 1.45; }
.sbar .sl p small { display: block; color: var(--muted); font-size: .75rem; font-family: var(--font-head); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.gcards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.gcards.one { grid-template-columns: minmax(0, 1fr) !important; }
.gcard { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .2s var(--out), box-shadow .2s, border-color .2s; }
.gcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--act); }
/* W10 (21 Nov 2026, the owner's walkthrough): the guide's picture white on a solid tile in its first group's colour (the
   sidebar's brand tiles), the guide's number as a small badge on the tile's corner */
.gcard .gtile { position: relative; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: #8B6BFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.gcard .gtile[data-fam="medsurg"] { background: #D9449A; }
.gcard .gtile[data-fam="pharm"] { background: #12B886; }
.gcard .gtile[data-fam="maternity"] { background: #F2A516; }
.gcard .gtile[data-fam="mental"] { background: #1FB1E0; }
.gcard .gtile[data-fam="safety"] { background: #6742F5; }
.gcard .gtile .gpic { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gcard .gnum { position: absolute; right: -6px; bottom: -6px; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface);
  color: var(--ink); border: 1px solid var(--line); font-family: var(--font-head); font-weight: 800; font-size: .75rem; display: grid; place-items: center; }
.gcard .gt b { display: block; margin-top: 2px; font-family: var(--font-head); font-weight: 800; line-height: 1.3; color: var(--ink); }
.gcard .gt .gmeta { margin-top: 8px; min-height: 26px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8125rem; color: var(--muted); }
/* R102 (22 Nov 2026, R97 M4): the button row sits at the foot of the card, so in a row of cards the buttons line up
   card to card however long the title or score line above them is (one card a row at 390: no change) */
.gcard .gacts { grid-column: 1 / -1; gap: 8px; align-self: end; }
.gcard .gacts .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
.gcard.locked .gnum { color: var(--muted); }
.gcard .lockico { position: absolute; top: 10px; right: 10px; color: var(--muted); }

/* free account + locked previews */
.kit { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.kititem { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); }
.kititem .ki { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--act-tint); color: var(--act-deep); }
.kititem .ki.good { background: var(--good-tint); color: var(--good-deep); }
.kititem b { display: block; font-weight: 700; line-height: 1.3; }
.kititem small { display: block; color: var(--muted); font-size: .875rem; margin-top: 2px; }
.kititem .row { margin-top: 10px; }
.locked-wrap { position: relative; overflow: hidden; border-radius: var(--r); }
.locked-wrap .ghost { opacity: .32; pointer-events: none; user-select: none; }
.locked-wrap .lock-note { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--bg) 82%, transparent) 38%); }
.lock-note .ln { max-width: 380px; display: grid; justify-items: center; gap: 8px; padding: 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.lock-note .ln .ico { color: var(--act-deep); }
.lock-note .ln b { font-family: var(--font-head); font-weight: 800; font-size: 1.0625rem; text-align: center; }
.lock-note .ln p { color: var(--muted); font-size: .9375rem; }

.cjsteps { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cjs { position: relative; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.cjs .k { font-family: var(--font-head); font-weight: 800; font-size: .75rem; color: var(--muted); letter-spacing: .06em; }
.cjs b { display: block; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.cjs .row { margin-top: 8px; }
.cjs.weak { border-color: var(--bad); background: var(--bad-tint); }

/* ---------- Practice ---------- */
.quick { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.qcard { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; padding: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); text-align: left; box-shadow: var(--shadow);
  transition: transform .2s var(--out), box-shadow .2s, border-color .2s; }
.qcard:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--act); }
.qcard:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.qcard .qi { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.qcard b { font-family: var(--font-head); font-weight: 800; font-size: 1rem; line-height: 1.25; color: var(--ink); }
.qcard small { grid-column: 2 / -1; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.qcard .qn { grid-column: 3; grid-row: 1; }
.qi.c1 { background: var(--act-tint); color: var(--act-deep); } .qi.c2 { background: var(--bad-tint); color: var(--bad-deep); }
.qi.c3 { background: var(--warn-tint); color: var(--warn-deep); } .qi.c4 { background: var(--alt-tint); color: var(--alt-deep); }
.qi.c5 { background: var(--pop-tint); color: var(--pop-deep); } .qi.c6 { background: var(--good-tint); color: var(--good-deep); }

.builder { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.bsec { display: grid; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.bsec:first-child { border-top: 0; padding-top: 0; }
.bsec > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bsec h3 { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.bsec h3 .step { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--ink); color: var(--surface);
  font-size: .75rem; font-weight: 800; }
.bsec .why { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.level { display: grid; gap: 12px; }
.level .seg { grid-auto-columns: 1fr; }
.level .seg button { display: grid; justify-items: center; gap: 2px; min-height: 56px; padding: 6px; line-height: 1.15; }
.level .seg button small { font-family: var(--font-body); font-weight: 600; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.heat { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.heat i { width: 4px; border-radius: 2px; background: var(--line-2); transition: background .3s; }
.heat i:nth-child(1) { height: 6px; } .heat i:nth-child(2) { height: 10px; } .heat i:nth-child(3) { height: 14px; }
.heat.l1 i:nth-child(1) { background: var(--good); }
.heat.l2 i:nth-child(-n+2) { background: var(--act); }
.heat.l3 i { background: var(--pop); }
.lvdesc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.lvdesc .ico { color: var(--act-deep); margin-top: 2px; }
.lvdesc p { line-height: 1.45; }
.lvdesc .bar3 { grid-column: 1 / -1; display: grid; grid-template-columns: var(--a, 1fr) var(--b, 1fr) var(--c, 1fr); height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; transition: grid-template-columns .5s var(--out); }
.lvdesc .bar3 i:nth-child(1) { background: var(--good); } .lvdesc .bar3 i:nth-child(2) { background: var(--act); } .lvdesc .bar3 i:nth-child(3) { background: var(--pop); }
.lvdesc .legend3 { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8125rem; color: var(--muted); }
.lvdesc .legend3 span { display: inline-flex; align-items: center; gap: 6px; }
.lvdesc .legend3 i { width: 10px; height: 10px; border-radius: 3px; }

.ttabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 2px; }
.ttabs::-webkit-scrollbar { display: none; }
.ttabs button { flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; color: var(--muted);
  font-family: var(--font-head); font-weight: 700; font-size: .875rem; }
.ttabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.tsearch { position: relative; }
.tsearch input { width: 100%; min-height: 44px; padding: 0 12px 0 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.tsearch input:focus { outline: 3px solid color-mix(in oklab, var(--act) 40%, transparent); border-color: var(--act); }
.tsearch .ico { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.tkey { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8125rem; color: var(--muted); }
.tkey span { display: inline-flex; align-items: center; gap: 6px; }
.tkey i { width: 8px; height: 8px; border-radius: 999px; }

.fmtgroups { display: grid; gap: 12px; }
.fmtgroup { display: grid; gap: 8px; }
.fmtgroup > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fmtgroup b { font-weight: 700; }

/* --th is the thumb's width as drawn (28px in Edge and Firefox). The browser moves the thumb's centre from half a thumb
   in at one end to half a thumb in at the other, so the fill (--f, the value's share of the range) and every mark (--m)
   sit at T/2 + (100% - T) x share: each tick is under the circle's middle at every width. */
.len { display: grid; gap: 8px; --th: 28px; }
.len output { font-family: var(--font-head); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--ink); }
.len output small { font-size: .9375rem; color: var(--muted); font-weight: 700; margin-left: 6px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--act) var(--p, 20%), var(--sunk) var(--p, 20%)); }
.len .range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--act) calc(var(--th) / 2 + (100% - var(--th)) * var(--f, .2)), var(--sunk) 0); }
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--sunk); }
.range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--act); }
.range::-webkit-slider-thumb { -webkit-appearance: none; box-sizing: border-box; width: 28px; height: 28px; margin-top: -10px; border-radius: 999px; background: #fff; border: 3px solid var(--act); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 999px; background: #fff; border: 3px solid var(--act); }
.marks { position: relative; height: 34px; font-size: .75rem; color: var(--muted); }
.marks span { position: absolute; left: calc(var(--th) / 2 + (100% - var(--th)) * var(--m, 0)); transform: translateX(-50%); text-align: center; white-space: nowrap; line-height: 1.2; }
.marks span::before { content: ""; display: block; width: 1px; height: 6px; background: var(--axis); margin: 0 auto 2px; }
/* the end labels stay flush with the ends; their ticks move in half a thumb, under the thumb's centre */
.marks span:first-child { left: 0; transform: none; text-align: left; }
.marks span:first-child::before { margin-left: calc(var(--th) / 2 - .5px); }
.marks span:last-child { left: auto; right: 0; transform: none; text-align: right; }
.marks span:last-child::before { margin-right: calc(var(--th) / 2 - .5px); margin-left: auto; }

.summary { position: sticky; bottom: calc(var(--tab-h) + 8px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: grid; gap: 10px; padding: 14px;
  border-radius: var(--r); background: var(--shell); color: #fff; box-shadow: var(--shadow-lift); }
.summary .sumline { font-family: var(--font-head); font-weight: 800; font-size: 1.0625rem; line-height: 1.3; color: #fff; }
.summary .sumsub { color: #CFCAEE; font-size: .875rem; line-height: 1.4; }
.summary .warn { color: var(--m4); }
.summary .btn.primary { box-shadow: none; }
.summary .sumrows { display: none; }
@media (max-width: 1023.98px) {
  .summary { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 10px 12px; }
  .summary .sumline { font-size: .9375rem; }
  .summary .sumsub { font-size: .8125rem; grid-column: 1; }
  .summary .btn.primary { grid-column: 2; grid-row: 1 / span 2; width: auto; min-height: 44px; }
}

/* ---------- Progress ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.filters .seg { min-width: 0; }
.fgroup { display: flex; align-items: center; gap: 8px; min-width: 0; }
.filters label.fl { font-size: .8125rem; color: var(--muted); font-family: var(--font-head); font-weight: 700; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 639.98px) { .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.kpi { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.kpi .kl { color: var(--muted); font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.kpi .kv { font-family: var(--font-head); font-weight: 800; font-size: 1.75rem; line-height: 1.15; margin-top: 4px; color: var(--ink); }
.kpi .kv small { font-size: .9375rem; color: var(--muted); font-weight: 700; margin-left: 4px; }
.kpi .kd { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.kpi .kd .up { color: var(--good-deep); font-weight: 700; }
.kpi .kd .down { color: var(--bad-deep); font-weight: 700; }

.areas { display: grid; gap: 0; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.arow:first-child { border-top: 0; padding-top: 0; }
.arow .at { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.arow .at b { font-weight: 700; line-height: 1.3; }
.arow .am { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .8125rem; color: var(--muted); }
.barwrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.bar { position: relative; height: 12px; background: var(--sunk); border-radius: 0 4px 4px 0; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 0 4px 4px 0; background: var(--act);
  transform-origin: left center; transform: scaleX(var(--v, 0)); transition: transform .9s var(--out); }
.bar i.good { background: var(--good); } .bar i.warn { background: var(--warn); } .bar i.bad { background: var(--bad); } .bar i.none { background: var(--line-2); }
.bar .tick { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--axis); }
.barwrap .bv { font-family: var(--font-head); font-weight: 800; font-size: .9375rem; text-align: right; font-variant-numeric: tabular-nums; }
.bandkey { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .8125rem; align-items: center; }
.bandkey span { display: inline-flex; align-items: center; gap: 6px; }

.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .ax { stroke: var(--axis); stroke-width: 1; }
.chart text { fill: var(--muted); font-family: var(--font-body); font-size: 12px; }
.chart .ln { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .ln.s1 { stroke: var(--series-1); } .chart .ln.s2 { stroke: var(--series-2); }
.chart .ar.s1 { fill: var(--series-1); opacity: .08; } .chart .ar.s2 { fill: var(--series-2); opacity: .08; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.s1 { fill: var(--series-1); } .chart .dot.s2 { fill: var(--series-2); }
.chart .xh { stroke: var(--axis); stroke-width: 1; opacity: 0; transition: opacity .15s; }
.chart .endlbl { fill: var(--ink-2); font-family: var(--font-head); font-weight: 700; font-size: 12px; }
.chart.hovering .xh { opacity: 1; }
.chart .hd { opacity: 0; transition: opacity .15s; }
.chart.hovering .hd { opacity: 1; }
.tip { position: absolute; z-index: 5; top: 0; left: 0; min-width: 150px; padding: 10px 12px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-lift); pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .12s, transform .12s; font-size: .8125rem; color: var(--ink-2); }
.tip.on { opacity: 1; transform: translateY(0); }
.tip .th { font-family: var(--font-head); font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.tip .tr { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tip .tr i { height: 2px; border-radius: 2px; }
.tip .tr b { font-family: var(--font-head); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8125rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 2px; border-radius: 2px; }
.tview { margin-top: 8px; }
.tview summary { cursor: pointer; color: var(--act-deep); font-weight: 600; font-size: .875rem; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.tview summary::-webkit-details-marker { display: none; }
.tview .tw { overflow-x: auto; margin-top: 8px; }
table.dt { border-collapse: collapse; width: 100%; font-size: .875rem; font-variant-numeric: tabular-nums; }
table.dt th, table.dt td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dt th { font-family: var(--font-head); font-weight: 700; color: var(--muted); font-size: .75rem; letter-spacing: .04em; }

.tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 138px), 1fr)); }
.tile { position: relative; display: grid; align-content: space-between; gap: 6px; min-height: 92px; padding: 10px; border-radius: 12px;
  border: 1px solid transparent; text-align: left; color: var(--ink); transition: transform .2s var(--out), box-shadow .2s; min-width: 0; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tile .tn { font-weight: 700; font-size: .875rem; line-height: 1.25; padding-right: 22px; }
.tile .tv { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.tile .tv b { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; line-height: 1; }
.tile .tv small { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile .ti { position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; }
.tile.good { background: var(--good-tint); } .tile.good .ti { color: var(--good-deep); }
.tile.warn { background: var(--warn-tint); } .tile.warn .ti { color: var(--warn-deep); }
.tile.bad { background: var(--bad-tint); } .tile.bad .ti { color: var(--bad-deep); }
.tile.none { background: var(--surface-2); border-color: var(--line); } .tile.none .ti { color: var(--muted); }
.tile.none .tv b { color: var(--muted); font-size: 1rem; }

.ladder { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); counter-reset: cj; }
.rung { position: relative; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.rung .rk { font-family: var(--font-head); font-weight: 800; font-size: .75rem; color: var(--muted); letter-spacing: .06em; }
.rung b { display: block; font-weight: 700; line-height: 1.25; margin: 2px 0 8px; min-height: 2.5em; }
.rung .rv { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.rung .meter { margin-top: 8px; height: 6px; }
.rung.weak { background: var(--bad-tint); border-color: color-mix(in oklab, var(--bad) 45%, transparent); }
.rung.weak .meter i { background: var(--bad); }
.rung .flag { position: absolute; top: 10px; right: 10px; }

.habits { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.split3 { display: flex; height: 16px; border-radius: 4px; overflow: hidden; gap: 2px; }
.split3 i { display: block; height: 100%; transform-origin: left; }
.split3 i.g { background: var(--good); } .split3 i.b { background: var(--bad); } .split3 i.n { background: var(--line-2); }
.keyrows { display: grid; gap: 6px; margin-top: 10px; font-size: .9375rem; }
.keyrows div { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.keyrows i { width: 12px; height: 12px; border-radius: 3px; }
.keyrows b { font-family: var(--font-head); font-weight: 800; font-variant-numeric: tabular-nums; }
.takeaway { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: .9375rem; line-height: 1.45;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.takeaway .ico { color: var(--warn-deep); margin-top: 2px; }

.conf { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 6px; font-size: .8125rem; }
.conf .ch { font-family: var(--font-head); font-weight: 700; color: var(--muted); text-align: center; align-self: end; padding-bottom: 2px; }
.conf .rh { font-family: var(--font-head); font-weight: 700; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.cell { display: grid; gap: 2px; align-content: start; padding: 10px; border-radius: 12px; text-align: left; border: 1px solid transparent; min-height: 84px; }
.cell b { font-family: var(--font-head); font-weight: 800; font-size: 1.375rem; line-height: 1.1; color: var(--ink); }
.cell span { font-weight: 700; color: var(--ink); line-height: 1.25; }
.cell small { color: var(--muted); line-height: 1.3; }
.cell.solid { background: var(--good-tint); } .cell.lucky { background: var(--warn-tint); }
.cell.miscon { background: var(--bad-tint); border-color: var(--bad); } .cell.gap { background: var(--sunk); }
.cell:hover { box-shadow: var(--shadow-lift); }

.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: .9375rem; }
.hb .hl { line-height: 1.25; min-width: 0; }
.hb .hl small { display: block; color: var(--muted); font-size: .75rem; }
.hb .hv { font-family: var(--font-head); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

.heatmap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: start; }
.heatmap .dl { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; font-size: .6875rem; color: var(--muted); line-height: 1; }
.heatmap .dl span { height: 14px; display: flex; align-items: center; }
.hgrid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); grid-auto-columns: minmax(10px, 1fr); gap: 3px; }
.hgrid i { display: block; border-radius: 3px; background: var(--heat-0); transform: scale(var(--s, 1)); transition: transform .3s var(--spring); }
.hgrid i[data-l="1"] { background: var(--heat-1); } .hgrid i[data-l="2"] { background: var(--heat-2); }
.hgrid i[data-l="3"] { background: var(--heat-3); } .hgrid i[data-l="4"] { background: var(--heat-4); }
.hgrid i.today { box-shadow: 0 0 0 2px var(--pop); }
.hgrid i:hover { --s: 1.35; }
.heatkey { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: .75rem; color: var(--muted); margin-top: 8px; }
.heatkey i { width: 12px; height: 12px; border-radius: 3px; }

.badges { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 132px), 1fr)); }
.badge { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; text-align: center; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.badge .medal { position: relative; width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center;
  background: conic-gradient(var(--act), var(--pop), var(--warn), var(--good), var(--act)); }
.badge .medal::after { content: ""; position: absolute; inset: 4px; border-radius: 999px; background: var(--surface); }
.badge .medal .ico { position: relative; z-index: 1; color: var(--act-deep); width: 22px; height: 22px; }
.badge b { font-size: .875rem; font-weight: 700; line-height: 1.25; }
.badge small { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.badge.off .medal { background: var(--line-2); }
.badge.off .medal .ico { color: var(--muted); }
.badge.off b { color: var(--muted); }

/* ---------- Review ---------- */
.rtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rtabs::-webkit-scrollbar { display: none; }
.rtabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); font-family: var(--font-head); font-weight: 700; font-size: .875rem; color: var(--ink-2); }
.rtabs button .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.rtabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.rtabs button[aria-selected="true"] .n { color: color-mix(in oklab, var(--surface) 70%, transparent); }
.qlist { display: grid; gap: 0; }
.qrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line);
  background: transparent; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%; border-radius: 0; transition: background .15s; }
.qrow:first-child { border-top: 0; }
.qrow:hover { background: var(--surface-2); }
.qrow .qs { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.qrow .qs.bad { background: var(--bad-tint); color: var(--bad-deep); }
.qrow .qs.warn { background: var(--warn-tint); color: var(--warn-deep); }
.qrow .qs.act { background: var(--act-tint); color: var(--act-deep); }
.qrow .qm b { font-family: var(--font-head); font-weight: 800; font-size: .9375rem; letter-spacing: .01em; color: var(--ink); }
.qrow .qm .row { gap: 6px; margin-top: 4px; }
.qrow .qm small { color: var(--muted); font-size: .8125rem; }
.qrow .qe { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); }
.qrow .qe .ico { color: var(--muted); }
.listfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.tally { display: grid; gap: 4px; }
.tally button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.tally button:hover, .tally button[aria-pressed="true"] { background: var(--act-tint); }
.tally b { font-family: var(--font-head); font-weight: 800; font-variant-numeric: tabular-nums; }
.tally .tbar { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.tally .tbar i { display: block; height: 100%; background: var(--bad); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform .8s var(--out); }
.hist { display: grid; gap: 0; }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.hrow:first-child { border-top: 0; }
.hrow b { display: block; font-weight: 700; line-height: 1.3; }
.hrow small { color: var(--muted); font-size: .8125rem; }
.hrow .score { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; }
.hrow .row { grid-column: 1 / -1; gap: 8px; }
.hrow .hrate { display: block; margin-top: 4px; font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.hist-note { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--muted); font-size: .875rem; }
.hist-note > .ico { flex: none; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 24px 16px; text-align: center; color: var(--muted); }
.empty > .ico { width: 36px; height: 36px; color: var(--act); }
.empty b { color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 1.0625rem; }

/* ---------- Plan ---------- */
.plangrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-family: var(--font-head); font-weight: 700; font-size: .875rem; color: var(--ink-2); }
.field input[type="date"], .field input[type="number"], .field select, .field textarea {
  min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); width: 100%; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.days7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days7 button { min-height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-family: var(--font-head); font-weight: 700; font-size: .8125rem; color: var(--muted); }
.days7 button[aria-pressed="true"] { background: var(--act-fill); border-color: var(--act-fill); color: #fff; }
.mathbox { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.mathbox .big { font-family: var(--font-head); font-weight: 800; font-size: 1.75rem; line-height: 1.1; }
.mathbox .big small { font-size: .9375rem; color: var(--muted); font-weight: 700; margin-left: 4px; }
.cal { display: grid; gap: 6px; }
.cal .chead, .cal .cbody { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .chead span { text-align: center; font-size: .75rem; font-family: var(--font-head); font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.cday { position: relative; display: grid; align-content: space-between; justify-items: start; gap: 2px; min-height: 64px; padding: 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); text-align: left; min-width: 0; font-size: .75rem; color: var(--muted); }
.cday .d { font-family: var(--font-head); font-weight: 800; font-size: .875rem; color: var(--ink); }
.cday.out { visibility: hidden; }
.cday.past { background: var(--surface-2); }
.cday.today { border-color: var(--act); box-shadow: inset 0 0 0 1px var(--act); }
.cday.exam { background: var(--pop-tint); border-color: var(--pop); }
.cday.rest { background: var(--surface-2); }
.cday.cat { background: var(--alt-tint); border-color: color-mix(in oklab, var(--alt) 50%, transparent); }
.cday.cat .cico { color: var(--alt-deep); }
.cday .cq { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }
.cday .cq.cq-cat { font-family: var(--font-head); font-weight: 700; font-size: .5625rem; line-height: 1.15; color: var(--alt-deep); overflow-wrap: anywhere; }
.cday .cq.miss { color: var(--bad-deep); }
.cday .cq.hit { color: var(--good-deep); }
.cday .cico { position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; }
/* A Practice CAT day on a phone: the cat alone, larger, where the name would be. The full name breaks into pieces at
   this width (owner, 14 Oct 2026: the cat icon on phones); the day's label says it to screen readers, the key under
   the calendar names the colour, and a tap says it. Computers keep the cat in the corner and the full name. */
@media (max-width: 639.98px) {
  .cday.catname .cq-cat { display: none; }
  .cday.catname .cico { position: static; justify-self: center; width: 24px; height: 24px; }
}
.cday.shiftday { background: var(--surface-2); border-style: dashed; }
.cday.planend { box-shadow: inset 0 4px 0 var(--warn); }
.cday .shiftl { font-family: var(--font-head); font-weight: 800; font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--alt-deep); }
.days7.shifts button[aria-pressed="true"] { background: var(--alt-deep); border-color: var(--alt-deep); color: var(--surface); }
.cday .mini { width: 100%; height: 4px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.cday .mini i { display: block; height: 100%; background: var(--act); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform .6s var(--out); }
.cday.past .mini i { background: var(--good); }
.cday.past.short .mini i { background: var(--warn); }
.calkey { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8125rem; color: var(--muted); }
.calkey span { display: inline-flex; align-items: center; gap: 6px; }
.calkey i { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line-2); }
.goals { display: grid; gap: 12px; }
.goal { display: grid; gap: 6px; }
.goal .gtop { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.goal .gtop b { font-weight: 700; }
.goal .gtop span { font-family: var(--font-head); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9375rem; }
.consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 10px; font-size: .9375rem; line-height: 1.4; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--act); }
.checklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; line-height: 1.4; }
.checklist .ico { color: var(--act-deep); margin-top: 2px; }

/* ---------- Guides ---------- */
.glist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

/* ---------- Account ---------- */
.acct { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.device { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.device:first-of-type { border-top: 0; }
.device .di { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--sunk); color: var(--ink-2); }
.danger { border-color: color-mix(in oklab, var(--bad) 40%, transparent); }
.danger h2 { color: var(--bad-deep); }

/* the 14 free days (2- and 3-month plans): button, the ask, the added line, the how-it-works link */
.free14 { display: grid; gap: 6px; justify-items: start; }
.banner .btn .ico { color: inherit; margin-top: 0; }   /* the banner's own icon rule is for its leading icon only */
.free14 .btn .ico, .banner [data-free14] .btn:not(.primary) .ico { color: var(--pop-deep); }
.f14-note { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.banner .f14-note { margin-top: 8px; }
.free14.ask { justify-items: stretch; gap: 10px; padding: 12px; border-radius: var(--r-sm); background: var(--act-tint);
  border: 1px solid color-mix(in oklab, var(--act) 30%, transparent); }
.banner .free14.ask { margin-top: 8px; background: var(--surface); }
.free14.done { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; justify-items: stretch; padding: 10px 12px;
  border-radius: var(--r-sm); background: var(--good-tint); line-height: 1.45; }
.f14-ok { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--good); color: #fff; }
.f14-ok .ico { width: 15px; height: 15px; stroke-width: 3; }
/* "How do the 14 free days work?": a + / − that opens a few plain lines right under it and folds them again (the
   owner, 23 Nov 2026, R128's F14; it was a sheet here and a link on the real site) */
.f14-how { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-top: 2px; padding: 0; border: 0; background: none;
  color: var(--act-deep); font-size: .875rem; font-weight: 600; text-align: left; cursor: pointer; }
.f14-how .f14-q { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.f14-how:hover .f14-q { text-decoration-thickness: 2px; }
.f14-how:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; border-radius: var(--r-sm); }
.f14-pm { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 999px;
  background: var(--act-tint); color: var(--act-deep); font-size: 1rem; font-weight: 700; line-height: 1; }
.f14-more { display: grid; gap: 6px; margin-top: 4px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--act-tint);
  color: var(--ink); font-size: .875rem; line-height: 1.5; }
.f14-more[hidden] { display: none; }
.f14-more p { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) .f14-more:not([hidden]) { animation: f14-open .18s var(--out) both; }
}
@keyframes f14-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- the sheet: a window in the middle of the screen, on every screen (the owner, 23 Nov 2026, R128: "it
   should be centered screen always"; it was a bottom sheet on a phone and a right-hand drawer on a computer).
   About 600 px wide on a computer, the width less a 16 px gutter each side on a phone, at most 85% of the screen's
   height, scrolling inside itself with its title and X kept in view; a short fade and grow in (none with reduced
   motion or Stop animations: the motion rules below and views.css stop the transition). Centered by inset 0 and
   margin auto, so at rest it has no transform and its text stays sharp. ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 61; inset: 0; margin: auto; width: min(600px, calc(100% - 32px)); height: fit-content; max-height: 85vh; max-height: 85dvh;
  overflow: auto; overscroll-behavior: contain; scroll-padding-top: 72px; background: var(--surface); color: var(--ink); border-radius: 20px; box-shadow: var(--shadow-lift);
  padding: 0 16px 24px; opacity: 0; transform: scale(.96); visibility: hidden;
  transition: opacity .18s var(--out), transform .18s var(--out), visibility 0s linear .18s; }
.sheet.on { opacity: 1; transform: none; visibility: visible; transition: opacity .18s var(--out), transform .18s var(--out), visibility 0s; }
.sheet:focus { outline: none; }
.sheet .grab { display: none; }
.sheet .sh { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin: 0 -16px; padding: 16px 16px 6px; background: var(--surface); }
.sheet .sh h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.sheet .sh .x { width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--sunk); display: grid; place-items: center; flex: none; color: var(--ink); }
.sheet .sbody { display: grid; gap: 14px; padding-top: 6px; }   /* the 6 px keeps a focus ring clear of the title bar */
@media (min-width: 640px) {
  .sheet { padding: 0 24px 24px; }
  .sheet .sh { margin: 0 -24px; padding: 20px 24px 6px; }
}
dl.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; font-size: .9375rem; margin: 0; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; font-weight: 700; text-align: right; }
.path { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.path .pk { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; border: 2px solid var(--line-2); }
.path .pk.bad { border-color: var(--bad); background: var(--bad-tint); color: var(--bad-deep); }
.path .pk.good { border-color: var(--good); background: var(--good-tint); color: var(--good-deep); }
.spaced { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .8125rem; }
.spaced span { padding: 4px 10px; border-radius: 999px; background: var(--sunk); color: var(--muted); font-weight: 600; }
.spaced span.now { background: var(--act-fill); color: #fff; }
.qpreview { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--muted); font-size: .9375rem; }
.qpreview .bars i { display: block; height: 8px; border-radius: 4px; background: var(--sunk); margin-top: 6px; }
.radios { display: grid; gap: 8px; }
.radios label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; }
.radios input { accent-color: var(--act); width: 18px; height: 18px; margin: 0; }
.radios label:has(input:checked) { border-color: var(--act); background: var(--act-tint); }
.autoinfo { font-size: .8125rem; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.sharecard { position: relative; overflow: hidden; display: grid; gap: 10px; padding: 18px; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, #3A1F7A, #171233 60%); }
.sharecard .sbrand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; font-size: .8125rem; color: #CFCAEE; letter-spacing: .04em; }
.sharecard .sbrand img { height: 16px; width: auto; }
.sharecard h3 { color: #fff; font-size: 1.375rem; font-weight: 800; }
.sharecard .sstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sharecard .sstats div { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.sharecard .sstats b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1.375rem; color: #fff; }
.sharecard .sstats small { color: #CFCAEE; font-size: .75rem; }
.sharecard .stars { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent),
  radial-gradient(1.2px 1.2px at 85% 70%, #fff, transparent), radial-gradient(1px 1px at 40% 80%, #fff, transparent); }

/* toast */
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom, 0px)); max-width: min(92vw, 420px);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--surface);
  font-weight: 600; font-size: .9375rem; box-shadow: var(--shadow-lift); transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--spring), opacity .2s; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast .ico { color: var(--good); }

/* confetti (code-drawn; removed after it lands) */
.confetti { position: fixed; z-index: 90; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; }
.confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; }

/* ---------- lab controls (prototype only) ---------- */
.proto-btn { position: fixed; z-index: 59; right: 12px; top: auto; bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom, 0px));   /* above the tab bar on a phone (14 Oct 2026: in the top bar it covered the longer title) */
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--warn-deep);
  background: var(--warn-tint); color: var(--warn-deep); font-family: var(--font-head); font-weight: 800; font-size: .75rem; letter-spacing: .04em; }
.proto-btn .px { display: none; }
.proto-btn { height: 28px; padding: 0 10px; }
.proto-panel .opt b { font-size: .9375rem; }
.proto-panel .seg button { font-size: .8125rem; }
.proto-states { display: grid; gap: 8px; }
.proto-states button { display: grid; grid-template-columns: minmax(0, 1fr); text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.proto-states button b { font-weight: 700; }
.proto-states button small { color: var(--muted); font-size: .8125rem; }
.proto-states button[aria-pressed="true"] { border-color: var(--act); background: var(--act-tint); }

/* ---------- motion ---------- */
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); } }
.rise { animation: rise .5s var(--out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise { from { transform: translateY(10px); opacity: .001; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cjsteps, .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .resume { grid-template-columns: auto minmax(0, 1fr) auto; }
  .resume .btn { grid-column: 3; grid-row: 1; }
  .resume .meter { grid-column: 1 / -1; }
  .shift { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .shift .ringbox { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 1023.98px) { .desk-only { display: none !important; } }

/* ---------- desktop: the rail replaces the top bar and the tab bar ---------- */
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .tabbar, .topbar .mark, .phone-only { display: none !important; }
  .rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 16px; padding: 20px 14px;
    background: var(--shell); color: var(--shell-ink); overflow-y: auto; }
  .rail .logo { padding: 6px 10px 10px; }
  .rail .logo img { height: 22px; width: auto; }
  .rail nav { display: grid; gap: 2px; }
  .rail nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px;
    color: #F3F1FF; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1rem; transition: color .2s, background .2s; }
  .rail nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
  .rail nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .10); }
  /* colour tiles (the owner's pick "C", walkthrough W6, 20 Nov 2026), solid since W8 (the owner's "C2 + clipboard",
     20 Nov 2026): near-white words one size up, each icon white in a 32 px tile filled with its brand colour, a faint
     top highlight, the line a touch thicker; the icon's own padding makes the tile, so any page that draws the rail's
     links (an svg.ico and a data-route) gets it with no markup of its own */
  .rail nav a { padding-left: 8px; line-height: 1.25; }
  .rail nav a > .ico { width: 32px; height: 32px; padding: 7px; box-sizing: border-box; border-radius: 10px; stroke-width: 2.2;
    background: #8B6BFF; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
  .rail nav a:is([data-route="practice"], [data-route="flashcards"]) > .ico { background: #D9449A; }
  .rail nav a:is([data-route="progress"], [data-route="cat"]) > .ico { background: #12B886; }
  .rail nav a:is([data-route="review"], [data-route="account"]) > .ico { background: #F2A516; }
  .rail nav a:is([data-route="plan"], [data-route="study-plan"]) > .ico { background: #1FB1E0; }
  /* the Practice CAT's full name, two lines, not three (R128, R121's B23): its words a step smaller, this link only */
  .rail nav a[data-route="cat"] { padding-right: 8px; }
  .rail nav a[data-route="cat"] > span { font-size: .875rem; letter-spacing: -.01em; line-height: 1.2; }
  .rail nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--m3); }
  .rail nav a .badge-n { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: #B02C7B; color: #fff; font-size: .75rem;
    display: grid; place-items: center; font-variant-numeric: tabular-nums; }
  .rail .navlabel { padding: 10px 12px 4px; color: #B9B4DA; font-family: var(--font-head); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
  .rail .railfoot { margin-top: auto; display: grid; gap: 10px; }
  .planbox { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--shell-line); }
  .planbox b { display: block; font-family: var(--font-head); font-weight: 800; font-size: .9375rem; color: #fff; }
  .planbox small { display: block; color: #D6D1F5; font-size: .8125rem; margin-top: 2px; }
  .planbox .meter { margin-top: 10px; background: rgba(255, 255, 255, .1); height: 6px; }
  .planbox .meter i { background: var(--m3); }
  .planbox .btn { margin-top: 10px; width: 100%; min-height: 36px; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .22); }
  .railbtn { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent;
    color: var(--shell-muted); font-family: var(--font-head); font-weight: 700; font-size: .875rem; text-align: left; }
  .railbtn:hover { color: #fff; background: rgba(255, 255, 255, .05); }

  /* R110: the bar is solid page colour and sits at the very top (no 12 px gap above it), so nothing scrolls through or
     above the title; the title is near-black by day, white by night, one size up, with its tile */
  .topbar::before, .topbar::after { display: none; }
  .topbar { top: 0; height: 72px; margin: 0; padding: 0 32px; border-radius: 0; box-shadow: none; background: var(--bg); color: var(--ink); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
  .topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgba(22, 17, 47, .25); }
  .topbar .ttl, .topbar .ttl.long { color: var(--ink); font-size: 1.25rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
  .topbar .tb-ico { width: 32px; height: 32px; padding: 7px; border-radius: 10px; margin-right: 0; }
  /* R128 (R121's A5: at 1280 the Practice CAT's title took three lines and touched the top; at 1024 every title was
     0 px wide): the title keeps the room its words take on one line (--ttl-em, its one-line length in its own ems,
     measured by lab.js / the site's area.js), so the tools give way first: the search box narrows, to 160 px at the
     least. Then fitTitle() steps, one at a time until it fits: fit-1 18 px, fit-2 the streak chip steps aside, fit-3 two
     lines (balanced), fit-4 16 px, fit-5 no tile. Never cut, never 0 px. */
  .topbar .ttl { -webkit-line-clamp: 1; min-width: calc(var(--ttl-em, 5) * 1em + 2px); text-wrap: balance; }
  .topbar .tools { min-width: 0; }
  .topbar .tools > :not(.gsearch) { flex: none; }   /* only the search box narrows: the chips, Night and the avatar keep their size */
  .topbar.fit-1 .ttl, .topbar.fit-1 .ttl.long { font-size: 1.125rem; }
  .topbar.fit-2 .tb-chip.streak { display: none; }
  .topbar.fit-3 .ttl { -webkit-line-clamp: 2; min-width: calc(var(--ttl-em, 5) * .58em + 2px); }
  .topbar.fit-4 .ttl, .topbar.fit-4 .ttl.long { font-size: 1rem; }
  .topbar.fit-5 .tb-ico { display: none; }
  .tb-chip { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
  .tb-chip.streak .ico { color: var(--pop); } .tb-chip.count .ico { color: var(--warn-deep); }
  .tb-btn { color: var(--ink-2); } .tb-btn:hover { background: var(--sunk); }
  .gsearch { position: relative; width: min(340px, 30vw); min-width: 160px; }   /* narrows before the title does (R128) */
  .gsearch input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-overflow: ellipsis; }
  .gsearch .ico { position: absolute; left: 11px; top: 10px; color: var(--muted); }
  .gsearch .gres { position: absolute; top: 46px; left: 0; right: 0; z-index: 50; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lift); display: grid; gap: 2px; }
  .gsearch .gres button, .gsearch .gres a { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 0; background: transparent; text-align: left; color: var(--ink); text-decoration: none; font-size: .9375rem; }
  .gsearch .gres button:hover, .gsearch .gres a:hover, .gsearch .gres .on { background: var(--act-tint); }
  .gsearch .gres small { display: block; color: var(--muted); font-size: .75rem; }
  .gsearch .gres .ico { position: static; color: var(--act-deep); }

  .main { padding: 8px 32px 48px; }
  .page { gap: 24px; }
  .page-head h1 { font-size: 1.875rem; }
  .hello h1 { font-size: 1.875rem; }
  .card { padding: 20px; }
  .grid.g12 { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .col { gap: 24px; }
  .s-12 { grid-column: span 12; } .s-8 { grid-column: span 8; } .s-7 { grid-column: span 7; } .s-6 { grid-column: span 6; }
  .s-5 { grid-column: span 5; } .s-4 { grid-column: span 4; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shift { grid-template-columns: auto minmax(0, 1fr); gap: 24px; }
  .ring { width: 148px; height: 148px; }
  .ring .mid b { font-size: 2.375rem; }
  .cjsteps, .ladder { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ladder .rung::after { content: ""; position: absolute; right: -7px; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2); transform: translateY(-50%) rotate(45deg); z-index: 1; }
  .ladder .rung:last-child::after { display: none; }
  .builder { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .summary { position: sticky; top: 88px; bottom: auto; padding: 20px; gap: 14px; }
  .summary .sumrows { display: grid; gap: 8px; font-size: .875rem; }
  .summary .sumrows div { display: flex; justify-content: space-between; gap: 12px; color: #CFCAEE; }
  .summary .sumrows b { color: #fff; font-weight: 700; text-align: right; }
  .habits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plangrid { grid-template-columns: 380px minmax(0, 1fr); gap: 24px; }
  .acct { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .cday { min-height: 84px; padding: 8px; }
  .hgrid { grid-template-rows: repeat(7, 16px); gap: 4px; }
  .heatmap .dl { gap: 4px; } .heatmap .dl span { height: 16px; }
  .proto-btn { top: auto; bottom: 16px; right: 16px; height: 36px; font-size: .8125rem; }
  .proto-btn .px { display: inline; }
  .toast { bottom: 24px; }
}
@media (min-width: 1400px) {
  .main { padding-left: 48px; padding-right: 48px; }
  .topbar { padding: 0 48px; }
}

/* ---------- Baseline result (sales funnel prototype, 12 Oct 2026) ---------- */
.starthere { border-color: var(--pop); box-shadow: var(--shadow), inset 4px 0 0 var(--pop); }
.starthere h2 { font-size: 1.375rem; font-weight: 800; line-height: 1.2; margin: 4px 0 8px; }
.starthere .eyebrow { color: var(--pop-deep); }
.starthere > .pm, section.starthere .pm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: .875rem; }
section.starthere > p { margin: 10px 0 12px; }
.scorebox { display: flex; align-items: center; gap: 16px; }
.bigline { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.carry { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 16px; border-color: var(--act); }
.carry .ki { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--act-tint); color: var(--act-deep); }
.carry h2 { font-size: 1.125rem; font-weight: 800; line-height: 1.25; }
.lockgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.lockt { position: relative; overflow: hidden; min-height: 150px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface-2); }
.lockt .ghost { opacity: .45; filter: blur(2.5px); pointer-events: none; user-select: none; }
.lockt .ghost .hbars { gap: 6px; }
.lockt .lt { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lockt .lt .ico { width: 18px; height: 18px; color: var(--act-deep); }
.lockt .lt b { font-family: var(--font-head); font-weight: 800; font-size: .9375rem; line-height: 1.25; }
.lockt .lt small { color: var(--muted); font-size: .8125rem; line-height: 1.35; }
.gweeks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.gweeks i { height: 20px; border-radius: 5px; background: var(--act-tint); }
.gweeks i.off { background: var(--sunk); }
.quietplans { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .9375rem; padding: 4px 2px; }

/* ---------- plan ended: one page, to add time (owner, 13 Oct 2026). No tabs and no list of pages ---------- */
:root.plan-ended .tabbar, :root.plan-ended .rail .navlabel { display: none !important; }
@media (max-width: 1023.98px) { :root.plan-ended .main { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); } }
.kititem.ended-plan { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.ended-price { font-family: var(--font-head); font-size: 1.25rem; }
.ended-reply { margin-top: 12px; line-height: 1.5; }
