/* Aleph polish layer (first-minute pass, 2026-11-10). Loaded last. Applies the tokens in tokens.css to the shared pieces so
   every screen feels like one app: buttons, cards, headings, the header with its streak and goal chips, the tab bar with
   icons, the first-run screens (body.ob-player), Rimon in the page, the lesson path and the lesson finish.
   Additive only: nothing here removes a feature; delete this file and its <link> to get the previous look back. */

/* ---------- 1. Buttons: one chunky, pressable style everywhere ---------- */
:root .btn, :root .alef-btn {
  --btn-bg: var(--accent); --btn-fg: var(--accent-fg);
  --btn-lip-c: color-mix(in srgb, var(--btn-bg) 62%, #000);
  border-radius: var(--r-md); border: 2px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg);
  font-weight: var(--fw-heavy); letter-spacing: .01em; box-shadow: 0 var(--lip) 0 var(--btn-lip-c);
  margin-block-end: var(--lip); transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), filter var(--dur-1);
}
:root .btn:hover, :root .alef-btn:hover { filter: brightness(1.06); }
:root .btn:active, :root .alef-btn:active { transform: translateY(var(--lip)); box-shadow: 0 0 0 var(--btn-lip-c); }
:root .btn.secondary, :root .alef-btn.alef-btn-secondary, :root .alef-btn-secondary {
  background: transparent; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  --btn-lip-c: color-mix(in srgb, var(--accent) 35%, transparent);
}
:root .btn[disabled], :root .alef-btn[disabled] { filter: grayscale(.6) opacity(.55); box-shadow: none; transform: none; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { :root .btn:active, :root .alef-btn:active { transform: none; } }

/* ---------- 2. Headings and cards ---------- */
main h1 { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); letter-spacing: -.01em; line-height: var(--lh-tight); }
main h2 { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
:root .card { border-radius: var(--r-lg); }

/* ---------- 3. Header: brand on the left, streak and daily goal on the right ---------- */
.site-header { justify-content: space-between; gap: var(--s-3); position: sticky; inset-block-start: 0; z-index: 40; }
/* Anything scrolled into view (follow mode in the service, a focused heading) lands below the sticky header, not under it (25 Nov 2026 audit). */
html { scroll-padding-block-start: 4.5rem; }
.statbar { display: flex; align-items: center; gap: var(--s-2); }
.statbar[hidden] { display: none; }
.stat-chip {
  display: inline-flex; align-items: center; gap: .35rem; min-block-size: 44px; padding: 0 .55rem; border-radius: var(--r-pill);
  color: var(--gold-400); text-decoration: none; font-weight: var(--fw-heavy); font-size: var(--fs-md); font-variant-numeric: tabular-nums;
}
.stat-chip:hover { background: rgba(246, 241, 231, .08); }
.stat-chip:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 1px; }
.stat-flame {
  inline-size: 1.35rem; block-size: 1.35rem; background: rgba(246, 241, 231, .38);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12.6 1.8c.9 3.7 5.9 6.3 5.9 12.1A6.5 6.5 0 0 1 5.5 14c0-2.7 1.3-4.6 2.9-6 .1 1.9.9 3.2 2.3 3.8-.4-3.6.4-7.2 1.9-10z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12.6 1.8c.9 3.7 5.9 6.3 5.9 12.1A6.5 6.5 0 0 1 5.5 14c0-2.7 1.3-4.6 2.9-6 .1 1.9.9 3.2 2.3 3.8-.4-3.6.4-7.2 1.9-10z'/></svg>") center / contain no-repeat;
}
.stat-streak { color: rgba(246, 241, 231, .6); }
.stat-streak.is-lit { color: var(--flame); }
.stat-streak.is-lit .stat-flame { background: linear-gradient(180deg, #ffd166, var(--flame) 55%, var(--flame-deep)); }
.stat-streak.is-rest .stat-flame { background: #9fc7e8; }
.stat-streak.is-pop .stat-flame { animation: stat-pop var(--dur-4) var(--ease-spring); }
@keyframes stat-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.35) rotate(-6deg); } 100% { transform: scale(1); } }
.stat-ring {
  --p: 0; inline-size: 1.35rem; block-size: 1.35rem; border-radius: 50%;
  background: radial-gradient(closest-side, #123d2a 62%, transparent 64% 100%), conic-gradient(var(--gold-500) calc(var(--p) * 1%), rgba(246, 241, 231, .2) 0);
}
.stat-goal { --p: 0; }
.stat-goal .stat-ring { --p: inherit; }
.stat-goal.is-met .stat-ring { background: radial-gradient(closest-side, var(--gold-500) 62%, transparent 64% 100%), conic-gradient(var(--gold-500) 100%, transparent 0); }
@media (prefers-reduced-motion: reduce) { .stat-streak.is-pop .stat-flame { animation: none; } }

/* ---------- 4. Teachers band takes the page colours ---------- */
.companions { background: transparent; }
.companions .comp-names { color: var(--muted); opacity: 1; }

/* ---------- 5. Tab bar: icons, equal widths, a clear current tab ---------- */
.nav-ico {
  display: block; inline-size: 1.5rem; block-size: 1.5rem; margin-inline: auto; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.nav-ico-learn { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M2.5 5.5C5 4 8.5 4 12 6c3.5-2 7-2 9.5-.5v13c-2.5-1.5-6-1.5-9.5.5-3.5-2-7-2-9.5-.5z'/><path d='M12 6v13'/></svg>"); }
.nav-ico-read { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 3h10a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6'/><path d='M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2'/><path d='M9 8h6M9 12h6M9 16h4'/></svg>"); }
.nav-ico-speak { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 5h16v11H9l-5 4z'/></svg>"); }
.nav-ico-progress { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><path d='M5 20v-7M12 20V5M19 20v-10'/></svg>"); }
.nav-ico-more { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='5' cy='12' r='2.2'/><circle cx='12' cy='12' r='2.2'/><circle cx='19' cy='12' r='2.2'/></svg>"); }
.site-nav .nav-label { display: block; font-weight: var(--fw-bold); }
@media (max-width: 719.98px) {
  .site-nav { background: var(--green-950); border-block-start: 1px solid rgba(217, 164, 65, .45); box-shadow: 0 -6px 18px rgba(0, 0, 0, .3); }
  :root[data-theme="light"] .site-nav { background: #fbf6e8; }
  .site-nav > ul#nav:has(> li:nth-child(2):last-child) { flex: 2 2 0; }
  .site-nav > ul#nav:has(> li:nth-child(3):last-child) { flex: 3 3 0; }
  .site-nav > ul#nav:has(> li:nth-child(4):last-child) { flex: 4 4 0; }
  .site-nav > .more-btn { flex: 1 1 0; min-inline-size: 0; }
  .site-nav a, .more-btn { gap: 2px; color: rgba(246, 241, 231, .72); background: transparent; }
  :root[data-theme="light"] .site-nav a, :root[data-theme="light"] .more-btn { color: #3d5640; }
  .site-nav a[aria-current="page"], .site-nav a[aria-current="true"], .more-btn[data-current], .more-btn[aria-expanded="true"] {
    background: transparent; color: var(--gold-400); box-shadow: none;
  }
  :root[data-theme="light"] .site-nav a[aria-current="page"], :root[data-theme="light"] .site-nav a[aria-current="true"] { background: transparent; color: #123d2a; box-shadow: none; }
  .site-nav a[aria-current] .nav-ico, .more-btn[data-current] .nav-ico, .more-btn[aria-expanded="true"] .nav-ico {
    background: currentColor; outline: 0; box-shadow: none;
  }
  .site-nav a[aria-current]::before, .more-btn[data-current]::before {
    content: ""; position: absolute; inset-block-start: 0; inset-inline: 22%; block-size: 3px; border-radius: 0 0 3px 3px; background: var(--gold-500);
  }
  .site-nav a, .more-btn { position: relative; }
  .site-nav .nav-he { font-size: .9em; opacity: .8; }
}
@media (forced-colors: active) { .nav-ico, .stat-flame, .stat-ring { forced-color-adjust: none; background: CanvasText; } }

/* ---------- 6. Rimon in the page, with a speech bubble ---------- */
.rimon-inline {
  --rimon-size: 112px; display: inline-block; flex: none; inline-size: var(--rimon-size); block-size: var(--rimon-size);
  background-size: 400% 300%; background-repeat: no-repeat; background-position: 0 0;
}
.rimon-say { display: flex; align-items: center; gap: var(--s-3); margin-block: var(--s-2) var(--s-4); }
.rimon-say-bubble {
  position: relative; margin: 0; padding: var(--s-3) var(--s-4); border: 2px solid rgba(217, 164, 65, .75); border-radius: var(--r-lg);
  background: var(--cream); color: var(--ink); font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1.35;
  box-shadow: var(--shadow-1); animation: rimon-say-in var(--dur-3) var(--ease-spring) both; transform-origin: 0 50%;
}
.rimon-say-bubble::before {
  content: ""; position: absolute; inset-inline-start: -9px; inset-block-start: 50%; inline-size: 14px; block-size: 14px; margin-block-start: -7px;
  background: var(--cream); border-inline-start: 2px solid rgba(217, 164, 65, .75); border-block-end: 2px solid rgba(217, 164, 65, .75); transform: rotate(45deg);
}
[dir="rtl"] .rimon-say-bubble::before { transform: rotate(-135deg); }
@keyframes rimon-say-in { from { opacity: 0; transform: scale(.85) translateX(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rimon-say-bubble { animation: none; } }
:root[data-calm] .rimon-say-bubble { animation: none; }

/* ---------- 7. First run (#/welcome): one question per screen, full screen like the lesson player ---------- */
body.ob-player {
  background:
    radial-gradient(120% 50% at 50% -10%, rgba(217, 164, 65, .18), rgba(217, 164, 65, 0) 60%),
    linear-gradient(180deg, #0f2413 0%, #14301b 60%, #183a20 100%);
  background-attachment: fixed; color: var(--cream);
}
body.ob-player .site-header, body.ob-player .site-nav, body.ob-player .companions, body.ob-player .sound-bar,
body.ob-player .fine-print, body.ob-player #game-music, body.ob-player .rimon-corner, body.ob-player .rimon-bubble,
body.ob-player .rimon-restore { display: none !important; }
body.ob-player main { max-inline-size: var(--measure-app); margin-inline: auto; padding: 0 var(--s-4) calc(12rem + env(safe-area-inset-bottom)); } /* room for Continue + Start now stacked in the foot */
.card.onboarding.ob-v2 { background: transparent; border: 0; box-shadow: none; padding: 0; overflow: visible; border-radius: 0; color: var(--cream); }
.card.onboarding.ob-v2::before { display: none; }
.ob-top {
  position: sticky; inset-block-start: 0; z-index: 5; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) 0; background: linear-gradient(180deg, #0f2413 70%, rgba(15, 36, 19, 0));
}
.ob-top-slot { display: contents; }
.ob-back {
  flex: none; display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 50%;
  background: transparent; border: 0; color: var(--cream); font: 700 2rem/1 var(--font-ui); text-decoration: none; cursor: pointer;
}
.ob-back:hover { background: rgba(246, 241, 231, .08); }
.ob-back:focus-visible { outline: 3px solid var(--gold-400); }
.ob-close { font-size: 1.8rem; }
.ob-meter { flex: 1; block-size: 16px; border-radius: var(--r-pill); background: rgba(246, 241, 231, .14); overflow: hidden; }
.ob-meter-fill {
  display: block; block-size: 100%; inline-size: 0; border-radius: inherit;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), inset 0 3px 0 rgba(255, 255, 255, .25);
  transition: inline-size var(--dur-3) var(--ease-out);
}
.card.onboarding.ob-v2 .ob-title { font-size: var(--fs-sm); font-weight: var(--fw-heavy); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-400); margin: var(--s-2) 0 0; }
.card.onboarding.ob-v2 .ob-title::after { display: none; }
.card.onboarding.ob-v2 .ob-title .he { text-transform: none; letter-spacing: 0; }
.ob-v2 .ob-lede { display: none; } /* Rimon's bubble says it */
.ob-v2 .ob-page { display: none; }
.ob-v2 form[data-page="level"] .ob-page[data-page="level"], .ob-v2 form[data-page="goal"] .ob-page[data-page="goal"], .ob-v2 form[data-page="daily"] .ob-page[data-page="daily"] { display: block; animation: ob-page-in var(--dur-2) var(--ease-out); }
@keyframes ob-page-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.ob-v2 .ob-foot-page { display: none; }
.ob-v2 form[data-page="level"] .ob-foot-page[data-page="level"], .ob-v2 form[data-page="goal"] .ob-foot-page[data-page="goal"], .ob-v2 form[data-page="daily"] .ob-foot-page[data-page="daily"] { display: flex; flex-direction: column; gap: var(--s-2); }
/* the question is in Rimon's bubble for sighted learners; the legend stays for screen readers */
.ob-v2 .field legend { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ob-v2 .field > p.muted { margin: 0 0 var(--s-3); font-size: var(--fs-sm); color: var(--cream-dim); }
.ob-v2 .muted { color: var(--cream-dim); }
.ob-v2 a { color: var(--gold-400); }
/* option cards: the radio is kept (keyboard, screen readers) but the whole card shows the choice */
.ob-v2 .opt {
  position: relative; display: flex; align-items: center; gap: var(--s-3); margin-block: var(--s-2); padding: var(--s-3) var(--s-4);
  border: 2px solid rgba(246, 241, 231, .2); border-block-end-width: var(--lip); border-radius: var(--r-lg);
  background: rgba(246, 241, 231, .05); color: var(--cream); cursor: pointer;
  transition: border-color var(--dur-1), background var(--dur-1), transform var(--dur-1);
}
.ob-v2 .opt:hover { background: rgba(246, 241, 231, .09); }
.ob-v2 .opt:active { transform: translateY(2px); border-block-end-width: 2px; margin-block-end: calc(var(--s-2) + 2px); }
.ob-v2 .opt input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; margin: 0; }
.ob-v2 .opt:has(input:focus-visible) { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.ob-v2 .opt:has(input:checked) { border-color: var(--gold-500); background: rgba(217, 164, 65, .16); box-shadow: none; }
.ob-v2 .opt strong { display: block; font-size: var(--fs-md); line-height: 1.3; }
.ob-v2 .opt .block { font-size: var(--fs-sm); color: var(--cream-dim); margin-block-start: 2px; }
.ob-v2 .opt-block { align-items: center; padding-block: var(--s-3); }
.ob-v2 .opt:has(input[type="checkbox"])::after {
  content: ""; flex: none; order: 3; margin-inline-start: auto; inline-size: 1.5rem; block-size: 1.5rem; border-radius: 6px; border: 2px solid rgba(246, 241, 231, .4);
}
.ob-v2 .opt:has(input[type="checkbox"]:checked)::after { background: var(--gold-500); border-color: var(--gold-500); box-shadow: inset 0 0 0 3px #14301b; }
/* leads: signal bars for reading level, icons for goals, minutes badge for the daily goal */
.ob-bars { flex: none; display: inline-flex; align-items: flex-end; gap: 3px; inline-size: 2.4rem; block-size: 1.6rem; }
.ob-bars i { flex: 1; border-radius: 2px; background: rgba(246, 241, 231, .2); }
.ob-bars i:nth-child(1) { block-size: 20%; } .ob-bars i:nth-child(2) { block-size: 40%; } .ob-bars i:nth-child(3) { block-size: 60%; } .ob-bars i:nth-child(4) { block-size: 80%; } .ob-bars i:nth-child(5) { block-size: 100%; }
.ob-bars[data-n="1"] i:nth-child(-n+1), .ob-bars[data-n="2"] i:nth-child(-n+2), .ob-bars[data-n="3"] i:nth-child(-n+3), .ob-bars[data-n="4"] i:nth-child(-n+4), .ob-bars[data-n="5"] i:nth-child(-n+5) { background: var(--gold-500); }
.ob-ico { flex: none; inline-size: 2.4rem; block-size: 2.4rem; border-radius: var(--r-sm); background: rgba(217, 164, 65, .18); position: relative; }
.ob-ico::after { content: ""; position: absolute; inset: 22%; background: var(--gold-400); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.ob-ico-read { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M2.5 5.5C5 4 8.5 4 12 6c3.5-2 7-2 9.5-.5v13c-2.5-1.5-6-1.5-9.5.5-3.5-2-7-2-9.5-.5z'/><path d='M12 6v13'/></svg>"); }
.ob-ico-israel { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 5h16v11H9l-5 4z'/><path d='M8 10h8'/></svg>"); }
.ob-ico-both { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l2.6 5.6 6 .7-4.5 4.1 1.2 6L12 16.5 6.7 19.4l1.2-6L3.4 9.3l6-.7z'/></svg>"); }
.ob-min {
  flex: none; display: inline-grid; place-items: center; inline-size: 2.4rem; block-size: 2.4rem; border-radius: 50%;
  background: rgba(217, 164, 65, .18); color: var(--gold-400); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums;
}
/* bottom bar: one big button, always in reach */
.ob-v2 .ob-foot {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 20; display: flex; justify-content: center;
  padding: var(--s-4) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, #183a20 72%, rgba(24, 58, 32, 0)); border-block-start: 0;
}
.ob-v2 .ob-foot > *, .ob-v2 .ob-foot .row { inline-size: 100%; max-inline-size: var(--measure-app); }
.ob-v2 .ob-foot .row { display: flex; flex-direction: column; gap: var(--s-2); }
.ob-v2 .btn { --btn-bg: var(--gold-500); --btn-fg: #13301a; --btn-lip-c: #a97b25; border-color: var(--gold-500); background: var(--gold-500); color: #13301a; }
.ob-v2 .btn.secondary { background: transparent; color: var(--gold-400); border-color: rgba(217, 164, 65, .6); --btn-lip-c: rgba(0, 0, 0, .25); }
.ob-v2 .ob-cta { inline-size: 100%; min-block-size: 54px; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.card.onboarding.ob-v2 .ob-cta.is-waiting, .card.onboarding.ob-v2 .ob-cta.is-waiting:hover { background: #3a4f3d; border-color: #3a4f3d; color: rgba(246, 241, 231, .6); box-shadow: 0 var(--lip) 0 #26372a; }
/* one thing at a time: the running summary shows on the first and last question, the privacy line on the first only */
.ob-v2 form[data-page="goal"] .ob-next { display: none; }
.ob-v2:not([data-page="level"]) .ob-fine { display: none; }
.ob-v2 .ob-next { margin-block: var(--s-4) 0; padding: var(--s-3) var(--s-4); border-inline-start: 3px solid var(--gold-500); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: rgba(246, 241, 231, .05); font-size: var(--fs-sm); }
.ob-v2 .ob-status { min-block-size: 0; margin: var(--s-3) 0 0; font-size: var(--fs-sm); color: var(--cream-dim); }
.ob-v2 .ob-status:empty { display: none; }
.ob-v2 .ob-fine { font-size: var(--fs-xs); margin-block-start: var(--s-5); }
.ob-v2 details.ob-more { margin-block: var(--s-4); padding: var(--s-2) var(--s-4); border: 1px solid rgba(217, 164, 65, .35); border-radius: var(--r-md); }
.ob-v2 .ob-sound-box { margin-block: var(--s-3); }
.ob-v2 .ob-sound { font-size: var(--fs-sm); }
.ob-v2 .ob-skipnow { font-size: var(--fs-sm); }
/* plan screen: the week reads as a short timeline */
.ob-v2 .ob-summary { font-size: var(--fs-sm); color: var(--cream-dim); }
.ob-v2 .card.ob-plan { background: rgba(246, 241, 231, .05); border: 1px solid rgba(217, 164, 65, .4); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); color: var(--cream); }
.ob-v2 .ob-plan h2 { color: var(--gold-400); }
.ob-v2 .ob-plan .draft-flag { background: transparent; color: var(--cream-dim); border-inline-start-color: rgba(217, 164, 65, .6); font-weight: var(--fw-regular); font-size: var(--fs-xs); padding: var(--s-1) var(--s-3); }
.ob-v2 ol.ob-days { list-style: none; margin: var(--s-3) 0 0; padding: 0; position: relative; }
.ob-v2 ol.ob-days::before { content: ""; position: absolute; inset-inline-start: .7rem; inset-block: .9rem; border-inline-start: 2px dashed rgba(217, 164, 65, .45); }
.ob-v2 ol.ob-days > li { position: relative; padding-inline-start: 2.4rem; margin-block: var(--s-3); }
.ob-v2 ol.ob-days > li::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .1rem; inline-size: 1.45rem; block-size: 1.45rem; border-radius: 50%;
  background: #1c4023; border: 2px solid rgba(217, 164, 65, .7);
}
.ob-v2 ol.ob-days > li:first-child::before { background: var(--gold-500); box-shadow: 0 0 0 5px rgba(217, 164, 65, .25); }
.ob-v2 ol.ob-days ul { list-style: none; margin: .15rem 0 0; padding: 0; font-size: var(--fs-sm); }
.ob-v2 .ob-changes { margin-block: var(--s-5); }
.ob-v2 .ob-changes .btn { font-size: var(--fs-sm); }
.card.onboarding.ob-v2 > h2, .ob-v2 .ob-body > h2 { color: var(--gold-400); }
@media (prefers-reduced-motion: reduce) { .ob-v2 .ob-page { animation: none !important; } .ob-meter-fill { transition: none; } }
@media (min-width: 720px) { .rimon-say .rimon-inline { --rimon-size: 132px !important; } }

/* ---------- 8. Lesson path: a winding trail of round steps on every screen size ---------- */
.alef-lesson-list::before {
  content: ""; position: absolute; inset-block: 1.6rem; inset-inline-start: 2.1rem; border-inline-start: 4px dotted color-mix(in srgb, var(--accent) 45%, transparent);
}
.alef-lesson::before { inline-size: 2.75rem; block-size: 2.75rem; inset-inline-start: .55rem; }
.alef-lesson { padding-inline-start: 4rem; }
@media (max-width: 699.98px) {
  .alef-lesson:nth-child(4n+2) { margin-inline-start: 1rem; } .alef-lesson:nth-child(4n+3) { margin-inline-start: 2rem; } .alef-lesson:nth-child(4n+4) { margin-inline-start: 1rem; }
}
.alef-lesson-available { animation: path-here 2.4s var(--ease-out) infinite; }
@keyframes path-here { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); } }
.alef-lesson-available::after {
  content: "Start"; position: absolute; inset-block-start: -.85rem; inset-inline-start: .2rem; padding: .1rem .55rem; border-radius: var(--r-sm);
  background: var(--gold-500); color: #13301a; font-size: var(--fs-xs); font-weight: var(--fw-heavy); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 2px 0 #a97b25;
}
@media (prefers-reduced-motion: reduce) { .alef-lesson-available { animation: none; } }
:root[data-calm] .alef-lesson-available { animation: none; }

/* ---------- 9. Lesson finish: Rimon cheers and the streak flame ---------- */
.fd-cheer { display: grid; justify-items: center; gap: var(--s-2); margin-block: var(--s-2) var(--s-3); }
.fd-cheer .rimon-inline { --rimon-size: 148px; }
.fd-flame {
  display: flex; align-items: center; gap: var(--s-4); margin-block: var(--s-4); padding: var(--s-4) var(--s-5);
  border-radius: var(--r-lg); border: 2px solid rgba(255, 154, 60, .55); background: rgba(255, 154, 60, .08); text-align: start;
}
.fd-flame-ico {
  flex: none; position: relative; inline-size: 3.6rem; block-size: 3.6rem; background: rgba(246, 241, 231, .25);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12.6 1.8c.9 3.7 5.9 6.3 5.9 12.1A6.5 6.5 0 0 1 5.5 14c0-2.7 1.3-4.6 2.9-6 .1 1.9.9 3.2 2.3 3.8-.4-3.6.4-7.2 1.9-10z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12.6 1.8c.9 3.7 5.9 6.3 5.9 12.1A6.5 6.5 0 0 1 5.5 14c0-2.7 1.3-4.6 2.9-6 .1 1.9.9 3.2 2.3 3.8-.4-3.6.4-7.2 1.9-10z'/></svg>") center / contain no-repeat;
}
.fd-flame-ico::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; block-size: calc(var(--fill, 0) * 1%); background: linear-gradient(180deg, #ffd166, var(--flame) 55%, var(--flame-deep)); transition: block-size var(--dur-4) var(--ease-out); }
.fd-flame.is-lit { border-color: var(--flame); background: rgba(255, 154, 60, .14); }
.fd-flame.is-lit .fd-flame-ico { animation: stat-pop var(--dur-4) var(--ease-spring) .2s both; }
.fd-flame-n { display: block; font-size: var(--fs-2xl); font-weight: var(--fw-heavy); color: var(--flame); line-height: 1.1; }
.fd-flame p { margin: 0; }
.fd-flame .fd-flame-sub { color: var(--cream-dim); font-size: var(--fs-sm); }
@media (prefers-reduced-motion: reduce) { .fd-flame.is-lit .fd-flame-ico { animation: none; } .fd-flame-ico::after { transition: none; } }
:root[data-calm] .fd-flame { display: none; }

/* ---------- 10. First lesson: the new letter, large, before anything else ---------- */
.fd-hero-glyph { display: grid; place-items: center; margin-block: var(--s-2); }
.alef-firstday .fd-hero-glyph .alef-he, .alef-firstday .fd-hero-glyph [lang="he"], .fd-hero-glyph .alef-he { font-size: clamp(5.5rem, 26vw, 8.5rem); line-height: 1.05; color: var(--cream); text-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.fd-hero-glyph { animation: fd-glyph-in var(--dur-3) var(--ease-spring) both; }
@keyframes fd-glyph-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fd-hero-glyph { animation: none; } }

/* ---------- 11. "Today counts" toast (src/shell/statbar.js): once, when the day lights anywhere in the app ---------- */
.stat-toast {
  position: fixed; inset-block-start: calc(env(safe-area-inset-top) + 3.6rem); inset-inline: 0; margin-inline: auto; z-index: 70; inline-size: max-content; max-inline-size: calc(100vw - 2rem);
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-radius: var(--r-pill);
  background: var(--cream); color: var(--ink); border: 2px solid var(--flame); box-shadow: var(--shadow-2); font-size: var(--fs-sm);
  animation: stat-toast-in var(--dur-3) var(--ease-spring) both;
}
.stat-toast .stat-flame { inline-size: 1.6rem; block-size: 1.6rem; background: linear-gradient(180deg, #ffd166, var(--flame) 55%, var(--flame-deep)); }
@keyframes stat-toast-in { from { opacity: 0; transform: translateY(-12px) scale(.94); } to { opacity: 1; transform: none; } }
/* locked stops on the trail: dark green, not the light-theme grey, so they sit quietly on the green page */
:root:not([data-theme="light"]):not([data-theme^="contrast"]) .alef-lesson-locked::before { background: #24402b; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35); border: 2px solid rgba(217, 164, 65, .35); }
.alef-summary .rimon-inline { --rimon-size: 132px; position: relative; z-index: 1; }
.alef-summary .fd-flame { color: inherit; }
:root:not([data-theme="light"]):not([data-theme^="contrast"]) .alef-celebrate-cheer { color: var(--gold-400); }

/* ---------- 12. Round 3: the path reads as stops, not a stack of cards ---------- */
/* Only the next lesson is a card. Finished and locked lessons are round stops on the dotted trail with their title beside them;
   a locked stop shows a lock and no dead Start button (the button stays in the page, disabled, for screen readers). */
.alef-lesson:not(.alef-lesson-available) { background: transparent; border-color: transparent; box-shadow: none; }
.alef-lesson:not(.alef-lesson-available) .alef-level { display: none; }
.alef-lesson-locked .alef-btn[disabled] { display: none; }
.alef-lesson-locked > strong { color: var(--muted); font-weight: var(--fw-medium); }
.alef-lesson::before { inline-size: 3.2rem; block-size: 3.2rem; inset-inline-start: .4rem; }
.alef-lesson { padding-inline-start: 4.4rem; min-block-size: 4rem; }
.alef-lesson-list::before { inset-inline-start: 2rem; }
:root .alef-lesson-done::before {
  content: ""; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313301a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center / 52% no-repeat, var(--gold-500);
  box-shadow: inset 0 -5px 0 #a97b25;
}
:root .alef-lesson-available::before {
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23fff8e6' d='M12 2.8l2.7 5.6 6.1.8-4.5 4.2 1.1 6.1L12 16.6l-5.4 2.9 1.1-6.1-4.5-4.2 6.1-.8z'/></svg>") center / 55% no-repeat, var(--gold-500);
  box-shadow: inset 0 -5px 0 #a97b25, 0 0 0 6px rgba(217, 164, 65, .3);
}
:root:not([data-theme="light"]):not([data-theme^="contrast"]) .alef-lesson-locked::before {
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f9a7f' stroke-width='2.4' stroke-linecap='round'><rect x='5.5' y='11' width='13' height='9' rx='2'/><path d='M8.5 11V8a3.5 3.5 0 0 1 7 0v3'/></svg>") center / 46% no-repeat, #24402b;
  border: 0; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .35);
}
:root[data-theme="light"] .alef-lesson-locked::before {
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857f70' stroke-width='2.4' stroke-linecap='round'><rect x='5.5' y='11' width='13' height='9' rx='2'/><path d='M8.5 11V8a3.5 3.5 0 0 1 7 0v3'/></svg>") center / 46% no-repeat, #d9d4c7;
}
@media (forced-colors: active) { .alef-lesson::before { forced-color-adjust: none; border: 2px solid CanvasText; } }

/* setup: room under the last option for the two pinned buttons (Continue and the quick start) */
body.ob-player main { padding-block-end: calc(12rem + env(safe-area-inset-bottom)); scroll-padding-block-end: 12rem; }
html:has(body.ob-player) { scroll-padding-block-end: 12rem; }
.alef-lesson-done, .alef-lesson-available { cursor: pointer; }

/* ---------- 13. Opening prayer: the Hebrew in gold leaf (real text, never an image) ----------
   The prayer lines stay live text in Frank Ruhl Libre, so every letter and vowel mark is exact and can be read aloud by a screen
   reader. The gold is a gradient clipped to the letters; it brightens once as the page opens (dawn), then a slow sheen of light
   crosses the words every 9 s. Reduced motion and calm mode: steady gold, no sheen (the global rules in app.css stop animations).
   Forced colours and old browsers: plain gold-coloured text (the color line below is the fallback). Contrast: the darkest stop
   (#d9a441) is 6.3:1 on the house green #16301c and 4.5:1 on the lighter centre #1f4a2a. */
.prayer-veil { background: radial-gradient(120% 80% at 50% 38%, #1f4a2a 0%, #16301c 55%, #0d1f12 100%); }
.prayer-he {
  color: #e8c97a;
  background: linear-gradient(100deg, #d9a441 0%, #f3dfa6 22%, #e0b052 38%, #fff4d0 50%, #e0b052 62%, #f3dfa6 78%, #d9a441 100%);
  background-size: 250% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0));
  animation: prayer-gold-dawn 2.6s var(--ease-out) .25s both, prayer-gold-sheen 9s ease-in-out 3s infinite;
}
.prayer-tr { color: #e8c97a; }
@keyframes prayer-gold-dawn {
  from { filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)) brightness(.7); opacity: .4; }
  60% { filter: drop-shadow(0 0 18px rgba(243, 223, 166, .55)) brightness(1.15); opacity: 1; }
  to { filter: drop-shadow(0 0 10px rgba(217, 164, 65, .35)) brightness(1); opacity: 1; }
}
@keyframes prayer-gold-sheen { 0%, 20% { background-position: 100% 0; } 70%, 100% { background-position: 0% 0; } }
@media (prefers-reduced-motion: reduce) { .prayer-he { animation: none !important; filter: drop-shadow(0 0 8px rgba(217, 164, 65, .3)); background-position: 50% 0; } }
:root[data-calm] .prayer-he { animation: none !important; background-position: 50% 0; }
@media (forced-colors: active) { .prayer-he { -webkit-text-fill-color: CanvasText; background: none; filter: none; } }
/* setup: the quick start is a quiet text link under Continue, so one big button leads */
.ob-v2 .ob-quick-link { background: none; border: 0; padding: var(--s-2); min-block-size: 44px; color: var(--gold-400); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ob-v2 .ob-quick-link:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; border-radius: var(--r-sm); }
/* Learn card: the animated Rimon keeps the old round frame */
.alef-continue .rimon-inline.alef-continue-rimon { --rimon-size: 96px; background-color: #fbf3dc; background-size: 400% 300%; }

/* ---------- 14. Round 4: accessibility gate fixes ---------- */
/* reflow at 200% zoom (195 px wide): the header wraps instead of pushing the page sideways; Rimon stacks above his bubble */
.site-header { flex-wrap: wrap; row-gap: 0; }
@media (max-width: 300px) {
  .statbar { margin-inline-start: auto; }
  .stat-chip { padding-inline: .3rem; font-size: var(--fs-sm); }
  .rimon-say { flex-direction: column; align-items: flex-start; }
  .rimon-say .rimon-inline { --rimon-size: 72px !important; }
  .rimon-say-bubble::before { display: none; }
}
/* memory card on dark green: the primary button text follows the accent pair (white on gold failed contrast) */
:root .mc .mc-btn.primary { color: var(--accent-fg); }

/* ---------- 15. Round 5: Progress opens with the header's two numbers, large ---------- */
.pg-hero { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block: var(--s-2) var(--s-4); }
.pg-hero > div { flex: 1 1 9rem; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pg-hero > div > :first-child { grid-row: 1 / 3; }
.pg-hero strong { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); line-height: 1; font-variant-numeric: tabular-nums; }
.pg-hero span:last-child { font-size: var(--fs-sm); color: var(--muted); }
.pg-hero .stat-flame { inline-size: 2.4rem; block-size: 2.4rem; background: color-mix(in srgb, var(--fg) 30%, transparent); }
.pg-hero-flame.is-lit { border-color: var(--flame); }
.pg-hero-flame.is-lit .stat-flame { background: linear-gradient(180deg, #ffd166, var(--flame) 55%, var(--flame-deep)); }
.pg-hero-flame.is-lit strong { color: var(--flame); }
.pg-hero-ring { --p: inherit; inline-size: 2.6rem; block-size: 2.6rem; border-radius: 50%;
  background: radial-gradient(closest-side, var(--card) 64%, transparent 66% 100%), conic-gradient(var(--gold-500) calc(var(--p) * 1%), color-mix(in srgb, var(--fg) 15%, transparent) 0); }
.pg-hero-goal { --p: 0; }
/* a new badge: the same toast, gold edge and a medal mark */
.stat-toast-badge { border-color: var(--gold-500); }
.stat-toast-badge a { color: var(--green-700); font-weight: var(--fw-heavy); }
.stat-badge-ico { inline-size: 1.6rem; block-size: 1.6rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff4d0, var(--gold-500) 55%, #a8741f); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.alef-lesson-locked { cursor: pointer; }
.alef-locked-note { flex-basis: 100%; margin: var(--s-1) 0 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 10%, transparent); font-size: var(--fs-sm); }

/* 16. One Rimon per screen: the corner Rimon steps aside when the page draws its own; on phones his bubble ducks with him */
.rimon-corner.rimon-yield{display:none}
@media(max-width:600px){body.rimon-peeking .rimon-bubble{display:none}}

/* 17. Path stop: "Test out" is a quiet text link under Start, so a beginner's first tap is the lesson, not the skip (it stays 44 px tall) */
:root .alef-lesson .alef-btn.alef-btn-secondary { background: none; border: 0; box-shadow: none; transform: none; padding: var(--s-2); min-block-size: 44px; color: var(--accent); font-size: var(--fs-sm); font-weight: var(--fw-bold); text-decoration: underline; text-underline-offset: 3px; }
:root .alef-lesson .alef-btn.alef-btn-secondary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
:root[data-target-size="large"] .alef-lesson .alef-btn.alef-btn-secondary { min-block-size: var(--hit, 64px); } /* the Large button size setting reaches Test out and Locked too */

/* 18. "3 in a row!": the answer band turns gold on a run of right answers */
.alef-answer-band.is-combo { background: #fff1c2; color: #3a2700; border-block-start-color: #b8860b; }
@media (forced-colors: active) { .alef-answer-band.is-combo { border: 2px solid CanvasText; } }

/* 19. Brain Lab: room between the workout card and "Your Skills", on the spacing scale */
.lab-hero + h2 { margin-block-start: var(--s-6, 1.5rem); }

/* 20. The week strip (Progress): seven days, a flame for each day studied, a candle for Shabbat and rest days, a ring for today */
.wk-strip { flex: 1 1 100%; display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--s-1); list-style: none; margin: 0; padding: var(--s-3) var(--s-2);
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); border-radius: var(--r-lg, 16px); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.wk-day { display: grid; justify-items: center; gap: var(--s-1); }
.wk-name { font-size: var(--fs-xs, .75rem); font-weight: var(--fw-bold); color: var(--muted); }
.wk-day.is-now .wk-name { color: var(--fg); }
.wk-mark { inline-size: 1.9rem; block-size: 1.9rem; border-radius: 50%; display: block; background: color-mix(in srgb, var(--fg) 14%, transparent); }
.wk-day.is-open .wk-mark { inline-size: .55rem; block-size: .55rem; margin-block: .675rem; background: color-mix(in srgb, var(--fg) 34%, transparent); }
.wk-day.is-today .wk-mark { background: none; border: 3px solid color-mix(in srgb, var(--gold-500) 72%, var(--fg)); box-sizing: border-box; }
.wk-day.is-done .wk-mark { border-radius: 0; background: linear-gradient(180deg, #ffd166, var(--flame) 55%, var(--flame-deep)); -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12.6 1.8c.9 3.7 5.9 6.3 5.9 12.1A6.5 6.5 0 0 1 5.5 14c0-2.7 1.3-4.6 2.9-6 .1 1.9.9 3.2 2.3 3.8-.4-3.6.4-7.2 1.9-10z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12.6 1.8c.9 3.7 5.9 6.3 5.9 12.1A6.5 6.5 0 0 1 5.5 14c0-2.7 1.3-4.6 2.9-6 .1 1.9.9 3.2 2.3 3.8-.4-3.6.4-7.2 1.9-10z'/></svg>") center / contain no-repeat; }
.wk-day.is-frozen .wk-mark { inline-size: .8rem; block-size: 1.7rem; border-radius: 3px 3px 2px 2px; background: linear-gradient(180deg, #ffd166 0 24%, #f4efe4 24%); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--fg) 55%, transparent), 0 -6px 8px -2px #ffd16688; }
@media (forced-colors: active) { .wk-mark { forced-color-adjust: none; background: CanvasText; } .wk-day.is-today .wk-mark { background: none; border-color: CanvasText; } }

/* ---------- 10. Gold coin art: tab icons and lesson stops (display-art pass, 2026-11-10) ----------
   The struck-gold coins from assets/img/icons/ (never precached; each is a ~3 KB WebP). The masked SVG icons above stay as the
   fallback for a tab with no coin yet and in forced-colours mode. Lesson stops show the lesson's first Hebrew letter as live text
   on the blank coin, so the glyph is always the real font shape (never a mirrored picture). */
.site-nav :is(.nav-ico-learn, .nav-ico-read, .nav-ico-speak, .nav-ico-progress, .nav-ico-more) {
  inline-size: 2rem; block-size: 2rem; border-radius: 50%; -webkit-mask: none; mask: none;
  background: var(--coin) center / contain no-repeat; filter: saturate(.7) brightness(.86); transition: filter var(--dur-1), transform var(--dur-1) var(--ease-out);
}
.nav-ico-learn { --coin: url("../img/icons/ICON_home_learn.112.webp"); }
.nav-ico-read { --coin: url("../img/icons/ICON_home_read.112.webp"); }
.nav-ico-speak { --coin: url("../img/icons/ICON_home_speak.112.webp"); }
.nav-ico-progress { --coin: url("../img/icons/ICON_home_progress.112.webp"); }
.nav-ico-more { --coin: url("../img/icons/ICON_home_more.112.webp"); }
.site-nav a:hover :is(.nav-ico-learn, .nav-ico-read, .nav-ico-speak, .nav-ico-progress, .nav-ico-more),
.more-btn:hover .nav-ico-more { filter: none; }
.site-nav a[aria-current] :is(.nav-ico-learn, .nav-ico-read, .nav-ico-speak, .nav-ico-progress),
.more-btn[data-current] .nav-ico-more, .more-btn[aria-expanded="true"] .nav-ico-more {
  background: var(--coin) center / contain no-repeat; filter: none; transform: scale(1.08); box-shadow: 0 0 0 2px var(--gold-400), 0 0 10px rgba(233, 194, 90, .45);
}
@media (prefers-reduced-motion: reduce) { .site-nav .nav-ico { transition: none; } .site-nav a[aria-current] .nav-ico { transform: none; } }

/* A stop with a known first letter becomes a gold coin with that letter; its state moves to a small badge (lock, tick; the
   next lesson keeps its START tag). Stops without a letter keep the star, tick and lock drawings from section 12. */
:root .alef-lesson[data-glyph]::before, :root:not([data-theme="light"]):not([data-theme^="contrast"]) .alef-lesson-locked[data-glyph]::before,
:root[data-theme="light"] .alef-lesson-locked[data-glyph]::before {
  content: attr(data-glyph); display: grid; place-items: center; padding-block-start: .15rem; border: 0;
  background: url("../img/icons/ICON_coin_blank.112.webp") center / contain no-repeat;
  font: 700 1.6rem/1 var(--font-he); color: #f3d98f; text-shadow: 0 1px 0 #5c3f0c, 0 -1px 0 rgba(255, 243, 196, .7);
  box-shadow: 0 3px 8px rgba(5, 14, 8, .45);
}
:root .alef-lesson-available[data-glyph]::before { box-shadow: 0 3px 8px rgba(5, 14, 8, .45), 0 0 0 5px rgba(233, 194, 90, .38); }
:root .alef-lesson-locked[data-glyph]::before { filter: grayscale(.8) brightness(.8); }
.alef-lesson-done[data-glyph]::after, .alef-lesson-locked[data-glyph]::after {
  content: ""; position: absolute; inset-inline-start: 2.7rem; inset-block-start: 50%; translate: 0 .55rem;
  inline-size: 1.2rem; block-size: 1.2rem; border-radius: 50%; box-shadow: 0 0 0 2px var(--green-950, #0b1a12);
}
.alef-lesson-done[data-glyph]::after {
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3d98f' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center / 62% no-repeat, #1e5a3e;
}
.alef-lesson-locked[data-glyph]::after {
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9d6c9' stroke-width='2.8' stroke-linecap='round'><rect x='5.5' y='11' width='13' height='9' rx='2'/><path d='M8.5 11V8a3.5 3.5 0 0 1 7 0v3'/></svg>") center / 62% no-repeat, #36513b;
}
@media (forced-colors: active) {
  .site-nav .nav-ico { -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; background: CanvasText; box-shadow: none; filter: none; }
  :root .alef-lesson[data-glyph]::before { background: Canvas; color: CanvasText; border: 2px solid CanvasText; text-shadow: none; filter: none; }
  .alef-lesson[data-glyph]::after { background: CanvasText; }
}

/* ---------- 11. Badge sizing and alignment (live check 2026-11-10 13:05) ----------
   - Awards: five badge pictures are 800x533 (the medal sits centred on paper); app.css `.alef-img{height:auto}` made them 64x43
     ovals. Every badge is now a fixed 64px square, the medal centred (cover crops only the empty paper at the sides).
   - Coins in flex rows: `.alef-medal,.alef-coin{margin:0 auto}` centred each coin in the row's free space, so coins in Brain Lab
     rows sat at different x positions. In rows they now sit at the start with a fixed size. */
.aw-art { inline-size: 64px; block-size: 64px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
.aw-art img.aw-badge-art { inline-size: 64px; block-size: 64px !important; height: 64px !important; max-inline-size: none; aspect-ratio: 1 / 1 !important; /* the image helper writes an inline aspect-ratio and height:auto */ object-fit: cover; object-position: 50% 50%; border-radius: 50%; }
.aw-art > svg { inline-size: 64px; block-size: 64px; display: block; }
.lab-plan li > .alef-coin, .lab-plan li > .alef-medal, .lab-game > .alef-coin, .lab-fresh-card > .alef-coin,
.lab-plan li > .lab-token, .lab-fresh-card > .lab-token { margin: 0; flex: none; }
.lab-plan li > span:not(.dot):not(.alef-coin):not(.visually-hidden) { flex: 1 1 auto; min-inline-size: 0; text-align: start; }
.alef-medal { object-fit: contain; aspect-ratio: 1 / 1; }
.wf-level-tile > .alef-medal { inline-size: 56px; block-size: 56px; }
/* Games grid: every card picture is the same 16:9 box (some scenes are square, some 8:3), and the coin sits on the card's bottom
   line, so cards in a row line up. */
.wf-game-grid > li { display: flex; }
.wf-game-grid .wf-level-tile { display: flex; flex-direction: column; align-items: flex-start; inline-size: 100%; }
.wf-game-grid .wf-level-tile > .wf-game-thumb { inline-size: 100%; block-size: auto; aspect-ratio: 16 / 9; object-fit: contain; object-position: 50% 50%; background: #f4ecdc; } /* whole scene visible */
.wf-game-grid .wf-level-tile > .alef-medal:last-child { margin: auto 0 0; padding-block-start: .5rem; box-sizing: content-box; box-shadow: none; filter: drop-shadow(0 2px 4px #0b1a1240); }
.wf-game-grid .wf-level-tile > .wf-arcade-thumb { aspect-ratio: 8 / 3; object-fit: cover; background: #f4ecdc; } /* 8:3 arcade scenes: the frame takes the scene's own shape, so the whole scene shows with no empty paper bands */

/* ---------- 12. Destination icons: Home lists and the More menu (2026-11-10 13:40) ----------
   Every destination row has one icon of one size: its gold coin, or for a game its own scene in the same round frame. */
.alef-game-pic { border-radius: 50%; object-fit: cover; aspect-ratio: 1 / 1; box-shadow: 0 0 0 2px #d9a441, 0 2px 6px #0b1a1240; background: #f4ecdc; }
.show-tile > .alef-medal, .tile > .alef-medal { inline-size: 3.5rem; block-size: 3.5rem; flex: none; }
.tiles .tile > .alef-medal { inline-size: 40px; block-size: 40px; margin: 0 auto .35rem; }
#nav-more .menu-link.has-ico { display: grid; grid-template-columns: 32px 1fr; column-gap: .65rem; align-items: center; align-content: center; }
#nav-more .menu-link.has-ico > .alef-medal { grid-row: 1; inline-size: 32px; block-size: 32px; margin: 0; align-self: center; }
#nav-more .menu-link.has-ico:has(> .menu-desc) > .alef-medal { grid-row: 1 / span 2; }
#nav-more .menu-link.has-ico > .menu-label, #nav-more .menu-link.has-ico > .menu-desc { grid-column: 2; }
/* game cards (Games, Brain Lab): the scene is the main picture again; one 16:9 box, whole scene visible */
.lab-game.has-cover { flex-direction: column; align-items: stretch; }
.lab-game.has-cover > .lab-art.studio-cover { inline-size: 100%; block-size: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #f4ecdc; border-radius: 12px; margin: 0 0 .3rem; }
.lab-game.has-cover > .alef-coin { margin: 0 0 .3rem; }

/* Aleph theme: one palette for the whole site, at the end of the last sheet so it settles colour clashes left by the older sheets.
   Brand: deep green, warm gold and cream (tokens.css). Two themes share it:
     dark (the default): green surfaces, cream text, gold for actions and accents.
     light: cream surfaces, green text, gold only for fills and borders (gold text on cream is too faint to read).
   Every pair below meets WCAG AA for its text size (checked with tools/a11y/contrast.mjs values and a page sweep, 29 Nov 2026). */

:root {
  --t-bg: #0e1f12;          /* page */
  --t-surface: #16301c;     /* cards and panels */
  --t-surface-2: #1c4023;   /* raised: inputs, inner boxes */
  --t-line: rgba(217, 164, 65, .55);
  --t-text: #f6f1e7;        /* 12.7:1 on surface */
  --t-muted: #d8e2c4;       /* 10.6:1 on surface */
  --t-accent: #e8c97a;      /* gold text: 8.9:1 on surface */
  --t-fill: #d9a441;        /* gold fill with green text */
  --t-on-fill: #122a17;     /* 6.8:1 on gold */
}
:root[data-theme="light"] {
  --t-bg: #f6f1e7;
  --t-surface: #fffaf0;
  --t-surface-2: #f3ead6;
  --t-line: rgba(184, 134, 43, .7);
  --t-text: #122a17;        /* 14.7:1 on surface */
  --t-muted: #3d5443;       /* 7.9:1 on surface */
  --t-accent: #7a5410;      /* deep gold for text: 6.5:1 on surface */
  --t-fill: #d9a441;
  --t-on-fill: #122a17;
}

/* Home: the boxes that were cream islands on a green page now belong to the page. */
:root:not([data-theme="light"]):not([data-theme^="contrast"]) :is(.show-portals, .show-all-destinations, .show-stats, .home-builder) {
  background: var(--t-surface); color: var(--t-text); border-color: var(--t-line);
}
:root:not([data-theme="light"]):not([data-theme^="contrast"]) :is(.show-portals-intro, .show-all-destinations summary, .show-stats) { color: var(--t-muted); }
.show-section-title { color: var(--t-accent); }
:root:not([data-theme="light"]):not([data-theme^="contrast"]) .home-builder :is(h2, label, p, legend, summary, .builder-options label) { color: var(--t-text); }
:root:not([data-theme="light"]):not([data-theme^="contrast"]) .home-builder .builder-target { background: var(--t-surface-2); color: var(--t-text); }
:root:not([data-theme="light"]):not([data-theme^="contrast"]) .home-builder :is(select, input:not([type="checkbox"]):not([type="radio"])) { background: var(--t-surface-2); color: var(--t-text); border: 1px solid var(--t-line); }
:root:not([data-theme="light"]):not([data-theme^="contrast"]) .home-builder .builder-key { color: var(--t-text); border-color: var(--t-line); }
:root[data-theme="light"] .home-builder .btn.secondary { color: var(--t-accent); }

/* Secondary buttons and plain links that sit on cream in the light theme: deep gold, never pale gold. */
:root[data-theme="light"] :is(.btn.secondary, .show-btn2, .show-btn3) { color: var(--t-accent); }

/* Locked and disabled controls stay readable: dimmed, never faded to nothing. */
.arc-level[disabled] { opacity: 1; }
.arc-level[disabled] .arc-level-name, .arc-level[disabled] .arc-level-n { color: var(--t-muted); opacity: 1; }
.arc-level-name { opacity: 1; }
.btn[disabled], button.btn:disabled {
  background: transparent; color: var(--t-muted); border: 2px dashed var(--t-line); box-shadow: none; opacity: 1;
}
.fd-foot .fd-cta[disabled], .ob-cta[disabled] { background: var(--t-surface-2); color: var(--t-muted); border-color: var(--t-line); }

/* Small pieces the page sweep flagged. */
.alef-add-btns a { color: var(--t-text); opacity: 1; }
.rmw-noprint button { color: var(--t-text); opacity: 1; }
:root[data-theme="light"] .hk-tr { color: var(--t-muted); }

/* The update banner: one clear message bar in both themes. */
#alef-update-banner { background: var(--t-surface) !important; color: var(--t-text) !important; border-block-start: 2px solid var(--t-fill) !important; }

/* Game tiles: a long word wraps inside its tile (then shrinks to fit, src/shell/fit-text.js) instead of spilling out. */
:is(.arc-board, .game-board) :is(button, .arc-cell, .arc-card, .arc-tile, .arc-bin, .game-choice, .game-tile, .game-card) { overflow-wrap: break-word; min-width: 0; max-width: 100%; }
:is(.arc-board, .game-board) .arc-choice { white-space: normal; line-height: 1.15; }

/* A turned card keeps its new face visible after the motion ends. */
.arc-card[data-face="up"] { border-style: double; border-width: 3px; }
.wb-practice-list { display: grid; gap: .85rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); list-style: none; padding: 0; }
.wb-practice-list li { border-inline-start: .2rem solid var(--t-accent); padding-inline-start: .8rem; }
.wb-practice-list a { display: inline-block; padding-block: .35rem; font-weight: 650; }
.wb-practice-list p { margin: .1rem 0; }
:is(.tile, .show-tile, .arc-choice, .btn, .wb-practice-list a):focus-visible { outline: 3px solid var(--t-accent); outline-offset: 3px; }
@media (hover: hover) { :is(.tile, .show-tile):hover { outline: 2px solid var(--t-accent); outline-offset: 1px; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-calm]) :is(.tile, .show-tile, .arc-choice):active:not(:disabled) { transform: translateY(1px); }
  :root:not([data-calm]) .arc-card[data-face="up"] { animation: reveal-letter .2s ease-out; }
  :root:not([data-calm]) .show-tile:focus-visible .wf-game-thumb { transform: scale(1.025); }
  @keyframes reveal-letter { from { transform: perspective(24rem) rotateY(-28deg); } to { transform: perspective(24rem) rotateY(0); } }
}

/* Rimon greets the learner at the first Start button. */
body:not([data-rimon-quiet]) .arc-start-top::before {
  content: "";
  display: inline-block;
  inline-size: 1.65rem;
  block-size: 1.65rem;
  margin-inline-end: .4rem;
  vertical-align: middle;
  background: url("../games/arcade/cast/rimon-face.png") center / contain no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-calm]) .arc-start-top::before { transition: transform .16s ease-out; }
  :root:not([data-calm]) .arc-start-top:focus-visible::before { transform: translateY(-2px) rotate(-8deg); }
  @media (hover: hover) {
    :root:not([data-calm]) .arc-start-top:hover::before { transform: translateY(-2px) rotate(-8deg); }
  }
  :root:not([data-calm]) .arc-start-top:active::before { transform: translateY(1px) rotate(4deg); }
}
