/* Quiz.doxaed design kit (dx). GENERATED by scripts/build_dx_css.py from dx/proto/head.html,
   the approved competition prototype. Do not edit by hand: change the snapshot or the script. */
/* Layout: a workspace. All competitions opens on a list; a competition is a place with a sidebar of its pages
   (Overview, Questions, Teams, Rounds, Results, Answers, Practice, Members), full width content, drawers for
   one item, wizards for setup. Tokens are the shared DoxaEd design system, verbatim. */
:root, .dx-light {
  --bg: #F8FAFD; --surface: #FFFFFF; --surface-2: #F0F4F9; --surface-3: #E9EEF6;
  --line: #DADCE0; --outline: #747775;
  --ink: #1F1F1F; --ink-2: #444746; --ink-3: #5F6368;
  --primary: #1A73E8; --primary-ink: #0B57D0; --on-primary: #FFFFFF;
  --pc: #D3E3FD; --on-pc: #041E49;
  --quiz: #8E5BD8; --quiz-c: #EEE3FC; --on-quiz-c: #3A1A6B;
  --ok: #146C2E; --ok-c: #C4EED0; --warn: #8A5300; --warn-c: #FEEFC3; --danger: #B3261E; --danger-c: #F9DEDC;
  --dot-a: #1E8E3E; --dot-b: #E8710A; --dot-c: #9334E6;
  --st-emerald: #1E8E3E; --st-sky: #1A73E8; --st-violet: #8E5BD8; --st-amber: #E37400; --st-pink: #D01884;
  --scrim: rgb(32 33 36 / .32);
  --toast: #303134; --on-toast: #F1F3F4;
  --gold: #B8860B; --silver: #7A7F87; --bronze: #A0522D;
  --shadow-1: 0 1px 2px rgb(60 64 67 / .3), 0 1px 3px 1px rgb(60 64 67 / .15);
  --shadow-2: 0 1px 2px rgb(60 64 67 / .3), 0 2px 6px 2px rgb(60 64 67 / .15);
  --shadow-3: 0 1px 3px rgb(60 64 67 / .3), 0 4px 8px 3px rgb(60 64 67 / .15);
  --font: 'Inter', 'Noto Sans Devanagari', 'Noto Sans Bengali', 'Noto Sans Tamil', 'Noto Naskh Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 16px; --logo-filter: none;
  --stage: #1B1530; --stage-2: #2B2248; --stage-ink: #FFFFFF; --stage-soft: #C9C2E6;
  --live-a: #D93025; --live-b: #1A73E8; --live-c: #E37400; --live-d: #188038; --live-ink: #FFFFFF;
  --paper: #FFFFFF; --paper-ink: #151515; --paper-soft: #6B6B6B; --paper-line: #E3E3E3; --paper-rule: #9AA0A6;
  --fig: #FFFFFF; --fig-ink: #444746;
  --bar-up: 0 -1px 3px rgb(60 64 67 / .12), 0 -4px 12px rgb(60 64 67 / .08);
  --toast-action: #8AB4F8;
  --on-medal: #FFFFFF; --gold-badge: #9A6A00;
  --cam-bg: #0B0B0C; --cam-guide: #6DD58C; --cam-sheet: #F4F4F0;
  --sb-thumb: #BDC1C6; --sb-thumb-hover: #80868B;
  --k-quiz-bg: #D6E4FD; --k-quiz-fg: #0A4AA6; --k-competition-bg: #FDE9B0; --k-competition-fg: #7A4A00;
  --k-bee-bg: #FFDCC6; --k-bee-fg: #9A3600; --k-practice-bg: #CBEFD6; --k-practice-fg: #12622A;
  --k-bank-bg: #E9DDFB; --k-bank-fg: #5726A6; --k-buzzer-bg: #FADBE3; --k-buzzer-fg: #A0173D;
  --k-timer-bg: #C6EEEA; --k-timer-fg: #0A5F57; --k-routine-bg: #E1EEB4; --k-routine-fg: #485B00;
  --k-cert-bg: #F6D9F0; --k-cert-fg: #861F74;
  --k-presentation-bg: #DCDFFB; --k-presentation-fg: #2E3BA8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131314; --surface: #1E1F20; --surface-2: #282A2C; --surface-3: #333537;
    --line: #444746; --outline: #8E918F;
    --ink: #E3E3E3; --ink-2: #C4C7C5; --ink-3: #A9ACAE;
    --primary: #A8C7FA; --primary-ink: #A8C7FA; --on-primary: #062E6F;
    --pc: #0842A0; --on-pc: #D3E3FD;
    --quiz: #CDB2FF; --quiz-c: #46287A; --on-quiz-c: #F1E6FF;
    --ok: #6DD58C; --ok-c: #0F5223; --warn: #FFC56B; --warn-c: #5A3E00; --danger: #F2B8B5; --danger-c: #8C1D18;
    --dot-a: #6DD58C; --dot-b: #FFB067; --dot-c: #D7AEFB;
    --st-emerald: #6DD58C; --st-sky: #A8C7FA; --st-violet: #CDB2FF; --st-amber: #FFB067; --st-pink: #FF8BCB;
    --scrim: rgb(0 0 0 / .55); --toast: #E3E3E3; --on-toast: #1F1F1F;
    --gold: #E8C25A; --silver: #B9BDC4; --bronze: #D99A6C;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .5), 0 1px 3px 1px rgb(0 0 0 / .3);
    --shadow-2: 0 1px 2px rgb(0 0 0 / .5), 0 2px 6px 2px rgb(0 0 0 / .3);
    --shadow-3: 0 1px 3px rgb(0 0 0 / .5), 0 4px 8px 3px rgb(0 0 0 / .35);
    --logo-filter: brightness(0) invert(1);
    --fig: #F1F3F4;
    --bar-up: 0 -1px 3px rgb(0 0 0 / .5), 0 -4px 12px rgb(0 0 0 / .35);
    --toast-action: #0B57D0;
    --on-medal: #1F1F1F; --gold-badge: #E8C25A;
    --sb-thumb: #5F6368; --sb-thumb-hover: #9AA0A6;
    --k-quiz-bg: #163C73; --k-quiz-fg: #CDDFFF; --k-competition-bg: #5A4100; --k-competition-fg: #FFD978;
    --k-bee-bg: #612B0C; --k-bee-fg: #FFC29B; --k-practice-bg: #114D27; --k-practice-fg: #A6E7BA;
    --k-bank-bg: #46287A; --k-bank-fg: #F1E6FF; --k-buzzer-bg: #6B1A30; --k-buzzer-fg: #FFC3D2;
    --k-timer-bg: #0C4A44; --k-timer-fg: #9DEAE0; --k-routine-bg: #404A07; --k-routine-fg: #DAEC80;
    --k-cert-bg: #5B1A50; --k-cert-fg: #FBC5F0;
    --k-presentation-bg: #2B2F7A; --k-presentation-fg: #D3D8FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"], .dx-dark {
  --bg: #131314; --surface: #1E1F20; --surface-2: #282A2C; --surface-3: #333537;
  --line: #444746; --outline: #8E918F;
  --ink: #E3E3E3; --ink-2: #C4C7C5; --ink-3: #A9ACAE;
  --primary: #A8C7FA; --primary-ink: #A8C7FA; --on-primary: #062E6F;
  --pc: #0842A0; --on-pc: #D3E3FD;
  --quiz: #CDB2FF; --quiz-c: #46287A; --on-quiz-c: #F1E6FF;
  --ok: #6DD58C; --ok-c: #0F5223; --warn: #FFC56B; --warn-c: #5A3E00; --danger: #F2B8B5; --danger-c: #8C1D18;
  --dot-a: #6DD58C; --dot-b: #FFB067; --dot-c: #D7AEFB;
  --st-emerald: #6DD58C; --st-sky: #A8C7FA; --st-violet: #CDB2FF; --st-amber: #FFB067; --st-pink: #FF8BCB;
  --scrim: rgb(0 0 0 / .55); --toast: #E3E3E3; --on-toast: #1F1F1F;
  --gold: #E8C25A; --silver: #B9BDC4; --bronze: #D99A6C;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .5), 0 1px 3px 1px rgb(0 0 0 / .3);
  --shadow-2: 0 1px 2px rgb(0 0 0 / .5), 0 2px 6px 2px rgb(0 0 0 / .3);
  --shadow-3: 0 1px 3px rgb(0 0 0 / .5), 0 4px 8px 3px rgb(0 0 0 / .35);
  --logo-filter: brightness(0) invert(1);
  --fig: #F1F3F4;
  --bar-up: 0 -1px 3px rgb(0 0 0 / .5), 0 -4px 12px rgb(0 0 0 / .35);
  --toast-action: #0B57D0;
  --on-medal: #1F1F1F; --gold-badge: #E8C25A;
  --sb-thumb: #5F6368; --sb-thumb-hover: #9AA0A6;
  --k-quiz-bg: #163C73; --k-quiz-fg: #CDDFFF; --k-competition-bg: #5A4100; --k-competition-fg: #FFD978;
  --k-bee-bg: #612B0C; --k-bee-fg: #FFC29B; --k-practice-bg: #114D27; --k-practice-fg: #A6E7BA;
  --k-bank-bg: #46287A; --k-bank-fg: #F1E6FF; --k-buzzer-bg: #6B1A30; --k-buzzer-fg: #FFC3D2;
  --k-timer-bg: #0C4A44; --k-timer-fg: #9DEAE0; --k-routine-bg: #404A07; --k-routine-fg: #DAEC80;
  --k-cert-bg: #5B1A50; --k-cert-fg: #FBC5F0;
  --k-presentation-bg: #2B2F7A; --k-presentation-fg: #D3D8FF;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3 { text-wrap: balance; }
:where(a, button, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.lucide { width: 20px; height: 20px; flex: none; stroke-width: 2; }
mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: middle; }

/* ---------- app frame ---------- */
.app { position: absolute; inset: 0; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; overflow: hidden; }
.hdr { height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding-inline: 8px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.ibtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; display: inline-grid; place-items: center; color: var(--ink-2); position: relative; flex: none; }
.ibtn:hover { background: var(--surface-3); }
.ibtn.sm { width: 36px; height: 36px; }
.brand { display: inline-flex; align-items: center; height: 44px; flex: none; border-radius: 8px; padding-inline: 4px; }
.brand .crop { display: block; height: 32px; overflow: hidden; }
.brand img { display: block; height: 32px; width: auto; max-width: none; filter: var(--logo-filter); }
.search { flex: 1 1 auto; max-width: 720px; min-width: 0; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 24px; background: var(--surface-2); color: var(--ink-3); margin-left: 12px; }
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; height: 100%; color: var(--ink); }
.hdr-end { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--quiz); color: var(--surface); display: grid; place-items: center; font-weight: 600; font-size: 14px; border: 0; }
.menu-btn, .search-ic { display: none; }
.frame { flex: 1; min-height: 0; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.frame.no-side { grid-template-columns: minmax(0, 1fr); }
.side { overflow-y: auto; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); scrollbar-width: thin; min-height: 0; }
.side > * { flex-shrink: 0; }
.side-bottom { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.ctx { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-height: 56px; }
.ctx:hover { background: var(--surface-2); }
.ctx-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--quiz-c); color: var(--on-quiz-c); display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; }
.ctx-txt { min-width: 0; flex: 1; display: grid; }
.ctx-txt strong { font-weight: 600; font-size: 14px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ctx-txt span { color: var(--ink-3); font-size: 12px; }
.create { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px 0 18px; border-radius: 16px; background: var(--pc); color: var(--on-pc); font-weight: 600; font-size: 14px; border: 0; box-shadow: var(--shadow-1); margin: 12px 0 4px; align-self: flex-start; }
.create:hover { box-shadow: var(--shadow-2); }
.create.live { background: var(--primary); color: var(--on-primary); }
.livecode { display: flex; align-items: center; gap: 8px; margin: 4px 4px 8px; font-size: 12px; color: var(--ink-3); }
.livecode b { font: 700 13px/1 var(--mono); letter-spacing: .12em; color: var(--ink); }
.ldot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: blink 1.2s infinite; flex: none; }
@keyframes blink { 50% { opacity: .3; } }
.nav-g { font: 500 12px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 16px 16px 6px; }
.nav-g { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 12px 16px 4px; border: 0; background: none; cursor: pointer; text-align: left; border-radius: 12px; }
.nav-g:hover { color: var(--ink); }
.nav-g .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-g > svg, .nav-g > i { width: 16px; height: 16px; flex: none; transition: transform .15s; }
.nav-g[aria-expanded="false"] > svg, .nav-g[aria-expanded="false"] > i { transform: rotate(-90deg); }
.nav-grp { display: grid; gap: 2px; min-width: 0; }
.nav-grp.closed { display: none; }
.nav-i { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 14px 0 16px; border-radius: 999px; color: var(--ink-2); font-weight: 500; border: 0; background: none; width: 100%; text-align: left; }
.nav-i:hover { background: var(--surface-3); }
.nav-i[aria-current="page"] { background: var(--pc); color: var(--on-pc); font-weight: 600; }
.nav-i .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-i .badge { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nav-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--warn-c); color: var(--warn); }
.side-scrim { display: none; }
.main { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px var(--gutter) 112px; scrollbar-width: thin; }
.wrap { width: 90%; margin-inline: auto; display: grid; gap: 20px; min-width: 0; }
.cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-h > div:first-child { min-width: 0; }
h1 { font: 500 24px/32px var(--font); margin: 0; letter-spacing: -.01em; }
h2 { font: 600 16px/24px var(--font); margin: 0; }
h3 { font: 600 14px/20px var(--font); margin: 0; }
.sub { color: var(--ink-3); margin: 2px 0 0; }
.muted { color: var(--ink-3); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { display: flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; margin-bottom: 2px; }
.crumb button { border: 0; background: none; color: var(--primary-ink); padding: 0; font-weight: 500; min-height: 24px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--outline); background: transparent; color: var(--primary-ink); font-weight: 500; white-space: nowrap; position: relative; }
.btn:hover { background: var(--surface-3); }
.btn.p { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.p:hover { box-shadow: var(--shadow-1); background: var(--primary); }
.btn.t { background: var(--pc); color: var(--on-pc); border-color: var(--pc); }
.btn.x { border-color: transparent; padding: 0 12px; }
.btn.d { color: var(--danger); border-color: var(--danger); }
.btn.dp { background: var(--danger); color: var(--surface); border-color: var(--danger); }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg.lucide { width: 18px; height: 18px; }
.btn::after, .fchip::after, .nav-i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.fchip, .nav-i { position: relative; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.card-h .grow { flex: 1; min-width: 0; }
.card-b { padding: 0 16px 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.li-main strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-main span { color: var(--ink-3); font-size: 13px; }
button.li { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: var(--ink); }
button.li:first-child { border-top: 0; }
.li.click { cursor: pointer; }
.li.click:hover, button.li:hover { background: var(--surface-2); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 8px; font: 500 12px/16px var(--font); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; flex: none; }
.chip.ok { background: var(--ok-c); color: var(--ok); } .chip.warn { background: var(--warn-c); color: var(--warn); }
.chip.danger { background: var(--danger-c); color: var(--danger); } .chip.brand { background: var(--pc); color: var(--on-pc); }
.chip.quiz { background: var(--quiz-c); color: var(--on-quiz-c); }
.chip.live { background: var(--danger); color: var(--surface); font-weight: 600; }
.chip svg.lucide { width: 14px; height: 14px; }
.chip.use-bee { background: var(--k-bee-bg); color: var(--k-bee-fg); }
.chip.use svg.lucide { color: inherit; }
@media (max-width: 480px) { .chip.use { padding: 0 6px; } .chip.use .use-t { display: none; } }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--outline); background: transparent; color: var(--ink-2); font-weight: 500; white-space: nowrap; font-size: 13px; }
.fchip[aria-pressed="true"] { background: var(--pc); color: var(--on-pc); border-color: var(--pc); }
.fchip svg.lucide { width: 16px; height: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lvl { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.lvl.easy { background: var(--ok); } .lvl.medium { background: var(--warn); } .lvl.hard { background: var(--danger); }
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.bar.okb > i { background: var(--ok); }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 16px; }
.empty .scene { width: 64px; height: 64px; border-radius: 50%; background: var(--quiz-c); color: var(--on-quiz-c); display: grid; place-items: center; }
.empty .scene svg.lucide { width: 28px; height: 28px; }
.empty p { margin: 0; color: var(--ink-3); max-width: 44ch; }
.empty b { font-size: 16px; font-weight: 600; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld > span { font: 500 12px/16px var(--font); color: var(--ink-2); }
.in { width: 100%; height: 44px; border: 1px solid var(--outline); border-radius: 8px; padding: 0 12px; background: var(--surface); color: var(--ink); }
textarea.in { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 20px; }
.in:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.help { font-size: 12px; color: var(--ink-3); margin: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: start; }
/* Fields in a row share one top: help text sits below its input and never moves it. */
.fields > .fld { align-content: start; }
.fields input[type="number"].in { -moz-appearance: textfield; appearance: textfield; }
.fields input[type="number"].in::-webkit-inner-spin-button, .fields input[type="number"].in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.seg { justify-self: start; display: inline-flex; border: 1px solid var(--outline); border-radius: 999px; overflow-x: auto; max-width: 100%; flex-wrap: nowrap; scrollbar-width: none; flex-shrink: 0; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; height: 40px; padding: 0 16px; color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.seg button + button { border-left: 1px solid var(--outline); }
.seg button[aria-pressed="true"] { background: var(--pc); color: var(--on-pc); }
.seg button svg.lucide { width: 16px; height: 16px; }
/* A seg too wide for its row wraps into separate pills (dx.js sets .wrapd), never a sideways scroll. */
.seg.wrapd { flex-wrap: wrap; overflow: visible; flex-shrink: 1; border: 0; border-radius: 0; gap: 6px; }
.seg.wrapd button, .seg.wrapd button + button { border: 1px solid var(--outline); border-radius: 999px; }
.tgl { display: flex; align-items: center; gap: 12px; cursor: pointer; border: 0; background: none; padding: 6px 0; color: var(--ink); min-height: 44px; text-align: left; width: 100%; }
.tgl .tl { flex: 1; min-width: 0; display: grid; }
.tgl .tl small { color: var(--ink-3); font-size: 12px; }
.tgl i.sw { width: 36px; height: 20px; border-radius: 10px; background: var(--surface-3); border: 2px solid var(--outline); position: relative; flex: none; }
.tgl i.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--outline); transition: transform .15s; }
.tgl[aria-checked="true"] i.sw { background: var(--primary); border-color: var(--primary); }
.tgl[aria-checked="true"] i.sw::after { transform: translateX(16px); background: var(--on-primary); }

/* fselect: every dropdown is a button and a list, never a native select */
.fsel-w { position: relative; min-width: 0; }
.fsel { width: 100%; height: 44px; border: 1px solid var(--outline); border-radius: 8px; background: var(--surface); display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; text-align: left; color: var(--ink); }
.fsel.chipish { height: 32px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); width: auto; }
.fsel span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop { position: absolute; z-index: 45; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(340px, 86vw); background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-2); padding: 6px 0; max-height: 320px; overflow: auto; }
.pop.right { left: auto; right: 0; }
/* Open pops sit in the top layer, so row stacking and scroll boxes never cover or clip them. */
.pop[popover] { position: fixed; inset: auto; margin: 0; border: 0; color: inherit; }
.fsel-w:has(> .pop:not([hidden])) { z-index: 46; }
.pop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 0 16px; min-height: 44px; border: 0; background: none; color: var(--ink); }
.pop button:hover { background: var(--surface-3); }
.pop button[aria-selected="true"] { background: var(--pc); color: var(--on-pc); }
.pop button.dz { color: var(--danger); }
.pop button .ms { margin-left: auto; color: var(--ink-3); font-size: 12px; }
/* Disabled menu rows read as unavailable in both themes: muted text and icon, no hover tint. */
.pop :is(button, a)[disabled], .pop :is(button, a)[aria-disabled="true"] { color: var(--ink-3); opacity: .5; cursor: not-allowed; pointer-events: auto; }
.pop :is(button, a)[disabled]:hover, .pop :is(button, a)[aria-disabled="true"]:hover { background: none; }
.pop:has(> .pop-q) { padding-top: 0; scroll-padding-top: 54px; }
.pop .pop-q { position: sticky; top: 0; z-index: 2; padding: 6px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pop .pop-q input { width: 100%; min-height: 40px; }
.pop .pop-none { margin: 0; padding: 8px 16px; color: var(--ink-3); font-size: 14px; }
.pop > [role="option"][hidden] { display: none; }
.pop button.ind1 { padding-inline-start: 32px; }
.pop button.ind2 { padding-inline-start: 48px; }
.pop button.ind3 { padding-inline-start: 64px; }
.pop button[data-full] .ms { flex: none; padding-inline-start: 12px; }
.pop .pop-h { padding: 8px 16px 4px; font: 500 12px/16px var(--font); color: var(--ink-3); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* team logo */
.tl-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: var(--fig); border: 1px solid var(--line); flex: none; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--fig-ink); }
.tl-logo.xs { width: 22px; height: 22px; border-radius: 6px; }
.tl-logo.s { width: 26px; height: 26px; border-radius: 7px; }
.tl-logo.l { width: 48px; height: 48px; border-radius: 12px; }
.tl-logo.xl { width: 72px; height: 72px; border-radius: 16px; }
.pav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; background: var(--quiz-c); color: var(--on-quiz-c); }
.pav.lg { width: 56px; height: 56px; font-size: 16px; }
.pav.photo { background: var(--surface-3); color: var(--ink-2); }

/* toolbar and filters */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .srch { flex: 1 1 260px; max-width: 440px; position: relative; }
.srch { position: relative; }
.srch svg.lucide { position: absolute; left: 12px; top: 12px; color: var(--ink-3); }
.srch .in { padding-left: 42px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters-btn { display: none; }
.tbl-w { overflow-x: auto; }
table.tb { border-collapse: collapse; width: 100%; font-size: 13px; }
table.tb th, table.tb td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.tb th { font-size: 12px; font-weight: 500; color: var(--ink-3); background: var(--surface); position: sticky; top: 0; }
table.tb .l { text-align: left; }
table.tb .tm { text-align: left; position: sticky; left: 0; background: var(--surface); min-width: 200px; max-width: 300px; }
table.tb .tm > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
table.tb .tm span { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
table.tb .tot { font-weight: 700; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb .rk { width: 40px; text-align: center; color: var(--ink-3); font-weight: 700; }
table.tb .e { color: var(--ink-3); }
/* A table's lead name wraps instead of pushing the table wider than its card. */
table.tb td.l:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 120px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--pc); color: var(--on-pc); flex-wrap: wrap; }
.banner.warn { background: var(--warn-c); color: var(--warn); }
.banner.ok { background: var(--ok-c); color: var(--ok); }
.banner .grow { flex: 1; min-width: 180px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; text-align: left; color: var(--ink); min-height: 84px; }
button.kpi:hover { background: var(--surface-2); }
.kpi span { font-size: 12px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi span svg.lucide { width: 16px; height: 16px; }
.kpi b { font: 600 26px/32px var(--font); font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; color: var(--ink-3); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks .ci { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--outline); color: var(--ink-3); }
.checks .done .ci { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.checks .ci svg.lucide { width: 16px; height: 16px; stroke-width: 3; }
.sum-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.sum-grid dt { color: var(--ink-3); } .sum-grid dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* competitions list */
.clist .li { min-height: 72px; }
.cmark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--quiz-c); color: var(--on-quiz-c); flex: none; }
.cmeta { display: flex; gap: 6px 14px; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; }
.li-main .x-cp { display: inline-flex; align-items: center; gap: 3px; vertical-align: bottom; color: var(--ok); font-weight: 500; }
.x-cp svg, .x-cp i { width: 13px; height: 13px; }
.cmeta b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* questions */
.cq { display: grid; grid-template-columns: clamp(260px, 26%, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tree { padding: 8px; position: sticky; top: 0; }
.t-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 12px; border-radius: 8px; border: 0; background: none; text-align: left; color: var(--ink-2); }
.t-row:hover { background: var(--surface-2); }
.t-row[aria-current="true"] { background: var(--pc); color: var(--on-pc); font-weight: 600; }
.t-row .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-row .cnt { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.t-row[aria-current="true"] .cnt { color: var(--on-pc); }
.t-sep { border-top: 1px solid var(--line); margin: 8px 4px; }
.qline { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); cursor: pointer; min-width: 0; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; color: var(--ink); }
.qline:first-child { border-top: 0; }
.qline:hover { background: var(--surface-2); }
.qline .qt { flex: 1; min-width: 0; display: grid; gap: 6px; }
.qline .qx { font-size: 15px; line-height: 23px; overflow-wrap: anywhere; }
.qline .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.qline .ans { color: var(--ok); font-weight: 600; }
.box { width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--outline); display: grid; place-items: center; flex: none; background: none; padding: 0; color: var(--on-primary); position: relative; margin-top: 2px; }
.box::after { content: ""; position: absolute; inset: -12px; }
.box[aria-checked="true"], .box[aria-checked="mixed"] { background: var(--primary); border-color: var(--primary); }
.selall { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.selall .box { margin-top: 0; }
.selbar .box { border-color: currentColor; }
.selbar .lnk { background: none; border: 0; padding: 0 4px; min-height: 44px; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.box svg.lucide { width: 14px; height: 14px; stroke-width: 3; }
.selbar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--pc); color: var(--on-pc); flex-wrap: wrap; }
.selbar b { margin-right: auto; }
.selbar .selall { margin-right: auto; flex-wrap: wrap; gap: 4px 12px; }
.selbar .selall b { margin-right: 0; }
.selbar .btn { color: var(--on-pc); border-color: transparent; }
.optl { display: grid; gap: 6px; margin-top: 2px; }
.optl div { display: flex; gap: 8px; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.optl .L { font-weight: 700; color: var(--ink-3); width: 18px; flex: none; }
.optl .ok { color: var(--ok); font-weight: 600; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.card > .pager:first-child { border-top: 0; }
.pager.pg { justify-content: space-between; flex-wrap: wrap; row-gap: 4px; padding: 6px 12px 6px 16px; }
.pg-size { display: flex; align-items: center; gap: 8px; }
.pg-size .fsel.chipish { min-width: 64px; }
.pg-of { margin-left: auto; white-space: nowrap; }
.pg-nav { display: flex; align-items: center; gap: 2px; }
.pg-ns { display: flex; align-items: center; gap: 2px; }
.pg-n { min-width: 36px; height: 36px; padding: 0 6px; border-radius: 18px; display: inline-grid; place-items: center; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; position: relative; text-decoration: none; }
a.pg-n:hover { background: var(--surface-3); }
a.pg-n::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.pg-n[aria-current="page"] { background: var(--pc); color: var(--on-pc); font-weight: 600; }
.pg-gap { min-width: 20px; text-align: center; color: var(--ink-3); }
@media (max-width: 599px) { .pager.pg { padding: 6px 4px 6px 12px; } .pg-ns { display: none; } }

/* teams */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; color: var(--ink); min-height: 96px; width: 100%; }
.tcard:hover { border-color: var(--outline); background: var(--surface-2); }
.tcard .tl-logo { grid-row: 1 / 3; }
.tcard .tn { font-weight: 600; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .ts { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tcard .tfoot { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.avs { display: flex; }
.avs .pav { width: 28px; height: 28px; font-size: 11px; border: 2px solid var(--surface); }
.avs .pav + .pav { margin-left: -8px; }
.code { font: 700 13px/1 var(--mono); letter-spacing: .12em; color: var(--ink); }
.code.lg { font-size: 22px; }
.copyb { display: inline-flex; align-items: center; gap: 6px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; color: var(--ink); position: relative; }
.copyb::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.copyb svg.lucide { width: 16px; height: 16px; color: var(--ink-3); }
.stu { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.stu:first-child { border-top: 0; }
.photo-slot { width: 56px; height: 56px; border-radius: 50%; border: 1.5px dashed var(--outline); display: grid; place-items: center; color: var(--ink-3); background: var(--surface-2); flex: none; position: relative; }
.photo-slot .pav { position: absolute; inset: 0; width: auto; height: auto; }
.photo-slot .cam { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; }
.photo-slot .cam svg.lucide { width: 14px; height: 14px; }
.logo-up { display: flex; align-items: center; gap: 14px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches .sw { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; position: relative; padding: 0; }
.swatches .sw::after { content: ""; position: absolute; inset: -5px; }
.swatches .sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

/* rounds flow */
.flowbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-3); font-size: 12px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.flow-h { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 0; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.stage-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.stage-col.par { gap: 16px; }
.stagec { --sc: var(--st-violet); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; min-width: 0; overflow: hidden; }
.stagec.emerald { --sc: var(--st-emerald); } .stagec.sky { --sc: var(--st-sky); } .stagec.amber { --sc: var(--st-amber); } .stagec.pink { --sc: var(--st-pink); }
.stage-h { display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); background: color-mix(in srgb, var(--sc) 9%, var(--surface)); }
.stage-h .sdot { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); flex: none; }
.stage-h .stx { flex: 1; min-width: 0; display: grid; }
.stage-h .stx b { font-weight: 600; font-size: 15px; }
.stage-h .stx small { color: var(--ink-3); font-size: 12px; }
.stage-in { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12px; color: var(--ink-2); border-bottom: 1px dashed var(--line); }
.stage-in svg.lucide { width: 16px; height: 16px; color: var(--ink-3); }
.rlist { list-style: none; margin: 0; padding: 6px; display: grid; gap: 0; }
.rcard { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 8px 6px 8px 10px; border-radius: 12px; border: 0; background: none; text-align: left; color: var(--ink); position: relative; }
.rcard:hover { background: var(--surface-2); }
.rcard .rn { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.rcard .rtx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rcard .rtx b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard .rtx small { color: var(--ink-3); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rcard .rtx small svg.lucide { width: 14px; height: 14px; }
.rcard.tb { min-height: 44px; padding-left: 46px; }
.rcard.tb .rn { display: none; }
.rcard.tb .rtx b { font-size: 13px; color: var(--ink-2); }
.rcard.tb::before { content: ""; position: absolute; left: 22px; top: 8px; bottom: 50%; width: 12px; border-left: 2px dashed var(--line); border-bottom: 2px dashed var(--line); border-bottom-left-radius: 8px; }
.rcard .kic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.rcard .kic svg.lucide { width: 18px; height: 18px; }
.ins { display: flex; justify-content: center; height: 8px; position: relative; }
.ins button { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); display: grid; place-items: center; opacity: 0; z-index: 2; }
.ins button::after { content: ""; position: absolute; inset: -8px; }
.ins button svg.lucide { width: 16px; height: 16px; }
.rlist:hover .ins button, .ins button:focus-visible { opacity: 1; }
.ins button:hover { background: var(--pc); color: var(--on-pc); border-color: var(--primary); }
.stage-out { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface-2); }
.stage-out svg.lucide { width: 18px; height: 18px; color: var(--sc); }
.stage-add { display: flex; gap: 6px; padding: 6px 8px 8px; }
.stage-add .btn { flex: 1; }
.conn { display: grid; place-items: center; align-self: stretch; min-width: 0; position: relative; }
.flow-h .conn { width: 64px; }
.conn .arrow small { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.flow-h > .conn { grid-row: 1; }
.flow-v { display: grid; gap: 0; }
.flow-v .conn { height: 52px; }
.flow-v .conn .arrow { grid-auto-flow: column; align-items: center; gap: 8px; }
.par-wrap { display: grid; gap: 12px; position: relative; }
.par-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.par-tag svg.lucide { width: 14px; height: 14px; }
.podc { --sc: var(--gold); }
.podc .stage-h { background: var(--surface); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
ol.pod { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
ol.pod li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 8px; border-radius: 10px; min-width: 0; }
ol.pod .pn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); flex: none; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); }
ol.pod .p1 { background: var(--gold-badge); color: var(--on-medal); } ol.pod .p2 { background: var(--silver); color: var(--on-medal); } ol.pod .p3, ol.pod .p4 { background: var(--bronze); color: var(--on-medal); }
ol.pod .pi { flex: 1; min-width: 0; display: grid; }
ol.pod .pi b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.pod .pi small { color: var(--ink-3); font-size: 12px; }
ol.pod .pz { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.ranked { padding: 10px 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; }
.ranked div { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.ranked span { color: var(--ink-3); }

/* wizard (full screen) */
.wiz { position: absolute; inset: 0; z-index: 85; background: var(--bg); display: flex; flex-direction: column; }
.wiz-h { height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter) 0 8px; border-bottom: 1px solid var(--line); }
.wiz-h .wt { flex: 1; min-width: 0; display: grid; }
.wiz-h .wt b { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-h .wt small { color: var(--ink-3); font-size: 12px; }
.wiz-b { flex: 1; min-height: 0; overflow-y: auto; padding: 24px var(--gutter) 32px; }
.wiz-in { width: min(1080px, 100%); margin-inline: auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.vstep { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: sticky; top: 0; }
.vstep button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); min-height: 52px; }
.vstep button:hover { background: var(--surface-2); }
.vstep button[aria-current="step"] { background: var(--surface-3); color: var(--ink); font-weight: 600; }
.vstep .n { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--outline); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.vstep .done .n { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.vstep .done .n svg.lucide { width: 16px; height: 16px; stroke-width: 3; }
.vstep small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; }
.wcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 20px; min-width: 0; }
.wcard > h2 { font-size: 20px; line-height: 28px; font-weight: 500; }
.wsec { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.wsec:first-of-type { border-top: 0; padding-top: 0; }
.wsec > h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.wiz-f { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.wiz-f .grow { margin-right: auto; color: var(--ink-3); font-size: 13px; }
.wiz-ph { display: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 6px; align-content: start; text-align: left; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 112px; position: relative; }
.tile:hover { border-color: var(--outline); background: var(--surface-2); }
.tile[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--surface); background: color-mix(in srgb, var(--pc) 45%, var(--surface)); }
.tile .t-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--quiz-c); color: var(--on-quiz-c); display: grid; place-items: center; }
.tile strong { font-weight: 600; }
.tile span { color: var(--ink-3); font-size: 13px; }
.tile .tck { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: none; place-items: center; }
.tile .tck svg.lucide { width: 14px; height: 14px; stroke-width: 3; }
.tile[aria-pressed="true"] .tck { display: grid; }
.ways { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.way { display: flex; gap: 10px; align-items: center; padding: 10px 12px; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; color: var(--ink); font-weight: 500; }
.way[aria-pressed="true"] { border-color: var(--primary); background: var(--pc); color: var(--on-pc); }
.way svg.lucide { color: var(--ink-3); }
.way[aria-pressed="true"] svg.lucide { color: var(--on-pc); }
.stepn { display: inline-flex; align-items: center; border: 1px solid var(--outline); border-radius: 999px; height: 44px; }
.stepn button { width: 44px; height: 42px; border: 0; background: none; display: grid; place-items: center; color: var(--ink-2); border-radius: 999px; }
.stepn button:hover { background: var(--surface-2); }
.stepn b { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.stepn { min-width: 0; }
.stepn:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.stepn button:focus-visible { outline: none; background: var(--surface-2); }
.stepn .stepv { width: 3ch; min-width: 36px; max-width: 9ch; height: 42px; border: 0; background: none; padding: 0; margin: 0; text-align: center; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; color: inherit; outline: none; border-radius: 8px; }
.stepn .stepv:focus-visible { outline: none; }
.stepn .stepu { font-weight: 600; color: var(--ink-3); min-width: 0; margin: 0 6px 0 -4px; }
.stepn .stepu:empty { margin: 0; }
.stepn .stepv + .stepu:empty { display: none; }
.numrow { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 52px; flex-wrap: wrap; }
.numrow .tl { display: grid; min-width: 0; }
.numrow .tl small { color: var(--ink-3); font-size: 12px; }
.fold { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; cursor: pointer; border-radius: 12px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--surface-2); }
.fold .f-t { font-weight: 600; }
.fold .f-s { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fold .f-chev { color: var(--ink-3); transition: transform .15s; }
.fold[open] .f-chev { transform: rotate(180deg); }
.fold-b { display: grid; gap: 12px; padding: 4px 14px 14px; }
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.chk { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px; border-radius: 8px; border: 0; background: none; text-align: left; color: var(--ink); width: 100%; }
.chk:hover { background: var(--surface-2); }
.chk .box { margin-top: 0; }
.chk .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk .cnt { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.posgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.posgrid button { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.posgrid button.a { background: var(--pc); color: var(--on-pc); border-color: var(--primary); }
.posgrid button.b { background: var(--warn-c); color: var(--warn); border-color: var(--warn); }
.finish-card { display: grid; gap: 16px; justify-items: start; }
.nextrow { display: flex; gap: 8px; flex-wrap: wrap; }

/* Compact icon rail for the app and competition sidebars (desktop and tablet): icons only, labels read by screen readers, tooltips from title. */
@media (min-width: 1024px) {
  .app:has(#dx-side) .menu-btn { display: inline-grid; }
  html[data-rail="1"] .frame:has(> #dx-side) { grid-template-columns: 72px minmax(0, 1fr); }
  html[data-rail="1"] #dx-side { padding-inline: 8px; align-items: center; overflow-x: hidden; }
  html[data-rail="1"] #dx-side .ctx { width: 56px; min-height: 56px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  html[data-rail="1"] #dx-side .ctx > svg, html[data-rail="1"] #dx-side .ctx > i { display: none; }
  html[data-rail="1"] #dx-side .create { width: 56px; padding: 0; justify-content: center; align-self: center; }
  html[data-rail="1"] #dx-side .nav-i { width: 56px; padding: 0; justify-content: center; position: relative; }
  html[data-rail="1"] #dx-side .nav-g { height: 1px; min-height: 0; padding: 0; margin: 8px 12px; background: var(--line); font-size: 0; align-self: stretch; width: auto; pointer-events: none; }
  html[data-rail="1"] #dx-side .nav-g > svg, html[data-rail="1"] #dx-side .nav-g > i { display: none; }
  html[data-rail="1"] #dx-side .nav-grp, html[data-rail="1"] #dx-side .nav-grp.closed { display: grid !important; justify-items: center; width: 100%; }
  html[data-rail="1"] #dx-side .dx-console { align-items: center; }
  html[data-rail="1"] #dx-side .livecode { display: none; }
  html[data-rail="1"] #dx-side .side-bottom { width: 100%; justify-items: center; }
  html[data-rail="1"] #dx-side :is(.lbl, .ctx-txt) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; flex: none; }
  html[data-rail="1"] #dx-side :is(.badge, .nav-chip, .nav-ext) { display: none; }
}
/* drawers, sheets, dialogs, toast */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 80; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--surface); z-index: 81; display: flex; flex-direction: column; box-shadow: var(--shadow-3); }
.drawer.wide { width: min(760px, 100%); }
.d-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); min-height: 64px; }
.d-h h2 { flex: 1; font: 500 18px/24px var(--font); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-h .dsub { font-size: 12px; color: var(--ink-3); }
.d-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.d-tabs button { border: 0; background: none; height: 48px; min-width: 48px; padding: 0 12px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.d-tabs button[aria-pressed="true"] { color: var(--primary-ink); border-bottom-color: var(--primary); }
.d-b { flex: 1; overflow-y: auto; padding: 18px 20px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.d-f { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); flex-wrap: wrap; }
.d-f .grow { margin-right: auto; font-size: 12px; color: var(--ink-3); }
/* Two pane filter drawer: titles left, picks right; phones keep both panes side by side. */
.drawer.fd { width: min(600px, 100%); }
.fd-b { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.fd-nav { overflow-y: auto; background: var(--surface-2); border-right: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; }
.fd-nav button { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 12px 10px 18px; border: 0; background: none; text-align: left; color: var(--ink-2); font: 500 14px/20px var(--font); }
.fd-nav button:hover { color: var(--ink); }
.fd-nav button[aria-selected="true"] { background: var(--surface); color: var(--primary); }
.fd-nav button[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.fd-nav button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.fd-tl { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fd-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-size: 12px; line-height: 20px; text-align: center; flex: none; }
.fd-panes { overflow-y: auto; min-width: 0; }
.fd-pane { padding: 12px 16px 16px; display: grid; gap: 8px; align-content: start; }
.fd-pane[hidden] { display: none; }
.fd-opts { border: 0; margin: 0; padding: 0; display: grid; min-width: 0; }
.fd-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 8px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.fd-opt[hidden] { display: none; }
.fd-opt:hover { background: var(--surface-2); }
.fd-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fd-opt .box { margin-top: 0; }
.fd-opt .box svg { opacity: 0; }
.fd-opt input:checked + .box { background: var(--primary); border-color: var(--primary); }
.fd-opt input:checked + .box svg { opacity: 1; }
.fd-opt input:focus-visible + .box { outline: 2px solid var(--primary); outline-offset: 2px; }
.fd-opt .box.rad { border-radius: 50%; }
.fd-opt .box.rad svg { display: none; }
.fd-opt input:checked + .box.rad { box-shadow: inset 0 0 0 3px var(--surface); }
.fd-l { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fd-opt .ms { color: var(--ink-3); font-size: 12px; flex: none; }
.fd-opt.dim .fd-l { color: var(--ink-3); }
.fd-e { padding: 8px; font-size: 13px; }
.fd-chips { margin-top: -4px; }
.fd-open .fd-n { margin-left: 2px; }
@media (max-width: 640px) { .fd-open { min-height: 44px; } }
.fd-chips .fchip svg.lucide { width: 14px; height: 14px; }
@media (max-width: 767px) {
  .fd-b { grid-template-columns: 38% minmax(0, 1fr); }
  .fd-nav button { padding-left: 14px; }
  .fd-pane { padding: 8px 8px 12px; }
  .fd-opt { gap: 10px; padding: 4px 6px; }
}
.dsec { display: grid; gap: 12px; }
.dsec > h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.bsheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 81; max-height: 85%; overflow-y: auto; background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-3); padding: 8px 20px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; }
.bsheet-grab { justify-self: center; width: 32px; height: 4px; border-radius: 2px; background: var(--outline); margin-top: 4px; }
.bsheet-h { display: flex; align-items: center; gap: 8px; }
.bsheet-h h2 { flex: 1; font: 500 18px/24px var(--font); }
.dlg { position: absolute; z-index: 82; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-3); padding: 24px; display: grid; gap: 16px; outline: none; }
.dlg:focus, .dlg:focus-visible { outline: none; }
.dlg-h { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.dlg-t { display: grid; gap: 6px; min-width: 0; flex: 1; }
.dlg h2 { font-size: 20px; line-height: 28px; font-weight: 500; }
.dlg-t h2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.dlg p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.dlg .dic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: var(--on-pc); }
.dlg.tone-trash .dic, .dlg.tone-warn .dic { background: var(--warn-c); color: var(--warn); }
.dlg.tone-danger .dic { background: var(--danger-c); color: var(--danger); }
.dlg .dlg-nm { font-weight: 600; overflow-wrap: anywhere; }
.dlg .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.dlg .acts .btn { min-width: 96px; }
.btn.wn { background: var(--warn); color: var(--surface); border-color: var(--warn); }
.btn.wn:hover { box-shadow: var(--shadow-1); background: var(--warn); }
@media (max-width: 599px) {
  .dlg.cf { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; max-height: 90%; border-radius: 16px 16px 0 0; padding: 20px 20px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .dlg.cf .acts { display: grid; grid-template-columns: 1fr 1fr; }
  .dlg.cf .acts .btn { height: 44px; min-width: 0; }
  .dlg.cf .acts .btn:only-child { grid-column: 1 / -1; }
}
.scrim.over { z-index: 88; }
.drawer.over, .bsheet.over { z-index: 89; }
.dlg.over { z-index: 90; }
.toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--toast); color: var(--on-toast); padding: 6px 8px 6px 16px; border-radius: 8px; z-index: 95; box-shadow: var(--shadow-3); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 12px; min-height: 48px; }
.toast .btn { color: var(--toast-action); border-color: transparent; }
.fab { position: absolute; right: 16px; bottom: 16px; z-index: 40; height: 56px; padding: 0 20px 0 16px; border-radius: 16px; border: 0; background: var(--pc); color: var(--on-pc); font-weight: 600; box-shadow: var(--shadow-3); display: none; align-items: center; gap: 10px; }
.fab.live { background: var(--primary); color: var(--on-primary); }
.qr { width: 120px; height: 120px; background: var(--paper); padding: 8px; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.prz { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 96px 44px; gap: 8px; align-items: center; }
.prz.h { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.drag { color: var(--ink-3); cursor: grab; }
.answers-q { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.answers-q .aq-h { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface-2); }
.answers-q .aq-h .n { background: var(--primary); color: var(--on-primary); border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 12px; flex: none; }
.ar { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; min-height: 56px; }
.ar .tn { flex: 1 1 180px; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.ar .resp { color: var(--ink-2); flex: 1 1 120px; min-width: 0; }
.vseg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.vseg button { border: 0; background: var(--surface); height: 40px; min-width: 44px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.vseg button + button { border-left: 1px solid var(--line); }
.vseg button.on.c { background: var(--ok-c); color: var(--ok); } .vseg button.on.w { background: var(--danger-c); color: var(--danger); }
.vseg button.on.p { background: var(--warn-c); color: var(--warn); } .vseg button.on.n { background: var(--surface-3); color: var(--ink); }
.vseg button svg.lucide { width: 16px; height: 16px; }
.mini-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.mini-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }


/* show flow: stacked on phones and tablets, left to right on wide screens */
.flow { display: grid; gap: 0; align-items: stretch; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.fcol { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pair { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.flow .conn { height: 56px; }
.conn .ah { display: none; } .conn .av { display: block; }
.conn .arrow { color: var(--ink-3); display: flex; justify-items: center; gap: 8px; text-align: center; align-items: center; }
.vconn { display: grid; place-items: center; height: 44px; color: var(--ink-3); }
.rcard .rtx b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 18px; }
@media (min-width: 600px) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1300px) {
  .flow { grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr) 52px minmax(0, 1fr); align-items: start; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .flow .conn { height: auto; align-self: stretch; padding-top: 72px; place-items: start center; }
  .conn .ah { display: block; } .conn .av { display: none; }
  .conn .arrow { flex-direction: column; gap: 4px; }
}
@media (min-width: 1100px) { .hide-wide-cq { display: none; } }
/* Under 1100 the side panel folds into a toolbar button and filter rows into one Filter button, so the list keeps its width. */
@media (max-width: 1099px) {
  .cq { grid-template-columns: minmax(0, 1fr); }
  .cq .tree { display: none; }
  .toolbar:has(> .filters-btn) > .filters { display: none; }
  .toolbar:has(> .filters) > .filters-btn { display: inline-flex; }
}
.ic-sm svg.lucide, svg.lucide.ic-sm { width: 16px; height: 16px; }
.ic-lg svg.lucide, svg.lucide.ic-lg { width: 28px; height: 28px; }
.kic svg.lucide { width: 18px; height: 18px; }


/* rounds list (today's structure) */
.enter { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); margin: 0; }
.rlist2, .rg-rounds, .rr-items { list-style: none; margin: 0; padding: 0; }
.rlist2 { display: grid; gap: 0; }
.rail { display: flex; justify-content: center; min-height: 20px; align-items: center; }
.rail-btns { display: inline-flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.rail:hover .rail-btns, .rr-flow:hover .rail-btns, .rail-btns:focus-within { opacity: 1; }
@media (pointer: coarse) { .rail-btns { opacity: 1; } }
.pill-ins { height: 32px; border-radius: 999px; border: 1px dashed var(--outline); background: var(--surface); color: var(--ink-2); padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; position: relative; }
.pill-ins::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.pill-ins svg.lucide { width: 14px; height: 14px; }
.pill-ins:hover { background: var(--pc); color: var(--on-pc); border-color: var(--primary); }
.rg { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); background: color-mix(in srgb, var(--gc) 6%, var(--bg)); padding: 6px 8px 8px; box-shadow: inset 4px 0 0 var(--gc); }
.rg-head { display: flex; align-items: center; gap: 8px; padding: 6px 4px 8px 6px; min-height: 52px; }
.rg-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); background: color-mix(in srgb, var(--gc) 18%, var(--surface)); color: var(--gc); flex: none; }
.rg-ic svg.lucide { width: 18px; height: 18px; }
.rg-tx { flex: 1; min-width: 0; display: grid; }
.rg-tx b { font-weight: 600; font-size: 15px; } .rg-tx small { color: var(--ink-3); font-size: 12px; }
.grip { color: var(--ink-3); cursor: grab; display: inline-grid; place-items: center; width: 20px; flex: none; }
.grip svg.lucide { width: 16px; height: 16px; }
.rrow { display: grid; }
.rr-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.rr-card.open { box-shadow: var(--shadow-1); }
.rr-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 8px; min-height: 64px; }
.rr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 4px; border-radius: 8px; color: var(--ink); min-height: 48px; }
.rr-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--pc); color: var(--on-pc); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.rr-badge.tb { background: var(--warn-c); color: var(--warn); }
.rr-badge svg.lucide { width: 16px; height: 16px; }
.rr-tx { min-width: 0; display: grid; gap: 2px; }
.rr-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rr-name b { font-weight: 600; }
.rr-tx small { color: var(--ink-3); font-size: 12px; line-height: 16px; }
.rr-tx .rr-pts { color: var(--primary-ink); font-weight: 500; }
.rr-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.rr-body { border-top: 1px solid var(--line); }
.rr-items li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); min-height: 52px; }
.rr-items li:first-child { border-top: 0; }
.rr-items .n { width: 20px; color: var(--ink-3); font-size: 12px; flex: none; }
.rr-items .q { flex: 1; min-width: 0; font-size: 13px; line-height: 19px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rr-items .m { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.rr-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 12px 12px; }
.rr-rules { margin-left: auto; color: var(--ink-3); font-size: 12px; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-flow { display: flex; align-items: center; gap: 8px; padding: 6px 0 6px 22px; color: var(--ink-3); font-size: 12px; min-height: 40px; flex-wrap: wrap; }
.rr-flow .line { width: 2px; height: 24px; background: var(--line); border-radius: 1px; }
.rr-flow b { color: var(--ink-2); font-weight: 600; }
.podium-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); flex-wrap: wrap; }
.podium-card .pc-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); background: color-mix(in srgb, var(--gold) 20%, var(--surface)); color: var(--gold); flex: none; }
.show-ph { display: none; }
@media (max-width: 599px) { .show-ph { display: inline-flex; } .rr-head { flex-wrap: wrap; } .rr-main { flex: 1 1 100%; } .rr-acts { margin-left: auto; } .rg-head { flex-wrap: wrap; } }
.ibtn .dotc { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--danger); color: var(--surface); font-size: 11px; line-height: 16px; font-weight: 700; padding: 0 4px; }
.wiz.panel { left: auto; width: min(980px, 100%); box-shadow: var(--shadow-3); }
.wiz.panel .wiz-in { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }

/* auth */
.auth { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; align-content: center; gap: 16px; padding: 32px 16px; background: radial-gradient(120% 80% at 50% 0%, var(--pc) 0%, var(--bg) 55%); }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px 28px; display: grid; gap: 18px; box-shadow: var(--shadow-1); }
.auth-card .brand { justify-self: center; }
.auth-card h1 { text-align: center; font-size: 24px; }
.auth-card .sub { text-align: center; }
.auth-foot { margin: 0; color: var(--ink-3); font-size: 13px; text-align: center; }
.auth-foot a, .linkish { color: var(--primary-ink); text-decoration: none; font-weight: 500; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.btn.wide { width: 100%; height: 48px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 999px; border: 1px solid var(--outline); background: var(--surface); font-weight: 500; width: 100%; color: var(--ink); }
.pw { position: relative; } .pw .ibtn { position: absolute; right: 0; top: 0; }
.strength { display: flex; gap: 4px; } .strength i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); } .strength i.on { background: var(--ok); }

/* full screen runtime pages */
.full { position: absolute; inset: 0; overflow: auto; background: var(--bg); }
.full.dark, .stage-pg { background: var(--stage); color: var(--stage-ink); }
.phone-col { width: min(480px, 100%); margin-inline: auto; padding: 16px; display: grid; gap: 16px; align-content: start; min-height: 100%; }
.topbar { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.topbar .tt { flex: 1; min-width: 0; display: grid; }
.topbar .tt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .tt small { color: var(--ink-3); font-size: 12px; }
.codein { display: flex; gap: 8px; justify-content: center; }
.codein span { width: 48px; height: 60px; border-radius: 12px; border: 1px solid var(--outline); display: grid; place-items: center; font: 700 26px/1 var(--mono); background: var(--surface); }
.codein span.f { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.bigopt { min-height: 64px; border-radius: 16px; border: 0; color: var(--live-ink); font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; width: 100%; }
.bigopt.a0 { background: var(--live-a); } .bigopt.a1 { background: var(--live-b); } .bigopt.a2 { background: var(--live-c); } .bigopt.a3 { background: var(--live-d); }
.bigopt .L { width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / .22); display: grid; place-items: center; font-weight: 700; flex: none; }
.timebar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; } .timebar i { display: block; height: 100%; background: var(--primary); }
.stagewrap { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(120% 90% at 50% 0%, var(--stage-2), var(--stage)); color: var(--stage-ink); }
.stagewrap > * { min-width: 0; }
.stagewrap .sw-h { display: flex; align-items: center; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.stagewrap .sw-b { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px; text-align: center; gap: 20px; align-content: center; }
.stagewrap .sw-f { display: flex; gap: 8px; justify-content: center; padding: 16px; flex-wrap: wrap; background: rgb(0 0 0 / .2); }
.stagewrap .btn { color: var(--stage-ink); border-color: var(--stage-soft); }
.stagewrap .btn.p { background: var(--stage-ink); color: var(--stage); border-color: var(--stage-ink); }
.stagewrap .code { color: var(--stage-ink); }
.bigcode { font: 800 clamp(40px, 9vw, 88px)/1 var(--font); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.joined { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.joined span { background: var(--stage-2); padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: 13px; }
.buzzbtn { width: min(240px, 70vw); aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--danger); color: var(--live-ink); font: 800 34px/1 var(--font); letter-spacing: .06em; box-shadow: 0 10px 0 var(--danger), var(--shadow-3); box-shadow: 0 10px 0 color-mix(in srgb, var(--danger) 55%, black), var(--shadow-3); justify-self: center; }

/* learner and paper previews */
.flash { border-radius: 20px; border: 1px solid var(--line); background: var(--surface); padding: 24px; display: grid; gap: 16px; min-height: 280px; align-content: start; box-shadow: var(--shadow-1); }
.rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rate button { min-height: 56px; border-radius: 12px; border: 1px solid var(--outline); background: var(--surface); font-weight: 600; display: grid; gap: 2px; place-items: center; color: var(--ink); }
.rate button small { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.paperwrap { background: var(--surface-2); border-radius: 12px; padding: 16px; overflow-x: auto; }
.paper { background: var(--paper); color: var(--paper-ink); max-width: 760px; min-width: 300px; margin-inline: auto; padding: 32px 36px; box-shadow: var(--shadow-1); font-size: 13px; line-height: 1.55; }
.paper h3 { color: var(--paper-ink); } .paper .muted { color: var(--paper-soft); }
.bub { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.4px solid var(--paper-ink); border-radius: 50%; font-size: 10px; font-weight: 700; margin-right: 4px; color: var(--paper-ink); background: var(--paper); }
.bub.fill { background: var(--paper-ink); color: var(--paper); }
.gradegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gcell { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-height: 52px; text-align: left; color: var(--ink); }
.gcell .qn { width: 26px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gcell .ga { flex: 1; font-weight: 600; }
.gcell.ok { border-color: var(--ok); background: var(--ok-c); background: color-mix(in srgb, var(--ok-c) 50%, var(--surface)); }
.gcell.bad { border-color: var(--danger); background: var(--danger-c); background: color-mix(in srgb, var(--danger-c) 50%, var(--surface)); }
.gcell.flag { border-color: var(--warn); background: var(--warn-c); background: color-mix(in srgb, var(--warn-c) 60%, var(--surface)); }
.cutrow td { border-bottom: 2px dashed var(--danger) !important; }
.cam-view { aspect-ratio: 3 / 4; max-height: 60vh; width: 100%; border-radius: 16px; background: var(--cam-bg); position: relative; display: grid; place-items: center; overflow: hidden; }
.cam-view .frame-g { position: absolute; inset: 10% 12%; border: 3px solid var(--cam-guide); border-radius: 12px; }
.cam-view .sheet { width: 62%; aspect-ratio: .72; background: var(--cam-sheet); border-radius: 4px; transform: rotate(-3deg); }

/* question bank */
.typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.typegrid button { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-align: left; font-weight: 500; font-size: 13px; min-height: 48px; }
.typegrid button[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--pc); color: var(--on-pc); }
.typegrid button svg.lucide { width: 18px; height: 18px; }
.bankcard { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; color: var(--ink); min-height: 168px; align-content: start; }
.bankcard:hover { border-color: var(--outline); background: var(--surface-2); }
.bankcard .bh { display: flex; gap: 12px; align-items: flex-start; }
.bankcard .bm { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--quiz-c); color: var(--on-quiz-c); flex: none; }
.avstack { display: flex; } .avstack .pav { width: 28px; height: 28px; font-size: 11px; border: 2px solid var(--surface); } .avstack .pav + .pav { margin-left: -8px; }
.stat-line { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-3); font-size: 12px; }
.stat-line span { display: inline-flex; align-items: center; gap: 4px; }
.stat-line svg.lucide { width: 14px; height: 14px; }
.t-row.l2 { padding-left: 28px; } .t-row.l3 { padding-left: 46px; font-size: 13px; }
.conf { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.conf.hi { background: var(--ok-c); color: var(--ok); } .conf.mid { background: var(--warn-c); color: var(--warn); } .conf.lo { background: var(--danger-c); color: var(--danger); }
.xcard { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px; display: grid; gap: 10px; }
.xcard.mid { border-color: var(--warn); } .xcard.lo { border-color: var(--danger); }
.flagline { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--warn); }
.pdfpage { background: var(--paper); border-radius: 8px; box-shadow: var(--shadow-1); aspect-ratio: .72; padding: 18px; display: grid; gap: 10px; align-content: start; position: relative; }
.pdfpage i.ln { display: block; height: 7px; border-radius: 3px; background: var(--paper-line); }
.pdfpage .hl { border: 2px solid var(--primary); border-radius: 6px; padding: 6px; display: grid; gap: 6px; background: rgb(26 115 232 / .06); }
.pdfpage .hl.w { border-color: var(--warn); background: rgb(138 83 0 / .06); }
.pdfpage .fig { height: 60px; border: 1.5px dashed var(--paper-rule); border-radius: 4px; }
.chat { display: grid; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 20px; }
.msg.me { justify-self: end; background: var(--pc); color: var(--on-pc); border-bottom-right-radius: 4px; }
.msg.ai { justify-self: start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.composer { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--outline); border-radius: 20px; padding: 6px 6px 6px 14px; background: var(--surface); }
.composer textarea { flex: 1; border: 0; background: none; resize: none; min-height: 40px; padding: 10px 0; outline: none; color: var(--ink); }
.pairs { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.timeline li:first-child { border-top: 0; }
.stars { color: var(--gold); display: inline-flex; gap: 1px; } .stars svg.lucide { width: 14px; height: 14px; fill: currentColor; }
.price { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); align-content: start; }
.price.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.price b.amt { font-size: 32px; line-height: 40px; font-weight: 700; }
.price ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; }
.rt-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sticky-note { background: var(--surface); background: color-mix(in srgb, var(--gold) 18%, var(--surface)); border-radius: 12px; padding: 14px; min-height: 96px; font-size: 14px; display: grid; gap: 8px; align-content: space-between; }

/* ---------- breakpoints on the app container (the device frame) ---------- */
@media (min-width: 600px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols.main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
@media (min-width: 1360px) { .cols.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-grid; }
  .side { position: absolute; z-index: 70; top: 0; left: 0; bottom: 0; width: min(300px, 86%); background: var(--surface); box-shadow: var(--shadow-3); transform: translateX(-105%); visibility: hidden; transition: transform .2s cubic-bezier(.2,0,0,1), visibility 0s .2s; }
  .side.open { transform: none; visibility: visible; transition: transform .2s cubic-bezier(.2,0,0,1); }
  .side-scrim.open { display: block; position: absolute; inset: 0; background: var(--scrim); z-index: 69; }
  .wrap { width: 100%; }
  .fab { display: inline-flex; }
  .wiz-in { grid-template-columns: minmax(0, 1fr); }
  .vstep { position: static; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .vstep button { flex-direction: column; gap: 4px; padding: 8px 2px; font-size: 11px; text-align: center; line-height: 14px; }
  .vstep small { display: none; }
}
@media (max-width: 719px) { .search { display: none; } .search-ic { display: inline-grid; } }
@media (max-width: 599px) {
  .filters { display: none; } .filters-btn { display: inline-flex; }
  .toolbar .srch { flex: 1 1 100%; max-width: none; order: -1; }
  .li { flex-wrap: wrap; }
  .page-h .row-actions.hide-ph { display: none; }
  .hide-ph { display: none !important; }
  .vstep { display: none; }
  .wiz-ph { display: grid; gap: 6px; }
  .wcard { padding: 16px; }
  .sum-grid { grid-template-columns: minmax(0, 1fr); gap: 2px; } .sum-grid dd { margin-bottom: 8px; }
  .drawer, .drawer.wide { width: 100%; }
  .prz { grid-template-columns: minmax(0, 1fr) 80px 44px; } .prz .pzn { grid-column: 1 / -1; }
  .posgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brand .crop { width: 32px; }
  .tgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 600px) { .hide-wide { display: none !important; } }
/* maths palette */
.mpal { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 10px; padding: 10px; }
.mpal .mtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mpal .mtabs button { border: 0; background: none; height: 40px; padding: 0 10px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.mpal .mtabs button[aria-pressed="true"] { background: var(--pc); color: var(--on-pc); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.mgrid button { min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 15px; color: var(--ink); padding: 4px; }
.mgrid button:hover { background: var(--pc); border-color: var(--primary); }
.mprev { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 16px; line-height: 26px; overflow-wrap: anywhere; }
[lang="hi"], [lang="bn"], [lang="ta"] { line-height: 1.7; }
/* 44 px hit areas for small drawn controls */
.fsel.chipish, .crumb button, .linkish, .auth-foot a, .ibtn.sm, .tl-hit { position: relative; }
.fsel.chipish::after, .crumb button::after, .linkish::after, .auth-foot a::after, .ibtn.sm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.ibtn.sm::after { left: 50%; width: 44px; transform: translate(-50%, -50%); }
.ans2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(900px, 100%); }
@media (max-width: 599px) { .ans2 { grid-template-columns: minmax(0, 1fr); } }
/* paper previews fit small phones */
@media (max-width: 599px) { .paper { min-width: 0; padding: 18px 14px; } .paperwrap { padding: 8px; } }
/* answers rows */
.an-row { flex-wrap: wrap; }
.an-row .an-ans { flex: 0 1 180px; }
.an-pts { display: grid; justify-items: end; min-width: 64px; } .an-pts small { font-size: 11px; color: var(--warn); }
@media (min-width: 600px) { .seg .ph-only { display: none; } }
@media (max-width: 599px) { .an-row .an-ans { flex: 1 1 100%; padding-left: 38px; } .toolbar > .filters { display: none; } }
/* phones: tables become cards */
@media (max-width: 599px) {
  table.tb thead { display: none; }
  table.tb, table.tb tbody, table.tb tr, table.tb td { display: block; width: 100%; }
  table.tb tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.tb td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; border: 0; white-space: normal; text-align: right; min-height: 28px; }
  table.tb td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; text-align: left; }
  table.tb td.tm, table.tb td.l:first-child { position: static; max-width: none; font-weight: 600; }
  table.tb td.tm::before, table.tb td.rk::before { content: none; }
  table.tb td.rk { width: auto; justify-content: flex-start; }
  table.tb tr.cutrow td { border-bottom: 0 !important; } table.tb tr.cutrow { border-bottom: 2px dashed var(--danger); }
  table.tb tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 10px; }
  table.tb td { flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; gap: 0; }
  table.tb td.rk { grid-column: span 1; flex-direction: row; } table.tb td.tm { grid-column: span 3; flex-direction: row; } table.tb td.l:first-child { grid-column: 1 / -1; }
}
/* Column fit (dx.js cfFit): rounds that do not fit hide, a chooser picks which, a row opens its full breakdown. */
.cf-h { display: none !important; }
[data-dx-colfit] > table.tb th, [data-dx-colfit] > table.tb td { padding-left: 8px; padding-right: 8px; }
[data-dx-colfit] > table.tb .tm { min-width: 160px; }
[data-dx-colfit] > table.tb .tm > div { max-width: 240px; }
.cf-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cf-ctl .fsel-w[hidden] { display: none; }
.cf-n { font-size: 12px; }
table.tb .cf-x { width: 44px; padding: 0 0 0 4px; text-align: center; }
[data-cf-row] svg.lucide { transition: transform .15s; }
[data-cf-row][aria-expanded="true"] svg.lucide { transform: rotate(90deg); }
table.tb tr.cf-gr th { padding: 0 6px; height: 36px; border-bottom: 1px solid var(--line); text-align: left; }
table.tb tr.cf-gr th.cf-gh { border-left: 1px solid var(--line); }
.cf-gw { width: 0; min-width: 100%; }
.cf-gb { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 36px; border: 0; background: none; padding: 0 4px; color: var(--ink-2); font: 500 12px/16px var(--font); border-radius: 6px; cursor: pointer; position: relative; }
.cf-gb::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.cf-gb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cf-gb svg.lucide { width: 14px; height: 14px; flex: none; }
.cf-gb:hover { color: var(--ink); background: var(--surface-2); }
.cf-gb:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
table.tb .cf-sum { font-weight: 600; }
table.tb tr.cf-d > td { padding: 4px 16px 14px 52px; background: var(--surface-2); text-align: left; white-space: normal; }
.cf-grid { display: grid; gap: 4px; padding-top: 4px; }
.cf-st { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0 16px; align-items: start; }
.cf-its { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 16px; }
.cf-gt { font: 600 12px/16px var(--font); color: var(--ink-2); padding: 8px 0 4px; overflow-wrap: anywhere; }
.cf-gi { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; padding: 4px 0; border-bottom: 1px solid var(--line); }
.cf-gi span { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cf-gi b { font-weight: 600; color: var(--ink); }
.cf-gi.e b { color: var(--ink-3); font-weight: 400; }
@media (max-width: 599px) { table.tb .cf-x, table.tb tr.cf-d, .cf-n { display: none; } }
.tb-stack > table.tb .cf-x, .tb-stack > table.tb tr.cf-d { display: none; }
/* Wider screens: a table too wide for its card gets the same cards (dx.js sets .tb-stack), never a sideways scroll. */
.tbl-w.tb-stack { overflow-x: visible; }
.tb-stack > table.tb > thead { display: none; }
.tb-stack > table.tb, .tb-stack > table.tb > tbody { display: block; width: 100%; }
.tb-stack > table.tb tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 2px 10px; width: 100%; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tb-stack > table.tb tr:last-child { border-bottom: 0; }
.tb-stack > table.tb td { display: flex; flex-direction: column; align-items: flex-start; padding: 3px 0; border: 0; white-space: normal; text-align: left; min-height: 28px; min-width: 0; }
.tb-stack > table.tb td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; }
.tb-stack > table.tb :is(td.tm, td.rk)::before { content: none; }
.tb-stack > table.tb td.rk { width: auto; flex-direction: row; align-items: center; }
.tb-stack > table.tb td.tm { grid-column: 2 / -1; flex-direction: row; align-items: center; position: static; max-width: none; font-weight: 600; }
.tb-stack > table.tb td.l:first-child { grid-column: 1 / -1; font-weight: 600; }
.tb-stack > table.tb tr.cutrow { border-bottom: 2px dashed var(--danger); }
.tb-stack > table.tb td:last-child:not([data-label]) { grid-column: span 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
/* wide screens: keep sections side by side, never stretched thin */
@media (min-width: 1800px) { .cols.c3, .cols.main-side.c3w { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tgrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
@media (min-width: 2400px) { .wrap { width: 86%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.dx-light, .dx-dark { color: var(--ink); background: var(--bg); }
.dx-light { color-scheme: light; }

/* ---------- production (spec 01 8.2 step 5) ---------- */
[hidden] { display: none !important; }
body { background: var(--bg); }
.app { position: fixed; inset: 0; height: 100vh; height: 100dvh; }
a { color: var(--primary-ink); }
a.btn, a.nav-i, a.li, a.fchip, a.ctx, a.create, a.fab, a.kpi, a.tile, a.way, a.qline, a.rcard, a.tcard, a.bankcard,
a.ibtn, a.brand, a.t-row, a.chk, a.gbtn, a.copyb, a.pill-ins, a.linkish, .crumb a { text-decoration: none; }
a.ctx, a.li, a.kpi, a.tile, a.way, a.qline, a.rcard, a.tcard, a.bankcard, a.chk, a.gbtn { color: var(--ink); }
a.btn, a.create, a.fab, a.nav-i, a.fchip, a.ibtn { cursor: pointer; }
.crumb a { color: var(--primary-ink); font-weight: 500; min-height: 24px; display: inline-flex; align-items: center; position: relative; }
.crumb a::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
/* Trail ends in the current page: parents link, the last crumb is muted text; long trails ellipsise instead of scrolling. */
.page-h > div:first-child { min-width: 0; }
.crumb { min-width: 0; max-width: 100%; }
.crumb > svg { flex: none; }
.crumb a, .crumb > span { display: block; line-height: 24px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb a { flex: 0 1 auto; }
.crumb .cur { flex: 1 1 0; color: var(--ink-3); font-weight: 400; }
@media (max-width: 599px) { .crumb a { max-width: 30%; } }
.hdr { padding-top: env(safe-area-inset-top, 0px); height: calc(64px + env(safe-area-inset-top, 0px)); }
.d-h { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.fab { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
.toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.main:focus { outline: none; }
/* The page column never grows past the screen; a wide child (a seg with counts) scrolls inside itself. */
.wrap { grid-template-columns: minmax(0, 1fr); }
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; background: var(--surface); color: var(--primary-ink); padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-2); font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
.banner.danger { background: var(--danger-c); color: var(--danger); }
.banner .btn { border-color: currentColor; color: inherit; }
.skel { display: block; border-radius: 8px; background: var(--surface-3); min-height: 14px; animation: dx-skel 1.2s ease-in-out infinite; }
.skel-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-top: 1px solid var(--line); }
.skel-row:first-child { border-top: 0; }
.skel-row .skel.c { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.skel-row .skel-b { flex: 1; display: grid; gap: 8px; }
@keyframes dx-skel { 50% { opacity: .45; } }
svg.lucide.spin, .spin svg.lucide { animation: dx-spin 1s linear infinite; }
@keyframes dx-spin { to { transform: rotate(360deg); } }
.btn[aria-busy="true"] { cursor: progress; }
.fld-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fld .chip.danger { justify-self: start; white-space: normal; height: auto; min-height: 24px; padding: 4px 10px; }
.fld.err .in, .fld.err .fsel { border-color: var(--danger); }
.dx-inline { display: contents; }
.side form, .row-actions form, .pop form, .d-f form, .acts form { display: contents; }
.pop a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 16px; min-height: 44px; color: var(--ink); text-decoration: none; }
.pop a:hover { background: var(--surface-3); }
.pop a.dz { color: var(--danger); }
.toast .grow { flex: 1; min-width: 0; }
.qr svg { color: var(--paper-ink); }
.page-h .chips { margin-top: 6px; }
.codein { max-width: 100%; }
.codein span { width: auto; flex: 0 1 48px; min-width: 0; }
.toast { width: max-content; }
@media (max-width: 1023px) {
  .wiz.panel .wiz-in { grid-template-columns: minmax(0, 1fr); }
  .app:not(.dx-wiz-open):has(.fab) .toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
.qr svg path, .qr svg rect { fill: currentColor; }
.gallery-sec { display: grid; gap: 12px; }
.dx-loading .main { opacity: .45; pointer-events: none; }
.dx-preview-shell { min-height: 100%; }
/* kit pieces the prototype draws inline (spec 01 8.4) */
main.app-page.main.dx-main:not(#dx-none) { width: auto !important; max-width: none !important; margin: 0 !important; padding: 24px var(--gutter) 112px !important; }
main.app-page.auth-card:not(#dx-none) { width: min(440px, 100%) !important; max-width: none !important; margin: 0 !important; padding: 32px 28px !important; }
.dx-auth-in { display: contents; }
.auth { align-content: safe center; }
button.linkish { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.nav-chip.danger { background: var(--danger-c); color: var(--danger); }
/* New tab mark: {% dx_ext %} in markup; dx.js adds it to any other target=_blank link. */
a[target="_blank"] svg.lucide.ext { width: 14px; height: 14px; flex: none; vertical-align: -2px; color: var(--ink-3); }
:is(.btn.p, .create, .fab)[target="_blank"] svg.lucide.ext { color: inherit; }
.nav-back { margin-bottom: 6px; }
.side .dx-console { display: flex; flex-direction: column; align-items: flex-start; }
.create[disabled], .fab[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.sheet-acts { justify-content: flex-end; }
.empty-acts { justify-content: center; margin-top: 8px; }
.empty.done .scene { background: var(--ok-c); color: var(--ok); }
.drawer > form, .dlg > form, .bsheet > form, .wiz > form { display: contents; }
.wiz-col { display: grid; gap: 12px; min-width: 0; }
.wiz-ph-t { font-size: 12px; }
.dx-wiz-open .fab { display: none !important; }
img.avatar, img.ctx-mark, img.pav { object-fit: cover; padding: 0; }
.ibtn.acct { width: 44px; height: 44px; }
.hdr .search-back { display: none; }
.hdr.searching .search { display: flex; position: absolute; left: 8px; right: 8px; top: calc(9px + env(safe-area-inset-top, 0px)); margin: 0; max-width: none; z-index: 2; padding-left: 4px; }
.hdr.searching .search-back { display: inline-grid; }
.hdr.searching > :not(.search) { visibility: hidden; }
.pop .tgl-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 16px; min-height: 44px; border: 0; background: none; color: var(--ink); text-align: left; }
.pop .tgl-row:hover { background: var(--surface-3); }
.pop .tgl-row i.sw { width: 36px; height: 20px; border-radius: 10px; background: var(--surface-3); border: 2px solid var(--outline); position: relative; flex: none; }
.pop .tgl-row i.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--outline); transition: transform .15s; }
.pop .tgl-row[aria-checked="true"] i.sw { background: var(--primary); border-color: var(--primary); }
.pop .tgl-row[aria-checked="true"] i.sw::after { transform: translateX(16px); background: var(--on-primary); }
.pop [role="menuitemradio"][aria-checked="true"] { background: var(--pc); color: var(--on-pc); }
/* Account menu: header card, rows, one theme segment, sign out; a bottom sheet on phones. */
.pop.acct-m { width: 300px; max-width: calc(100vw - 16px); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); padding: 8px 0; border-radius: 16px; }
.acct-m > .bsheet-grab { display: none; }
.acct-card { display: flex; align-items: center; gap: 12px; margin: 0 8px 6px; padding: 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.acct-card .avatar { width: 40px; height: 40px; font-size: 16px; flex: none; }
.acct-id { display: grid; min-width: 0; }
.acct-id b { font: 500 15px/20px var(--font); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-id span { font-size: 12px; line-height: 16px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-m > a, .acct-m > form > button { outline-offset: -2px; }
.acct-theme { padding: 0 12px 4px; }
.acct-theme .pop-h { display: block; padding: 4px 4px 6px; }
.acct-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-2); }
.pop .acct-seg button { min-height: 44px; padding: 0 6px; gap: 6px; justify-content: center; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.pop .acct-seg button:hover { background: var(--surface-3); }
.pop .acct-seg button[aria-checked="true"] { background: var(--pc); color: var(--on-pc); }
.acct-seg button svg.lucide { width: 16px; height: 16px; }
@media (max-width: 599px) {
  .pop.acct-m { position: fixed; z-index: 81; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; width: auto; max-width: none; max-height: 85vh; max-height: 85dvh; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-3); padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px)); }
  .acct-m > .bsheet-grab { display: block; margin: 8px auto 12px; }
  .hdr:has(.acct-m:not([hidden])) { z-index: 82; }
  .hdr:has(.acct-m:not([hidden]))::after { content: ""; position: fixed; inset: 0; z-index: 80; background: var(--scrim); }
}
/* Header inbox: newest waiting items, View all to the Invites page; a bottom sheet on phones. */
.pop.inbox-m { width: 360px; max-width: calc(100vw - 16px); max-height: min(560px, calc(100vh - 80px)); max-height: min(560px, calc(100dvh - 80px)); padding: 0; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.pop.inbox-m[hidden] { display: none; }
.inbox-m > .bsheet-grab { display: none; }
.ibx-h { display: flex; align-items: center; padding: 14px 16px 8px; }
.ibx-h h2 { margin: 0; font: 500 16px/24px var(--font); color: var(--ink); }
.ibx-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ibx-foot { display: flex; align-items: center; justify-content: center; min-height: 48px; border-top: 1px solid var(--line); color: var(--primary); font-weight: 500; text-decoration: none; flex: none; }
.ibx-foot:hover { background: var(--surface-2); }
.ibx-foot:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 0 0 16px 16px; }
.ibx-list { list-style: none; margin: 0; padding: 0; }
.ibx-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); min-width: 0; }
.ibx-list > .ibx-row:first-child { border-top: 0; }
.ibx-av { width: 36px; height: 36px; font-size: 13px; flex: none; }
.ibx-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.ibx-line { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.ibx-line b { color: var(--ink); font-weight: 500; }
.ibx-q { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ibx-t { font-size: 12px; color: var(--ink-3); }
.ibx-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ibx-acts .btn { min-height: 44px; height: auto; }
.pop .ibx-acts .btn { width: auto; flex: none; justify-content: center; padding: 0 16px; }
.ibx-page { display: grid; gap: 12px; min-width: 0; }
.ibx-page > .toolbar { margin: 0; }
.pop .ibx-acts .btn.p { background: var(--primary); color: var(--on-primary); }
.pop .ibx-acts .btn.p:hover { background: var(--primary); filter: brightness(1.08); }
.ibx-empty { display: grid; justify-items: center; gap: 8px; padding: 32px 16px; margin: 0; color: var(--ink-3); text-align: center; }
.ibx-empty b { color: var(--ink); font-weight: 500; }
.ibx-empty svg.lucide { width: 32px; height: 32px; color: var(--primary); }
.ibx-skel { display: grid; gap: 12px; padding: 12px 16px; }
.ibx-skel span { height: 56px; border-radius: 12px; background: var(--surface-2); }
@media (max-width: 599px) {
  .pop.inbox-m { position: fixed; z-index: 81; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; width: auto; max-width: none; max-height: 85vh; max-height: 85dvh; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-3); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .inbox-m > .bsheet-grab { display: block; margin: 8px auto 0; flex: none; }
  .hdr:has(.inbox-m:not([hidden])) { z-index: 82; }
  .hdr:has(.inbox-m:not([hidden]))::after { content: ""; position: fixed; inset: 0; z-index: 80; background: var(--scrim); }
}
/* Create menu: one anchored menu like Drive's New, a bottom sheet list on phones. */
.cmenu { position: fixed; z-index: 85; inset: auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; color: var(--ink); }
.cm-p { width: 300px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-3); animation: cm-in .12s ease-out; }
.cm-h { display: none; }
.cm-p .cm-i { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 48px; padding: 0 16px 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 14px/20px var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.cm-p .cm-i svg.lucide { width: 20px; height: 20px; flex: none; color: var(--ink-2); }
.cm-p .cm-i:hover { background: var(--surface-3); }
.cm-p .cm-i:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cm-p hr { border: 0; border-top: 1px solid var(--line); margin: 8px -8px; }
@keyframes cm-in { from { opacity: 0; } }
@keyframes cm-up { from { transform: translateY(100%); } }
@media (max-width: 767px) {
  .cmenu { inset: 0 !important; width: auto; height: auto; max-width: none; max-height: none; display: flex; flex-direction: column; justify-content: flex-end; background: var(--scrim); animation: cm-in .2s ease-out; }
  .cm-p { width: auto; max-width: none; max-height: 85vh; max-height: 85dvh; padding: 0 0 calc(8px + env(safe-area-inset-bottom, 0px)); border-radius: 28px 28px 0 0; transition: transform .2s cubic-bezier(.2, 0, 0, 1); animation: cm-up .22s cubic-bezier(.2, 0, 0, 1); }
  .cm-h { display: grid; gap: 4px; padding: 0 24px 4px; touch-action: none; cursor: grab; }
  .cm-h .bsheet-grab { margin: 12px auto 8px; }
  .cm-h b { font: 500 16px/24px var(--font); color: var(--ink); }
  .cm-p .cm-i { min-height: 56px; gap: 20px; padding: 0 24px; border-radius: 0; font: 400 16px/24px var(--font); }
  .cm-p .cm-i svg.lucide { width: 24px; height: 24px; }
  .cm-p hr { margin: 8px 0; }
}
.pub-links { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.dx-qtext .fld-row label { cursor: default; }
.mpal-search { border-radius: 10px; padding: 2px 2px 2px 12px; align-items: center; }
.mpal-search .in { border: 0; }
.mprev-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.mprev-h .muted { display: block; }
/* Maths field face (dx.math.face): the typeset value stands in for the field until it is edited */
.dx-mface { height: auto; min-height: 44px; min-width: 0; padding: 10px 12px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.dx-mface.ta { min-height: 88px; }
.dx-mface[hidden] { display: none; }
.dx-mface .dx-mf-eq { display: inline-block; max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: middle; cursor: pointer; border-radius: 4px; }
.dx-mface .dx-mf-eq:hover { background: var(--pc); }
.in.dx-mf-off { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; resize: none; }
.dx-mrow { display: flex; gap: 8px; align-items: flex-start; }
/* The question with its figure; the area takes a dropped image (dx figdrop) */
.dx-qzone { display: grid; gap: 12px; min-width: 0; }
/* A question area that takes a dropped figure (dx figdrop) */
[data-dx-figdrop].drop-on { outline: 2px dashed var(--primary); outline-offset: 4px; border-radius: 12px; }
.dx-mrow > .in { flex: 1 1 auto; min-width: 0; }
.dx-opt-list { display: grid; gap: 12px; }
.dx-opt { display: grid; gap: 6px; }
.dx-opt-row { display: flex; gap: 8px; align-items: center; }
.dx-opt-row .ibtn.on { background: var(--ok-c); color: var(--ok); }
.dx-opt-why, .dx-opt-thumb { margin-left: 52px; width: calc(100% - 52px); }
.dx-opt-thumb { width: auto; max-width: calc(100% - 52px); max-height: 96px; justify-self: start; border-radius: 8px; border: 1px solid var(--line); background: var(--fig); }
.dx-up { display: grid; gap: 10px; }
.dx-up .imguploader-drop { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 72px; border: 1.5px dashed var(--outline); border-radius: 12px; background: var(--surface-2); cursor: pointer; color: var(--ink); }
.dx-up .imguploader-drop[data-dragging="1"] { border-color: var(--primary); background: var(--pc); }
.dx-up .t-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--quiz-c); color: var(--on-quiz-c); display: grid; place-items: center; flex: none; }
.dx-up .imguploader-preview { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dx-up .imguploader-current img { max-height: 120px; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: var(--fig); }
.dx-up .imguploader-status { font-size: 12px; color: var(--ok); }
.dxf { display: grid; gap: 8px; }
.dxf-tile { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; border: 1.5px dashed var(--outline); border-radius: 12px; background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.dxf > [data-dxf-input] { font-size: 0; user-select: none; pointer-events: none; }
.dxf-tile[hidden] { display: none; }
.dxf-tile:hover, .dxf[data-dragging="1"] .dxf-tile { border-color: var(--primary); background: var(--pc); }
.dxf-tile .t-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--quiz-c); color: var(--on-quiz-c); display: grid; place-items: center; flex: none; }
.dxf-tile .li-main { display: grid; min-width: 0; }
.dxf-tile .li-main span { font-size: 12px; color: var(--ink-3); }
.dxf-got { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dxf-got[hidden] { display: none; }
.dxf-doc { width: 44px; height: 44px; border-radius: 10px; background: var(--quiz-c); color: var(--on-quiz-c); display: grid; place-items: center; flex: none; }
.dxf-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--fig); flex: none; }
.dxf-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink); }
.dxf-got .btn { height: 44px; padding: 0 14px; flex: none; }
@media (max-width: 480px) { .dxf-got { flex-wrap: wrap; } .dxf-nm { flex-basis: calc(100% - 56px); } }
.dx-zoom { position: fixed; inset: 0; z-index: 99; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.dx-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: var(--fig); }
.dx-zoom .ibtn { position: absolute; top: 12px; right: 12px; background: var(--surface); }
.dx-flash, .dx-count { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; text-align: center; pointer-events: none; color: var(--live-ink); }
.dx-flash[data-kind="correct"] { background: var(--live-d); }
.dx-flash[data-kind="wrong"] { background: var(--live-a); }
.dx-flash .dx-flash-i svg.lucide { width: min(40vw, 220px); height: min(40vw, 220px); stroke-width: 3; }
.dx-flash .dx-flash-t { font: 800 clamp(32px, 6vw, 56px)/1.1 var(--font); margin: 8px 0 0; }
.dx-flash .dx-flash-s { font: 600 clamp(13px, 1.6vw, 17px)/1.4 var(--font); letter-spacing: .18em; text-transform: uppercase; margin: 12px 0 0; opacity: .85; }
.dx-count { background: var(--stage); }
.dx-count .dx-count-h { font: 600 14px/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--stage-soft); margin: 0 0 16px; }
.dx-count .dx-count-n { display: block; font: 800 clamp(128px, 28vw, 288px)/1 var(--font); font-variant-numeric: tabular-nums; }
.dx-count .dx-count-n.go { color: var(--ok-c); }
.dx-count .dx-count-n.pop { animation: dx-pop .7s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes dx-pop { 0% { transform: scale(.55); opacity: 0; } 18% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); opacity: .95; } }
.show-ph-row { display: none !important; }
@media (max-width: 599px) {
  .ibtn.show-ph { display: inline-grid; }
  .pop .show-ph-row { display: flex !important; }
  .pop hr.show-ph-row { display: block !important; }
}
@media (max-width: 1023px) { .side:not(.open) { visibility: hidden; } }
/* Thin scrollbars on every scroller. Firefox reads the standard pair; Chrome and Safari draw the webkit parts,
   which the standard pair would switch off there. */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
}
@supports selector(::-webkit-scrollbar) {
  .side, .main, .bk-tree-b, .mh-strip { scrollbar-width: auto; }
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 6px; border: 1px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); }
@media print {
  body { overflow: visible; background: #FFFFFF; }
  .app { position: static; height: auto; overflow: visible; display: block; }
  .frame { display: block; }
  .hdr, .side, .side-scrim, .fab, .toolbar, .filters-btn, .selbar, .page-h .row-actions, #dx-layers, .toast, .skip, .print-topbar { display: none !important; }
  .main { overflow: visible; padding: 0; }
  .wrap { width: 100%; }
}
/* Question natures: chip checkboxes in editors and sheets */
.nat-lbl { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 500 12px/16px var(--font); color: var(--ink-2); }
.nat-lbl .linkish { font-size: 12px; }
.nat-c { cursor: pointer; user-select: none; }
.nat-c:has(input:checked) { background: var(--pc); color: var(--on-pc); border-color: var(--pc); }
.nat-c:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.nat-c:has(input:disabled) { opacity: .6; cursor: default; }
@media (pointer: coarse) { .nat-c { height: 44px; } }
.nat-pick { display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; flex: none; }
.nat-pick .box svg.lucide { width: 14px; height: 14px; opacity: 0; }
.nat-pick:has(input:checked) .box { background: var(--primary); border-color: var(--primary); }
.nat-pick:has(input:checked) .box svg.lucide { opacity: 1; }
.nat-pick:has(input:focus-visible) .box { outline: 2px solid var(--primary); outline-offset: 2px; }
.nat-row { display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(150px, 220px) auto auto; gap: 8px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--line); }
.nat-row:first-child { border-top: 0; }
.nat-row .num { min-width: 48px; text-align: right; }
.nat-moves { display: flex; gap: 2px; }
@media (max-width: 599px) { .nat-row { grid-template-columns: auto minmax(0, 1fr) auto; } .nat-row .fsel-w { grid-column: 2 / -1; } .nat-row .num { display: none; } }
.fields > .nat-f { grid-column: 1 / -1; }
/* Word editor (bank and pool drawers): the word large, its details in a two column grid. */
.wd-ed { gap: 12px; }
.wd-word.in { font-size: 20px; font-weight: 600; letter-spacing: .02em; min-height: 52px; }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 14px; align-items: start; }
.wd-f { display: grid; gap: 6px; min-width: 0; }
.wd-f.wd-wide, .wd-grid > .wd-wide { grid-column: 1 / -1; }
.wd-f.wd-ai > .fld > .in, .wd-f.wd-ai .fsel { border-color: var(--warn); }
.wd-f .tgl small { color: var(--warn); }
@media (max-width: 599px) { .wd-grid { grid-template-columns: minmax(0, 1fr); } }
.wd-audio { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.wd-ak { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.wd-ak svg { width: 16px; height: 16px; }
.wd-arow { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-arow .btn { min-height: 44px; }
.wd-arow [data-wd-rec][aria-pressed="true"] { border-color: var(--danger); color: var(--danger); }
.wd-audio .help { margin: 0; }
html:not(.wd-voice-ok) [data-wd-voice] { display: none; }

/* Item type colours: data-kind on a tile gives it its tint, on a nav or menu row only the icon. */
[data-kind="quiz"] { --k-bg: var(--k-quiz-bg); --k-fg: var(--k-quiz-fg); }
[data-kind="competition"] { --k-bg: var(--k-competition-bg); --k-fg: var(--k-competition-fg); }
[data-kind="bee"] { --k-bg: var(--k-bee-bg); --k-fg: var(--k-bee-fg); }
[data-kind="practice"] { --k-bg: var(--k-practice-bg); --k-fg: var(--k-practice-fg); }
[data-kind="bank"] { --k-bg: var(--k-bank-bg); --k-fg: var(--k-bank-fg); }
[data-kind="buzzer"] { --k-bg: var(--k-buzzer-bg); --k-fg: var(--k-buzzer-fg); }
[data-kind="timer"] { --k-bg: var(--k-timer-bg); --k-fg: var(--k-timer-fg); }
[data-kind="routine"] { --k-bg: var(--k-routine-bg); --k-fg: var(--k-routine-fg); }
[data-kind="cert"] { --k-bg: var(--k-cert-bg); --k-fg: var(--k-cert-fg); }
[data-kind="presentation"] { --k-bg: var(--k-presentation-bg); --k-fg: var(--k-presentation-fg); }
:is(.cmark, .t-ic, .bm, .bh-mark, .ctx-mark, .scene)[data-kind] { background: var(--k-bg); color: var(--k-fg); }
.nav-i[data-kind] svg.lucide, .cm-i[data-kind] svg.lucide { color: var(--k-fg); }
.cm-p .cm-i[data-kind] svg.lucide { box-sizing: content-box; padding: 6px; border-radius: 10px; background: var(--k-bg); }
@media (max-width: 767px) { .cm-p .cm-i[data-kind] svg.lucide { padding: 8px; border-radius: 12px; } }
.cmark.live { position: relative; }
.cmark.live .ldot { position: absolute; top: -2px; right: -2px; box-shadow: 0 0 0 2px var(--surface); }

[data-dx-if][hidden] { display: none !important; }
/* Link tabs in a .seg strip (Rounds: List, Stages, Outline). */
.seg a { border: 0; background: none; height: 44px; padding: 0 16px; color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.seg a + a { border-left: 1px solid var(--outline); }
.seg a[aria-current="page"] { background: var(--pc); color: var(--on-pc); }
.seg a svg.lucide { width: 16px; height: 16px; }
