/* Landing page (`/`, web/templates/home.html) — tile polish only.
 *
 * Page-scoped plain CSS, NOT in app.bundle.css, so editing it needs no Tailwind rebuild
 * (same pattern as 20-simulate.css / 22-chatbot.css / 29-search.css). Structure, colour
 * and hover behaviour come from `.practice-card` / `.lib-card` in 06-landing.css, which
 * the landing already loads; everything here is additive.
 *
 * NOTE: the landing puts `--accent-rgb` on the <a> itself rather than only on the icon
 * chip (the subject grids do the latter), so 06-landing.css's hover border + gradient and
 * the focus ring pick up each tile's own hue instead of the slate default.
 */

/* Bright homepage: a few soft gold specks behind the content. Partners 12-03: the
   earlier neon-yellow crosses and falling trails read as dust on the light page. */
html[data-theme="light"] .space-stars { display: block; }
html[data-theme="dark"] .space-stars .star--light-extra { display: none; }
html[data-theme="light"] .space-stars .star--light-extra { display: none; }
html[data-theme="light"] .space-stars .star {
  min-width: 2px;
  min-height: 2px;
  background: #f5c542;
  box-shadow: 0 0 6px rgba(245, 197, 66, .55);
  animation: home-gold-twinkle 9s ease-in-out infinite var(--star-delay, 0s);
}
@keyframes home-gold-twinkle {
  0%, 100% { opacity: .12; }
  45% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] .space-stars { display: none; }
}

/* The two main section headings use violet and blue in both themes. Their tile rows
   keep their own subject and destination colours. */
.home-section-heading--study > span:first-child,
.home-section-heading--subjects > span:first-child {
  color: color-mix(in srgb, rgb(var(--section-rgb)) 74%, #fff);
}
.home-section-heading--study > span:nth-child(2),
.home-section-heading--subjects > span:nth-child(2) {
  background: linear-gradient(90deg, rgba(var(--section-rgb), 0.62),
                                     rgba(var(--section-rgb), 0.08) 72%, transparent);
}

/* ─── Section tiles ──────────────────────────────────────────────────────────
   Every tile rests in a faint wash of its own accent, so the English and Tools rows sit
   in the same colour world as the Study block and the subject cards instead of being the
   only neutral cards left on the page. The hero (--big) tiles get a stronger wash; both
   stay well below the hover gradient's 0.08+ so hovering is still a clear change. */
.home-tile {
  background-image:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.11) 0%, rgba(255, 255, 255, 0.02) 60%);
  border-color: rgba(var(--accent-rgb), 0.22);
}
.home-tile--big {
  background-image:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.07) 0%, rgba(255, 255, 255, 0.02) 55%);
  border-color: rgba(var(--accent-rgb), 0.16);
}
.home-tile:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
}
/* Glyphs are a LIGHT tint of their accent, not the accent itself. Once the chips behind
   them were pushed to 0.28-0.60 fill, a -400 mark on a -400 wash lost its contrast and the
   icons read as faded — the brighter the chip got, the more washed-out the symbol looked.
   Mixing toward white keeps the hue and puts the contrast back; the plain `color` line
   before each mix is the fallback for browsers without color-mix. */
.home-tile--square .practice-card-icon {
  color: rgb(var(--accent-rgb));
  color: color-mix(in srgb, rgb(var(--accent-rgb)) 52%, #fff);
  filter: drop-shadow(0 1px 3px rgba(2, 8, 22, 0.4));
}
.home-tile:not(.home-tile--square) .practice-card-icon {
  color: rgb(var(--accent-rgb));
  color: color-mix(in srgb, rgb(var(--accent-rgb)) 72%, #fff);
}

/* Secondary destinations deserve the same presence as the Study launcher. Keep
   the dark text surface at page depth; concentrate colour on the rim and icon. */
:root:not([data-theme="light"]) .home-tile:not(.home-tile--square) {
  background: var(--space-deep, #080e1e);
  border-color: rgba(var(--accent-rgb), 0.48);
  box-shadow: inset 3px 0 rgba(var(--accent-rgb), 0.85),
              inset 0 1px rgba(var(--accent-rgb), 0.14),
              0 5px 15px rgba(0, 0, 0, 0.22);
}
.home-tile:not(.home-tile--square) .home-tile-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.30), rgba(var(--accent-rgb), 0.12));
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16),
              0 3px 10px rgba(var(--accent-rgb), 0.12);
}
.home-tile:not(.home-tile--square) .practice-card-icon {
  width: 1.5rem;
  height: 1.5rem;
}
.home-tile:not(.home-tile--square) .practice-card-arrow {
  color: rgb(var(--accent-rgb));
}
:root:not([data-theme="light"]) .home-tile:not(.home-tile--square):is(:hover, :focus-visible) {
  border-color: rgba(var(--accent-rgb), 0.80);
  box-shadow: inset 3px 0 rgb(var(--accent-rgb)),
              inset 0 1px rgba(var(--accent-rgb), 0.24),
              0 7px 20px rgba(var(--accent-rgb), 0.14);
}

/* The hero chip earns a soft halo — it is the page's brightest accent mark. Must stay
   ABOVE `.home-tile--square .home-tile-icon`: the two selectors have identical
   specificity and every Study tile carries both classes, so whichever comes last wins. */
.home-tile--big .home-tile-icon {
  background-color: rgba(var(--accent-rgb), 0.24);
  box-shadow: 0 0 24px -5px rgba(var(--accent-rgb), 0.6);
}
/* ─── Square launcher tile (the Study block) ─────────────────────────────────
   A ceiling on how big the square gets: six tiles only divide evenly into 3 or 6 columns,
   and between ~560 and ~640px neither count is comfortable — three columns there are
   165-190px cells, and a square that size is a billboard on a phone. Capping the HEIGHT
   (rather than the width) keeps the tile flush with every other block on the page (a
   max-width would centre it in its cell and inset the whole row a few px from the section
   heading) and costs at most a 1.2 ratio inside that one band. Everywhere else the cap is
   not reached and the tile is exactly square.

   The accent lights the WHOLE face, as a glow rising from behind the icon. The flat 7%
   wash these carried as cards left six near-black boxes each wearing one small coloured
   chip — at card size that reads as restraint, at launcher size it reads as unfinished.

   The RESTING strength is deliberately held down. The rest of the page — subject chips,
   English and Tools cards, the level strip — is dark with small accents, so a fully-lit
   Study block looked like it came from a different site. The lit version is the HOVER
   state instead: the row reads as one calm set until you reach for something. */
.home-tile--square {
  max-height: 10rem;
  border-radius: 1.25rem;
  border-color: rgba(var(--accent-rgb), 0.34);
  background-color: rgba(var(--accent-rgb), 0.07);
  background-image:
    radial-gradient(115% 85% at 50% 6%, rgba(var(--accent-rgb), 0.4) 0%,
                                        rgba(var(--accent-rgb), 0.13) 42%,
                                        transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 30px -14px rgba(var(--accent-rgb), 0.7);
  transition: transform 0.18s ease, border-color 0.18s ease,
              box-shadow 0.18s ease, background-image 0.18s ease;
}
.home-tile--square:hover,
.home-tile--square:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.48);
  background-image:
    radial-gradient(115% 85% at 50% 6%, rgba(var(--accent-rgb), 0.32) 0%,
                                        rgba(var(--accent-rgb), 0.11) 45%,
                                        transparent 75%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 40px -20px rgba(var(--accent-rgb), 0.95);
}

/* The symbol chip, app-icon style. Placed AFTER the `--big` icon rule below-equal in
   specificity, so it is the cascade order that makes this win — keep it here. A gradient
   with a lit top edge rather than a flat 16% fill: at 48-64px a flat chip looks like a
   placeholder, and the icon is the whole content of the tile. */
.home-tile--square .home-tile-icon {
  border-radius: 1rem;
  background-color: transparent;
  background-image: linear-gradient(155deg, rgba(var(--accent-rgb), 0.6) 0%,
                                            rgba(var(--accent-rgb), 0.24) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 22px -6px rgba(var(--accent-rgb), 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-image 0.18s ease;
}
.home-tile--square:hover .home-tile-icon,
.home-tile--square:focus-visible .home-tile-icon {
  transform: scale(1.05);
  background-image: linear-gradient(155deg, rgba(var(--accent-rgb), 0.5) 0%,
                                            rgba(var(--accent-rgb), 0.2) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 26px -8px rgba(var(--accent-rgb), 0.8);
}

/* Two lines, then clip — every name is one short word today, but a longer one added later
   should wrap inside the square rather than push the label out of it. */
.home-tile-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}


/* ─── Subject picker (one tab per qualification) ─────────────────────────────
   The qualification tabs side by side; the selected one's subjects fill the full-width
   panel below. CSS-only: the same-named radios live before both the tab row and the panels, so
   `:checked ~` can reach forward to style the matching label and reveal its panel. That
   is why the radios are siblings of BOTH — a <details> per level can't do this, since its
   body is stuck inside its own narrow column. */
.home-level-radio {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Segmented control ───────────────────────────────────────────────────────
   A single sliding thumb rather than one lit segment per level, so changing level reads as
   one control moving instead of two things blinking. The thumb takes the colour of the
   selected level from --lvl-1..N, which the TEMPLATE sets from home_sections._LEVELS —
   the palette is not duplicated here. */
.home-level-thumb {
  position: absolute;
  /* Full-bleed: the strip has no padding and no gaps, so the pill is exactly one segment
     of it and touches every edge — no 5px groove around it. It still reads as a PILL: the
     radius here is the strip's inner radius (its 1rem less the 1px border), so at the two
     ends the pill's corners nest exactly inside the strip's own rather than showing a
     sliver of track between them. */
  left: 0;
  top: 0;
  bottom: 0;
  /* One SEGMENT wide, whatever the level count is. The strip passes its own length down
     as --lvl-count (home.html); the fallback only matters if that ever stops being set. */
  width: calc(100% / var(--lvl-count, 3));
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.13));
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
    0 6px 18px -10px rgba(var(--accent-rgb), 0.8);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.25s ease, box-shadow 0.25s ease;
}
/* translateX percentages resolve against the THUMB's own width — exactly one segment —
   so each step is a clean 100%, with no gap to add now that the segments tile.

   ⭐ Matched on the level's POSITION, never its id. These rules were `#home-level-igcse` /
   `_a_level` / `_ap`, and adding a fourth level in home_sections._LEVELS (IELTS/TOEFL,
   2026-09-19) therefore produced a tab that styled nothing and, worse, a panel with no
   `display: block` — clicking it emptied the picker. Nothing here names a level now, so the
   next one costs no CSS at all. Six is the ceiling, asserted at import in home_sections.

   The position is a CLASS the template writes (`lvl-1`…`lvl-N`), not `:nth-of-type()`.
   Both work; the class is chosen because nth-of-type counts by TAG among siblings, so it
   silently means something else the day another <input> or <label> joins .home-levels or
   the tab strip — the same trap the panel note below records, where the strip's own <div>
   would have put every panel off by one. A class says which level it is and cannot drift.

   ⚠️ Measuring this in a HIDDEN browser pane will look broken and is not: the thumb and
   the labels transition (0.3s / 0.2s), and a hidden tab throttles transitions so they never
   advance — `getComputedStyle` then reports the pre-click value for ever while the panel,
   which has no transition, switches instantly. Disable the transitions (or front the pane)
   before concluding a selector does not match. */
.home-level-radio.lvl-1:checked ~ .home-level-tabs .home-level-thumb { --accent-rgb: var(--lvl-1); transform: translateX(0%); }
.home-level-radio.lvl-2:checked ~ .home-level-tabs .home-level-thumb { --accent-rgb: var(--lvl-2); transform: translateX(100%); }
.home-level-radio.lvl-3:checked ~ .home-level-tabs .home-level-thumb { --accent-rgb: var(--lvl-3); transform: translateX(200%); }
.home-level-radio.lvl-4:checked ~ .home-level-tabs .home-level-thumb { --accent-rgb: var(--lvl-4); transform: translateX(300%); }
.home-level-radio.lvl-5:checked ~ .home-level-tabs .home-level-thumb { --accent-rgb: var(--lvl-5); transform: translateX(400%); }
.home-level-radio.lvl-6:checked ~ .home-level-tabs .home-level-thumb { --accent-rgb: var(--lvl-6); transform: translateX(500%); }

/* Segments sit ABOVE the thumb and are otherwise unstyled — the thumb is the only fill,
   so nothing double-paints as it slides through.

   min-w-0 in the markup is load-bearing: `flex-1` is `flex: 1 1 0%`, but a flex item's
   default `min-width: auto` stops it shrinking below its content. "IELTS / TOEFL" is far
   wider than "AP", so without it the segments come out UNEQUAL on a narrow viewport — and
   the thumb, which is exactly 100%/N, then stops lining up with them (measured broken at
   381-390px, where the icon reappears and space is tightest). */
.home-level-tab {
  color: rgb(148, 163, 184);
  transition: color 0.2s ease;
}
.home-level-icon {
  background: rgba(var(--accent-rgb), 0.12);
  color: rgb(var(--accent-rgb));
  color: color-mix(in srgb, rgb(var(--accent-rgb)) 74%, #fff);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.home-level-label { color: rgb(203, 213, 225); transition: color 0.2s ease; }
.home-level-tab:hover .home-level-label { color: #fff; }
.home-level-tab:hover .home-level-icon { background: rgba(var(--accent-rgb), 0.2); }

.home-level-radio.lvl-1:checked ~ .home-level-tabs .home-level-tab.lvl-1 .home-level-label,
.home-level-radio.lvl-2:checked ~ .home-level-tabs .home-level-tab.lvl-2 .home-level-label,
.home-level-radio.lvl-3:checked ~ .home-level-tabs .home-level-tab.lvl-3 .home-level-label,
.home-level-radio.lvl-4:checked ~ .home-level-tabs .home-level-tab.lvl-4 .home-level-label,
.home-level-radio.lvl-5:checked ~ .home-level-tabs .home-level-tab.lvl-5 .home-level-label,
.home-level-radio.lvl-6:checked ~ .home-level-tabs .home-level-tab.lvl-6 .home-level-label { color: #fff; }
.home-level-radio.lvl-1:checked ~ .home-level-tabs .home-level-tab.lvl-1 .home-level-icon,
.home-level-radio.lvl-2:checked ~ .home-level-tabs .home-level-tab.lvl-2 .home-level-icon,
.home-level-radio.lvl-3:checked ~ .home-level-tabs .home-level-tab.lvl-3 .home-level-icon,
.home-level-radio.lvl-4:checked ~ .home-level-tabs .home-level-tab.lvl-4 .home-level-icon,
.home-level-radio.lvl-5:checked ~ .home-level-tabs .home-level-tab.lvl-5 .home-level-icon,
.home-level-radio.lvl-6:checked ~ .home-level-tabs .home-level-tab.lvl-6 .home-level-icon {
  background: rgba(var(--accent-rgb), 0.24);
  box-shadow: 0 0 16px -4px rgba(var(--accent-rgb), 0.6);
}

/* Where the icon has to go — asked of the SEGMENT, not the viewport. It used to be
   `@media (max-width: 440px)`, derived from a segment being one THIRD of the strip; the
   fourth level made every segment a quarter, so the same viewport gave ~25% less room and
   the widest label ("IELTS / TOEFL") clipped with the icon still shown. A container query
   on the tab itself is count-proof: whatever the level count and viewport, a segment
   narrower than the label needs gives the label all of it.

   ⚠️ A container query measures the CONTENT box, so these numbers are the segment MINUS its
   24px of padding — 166 here is a ~190px segment, which is what a 900px viewport gives four
   tabs. Measured: "IELTS / TOEFL" is 117px at 18px and 85px at 14px; the icon and its gap
   cost 46px of the content box, so with the icon shown the label needs 163 and the switch
   sits just above it at 166.

   ⚠️ A container query CANNOT style its own container, so a `.home-level-tab { padding }`
   rule inside these blocks would be inert — only descendants (.home-level-icon,
   .home-level-label) can be touched here. Below ~120px the label therefore buys its room
   by WRAPPING rather than by stealing padding: `truncate` (Tailwind) pins it to one line
   and ellipsis, and on a 375px phone the segment is 86px, of which the label gets 62 —
   "IELTS / TOEFL" needs 85 at 14px, so the one-line version clipped to "IELTS / T…".
   Two lines of 13px fit with room to spare, and the three short labels never wrap at all. */
.home-level-tab { container-type: inline-size; }
@container (max-width: 166px) {
  .home-level-icon { display: none; }
}
@container (max-width: 120px) {
  .home-level-label {
    font-size: 0.8125rem;
    line-height: 1.2;
    white-space: normal;   /* overrides Tailwind's `truncate` */
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-level-thumb { transition: none; }
}

/* The selected level's subject panel. Matched on the panel's OWN data-idx rather than
   :nth-of-type, because nth-of-type counts among ALL sibling <div>s — the tab strip is
   one, so the panels would be off by one and the whole thing would silently show the
   wrong level — the same reason the rules above key on a class rather than counting. */
.home-level-panel { display: none; }

.home-level-radio.lvl-1:checked ~ .home-level-panel[data-idx="1"],
.home-level-radio.lvl-2:checked ~ .home-level-panel[data-idx="2"],
.home-level-radio.lvl-3:checked ~ .home-level-panel[data-idx="3"],
.home-level-radio.lvl-4:checked ~ .home-level-panel[data-idx="4"],
.home-level-radio.lvl-5:checked ~ .home-level-panel[data-idx="5"],
.home-level-radio.lvl-6:checked ~ .home-level-panel[data-idx="6"] {
  display: block;
  margin-top: 0.5rem;
}

/* Keyboard focus lands on the visually-hidden radio, so the ring must be drawn on its
   label — otherwise arrow-keying through the group shows nothing at all. */
.home-level-radio.lvl-1:focus-visible ~ .home-level-tabs .home-level-tab.lvl-1,
.home-level-radio.lvl-2:focus-visible ~ .home-level-tabs .home-level-tab.lvl-2,
.home-level-radio.lvl-3:focus-visible ~ .home-level-tabs .home-level-tab.lvl-3,
.home-level-radio.lvl-4:focus-visible ~ .home-level-tabs .home-level-tab.lvl-4,
.home-level-radio.lvl-5:focus-visible ~ .home-level-tabs .home-level-tab.lvl-5,
.home-level-radio.lvl-6:focus-visible ~ .home-level-tabs .home-level-tab.lvl-6 {
  outline: 2px solid rgba(var(--accent-rgb), 0.7);
  outline-offset: -1px;
}

/* ─── Subject disclosure (chip → what you can do with it) ────────────────────
   One <details> per subject, exclusive via name="home-subject". Not overflow-hidden, so
   the hover lift isn't clipped — hence the hover fill goes on the <details> via
   :has(> summary:hover) rather than on the summary, so it follows the rounded corners. */
.home-subject {
  position: relative;   /* anchor for the absolutely-positioned action overlay below */
  /* A resting wash of the subject's own hue rather than flat white/3% — with 8 to 19 of
     these in a panel, the colour is what makes the grid scannable, and it matches how the
     Study tiles above carry their accent. */
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.2) 0%, rgba(255, 255, 255, 0.025) 62%);
  border-color: rgba(var(--accent-rgb), 0.32);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease,
              box-shadow 0.16s ease;
}
.home-subject:has(> summary:hover) {
  border-color: rgba(var(--accent-rgb), 0.45);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.18) 0%, rgba(255, 255, 255, 0.03) 62%);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.9),
              0 0 22px -12px rgba(var(--accent-rgb), 0.7);
}
.home-subject[open] {
  border-color: rgba(var(--accent-rgb), 0.45);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.16) 0%, rgba(255, 255, 255, 0.03) 62%);
}

/* The longest name on the site — "Physics C: Electricity and Magnetism" — does not fit a
   card's text column on one line at any width. Wrapping to two lines shows it in full
   instead of ellipsising it; the grid stretches its row-mates to match. */
.home-subject-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* The subject symbol. Bigger than the old 28px chip and with a halo of its own hue — it
   is the thing you actually scan for when picking a subject out of nineteen. */
.home-subject-icon {
  background: rgba(var(--accent-rgb), 0.28);
  color: rgb(var(--accent-rgb));
  color: color-mix(in srgb, rgb(var(--accent-rgb)) 68%, #fff);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.34),
              0 0 20px -6px rgba(var(--accent-rgb), 0.9);
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.home-subject:has(> summary:hover) .home-subject-icon,
.home-subject[open] .home-subject-icon {
  background: rgba(var(--accent-rgb), 0.26);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35),
              0 0 22px -6px rgba(var(--accent-rgb), 0.85);
}

.home-subject-chevron {
  color: rgba(var(--accent-rgb), 0.6);
  transition: transform 0.2s ease, color 0.18s ease;
}
.home-subject[open] .home-subject-chevron { transform: rotate(90deg); }
.home-subject[open] .home-subject-chevron,
.home-subject:has(> summary:hover) .home-subject-chevron { color: rgb(var(--accent-rgb)); }

/* The action overlay. Anchored to the subject card and absolutely positioned, so
   unfolding overlays whatever is below instead of growing the grid row — the card itself
   never changes size. Accent-tinted glass, the same vocabulary as the /code landing's
   resources popover (16-code.css .code-resources-pop). */
.home-subject-pop {
  position: absolute;
  /* Right-aligned and only as wide as its labels: a full-card-width box around five
     short buttons looked empty. The card's right half is blank anyway (subject names are
     short), so the panel hangs under exactly that space. max-width keeps it inside the
     card on the narrowest phone, where the name can run the full width. */
  left: auto;
  right: 0;
  width: max-content;
  min-width: 8.5rem;
  max-width: 100%;
  /* Flush with the card's OWN top edge — it sits ON the card's blank right half rather
     than hanging beneath it. Exactly 0, not a negative offset: a few pixels of overhang
     read as a misalignment rather than as intent. */
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.3rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  background: linear-gradient(162deg, rgba(var(--accent-rgb), 0.16) 0%, rgba(13, 21, 40, 0.94) 58%);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08),
    0 22px 48px -18px rgba(0, 0, 0, 0.85),
    0 0 30px -14px rgba(var(--accent-rgb), 0.45);
}

/* An OPEN card must paint above the cards after it in the grid, or the overlay is
   covered by them. z-index on a positioned element is what raises the whole card; the
   hover lift is dropped while open because a transform would create a stacking context
   that traps the overlay inside the card again. */
.home-subject[open] { z-index: 30; }
.home-subject[open]:has(> summary:hover) { transform: none; }

/* Menu rows. The icon carries the hue of the surface it goes to — the same cyan for Know
   as the Know tile further down the page — while the label stays neutral so five colours
   don't fight; hovering tints the whole row with that surface's accent. */
.home-action {
  color: #cbd5e1;
  transition: background 0.14s ease, color 0.14s ease;
}
.home-action > svg:first-child { color: rgb(var(--accent-rgb)); }
.home-action-go { color: transparent; transition: color 0.14s ease, transform 0.14s ease; }
.home-action:hover {
  background: rgba(var(--accent-rgb), 0.18);
  color: #fff;
}
.home-action:hover .home-action-go { color: rgba(var(--accent-rgb), 0.9); transform: translateX(2px); }
.home-action:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.6);
  outline-offset: -1px;
}

/* Subject chips stagger in when a level tab is selected, and the action row when a
   subject unfolds — same motion vocabulary as the code landing's lesson cards. */
.home-level-panel .home-subject {
  animation: home-subject-in 0.3s cubic-bezier(0.22, 0.9, 0.32, 1) backwards;
  animation-delay: calc(20ms + min(var(--i, 0), 18) * 16ms);
}
.home-subject[open] .home-action {
  animation: home-subject-in 0.24s cubic-bezier(0.22, 0.9, 0.32, 1) backwards;
}
@keyframes home-subject-in {
  from { opacity: 0; transform: translateY(6px) scale(0.985); }
}

/* ─── /about explainer cards ─────────────────────────────────────────────────
   The four "how this site works" blocks. Same sheet as the landing because /about is
   built from the landing's vocabulary — the section tiles above them are literally the
   same `.practice-card` markup, driven by the same registry. */
.about-card {
  transition: border-color 0.18s ease, background 0.18s ease;
}
.about-card:hover {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.04);
}
.about-card-icon {
  background: rgba(var(--accent-rgb), 0.14);
  color: rgb(var(--accent-rgb));
}
/* Card body: short bullets, not prose. The marker is a small accent-tinted dot, absolutely
   positioned out of the text flow with the text indented past it — so a wrapped second line
   aligns under the TEXT, not under the bullet.
   ⛔ The <li> must NOT be `display: grid` (or flex). Every bullet contains <strong> from the
   `bold_marks` filter, and a grid container makes each element child its OWN grid item — the
   bold words break onto separate rows and a one-line bullet renders ~150px tall. Measured,
   not guessed. Keep the li a normal block box. */
.about-bullets {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;              /* safe here: every child is an <li>, whitespace-only nodes
                                 between them are not rendered */
  gap: 0.45rem;
}
.about-bullets li {
  position: relative;
  padding-left: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgb(203, 213, 225);
}
.about-bullets li::before {
  content: "";
  position: absolute;
  left: 0.0625rem;
  top: 0.62em;                /* onto the first line's x-height, at any font size */
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: rgb(var(--accent-rgb));
  opacity: 0.85;
}
.about-bullets strong { font-weight: 600; color: #fff; }

.about-link {
  color: rgb(var(--accent-rgb));
  text-underline-offset: 2px;
}
.about-link:hover { text-decoration: underline; }

/* ─── Hero: icon tile + title flow ───────────────────────────────────────────
   This sheet loads on the two FRONT-DOOR pages, / and /about, and both get the treatment
   — deliberately: they are the pages a stranger lands on, and the deep pages keep the
   quieter shared hero. Three changes, all to the same complaint — it read as small and
   flat:

   * The tile goes 56 -> 76px with a 38px glyph, so the mark holds its own against a 48px
     title instead of sitting beside it as punctuation.
   * Its fill spans the page ramp (cyan -> violet) at roughly double the shared opacity,
     with a real cast beneath it, rather than two near-identical blues at 22%.
   * The TITLE gradient spans cyan -> violet -> fuchsia. The shared one runs cyan-300 ->
     blue-300 -> indigo-300 — three pale neighbours, which is why a gradient that has
     always been there reads as a solid fill. Same shimmer animation, real distance
     between the stops. */
.site-hero-icon {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 1.5rem;
  /* The icon is 76px and a one-line title is 48px, so the icon — not the title — was
     setting the flex row's height, and the bullets below it sat 44px under the title with
     the icon running on past them. This takes the icon's contribution back down to the
     SMALLEST title's height (text-2xl, 24px + the h1's mt-1). It still DRAWS at full size,
     spilling into the band below, which is safe because the bullets are indented clear of
     it. Sized against the smallest and not the largest title on purpose: the h1 steps
     2xl -> 4xl -> 5xl across breakpoints while the icon stays 76px, so anything less left
     the icon driving the row at some widths and the gap came out 12 / 20 / 28px depending
     on where you measured. Now the title drives it everywhere and the gap is always 12.
     The declaration itself is the :has() rule below this block. */
  /* Two layers: a lit corner over the ramp fill, so the tile has a light SOURCE instead of
     an even wash. That is the difference between a coloured square and an object. */
  background:
    radial-gradient(125% 115% at 22% 10%, rgba(255, 255, 255, 0.22) 0%, transparent 58%),
    linear-gradient(140deg, rgba(34, 211, 238, 0.62) 0%, rgba(99, 102, 241, 0.5) 52%,
                            rgba(192, 132, 252, 0.46) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 -10px 20px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(34, 211, 238, 0.45),
    0 16px 40px -14px rgba(34, 211, 238, 0.6),
    0 0 54px -14px rgba(167, 139, 250, 0.75);
}

/* White glyph, not a tinted one: on a fill this saturated a cyan-200 mark disappeared into
   its own background. The shadow lifts it off the gradient.
   ⚠️ THIS rule sets the glyph size, not the `h-*` utility on the <svg> in
   partials/hero.html — `.site-hero-icon svg` (0,1,1) outspecifies a single class
   (0,1,0), so editing the template class alone changes nothing here. Size lives in
   one place: change it below.
   3.1rem, not the old 2.375rem: against this 4.75rem tile that was exactly 50%, and
   the mark read as a small glyph marooned in a large tile. 3.1rem ≈ 65%, which is
   what a hero tile wants. */
.site-hero-icon svg {
  width: 3.1rem;
  height: 3.1rem;
  color: #fff;
  filter: drop-shadow(0 2px 5px rgba(2, 8, 22, 0.45));
}

/* A quiet, stationary frame around the landing-page brand mark. */
#site-main.home-main > .site-hero .site-hero-icon {
  background: var(--space-deep, #080e1e);
  border: 1px solid rgb(125 211 252 / .18);
  border-radius: 1rem;
  box-shadow: inset 0 1px 0 rgb(125 211 252 / .08), 0 5px 12px -9px rgb(0 0 0 / .55);
  animation: none;
  transform: none;
}

.home-main { position: relative; }
.home-resume-row { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.home-resume-row:has(> [data-resume-card]:not([hidden])) { margin-bottom: 1.5rem; }
.home-resume-row > .resume-compact { margin-bottom: 0; }
@media (min-width: 1400px) {
  .home-resume-column {
    position: absolute; top: 3rem; left: calc((64rem - 100vw) / 4);
    transform: translateX(-50%);
    width: max-content;
    max-width: min(19rem, calc((100vw - 64rem) / 2 - 2.5rem));
  }
}
@media (min-width: 1400px) and (max-width: 1699px) {
  #site-main.home-main { max-width: 56rem; }
  .home-resume-column {
    left: calc((56rem - 100vw) / 4);
    max-width: calc((100vw - 56rem) / 2 - 2.5rem);
  }
  .home-resume-column .resume-compact-subject { font-size: .75rem; }
}

.site-hero-title {
  background-image: linear-gradient(100deg,
    rgb(103, 232, 249) 0%, rgb(147, 197, 253) 26%, rgb(196, 181, 253) 58%,
    rgb(240, 171, 252) 82%, rgb(103, 232, 249) 100%);
  background-size: 220% 100%;
  filter: drop-shadow(0 1px 0 #274776)
          drop-shadow(0 2px 0 #11213d)
          drop-shadow(0 5px 4px rgb(0 0 0 / .45))
          drop-shadow(0 0 26px rgba(34, 211, 238, 0.20));
}

/* ─── Hero bullets ──────────────────────────────────────────────────────────
   The hero's chip row is a 0.7rem wrapping flex line, sized to support a paragraph. Here
   the bullets ARE the page's description — there is no paragraph — so they carry the
   weight: bigger, and on a 2x2 grid rather than a wrapping row. The hero is capped at
   max-w-3xl, so four of these always wrapped, and a wrap lands 3-then-1, which reads as
   a mistake. A grid makes the same break deliberate and keeps the dots on one axis.
   Page-scoped, since this sheet only loads on `/`. */
/* ─── Hero bullets ──────────────────────────────────────────────────────────
   FOUR columns at every width, so the block is always exactly TWO lines: row one is what
   the site is, row two the four things you get. Below lg those four columns are wider
   than a phone, so the block scrolls sideways — a swipe, with the right edge faded to
   show there is more. Stacking is what this replaced: two columns meant four lines and
   ~100px of a 390px screen, one column meant eight lines and ~220px.

   Content-sized columns (`max-content`) rather than fractions: eight bullets of eight
   different lengths have no reason to occupy equal widths, and on a scroll track equal
   widths would only make the overflow longer.

   No auto-scrolling marquee, though it was asked about: text that moves on its own has to
   carry a pause control to meet WCAG 2.2.2, and a hero is the wrong place for one. A
   swipe costs the reader nothing and stops where they let go. */
.site-hero-chips {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 0.55rem 1.1rem;
  font-size: 0.8rem;
  color: rgb(203, 213, 225);          /* slate-300: these are the page's description now */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;              /* the fade is the affordance; a scrollbar under a
                                         two-line block is more chrome than signal */
  padding-block: 2px;                 /* a scroll container clips the other axis too, and
                                         the dots carry a glow that would be cut */
  padding-right: 1.75rem;             /* the last bullet clears the fade instead of dying in it */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.25rem), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 2.25rem), transparent);
}
.site-hero-chips::-webkit-scrollbar { display: none; }
/* The macro sets gap-2 between a dot and its text; 6px reads tighter at this size. */
.site-hero-chips > span { gap: 0.375rem; }

/* Three columns from lg — and the hero box widens to the content column to make room.
   The shared hero is capped at max-w-3xl (768px), which is right for a paragraph but
   gives three bullet columns only 240px each, and the materials bullet ("Handouts,
   Exercise sheets, PPT slides, Vocab lists") then wrapped to two lines and made the
   first row taller than the second. The TITLE keeps the old cap so its balanced two-line
   wrap is unchanged — only the bullet row gets the extra width. */
@media (min-width: 1024px) {
  .site-hero { max-width: none; }
  .site-hero h1 { max-width: 48rem; }
  /* First width where four columns fit outright, so the scroll track, the fade and the
     padding that served it all come off, the block gains the indent that aligns it with
     the title, and the type steps up. */
  .site-hero-chips {
    margin-left: calc(4.75rem + 1rem + 0.6rem);
    margin-top: 0.75rem;
    font-size: 0.85rem;
    row-gap: 0.9rem;
    overflow-x: visible;
    padding-right: 0;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .site-hero-chips > span { gap: 0.5rem; }
  /* The icon draws past the row's bottom so the gap is measured from the TITLE rather than
     from the taller of icon and title. Gated with the indent, not global: it is only safe
     while the bullets are indented clear of the icon, and below lg they start at the page
     edge. (/about shares this sheet and has a full-width subtitle — the :has() keeps it
     out entirely.) */
  .site-hero:has(.site-hero-chips) .site-hero-icon { margin-bottom: -3.25rem; }
  /* `auto` columns, not `1fr`: the bullets are five different lengths, and equal thirds
     gave each 309px while the materials bullet needs ~340 — so that one wrapped and its
     row grew taller than the other. Content-sized columns let the long one have the room
     it needs and the short ones give it up; the whole block still ends well inside the
     page, and row 2 stays aligned under row 1. */
  /* Four columns: eight bullets fall as two even rows of four. `auto` columns rather than
     equal fractions — eight bullets of eight different lengths have no reason to occupy
     identical widths, and content-sizing keeps every one on a single line. */
  .site-hero-chips {
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    column-gap: 2.25rem;
    row-gap: 0.9rem;
  }
  /* The two rows say different things — what the site IS, then what you GET — so they get
     a rule between them. Scoped to this breakpoint on purpose: items 5-8 are exactly the
     second row only at four columns. At two columns they are rows 3 AND 4, so the same
     selector would draw two lines mid-list; below lg the wider row-gap does the job. */
  .site-hero-chips > span:nth-child(n + 5) {
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* ─── Blurbs ─────────────────────────────────────────────────────────────────
   Titles are `truncate`, but a blurb must stay readable, so it wraps — capped at two
   lines so one long translation can't make a tile taller than its row-mates. */
.home-tile-blurb {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
/* Tiny phones: a single column ~185px of text can't hold the longest blurbs in two
   lines, so let them take three there rather than ellipsise — the column is single, so
   uneven card heights cost nothing. */
@media (max-width: 379px) {
  .home-tile-blurb { -webkit-line-clamp: 3; line-clamp: 3; }
}

/* ─── Entrance stagger ───────────────────────────────────────────────────────
   Tiles rise in sequence on load. `--i` is set inline per tile (its index within its
   group), and the delay is capped with min() so a group can grow without the last tile
   crawling in. `backwards` (not `both`) keeps the tile hidden through its delay while
   still releasing transform afterwards, so hover lift works — same reasoning as
   16-code.css's card stagger. Gated on the page-entrance class base.html toggles, so
   this runs once per load and never on a re-render. */
body:not(.page-entered) .home-tile {
  animation: home-tile-in 0.34s cubic-bezier(0.22, 0.9, 0.32, 1) backwards;
  animation-delay: calc(60ms + min(var(--i, 0), 8) * 34ms);
}
@keyframes home-tile-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.page-entered) .home-tile { animation: none; }
  /* Only the movement goes — the glow is decoration, not motion, and dropping it here
     would leave these users the one flat-looking version of the page. */
  .home-tile--square:hover,
  .home-tile--square:focus-visible,
  .home-tile--square:hover .home-tile-icon,
  .home-tile--square:focus-visible .home-tile-icon { transform: none; }
  .home-level-panel .home-subject,
  .home-subject[open] .home-action { animation: none; }
  .home-subject:has(> summary:hover),
  .home-level-tab:hover { transform: none; }
  .home-subject-chevron { transition: none; }
}


/* ─── Featured lessons row ───────────────────────────────────────────────────
   The first content on the landing page (see home.html for why it is there). Built out
   of the same card vocabulary as the tiles — a hairline, a lifted hover, the site's
   blue glow — so it reads as part of the page and not as an ad.

   The poster keeps its own dark plate in BOTH themes: these are frames from Manim
   lessons drawn for a dark ground, and lightening the box behind a dark still just
   makes the still look like a mistake. `home-watch` is therefore in build_light_theme's
   PLATE_HINTS — without it the generated light rules mapped the white play badge to
   slate-900 ON THE DARK STILL, which is invisible, and that is how it shipped first. */
.home-watch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; align-items: start; max-width: 32.5rem; margin-inline: auto; }
@media (min-width: 768px) { .home-watch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; } }
.home-watch-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  border-radius: 0.9rem;
  transition: transform 0.18s ease;
}
.home-watch-card:hover { transform: translateY(-2px); }
.home-watch-card:focus-visible { outline: 2px solid rgba(34, 211, 238, 0.6); outline-offset: 3px; }

.home-watch-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #0b1020;                       /* the .lx-figure matte, so a slow poster is not a white flash */
}
.home-watch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* PDF artwork retains its paper and original colours in both themes. Captions
   use the existing unfilled video-card surface and shared theme text colours. */
.home-document-thumb { background: #fff; }

/* The play badge is the affordance that says "this is a video, not a picture" — the
   measured problem on this page was that nothing looked like it would do anything. */
.home-watch-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.92;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition: transform 0.18s ease;
}
.home-watch-card:hover .home-watch-play { transform: scale(1.12); }

.home-watch-len {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  padding: 0.05rem 0.3rem;
  border-radius: 0.3rem;
  background: rgba(2, 6, 18, 0.78);
  color: #e2e8f0;
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.home-watch-caption { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: start; gap: .5rem; }
.home-watch-subject-badge { margin-top: .125rem; display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid rgba(var(--subject-rgb), .24); border-radius: .5rem; background: var(--space-deep, #080e1e); }
.home-watch-caption-text { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.home-watch-subject-icon {
  width: 1.25rem; height: 1.25rem; flex-shrink: 0;
  color: rgb(var(--subject-rgb));
}
html[data-theme="light"] .home-watch-subject-icon {
  color: color-mix(in srgb, rgb(var(--subject-rgb)) 65%, #172554);
}

.home-watch-subject {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(148, 163, 184);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Two lines, clamped: lesson titles run long in both languages and a third line makes
   the four cards different heights, which reads as a layout bug rather than a list. */
.home-watch-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgb(241, 245, 249);
}
.home-watch-card:hover .home-watch-title { color: #fff; }

.home-watch-all { color: rgb(125, 211, 252); }
.home-watch-all:hover { color: rgb(186, 230, 253); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .home-watch-card, .home-watch-play { transition: none; }
  .home-watch-card:hover { transform: none; }
  .home-watch-card:hover .home-watch-play { transform: none; }
}
/* Bound the central column on large displays; posters and study tiles keep human scale. */
#site-main.home-main { max-width: 64rem; margin-inline: auto; }
.home-tile--square { aspect-ratio: auto; min-height: 6rem; padding-block: .65rem; }
.home-tile--square .home-tile-icon { width: 3.25rem; height: 3.25rem; }
.home-tile--square .practice-card-icon { width: 1.9rem; height: 1.9rem; }
.home-watch-thumb { flex-shrink: 0; }
@media (max-width: 1699px) {
  .home-resume-column { position: static; transform: none; width: auto; max-width: none; }
  .home-resume-row { flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: .5rem; }
  .home-resume-row > .resume-compact { flex: 0 1 auto; min-width: 0; }
}
@media (max-width: 767px) {
  .home-tile--square { min-height: 4.8rem; padding: .45rem .2rem; gap: .35rem; border-radius: 1rem; }
  .home-tile--square .home-tile-icon { width: 2.3rem; height: 2.3rem; border-radius: .7rem; }
  .home-tile--square .practice-card-icon { width: 1.45rem; height: 1.45rem; }
  .home-tile--square .home-tile-label { font-size: .8rem; }
  .home-resume-row .resume-compact { padding: .5rem; gap: .45rem; }
  .home-resume-row .resume-compact-subject { font-size: .75rem; }
}

@media (max-width: 767px) { .home-subject { --accent-rgb: var(--mobile-subject-rgb) !important; } }
/* Phones: six levels in one ~358px strip gave each label ~36px, so "IGCSE", "A-Level" and
   "University" broke mid-word (visual audit 2026-11-20). Below 560px the strip becomes a
   grid of whole-word tabs (three per row at phone width); the sliding thumb cannot follow a
   wrapped grid, so the selected tab lights up in place instead. */
@media (max-width: 559px) {
  .home-level-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0.25rem; padding: 0.25rem; }
  .home-level-thumb { display: none; }
  .home-level-tab { padding: 0.55rem 0.35rem; border-radius: 0.8rem; }
  .home-levels .home-level-label { font-size: 0.875rem; white-space: nowrap; overflow-wrap: normal; text-overflow: ellipsis; }
  .home-level-radio.lvl-1:checked ~ .home-level-tabs .home-level-tab.lvl-1,
  .home-level-radio.lvl-2:checked ~ .home-level-tabs .home-level-tab.lvl-2,
  .home-level-radio.lvl-3:checked ~ .home-level-tabs .home-level-tab.lvl-3,
  .home-level-radio.lvl-4:checked ~ .home-level-tabs .home-level-tab.lvl-4,
  .home-level-radio.lvl-5:checked ~ .home-level-tabs .home-level-tab.lvl-5,
  .home-level-radio.lvl-6:checked ~ .home-level-tabs .home-level-tab.lvl-6 {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.13));
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4);
  }
}

/* ▼▼ LIGHT THEME — GENERATED by scripts/build_light_theme.py from the rules above. Do not edit by hand: run the builder. Hand tuning goes in 36-theme-light.css. ▼▼ */
html[data-theme="light"] .home-section-heading--study > span:first-child,html[data-theme="light"] .home-section-heading--subjects > span:first-child{color:color-mix(in srgb, color-mix(in srgb,rgb(var(--section-rgb)) 44%,#0f172a) 74%, rgb(51 63 82))}
html[data-theme="light"] .home-tile{background-image:linear-gradient(135deg, rgba(var(--accent-rgb), 0.11) 0%, rgb(15 23 42/0.02) 60%)}
html[data-theme="light"] .home-tile--big{background-image:linear-gradient(135deg, rgba(var(--accent-rgb), 0.07) 0%, rgb(15 23 42/0.02) 55%)}
html[data-theme="light"] .home-tile--square .practice-card-icon{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a);color:color-mix(in srgb, color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a) 52%, rgb(51 63 82));filter:drop-shadow(0px 1px 3px rgb(15 23 42/0.128))}
html[data-theme="light"] .home-tile:not(.home-tile--square) .practice-card-icon{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a);color:color-mix(in srgb, color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a) 72%, rgb(51 63 82))}
html[data-theme="light"] .home-tile:not(.home-tile--square) .home-tile-icon{box-shadow:0px 3px 10px rgb(15 23 42/0.14)}
html[data-theme="light"] .home-tile:not(.home-tile--square) .practice-card-arrow{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a)}
html[data-theme="light"] .home-tile--big .home-tile-icon{box-shadow:0px 7px 24px -5px rgb(15 23 42/0.12)}
html[data-theme="light"] .home-tile--square{background-image:radial-gradient(115% 85% at 50% 6%, rgba(var(--accent-rgb), 0.4) 0%,
                                        rgba(var(--accent-rgb), 0.13) 42%,
                                        transparent 72%),
    linear-gradient(180deg, rgb(15 23 42/0.05), rgb(15 23 42/0.01));box-shadow:0px 12px 30px -14px rgb(15 23 42/0.14)}
html[data-theme="light"] .home-tile--square:hover,html[data-theme="light"] .home-tile--square:focus-visible{background-image:radial-gradient(115% 85% at 50% 6%, rgba(var(--accent-rgb), 0.32) 0%,
                                        rgba(var(--accent-rgb), 0.11) 45%,
                                        transparent 75%),
    linear-gradient(180deg, rgb(15 23 42/0.07), rgb(15 23 42/0.02));box-shadow:0px 18px 40px -20px rgb(15 23 42/0.14)}
html[data-theme="light"] .home-tile--square .home-tile-icon{box-shadow:inset 0px 0px 0px 1px color-mix(in srgb,rgba(var(--accent-rgb), 0.42) 62%,#0f172a),0px 8px 22px -6px rgb(15 23 42/0.14)}
html[data-theme="light"] .home-tile--square:hover .home-tile-icon,html[data-theme="light"] .home-tile--square:focus-visible .home-tile-icon{box-shadow:inset 0px 0px 0px 1px color-mix(in srgb,rgba(var(--accent-rgb), 0.5) 62%,#0f172a),0px 12px 26px -8px rgb(15 23 42/0.14)}
html[data-theme="light"] .home-level-thumb{box-shadow:inset 0px 0px 0px 1px color-mix(in srgb,rgba(var(--accent-rgb), 0.4) 62%,#0f172a),0px 6px 18px -10px rgb(15 23 42/0.14)}
html[data-theme="light"] .home-level-tab{color:rgb(61 75 94)}
html[data-theme="light"] .home-level-icon{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a);color:color-mix(in srgb, color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a) 74%, rgb(51 63 82))}
html[data-theme="light"] .home-level-label{color:rgb(48 65 85)}
html[data-theme="light"] .home-level-tab:hover .home-level-label{color:rgb(51 63 82)}
html[data-theme="light"] .home-level-radio.lvl-1:checked ~ .home-level-tabs .home-level-tab.lvl-1 .home-level-label,html[data-theme="light"] .home-level-radio.lvl-2:checked ~ .home-level-tabs .home-level-tab.lvl-2 .home-level-label,html[data-theme="light"] .home-level-radio.lvl-3:checked ~ .home-level-tabs .home-level-tab.lvl-3 .home-level-label,html[data-theme="light"] .home-level-radio.lvl-4:checked ~ .home-level-tabs .home-level-tab.lvl-4 .home-level-label,html[data-theme="light"] .home-level-radio.lvl-5:checked ~ .home-level-tabs .home-level-tab.lvl-5 .home-level-label,html[data-theme="light"] .home-level-radio.lvl-6:checked ~ .home-level-tabs .home-level-tab.lvl-6 .home-level-label{color:rgb(51 63 82)}
html[data-theme="light"] .home-level-radio.lvl-1:checked ~ .home-level-tabs .home-level-tab.lvl-1 .home-level-icon,html[data-theme="light"] .home-level-radio.lvl-2:checked ~ .home-level-tabs .home-level-tab.lvl-2 .home-level-icon,html[data-theme="light"] .home-level-radio.lvl-3:checked ~ .home-level-tabs .home-level-tab.lvl-3 .home-level-icon,html[data-theme="light"] .home-level-radio.lvl-4:checked ~ .home-level-tabs .home-level-tab.lvl-4 .home-level-icon,html[data-theme="light"] .home-level-radio.lvl-5:checked ~ .home-level-tabs .home-level-tab.lvl-5 .home-level-icon,html[data-theme="light"] .home-level-radio.lvl-6:checked ~ .home-level-tabs .home-level-tab.lvl-6 .home-level-icon{box-shadow:0px 5px 16px -4px rgb(15 23 42/0.12)}
html[data-theme="light"] .home-subject{background-image:linear-gradient(135deg, rgba(var(--accent-rgb), 0.2) 0%, rgb(15 23 42/0.025) 62%)}
html[data-theme="light"] .home-subject:has(> summary:hover){background-image:linear-gradient(135deg, rgba(var(--accent-rgb), 0.18) 0%, rgb(15 23 42/0.03) 62%);box-shadow:0px 12px 26px -16px rgb(15 23 42/0.2),0px 7px 22px -12px rgb(15 23 42/0.12)}
html[data-theme="light"] .home-subject[open]{background-image:linear-gradient(135deg, rgba(var(--accent-rgb), 0.16) 0%, rgb(15 23 42/0.03) 62%)}
html[data-theme="light"] .home-subject-icon{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a);color:color-mix(in srgb, color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a) 68%, rgb(51 63 82));box-shadow:inset 0px 0px 0px 1px color-mix(in srgb,rgba(var(--accent-rgb), 0.34) 62%,#0f172a),0px 6px 20px -6px rgb(15 23 42/0.12)}
html[data-theme="light"] .home-subject:has(> summary:hover) .home-subject-icon,html[data-theme="light"] .home-subject[open] .home-subject-icon{box-shadow:inset 0px 0px 0px 1px color-mix(in srgb,rgba(var(--accent-rgb), 0.35) 62%,#0f172a),0px 7px 22px -6px rgb(15 23 42/0.12)}
html[data-theme="light"] .home-subject-chevron{color:color-mix(in srgb,rgba(var(--accent-rgb), 0.6) 44%,#0f172a)}
html[data-theme="light"] .home-subject[open] .home-subject-chevron,html[data-theme="light"] .home-subject:has(> summary:hover) .home-subject-chevron{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a)}
html[data-theme="light"] .home-subject-pop{background-image:linear-gradient(162deg, rgba(var(--accent-rgb), 0.16) 0%, rgb(245 246 250/0.94) 58%);box-shadow:0px 22px 48px -18px rgb(15 23 42/0.2),0px 9px 30px -14px rgb(15 23 42/0.12)}
html[data-theme="light"] .home-action{color:rgb(48 65 85)}
html[data-theme="light"] .home-action > svg:first-child{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a)}
html[data-theme="light"] .home-action:hover{color:rgb(51 63 82)}
html[data-theme="light"] .home-action:hover .home-action-go{color:color-mix(in srgb,rgba(var(--accent-rgb), 0.9) 44%,#0f172a)}
html[data-theme="light"] .about-card-icon{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a)}
html[data-theme="light"] .about-bullets li{color:rgb(48 65 85)}
html[data-theme="light"] .about-bullets strong{color:rgb(51 63 82)}
html[data-theme="light"] .about-link{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a)}
html[data-theme="light"] .site-hero-title{background-image:linear-gradient(100deg,
    rgb(2 111 126) 0%, rgb(0 63 133) 26%, rgb(28 0 132) 58%,
    rgb(112 1 131) 82%, rgb(2 111 126) 100%);filter:drop-shadow(0px 1px rgb(15 23 42/0.2)) drop-shadow(0px 2px rgb(15 23 42/0.2)) drop-shadow(0px 5px 4px rgb(15 23 42/0.144))}
html[data-theme="light"] .site-hero-chips{color:rgb(48 65 85)}
@media (min-width: 1024px){html[data-theme="light"] .site-hero-chips > span:nth-child(n + 5){border-top-color:rgb(15 23 42/0.112)}}
html[data-theme="light"] .home-watch-subject-badge{background:var(--space-deep, rgb(248 248 251))}
html[data-theme="light"] .home-watch-subject-icon{color:color-mix(in srgb,rgb(var(--subject-rgb)) 44%,#0f172a)}
html[data-theme="light"] .home-watch-subject{color:rgb(61 75 94)}
html[data-theme="light"] .home-watch-title{color:rgb(38 66 94)}
html[data-theme="light"] .home-watch-card:hover .home-watch-title{color:rgb(51 63 82)}
html[data-theme="light"] .home-watch-all{color:rgb(0 90 133)}
html[data-theme="light"] .home-watch-all:hover{color:rgb(1 87 132)}
@media (max-width: 559px){html[data-theme="light"] .home-level-radio.lvl-1:checked ~ .home-level-tabs .home-level-tab.lvl-1,html[data-theme="light"] .home-level-radio.lvl-2:checked ~ .home-level-tabs .home-level-tab.lvl-2,html[data-theme="light"] .home-level-radio.lvl-3:checked ~ .home-level-tabs .home-level-tab.lvl-3,html[data-theme="light"] .home-level-radio.lvl-4:checked ~ .home-level-tabs .home-level-tab.lvl-4,html[data-theme="light"] .home-level-radio.lvl-5:checked ~ .home-level-tabs .home-level-tab.lvl-5,html[data-theme="light"] .home-level-radio.lvl-6:checked ~ .home-level-tabs .home-level-tab.lvl-6{box-shadow:inset 0px 0px 0px 1px color-mix(in srgb,rgba(var(--accent-rgb), 0.4) 62%,#0f172a)}}
/* ▲▲ LIGHT THEME END ▲▲ */
