/* =====================================================================
   Apple-style layer (loaded last on every layout).
   SF Pro / Inter, system colours, hairline separators, vibrancy blur,
   pill buttons, segmented controls, iOS-style icon tiles.
   Remove the <link> to apple.css in includes/header.php to switch it off.
   ===================================================================== */
:root, :root[data-theme="dark"] {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif;
  --a-page: #000000;
  --a-bg2: #1c1c1e;          /* grouped background / cards */
  --a-bg3: #2c2c2e;          /* elevated / fills */
  --a-fill: rgba(118, 118, 128, 0.24);
  --a-fill-2: rgba(118, 118, 128, 0.16);
  --a-sep: rgba(255, 255, 255, 0.09);
  --a-label: #f5f5f7;
  --a-label-2: #a1a1a6;
  --a-label-3: #6e6e73;
  --a-blue: #0a84ff;
  --a-blue-hover: #409cff;
  --a-blue-text: #2997ff;
  --a-green: #30d158;
  --a-green-strong: #248a3d;
  --a-red: #ff453a;
  --a-red-strong: #e5302a;
  --a-orange: #ff9f0a;
  --a-yellow: #ffd60a;
  --a-indigo: #5e5ce6;
  --a-teal: #40c8e0;
  --a-glass: rgba(28, 28, 30, 0.72);
  --a-glass-head: rgba(22, 22, 23, 0.8);
  --a-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 30px rgba(0, 0, 0, 0.35);
  --a-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 40px rgba(0, 0, 0, 0.45);
  --a-thumb: #636366;

  --c-bg: var(--a-page); --c-bg-glow: rgba(10, 132, 255, 0.10);
  --c-text: var(--a-label); --c-text-muted: var(--a-label-2); --c-text-dim: var(--a-label-3); --c-sub: var(--a-label-2);
  --c-accent: var(--a-blue-text); --c-accent-soft: rgba(10, 132, 255, 0.16); --c-accent-border: rgba(10, 132, 255, 0.35);
  --c-primary: var(--a-blue); --c-primary-hover: var(--a-blue-hover); --grad-primary: var(--a-blue);
  --c-success: var(--a-green); --c-success-strong: var(--a-green-strong); --c-success-soft: rgba(48, 209, 88, 0.14); --c-success-border: rgba(48, 209, 88, 0.3);
  --c-danger: var(--a-red); --c-danger-strong: var(--a-red-strong); --c-danger-soft: rgba(255, 69, 58, 0.14); --c-danger-border: rgba(255, 69, 58, 0.32);
  --c-warning: var(--a-orange); --c-warning-soft: rgba(255, 159, 10, 0.16);
  --c-surface: var(--a-bg2); --c-surface-2: var(--a-fill-2); --c-surface-solid: var(--a-bg2); --c-surface-hover: var(--a-fill); --c-surface-3: var(--a-bg2);
  --c-border: var(--a-sep); --c-border-strong: rgba(255, 255, 255, 0.16);
  --c-panel: rgba(18, 18, 20, 0.66); --c-panel-bd: var(--a-sep); --c-panel-sh: 0 30px 80px rgba(0, 0, 0, 0.5);
  --c-card: var(--a-bg2); --c-card-2: var(--a-bg2); --c-card-bd: var(--a-sep);
  --c-card-hover-bd: rgba(255, 255, 255, 0.14); --c-card-hover-sh: var(--a-shadow-hover);
  --c-input-bg: var(--a-bg3); --c-bar-bg: var(--a-glass-head);
  --c-brand-bg: transparent; --c-brand-bg-hover: var(--a-fill-2);
  --c-nav-active: var(--a-blue); --c-nav-active-bd: transparent;
  --c-seg-bg: var(--a-fill); --c-seg-bd: transparent; --c-seg-on-bg: var(--a-thumb); --c-seg-on-fg: #fff; --c-seg-on-sh: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  --c-tile-ic-bg: var(--a-blue); --c-tile-red-bg: var(--a-bg2); --c-tile-red-bd: rgba(255, 69, 58, 0.35);
  --c-ms-card: var(--a-bg2); --c-ms-track: var(--a-bg3);
  --c-ex-page: var(--a-page); --c-ex-opt: var(--a-bg2); --c-ex-opt-fg: var(--a-label); --c-ex-nav: var(--a-bg2); --c-ex-page-btn: var(--a-bg2);
  --c-rs-opt: var(--a-bg3);
  --c-alert-err-fg: #ffb4ae; --c-alert-ok-fg: #a8f0bb; --c-menu-bars: var(--a-label);
  --shadow-focus: 0 0 0 4px rgba(10, 132, 255, 0.45);
  --blur: saturate(180%) blur(20px);
  --r-sm: 10px; --r-md: 12px; --r-lg: 18px; --r-xl: 22px;

  --lp-page-bg: var(--a-page); --lp-label-bg: transparent; --lp-label-fg: var(--a-orange);
  --lp-h: var(--a-label); --lp-p: var(--a-label-2);
  --lp-card-bg: var(--a-bg2); --lp-card-bd: transparent; --lp-card-sh: none;
  --lp-card2-bg: var(--a-bg2); --lp-card2-bd: transparent; --lp-faq-sh: none;
  --lp-chip-bg: var(--a-blue); --lp-chip-fg: #fff; --lp-solid-bg: var(--a-blue); --lp-solid-fg: #fff;
  --lp-notice-bg: var(--a-bg2); --lp-notice-bd: transparent; --lp-notice-h: var(--a-label); --lp-notice-p: var(--a-label-2);
  --lp-mock-bd: rgba(255, 255, 255, 0.1); --lp-mock-sh: 0 40px 100px rgba(0, 0, 0, 0.6);
  --lp-primary: var(--a-blue); --lp-primary-hover: var(--a-blue-hover); --lp-primary-sh: none;
  --lp-r: 22px;
  --au-card: rgba(28, 28, 30, 0.78); --au-text: var(--a-label);
}
:root[data-theme="light"] {
  --a-page: #f5f5f7;
  --a-bg2: #ffffff;
  --a-bg3: #f2f2f7;
  --a-fill: rgba(118, 118, 128, 0.12);
  --a-fill-2: rgba(118, 118, 128, 0.08);
  --a-sep: rgba(0, 0, 0, 0.08);
  --a-label: #1d1d1f;
  --a-label-2: #6e6e73;
  --a-label-3: #86868b;
  --a-blue: #0071e3;
  --a-blue-hover: #0077ed;
  --a-blue-text: #0066cc;
  --a-green: #34c759;
  --a-green-strong: #248a3d;
  --a-red: #ff3b30;
  --a-red-strong: #d70015;
  --a-orange: #c93400;
  --a-glass: rgba(255, 255, 255, 0.72);
  --a-glass-head: rgba(255, 255, 255, 0.78);
  --a-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 4px 20px rgba(0, 0, 0, 0.05);
  --a-shadow-hover: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 12px 36px rgba(0, 0, 0, 0.1);
  --a-thumb: #ffffff;
  --c-success: var(--a-green-strong); --c-danger: var(--a-red-strong); --c-warning: var(--a-orange);
  --c-success-soft: rgba(52, 199, 89, 0.14); --c-danger-soft: rgba(255, 59, 48, 0.1); --c-warning-soft: rgba(255, 149, 0, 0.14);
  --c-border-strong: rgba(0, 0, 0, 0.16);
  --c-panel: rgba(255, 255, 255, 0.6); --c-panel-sh: 0 30px 80px rgba(0, 0, 0, 0.08);
  --c-seg-on-fg: var(--a-label);
  --c-alert-err-fg: #b3261e; --c-alert-ok-fg: #1d6b32;
  --c-ex-opt: #ffffff; --c-ex-page-btn: #ffffff; --c-ex-nav: #ffffff;
  --shadow-focus: 0 0 0 4px rgba(0, 113, 227, 0.3);
  --au-card: rgba(255, 255, 255, 0.82);
  --lp-mock-bd: rgba(0, 0, 0, 0.08); --lp-mock-sh: 0 40px 100px rgba(0, 0, 0, 0.18);
}

/* ---------- typography ---------- */
html body *:not(svg):not(svg *):not(kbd) { font-family: var(--font-sans) !important; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -0.011em; text-rendering: optimizeLegibility; }
h1, h2, h3, .lp-h1, .lp-h2, .page-head h1, .rs-hero h1, .au h1 { letter-spacing: -0.025em; }
.page-head h1 { font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.07; letter-spacing: -0.03em; }
.kicker { color: var(--a-orange); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
:root[data-theme="dark"] .kicker { color: var(--a-orange); }
.lead { color: var(--a-label-2); font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; }
.page-head { border-bottom-color: var(--a-sep); padding-bottom: 20px; }
a { color: var(--a-blue-text); }

/* ---------- page backgrounds ---------- */
body, .layout-shell, .layout-bare, .layout-landing, .layout-auth { background: var(--a-page); background-image: none; }
.layout-shell { background-image: radial-gradient(1200px 600px at 15% -10%, rgba(10, 132, 255, 0.16), transparent 60%), radial-gradient(900px 500px at 100% 110%, rgba(94, 92, 230, 0.14), transparent 60%); background-attachment: fixed; }
:root[data-theme="light"] .layout-shell { background-image: radial-gradient(1200px 600px at 15% -10%, rgba(0, 113, 227, 0.08), transparent 60%), radial-gradient(900px 500px at 100% 110%, rgba(94, 92, 230, 0.07), transparent 60%); }

/* ---------- shell ---------- */
.glass { background: var(--a-glass); border: 1px solid var(--a-sep); box-shadow: var(--c-panel-sh); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px); }
.panel.glass { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 8px 4px 22px 14px; }
.sidebar { border-radius: 22px; padding: 14px; gap: 14px; position: sticky; top: 28px; height: calc(100vh - 56px); overflow-y: auto; scrollbar-width: none; }
.brand { padding: 8px; border-radius: 14px; }
.brand-logo { border-radius: 11px; width: 40px; height: 40px; background: linear-gradient(180deg, #2997ff, #0071e3); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2); }
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { color: var(--a-label-2); font-size: 13px; }
.nav { gap: 2px; }
.nav-label { color: var(--a-label-3); font-weight: 600; font-size: 12px; letter-spacing: 0.02em; text-transform: none; padding: 14px 10px 4px; }
.nav-link { padding: 8px 10px; gap: 10px; border-radius: 10px; border: 0; font-size: 15px; line-height: 22px; font-weight: 500; letter-spacing: -0.015em; }
.nav-link .ic { width: 26px; height: 26px; padding: 5px; border-radius: 7px; background: var(--a-blue); color: #fff; }
.nav a.nav-link:nth-child(2) .ic { background: var(--a-indigo); }
.nav a.nav-link:nth-child(3) .ic { background: var(--a-green-strong); }
.nav a.nav-link:nth-child(4) .ic { background: #ff9500; }
.nav a.nav-link:nth-child(5) .ic { background: var(--a-red); }
.nav a.nav-link:nth-child(6) .ic { background: #8e8e93; }
.nav a.nav-link:nth-child(7) .ic { background: #5856d6; }
.nav-label ~ .nav-link .ic { background: #636366; }
.nav-link:hover { background: var(--a-fill-2); }
.nav-link.is-active { background: var(--a-blue); color: #fff; }
.nav-link.is-active .ic { background: rgba(255, 255, 255, 0.22); }
.side-foot { border-top-color: var(--a-sep); gap: 10px; }
.seg { padding: 2px; gap: 0; border: 0; border-radius: 9px; background: var(--a-fill); }
.seg a, .seg button { border-radius: 7px; padding: 6px 4px; font-size: 13px; font-weight: 500; color: var(--a-label); letter-spacing: -0.01em; transition: background .2s, box-shadow .2s; }
.seg .is-active { background: var(--c-seg-on-bg); color: var(--c-seg-on-fg); box-shadow: var(--c-seg-on-sh); font-weight: 600; }
.seg a:hover, .seg button:hover { color: inherit; }
.user-chip { font-weight: 600; }
.avatar { background: linear-gradient(180deg, #a1a1a6, #6e6e73); font-weight: 600; }
.link-danger { color: var(--a-red); font-weight: 500; font-size: 15px; }
.menu-fab { border-radius: 50%; background: var(--a-glass); border-color: var(--a-sep); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }

/* quick strip, cards, tiles */
.qstrip__btn { min-height: 48px; border-radius: 980px; border: 0; background: var(--a-bg2); box-shadow: var(--a-shadow); font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }
.qstrip__btn:hover { box-shadow: var(--a-shadow-hover); border-color: transparent; }
.qstrip__btn .ic { color: var(--a-blue-text); }
.qstrip__btn--cta { background: var(--a-blue); color: #fff; box-shadow: none; }
.qstrip__btn--cta:hover { background: var(--a-blue-hover); box-shadow: none; }
.qstrip__btn--cta .ic { color: #fff; }
.card, .stat, .tile, .ms-card, .ms-kpi, .pf-panel, .rs-hero, .rs-stat, .rs-review, .hint-row, .q-item { border: 0; box-shadow: var(--a-shadow); background: var(--a-bg2); }
.card { border-radius: 22px; padding: 20px; }
.stat { border-radius: 18px; padding: 14px 16px; }
.stat:hover, .tile:hover, .hint-row:hover { transform: translateY(-2px); box-shadow: var(--a-shadow-hover); border-color: transparent; }
.stat-ic { width: 34px; height: 34px; border-radius: 9px; color: #fff; background: #ff9f0a; }
.overview > :nth-child(2) .stat-ic { background: var(--a-red); }
.overview > :nth-child(3) .stat-ic { background: var(--a-indigo); }
.stat-label { font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }
.stat-num { color: var(--a-label); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile { border-radius: 22px; min-height: 132px; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.tile-ic { width: 46px; height: 46px; border-radius: 12px; color: #fff; background: var(--a-blue); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18); }
.tiles > :nth-child(2) .tile-ic, .tiles > .tile:nth-child(2) .tile-ic { background: var(--a-indigo); }
.tiles > .tile:nth-child(4) .tile-ic, .tiles > form:nth-child(2) .tile-ic { background: #ff9f0a; }
.tile-title { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.tile-sub { color: var(--a-label-2); font-size: 14px; }
.tile-badge { background: var(--a-fill); color: var(--a-label); font-weight: 600; }
.tile--red { background: var(--a-bg2); box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.35), var(--a-shadow); }
.tile--red .tile-ic { background: var(--a-red); color: #fff; }
.tile--red .tile-badge { background: var(--a-red); color: #fff; }
.hint-row .ic, .empty-big .ic { color: var(--a-blue-text); }
.hint-row strong, .empty-big h3 { font-weight: 600; letter-spacing: -0.02em; }
.empty, .empty-big { border-style: solid; border-color: var(--a-sep); }

/* buttons / inputs */
.btn { border-radius: 980px; border: 0; background: var(--a-fill); color: var(--a-label); font-weight: 600; font-size: 15px; letter-spacing: -0.015em; min-height: 40px; padding: 8px 20px; }
.btn:hover { background: var(--a-fill); filter: brightness(1.12); border-color: transparent; }
.btn-primary, .btn-grad { background: var(--a-blue); color: #fff; }
.btn-primary:hover, .btn-grad:hover { background: var(--a-blue-hover); filter: none; }
.btn-danger { background: rgba(255, 69, 58, 0.14); color: var(--a-red); }
.btn-sm { min-height: 30px; padding: 4px 14px; font-size: 13px; }
.input, select.input, textarea.input { border-radius: 12px; border: 1px solid transparent; background: var(--a-bg3); min-height: 44px; font-size: 16px; }
.input:focus { border-color: var(--a-blue); box-shadow: var(--shadow-focus); }
.field label, .label { color: var(--a-label-2); font-weight: 500; font-size: 13px; }
.alert { border-radius: 14px; border: 0; }
.badge { border-radius: 980px; font-weight: 600; }
.table-wrap { border: 0; border-radius: 18px; background: var(--a-bg2); box-shadow: var(--a-shadow); }
.table th { background: transparent; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; color: var(--a-label-2); }
.table th, .table td { border-bottom-color: var(--a-sep); }
.table tr:hover td { background: var(--a-fill-2); }
.progress { background: var(--a-fill); height: 8px; }
.progress > span { background: var(--a-blue); }
.modal { background: rgba(0, 0, 0, 0.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-box { border-radius: 22px; padding: 28px 24px 22px; }
.modal-box h3 { font-weight: 600; font-size: 19px; }

/* stats */
.ms-card, .ms-kpi { border-radius: 22px; }
.ms-card h3 { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.ms-kpi { padding: 14px 16px; }
.ms-kpi .ic { width: 26px; height: 26px; padding: 5px; border-radius: 7px; background: var(--a-blue); color: #fff; }
.ms-kpis > :nth-child(2) .ic { background: var(--a-indigo); }
.ms-kpis > :nth-child(3) .ic { background: #ff9f0a; }
.ms-kpis > :nth-child(4) .ic { background: var(--a-red); }
.ms-kpis > :nth-child(5) .ic { background: var(--a-teal); }
.ms-kpis > :nth-child(6) .ic { background: var(--a-green-strong); }
.ms-kpi small { font-weight: 500; font-size: 13px; color: var(--a-label-2); }
.ms-kpi strong { font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
.ms-score { border-radius: 980px; font-weight: 600; padding: 1px 9px; }
.ms-score.is-bad { background: rgba(255, 69, 58, .15); color: var(--a-red); }
.ms-score.is-mid { background: rgba(255, 159, 10, .16); color: var(--a-orange); }
.ms-score.is-ok { background: rgba(48, 209, 88, .16); color: var(--c-success); }
.ms-progress { background: var(--a-fill); }
.ms-progress i { background: var(--a-blue); }
.ms-progress i.is-ok { background: var(--a-green); } .ms-progress i.is-mid { background: #ff9f0a; } .ms-progress i.is-bad { background: var(--a-red); }
.ms-ring__bg, .rs-ring__bg { stroke: var(--a-fill); }
.ms-ring__fg.is-learning { stroke: #ff9f0a; } .ms-status.is-learning { color: var(--a-orange); }
.ms-ring__fg.is-good { stroke: var(--a-blue); } .ms-status.is-good { color: var(--a-blue-text); }
.ms-ring__fg.is-ready { stroke: var(--a-green); } .ms-status.is-ready { color: var(--c-success); }
.ms-status { font-weight: 600; letter-spacing: -0.02em; }
.ms-bars__bar { border-radius: 4px; background: var(--a-fill-2); }
.ms-bars__bar .is-correct, .ms-legend .is-correct { background: var(--a-green); }
.ms-bars__bar .is-wrong, .ms-legend .is-wrong { background: var(--a-red); }
.ms-legend i { border-radius: 50%; }
.ms-tips h3 .ic { color: #ff9f0a; }

/* profile */
.pf-panel { border-radius: 22px; padding: 22px; }
.pf-avatar__img { background: linear-gradient(180deg, #a1a1a6, #6e6e73); font-weight: 600; box-shadow: none; }
.pf-role { border-radius: 980px; background: var(--a-blue); font-weight: 600; padding: 7px 14px; }
.pf-row { border: 0; background: var(--a-bg3); border-radius: 14px; }
.pf-row span { color: var(--a-label-2); }
.pf-row strong { font-weight: 600; }

/* ---------- exam screen ---------- */
.ex-bar { position: sticky; top: 0; z-index: 20; gap: 12px; padding: 12px 20px; background: var(--a-glass-head); border-bottom: 1px solid var(--a-sep); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.ex-btn { height: 36px; padding: 0 18px; border-radius: 980px; font-weight: 600; font-size: 15px; }
.ex-btn--primary { background: var(--a-blue); }
.ex-btn--primary:hover { background: var(--a-blue-hover); }
.ex-title { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.ex-timer { height: 36px; padding: 0 14px; gap: 8px; border: 0; border-radius: 980px; background: var(--a-fill); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.ex-timer .ic { width: 20px; height: 20px; color: var(--a-label-2); }
.ex-timer.is-low { background: rgba(255, 69, 58, 0.16); color: var(--a-red); }
.ex-select { height: 36px; border-radius: 980px; background-color: var(--a-fill); color: var(--a-label); font-weight: 500; font-size: 15px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.ex-select option { color: #000; }
.ex-icon { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--a-fill); }
.ex-icon .ic { width: 19px; height: 19px; }
.ex-icon--warn { color: #ff9f0a; }
.ex-star.is-on { color: var(--a-yellow); }
.ex-q { margin: 20px 20px 0; min-height: 96px; padding: 22px 32px; border-radius: 22px; background: var(--a-blue); box-shadow: 0 18px 50px rgba(10, 132, 255, 0.25); transition: background .25s, box-shadow .25s; }
.ex-q.is-correct { background: var(--a-green-strong); box-shadow: 0 18px 50px rgba(36, 138, 61, 0.3); }
.ex-q.is-wrong { background: var(--a-red-strong); box-shadow: 0 18px 50px rgba(229, 48, 42, 0.3); }
.ex-q__text { font-weight: 600; font-size: clamp(20px, 2.2vw, 32px); line-height: 1.3; letter-spacing: -0.025em; }
.ex-body { gap: 20px; padding-top: 20px; }
.ex-media { border-radius: 22px; background: #000; box-shadow: var(--a-shadow); }
.ex-opts { gap: 10px; }
.ex-opt { min-height: 56px; padding: 6px; gap: 0; align-items: center; border-radius: 16px; background: var(--a-bg2); box-shadow: var(--a-shadow); font-size: 18px; line-height: 25px; letter-spacing: -0.02em; transition: transform .15s, box-shadow .15s, background .2s; }
.ex-opt:hover:not([disabled]) { filter: none; transform: translateY(-1px); box-shadow: var(--a-shadow-hover); }
.ex-opt__key { width: 44px; height: 44px; align-self: center; border-radius: 11px; background: var(--a-fill); color: var(--a-blue-text); font-weight: 700; font-size: 15px; }
.ex-opt__text { padding: 8px 14px; }
.ex-opt.is-wrong { background: var(--a-red-strong); color: #fff; }
.ex-opt.is-correct { background: var(--a-green-strong); color: #fff; }
.ex-opt.is-wrong .ex-opt__text, .ex-opt.is-correct .ex-opt__text { background: none; }
.ex-opt.is-wrong .ex-opt__key, .ex-opt.is-correct .ex-opt__key { background: rgba(255, 255, 255, 0.22); color: #fff; }
.ex-explain { border: 0; border-radius: 16px; background: var(--a-bg2); box-shadow: var(--a-shadow); }
.ex-explain strong { color: var(--a-blue-text); font-weight: 600; }
.ex-nav { height: 36px; padding: 0 16px; border: 0; border-radius: 980px; background: var(--a-fill); font-weight: 600; font-size: 15px; }
.ex-pages { gap: 6px; }
.ex-pages button { min-width: 36px; height: 36px; border-radius: 10px; background: var(--a-bg2); box-shadow: var(--a-shadow); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ex-pages button:hover { filter: none; box-shadow: var(--a-shadow-hover); }
.ex-pages .is-correct { background: var(--a-green-strong); }
.ex-pages .is-wrong { background: var(--a-red-strong); }
.ex-pages .is-current { background: var(--a-blue); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3); }
.ex-help kbd { border: 0; background: var(--a-fill); border-radius: 6px; font-family: var(--font-sans); }

/* ---------- result ---------- */
.rs-hero { border-radius: 26px; border-top: 0; padding: 28px; overflow: hidden; }
.rs-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--a-red); }
.rs-hero.is-pass::before { background: var(--a-green); }
.rs-ring__fg { stroke: var(--a-red); } .is-pass .rs-ring__fg { stroke: var(--a-green); }
.rs-ring__val { font-weight: 700; letter-spacing: -0.03em; }
.rs-kicker { font-weight: 600; color: var(--a-label-2); }
.rs-hero h1 { font-weight: 700; letter-spacing: -0.03em; }
.rs-warn { color: var(--a-orange); font-weight: 600; }
.rs-stat { border-radius: 20px; }
.rs-stat b { font-weight: 700; font-size: 26px; letter-spacing: -0.03em; }
.rs-stat > span:last-child { font-weight: 500; }
.rs-dot.is-ok { background: var(--a-green); } .rs-dot.is-bad { background: var(--a-red); } .rs-dot.is-empty { background: #8e8e93; color: #fff; }
.rs-btn { height: 44px; padding: 0 20px; border-radius: 980px; border: 0; font-weight: 600; font-size: 16px; letter-spacing: -0.015em; }
.rs-btn--primary { background: var(--a-blue); }
.rs-btn--outline { background: rgba(10, 132, 255, 0.14); color: var(--a-blue-text); }
.rs-btn--danger { background: rgba(255, 69, 58, 0.14); color: var(--a-red); }
.rs-review { border-radius: 26px; padding: 20px; }
.rs-review__head h2 { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.rs-tabs { padding: 2px; gap: 0; border-radius: 9px; background: var(--a-fill); }
.rs-tabs button { border-radius: 7px; padding: 6px 12px; font-weight: 500; font-size: 13px; color: var(--a-label); }
.rs-tabs .is-active { background: var(--c-seg-on-bg); color: var(--c-seg-on-fg); box-shadow: var(--c-seg-on-sh); font-weight: 600; }
.rs-item { border: 0; border-radius: 18px; background: var(--a-bg3); box-shadow: inset 4px 0 0 #8e8e93; padding: 16px 18px 16px 22px; }
.rs-item.is-wrong { box-shadow: inset 4px 0 0 var(--a-red); } .rs-item.is-correct { box-shadow: inset 4px 0 0 var(--a-green); }
.rs-item h3 { font-weight: 600; letter-spacing: -0.02em; }
.rs-item__img { border-radius: 14px; }
.rs-opt { border-radius: 12px; background: var(--a-bg2); }
.rs-opt.is-wrong { background: rgba(255, 69, 58, 0.14); } .rs-opt.is-correct { background: rgba(48, 209, 88, 0.15); }
.rs-pill { border-radius: 980px; font-weight: 600; }
.rs-pill.is-ok { color: var(--c-success); } .rs-pill.is-bad { color: var(--a-red); }

/* ---------- landing ---------- */
.lp-head { padding: 0 clamp(12px, 4vw, 48px); background: var(--a-glass-head); border-bottom: 1px solid var(--a-sep); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.lp-head__in { min-height: 56px; }
.lp-brand__name { font-weight: 600; letter-spacing: -0.01em; }
.lp-brand__logo { border-radius: 10px; }
.lp-nav a { font-weight: 400; font-size: 13.5px; color: var(--a-label); opacity: 0.85; letter-spacing: -0.01em; }
.lp-nav a:hover { opacity: 1; background: none; }
.lp-hbtn { height: 32px; border-radius: 980px; font-weight: 500; font-size: 13.5px; border: 0; background: var(--a-fill); color: var(--a-label); }
.lp-hbtn--primary, .lp-hbtn--primary:hover { background: var(--a-blue); color: #fff; }
.lp-hbtn--icon { width: 32px; padding: 0; }
.lp-lang { height: 32px; border-radius: 980px; border: 0; background-color: var(--a-fill); color: var(--a-label); font-size: 13.5px; }
.lp-btn { height: 48px; padding: 0 24px; border-radius: 980px; font-weight: 500; font-size: 17px; letter-spacing: -0.02em; box-shadow: none; }
.lp-btn--primary { background: var(--a-blue); }
.lp-btn--primary:hover { background: var(--a-blue-hover); transform: none; }
.lp-btn--secondary { background: transparent; color: var(--a-blue-text); border: 1px solid currentColor; }
.lp-hero .lp-btn--secondary { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.lp-btn--white { background: #fff; color: #1d1d1f; }
.lp-hero { background: radial-gradient(900px 500px at 75% 20%, rgba(10, 132, 255, 0.28), transparent 60%), radial-gradient(700px 500px at 20% 90%, rgba(94, 92, 230, 0.22), transparent 60%), #000; color: #f5f5f7; }
.lp-hero { background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.62) 55%, rgba(0, 0, 0, 0.2)), var(--lp-hero-img, radial-gradient(900px 520px at 78% 25%, rgba(10, 132, 255, 0.35), transparent 62%)), radial-gradient(700px 500px at 20% 95%, rgba(94, 92, 230, 0.25), transparent 60%), #000; background-size: cover; background-position: center; }
.lp-eyebrow { min-height: 0; padding: 0; background: none; color: #ff9f0a; text-transform: none; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.lp-h1 { font-weight: 700; letter-spacing: -0.045em; line-height: 1; background: linear-gradient(180deg, #ffffff 30%, #a1a1a6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero__lead { color: #a1a1a6; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.38; letter-spacing: -0.02em; }
.lp-stat { border-radius: 18px; background: rgba(255, 255, 255, 0.06); border: 0; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.lp-stat strong { font-weight: 700; letter-spacing: -0.03em; }
.lp-panel { border-radius: 26px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(28, 28, 30, 0.6); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); }
.lp-panel__badge { border-radius: 980px; }
.lp-panel__score strong { font-weight: 700; letter-spacing: -0.04em; }
.lp-track { background: rgba(255, 255, 255, 0.12); }
.lp-track span { background: var(--a-blue); }
.lp-label { height: auto; padding: 0; background: none; color: var(--lp-label-fg); text-transform: none; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.lp-h2 { font-weight: 700; letter-spacing: -0.035em; }
.lp-lead { letter-spacing: -0.02em; }
.lp-card { border-radius: 26px; border: 0; box-shadow: var(--a-shadow); padding: 28px; }
.lp-card--hover:hover, .lp-card--platform:hover { transform: scale(1.015); box-shadow: var(--a-shadow-hover); }
.lp-card h3 { font-weight: 600; letter-spacing: -0.025em; }
.lp-chip { border-radius: 12px; background: var(--a-blue); color: #fff; }
.lp-grid > :nth-child(2) .lp-chip { background: var(--a-indigo); }
.lp-grid > :nth-child(3) .lp-chip { background: #ff9f0a; }
.lp-grid > :nth-child(4) .lp-chip { background: var(--a-green-strong); }
.lp-grid > :nth-child(5) .lp-chip { background: var(--a-red); }
.lp-grid > :nth-child(6) .lp-chip { background: var(--a-teal); }
.lp-step__num { border-radius: 50%; background: var(--a-blue); color: #fff; }
.lp-mock { border-radius: 22px; }
.lp-banner, .lp-banner--cta { border-radius: 30px; background: radial-gradient(800px 400px at 85% 0%, rgba(10, 132, 255, 0.45), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(94, 92, 230, 0.35), transparent 60%), #1c1c1e; box-shadow: none; color: #f5f5f7; }
.lp-banner h2 { font-weight: 700; letter-spacing: -0.035em; }
.lp-banner p, .lp-banner--cta p { color: #a1a1a6; }
.lp-banner .lp-label { color: #ff9f0a; background: none; }
:root[data-theme="light"] .lp-banner .lp-label { color: #ff9f0a; background: none; }
.lp-notice { border-radius: 26px; border: 0; box-shadow: var(--a-shadow); }
.lp-faq { border-radius: 22px; }
.lp-foot { background: var(--a-bg3); border-top: 1px solid var(--a-sep); }
:root[data-theme="dark"] .lp-foot { background: #1c1c1e; }
.lp-foot__links a { color: var(--a-label-2); font-size: 13px; }
.lp-foot__links strong { font-weight: 600; font-size: 13px; }
.lp-foot__about { font-size: 13px; color: var(--a-label-2); }

/* ---------- auth ---------- */
.au { background: radial-gradient(900px 520px at 20% 10%, rgba(10, 132, 255, 0.28), transparent 60%), radial-gradient(800px 500px at 90% 100%, rgba(94, 92, 230, 0.24), transparent 60%), var(--lp-hero-img, var(--a-page)); background-size: cover; }
:root[data-theme="light"] .au { background: radial-gradient(900px 520px at 20% 10%, rgba(0, 113, 227, 0.12), transparent 60%), radial-gradient(800px 500px at 90% 100%, rgba(94, 92, 230, 0.1), transparent 60%), var(--lp-hero-img, var(--a-page)); }
.au-card { border-radius: 26px; padding: 32px 28px; border: 1px solid var(--a-sep); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); }
.au h1 { font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; }
.au-lead { color: var(--a-label-2); }
.au-field label { font-weight: 500; font-size: 13px; color: var(--a-label-2); }
.au-input { height: 46px; border-radius: 12px; border: 1px solid transparent; background: var(--a-fill-2); color: var(--a-label); font-size: 16px; }
.au-input:focus { border-color: var(--a-blue); box-shadow: var(--shadow-focus); background: var(--a-bg2); }
.au-eye { border-radius: 0 12px 12px 0; border: 0; background: transparent; color: var(--a-label-2); }
.au-btn { height: 48px; border-radius: 980px; background: var(--a-blue); border: 0; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.au-btn:hover { background: var(--a-blue-hover); }
.au a, :root[data-theme="light"] .au a { color: var(--a-blue-text); }
.au-select { border-radius: 980px; border: 0; background-color: var(--a-fill); color: var(--a-label); }

@media (max-width: 900px) {
  .panel.glass { padding: 0; }
  .sidebar { position: fixed; top: 12px; height: auto; border-radius: 22px; }
  .ex-q { margin: 12px 12px 0; padding: 16px 18px; border-radius: 18px; }
}
@media (max-width: 640px) {
  .ex-bar { padding: 10px 12px; }
  .ex-btn, .ex-select, .ex-timer, .ex-icon, .ex-nav { height: 34px; }
  .ex-icon { width: 34px; }
  .ex-opt { min-height: 50px; font-size: 16px; line-height: 22px; border-radius: 14px; }
  .ex-opt__key { width: 38px; height: 38px; border-radius: 10px; }
  .ex-pages button { min-width: 0; height: 32px; font-size: 14px; border-radius: 8px; }
  .ex-pages { gap: 4px; }
  .tile { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .tile, .stat, .ex-opt, .lp-card { transform: none !important; } }

/* v3 feature pages in the Apple layer */
.topic, .plan, .sign, .app-link, .bt-card, .rl-chip, .bt-back { border-color: transparent; }
.app-link__ic { border-radius: 12px; }
.nav a.nav-link:nth-child(8) .ic { background: #34c759; }
.nav a.nav-link:nth-child(9) .ic { background: #ff2d55; }
.nav a.nav-link:nth-child(10) .ic { background: #af52de; }
.nav a.nav-link:nth-child(6) .ic { background: #5ac8fa; }
.plan.is-best { box-shadow: 0 0 0 2px var(--a-blue), var(--a-shadow-hover); }
.plan__tag { background: var(--a-blue); }
.rl-toc a.is-active, .rl-chip.is-active { background: var(--a-blue); }
.rl-p b { color: var(--a-blue-text); }
.bt { background: radial-gradient(900px 600px at 10% 0%, rgba(10, 132, 255, .2), transparent 60%), radial-gradient(800px 600px at 100% 100%, rgba(94, 92, 230, .2), transparent 60%), var(--a-page); }
.bt-logo { background: linear-gradient(180deg, #5e5ce6, #0a84ff); border-radius: 22px; }
.bt-cta { border-radius: 980px; background: var(--a-blue); box-shadow: 0 14px 34px rgba(10, 132, 255, .35); font-weight: 600; }
.bt-cta:hover { background: var(--a-blue-hover); filter: none; }
.bt-list li, .bt-pl, .ref-list li { background: var(--a-bg3); }
.tile-lock { background: var(--a-red); color: #fff; }

/* photo background for the app shell (reference: photo + dark veil) */
.layout-shell { background: linear-gradient(180deg, rgba(0, 0, 0, .74), rgba(0, 0, 0, .86)), var(--lp-hero-img, linear-gradient(#000, #000)) center / cover fixed no-repeat, #000; }
:root[data-theme="light"] .layout-shell { background: linear-gradient(180deg, rgba(245, 245, 247, .86), rgba(245, 245, 247, .94)), var(--lp-hero-img, linear-gradient(#f5f5f7, #f5f5f7)) center / cover fixed no-repeat, #f5f5f7; }
.au { background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .7)), var(--lp-hero-img, var(--a-page)) center / cover no-repeat; }
:root[data-theme="light"] .au { background: linear-gradient(180deg, rgba(245, 245, 247, .55), rgba(245, 245, 247, .75)), var(--lp-hero-img, var(--a-page)) center / cover no-repeat; }
.au-group { background: var(--a-fill-2); border-radius: 12px; }
.au-group .au-input { background: transparent; }
.au-group:focus-within { box-shadow: var(--shadow-focus); background: var(--a-bg2); }
.au-group .au-input:focus { box-shadow: none; border-color: transparent; }

/* performance: fixed photo on its own composited layer instead of background-attachment: fixed */
.layout-shell, :root[data-theme="light"] .layout-shell { background: #000; background-image: none; }
:root[data-theme="light"] .layout-shell { background: #f5f5f7; }
.layout-shell::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .74), rgba(0, 0, 0, .86)), var(--lp-hero-img, none) center / cover no-repeat; transform: translateZ(0); }
:root[data-theme="light"] .layout-shell::before { background: linear-gradient(180deg, rgba(245, 245, 247, .86), rgba(245, 245, 247, .94)), var(--lp-hero-img, none) center / cover no-repeat; }
.layout-shell .app { position: relative; z-index: 0; }
@media (max-width: 900px), (prefers-reduced-transparency: reduce) {
  .glass, .lp-panel, .au-card, .lp-stat, .ex-bar, .lp-head, .menu-fab, .modal { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .glass { background: var(--a-bg2); }
  .lp-panel { background: rgba(28, 28, 30, .92); }
  .au-card { background: var(--a-bg2); }
  .lp-head, .ex-bar { background: var(--a-page); }
}

/* real round logo: no tile behind it */
.brand-logo:has(img), .lp-brand__logo:has(img) { background: none; box-shadow: none; border-radius: 50%; overflow: visible; }
.brand-logo img, .lp-brand__logo img { object-fit: contain; border-radius: 50%; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.brand-logo:has(img) { width: 44px; height: 44px; }

/* =====================================================================
   Theme consistency (light/dark) — every text/background pair ≥ WCAG AA.
   Fills use the deeper blue (#0071e3) in both themes; text uses a tone
   tuned per theme. Status colours have separate "text" variants.
   ===================================================================== */
:root, :root[data-theme="dark"] {
  --a-blue: #0071e3; --a-blue-hover: #0077ed; --a-blue-text: #4da3ff; --a-blue-ring: #0a84ff;
  --a-red-text: #ff6961; --a-green-text: #5ee07f; --a-orange-text: #ffb340;
  --c-text-dim: var(--a-label-2);
}
:root[data-theme="light"] {
  --a-blue: #0071e3; --a-blue-hover: #0062c4; --a-blue-text: #0066cc; --a-blue-ring: #0071e3;
  --a-red-text: #c4000f; --a-green-text: #1e7b34; --a-orange-text: #b02e00;
  --c-text: var(--a-label); --c-text-muted: var(--a-label-2); --c-text-dim: var(--a-label-2); --c-sub: var(--a-label-2);
  --c-accent: var(--a-blue-text); --c-accent-soft: rgba(0, 113, 227, .1); --c-accent-border: rgba(0, 113, 227, .25);
  --c-primary: var(--a-blue); --c-primary-hover: var(--a-blue-hover);
  --c-success: var(--a-green-text); --c-danger: var(--a-red-text); --c-warning: var(--a-orange-text);
  --c-border: var(--a-sep); --c-card: var(--a-bg2); --c-card-2: var(--a-bg2); --c-card-bd: var(--a-sep);
  --c-surface-3: var(--a-bg3); --c-surface-2: var(--a-fill-2); --c-surface-hover: var(--a-fill);
}
:root[data-theme="dark"], :root:not([data-theme="light"]) { --c-success: var(--a-green-text); --c-danger: var(--a-red-text); --c-warning: var(--a-orange-text); }

/* status text */
.ms-score.is-bad, .rs-pill.is-bad, .rs-btn--danger, .btn-danger, .link-danger, .alert-error, .badge-bad, .ex-timer.is-low { color: var(--a-red-text); }
.ms-score.is-ok, .rs-pill.is-ok, .badge-ok, .pf-row strong.is-ok, .plan__per b, .sub-status.is-on .sub-status__ic { color: var(--a-green-text); }
.ms-score.is-mid, .rs-warn, .ms-status.is-learning { color: var(--a-orange-text); }
.ms-status.is-good { color: var(--a-blue-text); }
.ms-status.is-ready { color: var(--a-green-text); }
.link-danger:hover { color: var(--a-red-text); filter: brightness(1.1); }
.rs-btn--outline { background: rgba(0, 113, 227, .1); color: var(--a-blue-text); }
.rs-opt__key { color: var(--a-label); opacity: 1; }
.ex-opt__key { color: var(--a-blue-text); }
.rs-item__n, .bt-rank, .bt-num small, .bt-name small { color: var(--a-label-2); }
.nav-label { color: var(--a-label-2); }
.pager-link { border-color: var(--a-sep); }
.pager-link.is-active { background: var(--a-blue); color: #fff; }
.pager-gap { color: var(--a-label-2); }
.topic__n { color: var(--a-blue-text); background: var(--c-accent-soft); }
.bt-top100 { background: var(--a-fill); color: var(--a-blue-text); }
.bt-kicker, .kicker { letter-spacing: .02em; }
.ex-pages .is-current { box-shadow: 0 0 0 3px rgba(0, 113, 227, .3); }

/* rings / progress use the bright ring blue */
.ms-ring__fg.is-good { stroke: var(--a-blue-ring); }

/* landing footer and other blocks that assumed a dark page */
:root[data-theme="light"] .lp-foot { background: var(--a-bg3); color: var(--a-label); }
:root[data-theme="light"] .lp-foot .lp-brand__name, :root[data-theme="light"] .lp-foot__links strong { color: var(--a-label); }
:root[data-theme="light"] .lp-foot__links a, :root[data-theme="light"] .lp-foot__about, :root[data-theme="light"] .lp-foot__bottom span { color: var(--a-label-2); }
:root[data-theme="light"] .lp-head .lp-brand__name { color: var(--a-label); }
.rs-pill.is-ok, .rs-pill.is-bad { background: var(--a-bg2); box-shadow: inset 0 0 0 1px currentColor; }
.rs-btn--outline { background: rgba(0, 113, 227, .08); }
:root[data-theme="light"] { --lp-label-fg: var(--a-orange-text); --lp-chip-bg: var(--a-blue); --lp-chip-fg: #fff; --lp-h: var(--a-label); --lp-p: var(--a-label-2); }
:root[data-theme="dark"], :root:not([data-theme="light"]) { --lp-label-fg: var(--a-orange-text); }
:root[data-theme="light"] { --a-label-2: #636366; }
:root[data-theme="light"] .stars, :root[data-theme="light"] .rate input:checked ~ label, :root[data-theme="light"] .rate label:hover, :root[data-theme="light"] .rate label:hover ~ label { color: #b25000; }
:root[data-theme="light"] .rate label { color: #8e8e93; }

/* ---- test room on mobile: everything fits one screen, no page scroll ---- */
@media (max-width: 900px) {
  body:has(#test) { overflow: hidden; }
  .ex { height: 100vh; height: 100dvh; min-height: 0; padding-bottom: 6px; overflow: hidden; }
  .ex-bar { position: static; flex: none; gap: 6px; padding: 6px 10px; }
  .ex-title { order: 0; flex: 1 1 0; flex-basis: 0; min-width: 0; font-size: 14px; }
  .ex-btn, .ex-select, .ex-timer, .ex-icon, .ex-nav { height: 30px; font-size: 13px; }
  .ex-icon { width: 30px; }
  .ex-timer { font-size: 15px; padding: 0 8px; }
  .ex-q { flex: none; margin: 6px 10px 0; min-height: 0; padding: 8px 12px; border-radius: 12px; }
  .ex-q__text { font-size: 15px; line-height: 1.3; }
  .ex-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 6px 10px 0; }
  .ex-media { flex: 0 1 auto; min-height: 0; display: flex; justify-content: center; max-height: 32dvh; border-radius: 12px; }
  .ex-media img { width: auto; max-width: 100%; height: auto; max-height: 32dvh; }
  .ex-side { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .ex-opts { gap: 5px; }
  .ex-opt { min-height: 36px; padding: 2px; border-radius: 10px; font-size: 14px; line-height: 18px; }
  .ex-opt__key { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
  .ex-opt__text { padding: 4px 8px; }
  .ex-explain { margin-top: 6px; padding: 8px 10px; font-size: 13px; line-height: 18px; }
  .ex-foot { flex: none; padding: 6px 10px 0; gap: 6px; }
  .ex-pages { gap: 3px; }
  .ex-pages button { height: 24px; font-size: 12px; border-radius: 6px; min-width: 0; }
}
