/* Design system: the home page (#map). Hero card, the "today" rail, ways to learn and the course map.
   Linked right after css/ui-kit.css. The page sits in .home, a size container, so it lays itself out by the width
   of its own column (next to the desktop sidebar, on a tablet, on a phone) instead of by the window width.
   Looks (colour, background, border, shadow, radius) are wrapped in :where(html:not(.a11y-contrast)) so the high
   contrast mode keeps its own look; layout is not. Text that sits on a photo gets its own high-contrast rules (end). */

/* local tokens: text and scrims on photos stay light-on-dark in both themes; line icons for masks */
.home {
  --on-photo: #fff; --on-photo-2: rgb(255 255 255 / .86); --scrim: 8 11 24;
  --streak: #e8692b; /* the streak's warm orange; a streak freeze uses --info */
  --to-end: 90deg; /* gradients that run from the reading start to the end */
  --i-snow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5v19M3.8 7.2l16.4 9.6M3.8 16.8l16.4-9.6M9.4 4.4 12 6.6l2.6-2.2M9.4 19.6 12 17.4l2.6 2.2'/%3E%3C/svg%3E");
  --i-brain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.8C10.8 3.6 8.6 3.7 7.6 5.1 5.7 5 4.4 6.6 4.8 8.4 3.4 9.2 3 11.1 4 12.4c-.8 1.4-.3 3.2 1.2 3.9.3 1.7 2 2.8 3.7 2.4 1 .9 2.3 1 3.1.5'/%3E%3Cpath d='M12 4.8c1.2-1.2 3.4-1.1 4.4.3 1.9-.1 3.2 1.5 2.8 3.3 1.4.8 1.8 2.7.8 4 .8 1.4.3 3.2-1.2 3.9-.3 1.7-2 2.8-3.7 2.4-1 .9-2.3 1-3.1.5'/%3E%3Cpath d='M12 4.8v14.4M8.3 9.3c1 .2 1.8.9 2 1.9M7.4 13.8c.9-.6 2.1-.5 2.9.2M15.7 9.3c-1 .2-1.8.9-2 1.9M16.6 13.8c-.9-.6-2.1-.5-2.9.2'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 5.5 16 12l-6.5 6.5'/%3E%3C/svg%3E");
  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h15M13.5 6l6 6-6 6'/%3E%3C/svg%3E");
  --i-flame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8c.4 2.6 1.8 4 3.2 5.5 1.5 1.6 2.8 3.4 2.8 5.9a6 6 0 0 1-12 0c0-2 .8-3.5 2-4.8.2 1.4.9 2.4 2 2.9-.4-3.4.4-6.6 2-9.5z'/%3E%3C/svg%3E");
  --i-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2.5 4.5 13.5H11l-1 8 8.5-11H12l1-8z'/%3E%3C/svg%3E");
  --i-repeat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11V9.5A3.5 3.5 0 0 1 7.5 6H19M16 3l3 3-3 3M20 13v1.5a3.5 3.5 0 0 1-3.5 3.5H5M8 21l-3-3 3-3'/%3E%3C/svg%3E");
  --i-cards: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='7.5' width='12.5' height='13' rx='2.5'/%3E%3Cpath d='M8 4h10a2.5 2.5 0 0 1 2.5 2.5V17'/%3E%3C/svg%3E");
  --i-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l1.9 4.6 4.6 1.9-4.6 1.9-1.9 4.6-1.9-4.6L5.5 10l4.6-1.9z'/%3E%3Cpath d='M18.5 15.5l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z'/%3E%3C/svg%3E");
  --i-tasks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 6.5H20M10.5 12H20M10.5 17.5H20'/%3E%3Cpath d='M3.8 6.6l1.4 1.4 2.6-2.7M3.8 12.1l1.4 1.4 2.6-2.7M3.8 17.6l1.4 1.4 2.6-2.7'/%3E%3C/svg%3E");
  --i-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4M9 15l2 2 4-4'/%3E%3C/svg%3E");
  --i-gem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 2h8l3 4-7 8-7-8z'/%3E%3C/svg%3E");
  --i-check-c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.4l2.8 2.8L16.2 9.8'/%3E%3C/svg%3E");
  --i-check-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E");
  /* the review icon drawn in its section colour (it sits on a tinted square, so it cannot be a mask) */
  --i-review-c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9407a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11V9.5A3.5 3.5 0 0 1 7.5 6H19M16 3l3 3-3 3M20 13v1.5a3.5 3.5 0 0 1-3.5 3.5H5M8 21l-3-3 3-3'/%3E%3C/svg%3E");
}
[dir="rtl"] .home { --to-end: 270deg; }

/* =====================================================================
   1. Page layout: a main column and a rail of small cards
   ===================================================================== */
.home { container: home / inline-size; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; align-items: start; }
.home > .hero { display: contents; }
.home > *, .home > .hero > * { grid-column: 1 / -1; min-width: 0; }
.home > .hero > :not(.hero-main) { margin-top: var(--sp-4); }
.home > .ways { margin: var(--sp-10) 0 0; }
.home > .line { margin-top: var(--sp-12); }
/* A wide column: the rail runs next to the main column (the hero, my level, the ways to learn and any other card
   added to the page), the course map takes the full width below. Main-column cards flow in page order, so a new
   card needs no row of its own here; the rail spans four rows and the last one takes whatever height is left. */
@container home (min-width: 840px) {
  .home > :not(.line), .home > .hero > :not(.stats) { grid-column: 1; }
  .home > .hero > .stats { grid-column: 2; grid-row: 1 / span 4; width: clamp(296px, 33cqi, 344px); margin: 0; margin-inline-start: var(--sp-6); }
  .home > .ways { margin-top: var(--sp-8); }
}
/* phones: the rail's cards join the one column, so the three counters come right after the next lesson; anything
   else added to the page lands with my level, before the rail's other cards */
@container home (max-width: 599.98px) {
  .home > *, .home > .hero > * { order: 3; }
  .home { row-gap: var(--sp-4); }
  .home > .hero > :is(.hero-duo, .stats) { margin-top: 0; }
  .home > .hero > aside.stats { display: contents; }
  .home > .hero > aside.stats > * { grid-column: 1 / -1; min-width: 0; order: 4; }
  .home > .hero > aside.stats > :empty { display: none; }
  .home > .hero > .hero-main { order: 1; }
  .home > .hero > .stats > .today-card { order: 2; }
  .home > .ways { order: 5; }
  .home > .line { order: 6; }
}

/* =====================================================================
   2. Hero card: a photo banner with the greeting, then the next lesson
   ===================================================================== */
.home .hero-main.stage { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
:where(html:not(.a11y-contrast)) .home .hero-main.stage { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e2); }
:where(html:not(.a11y-contrast)) .home .hero-main.stage:hover { border-color: var(--hairline); box-shadow: var(--e2); }

/* the banner: the photo fills it, a scrim darkens the reading corner, the text sits on top in white */
.home .hero-banner { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: var(--sp-2);
  min-height: clamp(220px, 32cqi, 312px); padding: var(--sp-10) var(--sp-8) var(--sp-6); overflow: hidden; color: var(--on-photo); }
.home .hero-banner .hero-art { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  aspect-ratio: auto; object-fit: cover; object-position: 50% 30%; -webkit-mask-image: none; mask-image: none; }
.home .hero-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(0deg, rgb(var(--scrim) / .88) 0%, rgb(var(--scrim) / .62) 34%, rgb(var(--scrim) / .14) 68%, rgb(var(--scrim) / 0) 86%),
    linear-gradient(var(--to-end), rgb(var(--scrim) / .36), rgb(var(--scrim) / 0) 62%); }
.home .hero-banner :is(h1, p) { margin: 0; color: var(--on-photo); }
.home .hero-banner .eyebrow { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 11px; font-size: var(--fs-xs); letter-spacing: .08em; }
:lang(he) .home .hero-banner .eyebrow { font-size: .8rem; letter-spacing: .01em; }
/* small white words on a photo need a dark pill under them: a white one over the bright aurora band measured 3:1 */
:where(html:not(.a11y-contrast)) .home .hero-banner .eyebrow { border-radius: var(--r-pill); background: rgb(8 14 32 / .36); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .26); }
/* the course pill is a button (js/ui-shell.js courseTag, docs/plan/2026-11-02-course-switch.md): one tap opens the
   courses right under it, so changing the language you learn never needs the side menu. It sits on the photo banner
   (first visit, welcome back) and on the dark "2100" stage (js/nova.js), both light-on-dark, so one glass look serves
   both. A caret, a 40px tap target and a brighter ring on hover/focus make it read as something to press. */
.home :is(.hero-banner, .nova) .cs-tag { display: inline-flex; align-items: center; align-self: flex-start; padding: 0; margin: 0; border-radius: var(--r-pill); color: var(--on-photo); }
.home .nova .cs-tag { margin-block-end: var(--sp-2); }
.home .nova .eyebrow:not(.cs-tag) { margin: 0 0 var(--sp-2); color: var(--nv-fg); opacity: .85; }
.home .cs-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px; margin: 0; border: 0; border-radius: var(--r-pill);
  background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.home .cs-caret { flex: none; width: 8px; height: 8px; margin-block-start: -4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform var(--dur-2) var(--ease); }
.home .cs-btn[aria-expanded="true"] .cs-caret { margin-block: 4px 0; transform: rotate(-135deg); }
:where(html:not(.a11y-contrast)) .home :is(.hero-banner, .nova) .cs-tag { background: rgb(8 14 32 / .36); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .34); transition: background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home :is(.hero-banner, .nova) .cs-tag:has(.cs-btn:hover, .cs-btn[aria-expanded="true"]) { background: rgb(8 14 32 / .52); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .6); }
.home .cs-btn:focus-visible { outline: 3px solid var(--on-photo); outline-offset: 2px; }
.home .cs-menu { display: grid; gap: var(--sp-2); max-width: min(100%, 560px); margin-block-end: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-lg); color: var(--on-photo); }
.home .cs-menu[hidden] { display: none; }
:where(html:not(.a11y-contrast)) .home .cs-menu { background: rgb(var(--scrim) / .6); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), 0 12px 30px -14px rgb(0 0 0 / .6); }
.home .cs-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.home .cs-chips .chip { min-height: 40px; padding-inline: 14px; cursor: pointer; }
:where(html:not(.a11y-contrast)) .home .cs-chips .chip { border: 0; background: rgb(255 255 255 / .14); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); color: var(--on-photo); }
:where(html:not(.a11y-contrast)) .home .cs-chips .chip:hover { background: rgb(255 255 255 / .24); }
:where(html:not(.a11y-contrast)) .home .cs-chips .chip[aria-pressed="true"] { background: var(--on-photo); color: rgb(var(--scrim)); box-shadow: none; }
@media (prefers-reduced-motion: no-preference) { html:not(.pref-calm) .home .cs-menu:not([hidden]) { animation: ds-sheet-in var(--dur-2) var(--ease); } }
.home .hero-banner h1 { max-width: 24ch; font-size: var(--fs-h1); line-height: 1.12; text-shadow: 0 1px 2px rgb(var(--scrim) / .35); }
.home .hero-banner .hi-line { max-width: 54ch; font-size: var(--fs-lg); line-height: 1.5; color: var(--on-photo-2); text-shadow: 0 1px 2px rgb(var(--scrim) / .3); }
.home .hero-banner .muted { color: var(--on-photo-2); }
/* A course still in beta (Czech, French…) says so honestly, but under the Start button: the headline and the button stay
   above the fold on a phone, and the note reads as a quiet glass line rather than a paragraph. */
.home .hero-banner > p.muted.small { order: 1; position: relative; max-width: 60ch; margin-block-start: 2px; padding: 8px 12px 8px 12px; padding-inline-start: 30px; border-radius: 12px; font-size: .8rem; line-height: 1.45; }
:where(html:not(.a11y-contrast)) .home .hero-banner > p.muted.small { background: rgb(255 255 255 / .09); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); }
.home .hero-banner > p.muted.small::before { content: "i"; position: absolute; inset-inline-start: 9px; top: 9px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font: 700 .68rem/1 var(--font-ui); font-style: normal; color: #16183a; background: rgb(255 255 255 / .85); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home .hero-banner .hero-art { filter: brightness(.9) saturate(1.04); } }
:root[data-theme="dark"] .home .hero-banner .hero-art { filter: brightness(.9) saturate(1.04); }

.home .hero-body { display: grid; gap: var(--sp-4); padding: var(--sp-6); }

/* the next lesson: the one main action of the page */
.home .next-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "chip text go"; align-items: center;
  gap: var(--sp-2) var(--sp-4); width: auto; padding: var(--sp-4) var(--sp-5); overflow: hidden; }
.home .next-card::before { content: none; }
:where(html:not(.a11y-contrast)) .home .next-card { border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--lv) 30%, var(--hairline));
  background: linear-gradient(var(--to-end), color-mix(in srgb, var(--lv) 11%, var(--surface)), var(--surface) 72%); box-shadow: var(--e1); }
.home .next-card .lv-chip { grid-area: chip; width: 52px; height: 52px; min-width: 0; padding: 0; font-size: 1.05rem; }
:where(html:not(.a11y-contrast)) .home .next-card .lv-chip { border-radius: 16px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 8px 16px -10px color-mix(in srgb, var(--lv) 90%, transparent); }
.home .next-text { grid-area: text; display: grid; gap: 2px; min-width: 0; }
.home .next-label { font: 600 var(--fs-xs)/1.3 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
:lang(he) .home .next-label { font-size: .8rem; letter-spacing: .01em; }
:where(html:not(.a11y-contrast)) .home .next-label { color: color-mix(in srgb, var(--lv) 60%, var(--ink)); } /* 4.5:1 on the tint for every level */
.home .next-text strong { font: 600 clamp(1.1rem, 1rem + .5cqi, 1.3rem)/1.3 var(--font-ui); letter-spacing: -.01em; color: var(--ink); overflow-wrap: anywhere; }
.home .next-meta { font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); }
.home .next-card .btn.primary { grid-area: go; width: auto; min-height: 52px; padding: 0 var(--sp-6); gap: var(--sp-2); font-size: 1rem; white-space: nowrap; }
:where(html:not(.a11y-contrast)) .home .next-card .btn.primary { border-radius: 14px; }
.home .next-card .btn.primary::after { content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat; }
[dir="rtl"] .home .next-card .btn.primary::after { transform: scaleX(-1); }
.home .hero-body > .lead { margin: 0; color: var(--ink-2); }

/* my level (with what the learner already knows there) and Polly: two quiet cards under the actions */
.home .hero-duo { display: grid; gap: var(--sp-4); }
.home .hero-duo:empty { display: none; }
.home .level-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--sp-3) var(--sp-4); margin: 0; padding: var(--sp-5) var(--sp-6); }
:where(html:not(.a11y-contrast)) .home .level-card { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e2); }
.home .level-card .lv-chip.big { width: 40px; height: 40px; min-width: 0; padding: 0; font-size: .92rem; }
:where(html:not(.a11y-contrast)) .home .level-card .lv-chip.big { border-radius: 12px; }
.home .lc-text { min-width: 0; }
.home .lc-text .eyebrow { margin: 0 0 var(--sp-2); }
:where(html:not(.a11y-contrast)) .home .lc-text .eyebrow { color: color-mix(in srgb, var(--lv) 70%, var(--ink)); }
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .lc-text .eyebrow { color: color-mix(in srgb, var(--lv) 45%, var(--ink)); } /* 4.5:1 on glass */
.home .lc-desc { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); font-weight: 500; line-height: 1.5; color: var(--ink-2); }
.home .lc-bar { height: 6px; }
:where(html:not(.a11y-contrast)) .home .lc-bar { background: color-mix(in srgb, var(--lv) 16%, var(--surface-3)); }
.home .lc-text > .muted.small { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); line-height: 1.45; }
/* "you already know your way around these topics": the lessons finished in this level, each one a link to it */
.home .can-do { grid-column: 1 / -1; display: grid; gap: var(--sp-2); padding-top: var(--sp-4); }
:where(html:not(.a11y-contrast)) .home .can-do { border-top: 1px solid var(--hairline); }
.home .can-do h3 { margin: 0 0 2px; font: 600 var(--fs-sm)/1.35 var(--font-ui); letter-spacing: 0; color: var(--ink-2); }
.home .can-do ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.home .can-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-2); width: 100%; height: 100%; min-height: 44px; margin: 0;
  padding: 7px 10px; font: 500 var(--fs-sm)/1.3 var(--font-ui); text-align: start; cursor: pointer; }
:where(html:not(.a11y-contrast)) .home .can-line { border-radius: var(--r-sm); border: 1px solid var(--hairline); background: var(--surface-2); color: var(--ink);
  transition: border-color var(--dur-1), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home .can-line:hover { border-color: color-mix(in srgb, var(--lv) 40%, var(--hairline)); background: var(--surface); box-shadow: var(--e1); }
.home .can-line:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv) 35%, transparent); }
.home .can-line::before { content: ""; width: 18px; height: 18px; background: color-mix(in srgb, var(--lv) 85%, var(--ink));
  -webkit-mask: var(--i-check-c) center / contain no-repeat; mask: var(--i-check-c) center / contain no-repeat; }
.home .can-line::after { content: ""; width: 14px; height: 14px; background: var(--faint); -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
[dir="rtl"] .home .can-line::after { transform: scaleX(-1); }
.home .cl-title { min-width: 0; overflow-wrap: anywhere; }
.home .can-line .muted.small { font-size: var(--fs-xs); white-space: nowrap; }
.home .can-more { margin: 0; font-size: var(--fs-xs); }
.home .can-mem { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-1) 0 0; font-size: var(--fs-sm); line-height: 1.4; color: var(--ink-2); }
.home .can-mem::before { content: ""; flex: none; width: 20px; height: 20px; background: color-mix(in srgb, var(--lv) 85%, var(--ink));
  -webkit-mask: var(--i-brain) center / contain no-repeat; mask: var(--i-brain) center / contain no-repeat; }
.home .can-mem strong { font: 700 1.1rem/1 var(--font-target); color: var(--ink); }

/* Polly: the photo, her line, and the listen button at the end */
.home .polly { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-4); width: auto; padding: var(--sp-4) var(--sp-5); }
:where(html:not(.a11y-contrast)) .home .polly { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e2); }
/* Polly's photos have a white studio backdrop, so the picture keeps a white frame in both themes */
.home .polly .polly-cat { width: 60px; height: 60px; object-fit: contain; animation: none; mix-blend-mode: normal; filter: none; }
:where(html:not(.a11y-contrast)) .home .polly .polly-cat { border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--hairline); }
.home .polly-bubble { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--sp-3); min-width: 0; padding: 0; }
:where(html:not(.a11y-contrast)) .home .polly-bubble { border: 0; border-radius: 0; background: none; box-shadow: none; }
.home .polly-bubble > * { grid-column: 1; }
.home .polly-name { display: block; margin-bottom: var(--sp-1); font: 700 .7rem/1.2 var(--font-target); letter-spacing: .1em; }
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .polly-name { color: color-mix(in srgb, var(--c1) 40%, #fff); } /* the violet alone is 3:1 on glass */
.home .polly-bubble .tgt { font-size: 1rem; line-height: 1.4; }
.home .polly-bubble .tr { margin-top: 2px; font-size: var(--fs-sm); line-height: 1.45; }
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .polly-bubble .tr { color: var(--ink-2); } /* --muted read 3.7:1 over the aurora */
.home .polly-bubble .polly-say { position: static; grid-column: 2; grid-row: 1 / span 3; width: 44px; height: 44px; }

/* a short placement test, the placement result and the review shortcut: quiet rows with an icon and a chevron */
.home .place-cta, .home .hero-body > .btn[data-nav="review"] { display: flex; align-items: center; justify-content: flex-start; gap: var(--sp-3); width: 100%; min-height: 56px; margin: 0;
  padding: var(--sp-2) var(--sp-4); padding-inline-start: var(--sp-2); font: 500 var(--fs-sm)/1.4 var(--font-ui); text-align: start; }
:where(html:not(.a11y-contrast)) :is(.home .place-cta, .home .hero-body > .btn[data-nav="review"]) { border-radius: var(--r); border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink);
  box-shadow: var(--e1); transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) :is(.home .place-cta, .home .hero-body > .btn[data-nav="review"]):hover { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: var(--e2); }
.home .place-cta svg { flex: none; width: 40px; height: 40px; padding: 9px; }
:where(html:not(.a11y-contrast)) .home .place-cta svg { border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.home .hero-body > .btn[data-nav="review"] { font-weight: 600; }
.home .hero-body > .btn[data-nav="review"]::before { content: ""; flex: none; width: 40px; height: 40px; border-radius: 12px; -webkit-mask: none; mask: none;
  background: var(--i-review-c) center / 20px no-repeat, color-mix(in srgb, #d9407a 13%, var(--surface)); }
:is(.home .place-cta, .home .hero-body > .btn[data-nav="review"])::after { content: ""; flex: none; width: 18px; height: 18px; margin-inline-start: auto; background: var(--muted);
  -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
[dir="rtl"] :is(.home .place-cta, .home .hero-body > .btn[data-nav="review"])::after { transform: scaleX(-1); }
.home .place-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin: 0; padding-inline: var(--sp-1); color: var(--muted); }
.home .place-tag strong { color: var(--ink); }
.home .place-tag .link-btn { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* =====================================================================
   3. The rail: separate small cards with one header style
   ===================================================================== */
.home .hero > .stats { display: flex; flex-direction: column; gap: var(--sp-4); padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.home .hero > .stats:hover { background: none; border: 0; box-shadow: none; }
.home .stats :is(.today-card, .plan-cta-card, .today-plan, .p30, .wod, .st-pick, .ar-mini, .quests) { margin: 0; padding: var(--sp-4) var(--sp-5); }
:where(html:not(.a11y-contrast)) .home .stats :is(.today-card, .plan-cta-card, .today-plan, .p30, .wod, .st-pick, .ar-mini, .quests) {
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e2); }
.home #ar-mini { display: block; margin: 0; }
.home #ar-mini:empty { display: none; }

/* card headers: a small title with a tinted line icon */
.home .stats :is(.wod-head h3, .tp-head h3, .quests h3, .ar-mini-h > span:first-child, :is(.goal-text, .tc-text) .stat-label) {
  display: inline-flex; align-items: center; gap: var(--sp-2); margin: 0; font: 600 var(--fs-sm)/1.3 var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.home .stats :is(.wod-head h3, .tp-head h3, .quests h3, .ar-mini-h > span:first-child)::before {
  content: ""; flex: none; width: 18px; height: 18px; background: var(--t); -webkit-mask: var(--hi) center / contain no-repeat; mask: var(--hi) center / contain no-repeat; }
.home .wod-head h3 { --hi: var(--i-spark); --t: #d08a00; }
.home .tp-head h3 { --hi: var(--i-cal); --t: #d9820b; }
.home .quests h3 { --hi: var(--i-tasks); --t: #7b4ff0; }
.home .ar-mini-h > span:first-child { --hi: var(--ico); --t: #c98f00; }

/* today: three counters, each with one plain line: the daily goal (a ring), the streak (the last seven days) and the
   words due for review. They share one row shape: a 52px picture, then label, number and line. */
.home .stats .today-card { display: grid; padding-block: var(--sp-1); }
.home .today-card > :is(.goal, .tc-row) { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: var(--sp-3) var(--sp-4); padding: var(--sp-4) 0; }
:where(html:not(.a11y-contrast)) .home .today-card > * + * { border-top: 1px solid var(--hairline); }
.home .today-card .ring { width: 52px; height: 52px; }
.home .today-card .ring circle { stroke-width: 8; }
:where(html:not(.a11y-contrast)) .home .today-card .ring-bg { stroke: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.home :is(.goal-text, .tc-text) { display: grid; gap: 1px; min-width: 0; }
.home .stats .today-card :is(.goal-text, .tc-text) > .stat-label { display: block; }
.home .today-card .stat-label::first-letter { text-transform: uppercase; }
.home :is(.goal-text, .tc-text) strong { font: 700 1.5rem/1.15 var(--font-target); letter-spacing: -.02em; color: var(--ink); }
.home .goal-text strong small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.home :is(.goal-text, .tc-text) .muted.small { font-size: var(--fs-xs); line-height: 1.4; }
.home .tc-ico { display: grid; place-items: center; width: 44px; height: 44px; justify-self: center; }
:where(html:not(.a11y-contrast)) .home .tc-ico { border-radius: 14px; background: color-mix(in srgb, var(--t) 13%, var(--surface)); }
.home .tc-ico::before { content: ""; width: 22px; height: 22px; background: var(--t); -webkit-mask: var(--si) center / contain no-repeat; mask: var(--si) center / contain no-repeat; }
.home .tc-streak .tc-ico { --si: var(--i-flame); --t: var(--streak); }
.home .tc-due .tc-ico { --si: var(--i-repeat); --t: #d9407a; }
/* the last seven days, today at the end: practised (a check), a day kept by a streak freeze, today still open */
.home .ss-days { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-1); }
.home .ss-day { display: grid; justify-items: center; gap: 5px; min-width: 0; }
.home .ss-wd { max-width: 100%; font: 500 .7rem/1.1 var(--font-ui); text-align: center; overflow-wrap: anywhere; color: var(--muted); }
.home .ss-day.today .ss-wd { font-weight: 700; color: var(--ink); }
.home .ss-dot { box-sizing: border-box; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--hairline); border-radius: 50%; color: #fff; }
.home .ss-dot::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--di, none) center / contain no-repeat; mask: var(--di, none) center / contain no-repeat; }
.home .ss-day:not(.done, .fz, .fz-soon) .ss-dot::before { content: none; }
.home .ss-day.done .ss-dot { --di: var(--i-check-w); }
.home .ss-day:is(.fz, .fz-soon) .ss-dot { --di: var(--i-snow); }
:where(html:not(.a11y-contrast)) .home .ss-dot { background: var(--surface-2); }
:where(html:not(.a11y-contrast)) .home .ss-day.done .ss-dot { border-color: transparent; background: var(--streak); }
:where(html:not(.a11y-contrast)) .home .ss-day.fz .ss-dot { border-color: transparent; background: var(--info); }
:where(html:not(.a11y-contrast)) .home .ss-day.fz-soon .ss-dot { border: 2px dashed color-mix(in srgb, var(--info) 70%, transparent); background: var(--surface); color: var(--info); }
:where(html:not(.a11y-contrast)) .home .ss-day.today:not(.done) .ss-dot { border: 2px dashed color-mix(in srgb, var(--streak) 75%, transparent); background: var(--surface); }
:where(html:not(.a11y-contrast)) .home .ss-day.today.done .ss-dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--streak) 40%, transparent); }
html.a11y-contrast .home .ss-day.done .ss-dot { background: var(--ink); color: var(--bg); }
html.a11y-contrast .home .ss-day:is(.today, .fz-soon) .ss-dot { border: 2px dashed var(--ink); }
html.a11y-contrast .home .ss-day.fz-soon .ss-dot { color: var(--ink); }
html.a11y-contrast .home .ss-day.fz .ss-dot { background: var(--ink); color: var(--bg); }

/* study plan: a call to action until there is a plan, then today's checklist */
.home .stats .plan-cta-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); width: 100%; font: inherit; text-align: start; cursor: pointer; }
:where(html:not(.a11y-contrast)) .home .stats .plan-cta-card { color: var(--ink); border-color: var(--accent-line); background: linear-gradient(var(--to-end), var(--accent-soft), var(--surface) 85%);
  transition: border-color var(--dur-2), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home .stats .plan-cta-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--e3); }
.home .pcc-icon { width: 40px; height: 40px; }
:where(html:not(.a11y-contrast)) .home .pcc-icon { border-radius: 12px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border: 0; }
.home .plan-cta-card > span:last-child { display: grid; gap: 2px; min-width: 0; }
.home .plan-cta-card strong { font-size: .95rem; font-weight: 600; line-height: 1.35; }
.home .plan-cta-card .muted.small { font-size: var(--fs-xs); line-height: 1.4; }
.home .plan-cta-card::after { content: ""; width: 18px; height: 18px; background: var(--accent); -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
[dir="rtl"] .home .plan-cta-card::after { transform: scaleX(-1); }

.home .today-plan { display: grid; gap: var(--sp-3); }
.home .tp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.home .tp-head a { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--fs-sm); font-weight: 600; color: var(--accent); text-decoration: none; }
.home .tp-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.home .today-plan ul { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.home .today-plan li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-3); padding: 8px 10px; font-size: var(--fs-sm); line-height: 1.35; }
:where(html:not(.a11y-contrast)) .home .today-plan li { border-radius: var(--r-sm); background: var(--surface-2); }
.home .today-plan .task-img { width: 32px; height: 32px; }
:where(html:not(.a11y-contrast)) .home .today-plan .task-img { border-radius: 9px; }
.home .today-plan li > .num { order: 2; }
.home .today-plan .tp-check { order: 3; width: 22px; height: 22px; border-radius: 50%; }
:where(html:not(.a11y-contrast)) .home .today-plan .tp-check { border: 2px solid var(--hairline-strong); background: var(--surface); box-shadow: none; }
:where(html:not(.a11y-contrast)) .home .today-plan li.done .tp-check { border-color: var(--ok); background: var(--i-check-w) center / 14px no-repeat, var(--ok); box-shadow: none; }

/* word of the day */
.home .stats .wod { display: block; }
.home .wod-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.home .wod-head .lv-chip { height: 22px; min-width: 34px; font-size: .72rem; }
.home .wod .wod-img { width: 76px; height: 76px; margin: 0 0 var(--sp-2); margin-inline-start: var(--sp-3); }
:where(html:not(.a11y-contrast)) .home .wod .wod-img { border-radius: var(--r-sm); }
.home .wod-word { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font: 700 1.45rem/1.2 var(--font-target); color: var(--ink); overflow-wrap: anywhere; }
.home .wod-word .speak { width: 44px; height: 44px; }
.home .wod-tr { margin: var(--sp-2) 0 var(--sp-3); font-weight: 600; color: var(--ink); }
.home .wod-ex { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); }
.home .wod .wod-ex + .muted.small { margin: 2px 0 var(--sp-3); font-size: var(--fs-xs); line-height: 1.45; }
.home .wod .btn.small { min-height: 40px; }

/* story for you (js/stories.js draws the inside), today's competition, daily tasks */
.home .stats .st-pick { gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }

.home .stats .ar-mini { display: grid; gap: var(--sp-1); color: inherit; text-decoration: none; }
:where(html:not(.a11y-contrast)) .home .stats .ar-mini { transition: border-color var(--dur-2), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home .stats .ar-mini:hover { border-color: var(--accent-line); box-shadow: var(--e3); }
.home .ar-mini-h { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-1); font: inherit; letter-spacing: 0; text-transform: none; }
.home .ar-mini-h > .num { padding: 5px 9px; font: 600 var(--fs-xs)/1 var(--font-ui); white-space: nowrap; color: var(--muted); }
:where(html:not(.a11y-contrast)) .home .ar-mini-h > .num { border-radius: var(--r-pill); background: var(--surface-2); }
.home .ar-mini strong { display: inline-flex; align-items: center; gap: var(--sp-2); font: 700 1.5rem/1.2 var(--font-target); color: var(--ink); }
.home .ar-mini > .muted.small { line-height: 1.45; }
.home .ar-medal { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35), 0 2px 6px -2px rgb(120 80 0 / .55);
  background: radial-gradient(circle at 35% 30%, #fff3c4 0 16%, #f2b02a 55%, #b9780a 100%); }
.home .ar-medal.m2 { background: radial-gradient(circle at 35% 30%, #fff 0 16%, #c9d1de 55%, #8a94a6 100%); }
.home .ar-medal.m3 { background: radial-gradient(circle at 35% 30%, #ffe2c8 0 16%, #d98b4f 55%, #9a5524 100%); }

.home .stats .quests { display: grid; gap: var(--sp-2); }
.home .quests ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.home .quests li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "ico name reward" "ico bar bar"; align-items: center;
  gap: 5px var(--sp-3); padding: 8px 0; font-size: var(--fs-sm); }
:where(html:not(.a11y-contrast)) .home .quests li + li { border-top: 1px solid var(--hairline); }
.home .quests li .task-img { grid-area: ico; width: 32px; height: 32px; }
:where(html:not(.a11y-contrast)) .home .quests li .task-img { border-radius: 10px; }
.home .quests .q-name { grid-area: name; min-width: 0; font-weight: 500; line-height: 1.35; color: var(--ink); text-decoration: none; }
/* the whole row opens the task, so the touch target is the row and not only the words */
.home .quests .q-name::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); }
.home .quests .q-name:focus-visible { outline: none; }
.home .quests .q-name:focus-visible::after { box-shadow: var(--ring); }
.home .quests li:hover .q-name { color: var(--accent); }
.home .quests .q-reward { grid-area: reward; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; font: 700 .75rem/1 var(--font-target); }
:where(html:not(.a11y-contrast)) .home .quests .q-reward { border-radius: var(--r-pill); background: color-mix(in srgb, #7b5cf0 11%, var(--surface)); color: #5b3fd0; }
.home .quests .q-reward::after { content: ""; width: 9px; height: 9px; background: currentColor; -webkit-mask: var(--i-gem) center / contain no-repeat; mask: var(--i-gem) center / contain no-repeat; }
.home .quests li .q-bar { grid-area: bar; height: 5px; }
:where(html:not(.a11y-contrast)) .home .quests li .q-bar { background: var(--surface-2); box-shadow: none; }
:where(html:not(.a11y-contrast)) .home .quests li .q-bar span { background: var(--accent); }
:where(html:not(.a11y-contrast)) .home .quests li.done .q-name { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent); }
:where(html:not(.a11y-contrast)) .home .quests li.done .q-bar span { background: var(--ok); }
:where(html:not(.a11y-contrast)) .home .quests li.done .q-reward { background: var(--ok-soft); color: var(--ok); }

/* tablet column: the rail cards sit in two columns under the hero */
@container home (min-width: 600px) and (max-width: 839.98px) {
  .home .hero > .stats { display: block; columns: 2; column-gap: var(--sp-4); }
  .home .hero > .stats > * { break-inside: avoid; }
  .home .hero > .stats > * + * { margin-top: 0; }
  .home .hero > .stats > :not(:empty) { margin-bottom: var(--sp-4); }
}

/* =====================================================================
   4. Ways to learn: a grid of tiles
   ===================================================================== */
.home :is(.ways h2, .line-h) { margin: 0 0 var(--sp-4); font: 600 var(--fs-h2)/1.25 var(--font-ui); letter-spacing: -.012em; color: var(--ink); }
.home .ways-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home .way { position: relative; display: grid; align-content: start; justify-items: start; gap: var(--sp-3); padding: var(--sp-4); text-align: start; text-decoration: none; flex-direction: initial; }
:where(html:not(.a11y-contrast)) .home .way { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e1); color: var(--ink);
  transition: border-color var(--dur-2), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home .way:hover { border-color: var(--accent-line); box-shadow: var(--e3); transform: translateY(-2px); }
.home .way img { width: 40px; height: 40px; }
:where(html:not(.a11y-contrast)) .home .way img { border-radius: 12px; box-shadow: none; }
.home .way span { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.home .way strong { font-size: .95rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.home .way small { font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-2); } /* --muted fell to 3.4:1 where a tile sits over the aurora */
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .way { background-color: rgb(9 17 38 / .64); }
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .stat-label { color: var(--ink-2); }
@container home (min-width: 560px) { .home .ways-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* next to the rail the column is narrower: two columns of row tiles until it is wide enough for four */
@container home (min-width: 840px) and (max-width: 959.98px) {
  .home .ways-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home .way { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
}

/* =====================================================================
   5. The course map: one card per level, a photo banner, lessons, a footer
   ===================================================================== */
.home .line { display: grid; gap: var(--sp-6); }
.home .line-h { margin-bottom: calc(var(--sp-2) * -1); }
.home .level { position: relative; display: grid; overflow: hidden; }
:where(html:not(.a11y-contrast)) .home .level { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e2); }

.home .level-head { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 176px; padding: 0; gap: 0; overflow: hidden; grid-template-columns: none; }
:where(html:not(.a11y-contrast)) .home .level-head { border: 0; border-radius: 0; box-shadow: none; background: rgb(var(--scrim)); }
.home .level-head .level-art { position: absolute; inset: 0; z-index: -2; order: 0; display: block; width: 100%; height: 100%; min-height: 0; max-height: none;
  object-fit: cover; object-position: 50% 50%; -webkit-mask-image: none; mask-image: none; mix-blend-mode: normal; filter: none; }
/* each photo's subject sits at a different height, so each banner shows its own band of it */
.home .lv-a1 .level-art { object-position: 50% 58%; }
.home .lv-a2 .level-art { object-position: 50% 42%; }
.home .lv-b1 .level-art { object-position: 50% 32%; }
.home .lv-b2 .level-art { object-position: 50% 62%; }
.home .lv-c1 .level-art { object-position: 50% 48%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home .level-head .level-art { filter: brightness(.88) saturate(1.05); } }
:root[data-theme="dark"] .home .level-head .level-art { filter: brightness(.88) saturate(1.05); }
.home .level-head::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--to-end), color-mix(in srgb, var(--lv) 24%, rgb(var(--scrim) / .9)) 0%, rgb(var(--scrim) / .64) 40%, rgb(var(--scrim) / .06) 80%); }
.home .lh-text { position: relative; display: grid; justify-items: start; align-content: center; gap: var(--sp-2); width: min(480px, 100%); padding: var(--sp-6) var(--sp-8); color: var(--on-photo); }
.home .lh-text .lv-chip.big { height: 28px; min-width: 46px; font-size: .9rem; box-shadow: 0 2px 10px -2px rgb(var(--scrim) / .5); }
.home .lh-text h2 { margin: 0; font: 700 clamp(1.4rem, 1.15rem + 1cqi, 1.75rem)/1.15 var(--font-ui); letter-spacing: -.015em; color: var(--on-photo); text-shadow: 0 1px 2px rgb(var(--scrim) / .35); }
.home .lh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--on-photo-2); }
.home .lh-bar { display: block; width: min(280px, 100%); height: 6px; margin-top: var(--sp-1); overflow: hidden; border-radius: var(--r-pill); background: rgb(255 255 255 / .22); box-shadow: none; }
.home .lh-bar span { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--lv) 55%, #fff); }

/* lessons: tidy rows with a number, a check or a lock */
.home .stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); gap: var(--sp-2); margin: 0; padding: var(--sp-4); }
.home .stations::before { content: none; }
.home .station { padding: 0; }
.home .station-btn { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dot title chev" "dot meta chev"; align-items: center; gap: 2px var(--sp-3);
  height: 100%; min-height: 64px; padding: var(--sp-3); text-align: start; transform: none; }
:where(html:not(.a11y-contrast)) .home .station-btn { border-radius: var(--r); background: var(--surface); border: 1px solid var(--hairline); box-shadow: none; color: var(--ink);
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home .station-btn:hover { transform: none; border-color: color-mix(in srgb, var(--lv) 40%, var(--hairline)); background: color-mix(in srgb, var(--lv) 4%, var(--surface)); box-shadow: var(--e2); }
:where(html:not(.a11y-contrast)) .home .station-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv) 35%, transparent); }
.home .station-btn::after { content: ""; grid-area: chev; width: 16px; height: 16px; background: var(--faint); -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
[dir="rtl"] .home .station-btn::after { transform: scaleX(-1); }
.home .station .dot { grid-area: dot; position: static; display: grid; place-items: center; width: 36px; height: 36px; border: 0; font: 700 .9rem/1 var(--font-target); animation: none; }
:where(html:not(.a11y-contrast)) .home .station .dot { border-radius: 50%; background: color-mix(in srgb, var(--lv) 12%, var(--surface)); color: color-mix(in srgb, var(--lv) 62%, var(--ink)); box-shadow: none; }
.home .station .dot svg { width: 15px; height: 15px; }
.home .st-title { grid-area: title; min-width: 0; font-size: .95rem; font-weight: 500; line-height: 1.3; }
.home .st-meta { grid-area: meta; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-xs); line-height: 1.3; }
/* a locked lesson shows the words it teaches (the server sends three), not only a lock */
.home .st-sample { min-width: 0; overflow: hidden; font: 500 var(--fs-xs)/1.3 var(--font-target); white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .st-sample { color: var(--ink-2); }
.home .st-meta .muted.small { font-size: var(--fs-xs); }
.home .st-meta .pill { font-size: .7rem; padding: .12em .6em; }
/* the next lesson: the level colour */
:where(html:not(.a11y-contrast)) .home .station.next .station-btn { border-color: color-mix(in srgb, var(--lv) 65%, transparent); background: color-mix(in srgb, var(--lv) 7%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv) 14%, transparent); }
:where(html:not(.a11y-contrast)) .home .station.next .dot { background: color-mix(in srgb, var(--lv) var(--chip-dim, 100%), #000); color: var(--bg);
  box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--lv) 90%, transparent); }
.home .station.next .st-title { font-weight: 600; }
.home .station.next .station-btn::after { background: color-mix(in srgb, var(--lv) 80%, var(--ink)); }
/* done: a check, quieter */
:where(html:not(.a11y-contrast)) .home .station.done .dot { background: color-mix(in srgb, var(--lv) 14%, var(--surface)); color: color-mix(in srgb, var(--lv) 85%, var(--ink)); box-shadow: none; }
.home .station.done .st-title { color: var(--ink-2); }
:where(html:not(.a11y-contrast)) .home .station.done .pill.ok { background: transparent; border-color: transparent; padding-inline: 0; }
/* locked: a lock and the Plus pill */
:where(html:not(.a11y-contrast)) .home .station.locked .station-btn { opacity: 1; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
:where(html:not(.a11y-contrast)) .home .station.locked .dot { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hairline); }
.home .station.locked .dot svg { stroke: currentColor; width: 14px; height: 14px; }
.home .station.locked .st-title { color: var(--muted); }
/* Done, now, still to come at a glance (R50, 4 Nov 2026): a done lesson has a filled check, the lesson to do now a filled
   number with a halo, a later one a hollow dashed ring. On one column a rail joins the dots: solid up to "now", dashed after. */
:where(html:not(.a11y-contrast)) .home .station.done .dot { background: color-mix(in srgb, var(--lv) var(--chip-dim, 100%), #000); color: var(--bg); }
.home .station.done .dot svg { width: 17px; height: 17px; stroke-width: 2.6; }
:where(html:not(.a11y-contrast)) .home .station.done .station-btn { background: color-mix(in srgb, var(--lv) 5%, var(--surface)); border-color: color-mix(in srgb, var(--lv) 22%, var(--hairline)); }
:where(html:not(.a11y-contrast)) .home .station.done .pill.ok { box-shadow: none; color: color-mix(in srgb, var(--lv) 55%, var(--ink)); }
:where(html:not(.a11y-contrast)) .home .station.next .dot { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--lv) 55%, transparent), 0 6px 14px -8px color-mix(in srgb, var(--lv) 90%, transparent); }
:where(html:not(.a11y-contrast)) .home .station:not(.done, .next, .locked) .dot { background: transparent; box-shadow: inset 0 0 0 2px transparent; border: 2px dashed color-mix(in srgb, var(--lv) 45%, var(--hairline)); color: var(--ink-2); }
.home .stations { container-type: inline-size; }
.home .station { position: relative; }
@container (max-width: 567.98px) {
  :where(html:not(.a11y-contrast)) .home .station:not(:last-child)::after {
    content: ""; position: absolute; z-index: 1; inset-inline-start: calc(var(--sp-3) + 17px); top: calc(50% + 25px); width: 2px; height: calc(100% - 50px + var(--sp-2));
    border-radius: 2px; pointer-events: none; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--lv) 40%, transparent) 0 4px, transparent 4px 8px);
  }
  :where(html:not(.a11y-contrast)) .home .station.done:not(:last-child)::after { background: color-mix(in srgb, var(--lv) 70%, transparent); }
}

/* footer: the level test, and "show all lessons" */
.home .level-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) var(--sp-4); }
:where(html:not(.a11y-contrast)) .home .level-foot { border-top: 1px solid var(--hairline); background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.home .level-foot:empty { display: none; }
.home .lv-more { order: 2; flex: none; margin: 0; margin-inline-start: auto; min-height: 44px; }
.home .lv-test { order: 1; flex: 0 1 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); width: auto; margin: 0;
  padding: var(--sp-2); padding-inline-end: var(--sp-3); text-align: start; transform: none; }
:where(html:not(.a11y-contrast)) .home .lv-test { border-radius: var(--r); border: 1px solid transparent; background: transparent; box-shadow: none;
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home .lv-test:hover { transform: none; border-color: var(--hairline); background: var(--surface); box-shadow: var(--e1); }
.home .lt-icon { display: grid; place-items: center; width: 40px; height: 40px; font-size: 0; }
:where(html:not(.a11y-contrast)) .home .lt-icon { border-radius: 12px; background: color-mix(in srgb, var(--lv, var(--accent)) 13%, var(--surface)); color: color-mix(in srgb, var(--lv, var(--accent)) 80%, var(--ink)); box-shadow: none; }
:where(html:not(.a11y-contrast)) .home .lv-test.passed .lt-icon { background: var(--gold-soft); color: var(--gold-ink); }
.home .lt-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.home .lt-text { display: grid; gap: 2px; min-width: 0; }
.home .lt-text strong { font-size: .95rem; font-weight: 600; }
.home .lt-text .muted.small { font-size: var(--fs-xs); }
.home .lv-test::after { content: ""; width: 16px; height: 16px; background: var(--faint); -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
[dir="rtl"] .home .lv-test::after { transform: scaleX(-1); }

/* =====================================================================
   5b. Welcome back (B35): after a week or more away, one question with three easy ways back, a small goal and the
   lost streak back for three lessons. The first way is the suggested one.
   ===================================================================== */
.home .wb { display: grid; gap: var(--sp-4); }
.home .wb-ask { margin: 0; font: 600 var(--fs-h3)/1.3 var(--font-ui); color: var(--ink); }
.home .wb-opts { display: grid; gap: var(--sp-3); }
.home .wb-opt { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; align-items: center; gap: var(--sp-3); width: 100%; min-height: 68px; margin: 0;
  padding: var(--sp-3) var(--sp-4); padding-inline-start: var(--sp-3); font: inherit; text-align: start; cursor: pointer; }
:where(html:not(.a11y-contrast)) .home .wb-opt { border-radius: var(--r); border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink); box-shadow: var(--e1);
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .home .wb-opt:first-child { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--e1); }
:where(html:not(.a11y-contrast)) .home .wb-opt:hover { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: var(--e2); }
.home .wb-opt::after { content: ""; width: 18px; height: 18px; background: var(--muted); -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
[dir="rtl"] .home .wb-opt::after { transform: scaleX(-1); }
.home .wb-text { display: grid; gap: 2px; min-width: 0; }
.home .wb-text strong { font: 600 1rem/1.3 var(--font-ui); color: var(--ink); }
.home .wb-text > span { font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); }
.home .wb-review { --si: var(--i-repeat); --t: #d9407a; }
.home .wb-lesson { --si: var(--i-arrow); --t: var(--accent); }
[dir="rtl"] .home .wb-lesson::before { transform: scaleX(-1); }
.home .wb-play { --si: var(--i-spark); --t: #7b5cf0; }
.home .wb-goal { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); }
.home .wb-goal::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--ok); -webkit-mask: var(--i-check-c) center / contain no-repeat; mask: var(--i-check-c) center / contain no-repeat; }
.home .wb-streak { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); padding-inline-start: var(--sp-3); }
:where(html:not(.a11y-contrast)) .home .wb-streak { border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--streak) 30%, transparent); background: color-mix(in srgb, var(--streak) 8%, var(--surface)); }
.home .wb-streak .tc-ico { --si: var(--i-flame); --t: var(--streak); }
.home .cb-dots { display: flex; gap: 6px; }
.home .cb-dots > span { box-sizing: border-box; width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--streak) 65%, transparent); }
.home .cb-dots > span.on { border-color: var(--streak); background: var(--streak); }
html.a11y-contrast .home :is(.wb-opt, .wb-streak) { border: 2px solid var(--ink); border-radius: var(--r); background: var(--bg); color: var(--ink); }
html.a11y-contrast .home .cb-dots > span { border-color: var(--ink); }
html.a11y-contrast .home .cb-dots > span.on { background: var(--ink); }
@media (max-width: 420px) {
  .home .wb-streak { grid-template-columns: 44px minmax(0, 1fr); }
  .home .cb-dots { grid-column: 2; }
}

/* =====================================================================
   6. Narrow columns (phones)
   ===================================================================== */
@container home (max-width: 559.98px) {
  .home .hero-banner { min-height: 0; padding: var(--sp-8) var(--sp-4) var(--sp-5); gap: 6px; }
  .home .hero-banner .hi-line { font-size: 1rem; }
  .home .hero-body { padding: var(--sp-4); gap: var(--sp-3); }
  .home .next-card { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "chip text" "go go"; row-gap: var(--sp-4); padding: var(--sp-4); }
  .home .next-card .lv-chip { width: 46px; height: 46px; }
  .home .next-card .btn.primary { width: 100%; }
  .home .stats :is(.plan-cta-card, .today-plan, .wod, .ar-mini, .quests) { padding: var(--sp-4); }
  .home .stats .today-card { padding: var(--sp-1) var(--sp-4); }
  .home .wod .btn.small, .home .lv-more, .home .stats .st-pick .btn { min-height: 44px; }
  .home .wod-word .speak { width: 44px; height: 44px; }
  .home .level-head { align-items: flex-end; min-height: 172px; }
  .home .level-head::after { background: linear-gradient(0deg, color-mix(in srgb, var(--lv) 22%, rgb(var(--scrim) / .9)) 0%, rgb(var(--scrim) / .58) 48%, rgb(var(--scrim) / .04) 100%); }
  .home .lh-text { padding: var(--sp-6) var(--sp-4) var(--sp-4); gap: 6px; }
  .home .stations { padding: var(--sp-3); }
  .home .level-foot { padding: var(--sp-3); }
  .home .lv-more { order: 0; flex: 1 1 100%; margin-inline-start: 0; }
  .home .lv-test { flex: 1 1 100%; }
  .home .level-card { padding: var(--sp-4); }
  .home .polly { gap: var(--sp-3); }
  .home .polly .polly-cat { width: 52px; height: 52px; align-self: start; }
  .home .polly-bubble > p { grid-column: 1 / -1; }
  .home .polly-bubble .polly-say { grid-row: 1; margin-block: -6px -2px; }
}

/* =====================================================================
   7. Dark theme: lighter icon tints
   ===================================================================== */
:root[data-theme="dark"] .home { --streak: #f58a55; }
:root[data-theme="dark"] .home :is(.stats :is(.wod-head h3, .tp-head h3, .quests h3, .ar-mini-h > span:first-child), .tc-ico)::before { background: color-mix(in srgb, var(--t) 62%, #fff); }
:root[data-theme="dark"]:not(.a11y-contrast) .home .quests .q-reward { background: color-mix(in srgb, #7b5cf0 24%, var(--surface)); color: #c4b5ff; }
:root[data-theme="dark"]:not(.a11y-contrast) .home .quests li.done .q-reward { background: var(--ok-soft); color: var(--ok); }
:root[data-theme="dark"] .home { --i-review-c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f08db4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11V9.5A3.5 3.5 0 0 1 7.5 6H19M16 3l3 3-3 3M20 13v1.5a3.5 3.5 0 0 1-3.5 3.5H5M8 21l-3-3 3-3'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home { --streak: #f58a55; }
  :root:not([data-theme="light"]) .home :is(.stats :is(.wod-head h3, .tp-head h3, .quests h3, .ar-mini-h > span:first-child), .tc-ico)::before { background: color-mix(in srgb, var(--t) 62%, #fff); }
  :root:not([data-theme="light"]):not(.a11y-contrast) .home .quests .q-reward { background: color-mix(in srgb, #7b5cf0 24%, var(--surface)); color: #c4b5ff; }
  :root:not([data-theme="light"]):not(.a11y-contrast) .home .quests li.done .q-reward { background: var(--ok-soft); color: var(--ok); }
  :root:not([data-theme="light"]) .home { --i-review-c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f08db4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11V9.5A3.5 3.5 0 0 1 7.5 6H19M16 3l3 3-3 3M20 13v1.5a3.5 3.5 0 0 1-3.5 3.5H5M8 21l-3-3 3-3'/%3E%3C/svg%3E"); }
}

/* =====================================================================
   8. High contrast: solid scrims behind text on photos, strong card borders
   ===================================================================== */
html.a11y-contrast .home :is(.hero-banner, .level-head)::after { background: rgb(0 0 0 / .78); }
html.a11y-contrast .home :is(.hero-banner, .lh-text) :is(h1, h2, p, span) { color: #fff !important; }
html.a11y-contrast .home :is(.hero-main, .stats :is(.today-card, .plan-cta-card, .today-plan, .wod, .st-pick, .ar-mini, .quests), .way, .level, .next-card, .level-card, .polly, .station-btn, .place-cta, .can-line) {
  border: 2px solid var(--ink); background: var(--bg); box-shadow: none; }
html.a11y-contrast .home .hero-main { border-radius: var(--r-xl); }
html.a11y-contrast .home :is(.stats :is(.today-card, .plan-cta-card, .today-plan, .wod, .st-pick, .ar-mini, .quests), .way, .level) { border-radius: var(--r-lg); }
html.a11y-contrast .home :is(.next-card, .station-btn, .place-cta) { border-radius: var(--r); }
html.a11y-contrast .home :is(.level-card, .polly) { border-radius: var(--r-lg); }
html.a11y-contrast .home .can-line { border-radius: var(--r-sm); }

/* =====================================================================
   9. Motion: no lifts for reduced motion, calm and easy learning
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  .home :is(.way, .station-btn, .place-cta, .plan-cta-card, .ar-mini, .lv-test, .can-line, .btn) { transition: none; }
  .home :is(.way, .station-btn, .place-cta, .plan-cta-card, .ar-mini, .lv-test):hover { transform: none; }
}
html:is(.pref-calm, .pref-easy) .home :is(.way, .station-btn, .place-cta, .plan-cta-card, .ar-mini, .lv-test):hover { transform: none; }

/* =====================================================================
   5c. First visit: "no energy, no hearts, no ads, A1 to C1" (N22), chips on the hero photo
   ===================================================================== */
.home .no-limits { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-1) 0 0; padding: 0; }
.home .no-limits li { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 11px 3px 9px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.2; }
:where(html:not(.a11y-contrast)) .home .no-limits li { border-radius: var(--r-pill); color: var(--on-photo); background: rgb(var(--scrim) / .38); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.home .no-limits li::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: var(--nl) center / contain no-repeat; mask: var(--nl) center / contain no-repeat; }
.home .no-limits .nl-no { --nl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M6 6l12 12'/%3E%3C/svg%3E"); }
.home .no-limits .nl-yes { --nl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.home .no-limits li { unicode-bidi: plaintext; }
html.a11y-contrast .home .no-limits li { border: 2px solid currentColor; border-radius: var(--r-pill); }

/* =====================================================================
   5d. Polly's 30 days (N20): an optional one-task-a-day challenge in the side column
   ===================================================================== */
.home .p30 { display: grid; gap: var(--sp-3); }
.home .p30 p { margin: 0; }
.home .p30-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); }
.home .p30-head h3 { margin: 0; font: 650 1rem/1.3 var(--font-ui); }
.home .p30-mark { display: grid; place-items: center; width: 36px; height: 36px; font: 800 .95rem/1 var(--font-display, var(--font-ui)); letter-spacing: -.02em; }
:where(html:not(.a11y-contrast)) .home .p30-mark { border-radius: 11px; color: #fff; background: linear-gradient(140deg, var(--accent), var(--accent-2)); box-shadow: var(--e1); }
.home .p30-dots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; margin: 0; padding: 0; list-style: none; }
.home .p30-dots li { aspect-ratio: 1; display: grid; place-items: center; font-size: 0; border-radius: 50%; }
:where(html:not(.a11y-contrast)) .home .p30-dots li { background: color-mix(in srgb, var(--ink) 8%, transparent); }
:where(html:not(.a11y-contrast)) .home .p30-dots li.future { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hairline-strong); }
:where(html:not(.a11y-contrast)) .home .p30-dots li.on { background: var(--ok); }
:where(html:not(.a11y-contrast)) .home .p30-dots li.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
html.a11y-contrast .home .p30-dots li { border: 1.5px solid var(--ink); }
html.a11y-contrast .home .p30-dots li.on { background: var(--ink); }
.home .p30-task { font-size: var(--fs-sm); line-height: 1.45; }
:where(html:not(.a11y-contrast)) .home .p30-task.done { color: var(--ok-text, var(--ok)); font-weight: 600; }
.home .p30-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.home .p30-acts .link-btn { min-height: 44px; }
:where(html:not(.a11y-contrast)) .home .p30-acts .link-btn { color: var(--muted); }
.home .p30-intro .btn { justify-self: start; }

/* =====================================================================
   5e. First visit: start now, no account (N23), and an honest skills map (N25); "what's new" after an update (N26)
   ===================================================================== */
.home .hero-banner .start-note { max-width: 60ch; font-size: var(--fs-sm); line-height: 1.5; color: var(--on-photo-2); text-shadow: 0 1px 2px rgb(var(--scrim) / .3); }
.skills-map { display: grid; gap: var(--sp-4); margin: var(--sp-8) 0 0; padding: var(--sp-6); text-align: start; }
:where(html:not(.a11y-contrast)) .skills-map { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e1); }
html.a11y-contrast .skills-map { border: 2px solid var(--ink); border-radius: var(--r-lg); }
.skills-map h2 { margin: 0; font-size: var(--fs-h3); }
.skills-map ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--sp-4); }
.skills-map li { position: relative; padding-inline-start: 36px; }
.skills-map li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; width: 24px; height: 24px; background: var(--accent); -webkit-mask: var(--sk) center / contain no-repeat; mask: var(--sk) center / contain no-repeat; }
html.a11y-contrast .skills-map li::before { background: var(--ink); }
.skills-map .sk-read { --sk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10.5 5.2 8.3 4.5 4 4.5v13c4.3 0 6.5.7 8 2 1.5-1.3 3.7-2 8-2v-13c-4.3 0-6.5.7-8 2zM12 6.5v13'/%3E%3C/svg%3E"); }
.skills-map .sk-listen { --sk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 15v-3a7.5 7.5 0 0 1 15 0v3'/%3E%3Crect x='3.5' y='13.5' width='4' height='6.5' rx='1.6'/%3E%3Crect x='16.5' y='13.5' width='4' height='6.5' rx='1.6'/%3E%3C/svg%3E"); }
.skills-map .sk-speak { --sk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21'/%3E%3C/svg%3E"); }
.skills-map .sk-write { --sk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 19.5h4l10.7-10.7a2.1 2.1 0 0 0-4-4L4.5 15.5z'/%3E%3Cpath d='m13.5 6.5 4 4'/%3E%3C/svg%3E"); }
.skills-map strong { display: block; font-size: 1rem; }
.skills-map li p { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); line-height: 1.6; }
:where(html:not(.a11y-contrast)) .skills-map li p { color: var(--ink-2); }
.skills-map .sk-a1 { margin: 0; padding-top: var(--sp-3); font-size: var(--fs-sm); line-height: 1.6; }
:where(html:not(.a11y-contrast)) .skills-map .sk-a1 { border-top: 1px solid var(--hairline); color: var(--ink-2); }
.whats-new { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-4); padding: var(--sp-3) var(--sp-4); text-align: start; }
:where(html:not(.a11y-contrast)) .whats-new { border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--ink); }
html.a11y-contrast .whats-new { border: 2px solid var(--ink); border-radius: var(--r); }
.whats-new strong { display: block; font: 600 .95rem/1.35 var(--font-ui); }
.whats-new p { margin: 2px 0 0; font-size: var(--fs-sm); line-height: 1.45; }
.whats-new .wn-ico { display: grid; place-items: center; width: 40px; height: 40px; }
:where(html:not(.a11y-contrast)) .whats-new .wn-ico { border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.whats-new .wn-ico::before { content: ""; width: 20px; height: 20px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.6L18.5 9l-4.7 1.4L12 15l-1.8-4.6L5.5 9l4.7-1.4z'/%3E%3Cpath d='M18.5 15l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.6L18.5 9l-4.7 1.4L12 15l-1.8-4.6L5.5 9l4.7-1.4z'/%3E%3Cpath d='M18.5 15l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z'/%3E%3C/svg%3E") center / contain no-repeat; }
html.a11y-contrast .whats-new .wn-ico::before { background: var(--ink); }
.whats-new .wn-acts { display: flex; align-items: center; gap: var(--sp-1); }
.whats-new .wn-close { width: 44px; height: 44px; font-size: 1.5rem; }
@media (max-width: 560px) {
  .whats-new { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
  .whats-new .wn-acts { grid-column: 1 / -1; justify-content: space-between; }
}

/* 5f. "More for you" (app.js homeMore): the side cards today does not need (word of the day, tasks, rank, books,
   a plan or 30 days not started yet), folded under one quiet row so the home page leads with the next lesson */
.home .home-more { margin: 0; }
.home .home-more > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px var(--sp-3);
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-lg); list-style: none; cursor: pointer; }
.home .home-more > summary::-webkit-details-marker { display: none; }
.home .home-more > summary strong { font: 600 var(--fs-sm)/1.3 var(--font-ui); }
.home .home-more > summary::after { content: ""; grid-column: 2; grid-row: 1 / span 2; width: 9px; height: 9px; margin-inline-end: 4px; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-1); }
.home .home-more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.home .home-more > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
:where(html:not(.a11y-contrast)) .home .home-more > summary { color: var(--ink-2); background: var(--surface); border: 1px dashed var(--hairline-strong); }
:where(html:not(.a11y-contrast)) .home .home-more > summary:hover { color: var(--ink); border-color: var(--accent-line); }
html.a11y-contrast .home .home-more > summary { border: 2px solid var(--ink); }
.home .home-more[open] > summary { margin-bottom: var(--sp-4); }
.home .home-more .hm-body { display: flex; flex-direction: column; gap: var(--sp-4); }

/* 5g. Reviews for today (app.js reviewsCard, R1 gap 7): the due words, the ladder that brings every word back, one button.
   The ladder counts words on each rung, so the learner sees the cycle working rather than a bare number. */
.home .stats .rev-card { display: grid; gap: var(--sp-3); margin: 0; padding: var(--sp-4) var(--sp-5); }
:where(html:not(.a11y-contrast)) .home .stats .rev-card { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e2); }
html.a11y-contrast .home .stats .rev-card { border: 2px solid var(--ink); }
.home .rev-card p { margin: 0; }
.home .rev-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); }
.home .rev-head h2 { margin: 0; font: 600 var(--fs-lg)/1.3 var(--font-ui); }
.home .rev-head .tc-ico { --si: var(--i-repeat); --t: #d9407a; }
.home .rev-n { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.home .rev-card:not(.is-due) .rev-n { color: var(--ink-2); }
.home .rev-words { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.home .rev-words li { padding: .25em .75em; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; }
:where(html:not(.a11y-contrast)) .home .rev-words li:not(.rev-more) { background: var(--surface-2); border: 1px solid var(--hairline); }
.home .rev-words .rev-more { color: var(--ink-2); font-weight: 500; }
.home .rev-ladder { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.home .rev-ladder li { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 6px 2px; text-align: center; color: var(--ink-2); }
:where(html:not(.a11y-contrast)) .home .rev-ladder li { border-radius: 10px; background: var(--surface-2); }
:where(html:not(.a11y-contrast)) .home .rev-ladder li.has { background: color-mix(in srgb, #d9407a 13%, var(--surface)); color: var(--ink); }
.home .rev-ladder .num { font-size: var(--fs-sm); font-weight: 700; }
.home .rev-ladder small { font-size: .68rem; line-height: 1.15; }
.home .rev-how { font-size: var(--fs-xs); }
.home .rev-card > :is(.btn, .link-btn) { justify-self: start; }
@container home (max-width: 599.98px) {
  .home > .hero > .stats > .rev-card { order: 2; }
}

/* =====================================================================
   6. The bold home (docs/plan/2026-10-04-redesign-bento.md, phase 1; markup: js/ui-shell.js PolyBento + app.js renderMap)
   Big rounded cards, one idea each, thick short headlines. The hero is text on a CSS background, never a photo, so it
   paints at once. Pictures from Canva will sit where the CSS shapes are now; until then nothing waits for an image.
   ===================================================================== */
.bx-home {
  --bx-end: 88%; /* where the decoration sits: the end side of the reading direction */
  --i-mic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21M8.5 21h7'/%3E%3C/svg%3E");
  --i-ear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15v-3a8 8 0 0 1 16 0v3'/%3E%3Crect x='3.5' y='14' width='4.5' height='7' rx='2'/%3E%3Crect x='16' y='14' width='4.5' height='7' rx='2'/%3E%3C/svg%3E");
  --i-cup: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 9h12v5a5 5 0 0 1-5 5h-2a5 5 0 0 1-5-5z'/%3E%3Cpath d='M16.5 10.5h1.5a2.5 2.5 0 0 1 0 5h-1.6M8 3.5V6M12 3.5V6'/%3E%3C/svg%3E");
  --i-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='13' rx='2.5'/%3E%3Cpath d='M10 8.5v5l4.5-2.5z'/%3E%3Cpath d='M8 21h8'/%3E%3C/svg%3E");
  --i-pen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.5 4.5l4 4L9 19H5v-4z'/%3E%3Cpath d='M13 7l4 4'/%3E%3C/svg%3E");
  --i-note: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5.5l11-2V16'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3C/svg%3E");
  --i-a1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E");
  --i-test: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 20h16M7 16v4M12 11v9M17 6v14'/%3E%3C/svg%3E");
  --i-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4.5A1.5 1.5 0 0 1 6.5 3H19v15H6.5A1.5 1.5 0 0 0 5 19.5zM5 19.5A1.5 1.5 0 0 0 6.5 21H19'/%3E%3C/svg%3E");
  --i-video: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='13' height='13' rx='2.5'/%3E%3Cpath d='M16 10l5-3v10l-5-3z'/%3E%3C/svg%3E");
  --i-exam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2.5'/%3E%3Cpath d='M9 4V2.8h6V4M8.5 13l2.5 2.5 4.5-5'/%3E%3C/svg%3E");
  --i-tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.2v13.6a.8.8 0 0 0 1.2.7l10.6-6.8a.8.8 0 0 0 0-1.4L9.2 4.5A.8.8 0 0 0 8 5.2z'/%3E%3C/svg%3E");
}
[dir="rtl"] .bx-home { --bx-end: 12%; }
@container home (min-width: 600px) { .bx-home { --bento-gap: 16px; } }
@container home (min-width: 1000px) { .bx-home { --bento-gap: 20px; } }

/* Loading placeholders for the home page and the lesson list (docs/plan/2026-10-28-skeletons.md); the shapes are the
   ui-kit .ds-skel ones, these only lay them out like the real page */
.ds-skel-home { display: grid; gap: var(--sp-5); }
.ds-skel-home .sk-hero { display: grid; gap: var(--sp-3); justify-items: start; padding: var(--sp-5); border-radius: var(--r-xl); }
/* the hero and the lesson rows are card-coloured panels, like the cards that replace them */
:where(html:not(.a11y-contrast)) :is(.ds-skel-home .sk-hero, .ds-skel-row) { background: var(--surface); border: 1px solid var(--hairline); }
.ds-skel-home .sk-hero > .ds-skel-box { justify-self: stretch; --h: clamp(120px, 34vw, 220px); }
.ds-skel-home .sk-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ds-skel-home .sk-chips > .ds-skel { width: 4.5rem; height: 40px; border-radius: var(--r-pill); }
.ds-skel-home .sk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--sp-3); }
.ds-skel-home .sk-tiles > .ds-skel { --h: 132px; border-radius: var(--r-lg); }
/* one lesson row: picture, title and a line, the start button */
.ds-skel-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg); }
html.a11y-contrast .ds-skel-row { border: 1px solid currentColor; }
.ds-skel-row > .ds-skel-box { width: 56px; --h: 56px; border-radius: var(--r); }
.ds-skel-row > .ds-skel-pill { --w: 5.5rem; }
.ds-skel-list { display: grid; gap: var(--sp-3); }
@media (max-width: 420px) { .ds-skel-row > .ds-skel-pill { display: none; } } /* a phone row keeps the title room */

/* 6a. Layout: the cards and strips are one grid item in the main column (beside today's rail on wide screens);
   the questions and the level check take the full width under the course map */
.home > .bx-top { container: bx / inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-10); margin-top: var(--sp-10); min-width: 0; }
.home > .bx-top > .ways { margin: 0; }
.home > .bx-end { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-10); margin-top: var(--sp-12); min-width: 0; }
@container home (min-width: 840px) { .home > .bx-top { margin-top: var(--sp-8); } }
@container home (max-width: 599.98px) {
  .home > .bx-top { order: 5; margin-top: var(--sp-4); gap: var(--sp-8); }
  .home > .bx-end { order: 7; margin-top: var(--sp-8); }
}
.bx-h { margin: 0 0 var(--sp-4); font: 800 var(--fs-h2)/1.15 var(--font-ui); letter-spacing: -.015em; color: var(--ink); }

/* 6a'. Where to click (docs/plan/2026-11-04-where-to-click.md). For a returning learner the cards and strips fold under
   one labelled "More ways to learn" row (js/ui-shell.js home()), so the course path follows the hero; the row is a
   56px key with words, not a thin link. Its own heading repeats the row's words, so it is kept for screen readers only. */
.home > .bx-top.is-folded { gap: 0; }
.bx-more { min-width: 0; }
.bx-more > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 56px;
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-lg); list-style: none; cursor: pointer; }
.bx-more > summary::-webkit-details-marker { display: none; }
.bx-more > summary strong { font: 700 1.02rem/1.3 var(--font-ui); }
.bx-more > summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-inline-end: 6px; border: solid currentColor;
  border-width: 0 2.5px 2.5px 0; transform: translateY(-3px) rotate(45deg); transition: transform var(--dur-1); }
.bx-more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.bx-more > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
:where(html:not(.a11y-contrast)) .bx-more > summary { color: var(--ink); background: var(--surface); border: 1.5px solid var(--hairline-strong); box-shadow: var(--e1); }
:where(html:not(.a11y-contrast)) .bx-more > summary:hover { border-color: var(--accent-line); }
html.a11y-contrast .bx-more > summary { border: 2px solid var(--ink); }
.bx-more-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-10); padding-top: var(--sp-8); min-width: 0; }
.bx-more-body > .ways { margin: 0; }
.bx-more-body > .ways > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@container home (max-width: 599.98px) { .bx-more-body { gap: var(--sp-8); padding-top: var(--sp-6); } }
/* One lime key per screen: the hero's. Below it ("New lesson" in the loop card, the Spanish banner, the level check)
   and in "More for you" the same buttons take the outlined look, so the eye goes to the next lesson first. Beats the kids and dark-theme
   button rules on purpose; contrast mode keeps its own black and white. */
html:root:not(.a11y-contrast) .home :is(.bx-top, .bx-end, .home-more) :is(.btn.primary, .btn.bx-go) {
  color: var(--ink); text-shadow: none; background: var(--surface); filter: none;
  border: 1.5px solid color-mix(in srgb, var(--ink) 26%, transparent); box-shadow: var(--e1); }
html:root:not(.a11y-contrast) .home :is(.bx-top, .bx-end, .home-more) :is(.btn.primary, .btn.bx-go):hover:not(:disabled) { background: var(--surface); border-color: var(--accent-line); }
html:root:not(.a11y-contrast) .home :is(.bx-top, .bx-end, .home-more) :is(.btn.primary, .btn.bx-go):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: var(--e1); }
html:root:not(.a11y-contrast) .home :is(.bx-top, .bx-end, .home-more) :is(.btn.primary, .btn.bx-go)::after { content: none; }
.home :is(.bx-top, .bx-end, .home-more) .btn.bx-go { animation: none; }
/* 44px keys: the 30-day "Join" and the explore chips on the home */
.home .p30 .btn { min-height: 44px; }
.home .x-home .chip.x-chip { min-height: 44px; }

/* 6b. Hero: the dark card for a returning learner, the colourful welcome on the first visit. Text stays white on
   both in every theme (15:1 on --panel, at least 5:1 on --bx-grad). */
.home .bx-hero .hero-banner { min-height: 0; justify-content: flex-start; padding: var(--sp-8) var(--sp-8) var(--sp-6); gap: var(--sp-3);
  background: radial-gradient(circle at var(--bx-end) 0%, rgb(124 74 223 / .5), transparent 58%), var(--panel); }
.home .bx-hero .hero-banner::after { content: none; }
:where(html:not(.a11y-contrast)) .home .bx-hero.stage { border-radius: var(--r-2xl); border: 0; box-shadow: var(--e-bento); }
.home .bx-hero .hero-banner h1 { max-width: 18ch; font-size: var(--fs-hero); font-weight: 800; line-height: 1.04; letter-spacing: -.025em; text-shadow: none; }
.home .bx-hero .hero-banner .hi-line { text-shadow: none; }
.home .bx-hero .hero-body { grid-template-columns: minmax(0, 1fr); padding: var(--sp-5) var(--sp-6) var(--sp-6); } /* one track the card's width: a long row never widens it */
@container home (max-width: 599.98px) {
  .home .bx-hero .hero-banner { padding: var(--sp-6) var(--sp-5) var(--sp-5); }
  .home .bx-hero .hero-body { padding: var(--sp-4); }
  :where(html:not(.a11y-contrast)) .home .bx-hero.stage { border-radius: 24px; }
}

/* welcome: gradient, the headline and the one green button on the start side, the greetings picture on the end side */
.home .bx-hero.is-welcome .hero-banner { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; background: var(--bx-grad); }
.home .bx-hero.is-welcome .hero-banner > * { grid-column: 1; }
.home .bx-hero.is-welcome .hero-banner > .eyebrow { justify-self: start; }
@container home (min-width: 600px) {
  .home .bx-hero.is-welcome .hero-banner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: var(--sp-6); }
  .home .bx-hero.is-welcome .bx-art { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .home .bx-hero.is-welcome .hero-banner h1 { font-size: clamp(1.9rem, .8rem + 3cqi, 3rem); }
}
.bx-go-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-2); }
/* a first visit only: a small "start here" pill over the one main button, so a new visitor knows where to tap (leo, Oct 11;
   docs/plan/2026-10-11-app-look-go-tip.md). It nudges only where motion is welcome; calm mode stops all animation. */
.bx-go-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.bx-tip { position: relative; padding: 4px 12px; border-radius: var(--r-pill); background: #34d399; color: #04210f; font: 700 .82rem/1.2 var(--font-ui); }
.bx-tip::after { content: ""; position: absolute; top: 100%; inset-inline-start: calc(50% - 6px); border: 6px solid transparent; border-top-color: #34d399; }
@media (prefers-reduced-motion: no-preference) { .bx-tip { animation: bx-tip-nudge 1.6s ease-in-out infinite; } }
@keyframes bx-tip-nudge { 50% { transform: translateY(-4px); } }
.btn.bx-go { min-height: 54px; padding: 0 var(--sp-8); border: 0; border-radius: var(--r-pill); background: var(--cta); color: var(--on-cta); font: 700 1.05rem/1 var(--font-ui); box-shadow: 0 10px 24px -12px rgb(13 122 71 / .8); }
.btn.bx-go:hover:not(:disabled) { background: color-mix(in srgb, var(--cta) 88%, #000); color: var(--on-cta); }
.btn.bx-go:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 7px var(--cta); }
.home .bx-hero .bx-go-test { min-height: 44px; color: var(--on-photo); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.home .bx-hero .bx-go-test:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* phones: "Check your level" stays beside the button (wrapping its own words) instead of dropping to a new row, and on
   short screens the picture gives up a little height, so the course chips show above the dock on the first screen */
@container home (max-width: 599.98px) {
  .home .bx-hero .bx-go-test { flex: 1 1 0; min-width: 9ch; align-self: flex-end; padding-block: 5px; line-height: 1.25; text-align: start; }
}
@media (max-height: 760px) and (max-width: 599.98px) { .home .bx-hero.is-welcome .bx-art { min-height: 0; height: 96px; } }

/* the picture slot: soft shapes and the greetings in their own languages (live text, never baked into an image) */
.bx-art { position: relative; min-height: 132px; aspect-ratio: 1; max-height: 300px; width: 100%;
  background: radial-gradient(circle at 30% 62%, rgb(255 255 255 / .2) 0 17%, transparent 17.5%), radial-gradient(circle at 62% 46%, rgb(255 255 255 / .14) 0 22%, transparent 22.5%), radial-gradient(circle at 84% 74%, rgb(255 205 90 / .35) 0 13%, transparent 13.5%); }
@container home (max-width: 599.98px) { .bx-art { aspect-ratio: auto; height: 120px; margin-bottom: var(--sp-2); } }
.bx-vid { position: absolute; inset: 0; border-radius: var(--r-xl, 20px); overflow: hidden; background: rgb(255 255 255 / .08); }
.bx-vid > img, .bx-vid > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bx-vid > video { opacity: 0; transition: opacity .6s ease; }
.bx-vid.is-live > video { opacity: 1; }
html:is(.pref-calm, .kids) .bx-vid > video { display: none; }
.bx-hello { z-index: 1; position: absolute; padding: .4em .8em; border-radius: 16px; background: #fff; color: #16183a; font: 700 .95rem/1.1 var(--font-ui); box-shadow: 0 8px 18px -10px rgb(8 11 24 / .6); white-space: nowrap; }
.bx-hello::after { content: ""; position: absolute; bottom: -6px; inset-inline-start: 16px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.bx-hello.h1 { top: 6%; inset-inline-start: 0; }
.bx-hello.h2 { top: 30%; inset-inline-end: 0; background: #ffd666; }
.bx-hello.h3 { top: 56%; inset-inline-start: 8%; }
.bx-hello.h4 { bottom: 4%; inset-inline-end: 10%; background: #c9f2dc; }
html.pref-easy .bx-art, html.pref-easy .bx-banner { display: none; } /* easy learning: one clear action, no extras */

/* "I want to learn": the courses as pills with their names (no flags: a language is not a country) */
.bx-langs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.bx-langs-h { flex-basis: 100%; font-weight: 700; color: var(--ink); }
.bx-lang { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 46px; padding: 0 var(--sp-5); border-radius: var(--r-pill); border: 1.5px solid var(--hairline-strong);
  background: var(--surface); color: var(--ink); font: 600 1rem/1 var(--font-ui); text-decoration: none; cursor: pointer; }
.bx-lang:hover { border-color: var(--accent); }
.bx-lang:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.bx-lang.is-on { border-color: var(--accent); background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 80%, var(--ink)); }
.bx-lang.is-soon { color: var(--ink-2); cursor: default; }
.bx-lang.is-soon:hover { border-color: var(--hairline-strong); }
.home .bx-hero.is-welcome .hero-body > .no-limits { margin: 0; }
:where(html:not(.a11y-contrast)) .home .bx-hero.is-welcome .hero-body .no-limits li { color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hairline); -webkit-backdrop-filter: none; backdrop-filter: none; }
.home .bx-hero.is-welcome .hero-body > .start-note { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

/* 6c. "What you can do here": the bento. Two columns on a phone, four when there is room; a wide card spans two. */
.bx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: var(--bento-gap); }
@container bx (min-width: 640px) { .bx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bx-span-2 { grid-column: span 2; }
.bx-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 176px; padding: var(--sp-5); color: var(--ink); text-decoration: none; }
.bx-card.t1 { --tint: var(--tint-1); --tint-ink: var(--tint-ink-1); }
.bx-card.t2 { --tint: var(--tint-2); --tint-ink: var(--tint-ink-2); }
.bx-card.t3 { --tint: var(--tint-3); --tint-ink: var(--tint-ink-3); }
.bx-card.t4 { --tint: var(--tint-4); --tint-ink: var(--tint-ink-4); }
.bx-card.t5 { --tint: var(--tint-5); --tint-ink: var(--tint-ink-5); }
.bx-card.t6 { --tint: var(--tint-6); --tint-ink: var(--tint-ink-6); }
:where(html:not(.a11y-contrast)) .bx-card { border-radius: var(--r-2xl); background: var(--tint); box-shadow: var(--e-bento); transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
:where(html:not(.a11y-contrast)) .bx-card::after { content: ""; position: absolute; z-index: -1; inset-block-start: -60px; inset-inline-end: -40px; width: min(64%, 190px); aspect-ratio: 1; border-radius: 50%;
  background: color-mix(in srgb, var(--tint-ink) 13%, transparent); }
:where(html:not(.a11y-contrast)) .bx-card:hover { transform: translateY(-3px); box-shadow: var(--e3); }
.bx-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* the icon sits in the top corner; the text starts below it, so a two-line title never runs under the icon */
.bx-card { padding-block-start: calc(var(--sp-5) + 64px); }
.bx-card .bx-ic { position: absolute; inset-block-start: var(--sp-5); inset-inline-start: var(--sp-5); width: 52px; height: 52px; border-radius: 18px; background: var(--surface); box-shadow: var(--e1); }
.bx-ic::before { content: ""; position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; background: var(--tint-ink, var(--accent)); -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.bx-card strong { font: 700 var(--fs-card)/1.15 var(--font-ui); letter-spacing: -.01em; }
.bx-card small { font-size: var(--fs-sm); line-height: 1.4; color: var(--ink-2); }
.bx-card.bx-span-2 { min-height: 176px; }
.i-mic { --ic: var(--i-mic); } .i-ear { --ic: var(--i-ear); } .i-cup { --ic: var(--i-cup); } .i-play { --ic: var(--i-play); } .i-pen { --ic: var(--i-pen); }
.i-note { --ic: var(--i-note); } .i-a1 { --ic: var(--i-a1); } .i-test { --ic: var(--i-test); } .i-book { --ic: var(--i-book); } .i-video { --ic: var(--i-video); } .i-exam { --ic: var(--i-exam); }
@container home (max-width: 599.98px) { .bx-card { min-height: 156px; padding: var(--sp-4); padding-block-start: calc(var(--sp-4) + 58px); } .bx-card .bx-ic { inset-block-start: var(--sp-4); inset-inline-start: var(--sp-4); width: 46px; height: 46px; border-radius: 15px; } }
/* calm, easy learning, reduced motion: still cards, one column for easy learning, no decoration */
html:is(.pref-calm, .pref-easy) .bx-card { transition: none; }
html:is(.pref-calm, .pref-easy) .bx-card:hover { transform: none; }
@media (prefers-reduced-motion: reduce) { .bx-card { transition: none; } .bx-card:hover { transform: none; } }
html.pref-easy .bx-grid { grid-template-columns: minmax(0, 1fr); }
html.pref-easy .bx-span-2 { grid-column: auto; }
html.pref-easy .bx-card { min-height: 0; padding-block-start: calc(var(--sp-5) + 64px); }
html.pref-easy .bx-card::after { content: none; }
/* the other ways to learn keep their tiles under the bento, in the same rounded shape */
:where(html:not(.a11y-contrast)) .bx-top .way { border-radius: var(--r-lg); }

/* 6d. Strips: "learn free" and the teachers. On phones they wrap instead of scrolling sideways, so a long German or
   Russian name never runs past the screen edge: free tiles two per row with the icon on top, teachers one per row. */
.bx-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin: 0; padding: 2px 0 var(--sp-3); }
.bx-teach .bx-strip { grid-template-columns: minmax(0, 1fr); }
@container bx (min-width: 560px) {
  .bx-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .bx-teach .bx-strip { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
}
.bx-mini { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ic t" "ic tag"; align-items: center; column-gap: var(--sp-3); row-gap: 2px;
  min-width: 196px; min-height: 72px; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--hairline); color: var(--ink); font: inherit; text-align: start; text-decoration: none; cursor: pointer; }
:where(html:not(.a11y-contrast)) .bx-mini { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--e1); }
.bx-mini:hover { border-color: var(--accent-line); }
.bx-mini:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bx-mini .bx-ic { grid-area: ic; position: relative; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); }
.bx-mini .bx-ic::before { width: 22px; height: 22px; }
.bx-mini strong { grid-area: t; font-weight: 600; line-height: 1.25; }
.bx-tag { display: inline-block; justify-self: start; padding: 1px 9px; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); font-size: var(--fs-xs); font-weight: 600; line-height: 1.6; }
.bx-mini .bx-tag { grid-area: tag; }
.bx-lang .bx-tag { background: var(--surface-2); color: var(--ink-2); }
html.a11y-contrast .bx-tag { border: 1px solid currentColor; }
/* phones: a free tile is half a row, so its icon sits on top and a long word may break */
@container bx (max-width: 559.98px) {
  .bx-mini { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ic" "t" "tag"; align-items: start; align-content: start; row-gap: var(--sp-2); min-width: 0; }
  .bx-mini strong { overflow-wrap: anywhere; hyphens: auto; }
}

/* the cat teachers: photoreal Polly and Mila on their white studio backdrop, a line about what each does, ▶ their voice */
.bx-teacher { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); width: min(320px, 82vw); padding: var(--sp-3); }
/* one teacher per row on phones, two side by side when there is room */
.bx-strip > .bx-teacher { width: auto; }
:where(html:not(.a11y-contrast)) .bx-teacher { border-radius: var(--r-2xl); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--e-bento); }
.bx-teacher img { width: 88px; height: 88px; border-radius: 24px; object-fit: cover; background: #fff; }
.bx-t-text { display: grid; gap: 2px; min-width: 0; }
.bx-t-text strong { font: 700 var(--fs-card)/1.15 var(--font-ui); }
.bx-t-text small { font-size: var(--fs-sm); line-height: 1.4; color: var(--ink-2); }
.bx-play { position: relative; width: 48px; height: 48px; margin-inline-end: var(--sp-2); border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.bx-play span { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--i-tri) center / contain no-repeat; mask: var(--i-tri) center / contain no-repeat; }
/* intro film with a choice of hosts (Hebrew interface): poster until play, then one video with controls */
.bx-dlg { display: grid; gap: var(--sp-4); min-width: 0; }
.bx-dlg-pick { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.bx-dlg-opt { min-height: 44px; padding: 0 var(--sp-5); border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--fs-sm)/1 var(--font-ui); cursor: pointer; }
.bx-dlg-opt.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bx-dlg-opt:focus-visible { outline: none; box-shadow: var(--ring), 0 0 0 1px var(--accent); }
.bx-dlg-stage { position: relative; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; border-radius: var(--r-2xl); overflow: hidden; background: #000; }
.bx-dlg-stage > img, .bx-dlg-stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bx-dlg-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; }
.bx-dlg-ai { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.bx-play:focus-visible { outline: none; box-shadow: var(--ring), 0 0 0 1px var(--accent); }

/* 6e. One seasonal banner: a tint, a round picture slot, one line and one button */
.bx-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4) var(--sp-5); padding: var(--sp-5) var(--sp-6); }
:where(html:not(.a11y-contrast)) .bx-banner { border-radius: var(--r-2xl); background: var(--tint-3); box-shadow: var(--e-bento); }
html.a11y-contrast .bx-banner { border: 2px solid var(--ink); }
.bx-banner h2 { margin: 0 0 4px; font: 800 var(--fs-h3)/1.2 var(--font-ui); color: var(--ink); }
.bx-banner p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); }
.bx-ban-art { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #c4361b; color: #fff; transform: rotate(-8deg); }
.bx-ban-art b { font: 800 1rem/1 var(--font-ui); }
@container home (max-width: 599.98px) {
  .bx-banner { grid-template-columns: auto minmax(0, 1fr); padding: var(--sp-4); }
  .bx-banner .bx-go { grid-column: 1 / -1; width: 100%; }
  .bx-ban-art { width: 56px; height: 56px; }
}

/* 6f. Questions as rounded strips (plain <details>, no script) and the closing level check on the dark panel */
.bx-faq { max-width: 860px; }
.bx-faq details { margin: 0 0 var(--sp-3); border: 1px solid var(--hairline); }
:where(html:not(.a11y-contrast)) .bx-faq details { border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--e1); }
html.a11y-contrast .bx-faq details { border: 2px solid var(--ink); }
.bx-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: 58px; padding: var(--sp-3) var(--sp-5); font-weight: 600; cursor: pointer; list-style: none; }
.bx-faq summary::-webkit-details-marker { display: none; }
.bx-faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.3rem; font-weight: 500; }
.bx-faq details[open] summary::after { content: "−"; }
.bx-faq summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xl); }
.bx-faq details p { margin: 0; padding: 0 var(--sp-5) var(--sp-5); line-height: 1.6; color: var(--ink-2); }
html.in-app .bx-faq .is-pay { display: none; }
.bx-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4) var(--sp-6); padding: var(--sp-8);
  background: radial-gradient(circle at var(--bx-end) 100%, rgb(124 74 223 / .45), transparent 60%), var(--panel); color: var(--on-panel); }
:where(html:not(.a11y-contrast)) .bx-cta { border-radius: var(--r-2xl); box-shadow: var(--e-bento); }
html.a11y-contrast .bx-cta { background: #000; }
.bx-cta h2 { margin: 0 0 4px; font: 800 var(--fs-h2)/1.15 var(--font-ui); color: var(--on-panel); }
.bx-cta p { margin: 0; color: var(--on-panel-2); }
@container home (max-width: 599.98px) { .bx-cta { grid-template-columns: minmax(0, 1fr); padding: var(--sp-6) var(--sp-5); } .bx-cta .bx-go { width: 100%; } }

/* high contrast: the hero keeps a solid dark ground for its white text, the greetings stay dark on white, cards get borders */
html.a11y-contrast .home .bx-hero .hero-banner { background: #000; }
html.a11y-contrast .home .bx-art .bx-hello { color: #000 !important; background: #fff; border: 2px solid #000; }
html.a11y-contrast .bx-card, html.a11y-contrast .bx-mini, html.a11y-contrast .bx-teacher { border: 2px solid var(--ink); border-radius: var(--r-lg); }
@container home (max-width: 599.98px) {
  .bx-hello.h1 { top: 6%; inset-inline-start: 2%; }
  .bx-hello.h2 { top: 6%; inset-inline-end: 4%; }
  .bx-hello.h3 { top: auto; bottom: 6%; inset-inline-start: 30%; }
  .bx-hello.h4 { bottom: 10%; inset-inline-end: 2%; }
}

/* 6g. The level row (docs/plan/2026-10-04-level-picker.md): A1 to C1 in one tap, inside the top card. Level colours as on
   the map; the learner's level is filled, a level locked for this learner shows a small lock. */
.home .lv-row { display: grid; gap: var(--sp-2); margin-top: var(--sp-4); }
.home .lv-row-h { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.home .lv-row-h .pill { margin-inline-start: 4px; vertical-align: 1px; }
/* one line of five on a phone: equal columns instead of wrapping pills */
.home .lv-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 6px; max-width: 440px; }
.home .lv-go { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 44px; margin: 0;
  padding: 0 6px; border-radius: 999px; font: 700 .95rem/1 var(--font-target); color: var(--ink); cursor: pointer;
  background: color-mix(in srgb, var(--lv) 12%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--lv) 50%, transparent); }
.home .lv-go:hover { background: color-mix(in srgb, var(--lv) 22%, var(--surface)); }
.home .lv-go[aria-current="true"] { background: var(--lv); color: var(--bg); border-color: var(--lv); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv) 28%, transparent); }
.home .lv-go .lv-lock { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
.home .lv-check { justify-self: start; min-height: 44px; }
/* narrow phones (up to ~370 px): five chips still fit on one line, with a smaller lock */
@container home (max-width: 315.98px) {
  .home .lv-chips { grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 4px; }
  .home .lv-go { gap: 2px; padding: 0 3px; }
  .home .lv-go .lv-lock { width: 11px; height: 11px; }
}
html.a11y-contrast .home .lv-go { background: var(--bg); color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
html.a11y-contrast .home .lv-go[aria-current="true"] { background: var(--ink); color: var(--bg); }
/* a chip moves the page to the level: room for the sticky header, and its heading takes focus without a box */
.home .line .level { scroll-margin-top: 84px; }
.home .line .level h2:focus:not(:focus-visible) { outline: none; }

/* Wave 5 (T048): the daily goal in three steps, under the goal on the today card and in the footer settings */
.home .today-card .goal-pick { grid-column: 1 / -1; }
.home .today-card .goal-pick > summary { list-style: none; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.home .today-card .goal-pick > summary::-webkit-details-marker { display: none; }
.home .today-card .goal-pick[open] > summary { color: var(--muted); }
.gp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.gp-step { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: var(--sp-2); font: inherit; cursor: pointer; }
:where(html:not(.a11y-contrast)) .gp-step { color: var(--ink); background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--r); }
:where(html:not(.a11y-contrast)) .gp-step[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--ring); }
.gp-step strong { font-size: var(--fs-sm); font-weight: 600; }
.gp-step .num { font-size: var(--fs-xs); color: var(--muted); }
html.a11y-contrast .gp-step { border: 2px solid currentColor; }
html.a11y-contrast .gp-step[aria-checked="true"] { outline: 3px solid currentColor; outline-offset: 2px; }
.foot .settings .gp-steps { max-width: 22rem; }
/* a rest day of the learner's plan (W12-T002): a calm dashed dot with a dash, never a freeze or a missed day */
.home .ss-day.rest .ss-dot { border: 1px dashed var(--hairline); background: transparent; }
.home .ss-day.rest .ss-dot::after { content: ""; width: 8px; height: 2px; border-radius: 2px; background: var(--muted); }

/* Space cats, part 2: every level is a planet (leo, Oct 12: a space look in every part of learning;
   docs/plan/2026-10-12-space-planets.md). Night theme only, nothing for high contrast, no motion. A planet is a lit sphere
   in the level colour; the learner's own level is the brightest and has a dashed orbit ring. The label sits on the
   middle of the sphere, which keeps the plain level colour, so its contrast is the same as the old chip's. */
:where(html:not(.a11y-contrast)):root[data-theme="dark"] :is(.home .next-card .lv-chip, .home .level-card .lv-chip.big, .home .lh-text .lv-chip.big, .home .lv-go[aria-current="true"]) {
  border-radius: 50%; color: var(--bg);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--lv) 50%, #fff), var(--lv) 30%, var(--lv) 74%, color-mix(in srgb, var(--lv) 55%, #000) 100%); /* plain colour under the label */
  box-shadow: inset -5px -6px 10px rgb(0 0 0 / .35), 0 0 22px -4px var(--lv);
}
:where(html:not(.a11y-contrast)):root[data-theme="dark"] :is(.home .next-card .lv-chip, .home .lv-go[aria-current="true"]) {
  outline: 1.5px dashed color-mix(in srgb, var(--lv) 70%, transparent); outline-offset: 4px;
}
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .lh-text .lv-chip.big { width: 44px; height: 44px; min-width: 0; padding: 0; }
/* the level row: five small planets; the ones further out are darker, like planets away from the sun */
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .lv-go {
  justify-self: center; width: min(100%, 56px); aspect-ratio: 1; min-height: 44px; padding: 0; border-radius: 50%;
  border-color: color-mix(in srgb, var(--lv) 50%, transparent);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--lv) 46%, var(--bg)), color-mix(in srgb, var(--lv) 18%, var(--bg)) 64%);
  box-shadow: inset -5px -6px 10px rgb(0 0 0 / .45);
}
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .lv-go:hover:not([aria-current="true"]) {
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--lv) 60%, var(--bg)), color-mix(in srgb, var(--lv) 26%, var(--bg)) 64%);
}
:where(html:not(.a11y-contrast)):root[data-theme="dark"] .home .lv-go[aria-current="true"] { border-color: transparent; }

/* Arabic interface: the multi-line titles get taller lines, since Arabic marks and tails reach into the next line at
   the Latin heights (1.04 to 1.25) */
html:lang(ar) .home .bx-hero .hero-banner h1 { line-height: 1.3; }
html:lang(ar) .bx-card strong { line-height: 1.35; }
html:lang(ar) .bx-mini strong { line-height: 1.4; }

/* the first-week card's small "Hide" link is 22 px tall; it takes taps 11 px above and below, a 44 px target */
.home [data-fw-hide] { position: relative; }
.home [data-fw-hide]::after { content: ""; position: absolute; inset: -11px -6px; }
