/* Exam-prep app stylesheet, design direction "Quiet Indigo" (Creative, 11 Nov 2026), recoloured 21 Nov 2026 to the
   owner's chosen palette (19 Nov 2026): midnight black #06070A, electric blue #0D77C8, cantaloupe orange #F17943 as the one accent.
   Drop-in replacement for styles.css. Fonts are declared in fonts/fonts.css.
   Plain CSS, logical properties only (inline/block) so Arabic and Persian mirror by themselves.
   Every text pair is measured by tools/test-engine.rb (CONTRAST, both themes). */

/* NO ":has()" IN THE SITE'S STYLESHEETS (24 Nov 2026, handover 358). The Safari-type engine (WebKit 26.4) crashed on screens from
   1024 px wide when two ":has()" questions met on one element (its crash reports: WebCore::SelectorChecker::matchHasPseudoClass).
   What a screen holds is said with plain classes instead: written by app.js render() (.bar.no-brand, .screen.has-hero,
   .screen.has-cols, .screen.has-qgrid, html.has-hero, .fl-side.has-code, .plan-main.two-prices) and by tools/search-pages.rb
   (.has-launch on a landing page with the launch card). tools/check-site.rb fails if a ":has(" selector comes back. */

/* ---------- 2. Tokens ---------- */
:root, [data-theme="light"] {
  color-scheme: light;
  /* colour: surfaces */
  --bg: #F5F7FA;            /* page: cool paper */
  --surface: #FFFFFF;       /* cards, buttons */
  --surface-2: #E9EEF5;     /* sunken: tracks, source box, code box */
  /* colour: text */
  --ink: #10131A;           /* 17.3:1 on bg */
  --ink-muted: #4A5468;     /* 7.1:1 on bg, 6.5:1 on surface-2 */
  /* colour: lines */
  --line: #DCE2EA;          /* decorative hairline only */
  --line-strong: #7A8496;   /* control borders: 3.5:1 on bg, 3.7:1 on surface */
  /* colour: brand (electric blue) */
  --brand: #0D77C8;         /* fills: primary button, chosen borders, progress, focus ring, icons. White on it 4.7:1 */
  --brand-ink: #0A62A6;     /* the same blue, deeper, for text and links: 5.9:1 on bg, 5.4:1 on surface-2 and brand-tint */
  --brand-strong: #0A62A6;  /* pressed */
  --on-brand: #FFFFFF;
  --brand-tint: #E3EEF9;    /* selected state, info note */
  --accent: #F17943;        /* cantaloupe orange: the one accent; decoration only, never text (2.8:1 on white) */
  /* colour: meaning (always with an icon and a word) */
  --good: #0D6B4E;  --good-bg: #E2F3EB;  --on-good: #FFFFFF;
  --bad: #B42318;   --bad-bg: #FDECEA;   --on-bad: #FFFFFF;
  --warn-ink: #8A3410; --warn-bg: #FDEDE5; --warn-line: #C4511C; /* orange family, never the accent itself on text */
  /* elevation */
  --shadow-1: 0 1px 2px rgba(6, 7, 10, .07);
  --shadow-2: 0 8px 20px rgba(6, 7, 10, .14);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06070A; --surface: #0E1117; --surface-2: #161B24;
  --ink: #F3EFE6; --ink-muted: #AEB9CF;
  --line: #232A36; --line-strong: #6F7B95;
  --brand: #0D77C8; --brand-ink: #6DB3F0; --brand-strong: #0A62A6; --on-brand: #FFFFFF; --brand-tint: #0B2440;
  --accent: #F17943;
  --good: #6FD6AE; --good-bg: #0F3024; --on-good: #06070A;
  --bad: #FF8A80;  --bad-bg: #3A1414;  --on-bad: #06070A;
  --warn-ink: #F9A37E; --warn-bg: #2E170D; --warn-line: #D9652F;
  --shadow-1: none;
  --shadow-2: 0 8px 20px rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #06070A; --surface: #0E1117; --surface-2: #161B24;
    --ink: #F3EFE6; --ink-muted: #AEB9CF;
    --line: #232A36; --line-strong: #6F7B95;
    --brand: #0D77C8; --brand-ink: #6DB3F0; --brand-strong: #0A62A6; --on-brand: #FFFFFF; --brand-tint: #0B2440;
    --accent: #F17943;
    --good: #6FD6AE; --good-bg: #0F3024; --on-good: #06070A;
    --bad: #FF8A80;  --bad-bg: #3A1414;  --on-bad: #06070A;
    --warn-ink: #F9A37E; --warn-bg: #2E170D; --warn-line: #D9652F;
    --shadow-1: none;
    --shadow-2: 0 8px 20px rgba(0, 0, 0, .6);
  }
}

:root {
  /* type */
  --font: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ja: "Hiragino Sans", "Noto Sans CJK JP", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --font-mono: ui-monospace, "Roboto Mono", Menlo, Consolas, monospace;
  --lh: 1.5;         /* running text */
  --lh-tight: 1.3;   /* headings, buttons, numbers */
  --fs-xs: 0.8rem;   /* 13.6 px: footer, chip detail */
  --fs-sm: 0.9rem;   /* 15.3 px: secondary lines */
  --fs-md: 1rem;     /* 17 px: body, buttons */
  --fs-lg: 1.18rem;  /* 20 px: question, card titles */
  --fs-xl: 1.47rem;  /* 25 px: screen headline */
  --fs-2xl: 2.82rem; /* 48 px: score */
  /* space (4 px steps) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  /* shape */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --tap: 48px;
  --bar-h: 72px; /* the sticky bar height; app.js replaces it with the measured one */
  font-size: 106.25%; /* 17 px */
}
html.large-text { font-size: 125%; }

/* Script settings: font, line-height, and a size nudge so every script looks the same size. */
[lang="vi"] { --lh: 1.6;  --lh-tight: 1.4;  line-height: var(--lh); }
[lang="ar"], [lang="fa"] { --font: "Noto Sans Arabic", "Noto Sans", system-ui, "Segoe UI", Tahoma, sans-serif; --lh: 1.75; --lh-tight: 1.5; font-family: var(--font); line-height: var(--lh); letter-spacing: 0; }
[lang="ne"], [lang="hi"] { --font: "Noto Sans Devanagari", "Noto Sans", system-ui, "Nirmala UI", sans-serif; --lh: 1.7; --lh-tight: 1.5; font-family: var(--font); line-height: var(--lh); letter-spacing: 0; }
[lang="my"] { --font: "Noto Sans Myanmar", "Noto Sans", system-ui, "Myanmar Text", sans-serif; --lh: 1.9; --lh-tight: 1.7; font-family: var(--font); line-height: var(--lh); letter-spacing: 0; }
[lang="si"] { --font: "Noto Sans Sinhala", "Noto Sans", system-ui, "Sinhala Sangam MN", "Iskoola Pota", "Nirmala UI", sans-serif; --lh: 1.8; --lh-tight: 1.6; font-family: var(--font); line-height: var(--lh); letter-spacing: 0; }
[lang|="zh"] { --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans SC Subset", "Noto Sans", sans-serif; --lh: 1.7; --lh-tight: 1.45; font-family: var(--font); line-height: var(--lh); letter-spacing: 0; } /* zh-Hans: phone Chinese fonts first, our cut-down fallback last */
[lang|="zh"] .sign-example, :is([lang="my"], [lang="si"]) :is(.sign-example, em, i) { font-style: normal; } /* Chinese, Burmese and Sinhala have no italics (the browser would slant them) */
html[lang="ar"], html[lang="fa"], html[lang="my"] { font-size: 112.5%; }               /* 18 px */
html[lang="ar"].large-text, html[lang="fa"].large-text, html[lang="my"].large-text { font-size: 131.25%; } /* 21 px */
[lang="ja"], .ja, .kana { font-family: var(--font-ja); letter-spacing: 0; }

/* ---------- 3. Icons (our own drawings, 24 px grid, 2 px round stroke; used as CSS masks so they take the text colour) ---------- */
:root {
  --next-h: 0px; /* the fixed Next bar's height, set by app.js while a question screen shows it */
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --i-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  --i-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
  --i-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  --i-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6c-2-1.3-4.5-2-8-2v14c3.500 0 6 .7 8 2 2-1.300 4.500-2 8-2V4c-3.500 0-6 .7-8 2zM12 6v14'/%3E%3C/svg%3E");
  --i-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.500-2.900 8.300-7 10-4.100-1.700-7-5.500-7-10V6l7-3z'/%3E%3Cpath d='M9 12l2.200 2.200L15 10'/%3E%3C/svg%3E");
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.400v.2'/%3E%3C/svg%3E");
  --i-list: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4.500 6h.1M4.500 12h.1M4.500 18h.1'/%3E%3C/svg%3E");
  --i-clipboard: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4.500' width='14' height='16.500' rx='2'/%3E%3Cpath d='M9 4.500V3h6v1.500M9 13.500l2 2 4-4'/%3E%3C/svg%3E");
  --i-retry: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.500 12a7.500 7.500 0 1 0 2.400-5.500M4.500 4.500v4.500H9'/%3E%3C/svg%3E");
  --i-sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 9-9 9-9-9zM12 8.500v4.500M12 16v.2'/%3E%3C/svg%3E");
  --i-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6'/%3E%3C/svg%3E");
  --i-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3.500 7.500l8.500 6 8.500-6'/%3E%3C/svg%3E");
  --i-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.500 2.700 3.800 5.700 3.800 9s-1.300 6.300-3.800 9c-2.500-2.700-3.800-5.700-3.800-9S9.500 5.700 12 3z'/%3E%3C/svg%3E");
  --i-gear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19 12a7 7 0 0 0-.1-1.200l2-1.600-2-3.400-2.400 1a7 7 0 0 0-2-1.200L14 3h-4l-.5 2.600a7 7 0 0 0-2 1.200l-2.400-1-2 3.400 2 1.600A7 7 0 0 0 5 12a7 7 0 0 0 .1 1.200l-2 1.600 2 3.400 2.400-1a7 7 0 0 0 2 1.200L10 21h4l.5-2.600a7 7 0 0 0 2-1.200l2.400 1 2-3.400-2-1.600c.1-.4.1-.8.1-1.200z'/%3E%3C/svg%3E");
  --i-flag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4h11l-2 4 2 4H5'/%3E%3C/svg%3E");
  --i-once: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M10.500 9.500L12.500 8v8'/%3E%3C/svg%3E");
  --i-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='3' width='10' height='18' rx='2'/%3E%3Cpath d='M11 17.500h2'/%3E%3C/svg%3E");
}
.i { display: inline-block; flex: none; inline-size: 1.25em; block-size: 1.25em; vertical-align: -0.25em; background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.i-check { --icon: var(--i-check); } .i-cross { --icon: var(--i-cross); } .i-chev { --icon: var(--i-chev); } .i-back { --icon: var(--i-back); }
.i-down { --icon: var(--i-down); } .i-lock { --icon: var(--i-lock); } .i-clock { --icon: var(--i-clock); } .i-book { --icon: var(--i-book); }
.i-shield { --icon: var(--i-shield); } .i-info { --icon: var(--i-info); } .i-list { --icon: var(--i-list); } .i-clipboard { --icon: var(--i-clipboard); }
.i-retry { --icon: var(--i-retry); } .i-sign { --icon: var(--i-sign); } .i-file { --icon: var(--i-file); } .i-mail { --icon: var(--i-mail); }
.i-globe { --icon: var(--i-globe); } .i-gear { --icon: var(--i-gear); } .i-flag { --icon: var(--i-flag); } .i-once { --icon: var(--i-once); } .i-phone { --icon: var(--i-phone); }
[dir="rtl"] .i-chev, [dir="rtl"] .i-back { transform: scaleX(-1); } /* direction arrows follow the reading direction; nothing else is mirrored */

/* ---------- 4. Base ---------- */
* { box-sizing: border-box; }
/* --bar-h is the sticky bar's real height, set by app.js (it grows with two-line titles, Burmese, Sinhala and large text).
   Anything scrolled into view or focused (the answer feedback, a sign group) stops just below the bar, not under it. */
html { scroll-padding-block-start: calc(var(--bar-h) + 8px); scroll-padding-block-end: var(--next-h); } /* a focused control is never left behind the fixed Next bar */
[hidden] { display: none !important; }
body { margin: 0; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-md); line-height: var(--lh);
  -webkit-text-size-adjust: 100%; overflow-wrap: anywhere; font-synthesis: none; }
p { margin: 0; }
a { color: var(--brand-ink); text-underline-offset: 0.18em; }
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); font-weight: 600; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
.small { font-size: var(--fs-sm); color: var(--ink-muted); }
bdi, .num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

#app, .app { max-inline-size: 640px; margin-inline: auto; min-block-size: 100%; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }

/* ---------- 5. Top bar ---------- */
.bar { position: sticky; inset-block-start: 0; z-index: 2; display: flex; align-items: center; gap: var(--s-1);
  min-block-size: 56px; padding: var(--s-1); padding-block-start: max(var(--s-1), env(safe-area-inset-top)); background: var(--bg); border-block-end: 1px solid var(--line); } /* notched phones: nothing sits under the camera cut-out */
.bar-title { flex: 1; min-inline-size: 0; font-size: var(--fs-md); font-weight: 600; line-height: var(--lh-tight); padding-inline: var(--s-1); }
.iconbtn, .iconbtn-space { inline-size: var(--tap); block-size: var(--tap); flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); border-radius: 50%; text-decoration: none; }
.iconbtn .i { inline-size: 24px; block-size: 24px; }
.iconbtn:active { background: var(--surface-2); }
.brand { flex: 1; display: flex; align-items: center; gap: var(--s-2); padding-inline-start: var(--s-3); color: var(--ink); text-decoration: none; }
.brand .mark { inline-size: 32px; block-size: 32px; flex: none; }
.brand .wordmark { block-size: 22px; inline-size: auto; }
.brand .name { font-weight: 600; font-size: var(--fs-lg); line-height: 1; white-space: nowrap; overflow-wrap: normal; }
/* The brand name never breaks and never shrinks; on a narrow phone the language pill beside it gives way (UX check 21 Nov, B1). */
.bar-title.brand { flex: 1 0 auto; }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; padding-inline: var(--s-3); margin-inline-end: var(--s-2);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); font-weight: 600; text-decoration: none;
  flex: 0 1 auto; min-inline-size: 0; }
/* The pill's words wrap only between words ("Bahasa / Indonesia"); one word too long for the room ends in an ellipsis, never overflows. */
.lang-pill > span:not(.i) { min-inline-size: 0; overflow: hidden; overflow-wrap: normal; text-overflow: ellipsis; line-height: var(--lh-tight); text-align: center; }
@media (max-width: 374px) {
  .brand { padding-inline-start: var(--s-2); }
  .lang-pill { padding-inline: var(--s-2); margin-inline-end: var(--s-1); }
}

.screen { flex: 1; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }

/* ---------- 6. Buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: var(--s-2); flex-wrap: wrap;
  min-block-size: var(--tap); inline-size: 100%; padding: 11px var(--s-4);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; line-height: var(--lh-tight); text-align: center; text-decoration: none; cursor: pointer; }
.btn:active { background: var(--surface-2); }
.btn.primary { min-block-size: 52px; background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-1); }
.btn.primary:active { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 0.18em; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }
.btn:disabled { color: var(--ink-muted); border-style: dashed; background: transparent; cursor: default; box-shadow: none; }
.btn.locked-btn { background: transparent; border-style: dashed; }
.linkish { background: none; border: 0; color: var(--brand-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em;
  padding: var(--s-3) 0; min-block-size: var(--tap); cursor: pointer; text-align: start; }

/* ---------- 7. Notes and banners (icon + words, never colour alone) ---------- */
.notice, .banner { position: relative; padding: var(--s-3); padding-inline-start: calc(var(--s-3) + 1.25em + var(--s-2)); border-radius: var(--r-md); font-size: var(--fs-sm); }
.notice { background: var(--brand-tint); color: var(--ink); }
.notice::before, .banner::before { content: ""; position: absolute; inset-inline-start: var(--s-3); inset-block-start: calc(var(--s-3) + 0.12em); inline-size: 1.25em; block-size: 1.25em; background-color: var(--brand);
  -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
.notice[role="alert"], .notice.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.notice[role="alert"]::before, .notice.warn::before { background-color: var(--warn-ink); }
.banner.sample { background: var(--warn-bg); border: 2px dashed var(--warn-line); font-weight: 600; }
.banner.sample::before { background-color: var(--warn-ink); }
.msg:empty { display: none; }
.msg { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); }
.msg.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad); font-weight: 600; }
.msg.info { position: relative; padding-inline-start: calc(var(--s-3) + 1.25em + var(--s-2)); background: var(--brand-tint); color: var(--ink); } /* an account situation, not a typing error (UX check 17 Nov, issue 3) */
.msg.info::before { content: ""; position: absolute; inset-inline-start: var(--s-3); inset-block-start: calc(var(--s-3) + 0.12em); inline-size: 1.25em; block-size: 1.25em; background-color: var(--brand);
  -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
a.mail { overflow-wrap: anywhere; } /* the support address is one tap and may wrap anywhere at large text */
.notice > p + p, .notice > p + .btn { margin-block-start: var(--s-2); }

/* ---------- 8. First screen (welcome) ---------- */
.lang-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip-lang { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; padding: 4px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; line-height: var(--lh-tight); cursor: pointer; }
/* Language names and "choose" lines: one neutral stack. Our Burmese font comes before the phone's fonts so the Burmese name and line
   never fall to a phone's Zawgyi font (my brief 10.2b). Our Sinhala font too, because Apple's Sinhala font draws "සිංහල" visibly
   smaller than every other name (ux check 16 Nov). Each font's unicode-range keeps it off every other script. */
.chip-lang { font-family: "Noto Sans", "Noto Sans Myanmar", "Noto Sans Sinhala", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.chip-lang[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip-lang[aria-pressed="true"]::before { content: ""; inline-size: 1.1em; block-size: 1.1em; background-color: currentColor;
  -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
.chip-lang:disabled { border-style: dashed; background: transparent; color: var(--ink-muted); font-weight: 400; cursor: default; }

/* Optional one-tap questions (small card after a finished practice or mock; never a pop-up) and the privacy page language switch. */
.survey { margin-block-start: var(--s-4); }
.survey-title, .survey-q-title { margin: 0; font-weight: 600; }
.survey-q { display: flex; flex-direction: column; gap: var(--s-2); }
.survey-opts { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.survey-thanks { margin: 0; color: var(--ink-muted); }
.chip-lang small { font-size: var(--fs-xs); font-weight: 400; }
.hero { display: flex; flex-direction: column; gap: var(--s-3); padding-block: var(--s-2) var(--s-1); }
.hero .for { font-size: var(--fs-sm); font-weight: 600; color: var(--brand-ink); display: flex; align-items: center; gap: var(--s-2); }
.hero .for::before { content: ""; inline-size: 18px; block-size: 4px; border-radius: 2px; background: var(--accent); flex: none; } /* the orange centre-line dash: brand detail */
.hero h1, .hero h2 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
[lang="ar"] .hero :is(h1, h2), [lang="fa"] .hero :is(h1, h2), [lang="ne"] .hero :is(h1, h2), [lang="my"] .hero :is(h1, h2), [lang="si"] .hero :is(h1, h2), [lang|="zh"] .hero :is(h1, h2) { letter-spacing: 0; }
.hero .lead { color: var(--ink-muted); }
.cta { display: flex; flex-direction: column; gap: var(--s-2); }
.cta .free { font-size: var(--fs-sm); color: var(--ink); text-align: center; }
.plan { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; }
.plan-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.plan-price { font-weight: 600; font-size: var(--fs-md); }
.plan-price bdi { font-size: var(--fs-lg); white-space: nowrap; } /* the number never splits from its unit (my "1,980 ယန်း", si "යෙන් 1,980") */
.plan .i-chev { color: var(--ink-muted); }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.trust li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); }
.trust .i { color: var(--brand-ink); inline-size: 22px; block-size: 22px; margin-block-start: 1px; }
.section-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-muted); margin-block-start: var(--s-2); }

/* ---------- 9. Home ---------- */
.intro { display: flex; flex-direction: column; gap: var(--s-1); }
.intro h2 { font-size: var(--fs-xl); }
.strip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); font-size: var(--fs-sm); box-shadow: var(--shadow-1); }
.strip .bar-track { margin-block: var(--s-2) var(--s-3); }
.stat { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.stat strong { font-size: var(--fs-lg); font-weight: 600; white-space: nowrap; }
.menu { display: flex; flex-direction: column; gap: var(--s-2); }
/* block, not flex: a label such as "My mistakes (12)" is several text pieces and must stay one line of text */
.menu .btn { display: block; position: relative; text-align: start; min-block-size: 56px; padding-block: 16px; padding-inline: 52px 44px; }
.menu .btn::before { content: ""; position: absolute; inset-inline-start: var(--s-4); inset-block-start: 16px; inline-size: 24px; block-size: 24px; background-color: var(--brand);
  -webkit-mask: var(--icon, var(--i-list)) center / contain no-repeat; mask: var(--icon, var(--i-list)) center / contain no-repeat; }
.menu .btn::after { content: ""; position: absolute; inset-inline-end: var(--s-3); inset-block-start: 18px; inline-size: 20px; block-size: 20px; background-color: var(--ink-muted);
  -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
[dir="rtl"] .menu .btn::after { transform: scaleX(-1); }
.menu .btn.primary::before, .menu .btn.primary::after { background-color: var(--on-brand); }
.menu .btn[href="#/topics"] { --icon: var(--i-list); }
.menu .btn[href="#/mock"] { --icon: var(--i-clipboard); }
.menu .btn[href="#/mistakes"] { --icon: var(--i-retry); }
.menu .btn[href="#/signs"] { --icon: var(--i-sign); }
.menu .btn[href="#/guide"] { --icon: var(--i-file); }

/* ---------- 10. Language menu (top bar button + list, friend remarks 2, 8, 10) ---------- */
.lang-menu { position: relative; flex: 0 1 auto; min-inline-size: 0; }
.lang-menu .lang-pill { margin-inline-end: 0; cursor: pointer; max-inline-size: 100%; }
.lang-panel { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); z-index: 6; inline-size: max-content; min-inline-size: 190px; max-inline-size: calc(100vw - 16px);
  padding: var(--s-1); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-2); }
.lang-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
/* Language names: one neutral stack. Our Burmese font comes before the phone's fonts so the Burmese name never falls to a phone's Zawgyi font, and our Sinhala font too (it draws smaller on Apple phones). Each font's unicode-range keeps it off every other script. */
.lang-pill, .lang-list li { font-family: "Noto Sans", "Noto Sans Myanmar", "Noto Sans Sinhala", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.lang-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-block-size: 44px; padding: 0 var(--s-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); cursor: pointer; }
.lang-list li[aria-selected="true"] { font-weight: 600; background: var(--brand-tint); }
.lang-list li[aria-selected="true"]::after { content: ""; flex: none; inline-size: 1.1em; block-size: 1.1em; background-color: currentColor;
  -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
.lang-list li:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.lang-error { margin: var(--s-1) var(--s-1) 0; padding: var(--s-2); font-size: var(--fs-xs); color: var(--warn-ink); }
.gear-label { display: none; }
@media (min-width: 700px) {
  .iconbtn.gear { inline-size: auto; padding-inline: var(--s-3); gap: var(--s-2); border-radius: var(--r-pill); }
  .gear-label { display: inline; font-size: var(--fs-sm); font-weight: 600; }
}

/* ---------- 11. Topic rows, progress ---------- */
.rows { display: flex; flex-direction: column; gap: var(--s-2); }
.row { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) var(--s-4); min-block-size: var(--tap);
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); }
.row-main { display: flex; flex-direction: column; gap: 2px; }
.row strong { font-weight: 600; }
.row.locked { background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none; }
.row.locked .bar-track { display: none; }
.bar-track { display: block; block-size: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar-fill { display: block; block-size: 100%; background: var(--brand); border-radius: 3px; }
.counter { font-size: var(--fs-sm); color: var(--ink-muted); font-weight: 600; }
.counter .bar-track { margin-block-start: 6px; }

/* ---------- 12. Question card and answers ---------- */
:root, [data-theme="light"] {
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --ex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}
[data-theme="dark"] {
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306070A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --ex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306070A' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root:not([data-theme]) {
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306070A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --ex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306070A' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
} }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); box-shadow: var(--shadow-1); }
.question { font-size: var(--fs-lg); font-weight: 600; line-height: var(--lh); }
.choices { display: flex; flex-direction: column; gap: var(--s-2); }
.choices.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.btn.choice { position: relative; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; text-align: start;
  min-block-size: 76px; padding: var(--s-3) 44px var(--s-3) var(--s-4); padding-inline: var(--s-4) 44px;
  background: var(--surface); border: 1.5px solid var(--line-strong); font-size: var(--fs-lg); }
.btn.choice small { font-weight: 400; font-size: var(--fs-xs); color: var(--ink-muted); }
/* the corner indicator: empty ring = not chosen, dot = chosen, tick = the right answer, cross = your wrong answer */
.btn.choice::after { content: ""; position: absolute; inset-block-start: 12px; inset-inline-end: 12px; inline-size: 22px; block-size: 22px; border-radius: 50%; border: 2px solid var(--line-strong); }
.btn.choice.chosen { border: 2px solid var(--brand); background: var(--brand-tint); }
.btn.choice.chosen::after { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 5px, transparent 5.5px); }
.btn.choice:disabled { color: var(--ink); border-style: solid; background: var(--surface); }
.btn.choice:disabled:not(.is-answer):not(.chosen) { color: var(--ink-muted); background: transparent; }
.btn.choice:disabled.is-answer { border: 2px solid var(--good); background: var(--good-bg); }
.btn.choice:disabled.is-answer::after { border-color: var(--good); background: var(--good) var(--tick) center / 14px no-repeat; }
.btn.choice:disabled.chosen:not(.is-answer) { border: 2px dashed var(--bad); background: var(--bad-bg); }
.btn.choice:disabled.chosen:not(.is-answer)::after { border-color: var(--bad); background: var(--bad) var(--ex) center / 14px no-repeat; }
.btn.choice.mc { font-size: var(--fs-md); min-block-size: 56px; }
.tag { align-self: flex-start; font-size: var(--fs-xs); font-weight: 600; background: var(--warn-bg); color: var(--warn-ink); padding: 2px var(--s-2); border-radius: 6px; }

.feedback { border-radius: var(--r-md); padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); border: 1px solid; border-inline-start-width: 5px; }
.feedback.good { background: var(--good-bg); border-color: var(--good); }
.feedback.bad { background: var(--bad-bg); border-color: var(--bad); }
.verdict { font-weight: 600; font-size: var(--fs-lg); display: flex; align-items: center; gap: var(--s-2); line-height: var(--lh-tight); }
.verdict .icon, .verdict .i { inline-size: 26px; block-size: 26px; border-radius: 50%; flex: none; }
.feedback.good .verdict { color: var(--good); }
.feedback.bad .verdict { color: var(--bad); }
.feedback .answer-was { font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 5px var(--s-3); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: var(--fs-sm); line-height: var(--lh-tight); }
.chip .ja { font-weight: 600; font-size: 1.05em; }
.chip .kana { color: var(--ink-muted); font-size: var(--fs-xs); }

/* Source and "checked on": the trust receipt under every explanation */
.source-wrap { display: flex; flex-direction: column; }
.source { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: var(--r-sm); padding: var(--s-3); font-size: var(--fs-sm); }
.source p { position: relative; padding-inline-start: 1.75em; }
.source p::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.15em; inline-size: 1.2em; block-size: 1.2em; background-color: var(--ink-muted);
  -webkit-mask: var(--i-book) center / contain no-repeat; mask: var(--i-book) center / contain no-repeat; }
.source p.small { color: var(--ink); font-weight: 600; }
.source p.small::before { background-color: var(--good); -webkit-mask-image: var(--i-shield); mask-image: var(--i-shield); }

/* The Next bar (friend remark 11): fixed to the bottom of the window on every question screen (practice, mock test, review),
   full width of the content column, never at the side. Its height is measured into --next-h (app.js watchNextBar); the
   question screen and the footer keep that much room below them, so nothing is ever hidden behind it. A quiet top edge and
   a soft shadow keep text that scrolls under it readable. It respects the phone's bottom edge (safe area). */
.next-bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 3; background: var(--bg); border-block-start: 1px solid var(--line-strong);
  box-shadow: 0 -8px 20px -6px rgba(0, 0, 0, .22); padding: var(--s-2) max(var(--s-4), env(safe-area-inset-right)) max(var(--s-3), env(safe-area-inset-bottom)) max(var(--s-4), env(safe-area-inset-left)); }
.next-bar-in { display: flex; gap: var(--s-2); max-inline-size: 640px; margin-inline: auto; }
.next-bar .btn { flex: 1 1 0; min-inline-size: 0; min-block-size: 56px; }
.next-bar .btn.prev { flex: 0 1 auto; max-inline-size: 42%; padding-inline: var(--s-4); }
.next-bar .btn.next { flex: 1 1 0; }
.qgrid { padding-block-end: var(--next-h); }
.screen.has-qgrid ~ .foot { padding-block-end: calc(var(--s-6) + var(--next-h)); }

/* ---------- 13. Mock test header, timer, navigation ---------- */
.mock-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2); color: var(--ink); }
.mock-top .bar-track { margin-block-start: 0; }
.mock-top > bdi { font-size: var(--fs-md); font-weight: 600; }
.timer { display: inline-flex; align-items: center; gap: 6px; padding: 4px var(--s-3); border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }
.timer::before { content: ""; inline-size: 1.15em; block-size: 1.15em; background-color: var(--ink-muted);
  -webkit-mask: var(--i-clock) center / contain no-repeat; mask: var(--i-clock) center / contain no-repeat; }
.mock-top .bar-track { flex-basis: 100%; }
#mock-screen { display: flex; flex-direction: column; gap: var(--s-3); }
.mock-nav { display: grid; grid-template-columns: 1fr; gap: var(--s-2); }
.mock-nav .btn { min-inline-size: 0; padding-inline: 4px; font-size: var(--fs-sm); overflow-wrap: break-word; }
.btn.flag.on { border: 2px solid var(--warn-line); background: var(--warn-bg); color: var(--ink); }
.jump summary { min-block-size: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--brand-ink); font-weight: 600; }
/* display: flex drops the browser's triangle, so an arrow says it opens; it turns when open (UX check 21 Nov, minor 9) */
.jump summary::after { content: ""; flex: none; inline-size: 1em; block-size: 1em; margin-inline-start: var(--s-2); background-color: currentColor;
  -webkit-mask: var(--i-down) center / contain no-repeat; mask: var(--i-down) center / contain no-repeat; }
.jump[open] summary::after { transform: rotate(180deg); }
.jump summary::-webkit-details-marker { display: none; }
.jump-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.jump-btn { min-block-size: 44px; cursor: pointer; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; }
.jump-btn.done { background: var(--brand-tint); border-color: var(--brand); font-weight: 600; }
.jump-btn.flagged { border: 2px dashed var(--warn-line); }
.jump-btn.here { outline: 3px solid var(--brand); outline-offset: 1px; }
.confirm { border: 2px solid var(--brand); }

/* ---------- 14. Result ---------- */
.result { align-items: stretch; gap: var(--s-4); padding: var(--s-5) var(--s-4); }
.result-score { font-size: var(--fs-2xl); font-weight: 600; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.result-score .of { color: var(--ink-muted); font-weight: 400; }
.result-verdict { display: flex; align-items: center; justify-content: center; gap: var(--s-2); font-size: var(--fs-lg); font-weight: 600; text-align: center; line-height: var(--lh-tight); }
.result-verdict .i { inline-size: 26px; block-size: 26px; flex: none; }
.result.passed .result-verdict { color: var(--good); }
.meter { position: relative; padding-block-end: 26px; }
.meter .bar-track { block-size: 10px; border-radius: 5px; }
.meter .bar-fill { border-radius: 5px; }
.result.passed .meter .bar-fill { background: var(--good); }
.meter-mark { position: absolute; inset-block-start: -4px; inline-size: 2px; block-size: 18px; background: var(--ink); }
.meter-label { position: absolute; inset-block-start: 18px; inset-inline-end: 0; font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 600; white-space: nowrap; }
.result .caption { font-size: var(--fs-sm); color: var(--ink-muted); text-align: center; }
.score { font-size: var(--fs-lg); font-weight: 600; }
.score.good { color: var(--good); }
.card.q { gap: var(--s-2); }
.card.q .question { font-size: var(--fs-md); }

/* ---------- 15. Unlock ---------- */
.includes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.includes li { position: relative; padding-inline-start: 1.9em; }
.includes .i, .includes .icon { position: absolute; inset-inline-start: 0; inset-block-start: 0.12em; color: var(--good); }
.price.card { gap: var(--s-2); border-color: var(--line-strong); }
.price.card strong { font-size: var(--fs-xl); font-weight: 600; line-height: var(--lh-tight); white-space: nowrap; }
.once { display: flex; gap: var(--s-2); align-items: flex-start; font-weight: 600; }
.once .i { color: var(--brand-ink); }
.refund { font-size: var(--fs-sm); color: var(--ink-muted); }
textarea { inline-size: 100%; min-block-size: 96px; padding: var(--s-3); font: 1rem/1.4 var(--font-mono); border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  text-transform: uppercase; text-align: start; background: var(--surface); color: var(--ink); }
.code-box { font-family: var(--font-mono); background: var(--surface-2); padding: var(--s-3); border-radius: var(--r-md); text-align: start; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.code-group { white-space: nowrap; }

/* ---------- 16. Settings bits ---------- */
.seg-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.btn.seg.current { border: 2px solid var(--brand); background: var(--brand-tint); }
.check-row { display: flex; align-items: center; gap: var(--s-3); min-block-size: var(--tap); cursor: pointer; }
.check-row input { inline-size: 28px; block-size: 28px; flex: none; accent-color: var(--brand); }
.tap-link { display: inline-flex; align-items: center; min-block-size: 44px; min-inline-size: 44px; }

/* ---------- 17. Footer: independence line on every screen ---------- */
.foot { padding: var(--s-4) var(--s-4) max(var(--s-6), calc(env(safe-area-inset-bottom) + var(--s-4))); border-block-start: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-muted); display: flex; flex-direction: column; gap: var(--s-2); }
.foot .independent { position: relative; padding-inline-start: 1.9em; color: var(--ink); }
.foot .independent::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.1em; inline-size: 1.3em; block-size: 1.3em; background-color: var(--ink-muted);
  -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-4); } /* spacing, not "·" dots, so no dot is left hanging at a line end */
.foot-links a, .foot-links span { display: inline-flex; align-items: center; min-block-size: 44px; min-inline-size: 44px; padding-inline: 2px; }

/* ---------- 18. Kept from the current app (same class names, new tokens) ---------- */
.icon { display: inline-flex; vertical-align: middle; }
.icon.inline svg { inline-size: 1.1em; block-size: 1.1em; }
[dir="rtl"] .back svg { transform: scaleX(-1); } /* back arrow points the reading way */
.lesson p { font-size: var(--fs-md); }
.row.static { box-shadow: none; }
/* Road-sign pictures (handover 37). Every picture sits on a white plate in both themes, so white and yellow signs and the
   asphalt diagrams keep their real colours on the dark page. Pictures are never mirrored in right-to-left languages:
   they are real objects. width/height on each <img> keep the space reserved while it lazy-loads. */
.sign-plate { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); max-inline-size: 100%; min-inline-size: 0; }
.sign-img { display: block; block-size: auto; max-inline-size: 100%; }
.sign-img.square { inline-size: 96px; }
.sign-img.wide { inline-size: 240px; }
.sign-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.sign-fig figcaption { align-self: stretch; display: flex; flex-direction: column; gap: var(--s-1); }
.sign-name { margin: 0; }
.sign-no { font-size: var(--fs-sm); color: var(--ink-muted); white-space: nowrap; }
.legend { margin: 0; padding-inline-start: 1.2em; font-size: var(--fs-sm); color: var(--ink-muted); display: flex; flex-direction: column; gap: 2px; }
p.legend { padding-inline-start: 0; }
.sign-example { margin: 0; font-style: italic; }
.answer-pics { display: flex; flex-direction: column; gap: var(--s-3); padding-block: var(--s-2); }
.sign-group { display: flex; flex-direction: column; gap: var(--s-2); }
.sign-group h2 { margin-block-start: var(--s-2); scroll-margin-block-start: 64px; }
.sign-list { display: flex; flex-direction: column; gap: var(--s-2); }
.sign-row { display: flex; align-items: center; gap: var(--s-3); min-block-size: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); }
.sign-row .sign-img.square { inline-size: 56px; }
.sign-row .sign-img.wide { inline-size: 96px; }
.sign-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
/* a language with no sign words yet: pictures and numbers in a compact grid instead of rows with nothing to read */
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.sign-grid .sign-row { flex-direction: column; justify-content: center; text-align: center; }
.sign-detail { align-items: stretch; }
.sign-detail .sign-img.square, .sign-img.big.square { inline-size: 140px; }
.sign-detail .sign-img.wide, .sign-img.big.wide { inline-size: 280px; }
.guide h2 { margin-block-start: var(--s-1); }
.guide ul, .guide ol { padding-inline-start: 1.3em; margin: 0; }
#fatal .independent { font-size: var(--fs-xs); color: var(--ink-muted); }

/* ---------- 19. Added by the engineer for the restyle pass ---------- */
/* refund rule in the footer (first screen and unlock page) */
.foot .refund-line { color: var(--ink); }
/* "Report a problem with this question": question number and address as text to select, plus a copy button */
.report-wrap { display: flex; flex-direction: column; }
.report { display: flex; flex-direction: column; gap: var(--s-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3); margin-block-start: var(--s-2); }
.copy-text { font-family: var(--font-mono); font-weight: 600; -webkit-user-select: all; user-select: all; overflow-wrap: anywhere; }

@media (max-width: 340px) {
  .screen { padding: var(--s-3); }
  .card { padding: var(--s-3); }
  .mock-nav .btn { font-size: var(--fs-xs); }
  .btn.choice { padding-inline: var(--s-3) 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip-lang, .row { transition: background-color .15s, border-color .15s; }
}
.chip .local { font-size: var(--fs-sm); } /* a term in the reader's own language, next to the Japanese */

/* ---------- 20. Added with the language packs and the review fixes (11 Nov 2026) ---------- */
/* topic list: free topics first with a quiet "Free" tag */
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pill-free { font-size: var(--fs-xs); font-weight: 600; color: var(--brand-ink); background: var(--brand-tint); border-radius: var(--r-pill); padding: 1px var(--s-2); }
/* first screen: languages that are not ready yet, one quiet line under the Start button */
.soon-line { font-size: var(--fs-xs); color: var(--ink-muted); text-align: center; }
/* the calm "translated with care" line beside Report a problem */
.pack-note { color: var(--ink-muted); margin: 0; }
.foot-links .checked { color: var(--ink-muted); display: inline-block; min-block-size: 0; padding-block: 12px; } /* a block inside, so the space before the date is kept */

/* ---------- 21. Guide pages and the mock timer (11 Nov 2026) ---------- */
/* Guide: one block per section; long Japanese quotes and addresses wrap instead of widening a 320 px screen */
.guide { overflow-wrap: anywhere; }
.guide section { display: flex; flex-direction: column; gap: var(--s-2); }
.guide section + section { padding-block-start: var(--s-3); border-block-start: 1px solid var(--line); }
.guide li + li { margin-block-start: var(--s-1); }
/* the source receipt under each section: "Checked on ..." then the source links, on the sunken colour like the question source box */
.guide p.small strong { color: var(--ink); }
.guide .sources { background: var(--surface-2); border-radius: var(--r-sm); padding: var(--s-3); padding-inline-start: calc(var(--s-3) + 1.1em); color: var(--ink-muted); }
.guide .sources a { font-weight: 600; }
.guide a { display: inline-block; min-block-size: 24px; } /* inline links in vi and ne were 21 to 23 px high */
.source-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-1); }
/* checklists: a tick drawn in front of each line instead of a bullet */
.guide .checklist { list-style: none; padding-inline-start: 0; }
.guide .checklist li { position: relative; padding-inline-start: 1.8em; }
.guide .checklist li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.2em; inline-size: 1.2em; block-size: 1.2em; background-color: var(--good);
  -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
/* Mock timer: orange (never red, never flashing) in the last 5 minutes; a quiet pill when the timer is switched off */
.timer.low { border-color: var(--warn-line); background: var(--warn-bg); color: var(--ink); }
.timer.untimed { font-weight: 400; color: var(--ink-muted); }
/* text for screen readers only (the spoken time reminders) */
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 22. UX check of zh, my and si (16 Nov 2026) ---------- */
/* True/False side by side on a narrow screen or with large text: the corner badge sits above the word, so a long word
   (si "අසත්‍ය") never runs into it. */
@media (max-width: 340px) { .choices.two .btn.choice { padding-block-start: 44px; padding-inline-end: var(--s-3); } }
html.large-text .choices.two .btn.choice { padding-block-start: 44px; padding-inline-end: var(--s-3); }
/* Burmese and Sinhala screen titles often take two lines: a slightly smaller title keeps the sticky bar short. */
:is([lang="my"], [lang="si"]) .bar-title { font-size: 16px; }
html.large-text:is([lang="my"], [lang="si"]) .bar-title { font-size: 18px; }
/* Mock navigation: on a narrow screen or with large text the flag icon goes, so the three buttons are plain labels of one shape. */
@media (max-width: 340px) { .mock-nav .btn.flag .icon { display: none; } }
html.large-text .mock-nav .btn.flag .icon { display: none; }
/* Burmese and Sinhala "Flag" labels are long and wrap to two lines on any phone width, so the icon goes there too. */
@media (max-width: 480px) { :is([lang="my"], [lang="si"]) .mock-nav .btn.flag .icon { display: none; } }
/* Chinese: no single character plus 。 left alone on the last line. */
[lang|="zh"] :is(p, li) { text-wrap: pretty; line-break: strict; }
[lang|="zh"] :is(h1, h2, h3, .bar-title) { text-wrap: balance; } /* no lone last character in a heading */
[lang|="zh"] .row .small { text-wrap: pretty; }
/* Chinese short lines (UX check 16 Nov, z1 to z4): break only at Chinese punctuation, so no word is torn ("一次性付费")
   and no 2-character tail is left alone; overflow-wrap still stops a too-long clause from leaving the screen. */
[lang|="zh"] :is(.plan-price, .plan .small, .once, .hero .lead, .cta .free, .refund, .refund-line, .trust li) { word-break: keep-all; overflow-wrap: anywhere; }
/* The support email moves to its own line whole, so "发邮件至" stays together (it can still wrap if wider than the screen). */
[lang|="zh"] :is(.trust li, p.small) bdi { display: inline-block; max-inline-size: 100%; overflow-wrap: anywhere; }

/* ---------- guide pack: the two options, the driving test guide, its protection (handover 178) ---------- */
/* Two options of equal size and weight: stacked on phones, side by side from 600 px. Nothing makes one look bigger. */
.offers { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
@media (min-width: 600px) { .offers { grid-template-columns: 1fr 1fr; } }
.offer.card { gap: var(--s-2); border: 1.5px solid var(--line-strong); cursor: pointer; } /* the whole card chooses the option */
.offer.card.chosen { border-color: var(--brand); box-shadow: inset 0 0 0 0.5px var(--brand), var(--shadow-1); background: var(--brand-tint); } /* same 1.5 px border chosen or not, so the content never moves and the card keeps the shared padding (N4) */
.offer.card.upgrade { cursor: auto; } /* one offer, nothing to choose: the pay button below is the action */
.offer-head { display: flex; align-items: flex-start; gap: var(--s-2); }
.your-code { display: flex; flex-direction: column; gap: var(--s-2); }
.your-code summary { padding-block: 12px; font-weight: 600; color: var(--brand-ink); cursor: pointer; } /* keeps the open/close triangle */
.offer-head input { flex: none; inline-size: 24px; block-size: 24px; margin: 0; accent-color: var(--brand); }
.offer-title { font-weight: 600; font-size: var(--fs-md); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.offer.card strong { font-size: var(--fs-xl); font-weight: 600; line-height: var(--lh-tight); }
.offer bdi, .pp-price, .row .small bdi { white-space: nowrap; } /* a price never splits from its unit */
[lang|="zh"] .btn.pay { word-break: keep-all; overflow-wrap: anywhere; }
.btn.pay { text-align: center; overflow-wrap: anywhere; }
.key-notice { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.pp-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; }
.pp-card .i-chev { color: var(--ink-muted); }
.pp-go { font-weight: 600; font-size: var(--fs-sm); color: var(--brand-ink); }
/* Paid screens: no selecting or long-press copying of the guide text (zoom, larger text and screen readers still work). */
.pp-read .pp-doc, .pp-read .q { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pp-doc { background-repeat: repeat; }
.pp-copy { display: flex; flex-direction: column; gap: var(--s-1); }
.pp-fig { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.pp-fig svg { display: block; inline-size: 100%; block-size: auto; border-radius: var(--r-md); background: #fff; } /* drawn for a white plate in both themes */
.pp-legend-title { font-weight: 600; }
.pp-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.pp-legend li { display: flex; gap: var(--s-2); align-items: baseline; }
.pp-step { flex: none; display: inline-flex; align-items: center; justify-content: center; min-inline-size: 1.9em; block-size: 1.9em; padding-inline: 0.3em;
  border-radius: var(--r-pill); background: #21407A; color: #FFFFFF; box-shadow: 0 0 0 2px #FFFFFF; font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; } /* same navy and white ring as the markers in the drawings, in both themes */
.pp-symbols { margin: 0; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: 2px; }
.guide .pp-legend, .guide .pp-ticks { padding-inline-start: 0; } /* .guide ul would otherwise indent them */
.guide .pp-symbols { margin-block-start: var(--s-3); } /* a clear gap between the steps and the symbol key */
[lang|="zh"] :is(.pp-legend, .pp-symbols) li { word-break: keep-all; overflow-wrap: anywhere; } /* break at punctuation, not inside a word */
.pp-doc .sources li a { display: inline-flex; align-items: center; min-block-size: 44px; } /* source links are tap targets of their own */
.print-only { display: none; }
.pp-doc table { border-collapse: collapse; inline-size: 100%; font-size: var(--fs-sm); }
.pp-doc th, .pp-doc td { padding: var(--s-1) var(--s-2); border-block-end: 1px solid var(--line); vertical-align: top; text-align: start; overflow-wrap: anywhere; }
.pp-doc th { font-weight: 600; }
/* Narrow screens: each table row becomes a small card (mistake first, then "Points: 10", "Ends the test? No"), so the
   mistake keeps the full width. The labels come from the header cells (data-label, added by tools/passpack-build.rb). */
@media (max-width: 480px) {
  .pp-doc table, .pp-doc tbody, .pp-doc tr, .pp-doc td { display: block; inline-size: auto; }
  .pp-doc thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pp-doc tr { padding-block: var(--s-2); border-block-end: 1px solid var(--line); }
  .pp-doc td { padding: 0; border: 0; }
  .pp-doc td:first-child { font-weight: 600; }
  .pp-doc td[data-label]:not(:first-child)::before { content: attr(data-label); color: var(--ink-muted); }
}
.pp-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.pp-ticks li { display: flex; gap: var(--s-3); align-items: flex-start; }
.pp-ticks input { flex: none; inline-size: 24px; block-size: 24px; margin: 0; accent-color: var(--good); }
.pp-ja { font-family: var(--font-ja); font-size: var(--fs-lg); line-height: var(--lh-tight); }
.pp-print { gap: var(--s-3); }
/* Printing: only the checklist (with the copy number under it) is meant to be printed; the other pack screens print empty. */
@media print {
  .bar, .foot, .btn, .notice, .no-print { display: none; }
  .print-only { display: block; }
  .pp-read .pp-doc:not(.pp-print), .pp-read .q { display: none; }
}

/* ---------- 26. Free mock result: the honest offer (17 Nov 2026, handover 275). Calm: brand border, no red, no motion ---------- */
.card.offer:not([data-offer]) { border: 2px solid var(--brand); margin-block-end: var(--s-2); } /* 12 + 8 px before "Review my mistakes". Not the purchase cards ([data-offer]): same two classes, other component (UX check 21 Nov, minor 1) */
.offer-weak { padding-inline-start: 1.3em; margin: 0; }
.offer-weak li + li { margin-block-start: var(--s-1); }
/* UX check 17 Nov 2026 (sealing): the result card is not itself tappable; Chinese buttons break only at punctuation;
   the Home stat value may wrap at large text instead of widening the page. */
.card.offer:not([data-offer]) { cursor: auto; }
:lang(zh) .card.offer .btn { word-break: keep-all; line-break: strict; text-wrap: balance; }
.tied { white-space: nowrap; } /* a price and the characters a translator tied to it with joiners (zh "1,980日元起，") */
.strip .stat strong { overflow-wrap: anywhere; min-inline-size: 0; }

/* ---------- 27. Laptops and desktops (21 Nov 2026, polish gate section B) ----------
   Phones and tablets (under 1024 px) are unchanged: the wrappers below are plain columns in the same order and with the same
   gaps as before. From 1024 px: wider page, 18 px type, two columns where they help (first screen and Home: the start on the
   left, prices and trust on the right; a question with its progress and test controls beside it; the mock result with the
   next steps beside the score). Single-column screens stay at a reading width, so no line runs too long. */
.split, .col, .qgrid, .q-top, .q-main, .q-side { display: flex; flex-direction: column; gap: var(--s-3); min-inline-size: 0; }
.wrong-list { display: flex; flex-direction: column; gap: var(--s-3); }
@media (min-width: 1024px) {
  :root { font-size: 112.5%; }                                   /* 18 px */
  html.large-text { font-size: 131.25%; }
  html[lang="ar"], html[lang="fa"], html[lang="my"] { font-size: 118.75%; }
  html[lang="ar"].large-text, html[lang="fa"].large-text, html[lang="my"].large-text { font-size: 137.5%; }
  #app, .app { max-inline-size: 1120px; }
  /* One left edge on every screen (UX check 21 Nov, minor 2): the bar's mark (20 + 12 px), the content and the footer all start
     32 px inside the 1120 px frame. Narrow screens hang from that edge instead of being centred. */
  .bar { padding-inline: var(--s-5); }
  .screen { inline-size: 100%; max-inline-size: 880px; margin-inline: 0 auto; padding: var(--s-7) var(--s-7) var(--s-8); gap: var(--s-4); }
  .screen.has-cols { max-inline-size: none; }
  .foot { padding-inline: var(--s-7); } /* search pages and 404: the same edge is set in pages.css */
  /* pages without the app frame (search pages, the "could not load" notice): the same 1120 px frame, drawn with a margin */
  body > .screen { margin-inline-start: max(0px, calc((100% - 1120px) / 2)); }
  /* reading screens (guide, lesson, about, privacy, search pages): about 75 characters a line (UX check 21 Nov, minor 3); grids keep 880 px */
  .screen.text, .screen.guide, .screen.wall { max-inline-size: calc(36rem + 2 * var(--s-7)); }
  /* first-screen price card: each option's name on the left, its price on the right (UX check 21 Nov, minor 8).
     Every language ends these two lines with the price, so the price is always the last item. */
  .plan-main.two-prices.two-prices .plan-price { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
  .plan-main.two-prices.two-prices .plan-price bdi { flex: none; }
  .foot > *, .wall-foot > * { max-inline-size: 880px; }
  .split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; }
  .split > .col { gap: var(--s-4); }
  .hero { padding-block: var(--s-4) var(--s-2); }
  .hero h2 { font-size: 2.1rem; line-height: 1.2; }
  .hero .lead { font-size: var(--fs-lg); }
  .intro h2 { font-size: 1.75rem; }
  .card { padding: var(--s-6); }
  .question { font-size: 1.3rem; }
  .btn.choice { min-block-size: 88px; }
  /* question in the main column; its progress (and in a mock: Previous, Flag, Next, all questions, Finish) beside it */
  .qgrid, #mock-screen.qgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main top" "main side"; grid-template-rows: auto 1fr;
    column-gap: var(--s-7); row-gap: var(--s-4); align-items: start; }
  .q-top { grid-area: top; }
  .q-main { grid-area: main; }
  .q-side { grid-area: side; }
  .q-top .counter { padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  /* the Next bar lines up with the question column: its right edge stops where the side column (320 px + gap) begins */
  .next-bar-in { max-inline-size: 1120px; padding-inline: var(--s-7) calc(2 * var(--s-7) + 320px); }
  .q-side > .btn.quiet { justify-content: flex-start; padding-inline: 0; text-align: start; } /* "Finish" lines up with "All questions" (minor 9) */
  .result-score { font-size: 3.4rem; }
  .wrong-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); align-items: start; }
  .rows { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .sign-list:not(.sign-grid) { display: grid; grid-template-columns: 1fr 1fr; }
  .options { grid-template-columns: 1fr 1fr; }
}

/* ---------- 28. Mouse and trackpad: hover and pressed states (UX check 21 Nov 2026, blocker 2) ----------
   Only devices that can hover get hover looks, so a phone never keeps a "stuck" hover after a tap. Chosen, answered,
   current and disabled items keep their own look; hover never changes what a state means. */
@media (hover: hover) {
  .btn:not(.primary, .quiet, .danger, .chosen, .current, .on, :disabled):hover,
  .chip-lang:not([aria-pressed="true"], :disabled):hover,
  .jump-btn:not(.done):hover { background: var(--surface-2); }
  .btn.primary:not(:disabled):hover, .chip-lang[aria-pressed="true"]:hover { background: #0B6CB7; border-color: #0B6CB7; } /* between --brand and --brand-strong; white on it 5.4:1 */
  .btn.quiet:not(:disabled):hover, .linkish:hover { text-decoration-thickness: 2px; }
  .plan:hover, .pp-card:hover, a.row:not(.locked):hover, .sign-row:hover, .offer.card[data-offer]:not(.chosen, .upgrade):hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
  a.row.locked:hover { border-color: var(--ink-muted); }
  .iconbtn:hover, .lang-pill:hover { background: var(--surface-2); } /* UX re-check 21 Nov, N1 */
  a:not([class]):hover, a.mail:hover, summary:hover { text-decoration: underline; text-decoration-thickness: 2px; }
}
.plan:active, .pp-card:active, a.row:active, .sign-row:active { background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) {
  .plan, .pp-card, .sign-row, .offer.card, .jump-btn { transition: background-color .15s, border-color .15s, box-shadow .15s; }
}

/* ---------- 29. UX check of the longer product names (21 Nov 2026) ---------- */
.bar-title, .offer-title, .plan-price, .btn.pay > span, .pay-for { text-wrap: balance; }
/* A screen title stays on ONE line beside the bar's buttons: too long for the room, it ends in an ellipsis (the full title is the heading text,
   read in full by screen readers, and the tooltip), so the bar is never taller than one row (friend pass, fix 1). */
.bar-title:not(.brand) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-code { display: none; }
/* phone, screens with a title: the language button is a globe and the language's short code (EN, VI ...), so the title keeps the room */
@media (max-width: 599px) {
  .bar.no-brand .lang-menu .lang-name { display: none; }
  .bar.no-brand .lang-menu .lang-code { display: inline; }
}
.pay-price { margin-inline-start: 0.3em; }
.pay-for { margin-block-end: calc(-1 * var(--s-1)); text-align: center; font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.stat { flex-wrap: wrap; }
.stat strong { margin-inline-start: auto; }
@media (min-width: 1024px) {
  .plan-main.two-prices.two-prices .plan-price { flex-wrap: wrap; }
  .plan-main.two-prices.two-prices .plan-price bdi { margin-inline-start: auto; }
}
@media (max-width: 400px) { html.large-text .screen > .btn { padding-inline: var(--s-2); } }
