/* ════════════════════════════════════════════════════════════════════
   Online Test Series portal (/test-series). An app shell, phone first:
   fixed top bar + bottom tabs, one scrolling content area, bottom sheets.
   Laptops (≥960px) get a side rail and centred content.
   ════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: light;
  --ink: #0e1c36; --ink-2: #48597a; --ink-3: #8090a8;
  --line: #e2e8f1; --line-2: #eef2f7; --bg: #f3f6fb; --card: #fff;
  --brand: #003087; --brand-2: #1a56db; --brand-soft: #eaf1ff; --brand-deep: #071d47;
  --gold: #f5b301; --gold-soft: #fff6dc;
  --ok: #0c8a5f; --ok-soft: #e4f6ee; --mid: #a15c00; --mid-soft: #fff1d9; --bad: #c02b2b; --bad-soft: #fdeceb;
  --r: 16px; --r-s: 12px; --top: 56px; --tab: 62px;
  --sb: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-top, 0px);
  --shadow: 0 1px 2px rgba(14, 28, 54, .05), 0 2px 10px rgba(14, 28, 54, .04);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tint: #1a56db; --tint-soft: #eaf1ff;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html.locked, html.locked body { overflow: hidden; }
body.tsx {
  font: 400 15px/1.45 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility; overflow: hidden; overscroll-behavior: none;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--brand-2); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--brand-2); outline-offset: 2px; border-radius: 10px; }
:where(.tsx svg:not([viewBox])), svg.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.fine { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.fine.center { text-align: center; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-2); font-weight: 600; font-size: 13px; }
.link svg { width: 16px; height: 16px; }
code { font-size: 12px; background: var(--line-2); padding: 1px 5px; border-radius: 5px; word-break: break-all; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 14px; font-weight: 700; font-size: 15px; letter-spacing: .01em; transition: transform .12s var(--ease), background .15s, opacity .15s; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(0, 48, 135, .18); }
.btn.primary:hover:not(:disabled) { background: #002566; }
.btn.ghost { background: var(--line-2); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn svg { width: 18px; height: 18px; }
.btn.busy { opacity: .85; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
.spin.lg { width: 28px; height: 28px; border-width: 3px; color: var(--brand-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); flex: none; }
.icon-btn:active { background: var(--line-2); }
.icon-btn svg { width: 22px; height: 22px; }

/* ── Brand mark ── */
.tsx-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #1a56db, #003087 70%); box-shadow: 0 8px 20px rgba(0, 48, 135, .25); }
.tsx-mark svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.tsx-mark.sm { width: 32px; height: 32px; border-radius: 10px; box-shadow: none; }
.tsx-mark.sm svg { width: 17px; height: 17px; }

/* ── Boot ── */
.tsx-boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--bg); padding: 24px; }
.tsx-boot-bar { width: 96px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tsx-boot-bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--brand-2); animation: bar 1.1s var(--ease) infinite; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.boot-msg { text-align: center; max-width: 320px; }
.boot-msg:empty, .tsx-boot:not(.has-msg) .boot-msg { display: none; }
.tsx-boot.has-msg .tsx-boot-bar { display: none; }
.boot-msg p { color: var(--ink-2); margin-bottom: 16px; }
.boot-msg .btn { margin: 4px; }

/* ════ Sign in ════ */
.tsx-auth { position: fixed; inset: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, #e9f0fd 0%, var(--bg) 46%); padding: calc(14px + var(--st)) 20px calc(16px + var(--sb)); overflow-y: auto; }
.au-brand { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; color: var(--brand-deep); }
.au-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 14px; min-height: 0; }
.au-art { width: min(230px, 62vw); margin: 0 auto 14px; }
.au-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.au-tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .7s .35s var(--ease) forwards; }
.au-dot { animation: pulse 2.4s ease-in-out infinite; transform-origin: 196px 40px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 50% { transform: scale(1.25); } }
.au-hero h1 { font-size: clamp(25px, 7.4vw, 34px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; color: var(--brand-deep); }
.au-hero > p { margin-top: 10px; color: var(--ink-2); max-width: 34ch; }
.au-points { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.au-points li { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand); background: #fff; border: 1px solid #d9e4f6; padding: 6px 10px; border-radius: 999px; }
.au-points svg { width: 15px; height: 15px; }
.au-card { display: flex; flex-direction: column; gap: 10px; }
.au-google, .au-alt { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px; font-weight: 700; font-size: 15.5px; transition: transform .12s var(--ease); }
.au-google { background: var(--brand-deep); color: #fff; box-shadow: 0 10px 24px rgba(7, 29, 71, .22); }
.au-google svg { width: 22px; height: 22px; background: #fff; border-radius: 50%; padding: 3px; }
.au-alt { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.au-google:active, .au-alt:active { transform: scale(.98); }
.au-google:disabled { opacity: .7; }
.au-tnc { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; animation: rise .22s var(--ease); }
.au-tnc-note { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.tnc-open .au-art, .tnc-open .au-points { display: none; }
.au-err { color: var(--bad); font-size: 13.5px; font-weight: 600; text-align: center; min-height: 0; }
.au-err:empty { display: none; }
.au-help { text-align: center; font-size: 13px; color: var(--ink-3); }
.au-webview { display: grid; gap: 4px; background: var(--gold-soft); border: 1px solid #f3dc9b; border-radius: var(--r-s); padding: 12px 14px; font-size: 13px; color: #6a4b00; }
.au-webview button { justify-self: start; margin-top: 4px; font-weight: 700; color: var(--brand); }

/* ── Form fields ── */
.fl { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.fl > span, .fl > legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; }
.fl legend i { font-style: normal; font-weight: 500; color: var(--ink-3); }
.fl input, .fl select { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
.fl select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2348597a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; padding-right: 38px; }
.fl input[type=date] { min-height: 48px; line-height: 46px; }
.fl input:focus, .fl select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(26, 86, 219, .12); }
.fl input[readonly] { background: var(--line-2); color: var(--ink-2); }
.fl.bad input, .fl.bad select { border-color: var(--bad); }
.fe { display: block; color: var(--bad); font-size: 12.5px; font-weight: 600; margin-top: -2px; }
.fe:empty { display: none; }
.pw { position: relative; display: block; }
.pw input { padding-right: 64px; }
.pw-eye { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--brand-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all .15s; }
.chip input:checked + span { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); }
.chip input:focus-visible + span { outline: 2.5px solid var(--brand-2); outline-offset: 2px; }
.fl-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.fl-pair > div { display: grid; gap: 6px; align-content: start; }
.locked-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 14px; }
.locked-row small { font-weight: 500; color: var(--ink-2); }

/* ════ Onboarding ════ */
.tsx-onboard { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.ob-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--st)) 12px 8px; }
.ob-progress { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.ob-progress i { display: block; height: 100%; background: var(--brand-2); border-radius: inherit; transform-origin: left; transform: scaleX(.33); transition: transform .35s var(--ease); }
.ob-step { font-size: 12.5px; font-weight: 700; color: var(--ink-3); min-width: 28px; text-align: right; }
.ob-form { flex: 1; display: flex; flex-direction: column; min-height: 0; max-width: 560px; width: 100%; margin: 0 auto; }
.ob-head { padding: 6px 20px 12px; }
.ob-head h1 { font-size: 24px; letter-spacing: -.02em; }
.ob-head p { color: var(--ink-2); margin-top: 4px; font-size: 14px; }
.ob-body { flex: 1; overflow-y: auto; padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.ob-body > * { animation: rise .25s var(--ease) both; }
.ob-foot { padding: 10px 20px calc(14px + var(--sb)); background: linear-gradient(180deg, rgba(243, 246, 251, 0), var(--bg) 30%); }
.ob-err { color: var(--bad); font-size: 13px; font-weight: 600; text-align: center; margin-bottom: 8px; }
.ob-err:empty { display: none; }

/* ════ App shell ════ */
.tsx-app { position: fixed; inset: 0; display: grid; grid-template-rows: calc(var(--top) + var(--st)) 1fr calc(var(--tab) + var(--sb)); grid-template-areas: "top" "main" "nav"; }
.tsx-top { grid-area: top; display: flex; align-items: center; gap: 10px; padding: var(--st) 12px 0 14px; background: #fff; border-bottom: 1px solid var(--line); z-index: 5; }
.top-title { flex: 1; font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-net { font-size: 11.5px; font-weight: 700; color: var(--mid); background: var(--mid-soft); padding: 4px 8px; border-radius: 999px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.tsx-main { grid-area: main; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; outline: none; scroll-padding-top: 8px; }
.tsx-main.enter > .v { animation: viewIn .24s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.tsx-nav { grid-area: nav; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--sb); z-index: 5; }
.nav-brand { display: none; }
.tsx-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-size: 11px; font-weight: 600; transition: color .15s; }
.tsx-nav a svg { width: 22px; height: 22px; transition: transform .2s var(--ease); }
.tsx-nav a.on { color: var(--brand); }
.tsx-nav a.on svg { transform: translateY(-1px); stroke-width: 2.1; }
.tsx-nav a.on::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.tsx-nav a:active svg { transform: scale(.9); }
.nav-dot { position: absolute; top: 9px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid #fff; }

/* ── Views ── */
.v { padding: 16px 16px 24px; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.sec { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.sec h3 { font-size: 15px; font-weight: 700; }
.sec > span { font-size: 12.5px; font-weight: 700; color: var(--ink-3); background: var(--line-2); padding: 2px 8px; border-radius: 999px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r); color: var(--ink-2); }
.empty svg { width: 28px; height: 28px; color: var(--ink-3); margin-bottom: 4px; }
.empty b { color: var(--ink); }
.empty p { font-size: 13.5px; max-width: 30ch; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-s); font-size: 13.5px; font-weight: 600; text-align: left; width: 100%; }
.banner.err { background: var(--bad-soft); color: var(--bad); }
.banner.info { background: var(--brand-soft); color: var(--brand); }
.banner span { flex: 1; }
.chev { width: 18px !important; height: 18px !important; color: var(--ink-3); }

/* Home */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.hello h2 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.plan { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--gold-soft); color: #8a5a00; }
.plan svg { width: 15px; height: 15px; }
.plan.pro { background: var(--ok-soft); color: var(--ok); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats > div { background: #fff; padding: 12px 10px; text-align: center; }
.stats strong { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.stats span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.resume { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--brand-deep); color: #fff; text-align: left; box-shadow: 0 10px 22px rgba(7, 29, 71, .2); }
.resume b { display: block; font-size: 14.5px; }
.resume small { color: #a9c3f5; font-size: 12.5px; }
.resume > span:nth-child(2) { flex: 1; min-width: 0; }
.resume-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: var(--gold); animation: pulse 2s ease-in-out infinite; }
.resume .chev { color: #a9c3f5; }
.subj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.subj { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); transition: transform .12s var(--ease), border-color .15s; overflow: hidden; }
.subj:active { transform: scale(.98); }
.subj:hover { border-color: color-mix(in srgb, var(--tint) 35%, var(--line)); }
.subj-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); }
.subj-ic svg { width: 21px; height: 21px; }
.subj-ic.lg { width: 48px; height: 48px; border-radius: 14px; }
.subj-ic.lg svg { width: 26px; height: 26px; }
.subj-txt b { display: block; font-size: 15px; }
.subj-txt small { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.subj-meter { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.subj-meter i { display: block; height: 100%; border-radius: inherit; background: var(--tint); transition: width .5s var(--ease); }

/* Subject */
.subj-head { display: flex; align-items: center; gap: 12px; }
.subj-head > div { flex: 1; min-width: 0; }
.subj-head h2 { font-size: 20px; letter-spacing: -.02em; }
.subj-head p { font-size: 13px; color: var(--ink-3); }
.rank-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 6px 10px; border-radius: 12px; background: var(--tint-soft); color: var(--tint); line-height: 1.1; }
.rank-chip b { font-size: 18px; }
.rank-chip small { font-size: 11px; font-weight: 600; opacity: .85; }
.rank-chip svg { width: 18px; height: 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--line-2); border-radius: 13px; }
.seg button { min-height: 38px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.seg button i { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: rgba(14, 28, 54, .07); }
.seg.three { grid-template-columns: 1.15fr 1fr .95fr; }
.seg.three button { font-size: 13px; gap: 4px; padding: 0 4px; }
.seg-hint { font-size: 12.5px; color: var(--ink-3); margin: -6px 2px 0; }
.free-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r); text-align: left;
  background: linear-gradient(120deg, #fff7df, #fff); border: 1.5px solid #f0d78f; color: var(--ink); }
.free-card > span:nth-child(2) { flex: 1; min-width: 0; }
.free-card b { display: block; font-size: 14.5px; }
.free-card small { font-size: 12.5px; color: var(--ink-2); }
.free-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--gold); color: #3a2a00; flex: none; }
.free-confirm { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); background: var(--gold-soft); color: #5e4300; font-size: 14px; }
.free-confirm svg { color: #a36d00; margin-top: 1px; }
.facts .kind { background: var(--tint-soft); color: var(--tint); }
button.plan { cursor: pointer; }
.seg button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(14, 28, 54, .1); }
.rows { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line-2); }
.row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; min-height: 60px; text-align: left; transition: background .12s; }
.row:active { background: var(--line-2); }
@media (hover: hover) { .row:hover { background: #f8fafd; } }
.row-ix { font-size: 12px; font-weight: 700; color: var(--tint); background: var(--tint-soft); width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; font-variant-numeric: tabular-nums; }
.row-main { flex: 1; min-width: 0; }
.row.fresh { background: #effaf4; box-shadow: inset 3px 0 0 var(--ok); animation: freshIn 1.4s var(--ease) 2; }
.row.fresh .row-ix { background: var(--ok-soft); color: var(--ok); }
.row.fresh .row-ix svg { width: 17px; height: 17px; }
.row-main small em { font-style: normal; font-weight: 700; color: var(--ok); }
@keyframes freshIn { 50% { background: #d9f3e6; } }
.row-main b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-score { width: 44px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; background: var(--line-2); color: var(--ink-2); }
.row-score svg { width: 17px; height: 17px; }
.pill { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill svg { width: 13px; height: 13px; stroke-width: 2.2; }
.pill.free { background: var(--ok-soft); color: var(--ok); }
.pill.lock { background: var(--gold-soft); color: #8a5a00; }
.pill.go { background: var(--brand); color: #fff; }
.pill.go svg { fill: currentColor; stroke: none; }
.pill.warn { background: var(--mid-soft); color: var(--mid); }
.pill.wait, .row-score.wait { background: #eef1ff; color: #4a4fc4; }
.pill.done { background: var(--line-2); color: var(--ink); }
.pill.off { background: var(--line-2); color: var(--ink-3); }
.good { background: var(--ok-soft) !important; color: var(--ok) !important; }
.mid { background: var(--mid-soft) !important; color: var(--mid) !important; }
.low { background: var(--bad-soft) !important; color: var(--bad) !important; }

/* Ranks */
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; scroll-snap-type: x proximity; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); scroll-snap-align: start; transition: all .15s; }
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.rank-card { border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, var(--brand-deep), #0b3a8f); color: #fff; box-shadow: 0 14px 30px rgba(7, 29, 71, .22); }
.rank-me { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 16px 10px; }
.rank-me .eyebrow { color: #9fb9ea; }
.rank-me strong { font-size: 46px; line-height: 1.05; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rank-me small { color: #c2d4f5; font-size: 13px; }
.rank-avg { margin-top: 10px; font-size: 12.5px; color: #dfe9fb; background: rgba(255, 255, 255, .1); padding: 5px 12px; border-radius: 999px; }
.podium { list-style: none; margin: 0; padding: 12px 12px 0; display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 8px; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.pod b { font-size: 13.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod small { font-size: 11.5px; color: #a9c0ea; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod i { display: block; width: 100%; margin-top: 8px; border-radius: 12px 12px 0 0; background: rgba(255, 255, 255, .1); }
.p1 i { height: 64px; background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .06)); box-shadow: inset 0 3px 0 rgba(255, 213, 77, .7); }
.p2 i { height: 44px; } .p3 i { height: 30px; }
.medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #3a2a00; background: #d7dde8; margin-bottom: 4px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.p1 .medal { width: 42px; height: 42px; font-size: 18px; background: linear-gradient(140deg, #ffd54d, #f5b301); }
.p3 .medal { background: linear-gradient(140deg, #f1b88a, #c98245); }

/* Profile */
.me-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.me-card > div { flex: 1; min-width: 0; }
.me-card h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card p { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.groups { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.group + .group { border-top: 1px solid var(--line-2); }
.group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.group summary::-webkit-details-marker { display: none; }
.group summary .chev { transition: transform .2s var(--ease); }
.group[open] summary .chev { transform: rotate(180deg); }
.kvs { padding: 0 14px 10px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13.5px; border-top: 1px dashed var(--line-2); }
.kv span { color: var(--ink-3); flex: none; }
.kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.menu { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.menu > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; font-weight: 600; font-size: 14.5px; color: var(--ink); text-align: left; }
.menu > * + * { border-top: 1px solid var(--line-2); }
.menu span { flex: 1; }
.menu svg:first-child { color: var(--ink-2); }
.menu .danger, .menu .danger svg:first-child { color: var(--bad); }

/* ════ Bottom sheet ════ */
.tsx-sheet-back { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 18, 38, 0); transition: background .22s; }
.tsx-sheet-back.on { background: rgba(8, 18, 38, .48); }
.tsx-sheet { position: relative; width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(18px + var(--sb)); display: flex; flex-direction: column; gap: 14px; transform: translateY(100%); transition: transform .26s var(--ease); }
.tsx-sheet-back.on .tsx-sheet { transform: none; }
.grip { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 2px; flex: none; }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; background: var(--line-2); border-radius: 50%; }
.sheet-x svg { width: 18px; height: 18px; }
#sheetBody { display: flex; flex-direction: column; gap: 14px; }
.sh-head { padding-right: 40px; }
.sh-head h2 { font-size: 20px; letter-spacing: -.02em; line-height: 1.25; margin-top: 4px; }
.sh-head p { color: var(--ink-2); margin-top: 6px; }
.sh-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--tint); }
.sh-kicker svg { width: 16px; height: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.facts span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--line-2); padding: 5px 9px; border-radius: 8px; }
.facts svg { width: 14px; height: 14px; }
.facts .free { background: var(--ok-soft); color: var(--ok); }
.sh-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.instr { font-size: 14px; color: var(--ink-2); background: var(--line-2); border-radius: var(--r-s); padding: 10px 12px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.how-card { display: grid; gap: 10px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.how li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: var(--r-s); background: var(--tint-soft); }
.how svg { width: 20px; height: 20px; color: var(--tint); margin-bottom: 2px; }
.how b { font-size: 13px; }
.how small { font-size: 11.5px; color: var(--ink-3); }
.price { border: 1.5px solid #f0d78f; background: linear-gradient(180deg, #fffaf0, #fff); border-radius: var(--r); padding: 14px; }
.price-top { display: flex; align-items: baseline; gap: 8px; }
.price-top b { font-size: 30px; letter-spacing: -.02em; color: var(--brand-deep); }
.price-top small { color: var(--ink-3); font-weight: 600; }
.price ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.price li { display: flex; align-items: center; gap: 8px; }
.price li svg { width: 16px; height: 16px; color: var(--ok); stroke-width: 2.4; }
.warn-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); background: var(--mid-soft); color: #6e4100; font-size: 14px; }
.warn-box svg { color: var(--mid); margin-top: 1px; }
.celebrate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 6px; }
.celebrate > svg { width: 44px; height: 44px; padding: 10px; box-sizing: content-box; border-radius: 50%; background: var(--ok-soft); color: var(--ok); animation: pop .4s var(--ease); }
.celebrate.err > svg { background: var(--mid-soft); color: var(--mid); }
.celebrate b { font-size: 18px; }
.celebrate p { color: var(--ink-2); font-size: 14px; max-width: 36ch; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.track { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.track li { position: relative; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; padding-bottom: 14px; }
.track li:last-child { padding-bottom: 0; }
.track li::after { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.track li:last-child::after { display: none; }
.track svg { grid-row: span 2; width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--line-2); color: var(--ink-3); }
.track .done svg { background: var(--ok-soft); color: var(--ok); }
.track .now svg { background: #eef1ff; color: #4a4fc4; box-shadow: 0 0 0 4px #eef1ff; }
.track b { font-size: 14.5px; }
.track small { font-size: 12.5px; color: var(--ink-3); }
.score { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--r); background: var(--line-2); background-color: var(--line-2) !important; color: var(--ink) !important; }
.ring { --c: var(--brand-2); width: 84px; height: 84px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
  background: radial-gradient(closest-side, #fff 78%, transparent 80%), conic-gradient(var(--c) calc(var(--p) * 1%), #dfe6f1 0); }
.score.good .ring { --c: var(--ok); } .score.mid .ring { --c: #d98a00; } .score.low .ring { --c: var(--bad); }
.ring b { font-size: 22px; line-height: 1; }
.ring small { font-size: 11px; color: var(--ink-3); }
.score > div:last-child b { display: block; font-size: 22px; }
.score > div:last-child small { color: var(--ink-2); font-size: 13px; }
.feedback { border-left: 3px solid var(--brand-2); padding: 4px 0 4px 12px; }
.feedback p { margin-top: 4px; font-size: 14px; white-space: pre-wrap; }

/* ════ Timed test ════ */
.tsx-exam { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #e9eef5; animation: viewIn .2s var(--ease); }
.ex-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--st)) 10px 8px; background: var(--brand-deep); color: #fff; }
.icon-btn.light { color: #fff; }
.icon-btn.light:active { background: rgba(255, 255, 255, .1); }
.ex-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-title small { font-size: 11.5px; color: #9fb9ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-title strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-timer { font-size: 17px; font-weight: 700; padding: 7px 12px; border-radius: 11px; background: rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; min-width: 78px; text-align: center; }
.ex-timer.warn { background: var(--gold); color: #3a2a00; animation: pulse 1.6s ease-in-out infinite; }
.ex-timer.over { background: var(--bad); }
.ex-track { height: 3px; background: rgba(7, 29, 71, .15); }
.ex-track span { display: block; height: 100%; background: var(--gold); transform-origin: left; transition: transform 1s linear; }
.ex-paper { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; -webkit-overflow-scrolling: touch; }
.ex-paper canvas { display: block; background: #fff; border-radius: 6px; box-shadow: 0 2px 10px rgba(14, 28, 54, .12); max-width: none; }
.ex-loading { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-2); font-weight: 600; text-align: center; }
.ex-dock { display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + var(--sb)); background: #fff; border-top: 1px solid var(--line); }
.ex-zoom { display: flex; align-items: center; background: var(--line-2); border-radius: 12px; }
.ex-zoom button { width: 40px; height: 44px; display: grid; place-items: center; }
.ex-zoom span { font-size: 12.5px; font-weight: 700; min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.ex-paper-link { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--line-2); color: var(--ink); }
.ex-dock .btn { flex: 1; min-height: 46px; padding: 0 12px; }
.ex-up-back { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 18, 38, .5); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.ex-up { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; padding: 8px 18px calc(16px + var(--sb)); display: flex; flex-direction: column; gap: 12px; animation: sheetUp .26s var(--ease); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.ex-up h2 { font-size: 19px; }
.ex-up-time { font-size: 13.5px; color: var(--ink-2); margin-top: -6px; }
.ex-up-time.late { color: var(--bad); font-weight: 700; }
.up-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.up-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border: 1.5px dashed #c8d5ea; border-radius: var(--r); background: #f8fbff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.up-tile:active { background: var(--brand-soft); border-color: var(--brand-2); }
.up-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.up-tile svg { width: 24px; height: 24px; color: var(--brand-2); margin-bottom: 4px; }
.up-tile b { font-size: 14px; }
.up-tile small { font-size: 12px; color: var(--ink-3); }
.up-tile:focus-within { outline: 2.5px solid var(--brand-2); outline-offset: 2px; }
.up-order { display: grid; gap: 6px; }
.up-order:empty, .up-thumbs:empty { display: none; }
.po { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--line-2); font-size: 13px; }
.po span { font-weight: 700; flex: none; }
.po small { flex: 1; min-width: 0; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po button { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #fff; }
.po button:disabled { opacity: .35; }
.po button svg { width: 16px; height: 16px; }
.up-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.up-thumbs canvas { height: 120px; width: auto; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.up-msg { font-size: 13.5px; color: var(--ink-2); }
.up-msg:empty { display: none; }
.up-msg.err { color: var(--bad); font-weight: 600; }
.up-msg.ok { color: var(--ok); font-weight: 700; }
.up-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* ── Toast ── */
.tsx-toast { position: fixed; left: 50%; bottom: calc(var(--tab) + var(--sb) + 12px); z-index: 60; max-width: min(92vw, 440px); transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 28px rgba(14, 28, 54, .25); transition: opacity .2s, transform .25s var(--ease); text-align: center; }
.tsx-toast.on { opacity: 1; transform: translate(-50%, 0); }
.tsx-toast.err { background: #8f1d1d; }
body:not([data-screen=app]) .tsx-toast { bottom: calc(20px + var(--sb)); }
body:has(#sheet.on, #exam:not([hidden])) .tsx-toast { top: calc(12px + var(--st)); bottom: auto; transform: translate(-50%, -16px); }
body:has(#sheet.on, #exam:not([hidden])) .tsx-toast.on { transform: translate(-50%, 0); }

/* ════ Small phones ════ */
@media (max-width: 359px) {
  .v { padding: 12px 12px 20px; gap: 12px; }
  .subj-grid { gap: 8px; }
  .subj { padding: 12px; }
  .stats strong { font-size: 19px; }
  .hello h2 { font-size: 19px; }
  .row { gap: 10px; padding: 10px 12px; }
  .chips-scroll { margin: 0 -12px; padding: 0 12px 2px; }
  .au-art { width: 46vw; margin-bottom: 8px; }
  .rank-me strong { font-size: 40px; }
}
@media (max-height: 640px) { .au-art { display: none; } .au-points { margin-top: 12px; } }

/* ════ Tablets ════ */
@media (min-width: 600px) {
  .subj-grid { grid-template-columns: repeat(3, 1fr); }
  .tsx-sheet-back, .ex-up-back { align-items: center; padding: 24px; }
  .tsx-sheet, .ex-up { border-radius: 24px; max-height: 86dvh; transform: translateY(24px) scale(.98); opacity: 0; transition: transform .24s var(--ease), opacity .2s; }
  .tsx-sheet-back.on .tsx-sheet { opacity: 1; }
  .ex-up { opacity: 1; transform: none; }
  .grip { display: none; }
  .tsx-sheet { padding-top: 22px; }
  .tsx-auth { align-items: center; }
  .tsx-auth > * { width: 100%; max-width: 420px; }
}

/* ════ Laptops: side rail, centred content ════ */
@media (min-width: 960px) {
  .tsx-app { grid-template-columns: 248px 1fr; grid-template-rows: 64px 1fr; grid-template-areas: "nav top" "nav main"; }
  .tsx-top { padding: 0 28px; background: rgba(243, 246, 251, .9); border-bottom-color: transparent; }
  .top-mark { display: none !important; }
  .top-title { font-size: 20px; }
  .tsx-nav { display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; border-top: 0; border-right: 1px solid var(--line); }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
  .nav-brand b { display: block; font-size: 15px; }
  .nav-brand small { font-size: 11.5px; color: var(--ink-3); }
  .tsx-nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; height: 44px; border-radius: 12px; font-size: 14.5px; }
  .tsx-nav a:hover { background: var(--line-2); color: var(--ink); }
  .tsx-nav a.on { background: var(--brand-soft); }
  .tsx-nav a.on::before { display: none; }
  .nav-dot { top: 12px; left: 30px; }
  .v { max-width: 1040px; padding: 8px 28px 40px; gap: 18px; }
  .v-home { display: grid; grid-template-columns: 1fr; }
  .subj-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .subj { padding: 18px; }
  .stats > div { padding: 16px; }
  .stats strong { font-size: 26px; }
  .hello h2 { font-size: 28px; }
  .v-subject, .v-results, .v-me { max-width: 820px; }
  .v-ranks { max-width: 640px; }
  .tsx-toast { bottom: 28px; left: calc(50% + 124px); }
  .row { min-height: 64px; padding: 12px 18px; }
  /* Sign in: brand panel + card */
  .tsx-auth { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: auto 1fr; padding: 0; background: var(--bg); align-items: stretch; }
  .tsx-auth > * { max-width: none; }
  .au-brand { grid-column: 1; grid-row: 1; padding: 28px 48px 0; color: #fff; background: var(--brand-deep); }
  .au-hero { grid-column: 1; grid-row: 2; padding: 24px 48px 48px; background: var(--brand-deep) radial-gradient(120% 80% at 0% 100%, #0b3a8f 0%, transparent 60%); color: #fff; justify-content: center; }
  .au-hero h1 { color: #fff; font-size: 44px; }
  .au-hero > p { color: #b9cdf2; font-size: 17px; }
  .au-points li { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #e5edfb; }
  .au-art { margin: 0 0 24px; width: 260px; }
  .au-card { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: center; width: 100%; max-width: 400px; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 20px 50px rgba(14, 28, 54, .08); }
  .au-card::before { content: 'Sign in to start'; font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
  .tnc-open .au-art, .tnc-open .au-points { display: initial; }
  .tnc-open .au-points { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ════ Custom module test ════ */
.tsx-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.cm-hero { display: flex; align-items: center; gap: 12px; }
.cm-hero h2 { font-size: 20px; letter-spacing: -.02em; }
.cm-hero p { font-size: 13px; color: var(--ink-3); }
.cm-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(140deg, #1a56db, #003087 70%); box-shadow: 0 8px 18px rgba(0, 48, 135, .22); }
.cm-ic svg { width: 22px; height: 22px; }
.cm-price { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: #7a4f00; background: var(--gold-soft); border-radius: 12px; padding: 9px 12px; }
.cm-price svg { width: 16px; height: 16px; color: #b07a00; }
.cm-pick { display: grid; gap: 10px; }
.seg.small button { min-height: 34px; font-size: 13px; }
.chip-btn i { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--brand-2); color: #fff; }
.chip-btn.on i { background: #fff; color: var(--ink); }
.rows.picks .row { min-height: 52px; padding: 9px 12px 9px 14px; }
.row.pick .row-main b { white-space: normal; font-size: 14px; line-height: 1.3; }
.row.pick .tick { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; color: var(--ink-3); transition: background .15s, border-color .15s, color .15s; }
.row.pick .tick svg { width: 15px; height: 15px; stroke-width: 2.4; }
.row.pick[aria-pressed=true] { background: #f4f8ff; }
.row.pick[aria-pressed=true] .tick { background: var(--tint); border-color: var(--tint); color: #fff; animation: pop .2s var(--ease); }
.row.pick[aria-pressed=true] .row-ix { background: var(--tint); color: #fff; }
.cart-bar { position: sticky; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--brand-deep); color: #fff; box-shadow: 0 14px 30px rgba(7, 29, 71, .32); animation: rise .2s var(--ease); }
.cart-bar > div { flex: 1; min-width: 0; }
.cart-bar b { display: block; font-size: 15px; }
.cart-bar small { color: #a9c3f5; font-size: 12.5px; font-weight: 600; }
.cart-bar .btn { min-height: 42px; padding: 0 14px; background: #fff; color: var(--brand-deep); }
.cart-list { display: grid; gap: 10px; }
.cg { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cg-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--line-2); font-weight: 700; font-size: 14px; }
.cg-h .subj-ic { width: 28px; height: 28px; border-radius: 8px; }
.cg-h .subj-ic svg { width: 16px; height: 16px; }
.cg-h small { margin-left: auto; font-weight: 600; color: var(--ink-3); font-size: 12px; }
.cg ul { list-style: none; margin: 0; padding: 0; }
.cg li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line-2); font-size: 13.5px; min-height: 44px; }
.cg li span { flex: 1; min-width: 0; }
.cg li button { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-3); background: var(--line-2); flex: none; }
.cg li button svg { width: 15px; height: 15px; }
.bill { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--line-2); font-size: 13.5px; }
.bill div { display: flex; justify-content: space-between; gap: 10px; }
.bill .save { color: var(--ok); font-weight: 700; }
.bill .total { border-top: 1px dashed #cfd8e6; padding-top: 8px; margin-top: 2px; font-size: 17px; font-weight: 700; }
@media (min-width: 960px) { .v-custom { max-width: 720px; } }
/* Phones: keep the chapter list in view. */
@media (max-width: 600px) {
  .v-custom { gap: 10px; }
  .cm-hero { gap: 10px; }
  .cm-ic { width: 36px; height: 36px; border-radius: 11px; box-shadow: none; }
  .cm-ic svg { width: 19px; height: 19px; }
  .cm-hero h2 { font-size: 17px; }
  .cm-hero p { font-size: 12.5px; }
  .cm-price { padding: 7px 11px; font-size: 12px; }
  .v-custom .sec { margin-top: 0; }
  .v-custom .sec h3 { font-size: 14px; }
}

/* Non-refundable notice above Pay buttons */
.no-refund { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 12px; border-radius: 12px; background: #fff4f2; border: 1px solid #f6d3cd; color: #7a2a1f; font-size: 12.5px; line-height: 1.4; }
.no-refund svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #c0392b; }
.no-refund b { font-weight: 700; }

/* Promo code + contact card on pay screens */
.price-top s { font-size: 15px; color: var(--ink-3); font-weight: 600; }
.promo-box { border: 1px dashed #c8d5ea; border-radius: 14px; padding: 0 12px; background: #f9fbff; }
.promo-box summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 700; color: var(--brand-2); }
.promo-box summary::-webkit-details-marker { display: none; }
.promo-box summary svg { width: 16px; height: 16px; }
.promo-box[open] { padding-bottom: 12px; }
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; min-width: 0; height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; font: 600 16px/1 'DM Sans', system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; background: #fff; outline: none; }
.promo-row input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(26, 86, 219, .12); }
.promo-row .btn { min-height: 46px; padding: 0 16px; }
.promo-msg { font-size: 12.5px; margin-top: 6px; color: var(--ink-2); }
.promo-msg:empty { display: none; }
.promo-msg.bad { color: var(--bad); font-weight: 600; }
.promo.ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-size: 13.5px; }
.promo.ok svg { width: 18px; height: 18px; stroke-width: 2.4; }
.promo.ok span { flex: 1; }
.promo.ok .link { color: var(--ok); }
.contact-card { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: var(--brand-soft); border: 1px solid #d3e1fb; }
.contact-card b { font-size: 15px; color: var(--brand-deep); }
.contact-card > span { font-size: 13px; color: var(--ink-2); }
.contact-act { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; margin-top: 8px; }
.contact-act .btn { min-height: 46px; padding: 0 10px; font-size: 14px; }
.contact-act .btn.ghost { background: #fff; border: 1px solid #d3e1fb; }

/* Mock packs */
.pack-list { display: grid; gap: 10px; }
.pack-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); text-align: left; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s var(--ease); }
.pack-card:active { transform: scale(.98); }
.pk-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pk-main b { font-size: 15px; line-height: 1.3; }
.pk-main small { font-size: 12.5px; color: var(--ink-3); }
.pk-price { flex: none; text-align: right; display: grid; }
.pk-price b { font-size: 17px; color: var(--brand-deep); letter-spacing: -.01em; }
.pk-price small { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.pk-meter { display: block; height: 5px; border-radius: 5px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.pk-meter i { display: block; height: 100%; background: var(--tint); border-radius: inherit; }
.pk-progress { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--tint-soft); }
.pk-progress b { display: block; font-size: 16px; }
.pk-progress small { font-size: 13px; color: var(--ink-2); }
.pk-progress .pk-meter { background: rgba(255, 255, 255, .7); margin: 0; }
.rows.sched .row { min-height: 54px; }
.rows.sched .row:disabled { opacity: 1; cursor: default; }
.next-mock .free-ic { background: var(--tint); color: #fff; }
.free-card.pack-offer { color: var(--ink); text-decoration: none; }
@media (max-width: 360px) { .pack-card { gap: 10px; padding: 12px; } .pk-price b { font-size: 15px; } }

/* Six tabs on phones (Classes 9–12): keep labels on one line */
@media (max-width: 400px) {
  .tsx-nav a { font-size: 10.5px; gap: 2px; min-width: 0; }
  .tsx-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tsx-nav a svg { width: 21px; height: 21px; }
}

/* Custom cart: a subject with fewer than 2 chapters cannot be ordered yet */
.cart-bar.short small { color: #ffd38a; }
.cart-bar .btn:disabled { opacity: .55; cursor: not-allowed; }

/* Phone tab bar: 4 items (Home · Packs · Results · More); laptops show every page in the rail */
.tsx-nav .nav-extra { display: none !important; }
.tsx-nav .nav-more { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tsx-nav .nav-more svg { width: 22px; height: 22px; }
.tsx-nav .nav-more.on { color: var(--brand); }
.tsx-nav .nav-more.on::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.tsx-nav .nav-more:active svg { transform: scale(.9); }
@media (min-width: 960px) {
  .tsx-nav .nav-extra:not([hidden]) { display: flex !important; }
  .tsx-nav .nav-more { display: none; }
}
@media (max-width: 400px) { .tsx-nav a, .tsx-nav .nav-more { font-size: 11px; } }
.more-menu a span { display: grid; gap: 1px; min-width: 0; }
.more-menu a span b { font-weight: 650; }
.more-menu a span small { font-size: 12.5px; color: var(--ink-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-menu a[aria-current] { background: var(--brand-soft); }

/* Pack cards: long names clamp to two lines; More sits on the same baseline as the tabs */
.pk-main b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tsx-nav .nav-more { padding: 0; line-height: inherit; margin: 0; }

/* Applied code that no longer covers the cart */
.promo.warn { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff6e5; color: #8a5a00; font-size: 13.5px; }
.promo.warn svg { width: 18px; height: 18px; flex: none; }
.promo.warn span { flex: 1; }
.promo.warn .link { color: #8a5a00; white-space: nowrap; }

/* ── Live checking animation: scan → marks → score → teacher stamp (5 s loop) ── */
.chk-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chk-scan { animation: chkScan 5s cubic-bezier(.45, 0, .3, 1) infinite; }
.chk-m { opacity: 0; transform-box: fill-box; transform-origin: center; animation: chkMark 5s ease-out infinite; }
.chk-m1 { animation-delay: .35s; } .chk-m2 { animation-delay: .7s; } .chk-m3 { animation-delay: 1.05s; } .chk-m4 { animation-delay: 1.4s; }
.chk-chip { animation: chkChip 5s ease infinite; }
.chk-blink { animation: chkBlink .8s ease-in-out infinite; }
.chk-score { opacity: 0; animation: chkScore 5s ease infinite; }
.chk-stamp { opacity: 0; transform-box: fill-box; transform-origin: center; animation: chkStamp 5s cubic-bezier(.2, 1.4, .4, 1) infinite; }
@keyframes chkScan { 0% { transform: translateY(0); opacity: 0; } 5% { opacity: 1; } 42% { transform: translateY(116px); opacity: 1; } 50%, 100% { transform: translateY(116px); opacity: 0; } }
@keyframes chkMark { 0%, 4% { opacity: 0; transform: scale(.3); } 9% { opacity: 1; transform: scale(1.25); } 13%, 88% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; } }
@keyframes chkChip { 0%, 48% { opacity: 1; } 56%, 92% { opacity: .35; } 100% { opacity: 1; } }
@keyframes chkBlink { 50% { opacity: .2; } }
@keyframes chkScore { 0%, 44% { opacity: 0; transform: translateX(-8px); } 52%, 90% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes chkStamp { 0%, 58% { opacity: 0; transform: scale(1.8); } 66% { opacity: 1; transform: scale(.94); } 70%, 90% { opacity: 1; transform: scale(1); } 98%, 100% { opacity: 0; transform: scale(1); } }
/* Home card: the steps light up in time with the picture */
.chk-card { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: center; padding: 12px 14px; background: linear-gradient(135deg, #fff 0%, #f1f7ff 60%, #eafaf8 100%); border: 1px solid var(--line); border-radius: var(--r); }
.chk-copy { display: grid; gap: 6px; min-width: 0; }
.chk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chk-steps li { display: grid; padding: 5px 8px; border-radius: 9px; border-left: 3px solid transparent; animation: chkStep 5s ease infinite; }
.chk-steps li:nth-child(1) { animation-name: chkStep1; } .chk-steps li:nth-child(2) { animation-name: chkStep2; } .chk-steps li:nth-child(3) { animation-name: chkStep3; }
.chk-steps b { font-size: 13px; } .chk-steps small { font-size: 11.5px; color: var(--ink-3); }
@keyframes chkStep1 { 0%, 8% { background: #e8f0ff; border-left-color: #003087; } 14%, 100% { background: transparent; border-left-color: transparent; } }
@keyframes chkStep2 { 0%, 10% { background: transparent; border-left-color: transparent; } 16%, 50% { background: #e3f7f6; border-left-color: #19a3a0; } 58%, 100% { background: transparent; border-left-color: transparent; } }
@keyframes chkStep3 { 0%, 58% { background: transparent; border-left-color: transparent; } 64%, 92% { background: #e6f7ee; border-left-color: #0f9d6b; } 100% { background: transparent; border-left-color: transparent; } }
@media (max-width: 360px) { .chk-card { grid-template-columns: 104px 1fr; gap: 10px; } }
@media (prefers-reduced-motion: reduce) {
  .chk-scan { display: none; } .chk-m, .chk-score, .chk-stamp { opacity: 1 !important; animation: none !important; transform: none !important; }
  .chk-steps li { animation: none !important; }
}

/* Struck-through regular prices, answer key, Custom full mock */
.pill s { font-size: 11px; font-weight: 600; opacity: .62; margin-left: 2px; }
.bill s { color: var(--ink-3); font-weight: 500; margin-right: 4px; }
.key-btn { margin-bottom: 10px; }
.fm-note { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 11px 14px; border-radius: 14px; border: 1.5px dashed #c9d6ee; background: #f6f9ff; color: var(--ink-2, #3b4a66); font-size: 13.5px; line-height: 1.35; }
.fm-note > svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.fm-note > span:first-of-type { flex: 1; min-width: 0; }
.fm-price { display: flex; align-items: baseline; gap: 6px; flex: none; white-space: nowrap; }
.fm-price b { font-size: 16px; color: var(--brand-deep); }
.fm-price s { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.fm-note.on { border-style: solid; border-color: #9fd8bf; background: var(--ok-soft); color: var(--ok); }
.fm-note.on > svg { color: var(--ok); }
.fm-note.pop { animation: fmPop .35s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes fmPop { from { transform: scale(.96); } to { transform: none; } }
/* Quick start, board-aware subjects, finish profile later, back to home */
.ob-hint { margin: 6px 2px 0; font-size: 12.5px; color: var(--ink-3); }
.ob-more { align-self: center; min-height: 44px; padding: 0 12px; }
.banner span b, .banner span small { display: block; }
.banner span small { font-weight: 500; font-size: 12px; opacity: .85; margin-top: 2px; }
.au-home { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--brand-2); text-decoration: none; }
.au-home svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (min-width: 960px) { .au-home { color: #cfe0ff; } }
/* Mocks tab: packs by subject; compact sheet actions */
.pk-sub { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tint, var(--brand-2)); }
.pk-sec h3 { display: flex; align-items: center; gap: 8px; }
.pk-sec h3 .subj-ic { width: 26px; height: 26px; border-radius: 8px; }
.pk-sec h3 .subj-ic svg { width: 15px; height: 15px; }
.chip-btn i { font-style: normal; font-size: 11px; font-weight: 700; margin-left: 2px; opacity: .7; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; gap: 6px; box-shadow: none; }
.btn.sm svg { width: 16px; height: 16px; }
.sh-acts { display: flex; gap: 8px; }
.sh-acts .btn { flex: 1 1 0; min-width: 0; }
.key-card { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 10px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.key-card > svg { width: 20px; height: 20px; flex: none; color: var(--brand-2); }
.key-card > span { flex: 1; min-width: 0; display: grid; }
.key-card b { font-size: 14px; } .key-card small { font-size: 12px; color: var(--ink-3); }
.key-card .btn { flex: none; }
.ring { width: 64px; height: 64px; }
.ring b { font-size: 18px; }
.score { padding: 12px; gap: 14px; }
.score > div:last-child b { font-size: 19px; }
.more-menu .dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--bad); vertical-align: middle; }
/* Custom test: level picker + request for the teacher (compact rows) */
.cm-opts { position: relative; display: grid; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.cm-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 12px; background: none; border: 0; text-align: left; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease; }
.cm-row + .cm-pop + .cm-row, .cm-row + .cm-row { border-top: 1px solid var(--line-2); }
.cm-row:active { background: #f6f8fc; }
.cm-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand-2); }
.cm-ic svg { width: 18px; height: 18px; }
.cm-ic.lv-easy { background: var(--ok-soft); color: var(--ok); } .cm-ic.lv-medium { background: #fff4e0; color: #b26b00; } .cm-ic.lv-high { background: var(--bad-soft); color: var(--bad); }
.cm-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cm-txt b { font-size: 14px; font-weight: 700; }
.cm-txt small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-val { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 13.5px; font-weight: 700; color: var(--brand-2); }
.cm-caret { width: 16px; height: 16px; transition: transform .2s var(--ease); }
#cmLevelBtn[aria-expanded=true] .cm-caret { transform: rotate(180deg); }
#cmNoteBtn[aria-expanded=true] .cm-caret { transform: rotate(90deg); }
.cm-pop { position: absolute; z-index: 5; top: 62px; left: 8px; right: 8px; padding: 6px; display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(7, 29, 71, .28); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center; transition: opacity .16s ease, transform .18s var(--ease); }
.cm-pop.on { opacity: 1; transform: none; }
.cm-opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cm-opt:active, .cm-opt:focus-visible { background: #f3f6fb; outline: 0; }
.cm-opt[aria-selected=true] { background: var(--brand-soft); }
.lv-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; }
.lv-dot.lv-easy { background: var(--ok); } .lv-dot.lv-medium { background: #e29400; } .lv-dot.lv-high { background: var(--bad); }
.cm-tick { width: 18px; height: 18px; color: var(--brand-2); opacity: 0; }
.cm-opt[aria-selected=true] .cm-tick { opacity: 1; }
.cm-notebox { position: relative; padding: 0 12px 12px; }
.cm-notebox.in { animation: sheetSwap .2s var(--ease) backwards; }
.cm-notebox textarea { width: 100%; min-height: 72px; padding: 10px 12px 22px; border: 1.5px solid var(--line); border-radius: 12px; font: 500 16px/1.35 inherit; font-family: inherit; color: var(--ink); background: #fbfcfe; resize: none; }
.cm-notebox textarea:focus { outline: 0; border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 4px rgba(26, 86, 219, .12); }
.cm-count { position: absolute; right: 22px; bottom: 18px; font-size: 11px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .cm-pop, .cm-caret { transition: none; } .cm-notebox.in { animation: none; } }

/* ── Payments: premium look, smooth motion, no blink ── */
.tsx-sheet { transition: transform .32s cubic-bezier(.2, .9, .25, 1); will-change: transform; }
.tsx-sheet-back { transition: background .28s ease; }
#sheetBody.swap { animation: sheetSwap .24s var(--ease) backwards; }   /* backwards: nothing lingers after the fade */
.sheet-x { z-index: 3; }   /* the close button always stays on top of sheet content */
@keyframes sheetSwap { from { opacity: 0; transform: translateY(6px); } }
.btn { transition: transform .14s var(--ease), background .18s ease, box-shadow .18s ease, opacity .18s ease; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled) { transform: scale(.975); }
.btn.busy { cursor: progress; }
.price { position: relative; overflow: hidden; border: 1px solid rgba(233, 196, 106, .38); border-radius: 20px; padding: 18px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(59, 130, 246, .35) 0%, transparent 55%), linear-gradient(160deg, #071d47 0%, #0b2a6b 100%);
  color: #fff; box-shadow: 0 18px 40px -20px rgba(7, 29, 71, .65); }
.price::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(243, 213, 138, .7), transparent); }
.price .price-top { flex-wrap: wrap; row-gap: 4px; }
.price .price-top b { color: #fff; font-size: 34px; }
.price .price-top s { color: rgba(255, 255, 255, .55); }
.price .price-top small { color: rgba(255, 255, 255, .72); flex-basis: 100%; }
.price .save { align-self: center; padding: 3px 9px; border-radius: 999px; background: rgba(243, 213, 138, .16); color: #f3d58a; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.price ul { color: rgba(255, 255, 255, .86); }
.price li svg { color: #f3d58a; }
.btn.pay { background: linear-gradient(135deg, #f6dc94 0%, #e2b453 55%, #c9952f 100%); color: #1a1405; box-shadow: 0 10px 24px -10px rgba(201, 149, 47, .7), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.pay:hover:not(:disabled) { background: linear-gradient(135deg, #f8e2a6 0%, #e6bb60 55%, #cf9c35 100%); }
.btn.pay svg { color: #1a1405; }
.btn.pay .spin { border-color: #1a1405; border-right-color: transparent; }
.pay-loader { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #e6ecf7; border-top-color: #c9952f; animation: spin .9s cubic-bezier(.5, .1, .5, .9) infinite; }
.celebrate.ok b { font-size: 19px; }
.ok-mark { width: 64px; height: 64px; }
.ok-mark circle { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: okDraw .5s var(--ease) forwards; }
.ok-mark path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: okDraw .32s .42s var(--ease) forwards; }
@keyframes okDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  #sheetBody.swap, .ok-mark circle, .ok-mark path { animation: none; stroke-dashoffset: 0; }
  .tsx-sheet, .btn { transition: none; }
}
/* ── Mocks: subject tiles → pack types; Home notice; TNC subject hints ── */
.mk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mk-tile { position: relative; display: grid; gap: 4px; padding: 14px; min-height: 128px; align-content: start; border-radius: 18px; color: var(--ink); text-decoration: none;
  background: radial-gradient(120% 90% at 100% 0%, var(--tint-soft) 0%, #fff 62%); border: 1px solid color-mix(in srgb, var(--tint) 18%, var(--line));
  box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--tint) 60%, transparent); animation: mkIn .32s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
  transition: transform .14s var(--ease), box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.mk-tile:active { transform: scale(.97); }
.mk-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tint) 78%, #fff), var(--tint)); box-shadow: 0 8px 18px -8px var(--tint); }
.mk-ic svg { width: 24px; height: 24px; }
.mk-tile b { font-size: 15px; }
.mk-tile small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.mk-badge { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 700; }
.mk-badge svg { width: 12px; height: 12px; }
@keyframes mkIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.mk-head { display: flex; align-items: center; gap: 12px; }
.mk-head .subj-ic { background: linear-gradient(145deg, color-mix(in srgb, var(--tint) 78%, #fff), var(--tint)); color: #fff; box-shadow: 0 10px 22px -10px var(--tint); }
.mk-head h2 { font-size: 19px; } .mk-head p { font-size: 13px; color: var(--ink-3); }
.mk-types { display: grid; gap: 12px; }
.mk-type { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 14px; border-radius: 18px; text-align: left; color: var(--ink); font: inherit;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); animation: mkIn .32s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); transition: transform .14s var(--ease); -webkit-tap-highlight-color: transparent; }
.mk-type:active { transform: scale(.98); }
.mk-type.best { border: 1.5px solid rgba(201, 149, 47, .55); background: linear-gradient(180deg, #fffaf0, #fff 60%); }
.mk-type.own { border-color: #b9e3cf; }
.mk-flag { position: absolute; top: -9px; left: 14px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #1a1405; background: linear-gradient(135deg, #f6dc94, #d9a84a); box-shadow: 0 4px 10px -4px rgba(201, 149, 47, .7); }
.mk-flag.own { display: inline-flex; align-items: center; gap: 3px; color: var(--ok); background: var(--ok-soft); box-shadow: none; }
.mk-flag.own svg { width: 12px; height: 12px; }
.mk-n { width: 58px; height: 58px; flex: none; display: grid; place-content: center; text-align: center; border-radius: 16px; background: var(--tint-soft); color: var(--tint); }
.mk-n b { font-size: 22px; line-height: 1; } .mk-n small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mk-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mk-info b { font-size: 14.5px; line-height: 1.3; }
.mk-info small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-price { flex: none; text-align: right; display: grid; }
.mk-price b { font-size: 17px; color: var(--brand-deep); } .mk-price small { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.mk-sub .fine svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--ok); }
.mk-note { position: relative; display: flex; align-items: center; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #071d47, #0b2a6b); color: #fff;
  box-shadow: 0 10px 24px -16px rgba(7, 29, 71, .7); animation: mkIn .3s var(--ease) both; transition: height .24s var(--ease), opacity .2s ease, margin .24s var(--ease); }
.mk-note.out { opacity: 0; margin-top: -10px; }
.mk-note a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 4px 9px 10px; color: inherit; text-decoration: none; }
.mk-note-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(243, 213, 138, .16); color: #f3d58a; }
.mk-note-ic svg { width: 18px; height: 18px; }
.mk-note-txt { flex: 1; min-width: 0; display: grid; }
.mk-note-txt b { font-size: 13.5px; } .mk-note-txt small { font-size: 11.5px; color: rgba(255, 255, 255, .72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-note-go { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: 12.5px; font-weight: 700; color: #f3d58a; }
.mk-note-go svg { width: 14px; height: 14px; }
.mk-note-x { width: 40px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: none; color: rgba(255, 255, 255, .6); }
.mk-note-x svg { width: 16px; height: 16px; }
.seg-hint.tnc { display: flex; align-items: center; gap: 6px; color: #8a5a00; }
.seg-hint.tnc svg { width: 14px; height: 14px; flex: none; }
.bill b.free { color: var(--ok); }
.key-card.wait { background: #f8fafd; border-style: dashed; }
.key-card.wait > svg { color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .mk-tile, .mk-type, .mk-note { animation: none; } }
/* ── Checkout: fits one screen on phone and laptop; details on demand ── */
#sheetBody:has(.co-bar) { gap: 10px; }
.tsx-sheet:has(.co-bar) { gap: 8px; padding-bottom: calc(12px + var(--sb)); }
.co-price { padding: 14px 16px; border-radius: 18px; }
.co-price .price-top b { font-size: 30px; }
.co-note { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .74); font-weight: 600; }
.co-more { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.co-more > summary { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.co-more > summary::-webkit-details-marker { display: none; }
.co-more > summary > svg:first-child { width: 18px; height: 18px; color: var(--brand-2); flex: none; }
.co-more > summary > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-more > summary em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--brand-2); }
.co-more > summary .chev { width: 16px; height: 16px; color: var(--brand-2); transition: transform .2s var(--ease); }
.co-more[open] > summary .chev { transform: rotate(180deg); }
.co-more-body { display: grid; gap: 10px; padding: 2px 12px 12px; animation: sheetSwap .22s var(--ease) backwards; }
.co-more-body .rows.sched { max-height: 220px; overflow-y: auto; }
.co-more-body .sec { margin-top: 2px; }
.co-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.co-list li { display: flex; align-items: flex-start; gap: 8px; } .co-list svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ok); stroke-width: 2.4; }
.co-bar { position: sticky; bottom: calc(-12px - var(--sb)); z-index: 2; display: flex; align-items: center; gap: 12px; margin: 2px -18px 0; padding: 10px 18px calc(10px + var(--sb));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line-2); }
.co-total { display: grid; flex: none; min-width: 74px; }
.co-total small { font-size: 11.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.co-total b { font-size: 21px; letter-spacing: -.01em; color: var(--brand-deep); }
.co-bar .btn { flex: 1; min-width: 0; min-height: 50px; }
.co-trust { display: flex; align-items: center; justify-content: center; gap: 6px; margin: -2px 0 0; font-size: 11.5px; color: var(--ink-3); }
.co-trust svg { width: 13px; height: 13px; color: var(--ok); flex: none; }
.co-bar ~ .no-refund { justify-content: center; padding: 0; margin-top: -6px; background: none; border: 0; color: var(--ink-3); font-size: 11px; }
.co-bar ~ .no-refund svg { display: none; }
.co-bar ~ .no-refund b { color: #9a3a2c; }
.promo-box > summary { min-height: 44px; }
.co-items { display: grid; gap: 8px; }
.co-items .cg { border-radius: 14px; }
.co-items .cg > summary { list-style: none; cursor: pointer; min-height: 52px; -webkit-tap-highlight-color: transparent; }
.co-items .cg > summary::-webkit-details-marker { display: none; }
.co-items .cg-name { flex: 1; min-width: 0; display: grid; font-size: 14px; }
.co-items .cg-name small { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.co-items .cg > summary b { font-size: 14px; } .co-items .cg > summary b.free { color: var(--ok); }
.co-items .cg > summary .chev { width: 16px; height: 16px; color: var(--ink-3); transition: transform .2s var(--ease); }
.co-items .cg[open] > summary .chev { transform: rotate(180deg); }
.co-items .cg ul { max-height: 200px; overflow-y: auto; }
.co-head h2 { font-size: 20px; }
@media (min-width: 600px) { .co-bar { margin: 2px -18px 0; } }
.au-legal { margin: 4px 0 0; text-align: center; font-size: 11.5px; color: var(--ink-3); }
.au-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.no-refund a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
/* ── Home fits one phone screen: subject icon grid (3 across), slim stats, compact checking card ── */
@media (max-width: 959px) {
  .v-home { gap: 12px; }
  .v-home .hello h2 { font-size: 20px; }
  .v-home .stats > div { padding: 8px 6px; }
  .v-home .stats strong { font-size: 19px; }
  .v-home .stats span { font-size: 11px; }
  .v-home .subj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .v-home .subj { gap: 6px; padding: 10px 9px 9px; border-radius: 14px; }
  .v-home .subj-ic { width: 34px; height: 34px; border-radius: 10px; }
  .v-home .subj-ic svg { width: 19px; height: 19px; }
  .v-home .subj-txt { display: grid; gap: 1px; min-width: 0; }
  .v-home .subj-txt b { font-size: 13px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
  .v-home .subj-txt small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v-home .subj-meter { height: 3px; }
  .v-home .chk-card { grid-template-columns: 88px 1fr; gap: 10px; padding: 9px 12px; }
  .v-home .chk-copy { gap: 4px; }
  .v-home .chk-copy .eyebrow { font-size: 10.5px; }
  .v-home .chk-steps { gap: 2px; }
  .v-home .chk-steps li { padding: 3px 7px; }
  .v-home .chk-steps b { font-size: 12.5px; } .v-home .chk-steps small { font-size: 11px; }
  .v-home .sec { margin-top: -2px; }
}
