/* Milliy sertifikat · Mock test — Mini App design system */
:root {
  --navy-900: #0a3a33; --navy-800: #0e4a41; --navy-700: #135d53; --navy-600: #17776a; --navy-500: #1f8a7b;
  --gold-500: #d4a62a; --gold-400: #e6bd4f; --gold-300: #f2d688; --gold-100: #fbf1d4;
  --ok: #15a35a; --ok-bg: #e5f6ec; --bad: #e0453a; --bad-bg: #fde9e7; --warn: #c27a06; --warn-bg: #fff4dc;

  --bg: #f8f8fa; --bg-2: #eef0f1; --card: #ffffff; --line: #ebedee; --line-2: #d6dadb;
  --ink: #252a2a; --ink-2: #555c5c; --ink-3: #868d8d;
  --accent: var(--navy-600); --accent-ink: #fff; --accent-soft: #e8f3f1;
  --bubble: #ffffff; --bubble-line: #cdd3d3;
  --shadow-1: 0 1px 2px rgba(20, 40, 38, .04);
  --shadow-2: 0 2px 4px rgba(20, 40, 38, .04), 0 10px 28px rgba(20, 40, 38, .07);
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --safe-t: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1110; --bg-2: #131c1b; --card: #141d1c; --line: #212d2b; --line-2: #2f3e3c;
  --ink: #eef3f2; --ink-2: #aab7b5; --ink-3: #74817f;
  --accent: #3bb39f; --accent-ink: #04201b; --accent-soft: #153330;
  --bubble: #101817; --bubble-line: #34443f;
  --ok-bg: #0e2a1d; --bad-bg: #321513; --warn-bg: #2e2208; --gold-100: #2c2410;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 500 15px/1.45 'Onest', -apple-system, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.02em; font-weight: 800; }
.num, .tab { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; }
.screen { padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 100px); animation: in .38s var(--ease) both; }
.screen.no-tab { padding-bottom: calc(var(--safe-b) + 110px); }
@keyframes in { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.seal { width: 40px; height: 40px; flex: none; }
.brand b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--navy-500), var(--navy-800)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-1); flex: none; transition: transform .15s; }
.iconbtn:active { transform: scale(.94); }
.topbar .ttl { flex: 1; min-width: 0; }
.topbar .ttl b { display: block; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .ttl small { display: block; font-size: 12.5px; color: var(--ink-3); }

.greet { margin: 4px 2px 16px; }
.greet h1 { font-size: 26px; font-weight: 800; }
.greet p { color: var(--ink-2); margin-top: 4px; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.card + .card, .card + .sec, .sec + .card, .hero + .card, .card + .list, .stack > * + * { margin-top: 12px; }
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 4px 10px; }
.sec h2 { font-size: 18px; font-weight: 700; }
.sec span { font-size: 13px; color: var(--ink-3); }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 22px; color: #fff; isolation: isolate;
  background: radial-gradient(120% 90% at 100% 0%, #2a52a8 0%, transparent 60%), linear-gradient(160deg, var(--navy-700), var(--navy-900)); box-shadow: 0 18px 40px -16px rgba(7, 22, 52, .6); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 16px 16px; mask-image: linear-gradient(200deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(200deg, #000, transparent 70%); }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; bottom: -90px; z-index: -1; border-radius: 50%; border: 28px solid rgba(230, 189, 79, .1); }
.hero .label { color: rgba(255,255,255,.62); }
.hero .big { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 10px 0 6px; }
.hero .sub { color: rgba(255,255,255,.72); font-size: 14px; }
.hero .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero .link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; font-size: 14px; color: var(--gold-300); }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.hero-stats div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 10px 12px; }
.hero-stats b { display: block; font-size: 18px; font-weight: 700; }
.hero-stats small { font-size: 11.5px; color: rgba(255,255,255,.6); }

/* level medal */
.medal { --sz: 74px; width: var(--sz); height: var(--sz); border-radius: 50%; display: grid; place-items: center; flex: none; position: relative;
  background: conic-gradient(from 210deg, #f7e2a2, #c9971c, #f2d688, #b98712, #f7e2a2); box-shadow: 0 8px 22px -6px rgba(212,166,42,.6), inset 0 0 0 1px rgba(255,255,255,.4); }
.medal::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: linear-gradient(160deg, #10285e, #071634); box-shadow: inset 0 0 0 1.5px rgba(242,214,136,.55); }
.medal span { position: relative; font-weight: 800; font-size: calc(var(--sz) * .34); color: var(--gold-300); letter-spacing: -.03em; }
.medal.none { background: conic-gradient(from 210deg, #c7cfdd, #7c879c, #c7cfdd); box-shadow: none; }
.medal.none span { font-size: calc(var(--sz) * .14); color: #c7cfdd; text-align: center; line-height: 1.1; }

/* ---------- inputs & buttons ---------- */
.codebox { display: flex; gap: 10px; margin-top: 12px; }
.codebox input { flex: 1; min-width: 0; height: 54px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--bg); padding: 0 16px;
  font-size: 22px; font-weight: 700; letter-spacing: .18em; font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s; }
.codebox input::placeholder { color: var(--ink-3); font-weight: 500; letter-spacing: .04em; font-size: 16px; }
.codebox input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--card); }
.codebox.err input { border-color: var(--bad); animation: shake .35s; }
.field-err { color: var(--bad); font-size: 13px; margin-top: 8px; min-height: 0; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: 15px; font-weight: 700; font-size: 15.5px;
  background: var(--navy-700); color: #fff; transition: transform .15s var(--ease), opacity .2s, background .2s; white-space: nowrap; }
[data-theme="dark"] .btn { background: var(--accent); color: var(--accent-ink); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); color: #2a1d00; box-shadow: 0 8px 20px -8px rgba(212,166,42,.8); }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.sm { height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(var(--safe-b) + 12px);
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.cta-bar .in { max-width: 528px; margin: 0 auto; display: flex; gap: 10px; }
.cta-bar .btn { flex: 1; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.chip.gold { background: var(--gold-100); color: #8a6508; }
[data-theme="dark"] .chip.gold { color: var(--gold-300); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.navy { background: var(--accent-soft); color: var(--accent); }
.chip svg { width: 13px; height: 13px; }

/* ---------- list rows ---------- */
.list { background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; }
.row-i { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: left; transition: background .15s; }
.row-i + .row-i { border-top: 1px solid var(--line); }
.row-i:active { background: var(--bg); }
.row-i .main { flex: 1; min-width: 0; }
.row-i .main small .chip { vertical-align: 1px; }
.row-i .main b { display: block; font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-i .main small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.row-i .chev { color: var(--ink-3); flex: none; }
.tile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.tile.gold { background: var(--gold-100); color: var(--gold-500); }
.lvl-pill { min-width: 38px; height: 26px; padding: 0 8px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--navy-800); color: var(--gold-300); }
.lvl-pill.none { background: var(--bg-2); color: var(--ink-3); font-weight: 600; font-size: 11px; }
.score-col { text-align: right; flex: none; }
.score-col b { display: block; font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.score-col small { color: var(--ink-3); font-size: 12px; }
.score-col .lvl-pill { margin-top: 4px; height: 22px; min-width: 34px; font-size: 12px; border-radius: 7px; }
.keygrid { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 18px; }
@media (min-width: 520px) { .keygrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ropen .o { align-items: center; padding: 10px 12px; }
.ropen .o .st { flex: none; }
.ropen .o.ok .st { color: var(--ok); } .ropen .o.bad .st { color: var(--bad); }

/* test card */
.tcard { display: block; width: 100%; text-align: left; padding: 16px; transition: transform .15s var(--ease); }
.tcard:active { transform: scale(.985); }
.tcard .top { display: flex; gap: 14px; align-items: flex-start; }
.tcard h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.tcard .by { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.tcard .chips { margin-top: 12px; }
.tcard .best { margin-left: auto; text-align: right; flex: none; }

/* continue card */
.cont { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--gold-100); border: 1px solid rgba(212,166,42,.35); }
.ring { --p: 0; width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--gold-500) calc(var(--p) * 1%), rgba(212,166,42,.18) 0); }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* info steps */
.steps { display: grid; gap: 14px; margin-top: 14px; }
.step { display: flex; gap: 12px; }
.step i { width: 28px; height: 28px; border-radius: 9px; flex: none; display: grid; place-items: center; font-style: normal; font-weight: 750; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.step b { display: block; font-size: 14.5px; font-weight: 650; }
.step p { font-size: 13.5px; color: var(--ink-2); margin-top: 1px; }
details.card summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary .chev { margin-left: auto; transition: transform .25s var(--ease); color: var(--ink-3); }
details.card[open] summary .chev { transform: rotate(90deg); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 12px); z-index: 30; display: flex; gap: 4px; padding: 6px;
  border-radius: 22px; background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.tabbar button { display: flex; align-items: center; gap: 7px; height: 46px; padding: 0 16px; border-radius: 16px; font-weight: 650; font-size: 14px; color: var(--ink-3); transition: background .25s var(--ease), color .25s; }
.tabbar button.on { background: var(--navy-800); color: #fff; }
[data-theme="dark"] .tabbar button.on { background: var(--accent); color: var(--accent-ink); }
.tabbar button span { display: none; }
.tabbar button.on span { display: inline; }

/* ---------- test detail ---------- */
.cover .subj { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--gold-300); background: rgba(230,189,79,.12); padding: 5px 10px; border-radius: 99px; }
.cover h1 { font-size: 23px; font-weight: 800; margin-top: 14px; line-height: 1.2; }
.cover .by { color: rgba(255,255,255,.7); margin-top: 6px; font-size: 14px; }
.cover .codechip { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.stat3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat3 > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 12px; box-shadow: var(--shadow-1); }
.stat3 b { display: block; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat3 small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.25; }
.struct { display: grid; gap: 2px; margin-top: 10px; }
.struct .s { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.struct .s + .s { border-top: 1px dashed var(--line); }
.struct .rng { width: 64px; flex: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.struct .s div { flex: 1; }
.struct .s div b { font-weight: 650; font-size: 14.5px; display: block; }
.struct .s div small { color: var(--ink-3); font-size: 12.5px; }
.struct .cnt { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* level scale */
.scale { margin-top: 16px; }
.scale .bar { position: relative; display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; }
.scale .bar i { flex: 1; }
.scale .ticks { position: relative; height: 34px; margin-top: 6px; }
.scale .ticks span { position: absolute; transform: translateX(-50%); text-align: center; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1.2; }
.scale .ticks span b { display: block; font-size: 12px; color: var(--ink); font-weight: 750; }
.scale .marker { position: absolute; top: -8px; width: 4px; height: 28px; border-radius: 3px; background: var(--ink); transform: translateX(-50%); box-shadow: 0 0 0 3px var(--card); transition: left 1.2s var(--ease); }
.scale .marker::after { content: attr(data-v); position: absolute; top: -26px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--card); font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scale.has-marker { padding-top: 26px; }

/* ---------- exam ---------- */
.exam-head { position: sticky; top: 0; z-index: 25; margin: calc(-1 * (var(--safe-t) + 14px)) -16px 0; padding: calc(var(--safe-t) + 10px) 16px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.exam-head .topbar { margin-bottom: 10px; }
.save-st { display: inline-flex; align-items: center; gap: 5px; }
.save-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.save-st.busy i { background: var(--gold-500); animation: pulse 1s infinite; }
.save-st.err i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.prog { height: 4px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--navy-500), var(--gold-500)); transition: width .4s var(--ease); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: 12px 0; border-radius: 14px; background: var(--bg-2); position: relative; }
.seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 11px; background: var(--card); box-shadow: var(--shadow-1); transition: transform .3s var(--ease); }
.seg[data-on="1"]::before { transform: translateX(100%); }
.seg button { position: relative; height: 38px; font-weight: 650; font-size: 14px; color: var(--ink-3); display: flex; align-items: center; justify-content: center; gap: 6px; transition: color .2s; }
.seg button.on { color: var(--ink); }
.seg button em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.pages { display: grid; gap: 12px; }
.page { position: relative; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-1); border: 1px solid var(--line); aspect-ratio: 595 / 842; }
.page img { width: 100%; height: 100%; display: block; object-fit: contain; opacity: 0; transition: opacity .3s; }
.page img.ld { opacity: 1; }
.page .pn { position: absolute; top: 8px; right: 8px; background: rgba(7,22,52,.75); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .page img { filter: brightness(.92); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 24; padding: 0 12px calc(var(--safe-b) + 10px); pointer-events: none; }
.dock .in { max-width: 536px; margin: 0 auto; pointer-events: auto; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 12px; box-shadow: 0 -4px 30px rgba(7,22,52,.14); }
.dock .nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dock .nav .iconbtn { width: 38px; height: 38px; box-shadow: none; background: var(--bg-2); }
.dock .qnum { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.dock .qnum b { font-size: 16px; font-weight: 750; }
.dock .qnum small { font-size: 12px; color: var(--ink-3); }
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choices.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.choice { height: 50px; border-radius: 14px; font-weight: 750; font-size: 18px; background: var(--bg); border: 1.5px solid var(--line-2); transition: transform .12s, background .15s, border-color .15s, color .15s; }
.choice:active { transform: scale(.93); }
.choice.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; animation: pop .28s var(--spring); }
[data-theme="dark"] .choice.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@keyframes pop { 40% { transform: scale(1.08); } }
.openin { display: flex; gap: 8px; }
.openin input { flex: 1; min-width: 0; height: 50px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--bg); padding: 0 14px; font-size: 16px; }
.openin input:focus { outline: none; border-color: var(--accent); background: var(--card); }

/* OMR answer sheet */
.omr-sec { margin: 18px 4px 8px; display: flex; align-items: baseline; gap: 8px; }
.omr-sec:first-child { margin-top: 4px; }
.omr-sec b { font-size: 15px; font-weight: 700; }
.omr-sec span { font-size: 12.5px; color: var(--ink-3); }
.omr-sec em { margin-left: auto; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.omr { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.orow { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; transition: background .2s; scroll-margin: 180px; }
.orow + .orow { border-top: 1px solid var(--line); }
.orow:nth-child(5n) { border-bottom: 1px solid var(--line-2); }
.orow.cur { background: var(--accent-soft); }
.orow .n { width: 36px; flex: none; text-align: right; font-weight: 700; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.orow.has .n { color: var(--ink); }
.bubbles { display: flex; gap: 8px; flex: 1; }
.bub { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--bubble-line); background: var(--bubble); font-size: 13.5px; font-weight: 700; color: var(--ink-3); display: grid; place-items: center; transition: transform .12s, background .15s, color .15s, border-color .15s; flex: none; }
.bubbles.six { gap: 5px; }
.bubbles.six .bub { width: 34px; height: 34px; font-size: 12.5px; }
.bub:active { transform: scale(.88); }
.bub.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; animation: pop .28s var(--spring); }
[data-theme="dark"] .bub.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.orow input { flex: 1; min-width: 0; height: 42px; border-radius: 11px; border: 1.5px solid var(--line-2); background: var(--bg); padding: 0 12px; font-size: 15.5px; }
.orow input:focus { outline: none; border-color: var(--accent); background: var(--card); }
.orow .tick { width: 18px; color: var(--ok); flex: none; opacity: 0; transition: opacity .2s; }
.orow.has .tick { opacity: 1; }

/* bottom sheet */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4, 10, 24, .5); animation: fade .25s both; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 560px; margin: 0 auto; max-height: 86vh; overflow: auto; background: var(--card);
  border-radius: 26px 26px 0 0; padding: 10px 20px calc(var(--safe-b) + 20px); animation: up .38s var(--ease) both; }
.sheet.out { animation: down .25s ease-in both; } .scrim.out { animation: fade .25s reverse both; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 0 auto 16px; }
.sheet h3 { font-size: 21px; font-weight: 800; }
.sheet p.d { color: var(--ink-2); margin-top: 6px; }
.sheet .acts { display: grid; gap: 10px; margin-top: 20px; }
.sumrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sumrow div { border-radius: 16px; padding: 14px; background: var(--bg); }
.sumrow b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sumrow small { color: var(--ink-3); font-size: 13px; }
.sumrow .ok b { color: var(--ok); } .sumrow .warn b { color: var(--warn); }
.miss { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.miss button { height: 32px; min-width: 40px; padding: 0 9px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }

/* calculating overlay */
.calc { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy-700), var(--navy-900)); color: #fff; animation: fade .3s both; text-align: center; }
.calc .orb { width: 120px; height: 120px; margin: 0 auto 26px; position: relative; }
.calc .orb i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--gold-400); animation: rot 1.1s linear infinite; }
.calc .orb i:nth-child(2) { inset: 14px; border-top-color: #7fa2ee; animation-duration: 1.6s; animation-direction: reverse; }
.calc .orb i:nth-child(3) { inset: 28px; border-top-color: rgba(255,255,255,.6); animation-duration: .9s; }
.calc b { font-size: 19px; font-weight: 700; display: block; }
.calc small { color: rgba(255,255,255,.65); display: block; margin-top: 6px; min-height: 20px; }

/* ---------- result ---------- */
.res-hero { text-align: center; padding: 26px 20px 22px; }
.res-hero .medal { --sz: 96px; margin: 0 auto; }
.res-hero .big { font-size: 64px; margin: 18px 0 2px; }
.res-hero .chips { justify-content: center; margin-top: 14px; }
.res-hero .chip { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.res-hero .chip.gold { background: rgba(230,189,79,.16); color: var(--gold-300); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--warn-bg); color: var(--warn); font-size: 13.5px; line-height: 1.4; margin-top: 12px; }
.banner svg { flex: none; margin-top: 1px; }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.bars { display: grid; gap: 14px; margin-top: 14px; }
.bars .b .t { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.bars .b .t b { font-weight: 650; }
.bars .b .t span { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.track { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 1s var(--ease); }
.filters { display: flex; gap: 6px; margin: 14px 0 12px; overflow-x: auto; scrollbar-width: none; }
.filters button { height: 34px; padding: 0 14px; border-radius: 99px; background: var(--bg-2); font-weight: 650; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s; }
.filters button.on { background: var(--navy-800); color: #fff; }
[data-theme="dark"] .filters button.on { background: var(--accent); color: var(--accent-ink); }
.rgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rcell { border-radius: 12px; padding: 7px 4px 6px; text-align: center; border: 1.5px solid transparent; }
.rcell.ok { background: var(--ok-bg); } .rcell.bad { background: var(--bad-bg); }
.rcell .q { font-size: 11.5px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rcell .a { font-size: 17px; font-weight: 800; line-height: 1.2; }
.rcell.ok .a { color: var(--ok); } .rcell.bad .a { color: var(--bad); }
.rcell .k { font-size: 11px; font-weight: 700; color: var(--ok); min-height: 14px; }
.ropen { display: grid; gap: 6px; margin-top: 8px; }
.ropen .o { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; }
.ropen .o.ok { background: var(--ok-bg); } .ropen .o.bad { background: var(--bad-bg); }
.ropen .o .q { font-weight: 750; font-variant-numeric: tabular-nums; width: 34px; flex: none; }
.ropen .o div { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.ropen .o div small { display: block; color: var(--ink-3); font-size: 12px; }
.ropen .o.bad .y { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ropen .o .kk { color: var(--ok); font-weight: 650; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- rating ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin-top: 8px; }
.pod { text-align: center; }
.pod .av { width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; position: relative;
  background: linear-gradient(135deg, var(--navy-500), var(--navy-800)); box-shadow: 0 0 0 3px var(--c), 0 8px 18px -6px rgba(7,22,52,.4); }
.pod.p1 .av { width: 72px; height: 72px; font-size: 24px; }
.pod .av em { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; background: var(--c); color: #1d1500; box-shadow: 0 0 0 2px var(--card); }
.pod b { display: block; margin-top: 14px; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .stand { margin-top: 8px; border-radius: 14px 14px 6px 6px; padding: 10px 4px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.pod .stand strong { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pod .stand small { font-size: 11.5px; color: var(--ink-3); }
.pod.p1 .stand { padding: 18px 4px; background: linear-gradient(180deg, var(--gold-100), var(--card)); }
.pod.p1 { --c: var(--gold-400); } .pod.p2 { --c: #c9d1de; } .pod.p3 { --c: #d99a62; }
.rk { width: 28px; flex: none; text-align: center; font-weight: 750; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row-i.me { background: var(--accent-soft); }
.row-i .av-s { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; font-size: 14px; color: #fff; background: linear-gradient(135deg, #3f63b8, #142d68); }
.mebar { position: fixed; left: 0; right: 0; bottom: calc(var(--safe-b) + 12px); z-index: 20; padding: 0 16px; }
.mebar .in { max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: var(--navy-800); color: #fff; box-shadow: var(--shadow-2); }
.mebar .in .rk { color: var(--gold-300); }
.mebar .in b { flex: 1; }

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-1); }
.kpi small { display: block; color: var(--ink-3); font-size: 12.5px; }
.kpi b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.calib { position: relative; height: 10px; border-radius: 99px; background: var(--bg-2); margin: 30px 0 26px; }
.calib i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, var(--navy-500), var(--gold-500)); transition: width 1s var(--ease); }
.calib span { position: absolute; top: 18px; transform: translateX(-50%); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.calib span::before { content: ""; position: absolute; left: 50%; top: -22px; width: 2px; height: 14px; background: var(--line-2); }
.calib span.reached { color: var(--ink); font-weight: 700; }
.dist { display: flex; align-items: flex-end; gap: 8px; height: 130px; margin-top: 16px; }
.dist .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.dist .c i { width: 100%; border-radius: 8px 8px 4px 4px; background: var(--navy-600); min-height: 3px; transition: height .8s var(--ease); }
[data-theme="dark"] .dist .c i { background: var(--accent); }
.dist .c.top i { background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); }
.dist .c em { font-style: normal; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dist .c small { font-size: 11.5px; color: var(--ink-3); font-weight: 650; }
.itbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.itbl th { text-align: left; font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 8px 6px; }
.itbl td { padding: 8px 6px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.itbl td:first-child { font-weight: 700; width: 44px; }
.itbl .pbar { display: flex; align-items: center; gap: 8px; }
.itbl .pbar .track { flex: 1; height: 6px; }
.itbl .pbar span { width: 36px; text-align: right; font-weight: 650; }
.diff { display: inline-block; min-width: 48px; text-align: center; padding: 2px 6px; border-radius: 7px; font-weight: 700; font-size: 12.5px; }
.diff.h { background: var(--bad-bg); color: var(--bad); } .diff.m { background: var(--bg-2); color: var(--ink-2); } .diff.e { background: var(--ok-bg); color: var(--ok); }
.keyrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.keyrow + .keyrow { border-top: 1px solid var(--line); }
.keyrow .n { width: 34px; flex: none; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.keyrow input { flex: 1; min-width: 0; height: 40px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--bg); padding: 0 12px; font-size: 15px; }
.keyrow .bub { width: 34px; height: 34px; }
.keyrow .bub.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.seg-pills { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }

/* ---------- empty / error / skeleton ---------- */
.empty { text-align: center; padding: 36px 20px; }
.empty .ill { width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty h3 { font-size: 18px; font-weight: 750; }
.empty p { color: var(--ink-2); margin: 6px auto 18px; max-width: 290px; font-size: 14px; }
.sk { border-radius: 14px; background: linear-gradient(90deg, var(--bg-2) 0%, color-mix(in srgb, var(--bg-2) 40%, var(--card)) 50%, var(--bg-2) 100%); background-size: 200% 100%; animation: shim 1.3s infinite linear; }
@keyframes shim { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* toast */
#toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); transform: translate(-50%, -20px); z-index: 100; opacity: 0; pointer-events: none;
  background: var(--navy-900); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-2); transition: opacity .25s, transform .3s var(--ease); max-width: calc(100% - 32px); display: flex; gap: 8px; align-items: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }
.foot { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 26px; }
.foot a { color: var(--accent); text-decoration: none; font-weight: 600; }

.scale .marker.lft::after { left: -2px; transform: none; }
.scale .marker.rgt::after { left: auto; right: -2px; transform: none; }
.page { cursor: zoom-in; }
.zoom { position: fixed; inset: 0; z-index: 90; background: #0a1226; display: flex; flex-direction: column; animation: fade .2s both; }
.zoom.out { animation: fade .2s reverse both; }
.zoom .zbar { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 10px) 14px 10px; color: #fff; }
.zoom .zbar .iconbtn { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; }
.zoom .zsc { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 0 calc(var(--safe-b) + 16px); }
.zoom .zsc img { width: 200%; max-width: 1240px; display: block; background: #fff; }
[data-theme="dark"] .lvl-pill { background: var(--accent-soft); }

/* ---------- v6: admin yangi test, karta, xatolar ---------- */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; padding: 22px 14px; border: 2px dashed var(--line-2); border-radius: var(--r-md); text-align: center; cursor: pointer; background: var(--bg); transition: border-color .2s, background .2s; }
.drop:active { transform: scale(.98); }
.drop .di { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.drop b { font-weight: 700; max-width: 100%; overflow-wrap: anywhere; } .drop small { color: var(--ink-3); font-size: 13px; }
.drop.ok { border-style: solid; border-color: var(--ok); background: var(--ok-bg); } .drop.ok .di { background: var(--ok); color: #fff; }
.drop.busy { border-color: var(--accent); opacity: .8; } .drop.busy .di { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .6; } }
.fld { display: block; margin-top: 14px; } .fld > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.fld input, .fld textarea { width: 100%; min-width: 0; height: 50px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--bg); padding: 0 14px; font-size: 16px; }
.fld textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.45; font: inherit; font-size: 16px; color: inherit; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft); }
.fld.rng { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .fld.rng > span { margin: 0; flex: 1; }
.fld.rng > div { display: flex; align-items: center; gap: 8px; } .fld.rng input { width: 70px; text-align: center; font-variant-numeric: tabular-nums; } .fld.rng i { font-style: normal; color: var(--ink-3); }
.cardprev { aspect-ratio: 4 / 5; max-height: 52vh; margin: 4px auto 14px; display: flex; justify-content: center; }
.cardprev img { height: 100%; width: auto; max-width: 100%; border-radius: 18px; box-shadow: var(--shadow-2); animation: fade .3s both; }
.cardprev .sk { aspect-ratio: 4 / 5; width: auto !important; }
.mtest .track { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; } .mtest .track i, .screen > .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); transition: width .5s var(--ease); }
.screen > .track { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.drillopts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; } .drillopts.six { grid-template-columns: repeat(3, 1fr); }
.dopt { height: 62px; border-radius: 16px; font-size: 22px; font-weight: 800; background: var(--bubble); box-shadow: inset 0 0 0 2px var(--bubble-line); transition: transform .15s var(--spring), background .2s; }
.dopt:active { transform: scale(.94); } .dopt.ok { background: var(--ok); color: #fff; box-shadow: none; } .dopt.bad { background: var(--bad); color: #fff; box-shadow: none; }
.dopt[disabled] { pointer-events: none; } .dopt[disabled]:not(.ok):not(.bad) { opacity: .45; }
.pdfwrap { max-height: 60vh; overflow: auto; margin: 6px 0 12px; }

/* ---------- v7: profil, alohida sahifalar ---------- */
button.avatar { border: 0; cursor: pointer; transition: transform .15s var(--spring); } button.avatar:active { transform: scale(.92); }
.avatar.sm { width: 42px; height: 42px; font-size: 14px; }
.avatar.xl { width: 84px; height: 84px; font-size: 30px; margin: 0 auto 12px; box-shadow: 0 0 0 4px rgba(255,255,255,.18), 0 10px 28px -8px rgba(0,0,0,.5); }
.prof-hero { text-align: center; padding-top: 26px; padding-bottom: 22px; }
.prof-hero h2 { font-size: 22px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.prof-hero .sub { margin-top: 4px; }
.linkrow { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 12px; padding: 14px 16px; text-align: left; transition: transform .15s var(--ease); }
.linkrow:active { transform: scale(.98); } .linkrow .chev { color: var(--ink-3); flex: none; }
.sec + .list, .sec + .card { margin-top: 0; }
.list + .sec { margin-top: 24px; }
.row-i .score-col { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tabbar button { min-width: 0; }

/* ---------- v10: rasmiy uslub (uzbmb.uz "Virtual markaz" tili) ---------- */
.hero { border-radius: 24px; background: var(--navy-700); box-shadow: none; }
.hero::before { opacity: 1; mask-image: none; -webkit-mask-image: none; background-size: auto;
  background-image: radial-gradient(circle at calc(100% - 34px) 34px, rgba(255,255,255,.10) 0 26px, transparent 27px),
    radial-gradient(circle at calc(100% - 34px) 98px, transparent 0 18px, rgba(255,255,255,.10) 19px 26px, transparent 27px),
    radial-gradient(circle at calc(100% - 98px) 34px, transparent 0 18px, rgba(255,255,255,.07) 19px 26px, transparent 27px); }
.hero::after { border: 0; width: 64px; height: 64px; right: 2px; bottom: auto; top: 66px; border-radius: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 3px, transparent 3.5px); background-size: 14px 14px; }
.hero .label { color: rgba(255,255,255,.7); }
.hero .link, .cover .subj, .res-hero .chip.gold { color: #fff; }
.cover .subj, .res-hero .chip.gold { background: rgba(255,255,255,.14); }
.hero-stats div { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.1); }
.medal { background: #fff; box-shadow: none; }
.medal::before { inset: 5px; background: var(--navy-600); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.medal span { color: #fff; }
.medal.none { background: rgba(255,255,255,.35); }
.medal.none::before { background: var(--navy-800); }
.lvl-pill { background: var(--accent-soft); color: var(--navy-600); }
[data-theme="dark"] .lvl-pill { color: var(--accent); }
.avatar { background: var(--navy-600); box-shadow: none; }
.row-i .av-s { background: var(--navy-600); }
.btn.gold { background: var(--navy-600); color: #fff; box-shadow: none; }
.tile.gold { background: var(--accent-soft); color: var(--navy-600); }
.cont { background: var(--accent-soft); border-color: color-mix(in srgb, var(--navy-600) 25%, transparent); }
.prog i, .calib i, .mtest .track i, .screen > .track i { background: var(--navy-600); }
.dist .c.top i { background: var(--navy-800); }
.calc { background: var(--navy-700); } .calc .orb i { border-top-color: #fff; }
.mebar .in { background: var(--navy-700); } .mebar .in .rk { color: #fff; }
.tabbar button.on, .filters button.on { background: var(--navy-600); }
.card, .stat3 > div { box-shadow: none; }
.label { letter-spacing: .04em; }
.disclaim { margin: 18px 6px 0; font-size: 12px; line-height: 1.45; color: var(--ink-3); text-align: center; }
.hero::before { opacity: .7; } .hero::after { opacity: .55; }
.hero > * { position: relative; }
.hero .avatar.xl { background: #fff; color: var(--navy-700); box-shadow: 0 0 0 4px rgba(255,255,255,.18); }

/* ---------- desktop (≥1024px): sidebar nav, wider content, split exam ---------- */
.sb-brand { display: none; }
.hgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hcol > .card + .card { margin-top: 12px; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tgrid > .card { margin-top: 0; }
@media (min-width: 720px) {
  .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tgrid > .tcard { height: 100%; }
}
@media (min-width: 1024px) {
  :root { --sb: 248px; }
  body { font-size: 15.5px; }
  #app { max-width: none; margin: 0; }
  #app:has(.tabbar) { padding-left: var(--sb); }
  .screen { max-width: 1040px; margin: 0 auto; padding: 32px 40px 72px; }
  .screen.no-tab { max-width: 880px; padding-bottom: 120px; }
  .topbar { margin-bottom: 24px; }
  .greet h1 { font-size: 32px; }
  .greet { margin-bottom: 22px; }

  /* sidebar */
  .tabbar { left: 0; top: 0; bottom: 0; transform: none; width: var(--sb); flex-direction: column; align-items: stretch; gap: 4px;
    padding: 24px 14px; border-radius: 0; border: 0; border-right: 1px solid var(--line); background: var(--card); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar .sb-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .sb-brand b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
  .sb-brand small { display: block; font-size: 12px; color: var(--ink-3); }
  .tabbar button { height: 44px; padding: 0 14px; border-radius: 12px; gap: 12px; justify-content: flex-start; color: var(--ink-2); font-size: 14.5px; }
  .tabbar button span { display: inline; }
  .tabbar button:not(.on):hover { background: var(--bg-2); color: var(--ink); }
  .screen:has(+ .tabbar) .topbar .brand { visibility: hidden; }

  /* home */
  .hgrid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .hmain > .hero { height: 100%; }
  .tgrid { gap: 14px; }

  /* fixed bars respect the sidebar */
  #app:has(.tabbar) .cta-bar, #app:has(.tabbar) .mebar { left: var(--sb); }
  .cta-bar .in, .mebar .in { max-width: 640px; }
  .screen:has(.mebar) { padding-bottom: 110px; }

  /* sheet → centered dialog */
  .sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: min(520px, calc(100vw - 48px)); max-height: 84vh; margin: 0;
    border-radius: 24px; padding: 24px 26px 24px; transform: translate(-50%, -50%); animation: dlg .28s var(--ease) both; box-shadow: 0 30px 80px rgba(4, 10, 24, .35); }
  .sheet.out { animation: dlgout .2s ease-in both; }
  .sheet .grab { display: none; }

  /* exam: questions left, answer sheet right */
  .screen.split { max-width: 1320px; padding: 0 32px 40px; }
  .split .exam-head { margin: 0 -32px; padding: 14px 32px 12px; }
  .split .seg { display: none; }
  .split .prog { margin-bottom: 2px; }
  .xsplit { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; margin-top: 18px; }
  .xsh { position: sticky; top: 106px; max-height: calc(100vh - 124px); overflow: auto; overscroll-behavior: contain;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 4px 16px 8px; scrollbar-width: thin; }
  .xsh .omr-sec:first-child { margin-top: 10px; }

  /* pointer niceties */
  .card[data-go]:hover, button.card:hover, .tcard:hover, .linkrow:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
  .row-i:hover { background: var(--bg); }
  .btn:hover { filter: brightness(1.05); }
}
@keyframes dlg { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
@keyframes dlgout { to { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
.dsk-only { display: none; }
@media (min-width: 1024px) {
  .dsk-only { display: grid; }
  .hcol { display: flex; flex-direction: column; }
  .hcol > .card:last-child { flex: 1; }
  .hcol .steps { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); gap: 16px; }
  .screen:has(+ .tabbar) > .topbar:has(.brand) { display: none; }
  .screen:has(+ .tabbar) > .topbar .ttl b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
  .screen:has(+ .tabbar) > .topbar .ttl small { font-size: 13.5px; margin-top: 2px; }
}
@media (min-width: 1024px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .hmain > .hero { display: flex; flex-direction: column; }
  .hmain > .hero .link { margin-top: auto; padding-top: 18px; }
}
@media (min-width: 1024px) { .hcol:has(.cont) .steps { display: none; } }
