/* MBPrep shell: tokens, sidebar, top bar, dock, menus and themes, taken unchanged from practice.html (2026-11-03). */
/* ==dock-props== the phone dock's moving light, registered so it can glide, and the one spring every phone move rides
   (6 Nov, HAL-5113: stiffness 520, damping 32, mass 0.9, as UI OAR's dock, sampled as a linear() curve) */
@property --spec-x { syntax: "<percentage>"; inherits: true; initial-value: 30%; }
@property --spec-y { syntax: "<length>"; inherits: true; initial-value: 0px; }
:root { --spring: linear(0.0, 0.0463, 0.1563, 0.2961, 0.442, 0.5793, 0.6996, 0.799, 0.8772, 0.9357, 0.9771, 1.0044, 1.0208, 1.0291, 1.0316, 1.0305, 1.0272, 1.0229, 1.0182, 1.0138, 1.0099, 1.0067, 1.0042, 1.0022, 1.0009, 0.9999, 0.9994, 0.9991, 0.999, 0.999, 0.9991, 0.9993, 1); --spring-t: 440ms; }
/* ==/dock-props== */

/* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio, geometry.
   Put this @layer first; product CSS outside the layer wins ordinary layout rules.
   Native hidden and closed-dialog states take precedence over component display rules. */
@layer od-layout {
  [hidden]:not([hidden="until-found" i]) { display: none !important; }
  dialog:not([open]) { display: none !important; }

  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }

  .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill    { flex: 1 1 0; min-width: 0; }
  .od-fixed   { flex: none; }
  .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }

  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }

  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }

  .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }

  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }
  .od-nowrap  { white-space: nowrap; }
  .od-keep    { word-break: keep-all; overflow-wrap: anywhere; }

  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
             padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }

  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch  { min-width: 44px; min-height: 44px; }
}
:root [hidden]:where(:not([hidden="until-found" i])) { display: none; }
/* /OD-LAYOUT-PRIMITIVES v1 */

/* ---------- fonts: the app's own files ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace; /* counts, timers and ticks only, never labels */

  --bg: #FAFAFA;
  --raised: #FFFFFF;
  --surface: #F1F2F3;
  --surface-2: #E6E7E9;
  --line: #E2E3E5;
  --ink: #0C0D0E;
  --ink-2: #44474D;
  --ink-3: #5E6268;
  --bar-muted: #868990;
  --accent: #D4F53C;
  --accent-hover: #C6EA2A;
  --accent-ink: #0C0D0E;
  --online: #2FA65A;
  --focus: #0C0D0E;
  --scrim: rgb(12 13 14 / 0.36);
  --shadow: 0 16px 48px rgb(12 13 14 / 0.12), 0 2px 8px rgb(12 13 14 / 0.06);
  --danger: #B42318;
  --sb-thumb: rgb(12 13 14 / 0.14);
  --sb-thumb-hover: rgb(12 13 14 / 0.32);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-sm: 8px; --r: 16px; --r-lg: 24px; --r-pill: 999px;

  /* the page standard's type scale: eight steps, shared by every page. The display step is the one dominant thing. */
  --fs-cap: 13px;      /* counts and data labels */
  --fs-small: 14px;    /* meta lines and quiet links */
  --fs-ui: 15px;       /* buttons and controls */
  --fs-body: 16px;     /* body and row titles */
  --fs-lead: 20px;     /* the sentence under the title, section headings */
  --fs-title: 28px;    /* the second thing on the page */
  --fs-number: 40px;   /* a number that matters */
  --fs-display: clamp(52px, 5.4vw, 80px); /* the page title, at least 3x body */

  --t-fast: 160ms; --t: 240ms; --t-exit: 160ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);

  --side-w: 264px;
  --rail-w: 380px;
  --dock-h: 72px;
}
:root[data-theme="dark"] {
  --bg: #0F1011;
  --raised: #17181A;
  --surface: #18191B;
  --surface-2: #232427;
  --line: #27292C;
  --ink: #ECEDEE;
  --ink-2: #B4B7BC;
  --ink-3: #989BA1;
  --bar-muted: #6C6F75;
  --accent: #D4F53C;
  --accent-hover: #E0FA66;
  --accent-ink: #0C0D0E;
  --online: #4CC777;
  --focus: #ECEDEE;
  --scrim: rgb(0 0 0 / 0.6);
  --shadow: 0 16px 48px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
  --sb-thumb: rgb(236 237 238 / 0.12);
  --sb-thumb-hover: rgb(236 237 238 / 0.3);
}

:root[data-mode="dark"] { --danger: #F97066; }
:root[data-mode="dark"] .btn-danger { color: #1A0705; }

/* ---------- the app's other themes (docs/redesign/tokens.css), mapped onto this page's roles ---------- */
:root[data-theme="midnight"] {
  --bg: oklch(15% 0.04 272); --raised: oklch(21% 0.05 272); --surface: oklch(20.5% 0.05 272); --surface-2: oklch(26% 0.055 272);
  --line: oklch(31% 0.06 272); --ink: oklch(96% 0.01 272); --ink-2: oklch(86% 0.03 272); --ink-3: oklch(76% 0.04 272);
  --bar-muted: oklch(56% 0.05 272); --accent: oklch(90% 0.2 125); --accent-hover: oklch(94% 0.18 125); --accent-ink: oklch(15.5% 0 0);
  --online: oklch(72% 0.17 145); --focus: oklch(96% 0.01 272); --scrim: rgb(0 0 0 / 0.6);
  --shadow: 0 16px 48px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
  --sb-thumb: oklch(96% 0.01 272 / 0.14); --sb-thumb-hover: oklch(96% 0.01 272 / 0.32);
}
:root[data-theme="forest"] {
  --bg: oklch(16% 0.028 160); --raised: oklch(22% 0.035 160); --surface: oklch(21.5% 0.035 160); --surface-2: oklch(27% 0.038 160);
  --line: oklch(32% 0.04 160); --ink: oklch(95% 0.015 150); --ink-2: oklch(86% 0.02 150); --ink-3: oklch(76% 0.03 150);
  --bar-muted: oklch(56% 0.035 155); --accent: oklch(90% 0.19 125); --accent-hover: oklch(94% 0.17 125); --accent-ink: oklch(15.5% 0 0);
  --online: oklch(74% 0.17 145); --focus: oklch(95% 0.015 150); --scrim: rgb(0 0 0 / 0.6);
  --shadow: 0 16px 48px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
  --sb-thumb: oklch(95% 0.015 150 / 0.14); --sb-thumb-hover: oklch(95% 0.015 150 / 0.32);
}
:root[data-theme="oled"] {
  --bg: oklch(0% 0 0); --raised: oklch(10% 0.004 268); --surface: oklch(8% 0.004 268); --surface-2: oklch(14% 0.006 268);
  --line: oklch(20% 0.008 268); --ink: oklch(97% 0.003 268); --ink-2: oklch(86% 0.006 268); --ink-3: oklch(70% 0.01 268);
  --bar-muted: oklch(48% 0.01 268); --accent: oklch(92% 0.21 125); --accent-hover: oklch(95% 0.18 125); --accent-ink: oklch(15.5% 0 0);
  --online: oklch(70% 0.17 145); --focus: oklch(97% 0 0); --scrim: rgb(0 0 0 / 0.7);
  --shadow: 0 16px 48px rgb(0 0 0 / 0.7), 0 0 0 1px oklch(20% 0.008 268);
  --sb-thumb: rgb(255 255 255 / 0.12); --sb-thumb-hover: rgb(255 255 255 / 0.3);
}
:root[data-theme="contrast"] {
  --bg: #000; --raised: #000; --surface: #000; --surface-2: oklch(20% 0 0);
  --line: oklch(78% 0 0); --ink: #fff; --ink-2: oklch(95% 0 0); --ink-3: oklch(88% 0 0);
  --bar-muted: oklch(72% 0 0); --accent: oklch(92% 0.21 125); --accent-hover: oklch(96% 0.17 125); --accent-ink: #000;
  --online: oklch(78% 0.17 145); --focus: #fff; --scrim: rgb(0 0 0 / 0.8);
  --shadow: 0 0 0 1px oklch(78% 0 0);
  --sb-thumb: rgb(255 255 255 / 0.4); --sb-thumb-hover: rgb(255 255 255 / 0.7);
}
:root[data-theme="contrast"] .card, :root[data-theme="contrast"] .panel, :root[data-theme="contrast"] .pop { box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="paper"] {
  --bg: oklch(95.5% 0.02 85); --raised: oklch(98.5% 0.012 85); --surface: oklch(92.5% 0.022 85); --surface-2: oklch(88.5% 0.025 82);
  --line: oklch(86% 0.025 80); --ink: oklch(24% 0.025 60); --ink-2: oklch(36% 0.03 60); --ink-3: oklch(46% 0.03 60);
  --bar-muted: oklch(62% 0.03 65); --accent: oklch(84% 0.17 118); --accent-hover: oklch(80% 0.17 118); --accent-ink: oklch(20% 0.02 60);
  --online: oklch(58% 0.15 145); --focus: oklch(24% 0.025 60); --scrim: rgb(40 30 10 / 0.35);
  --shadow: 0 16px 48px rgb(60 40 10 / 0.12), 0 2px 8px rgb(60 40 10 / 0.06);
  --sb-thumb: rgb(60 40 10 / 0.16); --sb-thumb-hover: rgb(60 40 10 / 0.34);
}

/* ---------- accents: one quiet colour for the next action and good results, picked by the student ---------- */
:root { --accent-line: var(--ink); --accent-strong: var(--accent); --accent-soft: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
:root[data-accent="lime"], :root:not([data-accent]) { --accent-strong: oklch(50% 0.14 128); }
:root[data-accent="lime"][data-mode="dark"] { --accent-strong: var(--accent); }
:root[data-accent="sage"] {
  --accent: oklch(82% 0.065 152); --accent-hover: oklch(79% 0.072 152); --accent-strong: oklch(47% 0.095 152); --accent-ink: oklch(24% 0.03 152);
  --accent-line: oklch(58% 0.055 152); --accent-glass: oklch(86% 0.045 152 / 0.62);
}
:root[data-accent="sage"][data-mode="dark"] {
  --accent: oklch(38% 0.04 152); --accent-strong: oklch(80% 0.09 152); --accent-hover: oklch(42% 0.045 152); --accent-ink: oklch(93% 0.02 152);
  --accent-line: oklch(70% 0.050 152); --accent-glass: oklch(44% 0.04 152 / 0.6);
}
:root[data-accent="mist"] {
  --accent: oklch(82% 0.06 238); --accent-hover: oklch(79% 0.068 238); --accent-strong: oklch(47% 0.11 245); --accent-ink: oklch(24% 0.03 238);
  --accent-line: oklch(58% 0.050 238); --accent-glass: oklch(86% 0.04 238 / 0.62);
}
:root[data-accent="mist"][data-mode="dark"] {
  --accent: oklch(38% 0.04 238); --accent-strong: oklch(80% 0.09 238); --accent-hover: oklch(42% 0.045 238); --accent-ink: oklch(93% 0.02 238);
  --accent-line: oklch(70% 0.050 238); --accent-glass: oklch(44% 0.04 238 / 0.6);
}
:root[data-accent="lavender"] {
  --accent: oklch(83% 0.062 295); --accent-hover: oklch(80% 0.07 295); --accent-strong: oklch(49% 0.13 295); --accent-ink: oklch(24% 0.03 295);
  --accent-line: oklch(58% 0.050 295); --accent-glass: oklch(87% 0.04 295 / 0.62);
}
:root[data-accent="lavender"][data-mode="dark"] {
  --accent: oklch(39% 0.04 295); --accent-strong: oklch(80% 0.09 295); --accent-hover: oklch(43% 0.045 295); --accent-ink: oklch(93% 0.02 295);
  --accent-line: oklch(70% 0.050 295); --accent-glass: oklch(45% 0.04 295 / 0.6);
}
:root[data-accent="clay"] {
  --accent: oklch(82% 0.062 40); --accent-hover: oklch(79% 0.07 40); --accent-strong: oklch(51% 0.12 38); --accent-ink: oklch(24% 0.03 40);
  --accent-line: oklch(58% 0.050 40); --accent-glass: oklch(86% 0.04 40 / 0.62);
}
:root[data-accent="clay"][data-mode="dark"] {
  --accent: oklch(39% 0.035 40); --accent-strong: oklch(80% 0.09 40); --accent-hover: oklch(43% 0.040 40); --accent-ink: oklch(93% 0.02 40);
  --accent-line: oklch(70% 0.045 40); --accent-glass: oklch(45% 0.035 40 / 0.6);
}
:root[data-accent="softlime"] {
  --accent: oklch(87% 0.1 122); --accent-hover: oklch(84% 0.11 122); --accent-strong: oklch(50% 0.13 128); --accent-ink: oklch(24% 0.03 122);
  --accent-line: oklch(58% 0.085 122); --accent-glass: oklch(89% 0.075 122 / 0.62);
}
:root[data-accent="softlime"][data-mode="dark"] {
  --accent: oklch(40% 0.05 122); --accent-strong: oklch(84% 0.12 122); --accent-hover: oklch(44% 0.055 122); --accent-ink: oklch(93% 0.02 122);
  --accent-line: oklch(70% 0.060 122); --accent-glass: oklch(46% 0.05 122 / 0.6);
}
:root[data-accent="lime"] { --accent-glass: color-mix(in srgb, var(--accent) 80%, transparent); }


/* ---------- deep accents: an ink-like blue and a forest green, carrying white text ---------- */
:root[data-accent="deepblue"] {
  --accent: oklch(37% 0.13 262); --accent-hover: oklch(42% 0.14 262); --accent-ink: oklch(98.5% 0.005 262);
  --accent-line: oklch(44% 0.15 262); --accent-glass: oklch(37% 0.13 262 / 0.72);
}
:root[data-accent="deepblue"][data-mode="dark"] {
  --accent: oklch(62% 0.15 262); --accent-hover: oklch(67% 0.15 262); --accent-ink: oklch(15% 0.03 262);
  --accent-line: oklch(74% 0.13 262); --accent-glass: oklch(55% 0.14 262 / 0.6);
}
:root[data-accent="deepgreen"] {
  --accent: oklch(39% 0.09 160); --accent-hover: oklch(44% 0.1 160); --accent-ink: oklch(98.5% 0.005 160);
  --accent-line: oklch(45% 0.1 160); --accent-glass: oklch(39% 0.09 160 / 0.72);
}
:root[data-accent="deepgreen"][data-mode="dark"] {
  --accent: oklch(64% 0.12 160); --accent-hover: oklch(69% 0.12 160); --accent-ink: oklch(15% 0.03 160);
  --accent-line: oklch(75% 0.11 160); --accent-glass: oklch(56% 0.11 160 / 0.6);
}
:root[data-tint="off"][data-theme="light"][data-accent="deepblue"] {
  --bg: oklch(97.6% 0.008 262); --raised: oklch(99.3% 0.004 262); --surface: oklch(94.8% 0.014 262); --surface-2: oklch(91% 0.018 262);
  --line: oklch(90.4% 0.015 262); --ink: oklch(22% 0.03 262); --ink-2: oklch(37% 0.03 262); --ink-3: oklch(47% 0.03 262);
  --bar-muted: oklch(62% 0.03 262); --focus: oklch(22% 0.03 262);
}
:root[data-tint="off"][data-theme="dark"][data-accent="deepblue"] {
  --bg: oklch(16.5% 0.02 262); --raised: oklch(22% 0.024 262); --surface: oklch(21% 0.024 262); --surface-2: oklch(26% 0.026 262);
  --line: oklch(28% 0.024 262); --ink: oklch(94% 0.012 262); --ink-2: oklch(82% 0.02 262); --ink-3: oklch(71% 0.024 262);
  --bar-muted: oklch(45% 0.03 262); --focus: oklch(94% 0.012 262);
}
:root[data-tint="off"][data-theme="light"][data-accent="deepgreen"] {
  --bg: oklch(97.6% 0.008 160); --raised: oklch(99.3% 0.004 160); --surface: oklch(94.8% 0.014 160); --surface-2: oklch(91% 0.018 160);
  --line: oklch(90.4% 0.015 160); --ink: oklch(22% 0.03 160); --ink-2: oklch(37% 0.03 160); --ink-3: oklch(47% 0.03 160);
  --bar-muted: oklch(62% 0.03 160); --focus: oklch(22% 0.03 160);
}
:root[data-tint="off"][data-theme="dark"][data-accent="deepgreen"] {
  --bg: oklch(16.5% 0.02 160); --raised: oklch(22% 0.024 160); --surface: oklch(21% 0.024 160); --surface-2: oklch(26% 0.026 160);
  --line: oklch(28% 0.024 160); --ink: oklch(94% 0.012 160); --ink-2: oklch(82% 0.02 160); --ink-3: oklch(71% 0.024 160);
  --bar-muted: oklch(45% 0.03 160); --focus: oklch(94% 0.012 160);
}

/* ---------- Today: the accent at full strength in four places, each with a job:
   the primary action, the plan's progress, the next exam's day, and You in the class ---------- */
.hz-line { height: 2px; top: 3.5px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent-line) 45%, transparent) 0 5px, transparent 5px 10px) !important; }
.hz-done { height: 2px; top: -0.5px; background: var(--accent-line); border-radius: 2px; }
.hz-node.now .hz-dot { background: var(--accent-line); border-color: var(--accent-line); }
.hz-node.next .hz-dot { width: 13px; height: 13px; margin-top: -2px; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hz-node.next .hz-label b { color: var(--accent-line); }
.bar > span { background: var(--ink); }
.bar-accent > span { background: var(--accent); }
.qa .od-icon { color: var(--accent-line); }

/* ---------- matching tint: Light and Dark pages lean, very slightly, toward the accent ---------- */
:root[data-tint="off"][data-theme="light"][data-accent="sage"] {
  --bg: oklch(97.6% 0.006 152); --raised: oklch(99.2% 0.003 152); --surface: oklch(94.8% 0.011 152); --surface-2: oklch(91% 0.014 152);
  --line: oklch(90.4% 0.012 152); --ink: oklch(23% 0.020 152); --ink-2: oklch(38% 0.020 152); --ink-3: oklch(47% 0.020 152);
  --bar-muted: oklch(62% 0.022 152); --focus: oklch(23% 0.020 152);
}
:root[data-tint="off"][data-theme="dark"][data-accent="sage"] {
  --bg: oklch(17% 0.012 152); --raised: oklch(22.5% 0.015 152); --surface: oklch(21.5% 0.015 152); --surface-2: oklch(26.5% 0.017 152);
  --line: oklch(28.5% 0.016 152); --ink: oklch(94% 0.010 152); --ink-2: oklch(82% 0.015 152); --ink-3: oklch(71% 0.018 152);
  --bar-muted: oklch(45% 0.020 152); --focus: oklch(94% 0.010 152);
}
:root[data-tint="off"][data-theme="light"][data-accent="mist"] {
  --bg: oklch(97.6% 0.006 240); --raised: oklch(99.2% 0.003 240); --surface: oklch(94.8% 0.011 240); --surface-2: oklch(91% 0.014 240);
  --line: oklch(90.4% 0.012 240); --ink: oklch(23% 0.020 240); --ink-2: oklch(38% 0.020 240); --ink-3: oklch(47% 0.020 240);
  --bar-muted: oklch(62% 0.022 240); --focus: oklch(23% 0.020 240);
}
:root[data-tint="off"][data-theme="dark"][data-accent="mist"] {
  --bg: oklch(17% 0.012 240); --raised: oklch(22.5% 0.015 240); --surface: oklch(21.5% 0.015 240); --surface-2: oklch(26.5% 0.017 240);
  --line: oklch(28.5% 0.016 240); --ink: oklch(94% 0.010 240); --ink-2: oklch(82% 0.015 240); --ink-3: oklch(71% 0.018 240);
  --bar-muted: oklch(45% 0.020 240); --focus: oklch(94% 0.010 240);
}
:root[data-tint="off"][data-theme="light"][data-accent="lavender"] {
  --bg: oklch(97.6% 0.006 295); --raised: oklch(99.2% 0.003 295); --surface: oklch(94.8% 0.011 295); --surface-2: oklch(91% 0.014 295);
  --line: oklch(90.4% 0.012 295); --ink: oklch(23% 0.020 295); --ink-2: oklch(38% 0.020 295); --ink-3: oklch(47% 0.020 295);
  --bar-muted: oklch(62% 0.022 295); --focus: oklch(23% 0.020 295);
}
:root[data-tint="off"][data-theme="dark"][data-accent="lavender"] {
  --bg: oklch(17% 0.012 295); --raised: oklch(22.5% 0.015 295); --surface: oklch(21.5% 0.015 295); --surface-2: oklch(26.5% 0.017 295);
  --line: oklch(28.5% 0.016 295); --ink: oklch(94% 0.010 295); --ink-2: oklch(82% 0.015 295); --ink-3: oklch(71% 0.018 295);
  --bar-muted: oklch(45% 0.020 295); --focus: oklch(94% 0.010 295);
}
:root[data-tint="off"][data-theme="light"][data-accent="clay"] {
  --bg: oklch(97.6% 0.004 40); --raised: oklch(99.2% 0.002 40); --surface: oklch(94.8% 0.007 40); --surface-2: oklch(91% 0.008 40);
  --line: oklch(90.4% 0.007 40); --ink: oklch(23% 0.012 40); --ink-2: oklch(38% 0.012 40); --ink-3: oklch(47% 0.012 40);
  --bar-muted: oklch(62% 0.013 40); --focus: oklch(23% 0.012 40);
}
:root[data-tint="off"][data-theme="dark"][data-accent="clay"] {
  --bg: oklch(17% 0.007 40); --raised: oklch(22.5% 0.009 40); --surface: oklch(21.5% 0.009 40); --surface-2: oklch(26.5% 0.010 40);
  --line: oklch(28.5% 0.010 40); --ink: oklch(94% 0.006 40); --ink-2: oklch(82% 0.009 40); --ink-3: oklch(71% 0.011 40);
  --bar-muted: oklch(45% 0.012 40); --focus: oklch(94% 0.006 40);
}
:root[data-tint="off"][data-theme="light"][data-accent="softlime"] {
  --bg: oklch(97.6% 0.004 122); --raised: oklch(99.2% 0.002 122); --surface: oklch(94.8% 0.007 122); --surface-2: oklch(91% 0.008 122);
  --line: oklch(90.4% 0.007 122); --ink: oklch(23% 0.012 122); --ink-2: oklch(38% 0.012 122); --ink-3: oklch(47% 0.012 122);
  --bar-muted: oklch(62% 0.013 122); --focus: oklch(23% 0.012 122);
}
:root[data-tint="off"][data-theme="dark"][data-accent="softlime"] {
  --bg: oklch(17% 0.007 122); --raised: oklch(22.5% 0.009 122); --surface: oklch(21.5% 0.009 122); --surface-2: oklch(26.5% 0.010 122);
  --line: oklch(28.5% 0.010 122); --ink: oklch(94% 0.006 122); --ink-2: oklch(82% 0.009 122); --ink-3: oklch(71% 0.011 122);
  --bar-muted: oklch(45% 0.012 122); --focus: oklch(94% 0.006 122);
}

/* ---------- scrollbars: thin, quiet, darker only when you reach for them ---------- */
html { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
html:hover { scrollbar-color: var(--sb-thumb-hover) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--sb-thumb);
  border-radius: var(--r-pill);
  border: 3px solid transparent;
  background-clip: content-box;
  min-height: 40px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--sb-thumb-hover); }
::-webkit-scrollbar-corner { background: transparent; }
.thin-scroll { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
.thin-scroll:hover { scrollbar-color: var(--sb-thumb-hover) transparent; }
/* the sidebar scrolls with no bar drawn (the app's rule, 2026-10-20); wheel, touch and keys still scroll it */
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--t) var(--ease-out), color var(--t) var(--ease-out);
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* one outline icon family: 24 grid, 1.6 stroke, round caps and joins; the current place goes to 2 */
.od-icon.fi { fill: currentColor; }
.od-icon.ln { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* faces: the app's DiceBear Adventurer set; people get faces, never letters */
.face {
  position: relative; display: inline-block; flex: none;
  width: var(--face, 36px); height: var(--face, 36px);
  border-radius: var(--r-pill);
  background-color: var(--surface-2);
}
.face::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--face-img) center / cover no-repeat;
  filter: grayscale(1) contrast(1.04);
  transition: filter var(--t) var(--ease-out);
}
/* you and anyone online keep a little warmth, so they are findable without colour */
.face.me::before, .face.online::before { filter: grayscale(0.8) contrast(1.04); }
:root[data-mode="dark"] .face::before { filter: grayscale(1) brightness(0.88) contrast(1.04); }
:root[data-mode="dark"] .face.me::before, :root[data-mode="dark"] .face.online::before { filter: grayscale(0.8) brightness(0.88) contrast(1.04); }
.face.online::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--online); border: 2px solid var(--bg);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn:disabled { background: var(--surface-2); color: var(--ink-3); border-color: transparent; cursor: not-allowed; transform: none; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-ghost:hover { background: var(--surface); border-color: var(--surface-2); }
  .btn-ink:hover { background: var(--ink-2); }
}
.link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) var(--ease-out);
  --od-icon-size: 16px;
}
@media (hover: hover) { .link:hover { text-decoration-color: currentColor; } }
.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r-pill);
  color: var(--ink-2); --od-icon-size: 20px;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.icon-btn[aria-expanded="true"] { background: var(--surface); color: var(--ink); }
@media (hover: hover) { .icon-btn:hover { background: var(--surface); color: var(--ink); } }
.unread-dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); border: 2px solid var(--bg); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns var(--t) var(--ease-out); }
.app.rail-open { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--rail-w); }

.side {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--shell-line);
}
/* pinned top: brand, programme, search */
.side-brand { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.side-brand .icon-btn { --od-icon-size: 18px; color: var(--ink-3); margin-right: -6px; }

/* collapsed: an icon rail. Labels, counts and the note step aside; every row keeps its icon and a tooltip. */
.app.side-collapsed { --side-w: 76px; }
.app.side-collapsed .side-top, .app.side-collapsed .side-scroll, .app.side-collapsed .side-bottom { padding-left: 12px; padding-right: 12px; }
.app.side-collapsed .side-brand { flex-direction: column; gap: var(--s2); }
.app.side-collapsed .side-brand .icon-btn { margin: 0; transform: scaleX(-1); }
.app.side-collapsed .brand { padding: 0; justify-content: center; }
.app.side-collapsed .brand > span,
.app.side-collapsed .nl, .app.side-collapsed .nav-item .count, .app.side-collapsed .nav-item .tag,
.app.side-collapsed .nav-faces, .app.side-collapsed .nav-kids, .app.side-collapsed .nav-label,
.app.side-collapsed .note, .app.side-collapsed .prog .od-field, .app.side-collapsed .prog > .od-icon,
.app.side-collapsed .search > span, .app.side-collapsed .search kbd,
.app.side-collapsed .account .od-field, .app.side-collapsed .account > .od-icon { display: none; }
.app.side-collapsed .nav-group { gap: 4px; }
.app.side-collapsed .nav { gap: var(--s3); }
.app.side-collapsed .nav-group + .nav-group { padding-top: var(--s3); border-top: 1px solid var(--shell-line); }
.app.side-collapsed .nav-item, .app.side-collapsed .search, .app.side-collapsed .prog, .app.side-collapsed .account { justify-content: center; padding: 0; }
.app.side-collapsed .search { width: 52px; justify-self: center; }
.app.side-collapsed .prog { width: 52px; height: 52px; justify-self: center; }
.app.side-collapsed .account { width: 52px; justify-self: center; padding: var(--s1) 0; }
.side-tip {
  position: fixed; z-index: 70; left: var(--x); top: var(--y); transform: translateY(-50%);
  padding: 6px 12px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow);
}
.side-top { flex: none; display: grid; gap: var(--s4); padding: var(--s5) var(--s4) var(--s4); }
/* the only part that scrolls: sections and the note, with a fade only where more is hidden */
.side-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: var(--s5); align-content: start;
  padding: var(--s2) var(--s4) var(--s5);
  --fade-top: 0px; --fade-bottom: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
}
.side-scroll[data-more-above] { --fade-top: 28px; }
.side-scroll[data-more-below] { --fade-bottom: 28px; }
/* pinned bottom: you */
.side-bottom { flex: none; padding: var(--s3) var(--s4) var(--s4); border-top: 1px solid var(--shell-line); }
.brand { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s2); min-height: 44px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 24px; color: var(--ink); flex: none; }

.prog {
  display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left;
  padding: var(--s3); border-radius: var(--r);
  background: var(--surface);
  transition: background-color var(--t-fast) var(--ease-out);
}
@media (hover: hover) { .prog:hover { background: var(--surface-2); } }
.prog-badge { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.prog-name { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.prog-school { font-size: 13px; color: var(--ink-3); }
.prog .od-icon { --od-icon-size: 16px; color: var(--ink-3); }

.search {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  min-height: 44px; padding: 0 var(--s3) 0 var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--ink-3); font-size: 15px; --od-icon-size: 18px;
  transition: background-color var(--t-fast) var(--ease-out);
}
.search kbd { margin-left: auto; font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface); color: var(--ink-3); }
@media (hover: hover) { .search:hover { background: var(--surface); } .search:hover kbd { background: var(--bg); } }

.nav { display: grid; gap: var(--s5); }
.nav-group { display: grid; gap: 2px; }
.nav-label { padding: 0 var(--s3) var(--s2); }
.nav-item {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  min-height: 44px; padding: 0 var(--s3);
  border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 15px; font-weight: 500; text-align: left;
  --od-icon-size: 20px;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.nav-item .od-icon { color: var(--ink-3); transition: color var(--t-fast) var(--ease-out); }
.nav-item .count { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.nav-item .tag { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-3); padding: 1px 8px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.nav-faces { margin-left: auto; display: flex; --face: 20px; }
.nav-faces .face { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.nav-faces .face:first-child { margin-left: 0; }
.nav-kids { display: grid; gap: 0; margin: -2px 0 2px 21px; padding-left: 20px; border-left: 1px solid var(--shell-line); }
.nav-kid { display: flex; align-items: center; min-height: 36px; padding: 0 var(--s3); border-radius: var(--r-sm); font-size: 14px; color: var(--ink-3); transition: background-color var(--t-fast) var(--ease-out); }
@media (hover: hover) { .nav-kid:hover { background: var(--surface); color: var(--ink); } }
.nav-item[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--surface); }
.nav-item[aria-current="page"] .od-icon { color: var(--ink); stroke-width: 2; }
@media (hover: hover) { .nav-item:hover { background: var(--surface); color: var(--ink); } .nav-item:hover .od-icon { color: var(--ink); } }

.note { padding: var(--s4); border-radius: var(--r); background: var(--surface); }
.note-title { font-size: 14px; font-weight: 700; }
.note-body { font-size: 14px; color: var(--ink-2); }
.note .icon-btn { width: 32px; height: 32px; margin: -6px -6px 0 0; --od-icon-size: 14px; }

.account {
  display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left;
  padding: var(--s2); border-radius: var(--r);
  transition: background-color var(--t-fast) var(--ease-out);
  --face: 40px;
}
.account[aria-expanded="true"] { background: var(--surface); }
@media (hover: hover) { .account:hover { background: var(--surface); } }
.account-name { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.account-sub { font-size: 13px; color: var(--ink-3); }
.account .od-icon { --od-icon-size: 16px; color: var(--ink-3); }

.topbar { display: none; }
.dock, .dockbar, .dock-more { display: none; }
.glass-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- main ---------- */
.page { min-width: 0; }
.utility {
  position: sticky; top: 0; z-index: 15;
  max-width: 1400px; margin-inline: auto;
  display: flex; justify-content: flex-end; align-items: center; gap: var(--s1);
  padding: var(--s3) clamp(24px, 4vw, 64px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.galen-btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4) 0 var(--s3);
  border-radius: var(--r-pill); border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; --od-icon-size: 18px;
  transition: background-color var(--t-fast) var(--ease-out);
}
.galen-btn[aria-expanded="true"] { background: var(--surface); border-color: var(--surface-2); }
@media (hover: hover) { .galen-btn:hover { background: var(--surface); } }

.main {
  width: 100%; max-width: 1400px; margin-inline: auto;
  padding: var(--s5) clamp(24px, 4vw, 64px) var(--s6);
  display: grid; gap: var(--s8);
  align-content: start;
}

.hello { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: var(--s6); }
.hello-main { display: grid; gap: var(--s3); }
.hello h1 { font-size: var(--fs-display); line-height: 1; font-weight: 600; letter-spacing: -0.045em; }
.lede { font-size: var(--fs-lead); color: var(--ink-2); }

/* ahead of you: one sentence, one hairline, a few quiet points, true to scale. */
.horizon { display: grid; gap: var(--s5); padding: var(--s5) var(--s6) var(--s4); border-radius: var(--r-lg); background: var(--surface); }
.hz-summary { font-size: 17px; color: var(--ink-2); margin-top: 2px; }
.hz-summary b { font-weight: 600; color: var(--ink); }
.hz-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.hz-head .link { min-height: 32px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.hz-track { position: relative; height: 64px; }
.hz-line { position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--surface-2); }
:root[data-mode="dark"] .hz-line { background: var(--line); }
.hz-done { position: absolute; left: 0; top: 0; height: 1px; width: var(--w, 0%); background: var(--bar-muted); }
.hz-nodes { position: absolute; inset: 0; }
.hz-node { position: absolute; top: 0; left: var(--x); display: grid; justify-items: start; gap: 6px; }
.hz-node.end { left: auto; right: calc(100% - var(--x)); justify-items: end; text-align: right; }
.hz-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--bar-muted); margin-left: -4px; }
.hz-node.end .hz-dot { margin: 0 -4px 0 0; }
.hz-node.now .hz-dot { background: var(--ink-3); border-color: var(--ink-3); }
.hz-node.next .hz-dot { background: var(--ink); border-color: var(--ink); }
.hz-label { margin-left: -4px; padding: 2px 4px; border-radius: 6px; text-align: inherit; white-space: nowrap; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.hz-node.end .hz-label { margin: 0 -4px 0 0; }
.hz-label b { display: block; font-weight: 600; color: var(--ink-2); }
.hz-node.next .hz-label b { color: var(--ink); }
.hz-label span { display: block; }
.hz-label .main { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
@media (hover: hover) { button.hz-label:hover { background: var(--surface-2); } }
button.hz-label[aria-expanded="true"] { background: var(--surface-2); }

/* programme popover */
.prog-pop { width: 316px; padding: var(--s2); }
.pp-sec { padding: var(--s2) var(--s3) var(--s1); }
.pp-current { display: flex; align-items: center; gap: var(--s3); margin: var(--s1) var(--s2) 0; padding: var(--s3); border-radius: var(--r-sm); background: var(--surface); }
.pp-current strong { font-size: 15px; }
.pp-current span { font-size: 13px; color: var(--ink-3); }
.pp-check { flex: none; --od-icon-size: 18px; color: var(--ink); }
.pp-focus { margin: 0; padding: 0; border: 0; min-width: 0; }
.pp-focus legend { float: left; width: 100%; }
#pp-options { clear: both; display: grid; gap: 2px; padding: 0 var(--s1); }
.pp-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s2) var(--s3); border-radius: var(--r-sm); cursor: pointer; }
@media (hover: hover) { .pp-opt:hover { background: var(--surface); } }
.pp-opt input { appearance: none; -webkit-appearance: none; margin: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--bar-muted); display: grid; place-items: center; cursor: pointer; }
.pp-opt input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform var(--t-fast) var(--ease-out); }
.pp-opt input:checked { border-color: var(--ink); }
.pp-opt input:checked::after { transform: scale(1); }
.pp-opt input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pp-opt b { display: block; font-size: 15px; font-weight: 600; }
.pp-opt small { display: block; font-size: 13px; color: var(--ink-3); }
.pp-note { padding: var(--s1) var(--s3) var(--s2); font-size: 13px; color: var(--ink-3); }
.sheet .prog { margin-bottom: var(--s2); }
button.hz-label { transition: background-color var(--t-fast) var(--ease-out); }
@media (hover: hover) { button.hz-label:hover { background: var(--surface); } }
button.hz-label[aria-expanded="true"] { background: var(--surface); }

/* exam popover */
.exam-pop { width: 320px; padding: var(--s5); display: grid; gap: var(--s2); }
.exam-pop h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ex-when { display: flex; align-items: baseline; gap: var(--s2); font-size: 14px; color: var(--ink-3); }
.ex-num { font-size: 32px; font-weight: 300; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.ex-meta { font-size: 14px; color: var(--ink-2); }
.ex-progress { display: flex; align-items: center; gap: var(--s3); }

.ex-actions { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); }

/* page grid: greeting, then the body; on wide screens the column sits beside both */
.main { grid-template-columns: minmax(0, 1fr) 296px; grid-template-areas: "head aside" "body aside"; column-gap: var(--s8); row-gap: var(--s7); }
.hello { grid-area: head; }
.main-body { grid-area: body; display: grid; gap: var(--s8); align-content: start; min-width: 0; }
.aside {
  grid-area: aside; align-self: start;
  display: grid; gap: var(--s7);
  padding-top: var(--s5);
}
.aside-block { display: grid; gap: var(--s3); align-content: start; }
.quick { display: none; grid-area: quick; gap: var(--s3); }
.quick-head { display: flex; align-items: center; justify-content: space-between; }
.quick-title { font-size: var(--fs-body); font-weight: 600; }
.quick-head .link { min-height: 32px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); max-width: 520px; }

/* high-yield today */
.hy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s5); padding: var(--s5) var(--s6); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); }
.hy-text { display: grid; gap: 2px; min-width: 0; }
.hy h2 { font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em; }
.hy-why { font-size: var(--fs-small); color: var(--ink-3); }
.hy-actions { display: flex; align-items: center; gap: var(--s3); }

/* mistakes to revisit */
.mistakes { grid-column: 1 / -1; }
.mk-list { display: grid; }
.mk-list li + li { border-top: 1px solid var(--surface-2); }
.mk-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s5); row-gap: 2px; padding: var(--s3) var(--s2); margin: 0 calc(-1 * var(--s2)); border-radius: var(--r-sm); text-decoration: none; color: inherit; transition: background-color var(--t-fast) var(--ease-out); }
@media (hover: hover) { .mk-list a:hover { background: var(--bg); } .mk-list a:hover .mk-go { color: var(--ink); } }
.mk-q { grid-column: 1; font-size: 15px; color: var(--ink); }
.mk-meta { grid-column: 1; font-size: 13px; color: var(--ink-3); }
.mk-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); --od-icon-size: 16px; }

/* dialogs */
.sheet.modal { margin: auto; width: min(560px, calc(100vw - 32px)); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow); }
.sheet.modal.small { width: min(420px, calc(100vw - 32px)); }
.sheet.modal .sheet-head { align-items: flex-start; padding: 0 0 var(--s4); gap: var(--s4); }
.dlg-sub { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: var(--s2); padding-top: var(--s4); flex-wrap: wrap; }
.qa-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.qa-opt { display: grid; grid-template-columns: 22px minmax(0, 1fr) 20px; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r); background: var(--surface); text-align: left; --od-icon-size: 20px; transition: box-shadow var(--t-fast) var(--ease-out); }
.qa-opt b { display: block; font-size: 14px; font-weight: 600; }
.qa-opt small { display: block; font-size: 12px; color: var(--ink-3); }
.qa-opt .tick { width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--bar-muted); display: grid; place-items: center; color: transparent; --od-icon-size: 14px; }
.qa-opt[aria-checked="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.qa-opt[aria-checked="true"] .tick { background: var(--ink); box-shadow: none; color: var(--bg); }
.qa-opt[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.fd-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.fd-opt { display: grid; justify-items: start; gap: 0; padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--surface); text-align: left; transition: box-shadow var(--t-fast) var(--ease-out); }
.fd-opt b { font-size: 40px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.fd-opt span { font-size: 13px; color: var(--ink-3); }
@media (hover: hover) { .fd-opt:hover, .qa-opt:hover { box-shadow: inset 0 0 0 1.5px var(--bar-muted); } .qa-opt[aria-checked="true"]:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } }
.fdone-close { margin-top: var(--s2); min-height: 36px; font-size: 14px; color: var(--ink-3); }

/* focus session */
.focus-bar {
  position: fixed; z-index: 55; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.fb-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.fb-time { font-size: 20px; font-weight: 500; }
.fb-track { flex: 1; height: 3px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.fb-track span { display: block; height: 100%; width: var(--v, 0%); background: var(--ink); transition: width 1s linear; }
.focus-bar .link { min-height: 36px; font-size: 14px; }
body.focus-on .side, body.focus-on .aside, body.focus-on .utility, body.focus-on .topbar, body.focus-on .dock,
body.focus-on .quick, body.focus-on .hy, body.focus-on .main-body > :not(#tonight), body.focus-on .unread-dot,
body.focus-on .hello .eyebrow { display: none !important; }
body.focus-on .app { display: block; }
body.focus-on .page { padding-right: 0 !important; }
body.focus-on .main { max-width: 820px; margin: 0 auto; padding-top: 104px; grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "head" "body" !important; }
.quick-item {
  display: grid; justify-items: center; align-content: start; gap: var(--s2);
  min-width: 0; padding: var(--s2) var(--s1); border-radius: var(--r);
  color: var(--ink); text-align: center; text-decoration: none;
  transition: background-color var(--t-fast) var(--ease-out);
}
.qi-icon { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); color: var(--ink-2); --od-icon-size: 22px; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.qi-badge { position: absolute; top: -2px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.qi-label { display: block; max-width: 100%; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .quick-item:hover .qi-icon { background: var(--surface-2); color: var(--ink); } }
.quick-item:focus-visible { outline-offset: 0; }
.aside-bar { display: flex; align-items: center; gap: var(--s3); margin-bottom: calc(-1 * var(--s4)); }
.aside-bar .aside-title { flex: 1 1 auto; min-width: 0; }
.aside-focus { min-height: 44px; font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); }
.aside.is-collapsed .aside-focus { display: none; }
.aside-title { font-size: var(--fs-body); font-weight: 600; }
.aside-bar .icon-btn { margin-right: -10px; --od-icon-size: 18px; color: var(--ink-3); }
.aside-body { display: grid; gap: var(--s7); }
.aside-peek { align-self: start; display: grid; justify-items: center; gap: 2px; padding: var(--s3) var(--s2); border-radius: var(--r); text-align: center; transition: background-color var(--t-fast) var(--ease-out); }
.aside-peek > span { display: block; }
.aside-peek .n { font-size: 28px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.aside-peek .u { font-size: 12px; color: var(--ink-3); }
.aside-peek .what { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: var(--s2); writing-mode: vertical-rl; transform: rotate(180deg); }
@media (hover: hover) { .aside-peek:hover { background: var(--surface); } }
/* collapsed: the column becomes a slim strip holding just the next count */
.main.aside-collapsed { grid-template-columns: minmax(0, 1fr) 64px; column-gap: var(--s6); }
.aside.is-collapsed { gap: var(--s3); }
.aside.is-collapsed .aside-bar { flex-direction: column; gap: var(--s2); margin-bottom: 0; }
.aside.is-collapsed .aside-bar .aside-title { display: none; }
.aside.is-collapsed .aside-bar .icon-btn { margin: 0; transform: scaleX(-1); }

/* side class list */
.rank-head { display: grid; gap: 2px; }
.aside .rank { display: block; font-size: var(--fs-body); font-weight: 600; }
.aside .rank-of { font-size: var(--fs-small); color: var(--ink-3); }
.aside .board li { grid-template-columns: 16px 28px minmax(0, 1fr) auto; gap: var(--s3); min-height: 44px; padding: 0 var(--s2); font-size: var(--fs-small); --face: 28px; }
.aside .board .pos { font-size: var(--fs-small); }
.aside .board .pts { font-size: var(--fs-small); }
.aside .board li.you { background: var(--surface-2); color: var(--ink); }
.aside .board li.you .pos { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -3px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.aside .link { justify-self: start; min-height: 36px; font-size: var(--fs-small); }

/* calendar dots: date and exam on hover or focus */
.cal-wrap { position: relative; }
.cal-grid .d { cursor: default; }
.cal-grid .d.exam { cursor: pointer; }
.cal-grid .d:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cal-tip {
  position: absolute; z-index: 5; left: var(--x, 0); top: var(--y, 0);
  transform: translate(-50%, calc(-100% - 8px));
  display: grid; gap: 0; padding: 6px 12px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  white-space: nowrap; pointer-events: none;
  box-shadow: var(--shadow);
}
.cal-tip b { display: block; font-size: 13px; font-weight: 700; }
.cal-tip span { display: block; font-size: 12px; opacity: 0.8; }
.aside-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.aside-head .link { min-height: 32px; font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); }
.next-exam { display: grid; justify-items: start; gap: 2px; text-align: left; padding: var(--s2); margin: calc(-1 * var(--s2)); border-radius: var(--r); transition: background-color var(--t-fast) var(--ease-out); }
.next-exam > span { display: block; }
@media (hover: hover) { .next-exam:hover { background: var(--surface); } }
.next-exam[aria-expanded="true"] { background: var(--surface); }
.next-exam .n { display: flex; align-items: baseline; gap: var(--s2); }
.next-exam .n b { font-size: var(--fs-number); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.next-exam .n small { font-size: var(--fs-body); font-weight: 500; color: var(--ink-2); }
.next-exam .what { font-size: var(--fs-small); color: var(--ink-2); margin-top: var(--s1); }

.cal { gap: var(--s4); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px 4px; width: 100%; justify-items: center; }
.cal-grid .wd { font-size: var(--fs-cap); color: var(--ink-3); text-align: center; }
.cal-grid .d { width: min(100%, 26px); aspect-ratio: 1; border-radius: 50%; background: var(--surface); }
.cal-grid .d.past { background: var(--surface); opacity: 0.45; }
.cal-grid .d.past::after { content: ""; }
.cal-grid .d.today { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.cal-grid .d.exam { background: var(--accent); }
.cal-grid .d.exam.far { background: color-mix(in srgb, var(--ink) 22%, transparent); }
.cal-key { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-cap); color: var(--ink-3); }
.cal-key i { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.cal-key .k-next { background: var(--accent); }
.cal-key .k-today { margin-left: var(--s3); box-shadow: inset 0 0 0 1.5px var(--ink); }
.later { display: grid; border-top: 1px solid var(--line); }
.later li { border-bottom: 1px solid var(--line); }
:root[data-mode="dark"] .later, :root[data-mode="dark"] .later li { border-color: var(--surface-2); }
.later li:last-child { border-bottom: 0; }
.later button { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); width: 100%; min-height: 44px; padding: var(--s2) 0; text-align: left; font-size: var(--fs-small); color: var(--ink-2); }
.later button b { font-weight: 600; color: var(--ink); }
.later button .mono { font-size: 13px; color: var(--ink-3); flex: none; }
@media (hover: hover) { .later button:hover b { text-decoration: underline; text-underline-offset: 3px; } }
.later .muted b { color: var(--ink-2); font-weight: 500; }

.mini { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.mini .k { font-size: 13px; color: var(--ink-3); }
.mini .v { font-size: 28px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; }
.mini .v small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-left: 4px; }
@media (hover: hover) { a.mini:hover .v { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; } }
.faces { display: flex; --face: 30px; }
.faces .face { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg); }
.faces .face:first-child { margin-left: 0; }
.main { grid-template-columns: minmax(0, 1fr) 264px; }


/* chapters: more air between them than inside them */
.chapter { display: grid; gap: var(--s5); }
.chapter-title { font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

/* plan */
.panel { background: var(--surface); border-radius: var(--r-lg); padding: var(--s6); }
.plan { --step-indent: calc(44px + var(--s4)); }
.plan-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: var(--s4); row-gap: var(--s2); margin-bottom: var(--s5); }
.plan-head .plan-title { font-size: var(--fs-title); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.plan-head > .bar { grid-column: 1 / -1; width: auto; margin-left: var(--step-indent); }

/* the one progress component: every bar on the page shares height, track, radius and label */
.bar { position: relative; height: 6px; width: 100%; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.bar-label { flex: none; font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar > span { display: block; height: 100%; width: var(--v, 0%); border-radius: inherit; transition: width var(--t) var(--ease-out); }

.steps { display: grid; }
.step {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center;
  column-gap: var(--s4); row-gap: var(--s3);
  padding: var(--s3) 0; border-top: 1px solid var(--line);
  animation: row-in var(--t) var(--ease-out) both;
}
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
:root[data-mode="dark"] .step { border-top-color: var(--surface-2); }
.step:first-child { border-top: 0; }
.tick { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); --od-icon-size: 16px; }
.tick .ring {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill);
  border: 1.5px solid var(--bar-muted); color: transparent;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.tick[aria-pressed="true"] .ring { background: var(--ink); border-color: var(--ink); color: var(--bg); } /* done is ink: the accent stays on what is next */
@media (hover: hover) { .tick[aria-pressed="false"]:hover .ring { border-color: var(--ink); color: var(--ink-3); } }
.step > .od-field { --od-gap: var(--s1); }
.step-title { font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }
.step-meta { font-size: var(--fs-small); color: var(--ink-3); }
.step.is-done .step-title { color: var(--ink-3); font-weight: 500; }
.step-progress { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s1); max-width: 280px; }

.step-actions { display: flex; align-items: center; gap: var(--s1); justify-content: flex-end; }
.step-actions .icon-btn { --od-icon-size: 16px; }

.plan-foot { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
:root[data-mode="dark"] .plan-foot { border-top-color: var(--surface-2); }
.add-form { display: grid; gap: var(--s2); max-width: 560px; padding: var(--s2) 0; }
.add-form label { font-size: 14px; font-weight: 600; }
.add-row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.field {
  flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 0 var(--s4);
  border: 1px solid var(--bar-muted); border-radius: var(--r-pill); background: var(--bg);
}
.field:focus-visible { outline-offset: 0; }
.field[aria-invalid="true"] { border-color: var(--ink); border-width: 2px; }
.field-error { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; gap: var(--s2); align-items: center; --od-icon-size: 16px; }
.plan-done { padding: var(--s4) 0 var(--s2) var(--step-indent); display: grid; gap: var(--s1); }
.plan-done p { color: var(--ink-2); }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: grid; gap: var(--s2); align-content: start; padding: 0 var(--s5); border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-label { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.stat-link { min-height: 0; font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); }
.card-label { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.quest-main { font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em; }
.stat-value { font-size: clamp(40px, 4vw, 52px); font-weight: 300; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.stat-value small { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-left: 2px; }
.stat-cap { font-size: 14px; color: var(--ink-3); }
.stat .bar { margin-top: var(--s1); }
.spark { display: block; width: 100%; height: 28px; margin-top: var(--s1); }
.spark path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* quest: the plan panel's last row */
.quest {
  display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap;
  margin-top: var(--s4); padding: var(--s4) var(--s4) var(--s4) var(--s5);
  background: var(--bg); border-radius: var(--r);
}
.quest-text { flex: 1 1 280px; min-width: 0; display: grid; gap: 2px; }
.quest-text strong { font-size: 16px; font-weight: 600; }
.quest-text span { font-size: 14px; color: var(--ink-3); }
.quest-actions { display: flex; align-items: center; gap: var(--s2); }

/* secondary */
.secondary { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s5); }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 32px; }
.card-top .link { min-height: 32px; font-size: 14px; font-weight: 500; color: var(--ink-3); }

/* level */
.lvl { display: flex; align-items: center; gap: var(--s4); }
.lvl-n { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--ink); font-size: 30px; font-weight: 300; letter-spacing: -0.02em; flex: none; }
.lvl b { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.lvl .mono { font-size: 13px; color: var(--ink-3); }
.lvl-track { display: grid; gap: var(--s2); }
.lvl-ends { display: flex; justify-content: space-between; gap: var(--s3); font-size: 13px; color: var(--ink-3); }
.xp-ways { display: grid; border-top: 1px solid var(--surface-2); }
.xp-ways li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--surface-2); font-size: 14px; color: var(--ink-2); }
.xp-ways li:last-child { border-bottom: 0; }
.xp-ways .mono { color: var(--ink-3); }

/* daily quest */
.q-streak { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); --od-icon-size: 16px; }

.q-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.q-facts .od-stat { padding: 0 var(--s3); border-left: 1px solid var(--surface-2); }
.q-facts .od-stat:first-child { padding-left: 0; border-left: 0; }
.q-facts b { font-size: 22px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.q-facts .od-stat > span { font-size: 12px; color: var(--ink-3); }
.q-from { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s3); }
.q-from-label { font-size: 14px; color: var(--ink-3); }
.pick { position: relative; }
.pick-btn {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  width: 100%; min-height: 44px; padding: 0 var(--s3) 0 var(--s4);
  border-radius: var(--r-pill); background: var(--bg); color: var(--ink);
  font-size: 15px; font-weight: 500; text-align: left;
  box-shadow: inset 0 0 0 1px var(--surface-2);
  transition: box-shadow var(--t-fast) var(--ease-out);
  --od-icon-size: 16px;
}
.pick-btn .od-icon { color: var(--ink-3); }
.pick-btn[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--bar-muted); }
@media (hover: hover) { .pick-btn:hover { box-shadow: inset 0 0 0 1px var(--bar-muted); } }
.pick-btn:disabled { color: var(--ink-3); cursor: not-allowed; box-shadow: inset 0 0 0 1px var(--surface-2); }
.pick-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  display: grid; gap: 2px; padding: var(--s1);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
  animation: pop-in var(--t) var(--ease-out);
}
.pick-list:focus { outline: none; }
.pick-list li { display: grid; gap: 0; padding: var(--s2) var(--s3); border-radius: var(--r-sm); cursor: pointer; }
.pick-list li span { font-size: 15px; color: var(--ink); }
.pick-list li small { font-size: 12px; color: var(--ink-3); }
.pick-list li.is-active { background: var(--surface); }
.pick-list li[aria-selected="true"] span { font-weight: 600; }
.pick-list li[aria-selected="true"] span::after { content: "  ✓"; color: var(--ink-3); font-weight: 500; }
.quest-card .quest-actions { justify-content: flex-start; }
.q-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s1); padding-top: var(--s3); border-top: 1px solid var(--surface-2); }
.q-week li { display: grid; justify-items: center; gap: 2px; }
.q-week li span { font-size: 11px; color: var(--ink-3); }
.q-week li b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); background: var(--bg); }
.q-week li.missed b { color: var(--ink-3); background: transparent; }
.q-week li.today b { box-shadow: inset 0 0 0 1.5px var(--ink); background: transparent; }

/* accuracy by topic */
.acc { display: grid; gap: var(--s3); }
.acc li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 4px var(--s3); align-items: center; }
.acc .t { font-size: 14px; color: var(--ink-2); grid-column: 1; }
.acc .v { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.acc .track { grid-column: 1; height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.acc .track span { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--ink-2); }
.acc li.weak .track span { background: var(--ink); }
.acc li.weak .t { color: var(--ink); font-weight: 600; }
.acc .drill { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: var(--s2); text-decoration: underline; text-underline-offset: 3px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s6); display: grid; gap: var(--s4); align-content: start; }
.card h3:not(.card-label) { font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em; }
.card-sub { font-size: 14px; color: var(--ink-3); }
.card-head { display: grid; gap: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: 13px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.sw-met { background: var(--accent-line); }
.sw-below { background: var(--bar-muted); }
.sw-goal { width: 16px; height: 0; border-top: 1.5px dashed var(--ink-2); border-radius: 0; }
.chart { display: block; width: 100%; height: auto; }
.chart .b-met { fill: var(--accent-line); }
.chart .b-below { fill: var(--bar-muted); }
.chart .goal { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .tick-l { font-family: var(--mono); font-size: 11px; fill: var(--ink-3); }
.chart .tick-today { font-family: var(--font); font-size: 11px; font-weight: 700; fill: var(--ink); }
.chart .goal-l { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }
.card .link { justify-self: start; }

.rank { display: flex; align-items: baseline; gap: var(--s2); }
.rank-n { font-size: 52px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.rank-of { font-size: 16px; color: var(--ink-3); }
.board { display: grid; }
.board li { display: grid; grid-template-columns: 20px 32px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s3); border-radius: var(--r-sm); font-size: 15px; --face: 32px; }
.board .pos, .board .pts { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.board .pos { color: var(--ink-3); font-size: 13px; }
.board .pts { font-weight: 600; }
.board li.you { background: var(--bg); font-weight: 700; }

.posting { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s6); align-items: center; }
.posting h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.when-block { display: grid; justify-items: center; align-content: center; gap: 2px; width: 96px; padding: var(--s4) 0; border-radius: var(--r); background: var(--bg); }
.when-block .num { font-size: 40px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.when-block .unit { font-size: 13px; color: var(--ink-3); }
.when-block .date { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-top: var(--s1); }
.posting-progress { display: flex; align-items: center; gap: var(--s3); max-width: 360px; margin-top: var(--s3); }
.posting-progress .mono { font-size: 13px; color: var(--ink-3); flex: none; }
.posting-actions { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.ask { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; padding-top: var(--s5); border-top: 1px solid var(--line); }
.ask strong { display: block; font-size: 16px; }
.ask span { display: block; font-size: 14px; color: var(--ink-3); }
.ask-actions { display: flex; align-items: center; gap: var(--s4); }
.ask-actions .meta { font-size: 14px; color: var(--ink-3); }

/* ---------- popovers: account menu and inbox ---------- */
.pop {
  position: fixed; z-index: 40;
  max-width: calc(100vw - 32px);
  padding: var(--s2);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
  animation: pop-in var(--t) var(--ease-out);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.pop.is-leaving { animation: pop-out var(--t-exit) var(--ease-in) forwards; }
@keyframes pop-out { to { opacity: 0; transform: translateY(4px) scale(0.98); } }
.menu { left: var(--s4); bottom: 88px; width: 304px; transform-origin: bottom left; }
.menu-head { padding: var(--s3); display: grid; gap: var(--s3); }
.who { display: flex; align-items: center; gap: var(--s3); --face: 44px; }
.who strong { display: block; font-size: 15px; }
.who span { display: block; font-size: 13px; color: var(--ink-3); }
.level { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-sm); background: var(--surface); }
.level-top { display: flex; justify-content: space-between; gap: var(--s2); font-size: 14px; }
.level-top strong { font-weight: 600; }
.level-cap { font-size: 13px; color: var(--ink-3); }
.menu-sep { height: 1px; background: var(--line); margin: var(--s2) 0; }
.menu-item {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; min-height: 44px; padding: 0 var(--s3);
  border-radius: var(--r-sm); font-size: 15px; text-align: left;
  --od-icon-size: 18px;
}
.menu-item .od-icon { color: var(--ink-3); }
.menu-item .switch { margin-left: auto; }
@media (hover: hover) { .menu-item:hover { background: var(--surface); } }
.themes { display: grid; gap: var(--s2); padding: var(--s2) var(--s3) var(--s1); }
.tint-row { padding: var(--s2) 0; min-height: 52px; }
.tint-row small { display: block; font-size: 12px; color: var(--ink-3); }
.accent-row { display: flex; justify-content: space-between; gap: var(--s1); padding-bottom: var(--s1); }
.acc-opt { display: grid; justify-items: center; gap: 6px; padding: 2px 0; font-size: 11px; color: var(--ink-3); flex: 1; min-width: 0; }
.acc-opt[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.acc-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px rgb(127 127 127 / 0.25); transition: box-shadow var(--t-fast) var(--ease-out); }
.acc-opt[aria-checked="true"] .acc-dot { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--ink); }
@media (hover: hover) { .acc-opt:hover .acc-dot { box-shadow: 0 0 0 2px var(--raised), 0 0 0 3px var(--bar-muted); } .acc-opt[aria-checked="true"]:hover .acc-dot { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--ink); } }
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2) var(--s1); }
.theme-opt { display: grid; justify-items: center; gap: 6px; padding: var(--s1) 0; border-radius: var(--r-sm); font-size: 12px; color: var(--ink-3); }
.theme-opt[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.swatch { position: relative; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--sw-bg); box-shadow: inset 0 0 0 1px rgb(127 127 127 / 0.3); transition: box-shadow var(--t-fast) var(--ease-out); }
.swatch::before { content: ""; position: absolute; inset: 0 0 0 50%; background: var(--sw-card); }
.swatch::after { content: ""; position: absolute; right: 7px; bottom: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--sw-acc); box-shadow: 0 0 0 1.5px var(--sw-card); }
.swatch.system { background: linear-gradient(135deg, #FAFAFA 50%, #0F1011 50%); }
.swatch.system::before { display: none; }
.theme-opt[aria-checked="true"] .swatch { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--ink); }
@media (hover: hover) { .theme-opt:hover .swatch { box-shadow: 0 0 0 2px var(--raised), 0 0 0 3px var(--bar-muted); } .theme-opt[aria-checked="true"]:hover .swatch { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--ink); } }
.menu { width: 336px; }
.switch { position: relative; width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--surface-2); flex: none; transition: background-color var(--t-fast) var(--ease-out); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--raised); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform var(--t-fast) var(--ease-out); }
[aria-checked="true"] .switch { background: var(--ink); }
[aria-checked="true"] .switch::after { transform: translateX(16px); background: var(--bg); }

.inbox { top: 64px; right: clamp(24px, 4vw, 64px); width: 380px; transform-origin: top right; padding: 0; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s3) var(--s2) var(--s4); }
.inbox-head h2 { font-size: 16px; font-weight: 700; }
.inbox-head .link { min-height: 36px; font-size: 14px; }
.inbox-list { max-height: min(420px, 60dvh); overflow-y: auto; padding: 0 var(--s2) var(--s2); }
.inbox-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) 8px; gap: var(--s3); align-items: start; width: 100%; text-align: left; padding: var(--s3); border-radius: var(--r-sm); --face: 36px; }
@media (hover: hover) { .inbox-item:hover { background: var(--surface); } }
.inbox-item .what { font-size: 14px; line-height: 1.45; }
.inbox-item .what b { font-weight: 700; }
.inbox-item .when { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.inbox-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); margin-top: 8px; }
.inbox-item.read .dot { visibility: hidden; }
.inbox-item.read .what { color: var(--ink-2); }
.sys-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); --od-icon-size: 18px; }

/* ---------- Galen rail ---------- */
.rail {
  position: sticky; top: 0; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
  background: var(--bg);
  animation: rail-in var(--t) var(--ease-out);
}
@keyframes rail-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.rail-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.rail-head .galen-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); --od-icon-size: 18px; }
.rail-head strong { display: block; font-size: 16px; }
.rail-head span { display: block; font-size: 13px; color: var(--ink-3); }
.rail-body { overflow-y: auto; padding: var(--s5); display: grid; gap: var(--s4); align-content: start; }
.rail-intro { font-size: 15px; color: var(--ink-2); }
.suggest { display: grid; gap: var(--s2); }
.suggest button { text-align: left; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface); font-size: 14px; font-weight: 500; min-height: 44px; transition: background-color var(--t-fast) var(--ease-out); }
@media (hover: hover) { .suggest button:hover { background: var(--surface-2); } }
.msg { max-width: 92%; padding: var(--s3) var(--s4); border-radius: var(--r); font-size: 15px; line-height: 1.5; animation: row-in var(--t) var(--ease-out) both; }
.msg.me { justify-self: end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.msg.galen { justify-self: start; background: var(--surface); border-bottom-left-radius: 4px; }
.rail-foot { padding: var(--s3) var(--s4) var(--s4); border-top: 1px solid var(--line); display: grid; gap: var(--s2); }
.rail-foot label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.ask-row { display: flex; gap: var(--s2); align-items: center; }
.ask-row .field { flex: 1 1 auto; }
.ask-row .icon-btn { background: var(--ink); color: var(--bg); --od-icon-size: 18px; }
@media (hover: hover) { .ask-row .icon-btn:hover { background: var(--ink-2); color: var(--bg); } }

/* ---------- more sheet ---------- */
.sheet {
  border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%;
  background: var(--raised); color: var(--ink);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
  max-height: 80dvh; overflow-y: auto;
}
.sheet::backdrop { background: var(--scrim); }
.sheet[open] { animation: sheet-in var(--t) var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--surface-2); margin: 0 auto var(--s3); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s2) var(--s2); }
.sheet-head h2 { font-size: 18px; font-weight: 700; }
.sheet .nav { gap: var(--s4); }

/* ---------- More: an iOS-style grouped sheet ---------- */
.sheet.more { background: var(--bg); max-height: 90dvh; padding: var(--s2) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom)); }
.more-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s1) var(--s4); --face: 52px; }
.more-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.more-head .od-field > span { font-size: 14px; color: var(--ink-3); }
.group { display: grid; border-radius: var(--r); background: var(--raised); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
:root[data-mode="dark"] .group { background: var(--surface); }
.group + .group { margin-top: var(--s4); }
.group-label { padding: var(--s5) var(--s3) var(--s2); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.row {
  position: relative; display: flex; align-items: center; gap: var(--s3);
  min-height: 52px; padding: var(--s2) var(--s3) var(--s2) var(--s3);
  width: 100%; text-align: left; color: var(--ink); text-decoration: none;
  --od-icon-size: 18px; transition: background-color var(--t-fast) var(--ease-out);
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--line); }
.row:active { background: var(--surface-2); }
@media (hover: hover) { .row:hover { background: var(--surface); } :root[data-mode="dark"] .row:hover { background: var(--surface-2); } }
.row-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); }
.prog-ic { background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; }
.row-t { flex: 1; min-width: 0; display: grid; }
.row-t b { font-size: 16px; font-weight: 500; }
.row-t small { font-size: 13px; color: var(--ink-3); }
.row-end { font-size: 14px; color: var(--ink-3); }
.row > .od-icon:last-child { --od-icon-size: 16px; color: var(--bar-muted); }
.row.danger, .menu-item.danger { color: var(--danger); }
.row.danger .row-ic { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.more-foot { padding: var(--s4) var(--s3) 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.btn-danger { background: var(--danger); color: #fff; }
@media (hover: hover) { .btn-danger:hover { filter: brightness(1.08); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: var(--s5);
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: var(--s3) var(--s5);
  border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow);
  animation: toast-in var(--t) var(--ease-out);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- wide screens: a three-part frame. The sidebar and the right column stay put at the window's height;
   only the middle scrolls. The right column fits itself to that height. ---------- */
@media (min-width: 1241px) {
  :root { --aside-w: 288px; }
  .app.aside-collapsed { --aside-w: 72px; }
  .page { padding-right: var(--aside-w); transition: padding-right var(--t) var(--ease-out); }
  /* only a page that has the right column keeps room for it; every other page uses the full width */
  .app:not(:has(.aside)) .page { padding-right: 0; }
  /* the middle sits centred in whatever room the two sides leave, and grows a little when both are folded */
  .main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body"; max-width: 1080px; margin-inline: auto; transition: max-width var(--t) var(--ease-out); }
  .app.side-collapsed .main, .app.aside-collapsed .main { max-width: 1160px; }
  .app.side-collapsed.aside-collapsed .main { max-width: 1240px; }
  .app.aside-collapsed .quick-grid { max-width: none; grid-template-columns: repeat(4, minmax(0, 132px)); justify-content: start; }
  .app.aside-collapsed .main { grid-template-areas: "head" "quick" "body"; }
  .app.aside-collapsed .quick { display: grid; }
  .main.aside-collapsed { grid-template-columns: minmax(0, 1fr); }
  .aside {
    position: fixed; z-index: 12; top: 0; right: 0; bottom: 0;
    width: var(--aside-w); height: 100dvh;
    display: grid; grid-template-rows: auto minmax(0, 1fr);
    gap: var(--s4);
    padding: var(--s5) var(--s5) var(--s5);
    background: var(--bg);
    border-left: 1px solid var(--line);
    overflow: hidden;
  }
  .aside-bar { margin-bottom: 0; min-height: 44px; }
  .aside-body {
    min-height: 0;
    display: grid; grid-template-rows: auto auto minmax(0, 1fr);
    gap: clamp(16px, 3.6vh, 40px);
  }
  .cal-grid { gap: clamp(4px, 0.9vh, 8px) 4px; }
  /* the class list takes what height is left, and keeps its rows inside it */
  /* the class block fills what is left: its list grows, and "Full leaderboard" sits on the column's floor */
  .aside-body > .aside-block:last-child { min-height: 0; height: 100%; align-content: stretch; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .aside-body > .aside-block:last-child > .link { align-self: end; }
  .aside .board { min-height: 132px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; align-content: start; }
  .aside .board::-webkit-scrollbar { display: none; }
  .aside.is-collapsed { padding: var(--s5) var(--s2); justify-items: center; }
  .aside-body { overflow-y: auto; scrollbar-width: none; }
  .aside-body::-webkit-scrollbar { display: none; }
  .app.rail-open .aside { display: none; }
  .app.rail-open .page { padding-right: 0; }
}

/* shorter laptop screens: the column tightens so the class list keeps at least three rows */
@media (min-width: 1241px) and (max-height: 860px) {
  .aside { gap: var(--s3); padding-top: var(--s4); padding-bottom: var(--s4); }
  .aside-body { gap: var(--s4); }
  .next-exam .what { margin-top: 2px; }
  .cal { gap: var(--s2); }
  .cal-grid { gap: 4px; }
  .cal-grid .d { width: min(100%, 20px); }
  .later button { min-height: 36px; padding: 4px 0; }
  .aside .board li { min-height: 36px; --face: 24px; }
  .aside .board { min-height: 108px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1320px) {
  .app.rail-open { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .app.rail-open .rail { position: fixed; right: 0; top: 0; bottom: 0; width: min(var(--rail-w), 100vw); z-index: 45; box-shadow: var(--shadow); }
}
@media (max-width: 1240px) {
  .main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "quick" "body" "aside"; }
  .quick { display: grid; }
  .aside { padding-top: var(--s6) !important; border-top: 1px solid var(--line); }
  .aside { position: static; padding-top: 0; gap: var(--s5); }
  .aside-body { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); align-items: start; }
  .aside-bar { margin-bottom: 0; }
  .main.aside-collapsed { grid-template-columns: minmax(0, 1fr); }
  .aside.is-collapsed .aside-bar { flex-direction: row; }
  .aside.is-collapsed .aside-bar .aside-title { display: block; }
  .aside.is-collapsed .aside-bar .icon-btn { transform: rotate(90deg); }
  .aside.is-collapsed .aside-bar .icon-btn[aria-expanded="false"] { transform: rotate(-90deg); }
  .aside-peek { grid-template-columns: auto auto auto; justify-content: start; align-items: baseline; gap: var(--s2); text-align: left; padding: var(--s2) 0; }
  .aside-peek .what { writing-mode: horizontal-tb; transform: none; margin-top: 0; }
}
@media (max-width: 1000px) {
  .duo, .secondary { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .aside-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside-body > .aside-block:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
  :root { --side-w: 232px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s6); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 767px) {
  .app, .app.rail-open { display: block; }
  .side, .utility { display: none; }
  .topbar {
    display: flex; align-items: center; gap: var(--s1);
    position: sticky; top: 0; z-index: 20;
    padding: var(--s2) var(--s2) var(--s2) var(--s4);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; }
  .topbar .acct-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); --face: 34px; }
  /* the dock's clearance only: its height, plus the same 14-16px gap it keeps from the screen edge */
  .main { padding: var(--s6) var(--s4) calc(var(--dock-h) + var(--s4) + env(safe-area-inset-bottom)); row-gap: var(--s6); }
  .main-body { gap: var(--s7); }
  .hello { padding-top: var(--s2); }
  .hz-track { height: auto; }
  .hz-head { align-items: flex-start; }
  .hz-line { left: 4px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .hz-done { width: 1px; height: var(--h, 0%); }
  .hz-nodes { position: static; display: grid; gap: var(--s3); }
  .hz-node, .hz-node.end { position: static; grid-template-columns: 9px minmax(0, 1fr); align-items: start; column-gap: var(--s3); justify-items: start; text-align: left; }
  .hz-node .hz-dot, .hz-node.end .hz-dot { margin: 5px 0 0; }
  .hz-node .hz-label, .hz-node.end .hz-label { margin: 0 0 0 -4px; }
  .exam-pop, .prog-pop { width: calc(100vw - 32px); }
  .horizon { padding: var(--s4) var(--s5); }
  .hz-summary { font-size: 16px; }
  .hello h1 { font-size: 52px; letter-spacing: -0.04em; }
  .panel, .card { padding: var(--s5); border-radius: 20px; }
  .plan-head { align-items: flex-start; flex-direction: column; gap: var(--s3); }

  .step { grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--s3); }
  .plan { --step-indent: calc(44px + var(--s3)); }
  .step-actions { grid-column: 2; justify-content: flex-start; }
  .stat { padding: 0 var(--s4); }
  .stat-value { font-size: 40px; }
  .quest { border-radius: 20px; padding: var(--s4) var(--s5); }
  .posting { grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); }
  .posting-actions { grid-column: 1 / -1; }
  .when-block { width: 80px; }
  .posting-actions { justify-content: flex-start; }
  /* ==dock== (6 Nov, HAL-5113) The phone dock, the iOS 26 way, after UI OAR (native Liquid Glass tabs on the iPhone,
     its glass dock on the web). A floating capsule clear of the bottom and the sides, with More detached beside it as
     its own round of glass: Today, Learn, Practice | a raised Mock | Review (due count), Intel; More (inbox count).
     The current place sits in a lens of lighter, clear glass and opens into its name in the accent; the others are icons.
     Scrolling down shrinks the bar to the current place alone, More with it; scrolling up, reaching the top or tapping
     the pill brings it back (shell.js sets data-min; a page opts out with data-dock="still"). Every move rides one
     spring (--spring). The glass is thick: a rim lit on top and shaded underneath, a specular light that follows the
     lens and drifts with scroll or tilt, the backdrop bent and brightened at the edges (Chromium, #glass-bend), and a
     tint that turns light or dark by what is under it (shell.js sets data-behind and data-busy). The same glass makes
     the bottom sheets (with a grabber, rising on the spring) and the large-title top bar, which collapses into a
     compact glass bar on scroll. */
  .dockbar {
    --dk: clamp(34px, 9.4vw, 44px);
    --dk-ink: rgb(20 22 26 / 0.8); --dk-ring: rgb(250 250 251);
    --dk-on: var(--ink);
    --ln-top: rgb(255 255 255 / 0.86); --ln-bot: color-mix(in srgb, var(--accent) 12%, rgb(255 255 255 / 0.56));
    --ln-rim: rgb(255 255 255 / 0.98); --ln-lo: rgb(0 0 0 / 0.09); --ln-glow: rgb(255 255 255 / 0.7); --ln-shade: rgb(0 0 0 / 0.12);
    interpolate-size: allow-keywords;
    display: flex; align-items: flex-end; gap: 6px;
    position: fixed; z-index: 30; left: 50%;
    bottom: max(14px, calc(6px + env(safe-area-inset-bottom)));
    max-width: calc(100vw - 2 * max(6px, env(safe-area-inset-left), env(safe-area-inset-right)));
    transform: translateX(-50%); transform-origin: 50% 100%;
    transition: scale var(--spring-t) var(--spring);
  }
  .glass {
    --g-tint: rgb(255 255 255 / var(--g-a, 0.42));
    --g-hi: rgb(255 255 255 / 0.95);
    --g-lo: rgb(18 20 24 / 0.16);
    --g-edge: rgb(255 255 255 / 0.42);
    --g-glow: rgb(255 255 255 / 0.6);
    --g-shade: rgb(12 13 14 / 0.12);
    --g-spec: rgb(255 255 255 / 0.66);
    --g-bright: 1.12;
    position: relative; isolation: isolate;
    background: linear-gradient(180deg, var(--g-tint), color-mix(in srgb, var(--g-tint) 70%, transparent));
    backdrop-filter: blur(12px) saturate(1.9) brightness(var(--g-bright));
    -webkit-backdrop-filter: blur(12px) saturate(1.9) brightness(var(--g-bright));
    box-shadow:
      inset 0 1.5px 0 var(--g-hi),
      inset 0 -1.5px 0 var(--g-lo),
      inset 0 0 0 1px var(--g-edge),
      inset 0 10px 14px -12px var(--g-glow),
      inset 0 -10px 14px -12px var(--g-lo),
      0 1px 1px var(--g-shade), 0 6px 14px var(--g-shade), 0 18px 40px var(--g-shade);
  }
  /* the specular light: a soft spot on the upper face, over the lens, nudged by scroll or tilt */
  .glass::before {
    content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none; z-index: -1;
    background:
      radial-gradient(42% 90% at var(--spec-x) calc(-24% + var(--spec-y)), var(--g-spec), transparent 70%),
      radial-gradient(70% 60% at calc(100% - var(--spec-x)) 128%, color-mix(in srgb, var(--g-spec) 40%, transparent), transparent 70%);
    transition: --spec-x var(--spring-t) var(--spring), --spec-y 300ms var(--ease-out);
  }
  /* the rim: a thin ring, bright where the light catches the top edge, darker along the bottom */
  .glass::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; padding: 1.5px;
    background: linear-gradient(180deg, var(--g-hi), color-mix(in srgb, var(--g-hi) 20%, transparent) 38%, transparent 62%, var(--g-lo));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
  /* over something dark (or in dark mode): smoky glass, light icons, a lens of faint light */
  .dockbar[data-behind="dark"], :root[data-mode="dark"] .dockbar:not([data-behind]) {
    --dk-ink: rgb(255 255 255 / 0.88); --dk-ring: rgb(32 34 38); --dk-on: rgb(255 255 255);
    --ln-top: rgb(255 255 255 / 0.26); --ln-bot: color-mix(in srgb, var(--accent) 10%, rgb(40 44 52 / 0.5));
    --ln-rim: rgb(255 255 255 / 0.42); --ln-lo: rgb(0 0 0 / 0.3); --ln-glow: rgb(255 255 255 / 0.16); --ln-shade: rgb(0 0 0 / 0.3);
  }
  .dockbar[data-behind="dark"] .glass, :root[data-mode="dark"] .dockbar:not([data-behind]) .glass {
    --g-tint: rgb(30 32 36 / var(--g-a, 0.5));
    --g-hi: rgb(255 255 255 / 0.36);
    --g-lo: rgb(0 0 0 / 0.42);
    --g-edge: rgb(255 255 255 / 0.11);
    --g-glow: rgb(255 255 255 / 0.15);
    --g-shade: rgb(0 0 0 / 0.42);
    --g-spec: rgb(255 255 255 / 0.22);
    --g-bright: 1.04;
  }
  @supports (color: oklch(from red l c h)) {
    /* the current place's name in the accent, held dark enough to read on light glass and light enough on dark */
    .dockbar { --dk-on: oklch(from var(--accent) min(l, 0.42) c h); }
    .dockbar[data-behind="dark"], :root[data-mode="dark"] .dockbar:not([data-behind]) { --dk-on: oklch(from var(--accent) max(l, 0.9) min(c, 0.1) h); }
  }
  /* how thick the tint is follows what is under it (shell.js sets --g-a): thin over white or black, thicker over the
     mid tones and over photos, the halftone or a gradient, so the icons and the current place's name always hold */
  /* Chromium bends what is under the glass at its edges (#glass-bend, an edge-weighted displacement map), after the blur */
  :root.glass-bend .glass { backdrop-filter: blur(10px) saturate(1.9) brightness(var(--g-bright)) url(#glass-bend); }
  .dock { display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: var(--r-pill); --spec-x: 30%; --spec-y: 0px; transition: padding var(--spring-t) var(--spring), gap var(--spring-t) var(--spring), opacity 200ms var(--ease-out); }
  .dock-item {
    position: relative; z-index: 1; flex: none;
    display: flex; align-items: center; justify-content: center; gap: 0;
    width: auto; height: var(--dk); min-width: var(--dk); padding: 0 calc((var(--dk) - var(--od-icon-size)) / 2);
    border-radius: var(--r-pill);
    color: var(--dk-ink); text-decoration: none;
    --od-icon-size: clamp(19px, 5.2vw, 22px);
    transition: color 280ms var(--ease-out), padding var(--spring-t) var(--spring), gap var(--spring-t) var(--spring),
      width var(--spring-t) var(--spring), min-width var(--spring-t) var(--spring), opacity 200ms var(--ease-out), transform 160ms var(--ease-out);
  }
  .dock-item .dl {
    display: block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
    font-size: clamp(12px, 3.4vw, 14px); font-weight: 650; letter-spacing: -0.01em;
    transition: max-width var(--spring-t) var(--spring), opacity 200ms var(--ease-out);
  }
  .dock-item[aria-current="page"] { color: var(--dk-on); gap: 6px; padding: 0 12px 0 10px; }
  .dock-item[aria-current="page"] .dl { max-width: var(--dlw, 80px); opacity: 1; }
  .dock-item[aria-current="page"] .od-icon { stroke-width: 2.1; }
  .dock-item:active, .dock-more:active, .dock-mock:active .dock-orb { transform: scale(0.94); }
  @media (hover: hover) { .dock-item:not([aria-current="page"]):hover { opacity: 0.8; } }
  /* counts: small accent badges on the icon, ringed in the glass so they read on anything */
  .dock-count {
    position: absolute; top: 1px; right: 0; z-index: 4;
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-pill);
    background: var(--accent); color: var(--accent-ink);
    font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px var(--dk-ring);
    transition: opacity 200ms var(--ease-out);
  }
  .dock-item[aria-current="page"] .dock-count { top: -3px; right: -3px; }
  /* the lens: a piece of lighter, clear glass with its own rim and an inner glow, a breath of the accent in it;
     it springs to the current place and stretches as it glides */
  .dock-lens {
    position: absolute; z-index: 0; top: 5px; left: 0; height: var(--dk); width: var(--lw, var(--dk));
    transform: translateX(var(--lx, 5px));
    border-radius: var(--r-pill);
    background: radial-gradient(80% 70% at 50% 0%, var(--ln-glow), transparent 72%), linear-gradient(180deg, var(--ln-top), var(--ln-bot));
    box-shadow: inset 0 1px 0 var(--ln-rim), inset 0 -1px 0 var(--ln-lo), inset 0 0 0 0.5px var(--ln-lo), inset 0 0 12px var(--ln-glow), 0 1px 2px var(--ln-shade), 0 4px 12px var(--ln-shade);
    transition: transform var(--spring-t) var(--spring), width var(--spring-t) var(--spring), scale 240ms var(--ease-out), opacity 200ms var(--ease-out);
  }
  .dock-lens.is-gliding { scale: 1.12 0.9; }
  .dockbar.is-morphing .dock-lens { transition: scale 240ms var(--ease-out), opacity 200ms var(--ease-out); }
  .dock[data-on="mock"] .dock-lens, .dock[data-on="more"] .dock-lens, .dock[data-on=""] .dock-lens { opacity: 0; scale: 0.6; }
  /* the raised Mock: a deeper round of the same glass, sitting above the bar, the accent inside */
  .dock-mock {
    position: relative; z-index: 5; flex: none; display: block; width: calc(var(--dk) * 1.4); height: var(--dk); color: var(--accent-ink); text-decoration: none;
    transition: width var(--spring-t) var(--spring), opacity 200ms var(--ease-out);
  }
  .dock-orb {
    position: absolute; left: 50%; top: calc(var(--dk) * -0.74); width: calc(var(--dk) * 1.4); aspect-ratio: 1; margin-left: calc(var(--dk) * -0.7);
    display: grid; place-items: center; border-radius: 50%;
    transition: transform 200ms var(--ease-out), top var(--spring-t) var(--spring), scale var(--spring-t) var(--spring), opacity 200ms var(--ease-out);
  }
  .dock-orb.glass { --g-tint: rgb(255 255 255 / 0.6); box-shadow: inset 0 1.5px 0 var(--g-hi), inset 0 -2px 0 var(--g-lo), inset 0 0 0 1px var(--g-edge), inset 0 12px 16px -12px var(--g-glow), 0 2px 3px var(--g-shade), 0 10px 22px var(--g-shade), 0 22px 44px var(--g-shade); }
  .dockbar[data-behind="dark"] .dock-orb.glass, :root[data-mode="dark"] .dockbar:not([data-behind]) .dock-orb.glass { --g-tint: rgb(30 32 36 / 0.66); }
  .dock-orb-core {
    display: grid; place-items: center; width: 74%; aspect-ratio: 1; border-radius: 50%;
    background:
      radial-gradient(60% 50% at 38% 24%, color-mix(in srgb, white 55%, transparent), transparent 70%),
      radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 86%, white), var(--accent) 58%, color-mix(in srgb, var(--accent) 84%, black));
    box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.6), inset 0 -2px 4px rgb(0 0 0 / 0.16), 0 2px 6px color-mix(in srgb, var(--accent) 45%, transparent);
    color: var(--accent-ink); --od-icon-size: clamp(20px, 5.6vw, 24px);
    transition: box-shadow 260ms var(--ease-out);
  }
  .dock-mock[aria-current="page"] .dock-orb-core { box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.6), inset 0 -2px 4px rgb(0 0 0 / 0.16), 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 20px color-mix(in srgb, var(--accent) 70%, transparent); }
  .dock-mock[aria-current="page"] .od-icon { stroke-width: 2; }
  /* More, detached: its own round of glass beside the bar, the way iOS sets search apart */
  .dock-more {
    position: relative; display: grid; place-items: center; flex: none;
    width: calc(var(--dk) + 10px); height: calc(var(--dk) + 10px); border-radius: 50%;
    color: var(--dk-ink); --od-icon-size: clamp(19px, 5.2vw, 22px);
    transition: transform 160ms var(--ease-out), color 200ms var(--ease-out), scale var(--spring-t) var(--spring);
  }
  .dock-more .dock-count { top: -2px; right: -2px; }
  .dock-more[data-on] { color: var(--dk-on); }
  .dock-more[data-on]::before { inset: 5px; z-index: 0; border-radius: 50%; background: radial-gradient(80% 70% at 50% 0%, var(--ln-glow), transparent 72%), linear-gradient(180deg, var(--ln-top), var(--ln-bot)); box-shadow: inset 0 1px 0 var(--ln-rim), inset 0 -1px 0 var(--ln-lo), inset 0 0 10px var(--ln-glow), 0 2px 8px var(--ln-shade); transition: none; }
  .dock-more > .od-icon { position: relative; z-index: 1; }

  /* minimised: the bar shrinks to the current place alone, a small pill of glass with its icon; More shrinks with it */
  .dockbar[data-min] { scale: 0.9; }
  .dockbar[data-min] .dock { gap: 0; }
  .dockbar[data-min] .dock-item:not([aria-current="page"]), .dockbar[data-min] .dock-mock:not([aria-current="page"]) { width: 0; min-width: 0; padding-inline: 0; opacity: 0; overflow: clip; pointer-events: none; }
  .dockbar[data-min] .dock-item[aria-current="page"] { gap: 0; padding: 0 calc((var(--dk) - var(--od-icon-size)) / 2); }
  .dockbar[data-min] .dock-item .dl { max-width: 0; opacity: 0; }
  .dockbar[data-min] .dock-mock:not([aria-current="page"]) .dock-orb { scale: 0.3; opacity: 0; }
  .dockbar[data-min] .dock-mock[aria-current="page"] .dock-orb { top: calc(var(--dk) * -0.2); scale: 0.78; }
  .dockbar[data-min] .dock[data-on="more"], .dockbar[data-min] .dock[data-on=""] { padding: 0; opacity: 0; margin-right: -6px; pointer-events: none; }
  .dockbar[data-min] .dock[data-on="more"]::after, .dockbar[data-min] .dock[data-on=""]::after { display: none; }
  .dockbar[data-min] .dock-more { scale: 0.9; }

  /* the bottom sheets in the same glass: inset from the edges, a grabber, rising on the spring */
  .sheet {
    --sh-tint: color-mix(in srgb, var(--bg) 70%, transparent);
    margin: auto max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    width: auto; max-width: none; border-radius: 30px;
    padding-bottom: calc(var(--s5) + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, color-mix(in srgb, var(--sh-tint) 92%, white 8%), var(--sh-tint));
    backdrop-filter: blur(28px) saturate(1.8) brightness(1.04); -webkit-backdrop-filter: blur(28px) saturate(1.8) brightness(1.04);
    box-shadow: inset 0 1.5px 0 rgb(255 255 255 / 0.8), inset 0 0 0 1px rgb(255 255 255 / 0.3), inset 0 -1px 0 rgb(0 0 0 / 0.08), 0 -2px 6px rgb(0 0 0 / 0.06), 0 18px 60px rgb(0 0 0 / 0.22);
  }
  .sheet.more { background: linear-gradient(180deg, color-mix(in srgb, var(--sh-tint) 92%, white 8%), var(--sh-tint)); }
  :root[data-mode="dark"] .sheet { --sh-tint: color-mix(in srgb, var(--bg) 72%, transparent); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / 0.2), inset 0 0 0 1px rgb(255 255 255 / 0.08), inset 0 -1px 0 rgb(0 0 0 / 0.4), 0 18px 60px rgb(0 0 0 / 0.5); }
  .sheet::backdrop { background: rgb(8 10 14 / 0.22); }
  .sheet[open] { animation: sheet-rise var(--spring-t) var(--spring) both; }
  .sheet[open]::backdrop { animation: sheet-dim 240ms var(--ease-out) both; }
  .sheet.is-closing { animation: sheet-fall 240ms cubic-bezier(0.4, 0, 1, 1) both; }
  .sheet.is-closing::backdrop { animation: sheet-dim 240ms var(--ease-out) reverse both; }
  @keyframes sheet-rise { from { transform: translateY(calc(100% + 24px)); } to { transform: none; } }
  @keyframes sheet-fall { from { transform: none; } to { transform: translateY(calc(100% + 24px)); } }
  @keyframes sheet-dim { from { opacity: 0; } to { opacity: 1; } }
  .sheet-grip { width: 36px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 26%, transparent); margin: 0 auto var(--s3); }
  .row-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }

  /* the large title: the place's name, big, under the bar; as it slides under, the bar turns to compact glass and
     takes the name small in its middle. Back on the left (a page with data-back), at most two actions on the right. */
  .topbar {
    position: sticky; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out), backdrop-filter 220ms var(--ease-out);
  }
  .topbar [data-search] { display: none; }
  .topbar[data-compact] {
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 74%, transparent), color-mix(in srgb, var(--bg) 60%, transparent));
    backdrop-filter: blur(20px) saturate(1.8) brightness(1.04); -webkit-backdrop-filter: blur(20px) saturate(1.8) brightness(1.04);
    border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
    box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.3), 0 6px 20px rgb(0 0 0 / 0.06);
  }
  .topbar .brand span { transition: opacity 200ms var(--ease-out); }
  .topbar[data-compact] .brand span { opacity: 0; }
  .tb-title {
    position: absolute; left: 50%; top: 50%; max-width: calc(100% - 210px); translate: -50% calc(-50% + 6px);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 17px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); opacity: 0; pointer-events: none;
    transition: opacity 200ms var(--ease-out), translate var(--spring-t) var(--spring);
  }
  .topbar[data-compact] .tb-title { opacity: 1; translate: -50% -50%; }
  .tb-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -8px; padding-right: 8px; color: var(--accent-strong, var(--ink)); font-size: 17px; text-decoration: none; --od-icon-size: 22px; }
  .lt {
    margin: 0; padding: var(--s2) var(--s4) 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink);
    transition: opacity 200ms var(--ease-out);
  }
  .lt[data-under] { opacity: 0; }

  @media (prefers-reduced-motion: reduce) {
    .dockbar, .dock, .dock-lens, .dock-item, .dock-item .dl, .dock-mock, .dock-orb, .dock-more, .glass::before, .tb-title { transition: none; }
    .dock-lens.is-gliding { scale: none; }
    .sheet[open], .sheet.is-closing, .sheet[open]::backdrop, .sheet.is-closing::backdrop { animation: none; }
  }
  @media (prefers-reduced-transparency: reduce) {
    .glass, :root.glass-bend .glass, .dock-orb.glass { background: var(--raised); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgb(0 0 0 / 0.14); }
    .glass::before, .glass::after { display: none; }
    .dockbar, .dockbar[data-behind] { --dk-ink: var(--ink-2); --dk-ring: var(--raised); --dk-on: var(--accent-ink); }
    .dock-lens, .dock-orb-core { background: var(--accent); box-shadow: none; }
    .dock-more[data-on]::before { display: block; background: var(--accent); box-shadow: none; }
    .sheet, .sheet.more, :root[data-mode="dark"] .sheet { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 0 0 1px var(--line); }
    .topbar[data-compact] { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  }
  /* ==/dock== */
  .menu { left: auto; right: var(--s3); bottom: auto; top: 64px; transform-origin: top right; }
  .inbox { right: var(--s3); top: 64px; width: calc(100vw - 24px); }
  .rail { position: fixed; inset: 0; width: 100%; height: 100dvh; z-index: 50; border-left: 0; }
  .toast { bottom: calc(var(--dock-h) + var(--s4) + env(safe-area-inset-bottom)); }
}
@media (max-width: 620px) {
  .aside-body { grid-template-columns: minmax(0, 1fr); }
  .quick-grid { max-width: none; }
  .qa-options { grid-template-columns: minmax(0, 1fr); }
  .hy { grid-template-columns: minmax(0, 1fr); padding: var(--s4) var(--s5); }
  .hy-actions { grid-column: 1 / -1; }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: var(--s5); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 420px) {
  .stat { padding: 0 var(--s3); }
  .stat:nth-child(odd) { padding-left: 0; }
  .ask { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ================= alive: buttons that answer back (calm, never flashy) ================= */
:root { --spring: cubic-bezier(0.34, 1.56, 0.64, 1); --press-t: 160ms; }
:where(.btn, .tbtn, .chip-sm, .seg button, .subj-tab, .got-btn, .rc-act, .rc-btn, .opt, .chip-btn, .face-btn, .notify, .br-b, .show-btn, .lens-tog, .icon-btn, .galen-btn, .nav-item, .qa, .chap, .st-row, .ls-dot, .hot, .zone-list button, .recap-list button, .nrail button, .mood-b, .bc-plus, .link, .back-link) {
  transition: transform var(--press-t) var(--spring), background-color 160ms ease, color 160ms ease, box-shadow 200ms ease, opacity 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.pressing { scale: 0.965; }
.pressing.small { scale: 0.88; }
.spring { animation: spring-back 460ms var(--spring); }
.spring.small { animation-name: spring-back-sm; }
@keyframes spring-back { from { scale: 0.965; } }
@keyframes spring-back-sm { from { scale: 0.88; } }

/* the ripple, from where you pressed */
:where(.btn, .tbtn, .chip-sm, .got-btn, .rc-act, .rc-btn, .opt, .chip-btn, .face-btn, .notify, .br-b, .show-btn, .icon-btn, .galen-btn, .qa, .chap, .l-row, .bcard, .nav-item) { position: relative; isolation: isolate; }
.rip { position: absolute; z-index: -1; left: var(--rx); top: var(--ry); width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: currentColor; opacity: 0.16; pointer-events: none; animation: rip 560ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.rip-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: -1; }
@keyframes rip { to { transform: scale(var(--rs, 40)); opacity: 0; } }

/* a soft light that follows the pointer */
@media (hover: hover) and (pointer: fine) {
  :where(.btn-ghost, .tbtn, .chip-sm, .notify, .show-btn, .qa, .l-row:not(.locked), .bcard, .pt-card, .nx, .chap, .nav-item):hover {
    background-image: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--ink) 7%, transparent), transparent 70%);
  }
  :where(.btn-primary, .btn-ink):hover { background-image: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.22) 48%, transparent 66%); background-size: 240% 100%; animation: sheen 1.1s var(--ease-out) 1; }
  :where(.btn, .tbtn, .notify):hover > .od-icon:last-child:not(:first-child) { translate: 3px 0; }
  :where(.btn-back, .back-link):hover > .od-icon:first-child { translate: -3px 0; }
  :where(.btn, .tbtn) > .od-icon { transition: translate 220ms var(--spring), transform 220ms var(--spring); }
  .l-row:not(.locked):hover .l-steps i { opacity: 1; transform: translateY(-1px); }
  .l-row:not(.locked):hover .l-steps i:nth-child(2) { transition-delay: 30ms; } .l-row:not(.locked):hover .l-steps i:nth-child(3) { transition-delay: 60ms; }
  .l-row:not(.locked):hover .l-steps i:nth-child(4) { transition-delay: 90ms; } .l-row:not(.locked):hover .l-steps i:nth-child(5) { transition-delay: 120ms; } .l-row:not(.locked):hover .l-steps i:nth-child(6) { transition-delay: 150ms; }
  :where(.bcard, .pt-card, .nx, .cs):hover { transform: translateY(-3px); }
  .bcard:hover .bc-ic .od-icon { transform: translateY(-2px) rotate(-6deg) scale(1.06); }

  /* each icon acts out what it means */
  :hover > [data-i="play"], :hover > * > [data-i="play"] { transform: scale(1.14); }
  :hover > [data-i="lamp"] { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent-line) 90%, transparent)); }
  :hover > [data-i="spark"] { transform: rotate(18deg) scale(1.12); }
  :hover > [data-i="notes"] { transform: translateY(-2px); }
  :hover > [data-i="hl"] { transform: rotate(-12deg); }
  :hover > [data-i="bookmark"] { transform: translateY(-2px); }
  :hover > [data-i="search"] { transform: scale(1.12) rotate(-8deg); }
  :hover > [data-i="expand"], :hover > [data-i="focus"] { transform: scale(1.12); }
  :hover > [data-i="lock"] { animation: jiggle 420ms ease; }
  :hover > [data-i="paper"] { transform: rotate(-6deg); }
  :hover > [data-i="list"], :hover > [data-i="layers"] { transform: translateY(-1px) scale(1.06); }
  :hover > [data-i="chat"] { transform: rotate(-8deg) scale(1.06); }
  :hover > [data-i="fsure"], :hover > [data-i="funsure"], :hover > [data-i="fguess"] { transform: scale(1.12) rotate(-6deg); }
}
.od-icon[data-i] { transition: transform 260ms var(--spring), filter 260ms ease, translate 220ms var(--spring); }
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@keyframes jiggle { 25% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }

/* states that land */
.rc-btn[aria-pressed="true"] [data-i="bookmark"] { animation: drop-in 420ms var(--spring); }
@keyframes drop-in { from { transform: translateY(-7px) scale(0.8); } }
.got-btn[aria-pressed="true"] [data-i="check"] path, .cs.d [data-i="tick"] path, .qmark.ok [data-i="check"] path { stroke-dasharray: 30; animation: draw 520ms var(--ease-out) both; }
@keyframes draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
.got-btn[aria-pressed="true"], .rc-act.did, .face-btn[aria-pressed="true"], .chip-btn[aria-pressed="true"] { animation: pop 380ms var(--spring); }
@keyframes pop { 40% { transform: scale(1.06); } }
.opt.right { animation: pop 420ms var(--spring); }
.opt.wrong { animation: nope 360ms ease; }
@keyframes nope { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.dk-pos b, .nbar-pos b, .rc-stats b, .od-stat b { display: inline-block; animation: num-in 360ms var(--spring); }
@keyframes num-in { from { transform: translateY(6px); opacity: 0; } }

/* what is waiting for you breathes; the way on shines now and then */
.ls-dot[aria-current="step"] .od-icon, .cs.n .od-icon { animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); } }
.cont .btn-primary, #ls-next.ready, .recap-acts .btn-primary, .pv-go { background-image: linear-gradient(100deg, transparent 40%, rgb(255 255 255 / 0.22) 50%, transparent 60%); background-size: 300% 100%; background-repeat: no-repeat; background-position: 150% 0; animation: sweep 5.5s linear 1.5s infinite; }
/* one steady pass, eased only at its ends, then a quiet wait: never a stop half-way */
@keyframes sweep { 0% { background-position: 150% 0; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 26% { background-position: -50% 0; } 100% { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .cont .btn-primary, #ls-next.ready, .recap-acts .btn-primary, .pv-go { animation: none; background-image: none; } }
#ls-next.ready::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-line); box-shadow: 0 0 0 3px var(--bg); animation: breathe 2.4s ease-in-out infinite; }
#ls-next { position: relative; }

/* the sliding pill between options */
.seg { position: relative; isolation: isolate; }
.seg-ghost { position: absolute; z-index: -1; border-radius: var(--r-pill); background: var(--raised); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); pointer-events: none; }
:root[data-mode="dark"] .seg-ghost { background: var(--surface-2); }
.seg.sliding button[aria-pressed="true"] { background: transparent; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .rip, .seg-ghost { display: none; }
}

/* ================= type: fonts to try (fontzz, SIL Open Font License; every weight 100–900) ================= */
@font-face { font-family: "Halden"; src: url("../fonts/fontzz/halden.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Beacon"; src: url("../fonts/fontzz/beacon.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cove"; src: url("../fonts/fontzz/cove.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Mallow"; src: url("../fonts/fontzz/mallow.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Alder"; src: url("../fonts/fontzz/alder.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Rondel"; src: url("../fonts/fontzz/rondel.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plaza"; src: url("../fonts/fontzz/plaza.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Vesper"; src: url("../fonts/fontzz/vesper.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Aurelia"; src: url("../fonts/fontzz/aurelia.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Folio"; src: url("../fonts/fontzz/folio.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Vellum"; src: url("../fonts/fontzz/vellum.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Meridian"; src: url("../fonts/fontzz/meridian.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Quill"; src: url("../fonts/fontzz/quill.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Signal"; src: url("../fonts/fontzz/signal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fathom"; src: url("../fonts/fontzz/fathom.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* headings, reading and numbers can each take their own face; by default they follow the app's */
:root { --font-display: var(--font); --display-track: -0.03em; }
:where(h1, h2, h3, .cont h2, .rcard h3, .bc-t, .nsec h3) { font-family: var(--font-display); }
:root[data-type-display] :is(h1, h2) { letter-spacing: var(--display-track) !important; }
:root[data-type-read] :is(.nreader, .bcard, .rcard .pts, .rcard .st-lead, .reader, .nb-prose, .pt-card p) { font-family: var(--serif); }
:root[data-type-read] :is(.nreader, .nb-prose) { line-height: 1.75; }

/* ================= rhythm: one vertical step between kicker, title, lede and what follows ================= */
:root { --rh-kicker: 12px; --rh-lede: clamp(18px, 1.7vw, 26px); }
:where(h1, h2, h3) { text-wrap: balance; }
:root :is(.l-head, .hello-main, .done-hero) { gap: 0; }
:root :is(.l-head, .hello-main, .done-hero, .step-head) > .eyebrow { margin-bottom: var(--rh-kicker); }
:root :is(.l-head, .hello-main, .done-hero) > .lede { margin-top: var(--rh-lede); line-height: 1.5; max-width: 58ch; text-wrap: pretty; }
:root .l-head { margin-bottom: clamp(28px, 3.4vw, 44px); }
:root .l-head + .cont { margin-top: 0; }
:root .step-head { gap: 0; margin-bottom: var(--s6); }
:root .step-head > p:not(.eyebrow) { margin-top: 14px; max-width: 60ch; }
:root :is(.l-group-head, .np-h) h2 { line-height: 1.2; }
:root .l-group { gap: var(--s4); }
:root .cont .cont-main { gap: 0; }
:root .cont .cont-main > .eyebrow { margin-bottom: 8px; }
:root .cont .cont-main > h2 { margin-bottom: var(--s4); }
:root .cont .cont-main > .cont-steps { margin-bottom: var(--s5); }

/* the "Aa" control: try any pairing on the real pages */
.type-fab { position: fixed; right: 0; top: 50%; translate: 0 -50%; z-index: 60; width: 40px; height: 48px; display: grid; place-items: center; border-radius: 14px 0 0 14px; background: var(--raised); box-shadow: var(--shadow), 0 0 0 1px var(--line); font-size: 16px; font-weight: 700; color: var(--ink); }
.type-fab[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
.type-pop { position: fixed; right: 52px; top: 50%; translate: 0 -50%; z-index: 61; width: min(340px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--raised); box-shadow: var(--shadow), 0 0 0 1px var(--line); font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 13px; animation: pop-in var(--t-fast) var(--ease-out); }
.type-pop[hidden] { display: none; }
.type-pop h4 { font-size: 13px; font-weight: 700; font-family: inherit; letter-spacing: 0; }
.type-pop label { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--ink-3); }
.type-pop select { min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.type-pairs { display: flex; flex-wrap: wrap; gap: 6px; }
.type-pairs button { min-height: 30px; padding: 0 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.type-pairs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.type-pop .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.type-pop a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) { .type-fab { top: 40%; width: 34px; height: 42px; font-size: 14px; } .type-pop { right: 12px; left: 12px; width: auto; top: 50%; } }
@media print { .type-fab, .type-pop { display: none; } }

/* ================= calm: Today stays a quiet desk; the lively touches belong to Learn ================= */
body.calm .rip, body.calm .rip-clip, body.calm .type-fab, body.calm .type-pop { display: none !important; }
body.calm :is(.btn-primary, .btn-ink, .cont .btn-primary, .recap-acts .btn-primary, #ls-next.ready):hover,
body.calm :is(.cont .btn-primary, #ls-next.ready, .recap-acts .btn-primary) { animation: none !important; background-image: none !important; }
body.calm :is(.btn-ghost, .tbtn, .chip-sm, .notify, .show-btn, .qa, .l-row, .bcard, .pt-card, .nx, .chap, .nav-item):hover { background-image: none !important; }
body.calm .ls-dot[aria-current="step"] .od-icon, body.calm .cs.n .od-icon, body.calm #ls-next.ready::after { animation: none !important; }
body.calm :is(.dk-pos b, .nbar-pos b, .rc-stats b, .od-stat b) { animation: none !important; }
body.calm :is(.got-btn, .rc-act, .face-btn, .chip-btn, .opt.right)[aria-pressed="true"], body.calm .opt.right, body.calm .opt.wrong { animation: none !important; }
body.calm :hover > .od-icon[data-i], body.calm :hover > * > .od-icon[data-i] { transform: none !important; filter: none !important; }
body.calm :is(.bcard, .pt-card, .nx, .cs):hover { transform: none; }
body.calm .pressing { scale: 0.985; }
body.calm .pressing.small { scale: 0.95; }
body.calm .spring { animation-name: settle; animation-duration: 260ms; animation-timing-function: ease-out; }
body.calm .spring.small { animation-name: settle-sm; }
@keyframes settle { from { scale: 0.985; } }
@keyframes settle-sm { from { scale: 0.95; } }

/* lesson steps this week, moved here from Learn */
.lwk-chart { position: relative; height: 180px; }
.lwk-bars { list-style: none; margin: 0; padding: 0; height: 100%; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.lwk-d { display: grid; grid-template-rows: minmax(0, 1fr) 22px; row-gap: 6px; height: 100%; justify-items: center; }
.lwk-t { position: relative; width: 100%; max-width: 30px; height: 100%; display: flex; align-items: flex-end; }
.lwk-t i { position: relative; display: block; width: 100%; min-height: 4px; border-radius: 8px; background: color-mix(in oklab, var(--accent) 55%, var(--surface)); }
.lwk-n { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); font: 600 12px var(--mono, ui-monospace, monospace); color: var(--ink-2); }
.lwk-d.met .lwk-t i { background: var(--accent); }
.lwk-l { font-size: 12px; color: var(--ink-3); }
.lwk-d.today .lwk-l { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 600; }
.lwk-goal { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--ink-3); pointer-events: none; opacity: .7; z-index: 1; }
.lwk-goal i { position: absolute; right: 0; top: -18px; font-style: normal; font-size: 11px; color: var(--ink-3); }
.lwk .card-sub b { color: var(--ink); }


/* ---------- dry colour, with one small extra: a fine light edge on filled colour, and depth only when touched ---------- */
.btn-primary, .pv-go, #ls-next, .cs.n, .ls-dot[aria-current="step"], .sf-ic, .ct-ic, .lc-heat.top, .hs-list li:first-child .hs-n, .wn-t, .ff-band {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), inset 0 -1px 0 rgb(0 0 0 / 0.08);
}
.btn-primary, .pv-go, #ls-next { transition: box-shadow 180ms var(--ease-out, ease), transform 180ms var(--ease-out, ease), background-color 180ms; }
.btn-primary:hover, .pv-go:hover, #ls-next:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 8px 18px -8px color-mix(in oklab, var(--accent) 70%, transparent); transform: translateY(-1px); }
.btn-primary:active, .pv-go:active, #ls-next:active { transform: translateY(0) scale(0.97); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.18); transition-duration: 80ms; }

/* ---------- charts, in the old Analytics style: hatched below the goal, solid and glowing at it ---------- */
.mbc { display: block; width: 100%; height: 220px; overflow: visible; font-family: inherit; }
.mbc-grid { stroke: var(--line); stroke-width: 1; }
.mbc-ax { font: 500 10.5px var(--mono, ui-monospace, monospace); fill: var(--ink-3); }
.mbc-x { font: 500 11px var(--mono, ui-monospace, monospace); fill: var(--ink-3); } .mbc-x.strong { font: 600 12px inherit; fill: var(--ink-2); } .mbc-x.now { fill: var(--ink); font-weight: 700; }
.mbc-val { font: 600 11px var(--mono, ui-monospace, monospace); fill: var(--ink-3); } .mbc-val.met { fill: var(--accent-strong); font-weight: 700; }
.mbc-cap { fill: color-mix(in srgb, var(--accent-strong) 70%, var(--surface)); }
.mbc-goal { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; } .mbc-goal-l { font: 500 10.5px var(--mono, ui-monospace, monospace); fill: var(--ink-3); }
.mbc-today { fill: var(--ink); } .mbc-today-l { font: 700 11px inherit; fill: var(--bg); }
.mbc-hit { fill: transparent; cursor: pointer; }
.mbc-col { outline: none; }
.mbc-col .mbc-bar { transition: opacity 160ms; }
.mbc-bars:hover .mbc-col:not(.hov) .mbc-bar, .mbc-bars:focus-within .mbc-col:not(.hov) .mbc-bar { opacity: .55; }
.mbc-col.hov .mbc-val { fill: var(--ink); }
.mbc-bar { animation: mbc-grow 700ms cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes mbc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.mbc-line { fill: none; stroke: var(--accent-strong); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mbc-draw 1100ms cubic-bezier(.45,0,.55,1) forwards; }
@keyframes mbc-draw { to { stroke-dashoffset: 0; } }
.mbc-area { animation: mbc-fade 900ms ease both 200ms; } @keyframes mbc-fade { from { opacity: 0; } }
.mbc-avg { stroke: var(--ink-3); stroke-dasharray: 2 4; stroke-width: 1.5; } .mbc-avg-l { font: 500 10.5px var(--mono, ui-monospace, monospace); fill: var(--ink-3); }
.mbc-best { fill: var(--raised); stroke: var(--accent-strong); stroke-width: 2.5; }
.mbc-flag rect { fill: var(--accent-strong); } .mbc-flag text { font: 700 10.5px var(--mono, ui-monospace, monospace); fill: var(--accent-ink); }
.mbc-zero { stroke: var(--ink-3); stroke-width: 1; opacity: .5; }
.mbc-stage { outline: none; } .mbc-stage:hover rect:not(.mbc-hit) { filter: brightness(1.04); }
.mbc-rim { fill: none; stroke: color-mix(in srgb, var(--accent-strong) 55%, var(--surface)); stroke-width: 1.25; }
.mbc-grid { stroke-linecap: round; } .mbc-goal, .mbc-avg, .mbc-zero { stroke-linecap: round; }
.mbc-tip { position: fixed; z-index: 90; padding: 5px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 600 12px/1.3 inherit; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 18px rgb(0 0 0 / .2); }
.mbc-tip[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .mbc-bar, .mbc-line, .mbc-area { animation: none; stroke-dashoffset: 0; } }
.lwk-svg { height: 200px; } #chart.mbc { height: 230px; }
