/* Game world (js/games/*): the games page block, each game's stage map, the round frame and the results.
   Built from the design system's tokens (docs/design-system.md: --surface, --ink, --accent, --e1…, --r…, --gold) and the
   level colours (--a1 … --c1), so dark mode, high contrast and easy learning carry over. Loads before css/ui-kit.css, which
   keeps the last word on shared parts (.btn, .chip, .game-card). Every class here starts with ax-. */

/* category tints, used like the design system's --t: a soft icon square, the category tag, focus colours */
.cat-listen { --cat-1: #2563eb; --cat-2: #06b6d4; }
.cat-speak { --cat-1: #dc2626; --cat-2: #f97316; }
.cat-spell { --cat-1: #7c3aed; --cat-2: #c026d3; }
.cat-sentence { --cat-1: #0f8a7e; --cat-2: #22c55e; }
.cat-speed { --cat-1: #ea580c; --cat-2: #f59e0b; }
.cat-think { --cat-1: #db2777; --cat-2: #f43f5e; }
.cat-picture { --cat-1: #15803d; --cat-2: #84cc16; }
.cat-expr { --cat-1: #4338ca; --cat-2: #a855f7; }
.cat-classic { --cat-1: #475569; --cat-2: #94a3b8; }
/* --cat-ink: the tint as text, a little darker on light pages and lighter on dark ones (mixed with --ink) */
[class*="cat-"] { --cat-grad: linear-gradient(135deg, var(--cat-1, var(--accent)), var(--cat-2, var(--accent-2, var(--accent)))); --cat-ink: color-mix(in srgb, var(--cat-1, var(--accent)) 72%, var(--ink)); }
.lv-a1 { --lvc: var(--a1); } .lv-a2 { --lvc: var(--a2); } .lv-b1 { --lvc: var(--b1); } .lv-b2 { --lvc: var(--b2); } .lv-c1 { --lvc: var(--c1); } .lv-c2 { --lvc: var(--c2); }

/* ---------- games page ---------- */
.game-grid > .ax-hub, .game-grid > .ax-more { grid-column: 1 / -1; }
.game-grid > .ax-hub { order: -3; }
.game-grid > .ax-card { order: -2; }
.game-grid > .ax-more { order: -1; }
.game-grid > [hidden] { display: none !important; }
.ax-hub { background: var(--surface); border: 1px solid var(--hairline, var(--rule)); border-radius: var(--r-xl, 28px); box-shadow: var(--e2, var(--shadow)); padding: var(--sp-6, 24px); display: grid; gap: var(--sp-5, 20px); }
:where(html:not(.a11y-contrast)) .ax-hub { background: radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--surface); }
.ax-hub-head { display: flex; flex-wrap: wrap; gap: var(--sp-4, 16px); align-items: flex-end; justify-content: space-between; }
.ax-hub-text { flex: 1 1 380px; min-width: 0; display: grid; gap: var(--sp-2, 8px); }
.ax-hub-text h2 { font-family: var(--font-display); font-size: var(--fs-h2, 1.5rem); margin: 0; }
.ax-hub-text p { margin: 0; }
.ax-hub-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 600; font-size: var(--fs-sm, .9rem); color: var(--ink-2, var(--ink)); }
.ax-meter { height: 10px; border-radius: var(--r-pill, 99px); background: color-mix(in srgb, var(--ink) 8%, transparent); box-shadow: inset 0 1px 2px rgb(0 0 0 / .08); overflow: hidden; max-width: 520px; }
.ax-meter > span { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 60%, rgb(255 255 255)), var(--gold)); box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 55%, transparent); }
.ax-hub-acts { display: flex; flex-wrap: wrap; gap: var(--sp-3, 12px); }
.ax-cont { display: inline-grid; justify-items: start; gap: 0; text-align: start; line-height: 1.2; }
.ax-cont small { font-weight: 500; opacity: .85; font-size: var(--fs-xs, .78rem); }
.ax-daily { display: inline-flex; align-items: center; gap: 8px; }
.ax-daily .ax-ic { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }
.ax-daily .ax-ic svg { width: 18px; height: 18px; }
.ax-badge { display: inline-grid; place-items: center; min-width: 1.6em; padding: 0 .4em; border-radius: var(--r-pill, 99px); background: var(--bad); color: var(--surface); font-size: var(--fs-xs, .78rem); }
.ax-chips { display: flex; gap: var(--sp-2, 8px); overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.ax-chips .chip { flex: none; white-space: nowrap; }
/* on a phone the filters wrap onto more lines: a sideways strip hid German and Arabic chips past the screen edge */
@media (max-width: 560px) { .ax-chips { flex-wrap: wrap; overflow-x: visible; gap: 6px; } .ax-chips .chip { max-width: 100%; white-space: normal; padding: .5em .8em; font-size: .88rem; } }

/* the game of the day: the category's photo under its colour, white text, Polly pointing at it from the far side */
.ax-hero { --hero-dir: 90deg; position: relative; isolation: isolate; overflow: hidden; min-height: 232px; display: flex; align-items: flex-end; padding: var(--sp-6, 24px);
  border-radius: var(--r-xl, 28px); background: var(--cat-1, var(--accent)); color: #fff; box-shadow: var(--e3, var(--shadow)); }
[dir="rtl"] .ax-hero { --hero-dir: 270deg; }
.ax-hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease, ease); }
.ax-hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgb(0 0 0 / .35), transparent 55%),
    linear-gradient(var(--hero-dir), color-mix(in srgb, var(--cat-1, var(--accent)) 82%, rgb(0 0 0)) 0%, color-mix(in srgb, var(--cat-1, var(--accent)) 62%, transparent) 52%, color-mix(in srgb, var(--cat-2, var(--accent)) 18%, transparent) 100%); }
.ax-hero-cat { position: absolute; z-index: -1; bottom: -14px; inset-inline-end: 3%; height: 112%; max-height: 270px; width: auto; max-width: 44%; object-fit: contain; filter: drop-shadow(0 14px 22px rgb(0 0 0 / .45)); }
[dir="rtl"] .ax-hero-cat { transform: scaleX(-1); } /* the photo points left; in Hebrew the text is on the right */
.ax-hero-text { max-width: min(560px, 60%); display: grid; gap: 10px; justify-items: start; }
.ax-hero-eye { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill, 99px); background: var(--gold); color: color-mix(in srgb, var(--gold) 22%, rgb(0 0 0)); font-size: var(--fs-xs, .78rem); font-weight: 800; letter-spacing: .02em; box-shadow: 0 6px 16px -6px rgb(0 0 0 / .5); }
.ax-hero-title { display: flex; align-items: center; gap: 12px; }
.ax-hero-title h3 { margin: 0; font: 700 clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem)/1.15 var(--font-display); letter-spacing: -.015em; text-shadow: 0 2px 10px rgb(0 0 0 / .35); }
.ax-hero .ax-ic { width: 52px; height: 52px; border-radius: 16px; color: #fff; background: rgb(255 255 255 / .16); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .32), 0 8px 18px -8px rgb(0 0 0 / .5); }
.ax-hero-text p { margin: 0; color: rgb(255 255 255 / .9); line-height: 1.5; text-shadow: 0 1px 4px rgb(0 0 0 / .35); }
.ax-hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.ax-hero .ax-hero-go, .ax-hero .ax-hero-go:hover:not(:disabled) { min-height: 50px; padding-inline: 1.5em; border: 0; border-radius: var(--r-pill, 99px); background: #fff; color: color-mix(in srgb, var(--cat-1, var(--accent)) 78%, rgb(0 0 0)); font-weight: 700; font-size: 1rem;
  box-shadow: 0 12px 26px -10px rgb(0 0 0 / .6), inset 0 -3px 0 rgb(0 0 0 / .08); transition: transform var(--dur-1, .12s) var(--ease, ease); }
.ax-hero .ax-hero-go:hover:not(:disabled) { transform: translateY(-2px); }
.ax-hero .ax-hero-go:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.ax-hero .ax-hero-go:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ax-hero-at { font-size: var(--fs-sm, .875rem); font-weight: 600; color: rgb(255 255 255 / .86); }
@media (hover: hover) { .ax-hero:hover .ax-hero-bg { transform: scale(1.04); } }
@media (max-width: 560px) {
  .ax-hero { min-height: 0; padding: var(--sp-5, 20px) var(--sp-4, 16px); align-items: stretch; }
  .ax-hero-text { max-width: 100%; }
  .ax-hero-text p { padding-inline-end: 96px; }
  .ax-hero-title h3 { padding-inline-end: 64px; }
  .ax-hero-cat { height: 150px; bottom: -8px; inset-inline-end: -6px; }
  .ax-hub > .ax-hero { order: -1; } /* on a phone the game of the day leads the block */
  .ax-card .ax-card-top { height: 74px; margin-bottom: 22px; }
  .ax-card .ax-card-top .ax-ic { width: 52px; height: 52px; bottom: -22px; border-radius: 16px; }
}
.pref-lite .ax-hero-bg, .pref-easy .ax-hero-bg { display: none; }

.ax-card { position: relative; }
.ax-card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2, 8px); }
.ax-card h2 { margin: 4px 0 0; }
/* a game card: a band of category colour art on top, the icon tile resting on its edge, lifting on hover */
.game-grid > .ax-card { padding: 0 0 var(--sp-5, 20px); overflow: hidden; gap: 8px; transition: transform var(--dur-3, .32s) var(--ease, ease); }
.game-grid > .ax-card > :not(.ax-card-top, .ax-ribbon) { margin-inline: var(--sp-5, 20px); }
.game-grid > .ax-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--e4, var(--shadow-lg)); opacity: 0; transition: opacity var(--dur-3, .32s) var(--ease, ease); pointer-events: none; }
.ax-card .ax-card-top { position: relative; height: 92px; margin-bottom: 26px; padding: 14px var(--sp-5, 20px) 0; align-items: flex-start; color: #fff;
  background: radial-gradient(circle at 88% -30%, rgb(255 255 255 / .38), transparent 46%), radial-gradient(circle at 0% 130%, rgb(0 0 0 / .22), transparent 55%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / .07) 0 2px, transparent 2px 12px), var(--cat-grad); }
.ax-card .ax-card-top .ax-ic { position: absolute; inset-inline-start: var(--sp-5, 20px); bottom: -26px; width: 58px; height: 58px; border-radius: 18px; background: var(--surface); color: var(--cat-ink);
  box-shadow: 0 0 0 4px var(--surface), 0 10px 22px -8px color-mix(in srgb, var(--cat-1, var(--accent)) 70%, transparent); }
.ax-card .ax-card-top .ax-ic svg { width: 30px; height: 30px; }
.ax-card .ax-cat-tag { margin-inline-start: auto; color: #fff; background: rgb(255 255 255 / .18); border-color: rgb(255 255 255 / .35); text-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.game-grid > .ax-card .game-foot { padding-top: 12px; border-top: 1px solid var(--hairline, var(--rule)); }
/* (html: one step above the design system's dark-theme colour for .btn.primary, which would print dark text here) */
html .game-grid > .ax-card .game-foot .btn.primary { border: 0; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--cat-1, var(--accent)) 78%, rgb(0 0 0)), var(--cat-1, var(--accent)));
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--cat-1, var(--accent)) 80%, transparent), inset 0 -2px 0 rgb(0 0 0 / .14); }
.game-grid > .ax-card .game-foot .btn.primary:focus-visible { box-shadow: var(--ring); }
@media (hover: hover) {
  .game-grid > .ax-card:hover { transform: translateY(-4px); box-shadow: var(--e2, var(--shadow)); }
  .game-grid > .ax-card:hover::after { opacity: 1; }
}
.game-grid > .ax-card:active { transform: scale(.985); }
/* the game's icon: a soft square in its category tint (the design system's .ds-ico) */
.ax-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: inline-grid; place-items: center; color: var(--cat-ink); background: color-mix(in srgb, var(--cat-1, var(--accent)) 13%, var(--surface)); font-size: 24px; line-height: 1; }
.ax-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ax-cat-tag { font-size: .74rem; font-weight: 700; color: var(--cat-ink); background: color-mix(in srgb, var(--cat-1, var(--accent)) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--cat-1, var(--accent)) 24%, transparent); padding: 2px 10px; border-radius: var(--r-pill, 99px); }
.ax-lvbars { display: flex; gap: 5px; margin-top: auto; padding-top: 6px; direction: ltr; }
.ax-lvbars i { flex: 1; height: 22px; border-radius: var(--r-pill, 99px); background: var(--surface-2); box-shadow: inset 0 1px 2px rgb(0 0 0 / .06); position: relative; overflow: hidden; display: grid; place-items: center; font-style: normal; }
.ax-lvbars i::before { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--f, 0) * 100%); background: var(--lvc); opacity: .9; }
.ax-lvbars i.paid { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 4px, transparent 4px, transparent 8px); }
.ax-lvbars i.soon { opacity: .45; }
.ax-lvbars b { position: relative; font-size: .66rem; font-weight: 700; color: var(--muted); }
.ax-starline { white-space: nowrap; }
.game-grid > .ax-today { box-shadow: 0 0 0 2px var(--gold), var(--e2, var(--shadow)); }
.ax-ribbon { position: absolute; z-index: 1; inset-inline-end: 14px; top: 14px; color: color-mix(in srgb, var(--gold) 22%, rgb(0 0 0)); background: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); box-shadow: 0 6px 14px -6px rgb(0 0 0 / .45); font-size: .72rem; font-weight: 700; padding: .2em .7em; border-radius: var(--r-pill, 99px); }
.ax-today .ax-cat-tag { display: none; }
.ax-more { margin: var(--sp-4, 16px) 4px 0; font: 600 var(--fs-h3, 1.15rem) var(--font-display); }

/* ---------- stage map ---------- */
.ax-map { max-width: 760px; margin: 0 auto; display: grid; gap: var(--sp-4, 16px); }
.ax-map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3, 12px); }
.ax-total { font-weight: 700; font-size: var(--fs-sm, .9rem); color: var(--gold-ink, var(--ink)); background: var(--gold-soft, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: var(--r-pill, 99px); padding: 5px 12px; }
.ax-map-head { display: flex; align-items: center; gap: var(--sp-4, 16px); }
.ax-map-head .ax-ic { width: 64px; height: 64px; border-radius: 18px; font-size: 32px; }
.ax-map-head .ax-ic svg { width: 34px; height: 34px; }
:is(.ax-map-head, .ax-bar-title) .ax-ic { color: #fff; background: radial-gradient(circle at 80% 0%, rgb(255 255 255 / .35), transparent 55%), var(--cat-grad); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--cat-1, var(--accent)) 80%, transparent), inset 0 -2px 0 rgb(0 0 0 / .12); }
.ax-map-head h1 { margin: 0; font-size: var(--fs-h1, 2rem); }
.ax-map-head p { margin: 2px 0 0; }
.ax-how { margin: 0; background: color-mix(in srgb, var(--cat-1, var(--accent)) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--cat-1, var(--accent)) 18%, transparent); border-radius: var(--r, 16px); padding: var(--sp-3, 12px) var(--sp-4, 16px); line-height: 1.5; color: var(--ink-2, var(--ink)); }
.ax-tabs { display: flex; gap: var(--sp-2, 8px); overflow-x: auto; padding: 2px 2px 4px; }
.ax-tab { flex: 1 0 auto; min-width: 72px; min-height: 52px; display: grid; justify-items: center; gap: 2px; padding: 8px 10px; border-radius: var(--r, 16px); border: 1px solid var(--hairline-strong, var(--rule)); background: var(--surface); color: var(--ink); box-shadow: var(--e1, none); cursor: pointer; font: inherit; }
.ax-tab b { font: 700 1.05rem var(--font-target); color: color-mix(in srgb, var(--lvc) 80%, var(--ink)); }
.ax-tab small { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.ax-tab[aria-selected="true"] { border-color: var(--lvc); background: color-mix(in srgb, var(--lvc) 10%, var(--surface)); box-shadow: 0 0 0 1px var(--lvc) inset; }
.ax-tab:focus-visible { outline: none; box-shadow: var(--ring); }
.ax-world { background: var(--surface); border: 1px solid var(--hairline, var(--rule)); border-radius: var(--r-lg, 20px); box-shadow: var(--e2, var(--shadow)); overflow: hidden; }
/* white on the level's photo under a dark tint of the level colour, in both themes */
.ax-world-head { position: relative; min-height: 124px; display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px; background-size: cover; background-position: center; color: #fff; }
.ax-world-head::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--lvc) 60%, #000) 0%, color-mix(in srgb, var(--lvc) 40%, transparent) 70%, transparent); }
.ax-world-head > * { position: relative; }
.ax-world-head b { font-size: var(--fs-lg, 1.1rem); text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.ax-lv-chip { font: 700 .95rem var(--font-target); background: var(--surface); color: color-mix(in srgb, var(--lvc) 80%, var(--ink)); padding: 4px 10px; border-radius: 10px; }
.ax-lock-note { margin: 0; padding: 18px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.ax-lock-note.small { padding: 10px 18px 0; color: var(--muted); }
.ax-path { list-style: none; margin: 0; padding: 22px 18px 26px; display: grid; gap: 4px; justify-items: center; position: relative;
  background: radial-gradient(60% 50% at 50% 40%, color-mix(in srgb, var(--lvc, var(--accent)) 7%, transparent), transparent 75%); }
.ax-step { display: grid; justify-items: center; gap: 4px; position: relative; }
/* a winding path: the stages swing from side to side (straight in easy learning) */
.ax-step.s1 { margin-inline-start: 120px; } .ax-step.s2 { margin-inline-start: 170px; } .ax-step.s3 { margin-inline-start: 90px; } .ax-step.s4 { margin-inline-start: -40px; }
.pref-easy .ax-step { margin-inline-start: 0 !important; }
/* stage buttons in the level colour; their text is --bg (light on the darker light-theme colours, dark on the lighter dark-theme ones) */
.ax-node { width: 74px; height: 74px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 0; color: var(--bg); font: 700 1.45rem var(--font-target);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--lvc) 78%, rgb(255 255 255)), var(--lvc) 62%); box-shadow: 0 6px 0 color-mix(in srgb, var(--lvc) 62%, rgb(0 0 0)), 0 12px 24px -10px var(--lvc); transition: transform var(--dur-1, .12s) var(--ease, ease); }
.ax-node:hover:not(:disabled) { transform: translateY(-2px); }
.ax-node:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 3px 0 color-mix(in srgb, var(--lvc) 62%, rgb(0 0 0)), 0 8px 16px -10px var(--lvc); }
.ax-node:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.ax-node:disabled { cursor: default; background: var(--surface-2); color: var(--muted); box-shadow: 0 5px 0 var(--rule); font-size: 1.1rem; }
.ax-node.boss { width: 90px; height: 90px; font-size: 1.9rem; }
.ax-node.up { animation: ax-pulse 1.8s ease-in-out infinite; }
.ax-node-stars { display: flex; gap: 1px; font-size: .7rem; line-height: 1; margin-top: 2px; }
.ax-node-stars i { font-style: normal; color: color-mix(in srgb, var(--bg) 40%, transparent); }
.ax-node-stars i.on { color: var(--gold); text-shadow: 0 1px 1px rgb(0 0 0 / .3); }
.ax-node:disabled .ax-node-stars { display: none; }
.ax-step-label { font-size: .78rem; font-weight: 600; color: var(--muted); }
@keyframes ax-pulse { 0%, 100% { box-shadow: 0 6px 0 color-mix(in srgb, var(--lvc) 62%, rgb(0 0 0)), 0 0 0 0 color-mix(in srgb, var(--lvc) 45%, transparent); } 50% { box-shadow: 0 6px 0 color-mix(in srgb, var(--lvc) 62%, rgb(0 0 0)), 0 0 0 12px transparent; } }
html.a11y-contrast .ax-node:not(:disabled) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 520px) {
  .ax-step.s1 { margin-inline-start: 80px; } .ax-step.s2 { margin-inline-start: 120px; } .ax-step.s3 { margin-inline-start: 60px; } .ax-step.s4 { margin-inline-start: -20px; }
  .ax-node { width: 66px; height: 66px; } .ax-node.boss { width: 80px; height: 80px; }
}

/* ---------- a round (html.in-lesson while it runs: the menu and tab bar step aside, like in a lesson) ---------- */
.ax-play { max-width: 760px; margin: 0 auto; display: grid; gap: var(--sp-3, 12px); }
.ax-play [hidden], .ax-map [hidden], .ax-hub [hidden] { display: none !important; }
/* read by screen readers only (games can share it) */
.ax-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* ---------- text instead of sound (W05-T056): the written form of a recording ---------- */
.ax-transcript { margin: 0; padding: 8px 14px; border-radius: var(--r-sm, 12px); background: var(--surface-2); border: 1px solid var(--hairline, var(--rule)); color: var(--ink); text-align: center; font: 600 1.1rem/1.4 var(--font-target, inherit); }
.ax-transcript[lang] { unicode-bidi: isolate; }
.ax-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--hairline, var(--rule)); border-radius: var(--r-lg, 20px); padding: 8px 10px; box-shadow: var(--e2, var(--shadow-xs)); }
.ax-x, .ax-mute { flex: none; width: 40px; height: 40px; border-radius: var(--r-sm, 12px); border: 1px solid var(--hairline, var(--rule)); background: var(--surface-2); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ax-mute { font-size: 1rem; }
/* audio speed (research N35): a small pill next to the sound switch */
.ax-rate { flex: none; min-width: 44px; height: 40px; padding: 0 8px; border-radius: var(--r-sm, 12px); border: 1px solid var(--hairline, var(--rule)); background: var(--surface-2); color: var(--ink); font: 700 .85rem var(--font-body); cursor: pointer; white-space: nowrap; }
.ax-rate:focus-visible { outline: none; box-shadow: var(--ring); }
.ax-x:focus-visible, .ax-mute:focus-visible { outline: none; box-shadow: var(--ring); }
.ax-bar-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ax-bar-title .ax-ic { width: 38px; height: 38px; border-radius: 11px; font-size: 19px; }
.ax-bar-title .ax-ic svg { width: 21px; height: 21px; }
.ax-bar-title span:last-child { display: grid; min-width: 0; line-height: 1.2; }
.ax-bar-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-bar-title small { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.ax-bar-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ax-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill, 99px); background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.ax-pill.ok { background: var(--ok-soft); color: var(--ok); }
.ax-time.low { background: var(--bad-soft); color: var(--bad); }
.ax-lives i { font-style: normal; color: var(--rule); font-size: .85rem; }
.ax-lives i.on { color: var(--accent); } /* tries left in this round, never hearts (research: no hearts or energy) */
/* the progress row: the bar, the streak pill and Polly's photo */
.ax-meta { display: flex; align-items: center; gap: 10px; padding-inline: 4px; }
.ax-progress { flex: 1; height: 12px; border-radius: var(--r-pill, 99px); background: color-mix(in srgb, var(--ink) 9%, transparent); box-shadow: inset 0 1px 2px rgb(0 0 0 / .1); overflow: hidden; }
/* the fill slides in (a transform, set through --p from 0 to 1) and keeps its round end; Hebrew fills from the right */
.ax-progress i { position: relative; display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--lvc, var(--accent)) 65%, rgb(255 255 255)), var(--lvc, var(--accent)));
  transform: translateX(calc((var(--p, 0) - 1) * 100%)); transition: transform .55s var(--ease, ease); }
[dir="rtl"] .ax-progress i { transform: translateX(calc((1 - var(--p, 0)) * 100%)); }
.ax-progress i::after { content: ''; position: absolute; inset: 2px 8px auto; height: 3px; border-radius: 99px; background: rgb(255 255 255 / .45); }
.ax-combo { flex: none; padding: 4px 11px; border-radius: var(--r-pill, 99px); font-weight: 800; font-size: .84rem; white-space: nowrap;
  background: linear-gradient(135deg, var(--gold), color-mix(in srgb, var(--gold) 70%, var(--bad))); color: color-mix(in srgb, var(--gold) 18%, rgb(0 0 0)); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--gold) 80%, transparent); }
.ax-combo.fx0 { animation: ax-combo0 .45s var(--ease, ease); } .ax-combo.fx1 { animation: ax-combo1 .45s var(--ease, ease); }
@keyframes ax-combo0 { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ax-combo1 { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
/* Polly: three poses stacked in a round frame, one shown at a time (a fade, nothing moves the layout) */
.ax-buddy { flex: none; position: relative; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 30%, var(--surface), var(--surface-2));
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--hairline-strong, var(--rule)), var(--e2, var(--shadow)); }
.ax-buddy img { position: absolute; inset: -4% -40% auto; width: 180%; max-width: none; height: auto; opacity: 0; transition: opacity var(--dur-3, .32s) var(--ease, ease); }
.ax-buddy .p-thinking, .ax-buddy[data-p="praising"] .p-praising, .ax-buddy[data-p="encouraging"] .p-encouraging { opacity: 1; }
.ax-buddy:is([data-p="praising"], [data-p="encouraging"]) .p-thinking { opacity: 0; }
.ax-buddy[data-p="praising"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold), 0 8px 20px -6px color-mix(in srgb, var(--gold) 70%, transparent); animation: ax-pop .45s var(--ease, ease); }
/* a game that seats its own Polly keeps her; the results and easy learning drop the extras */
.ax-play:has(.ax-body img[src*="pet/polly"]) .ax-buddy, .ax-play.is-over :is(.ax-buddy, .ax-combo), .pref-easy :is(.ax-buddy, .ax-combo) { display: none; }
.ax-body { background: var(--surface); border: 1px solid var(--hairline, var(--rule)); border-radius: var(--r-xl, 28px); box-shadow: var(--e3, var(--shadow)); padding: clamp(16px, 3.5vw, 28px); min-height: 280px; }
:where(html:not(.a11y-contrast)) .ax-body { background: radial-gradient(120% 50% at 50% -10%, color-mix(in srgb, var(--cat-1, var(--accent)) 7%, transparent), transparent 70%), var(--surface); }
/* each new question (a game redraws its body) slides in softly */
.ax-body > * { animation: ax-in .38s var(--ease, ease) backwards; }
@keyframes ax-in { from { opacity: 0; transform: translateY(10px); } }
/* the answer's note: a soft chip under the card that rises in with each answer */
.ax-fb { justify-self: center; width: fit-content; max-width: 100%; min-height: 1.5em; text-align: center; font-weight: 600; padding: 10px 18px; border-radius: var(--r, 16px); line-height: 1.6;
  background: var(--surface); border: 1px solid var(--hairline, var(--rule)); box-shadow: var(--e2, var(--shadow)); }
.ax-fb:empty { display: none; }
.ax-fb.fx0 { animation: ax-fb0 .32s var(--ease, ease); } .ax-fb.fx1 { animation: ax-fb1 .32s var(--ease, ease); }
@keyframes ax-fb0 { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes ax-fb1 { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.ax-fb.is-ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.ax-fb.is-bad { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 28%, transparent); }
/* a near miss that still counts: yellow, with the letters to look at marked */
.ax-fb.is-close { color: var(--ink); background: var(--warn-soft, var(--surface-2)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.ax-fb mark { background: color-mix(in srgb, var(--warn, #e0a100) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
/* "I can't listen / speak now" under a listening or speaking round, and the note on the games page */
.ax-quiet { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.ax-quiet-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--muted); }
.ax-fb .tgt, .ax-fb-tr { color: var(--ink); }
.ax-fb .ax-say { width: 34px; height: 34px; box-shadow: none; }
.ax-fb .ax-say svg { width: 17px; height: 17px; }
.ax-fb-mark { font-size: 1.15em; }
.ax-fb:is(.is-ok, .is-bad) .ax-fb-mark { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; font-size: .9em; vertical-align: -.2em; color: var(--bg); background: var(--ok); }
.ax-fb.is-bad .ax-fb-mark { background: var(--bad); }
.ax-empty { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 30px 10px; }

/* shared question parts games can reuse */
.ax-q { display: grid; gap: var(--sp-4, 16px); }
.ax-ask { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.ax-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.ax-big { font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.25; }
.ax-big .tgt { font-weight: 700; }
.ax-sent { font-size: clamp(1.1rem, 3.4vw, 1.4rem); line-height: 1.55; }
.ax-pic { width: min(220px, 60vw); aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg, 18px); box-shadow: var(--e2, var(--shadow)); background: var(--surface-2); }
/* the play button is the round's main action: the brand gradient, like .btn.primary */
.ax-say { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: inline-grid; place-items: center; background: var(--grad, var(--accent)); color: var(--accent-ink); box-shadow: 0 6px 14px -8px var(--accent); vertical-align: middle; }
.ax-say svg { width: 22px; height: 22px; }
.ax-say.big { width: 84px; height: 84px; }
.ax-say.big svg { width: 40px; height: 40px; }
.ax-say.small { width: 32px; height: 32px; box-shadow: none; }
.ax-say.small svg { width: 16px; height: 16px; }
.ax-say:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.ax-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
/* an answer button: a soft raised key that lifts under the pointer and presses down */
.ax-opt { position: relative; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-radius: var(--r, 16px); border: 1.5px solid var(--hairline-strong, var(--rule));
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-2) 55%, var(--surface))); color: var(--ink); font: 600 1.05rem var(--font-body); cursor: pointer; text-align: center;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 10%, transparent), var(--e1, none); transition: transform var(--dur-1, .12s) var(--ease, ease), opacity var(--dur-3, .32s); }
.ax-opt:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--cat-1, var(--accent)) 50%, transparent); }
.ax-opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 10%, transparent); }
.ax-opt:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring), 0 3px 0 color-mix(in srgb, var(--ink) 10%, transparent); }
.ax-opt:disabled { cursor: default; }
.ax-opt .tgt { font-size: 1.1rem; }
/* right: a pop and a green glow that fades; wrong: a short gentle shake. A round badge marks both on the corner. */
.ax-opt.right { color: var(--ink); border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 3px 0 color-mix(in srgb, var(--ok) 45%, transparent), 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); animation: ax-pop .45s var(--ease, ease); }
.ax-opt.right::after { content: ''; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 30%, transparent), 0 0 28px 4px color-mix(in srgb, var(--ok) 45%, transparent); animation: ax-glow .9s ease-out; }
.ax-opt.wrong { color: var(--ink); border-color: var(--bad); background: var(--bad-soft); box-shadow: 0 3px 0 color-mix(in srgb, var(--bad) 35%, transparent); animation: ax-shake .42s ease; }
.ax-opt:is(.right, .wrong)::before { content: '✓'; position: absolute; z-index: 2; top: -9px; inset-inline-end: -7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font: 800 .8rem/1 var(--font-body); color: var(--bg); background: var(--ok); box-shadow: 0 0 0 2px var(--surface), 0 4px 10px -3px rgb(0 0 0 / .3); }
.ax-opt.wrong::before { content: '✕'; background: var(--bad); }
.ax-opt.dim, .ax-opts:has(.right) .ax-opt:disabled:not(.right, .wrong) { opacity: .5; }
@keyframes ax-glow { 0% { opacity: 0; transform: scale(.96); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }
.ax-key { position: absolute; inset-inline-start: 10px; top: 8px; font-size: .68rem; font-weight: 700; color: var(--muted); opacity: .7; }
@media (hover: none) { .ax-key { display: none; } }
.ax-tile { min-height: 44px; padding: 8px 14px; border-radius: var(--r-sm, 12px); border: 1.5px solid var(--hairline-strong, var(--rule)); background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-2) 55%, var(--surface)));
  color: var(--ink); font: 600 1.05rem var(--font-target); cursor: pointer; box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 12%, transparent), var(--e1, none); transition: transform var(--dur-1, .12s) var(--ease, ease), opacity var(--dur-2, .2s); }
.ax-tile:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--cat-1, var(--accent)) 50%, transparent); }
.ax-tile:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 12%, transparent); }
.ax-tile:disabled { opacity: .35; cursor: default; }
.ax-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ax-input { width: 100%; min-height: 52px; font: 600 1.25rem var(--font-target); padding: 12px 14px; border-radius: var(--r, 14px); border: 2px solid var(--hairline-strong, var(--rule)); background: var(--surface); color: var(--ink); text-align: center; direction: ltr; }
.ax-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ax-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ax-ok { animation: ax-pop .45s var(--ease, ease); }
.ax-bad { animation: ax-shake .42s ease; }
@keyframes ax-pop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 70% { transform: scale(.99); } 100% { transform: scale(1); } }
@keyframes ax-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } 85% { transform: translateX(1px); } }

/* ---------- results ---------- */
.ax-result { display: grid; justify-items: center; gap: 12px; text-align: center; }
.ax-polly { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 10px 14px rgb(0 0 0 / .15)); }
/* Polly on a soft spotlight in the level's colour; slow golden rays behind her for two and three stars */
.ax-res-hero { position: relative; isolation: isolate; width: 210px; height: 176px; display: grid; place-items: end center; }
.ax-res-hero::before { content: ''; position: absolute; z-index: -1; inset: 0 -10px -6px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lvc, var(--accent)) 26%, transparent), color-mix(in srgb, var(--lvc, var(--accent)) 8%, transparent) 70%, transparent); }
.ax-result:is(.s2, .s3) .ax-res-hero::after { content: ''; position: absolute; z-index: -1; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px; border-radius: 50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--gold) 24%, transparent) 0deg 7deg, transparent 7deg 22.5deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent); mask: radial-gradient(closest-side, #000 25%, transparent); animation: ax-spin 40s linear 1; }
@keyframes ax-spin { to { transform: rotate(360deg); } }
.ax-result .ax-polly { width: 168px; height: 168px; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .2)); animation: ax-rise .6s var(--ease, ease) backwards; }
@keyframes ax-rise { from { opacity: 0; transform: translateY(18px) scale(.94); } }
/* the stars land one by one (.35s + .3s a star), three gold ones burst into a short shower */
.ax-stars { position: relative; display: flex; align-items: flex-end; gap: 10px; font-size: 3.2rem; line-height: 1; margin-top: -10px; }
.ax-stars i { font-style: normal; color: var(--surface-3); text-shadow: 0 2px 0 var(--hairline-strong, var(--rule)); }
.ax-stars i.on { color: var(--gold); text-shadow: 0 3px 0 rgb(0 0 0 / .16); animation: ax-star .55s calc(.35s + var(--i) * .3s) var(--ease, ease) both; }
:where(html:not(.a11y-contrast)) .ax-stars i.on { text-shadow: none; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--gold) 45%, rgb(255 255 255)) 15%, var(--gold) 55%, color-mix(in srgb, var(--gold) 72%, var(--bad)) 100%);
  filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--gold) 55%, transparent)); }
.ax-stars i:nth-child(2) { font-size: 1.3em; margin-bottom: 8px; }
@keyframes ax-star { 0% { transform: scale(0) rotate(-45deg); opacity: 0; } 65% { transform: scale(1.3) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.ax-burst { position: absolute; top: 50%; inset-inline-start: 50%; width: 0; height: 0; pointer-events: none; }
.ax-burst b { position: absolute; width: 8px; height: 14px; margin: -7px -4px; border-radius: 2px; background: var(--gold); opacity: 0;
  animation: ax-burst 1.1s cubic-bezier(.15, .7, .3, 1) 1.35s both; }
.ax-burst b:nth-child(odd) { width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; }
.ax-burst b:nth-child(4n + 2) { background: var(--accent); } .ax-burst b:nth-child(4n + 3) { background: var(--ok); } .ax-burst b:nth-child(4n) { background: var(--lvc, var(--accent-2)); }
@keyframes ax-burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-14px) scale(.4); } 70% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(160deg) scale(1); } }
.ax-result h2 { margin: 0; font-size: var(--fs-h1, 2rem); letter-spacing: -.015em; }
.ax-res-line { margin: 0; color: var(--muted); font-weight: 600; }
.ax-res-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0; }
.ax-res-chips .ax-pill { padding: 6px 14px; font-size: .95rem; }
.ax-xp { color: var(--gold-ink, var(--ink)); background: var(--gold-soft, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.ax-xp b { font-weight: 800; } /* inline (not inline-block), so the number keeps its place in Hebrew */
/* the words, then the buttons, rise in after the stars */
.ax-result > :is(h2, .ax-res-line, .ax-res-chips, .ax-unlock, .ax-missed, .ax-acts) { animation: ax-in .5s var(--ease, ease) backwards; animation-delay: .55s; }
.ax-result > :is(.ax-res-chips, .ax-unlock) { animation-delay: .7s; }
.ax-result > :is(.ax-missed, .ax-acts) { animation-delay: .4s; }
.ax-unlock { margin: 0; font-weight: 700; color: var(--ok); }
.ax-missed { width: 100%; max-width: 520px; text-align: start; background: var(--surface-2); border-radius: var(--r, 16px); padding: 12px 16px; }
.ax-missed h3 { margin: 0 0 6px; font-size: 1rem; }
.ax-missed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ax-missed li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ax-missed .ax-say { width: 30px; height: 30px; box-shadow: none; }
.ax-missed .ax-say svg { width: 15px; height: 15px; }
.ax-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.ax-acts .btn { min-width: 140px; }
.ax-acts .btn.primary { min-height: 50px; padding-inline: 2em; font-size: 1.02rem; }

/* Motion off (reduced motion, calm, easy): everything above stands still and the decorations step aside. */
@media (prefers-reduced-motion: reduce) {
  .ax-node.up, .ax-stars i.on, .ax-opt.wrong, .ax-ok, .ax-bad, .ax-opt.right, .ax-body > *, .ax-fb, .ax-combo, .ax-buddy, .ax-result > *, .ax-result .ax-polly, .ax-res-hero::after { animation: none !important; }
  .ax-node, .ax-opt, .ax-tile, .ax-progress i, .ax-buddy img, .game-grid > .ax-card, .game-grid > .ax-card::after, .ax-hero-bg, .ax-hero .ax-hero-go { transition: none; }
  .ax-burst, .ax-opt.right::after { display: none; }
}
:is(.pref-calm, .pref-easy) :is(.ax-node.up, .ax-stars i.on, .ax-ok, .ax-bad, .ax-opt.wrong, .ax-opt.right, .ax-body > *, .ax-fb, .ax-combo, .ax-buddy, .ax-result > *, .ax-result .ax-polly, .ax-res-hero::after) { animation: none !important; }
:is(.pref-calm, .pref-easy) :is(.game-grid > .ax-card, .ax-hero-bg, .ax-opt, .ax-tile) { transition: none; transform: none !important; }
:is(.pref-calm, .pref-easy) :is(.ax-burst, .ax-opt.right::after, .ax-res-hero::after) { display: none; }
@media (max-width: 560px) {
  .ax-hub { padding: var(--sp-4, 16px); }
  .ax-bar { padding: 6px 8px; gap: 8px; }
  .ax-bar-title .ax-ic { display: none; }
  .ax-body { padding: 14px; }
  .ax-opt { min-height: 54px; font-size: 1rem; }
  .ax-polly { width: 120px; height: 120px; }
  .ax-result .ax-polly { width: 140px; height: 140px; }
  .ax-res-hero { height: 148px; }
  .ax-acts { display: grid; width: 100%; }
  .ax-acts .btn { width: 100%; }
  /* the score, tries and clock take their own row, so the game's name has room */
  .ax-bar { flex-wrap: wrap; }
  .ax-bar:has(.ax-bar-stats > :not([hidden])) .ax-bar-stats { order: 9; flex-basis: 100%; justify-content: center; padding-top: 6px; border-top: 1px solid var(--hairline, var(--rule)); }

  .ax-buddy { width: 40px; height: 40px; }
}
/* Keyboard focus (research N27): the design system's .btn.ghost drops its shadow, and with it the focus ring; games keep it. */
:where(html:not(.a11y-contrast)) :is(.ax-play, .ax-map, .ax-hub) .btn.ghost:focus-visible { box-shadow: var(--ring); }
/* after the round the live region only speaks the result (the screen shows it in full) */
.ax-play.is-over .ax-fb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* a pair's or rule's explanation: one line per word, so Hebrew and English examples never swap places */
.ax-rule { list-style: none; margin: 6px 0 8px; padding: 0; display: grid; gap: 4px; text-align: start; }
.ax-rule li { padding-inline-start: 12px; border-inline-start: 3px solid var(--rule); line-height: 1.45; }
.ax-rule bdi { display: inline-block; font-weight: 700; color: var(--ink); } /* an example stays in one piece when the line wraps */
.ax-noclock, .ax-textalt { white-space: nowrap; } /* the visible "no clock" switch on every stage map */

/* Unit practice (js/games/arcade-units.js): end-of-lesson card, games-page strip, the tag above a unit round */
.ax-unit-card, .ax-unit-strip { display: grid; gap: 10px; margin: 14px 0; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--rule)); text-align: start; }
.ax-unit-h { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ax-unit-strip .ax-unit-h { flex-direction: column; gap: 2px; }
.ax-unit-games { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-unit-go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.ax-unit-go .ax-ic { width: 26px; height: 26px; }
.ax-unit-tag { margin: 0 0 8px; justify-self: start; display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--rule); }
/* the example sentence and its translation under the word, after an answer */
.ax-fb-ex { display: block; margin-top: 4px; font-size: .92em; }

/* Less text while answering (docs/plan/2026-10-04-less-text-in-practice.md): the lesson's folded blocks (.lg-more,
   .info-tip, .q-row in css/ds/lesson.css) are scoped to .lesson, so the game screens get the same rules here. */
:is(.ax-map, .ax-play) .q-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2, 8px); }
:is(.ax-map, .ax-play) .q-row > p { margin: 0; }
:is(.ax-map, .ax-play) :is(.lg-more, .info-tip) summary { cursor: pointer; list-style: none; }
:is(.ax-map, .ax-play) :is(.lg-more, .info-tip) summary::-webkit-details-marker { display: none; }
:is(.ax-map, .ax-play) .lg-more summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2, 8px); min-height: 44px; font-weight: 700; }
:is(.ax-map, .ax-play) .lg-more summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-inline: 4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
:is(.ax-map, .ax-play) .lg-more[open] summary::after { transform: rotate(-135deg); }
:is(.ax-map, .ax-play) .lg-more > p { margin: 0 0 var(--sp-3, 12px); }
:is(.ax-map, .ax-play) .info-tip { flex: none; }
:is(.ax-map, .ax-play) .info-tip summary { display: grid; place-items: center; width: 44px; height: 44px; margin: -10px; font: italic 700 .95rem/1 var(--font-ui, inherit); color: var(--muted); }
:is(.ax-map, .ax-play) .info-tip summary span { display: grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid currentColor; border-radius: 50%; font-style: normal; }
:is(.ax-map, .ax-play) .info-tip[open] > p { position: absolute; z-index: 2; inset-inline: 0; top: 100%; margin: var(--sp-2, 8px) 0 0; padding: var(--sp-3, 12px); border: 1px solid var(--hairline, var(--rule)); border-radius: var(--r, 16px); background: var(--surface); box-shadow: var(--shadow); line-height: 1.55; text-align: start; font-weight: 400; color: var(--ink); }
:is(.ax-map, .ax-play) :is(.lg-more, .info-tip) summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm, 10px); }
@media (prefers-reduced-motion: reduce) { :is(.ax-map, .ax-play) .lg-more summary::after { transition: none; } }
.ax-how.lg-more { padding-block: 0; }
details.ax-quiet { display: block; margin-top: 18px; color: var(--muted); }
details.ax-quiet summary { justify-content: center; font-weight: 600; }
details.ax-quiet .ax-row { justify-content: center; }
.ax-voice-priv { position: relative; }
.ax-voice-priv[open] > p { inset-inline: auto; width: min(320px, 80vw); }
/* kids mode: a child sees the games, not the totals (learner agents, round 1) */
html.kids .ax-hub-stats, html.kids .ax-hub .ax-meter { display: none; }
/* the daily game's "?" opens over the board, as wide as the clue card */
.ax-daily-clue { position: relative; }
.ax-daily-clue .q-row { position: static; justify-content: center; }
.ax-daily-help[open] > p { inset-inline: 0; }

/* ---------- accessibility (wave 3): focus you can see, in every mode ----------
   The old ring was the accent at 28% opacity (about 1.3:1 on the page), too faint to find with a keyboard (WCAG 1.4.11, 2.4.7).
   Every control of the games page, a stage map and a round gets a solid 3px outline in the text colour, whatever a
   game's own style says. Programmatic focus on a quiet container (tabindex -1) shows nothing. */
:is(.ax-hub, .ax-map, .ax-play) :is(button, a[href], summary, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible:not(.ax-hero-go):not(.ax-node) {
  outline: 3px solid var(--ink) !important; outline-offset: 2px;
}
.ax-body:focus, .ax-body:focus-visible { outline: none !important; }
/* Windows high-contrast (forced colours) drops shadows and colours: keep the focus ring and the answer states visible */
@media (forced-colors: active) {
  :is(.ax-hub, .ax-map, .ax-play) :focus-visible:not(.ax-body) { outline: 3px solid Highlight !important; outline-offset: 2px; }
  .ax-opt.right { border-style: double; border-width: 5px; }
  .ax-opt.wrong { border-style: dashed; }
  .ax-node.done { border-style: double; }
}
