/* Hero · "Around the Headline".
   Full-bleed, in both themes. Real study objects float around the headline
   in color and depth; the turn sweeps them into one crisp Clear Today card.
   End state lives in normal flow (no-JS / reduced motion = finished frame).
   The hero sizes itself to the viewport height so the finished card, its ✓
   and Replay land above the fold (hero.js adds a --fit scale as a backstop).

   The desk is the plain page (page.css): no wash, no glows,
   no coloured halos. Light was built first: paper-white objects with slate
   ink shadows. Dark is the same desk at night: the page falls to Clear's
   slate dark, paper becomes Clear's dark card with a lit top edge, and
   shadows go black and deep. All hero colours live in the two token blocks
   below. */

@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root, .theme-light {
  --clear-bloom: 73 218 133;
  --clear-bloom-a: 0.45;
  --uline-a: #1a6b3c; --uline-b: #1f8049;
  --cta-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 1px 2px rgb(22 29 40 / 0.16), 0 8px 18px -8px rgb(22 29 40 / 0.32);
  --cta-shadow-hover: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 2px 4px rgb(22 29 40 / 0.18), 0 12px 24px -10px rgb(22 29 40 / 0.36);
  --cta-hover: #175f35;
  --card-shadow: 0 1px 1px rgb(22 29 40 / 0.05), 0 6px 12px -4px rgb(22 29 40 / 0.07), 0 24px 48px -16px rgb(22 29 40 / 0.18), 0 56px 100px -44px rgb(22 29 40 / 0.22);
  --ring-a: #1a6b3c; --ring-b: #49da85;
  --chrome-bg: linear-gradient(180deg, #fbfcfd, #f5f7fa);
  --chrome-edge: #e3e8ef;
  --rule: #e8ecf2;
  --cell-today: #e6ecf2;
  --hl-bg: #e9eef4; --hl-edge: #c3cdd9;
  --next-bg: #ffffff; --next-edge: #b8c3d1;
  --check-edge: #9aa6b5;
  --note-yellow: linear-gradient(170deg, #fff6b8, #ffec8a);
  --note-pink: linear-gradient(170deg, #ffe3ef, #ffcfe2);
  --note-blue: linear-gradient(170deg, #e2f2ff, #cbe6fd);
  --tape: rgb(255 255 255 / 0.55);
  --grid-line: rgb(10 97 144 / 0.06);
  --ruled-line: rgb(10 97 144 / 0.11);
  --margin-line: rgb(182 22 35 / 0.25);
  --marker-a: #fff1a8; --marker-b: #ffe880;
  --timer-bg: #161d28; --timer-fg: #ffffff; --timer-edge: transparent;
  --chip-bg: #fbf1e8; --chip-edge: #e9c7a6;
  --pill-glass: rgb(255 255 255 / 0.72);
  --tick-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.theme-dark {
  --clear-bloom: 73 218 133;
  --clear-bloom-a: 0.3;
  --uline-a: #49da85; --uline-b: #2fbf6c;
  --cta-shadow: 0 1px 0 rgb(255 255 255 / 0.16) inset, 0 2px 4px rgb(0 0 0 / 0.4), 0 10px 24px -10px rgb(0 0 0 / 0.6);
  --cta-shadow-hover: 0 1px 0 rgb(255 255 255 / 0.2) inset, 0 3px 6px rgb(0 0 0 / 0.45), 0 14px 30px -10px rgb(0 0 0 / 0.65);
  --cta-hover: #1c8a4d;
  --card-shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 6px 12px -4px rgb(0 0 0 / 0.38), 0 24px 48px -16px rgb(0 0 0 / 0.55), 0 56px 100px -44px rgb(0 0 0 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.05);
  --ring-a: #2fbf6c; --ring-b: #b6f5cf;
  --chrome-bg: linear-gradient(180deg, #2d3036, #292c31);
  --chrome-edge: #363a41;
  --rule: #33373d;
  --cell-today: #363a41;
  --hl-bg: #33373d; --hl-edge: #4b5159;
  --next-bg: #1f2227; --next-edge: #5c636d;
  --check-edge: var(--border-strong);
  /* Paper notes under a desk lamp: the same pastels, dimmed, never inverted. */
  --note-yellow: linear-gradient(170deg, #efdc93, #dfc265);
  --note-pink: linear-gradient(170deg, #e6c4d3, #d7a8bd);
  --note-blue: linear-gradient(170deg, #c3d8ea, #a7c3dd);
  --tape: rgb(255 255 255 / 0.3);
  --grid-line: rgb(96 185 243 / 0.07);
  --ruled-line: rgb(96 185 243 / 0.13);
  --margin-line: rgb(252 147 139 / 0.32);
  --marker-a: #5a4513; --marker-b: #4d3b12;
  --timer-bg: #0e1115; --timer-fg: var(--card-foreground); --timer-edge: rgb(255 255 255 / 0.1);
  --chip-bg: color-mix(in srgb, var(--exams) 13%, var(--paper)); --chip-edge: color-mix(in srgb, var(--exams) 42%, transparent);
  --pill-glass: rgb(39 42 47 / 0.78);
  --tick-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23121315' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Maths: hidden until MathJax has typeset it (page.js adds .tex-ready), so
   raw TeX never flashes. */
.js:not(.tex-ready) .tex { visibility: hidden; }

/* ── Frame ─────────────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow-x: clip; overflow-y: visible; margin-top: -64px; padding-top: 64px; }
/* No background of its own: the hero is the top of the page's one canvas. */

/* ── Copy ──────────────────────────────────────────────────────── */
.hero-copy { position: relative; z-index: 3; pointer-events: none; text-align: center; padding: clamp(18px, 4.6vh, 88px) 24px 0; }
.br-m { display: none; }
.hero-copy > * { pointer-events: auto; }
.hero-title { font-size: clamp(44px, min(7.4vh, 5.3vw), 76px); line-height: 1.02; font-weight: 700; letter-spacing: -0.036em; color: var(--ink); }
/* "Clear": the glyphs stay primary-text green throughout (#1a6b3c light,
   #49da85 dark). The trigger lights the word from BEHIND for a moment (a
   radial bloom that goes back to nothing) and draws a crisp brand-green
   underline, which stays: the headline's promise, signed. */
.hero-title__clear { position: relative; color: var(--primary-text); --bloom: 0; --bloom-s: 1; --uline: 1; }
.hero-title__clear::before { content: ""; position: absolute; left: -22%; right: -22%; top: -34%; bottom: -34%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgb(var(--clear-bloom) / var(--clear-bloom-a)), rgb(var(--clear-bloom) / calc(var(--clear-bloom-a) * 0.36)) 55%, rgb(var(--clear-bloom) / 0) 100%); opacity: var(--bloom); transform: scale(var(--bloom-s)); pointer-events: none; }
.hero-title__clear::after { content: ""; position: absolute; left: 0.03em; right: 0.02em; bottom: 0.04em; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--uline-a), var(--uline-b)); transform: scaleX(var(--uline)); transform-origin: 0 50%; pointer-events: none; }
.orbit-pending .hero-title__clear { --uline: 0; }
.hero-sub { max-width: 730px; margin: clamp(12px, 2vh, 24px) auto 0; font-size: clamp(17px, 2.3vh, 19px); line-height: 1.55; color: var(--muted-foreground); text-wrap: pretty; }
.hero-sub--short { display: none; } /* phones only */
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: clamp(16px, 3vh, 36px); }
.hero-cta { min-height: 54px; padding: 12px 30px; font-size: 17px; border-radius: 10px; box-shadow: var(--cta-shadow); transition: transform 200ms var(--ease-signature), box-shadow 200ms ease, background-color 150ms ease; }
.hero-cta:hover { transform: translateY(-1px); background: var(--cta-hover) !important; box-shadow: var(--cta-shadow-hover); }
.hero-free { font-size: 16px; font-weight: 600; padding: 12px 2px; }

/* ── Stage: the Today card ─────────────────────────────────── */
/* --stage-pb: paper under the Today card, read by page.css so the first
   sheet sits one rhythm below the card. */
:root { --stage-pb: 88px; }
.today-stage { position: relative; z-index: 1; display: flex; justify-content: center; padding: clamp(16px, 3.2vh, 40px) 24px var(--stage-pb); }
.today-group { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 624px); align-items: start; transform-origin: 50% 0; }
.today { grid-column: 1; grid-row: 1; }

/* The Today card */
.today { position: relative; background: var(--paper); border-radius: var(--radius-2xl); border: 1px solid var(--edge); box-shadow: var(--card-shadow); }
/* The finish: a green edge light runs once around the card (conic, masked to
   a ring) and goes out; the card keeps its plain edge at rest. */
.today__ring { position: absolute; inset: -2px; z-index: 5; border-radius: 18px; padding: 2.5px; pointer-events: none; opacity: 0; visibility: hidden;
  background: conic-gradient(from var(--a), color-mix(in srgb, var(--ring-a) 0%, transparent) 0deg 200deg, var(--ring-a) 280deg, var(--ring-b) 336deg, color-mix(in srgb, var(--ring-b) 0%, transparent) 352deg 360deg);
  -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); }
.pulse { position: absolute; z-index: 2; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid var(--pc, var(--brand)); opacity: 0; pointer-events: none; }
.spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; z-index: 2; border-radius: 50%; background: var(--pc); opacity: 0; visibility: hidden; pointer-events: none; }

.today__chrome { display: flex; align-items: center; justify-content: space-between; height: clamp(40px, 5vh, 46px); padding: 0 20px; border-bottom: 1px solid var(--chrome-edge); background: var(--chrome-bg); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; }
.today__chrome .lockup__mark { width: 18px; }
.today__chrome .t-wordmark { font-size: 15px; }
.today__total { font-size: 13px; color: var(--muted-foreground); }
.today__total b { display: inline-block; font-weight: 600; color: var(--card-foreground); } /* the exam countdown: inline-block so the calendar's landing can bump it */
.today__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(12px, 2vh, 20px) 22px clamp(10px, 1.7vh, 16px); }
.today__title { position: relative; display: inline-block; font-size: 32px; line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; color: var(--ink); }
.today__uline { position: absolute; left: 1px; right: 3px; bottom: -5px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--ring-a), var(--ring-b) 70%, color-mix(in srgb, var(--ring-b) 20%, transparent)); transform: scaleX(0); transform-origin: 0 50%; }
.today__date { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); white-space: nowrap; }
.today__date b { display: inline-block; font-weight: 600; color: var(--card-foreground); }

.week { display: flex; gap: 6px; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: clamp(56px, 7.2vh, 66px); border-radius: 12px; border: 1px solid var(--border); background: var(--paper); }
.day__dow { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.day__num { margin-top: 1px; font-size: 19px; line-height: 23px; font-weight: 600; letter-spacing: -0.01em; color: var(--card-foreground); }
.day__marks { display: flex; gap: 3px; align-items: center; height: 12px; margin-top: 2px; }
.dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.day__check { width: 14px; height: 14px; fill: none; stroke: var(--success); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.day.is-today { border: 1.5px solid var(--ink); background: var(--cell-today); }

/* Rows. One highlight element slides between rows (it carries "Next"). */
.tasks { position: relative; --row-h: clamp(44px, 5.6vh, 56px); --row-gap: 4px; padding: 12px 12px 14px; border-top: 1px solid var(--rule); }
.tasks__list { position: relative; }
.today__hl { position: absolute; left: 12px; right: 12px; top: calc(12px + var(--row-h) + var(--row-gap)); height: var(--row-h); border-radius: 12px; background: var(--hl-bg); border: 1px solid var(--hl-edge); pointer-events: none; }
.today__next { position: absolute; right: 81px; top: 50%; margin-top: -12px; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--card-foreground); background: var(--next-bg); border: 1px solid var(--next-edge); }
.task { position: relative; display: grid; grid-template-columns: 20px 10px 1fr 56px; align-items: center; gap: 12px; height: var(--row-h); padding: 0 14px 0 12px; border-radius: 12px; }
.task + .task { margin-top: var(--row-gap); }
.task__slot { position: absolute; inset: 0; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--tone) 55%, transparent); background: color-mix(in srgb, var(--tone) 5%, transparent); opacity: 0; visibility: hidden; pointer-events: none; }
/* --chk (0 → 1) mixes the box from empty to success fill in the theme's own
   colours; hero.js tweens it, so a theme switch never strands a literal. */
.task__check { --chk: 0; position: relative; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid color-mix(in srgb, var(--success) calc(var(--chk) * 100%), var(--check-edge)); background: color-mix(in srgb, var(--success) calc(var(--chk) * 100%), var(--paper)); }
.task__check svg { position: absolute; inset: 1px; width: 15px; height: 15px; fill: none; stroke: var(--on-accent-fill); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.task__tick { stroke-dasharray: 16; stroke-dashoffset: 16; }
.task.is-done .task__check { --chk: 1; }
.task.is-done .task__tick { stroke-dashoffset: 0; }
.task__dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 16%, transparent); }
.task__body { position: relative; min-width: 0; }
/* --done (0 → 1) fades a row's text from foreground to muted (hero.js tweens it on row 1). */
.task { --done: 0; }
.task.is-done { --done: 1; }
.task__title { display: block; font-size: 15px; line-height: 20px; font-weight: 500; color: color-mix(in srgb, var(--muted-foreground) calc(var(--done) * 100%), var(--card-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; hyphens: none; }
.task__meta { display: none; }
.task__min { position: relative; text-align: right; font-size: 15px; font-weight: 500; color: color-mix(in srgb, var(--muted-foreground) calc(var(--done) * 100%), var(--card-foreground)); white-space: nowrap; }
.task.is-next .task__title { font-weight: 600; }

/* ── The scatter ───────────────────────────────────────────────── */
.orbit { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: none; }
.js:not(.orbit-static) .orbit { display: block; }
.obj { position: absolute; left: 0; top: 0; visibility: hidden; will-change: transform; }
.obj.is-settled { will-change: auto; }
.obj.is-live { pointer-events: auto; }
.obj.is-live:hover { z-index: 400 !important; }
.obj__lift { transition: transform 380ms var(--ease-signature); }
.obj.is-live:hover .obj__lift { transform: translateY(-10px) scale(1.035); }

/* Object base: white, crisp edge, layered shadow. */
.o-card { position: relative; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--radius-xl); color: var(--card-foreground); box-shadow: var(--lift-1); }
.obj[data-depth="near"] .o-card { box-shadow: var(--lift-2); }
.obj[data-depth="far"] .o-card { box-shadow: 0 1px 2px rgb(var(--shade) / calc(0.05 * var(--shade-k))), 0 12px 24px -12px rgb(var(--shade) / calc(0.14 * var(--shade-k))), var(--sheen); }

/* Morph shell (the three stars). Sized directly each frame (three elements,
   layout-contained), so its edge, radius and text stay crisp at every size:
   card → (body fades) lane-tinted pill with the kicker → the row. */
.mph { position: relative; box-sizing: border-box; overflow: hidden; contain: layout; --sh: 1; border-radius: 16px; background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--edge) calc(var(--sh) * 100%), transparent);
  box-shadow: 0 1px 1px rgb(var(--shade) / calc(0.05 * var(--shade-k) * var(--sh))), 0 4px 8px -2px rgb(var(--shade) / calc(0.06 * var(--shade-k) * var(--sh))), 0 18px 36px -10px rgb(var(--shade) / calc(0.14 * var(--shade-k) * var(--sh))), 0 40px 80px -30px rgb(var(--shade) / calc(0.24 * var(--shade-k) * var(--sh))); }
.mph > .o-card { position: absolute; left: 50%; top: 50%; margin: 0; box-shadow: none; border-color: transparent; transform-origin: 50% 50%; }
.mph__row, .mph__tint { position: absolute; inset: 0; border-radius: inherit; opacity: 0; pointer-events: none; }
.mph__row { background: var(--paper); }
.mph__row.is-hl { background: var(--hl-bg); box-shadow: inset 0 0 0 1px var(--hl-edge); }
.mph__tint { background: color-mix(in srgb, var(--tone) 11%, var(--paper)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 45%, transparent); }
.mph__label { position: absolute; left: 50%; top: 50%; z-index: 1; white-space: nowrap; opacity: 0; }
.task--face { position: absolute !important; left: 50%; top: 50%; margin: 0 !important; z-index: 1; opacity: 0; background: transparent; border: 0; }

.o-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tone); }
.o-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }

/* Sticky worry notes (handwritten on purpose: the "before") */
.note { width: 172px; min-height: 148px; padding: 26px 18px 18px; border-radius: 3px 3px 10px 3px; border: 0; font-family: "Caveat", "Segoe Print", cursive; font-size: 31px; line-height: 1.02; font-weight: 600; color: #161d28; box-shadow: 0 1px 1px rgb(var(--shade) / calc(0.06 * var(--shade-k))), 0 12px 18px -10px rgb(var(--shade) / calc(0.28 * var(--shade-k))), 0 30px 50px -24px rgb(var(--shade) / calc(0.22 * var(--shade-k))) !important; }
.note::before { content: ""; position: absolute; top: -9px; left: 50%; width: 68px; height: 20px; margin-left: -34px; background: var(--tape); border: 1px solid rgb(22 29 40 / 0.05); transform: rotate(-3deg); }
.note--yellow { background: var(--note-yellow); }
.note--pink { background: var(--note-pink); }
.note--blue { background: var(--note-blue); width: 188px; }

/* Lesson video: a plain screen in the theme's own surface (a light slate
   well in light, a dark one in dark), no texture. Maths in ink, the
   teacher's handwriting, the play button and the progress in lesson blue.
   The hero's lesson, its Up next thumbnail and the Learn row's player all
   share it. */
:root, .theme-light { --vid-bg: #f1f4f8; --vid-pill: #ffffff; --vid-play-fg: #ffffff; }
.theme-dark { --vid-bg: #1f2227; --vid-pill: var(--surface-raised); --vid-play-fg: var(--on-accent-fill); }
.lesson { width: 336px; padding: 8px; border-radius: var(--radius-2xl); }
.vid { position: relative; height: 180px; border-radius: 10px; overflow: hidden; background: var(--vid-bg); }
.chalk { position: absolute; left: 22px; top: 24px; color: var(--ink); font-size: 27px; }
.chalk__note { display: block; margin-top: 8px; font-family: "Caveat", cursive; font-size: 21px; font-weight: 600; color: var(--learn); transform: rotate(-2deg); transform-origin: left; }
.play { position: absolute; right: 22px; top: 50%; width: 50px; height: 50px; margin-top: -30px; border-radius: 50%; background: var(--learn-hi); }
.play::after { content: ""; position: absolute; left: 20px; top: 16px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent var(--vid-play-fg); }
.vid__bar { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; border-radius: 2px; background: var(--hair); }
.vid__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 38%; border-radius: 2px; background: var(--learn-hi); }
.vid__bar i::after { content: ""; position: absolute; right: -5px; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--learn-hi); }
.vid__time { position: absolute; left: 14px; bottom: 22px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.lesson__cap { display: grid; grid-template-columns: 1fr auto; align-items: end; row-gap: 4px; padding: 12px 8px 6px; }
.lesson__title { grid-column: 1; font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.lesson__min { grid-column: 2; grid-row: 1 / span 2; align-self: end; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }

/* Small lesson thumbnail (Lesson 3.3, tucks into Monday) */
.thumb { width: 244px; padding: 7px; border-radius: var(--radius-2xl); }
.vid--sm { height: clamp(100px, 13vh, 120px); }
.chalk--sm { left: 16px; top: 20px; font-size: 22px; }
.play--sm { right: 16px; width: 40px; height: 40px; margin-top: -20px; }
.play--sm::after { left: 16px; top: 12px; border-width: 8px 0 8px 12px; }
.thumb__cap { padding: 10px 6px 4px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.thumb__meta { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.thumb__when { position: absolute; left: 10px; top: 10px; z-index: 1; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--vid-pill); box-shadow: inset 0 0 0 1px var(--hair); }
.vid--sm .chalk--sm { top: auto; bottom: 16px; }

/* Paper (formula sheet, notes, syllabus) */
.paper { border-radius: var(--radius-md); }
.paper__title { font-size: 14px; line-height: 18px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.paper__title span { display: block; font-weight: 500; font-size: 13px; color: var(--muted-foreground); }
.formula { width: 236px; padding: 18px 20px 12px; background-color: var(--paper); background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 14px 14px; background-position: -1px -1px; }
.formula__row { padding: 9px 0; font-size: 18px; color: var(--ink); border-bottom: 1px dashed var(--hair); }
.formula__row:last-child { border-bottom: 0; }
.formula .paper__title { margin-bottom: 6px; }
.notes { width: 252px; padding: 18px 20px 16px 30px; background: repeating-linear-gradient(180deg, transparent 0 25px, var(--ruled-line) 25px 26px), var(--paper); background-position: 0 42px; }
.notes::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 1px; background: var(--margin-line); }
.notes__text { margin-top: 8px; font-family: var(--font-reading); font-size: 15px; line-height: 26px; color: var(--ink); }
.notes__text mark { background: linear-gradient(transparent 12%, var(--marker-a) 12%, var(--marker-b) 88%, transparent 88%); color: inherit; padding: 0 2px; }
.syllabus { width: 224px; padding: 18px 18px 14px; }
.syllabus ul { margin-top: 10px; }
.syllabus li { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 14px; line-height: 18px; color: var(--card-foreground); }
.syllabus li::before { content: ""; flex-shrink: 0; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--check-edge); }
.syllabus li.is-done::before { border-color: var(--success); background: var(--success) var(--tick-dark) center / 12px no-repeat; }
.syllabus li.is-now::before { border-color: var(--learn); background: radial-gradient(circle, var(--learn) 0 3px, transparent 3.5px); }
.syllabus li.is-now { font-weight: 600; }

/* Practice problem */
.problem { width: 348px; padding: 18px 20px 20px; border-radius: var(--radius-2xl); }
.problem__top, .flash__top, .exam__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.problem__n, .flash__n { font-size: 13px; color: var(--muted-foreground); }
.problem__stem { margin: 12px 0 14px; font-family: var(--font-reading); font-size: 16px; line-height: 1.55; color: var(--ink); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices li { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: var(--radius-lg); border: 1px solid var(--hair); font-family: var(--font-reading); font-size: 15px; color: var(--ink); background: var(--paper); }
.choices b { font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.choices li.is-correct { border-color: color-mix(in srgb, var(--success) 55%, transparent); background: color-mix(in srgb, var(--success) 8%, var(--paper)); }
.choices svg { width: 15px; height: 15px; margin-left: auto; fill: none; stroke: var(--success); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Problem set chip */
.set { display: flex; align-items: center; gap: 12px; width: 236px; padding: 14px 16px; }
.set__ring { width: 40px; height: 40px; flex-shrink: 0; transform: rotate(-90deg); }
.set__ring circle { fill: none; stroke: color-mix(in srgb, var(--practice) 16%, var(--paper)); stroke-width: 5; }
.set__ring .set__arc { stroke: var(--practice); stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 50; }
.set__title { font-size: 15px; font-weight: 600; color: var(--ink); }
.set__meta { margin-top: 2px; font-size: 13px; color: var(--muted-foreground); }

/* Flashcards */
.flash { width: 276px; min-height: 170px; padding: 16px 18px 14px; border-radius: var(--radius-2xl); display: flex; flex-direction: column; }
.flash__q { flex: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 6px; margin: 12px 0 6px; font-family: var(--font-reading); font-size: 18px; line-height: 1.5; text-align: center; color: var(--ink); }
.flash__q .tex { font-size: 1.15em; }
.flash__hint { text-align: center; font-size: 12px; color: var(--muted-foreground); }
.flash__a { flex: 1; display: flex; align-items: center; justify-content: center; margin: 10px 0; font-size: 24px; color: var(--ink); }
.flash__rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.flash__rate span { display: flex; align-items: center; justify-content: center; height: 28px; border-radius: var(--radius-lg); border: 1px solid var(--hair); font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.flash__rate span.is-on { color: var(--card-foreground); border-color: color-mix(in srgb, var(--flashcards) 45%, transparent); background: color-mix(in srgb, var(--flashcards) 12%, var(--paper)); }

/* Sample exam */
.exam { width: 280px; padding: 16px 18px 18px; border-radius: var(--radius-2xl); }
.exam__timer { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--timer-bg); box-shadow: inset 0 0 0 1px var(--timer-edge); color: var(--timer-fg); font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.exam__timer svg { width: 14px; height: 14px; fill: none; stroke: #f29c5d; stroke-width: 1.6; stroke-linecap: round; }
.exam__title { margin-top: 14px; font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.exam__meta { margin-top: 4px; font-size: 14px; color: var(--muted-foreground); }
.exam__grid { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; margin-top: 14px; }
.exam__grid i { aspect-ratio: 1; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--exams) 40%, transparent); background: var(--paper); }
.exam__grid i.is-a { background: var(--exams); border-color: var(--exams); }
.exam__grid i.is-f { background: #d3ac41; border-color: #b8911f; }
.exam__grid i.is-cur { border: 1.5px solid var(--ink); }
/* Docked exam: the answer to "When do I start sample exams?" */
.exam__foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.exam__foot .exam__meta { margin-top: 0; font-size: 13px; white-space: nowrap; }
.exam__chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--chip-bg); border: 1px solid var(--chip-edge); white-space: nowrap; }
.exam__chip svg { width: 13px; height: 13px; fill: none; stroke: var(--exams); stroke-width: 1.6; stroke-linecap: round; }

/* Calendar */
.cal { width: 244px; padding: 14px 14px 12px; border-radius: var(--radius-2xl); }
.cal__head { display: flex; align-items: baseline; gap: 6px; padding: 0 4px; }
.cal__month { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.cal__year { font-size: 16px; font-weight: 500; color: var(--muted-foreground); }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; margin-top: 8px; text-align: center; }
.cal__grid span { display: flex; align-items: center; justify-content: center; height: clamp(22px, 2.9vh, 26px); font-size: 14px; color: var(--card-foreground); }
.cal__grid .dow { height: 20px; font-size: 11px; font-weight: 600; color: var(--muted-foreground); }
.cal__grid span:nth-child(8) { grid-column-start: var(--first-col, 1); } /* the 1st's weekday (page.js) */
.cal__grid .is-exam { position: relative; z-index: 0; font-weight: 700; color: var(--on-accent-fill); }
.cal__grid .is-exam::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--exams); box-shadow: 0 0 0 4px color-mix(in srgb, var(--exams) 18%, transparent); }
.cal__foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 4px 0; border-top: 1px solid var(--hair-soft); font-size: 14px; font-weight: 600; color: var(--card-foreground); }
.cal__ring { width: 10px; height: 10px; border-radius: 50%; background: var(--exams); box-shadow: 0 0 0 3px color-mix(in srgb, var(--exams) 20%, transparent); }

/* Chaos-only flourishes (hand-drawn circle on the exam date) */
.obj .cal__grid .is-exam::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 34px; margin: -17px 0 0 -20px; border: 2px solid var(--exams); border-radius: 48% 52% 45% 55%; transform: rotate(-12deg); opacity: 0.8; }

/* Replay: centred under the card. */
.replay { grid-column: 1; grid-row: 2; align-self: start; justify-self: center; position: relative; z-index: 4; margin: 16px 0 0; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 10px; border-radius: var(--radius-lg); border: 1px solid var(--edge); background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--muted-foreground); font: 600 13px var(--font-sans); cursor: pointer; opacity: 0; visibility: hidden; transition: color 150ms ease, background-color 150ms ease, opacity 300ms ease, visibility 0s linear 300ms; }
.replay svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.replay:hover { color: var(--card-foreground); background: var(--glass-hover); }
/* It arrives a beat after the finish (1.2 s), so the settled card gets the moment to itself. */
.replay.is-on { opacity: 1; visibility: visible; transition: color 150ms ease, background-color 150ms ease, opacity 500ms ease 1.2s, visibility 0s linear 1.2s; }
.orbit-static .replay, html:not(.js) .replay { display: none; }

/* Pre-staging: hide the answer until the scatter is placed. */
.orbit-pending .today { opacity: 0; }

/* ── Short laptop screens: compact desk objects ── */
@media (max-height: 820px) and (min-width: 1240px) {
  .vid--sm { height: clamp(80px, 11.4vh, 100px); }
  .vid--sm .chalk--sm { bottom: 10px; font-size: 20px; }
  .play--sm { width: 34px; height: 34px; margin-top: -17px; }
  .play--sm::after { left: 13px; top: 10px; border-width: 7px 0 7px 11px; }
  .thumb__cap { padding: 8px 6px 3px; }
  .thumb__meta { display: none; }
  .exam__foot { margin-top: 6px; }
  .cal { padding: 12px 12px 10px; }
  .cal__grid { margin-top: 6px; row-gap: 1px; }
  .cal__grid span { height: clamp(20px, 2.8vh, 26px); }
  .cal__grid .dow { height: 18px; }
  .cal__foot { margin-top: 6px; padding-top: 7px; }
}

/* ── Mobile (a designed variant) ───────────────────────────────── */
@media (max-width: 760px) {
  :root { --stage-pb: 44px; }
  .hero { margin-top: -60px; padding-top: 60px; }
  /* 6px of bottom padding keeps the second button off the edge of the copy's
     layer: iOS Safari clipped its bottom border when it sat flush there. */
  .hero-copy { padding: 10px 20px 6px; }
  .hero-title { font-size: 40px; line-height: 1.02; letter-spacing: -0.04em; }
  .br-m { display: inline; }
  .hero-sub { margin-top: 8px; font-size: 15.5px; line-height: 1.48; }
  .hero-actions { flex-direction: column; gap: 8px; margin-top: 14px; }
  .hero-cta { width: 100%; max-width: 320px; min-height: 52px; }
  /* Mobile: the free link is a soft white pill (a 44 px target that sits
     clear of the canvas's grid lines). */
  .hero-free { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 18px; border-radius: 999px; font-size: 15px; background: var(--pill-glass); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-text) 18%, transparent), 0 6px 16px -10px rgb(var(--shade) / calc(0.3 * var(--shade-k))); }
  .today-stage { padding: 20px 12px var(--stage-pb); } /* with the copy's 6px: 26px of clear air between the buttons and the card */
  .today-group { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .today__chrome { height: 36px; padding: 0 14px; }
  .today__total { display: none; }
  .today__head { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 14px 10px; }
  .today__title { font-size: 25px; }
  .today__date { margin-top: 4px; font-size: 13.5px; }
  .week { justify-content: space-between; gap: 5px; }
  .day { flex: 1; width: auto; height: 50px; }
  .day__num { font-size: 17px; line-height: 21px; }
  .tasks { --row-h: 50px; --row-gap: 2px; padding: 6px 8px 6px; }
  .today__hl { left: 8px; right: 8px; top: calc(6px + var(--row-h) + var(--row-gap)); }
  .today__next { display: none; } /* mobile: the highlighted row carries "next" */
  .task { grid-template-columns: 20px 8px 1fr; gap: 10px; padding: 0 12px 0 10px; }
  .task__dot { width: 8px; height: 8px; }
  .task__topic, .task__min { display: none; }
  .task__title { font-size: 15px; line-height: 19px; font-weight: 600; }
  .task__meta { display: block; margin-top: 1px; font-size: 13px; line-height: 17px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; hyphens: none; }
  .replay { height: 44px; }

  /* ── Phone hero review (James, 2026-10-11) ─────────────────────── */
  /* The headline as setup and punchline: "There's a lot to learn." small,
     "We make it Clear." big, so "Clear" stays the biggest thing on screen. */
  .hero-title { font-size: 0; line-height: 0; }
  .br-m, .br-d { display: none; }
  .ht { display: block; }
  .ht-1 { font-size: min(6.2vw, 26px); line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; white-space: nowrap; }
  .ht-2 { margin-top: 2px; font-size: min(11.3vw, 46px); line-height: 1.08; letter-spacing: -0.045em; white-space: nowrap; }
  /* One short line instead of the desktop subtitle. */
  .hero-sub--long { display: none; }
  .hero-sub--short { display: block; margin-top: 12px; font-size: 16px; }
  /* One button system: both actions are the same 10px-radius, same-width
     button; the free link wears Clear's tinted primary, the commit
     button's quieter sibling. */
  .hero-actions { gap: 10px; margin-top: 18px; }
  .hero-cta, .hero-free { width: 100%; max-width: 340px; min-height: 50px; border-radius: 10px; }
  .hero-free { justify-content: center; padding: 0 18px; font-size: 16px; color: var(--primary-tint-foreground); background: var(--primary-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-tint-border) 35%, transparent); text-decoration: none; }
  /* Dark: the tint glowed like a second primary, so it steps down to a hint
     of green fill, a faint green edge and softer green text (still ≥4.5:1). */
  .theme-dark .hero-free { color: color-mix(in srgb, var(--primary-text) 72%, var(--card-foreground)); background: color-mix(in srgb, var(--primary-text) 7%, var(--background)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-text) 20%, transparent); }
  /* Day buttons: room between them and inside them. */
  .today__head { gap: 14px; padding: 12px 14px 14px; }
  .week { gap: 8px; }
  .day { height: 60px; border-radius: 12px; }
  .day__dow { font-size: 10.5px; line-height: 13px; }
  .day__num { margin-top: 2px; font-size: 18px; line-height: 22px; }
  .day__marks { margin-top: 4px; height: 8px; }
  .dot { width: 5px; height: 5px; }
  /* The day's total shows, as on desktop ("26 min today"). */
  .today__total { display: inline; font-size: 13px; }
}
