/* CD IELTS (Inspera player) ekraniga aniq moslangan uslub.
   O'lchamlar rasmiy familiarisation test (demo-ielts.inspera.com) dan olingan:
   Arial 16px / 24px, sarlavha 56px, banner #f1f2ec, faol savol #418fc6, javob berilgan — yashil chiziq #358e14,
   pastki panel 54px, strelkalar 56×55 panel ustida.
   Kontrast: theme-bw (oq fonda qora), theme-wb (qora fonda oq), theme-yb (qora fonda sariq).
   Shrift: size-m / size-l / size-xl. */

:root {
  --fs: 16px; --lh: 24px;
  --bg: #fff; --fg: #000; --fg2: #333; --muted: #535353; --line: #d5d5d5; --line2: #949494;
  --banner: #f1f2ec; --active: #418fc6; --attempted: #358e14; --hover: #f5f5f5; --deliver: #efefef;
  --input: #fff; --input-line: #535353; --hl: #ffef5c; --hl-note: #ffcd7a; --danger: #d0021b;
  --overlay: rgba(0, 0, 0, .7); --arrow-off: #ddd;
}
body.size-l { --fs: 19px; --lh: 28px; }
body.size-xl { --fs: 22px; --lh: 32px; }
body.theme-wb {
  --bg: #000; --fg: #fff; --fg2: #fff; --muted: #ccc; --line: #777; --line2: #aaa; --banner: #1a1a1a;
  --active: #6cb4ff; --attempted: #5fd13a; --hover: #1d1d1d; --deliver: #222; --input: #000; --input-line: #ccc;
  --hl: #806f00; --hl-note: #7a4a00; --arrow-off: #444;
}
body.theme-yb {
  --bg: #000; --fg: #ff0; --fg2: #ff0; --muted: #e6e600; --line: #8a8a00; --line2: #b3b300; --banner: #141400;
  --active: #ff0; --attempted: #ff0; --hover: #1a1a00; --deliver: #1a1a00; --input: #000; --input-line: #e6e600;
  --hl: #5c5300; --hl-note: #6b3d00; --arrow-off: #444;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Arial, sans-serif; font-size: var(--fs); line-height: var(--lh); background: var(--bg); color: var(--fg); }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875em; }
.pad { padding: 12px 16px; }
.error { color: var(--danger); margin-bottom: 12px; }
.notice { border: 1px solid var(--line); background: var(--banner); border-radius: 4px; padding: 12px 16px; margin-top: 16px; }

/* ── Brend belgisi (IELTS logotipi o'rnida) ── */
.logo { display: inline-flex; align-items: center; gap: 6px; height: 27px; color: var(--fg); font: 700 18px/1 Arial, sans-serif; white-space: nowrap; }
.logo svg { width: 11px; height: 15px; fill: var(--fg); }

/* ── Ekranlar (kirish, tasdiqlash, yo'riqnoma) ── */
.screen { min-height: 100vh; display: flex; flex-direction: column; background: #f4f4f4; }
body.theme-wb .screen, body.theme-yb .screen { background: var(--bg); }
.screen-top { height: 56px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.st-title { font-weight: 700; }
.st-right { display: flex; gap: 20px; justify-content: flex-end; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps { display: flex; justify-content: center; gap: 0; margin: 0; padding: 14px 24px; list-style: none; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 8px; padding: 0 14px; white-space: nowrap; }
.steps li + li::before { content: ''; width: 28px; height: 1px; background: var(--line2); margin-right: 14px; margin-left: -14px; }
.step-n { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.steps li.is-current { color: var(--fg); font-weight: 700; }
.steps li.is-current .step-n { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.steps li.is-done { color: var(--fg); }
.steps li.is-done .step-n { border-color: var(--fg); }
.screen-body { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 40px 24px; }
.screen-foot { flex: none; display: flex; justify-content: space-between; gap: 16px; padding: 12px 24px; background: var(--bg); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.conn { display: flex; align-items: center; gap: 8px; }
.conn i { width: 9px; height: 9px; border-radius: 50%; background: var(--fg); }
.conn.is-off { color: var(--danger); font-weight: 700; }
.conn.is-off i { background: var(--danger); }

.panel { background: var(--bg); border: 1px solid var(--line); padding: 32px 36px; }
.panel h1 { font-size: 24px; line-height: 32px; margin: 0 0 8px; font-weight: 700; }
.panel h2 { font-size: 16px; margin: 0 0 12px; font-weight: 700; }
.panel h2 + * { margin-top: 0; }
.panel * + h2 { margin-top: 28px; }
.panel h3 { font-size: var(--fs); margin: 24px 0 8px; font-weight: 700; }
.panel ul { margin: 0; padding-left: 22px; }
.panel li { margin: 6px 0; }
.card { width: min(600px, 100%); }
.card-wide { width: min(820px, 100%); }
.login-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; width: min(980px, 100%); align-items: start; }
.panel-info { background: transparent; border-color: transparent; padding-top: 28px; }
.code-boxes { display: flex; gap: 10px; margin: 24px 0 16px; }
.code-box { width: 100%; max-width: 58px; height: 64px; text-align: center; font-size: 28px; font-weight: 700; text-transform: uppercase;
  border: 1px solid var(--input-line); border-radius: 3px; background: var(--input); padding: 0; }
.code-box:focus { outline: none; border: 2px solid var(--active); }
.btn-wide { width: 100%; padding: 12px; font-weight: 700; }
.hint { font-size: 14px; color: var(--muted); margin-top: 12px; }
.format { width: 100%; border-collapse: collapse; margin-bottom: 10px; background: var(--bg); }
.format th, .format td { text-align: left; padding: 8px 12px; border: 1px solid var(--line); }
.format th { background: var(--banner); font-size: 14px; }
.format td:first-child { font-weight: 700; }
.rules li { margin: 8px 0; }
/* ── Kirish / ro'yxatdan o'tish ── */
.login-panel { padding-top: 0; }
.login-panel > h1 { padding-top: 32px; }
.tabs { display: flex; margin: 0 -36px 24px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 18px 12px 14px; background: none; border: 0; border-bottom: 3px solid transparent; font-size: 18px; font-weight: 700; color: var(--muted); }
.tabs button.is-on { color: var(--fg); border-bottom-color: var(--fg); }
.tabs button:hover { color: var(--fg); }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-tg { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }
.tg-ico { width: 20px; height: 20px; fill: #229ed9; flex: none; vertical-align: -4px; }
body.theme-wb .tg-ico, body.theme-yb .tg-ico { fill: currentColor; }
.tg-box h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.tg-qr { display: flex; gap: 18px; align-items: center; margin: 16px 0 8px; }
.tg-qr-img { width: 148px; height: 148px; flex: none; background: #fff; border: 1px solid var(--line); }
.tg-qr-img svg { width: 100%; height: 100%; display: block; }
.tg-qr p + p { margin-top: 8px; }
.tg-link { font-size: 14px; word-break: break-all; }
.tg-link a { color: var(--active); }
.tg-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 10px 0 16px; font-size: 14px; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkish { background: none; border: 0; padding: 0; color: var(--active); text-decoration: underline; font-size: inherit; }
.reg-form > p:first-child { margin-bottom: 16px; }
.session-one { padding: 10px 14px; background: var(--banner); border: 1px solid var(--line); margin-bottom: 18px; }
.sessions { border: 0; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.session-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--line); cursor: pointer; }
.session-opt.is-on { border: 2px solid var(--fg); padding: 9px 13px; }
.session-opt input { margin-top: 5px; accent-color: #000; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.f-label { font-size: 14px; font-weight: 700; }
.f-hint { font-size: 12px; color: var(--muted); }
.field input { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--input-line); border-radius: 3px; background: var(--input); }
.field input:focus { outline: none; border: 2px solid var(--active); padding: 0 9px; }
.choice2 { display: flex; height: 42px; border: 1px solid var(--input-line); border-radius: 3px; overflow: hidden; }
.choice2 label { flex: 1; display: grid; place-items: center; cursor: pointer; font-size: 15px; }
.choice2 label + label { border-left: 1px solid var(--input-line); }
.choice2 label.is-on { background: var(--fg); color: var(--bg); font-weight: 700; }
.choice2 input { position: absolute; opacity: 0; pointer-events: none; }
.tg-connect { margin: 20px 0 16px; padding: 14px 16px; border: 1px dashed var(--line2); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tg-connect > .tg-qr, .tg-connect > .tg-wait { width: 100%; margin: 0; }
.reg-form .btn-wide { margin-top: 8px; }
.reg-done h2 { font-size: 20px; margin-bottom: 16px; }
.reg-done .details { margin-bottom: 20px; }
.code-label { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.code-big { font: 700 44px/1.2 'Courier New', monospace; letter-spacing: 10px; margin: 4px 0 8px; }
.reg-done .row-btns { margin-top: 20px; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } .tg-qr { flex-direction: column; align-items: flex-start; } .tabs { margin: 0 -20px 20px; } }
.done-table td { font-weight: 700; }
/* ── Rasm va bayonnoma ── */
.confirm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; margin-top: 20px; align-items: start; }
.photo-label { font-weight: 700; margin: 0 0 8px; }
.cam-frame { position: relative; width: 192px; height: 240px; border: 1px solid var(--input-line); background: #f0f0f0; overflow: hidden; }
.cam-video { width: 100%; height: 100%; object-fit: cover; display: block; }
video.cam-video { transform: scaleX(-1); }
.cam-oval { position: absolute; left: 50%; top: 46%; width: 62%; height: 64%; transform: translate(-50%, -50%); border: 2px dashed rgba(255,255,255,.9);
  border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }
.cam-empty { width: 100%; height: 100%; display: grid; place-items: center; }
.cam-empty svg { width: 96px; height: 96px; fill: none; stroke: #9a9a9a; stroke-width: 1.2; }
.cam-tip { font-size: 14px; margin: 8px 0 0; max-width: 240px; }
.cam-err { font-size: 14px; color: var(--danger); margin: 8px 0 0; max-width: 240px; }
.cam-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cam-btns .btn { padding: 7px 12px; }
.photo-box .hint { font-size: 13px; max-width: 250px; }
.declare { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; padding: 12px 14px; border: 1px solid var(--line); cursor: pointer; }
.declare input { margin-top: 5px; width: 16px; height: 16px; accent-color: #000; flex: none; }
@media (max-width: 860px) { .confirm-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .login-grid { grid-template-columns: 1fr; } .steps { overflow-x: auto; justify-content: flex-start; } .st-title { display: none; } }
.btn { border: 1px solid var(--line2); background: var(--bg); padding: 10px 20px; border-radius: 3px; }
.btn:hover { background: var(--hover); }
.btn-primary { background: #000; color: #fff; border-color: #000; }
.btn-primary:hover { background: #222; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
body.theme-wb .btn-primary, body.theme-yb .btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; align-items: center; }
.row-btns.end { justify-content: flex-end; }
.details { width: 100%; border-collapse: collapse; }
.details th, .details td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); }
.details th { width: 40%; background: var(--banner); font-weight: 700; }
.sound-check { margin-top: 24px; padding: 12px 16px; background: var(--banner); border: 1px solid var(--line); border-radius: 4px; }
.vol { display: inline-flex; align-items: center; gap: 8px; }
.vol input { width: 120px; accent-color: #000; }
body.theme-wb .vol input, body.theme-yb .vol input { accent-color: var(--fg); }

/* ── Imtihon sahifasi ── */
.exam { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.ex-header { height: 56px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--bg); position: relative; z-index: 5; }
.hd-left { display: flex; align-items: center; gap: 32px; padding-left: 16px; min-width: 0; }
.hd-id { line-height: 19px; min-width: 0; }
.hd-name { font-weight: 600; white-space: nowrap; }
.hd-sub { font-size: 14px; color: var(--muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.hd-sub svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.timer { font-weight: 700; padding: 4px 12px; border-radius: 3px; white-space: nowrap; }
.timer.is-red { color: var(--danger); }
.timer.is-flash { animation: flash 1s steps(2) infinite; }
@keyframes flash { 0% { background: var(--danger); color: #fff; } 50% { background: transparent; color: var(--danger); } }
.hd-right { display: flex; align-items: center; justify-content: flex-end; padding-right: 16px; }
.hd-vol { display: flex; align-items: center; gap: 6px; margin-right: 8px; }
.hd-vol svg { width: 22px; height: 22px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hd-vol input { width: 90px; accent-color: #000; }
.hd-btn { position: relative; width: 56px; height: 56px; background: none; border: none; display: grid; place-items: center; padding: 0; }
.hd-btn svg { width: 24px; height: 24px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hd-btn:hover, .hd-btn.is-open { background: var(--hover); }
.hd-btn.is-off svg { stroke: var(--danger); }
.badge { position: absolute; top: 9px; right: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 16px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.banner { flex: none; margin: 16px 16px 0; padding: 12px 16px; background: var(--banner); border: 1px solid var(--line); border-radius: 4px; }
.banner h2 { font-size: var(--fs); line-height: 19px; margin: 0 0 4px; font-weight: 700; }
.banner p { line-height: var(--lh); }

.ex-main { flex: 1; min-height: 0; position: relative; margin-top: 16px; }
.part { position: absolute; inset: 0; }
.part.is-hidden { display: none; }
.single { position: absolute; inset: 0; overflow-y: auto; padding: 0 16px 96px; background-repeat: repeat; }
.single .part { position: static; max-width: 1100px; }
.split { position: absolute; inset: 0; display: flex; }
.pane { overflow-y: auto; padding: 0 16px 96px; background-repeat: repeat; }
.pane-left { flex: 0 0 50%; }
.pane-right { flex: 1; min-width: 0; padding-left: 17px; }
.splitter { flex: none; width: 2px; background: rgba(0, 0, 0, .5); position: relative; cursor: col-resize; touch-action: none; }
body.theme-wb .splitter, body.theme-yb .splitter { background: var(--line2); }
.splitter span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 3px;
  background: var(--bg); border: 1px solid var(--line2); display: grid; place-items: center; }
.splitter svg { width: 16px; height: 16px; fill: none; stroke: var(--fg); stroke-width: 2; }
.splitter::before { content: ''; position: absolute; inset: 0 -8px; }

/* ── Matn (Reading) ── */
.passage-title { font-size: 1.1em; line-height: 1.2; margin: 0 0 8px; font-weight: 700; }
.passage p { margin: 16px 0; }
.passage h5 { font-size: var(--fs); margin: 24px 0 0; }
.pl { font-weight: 700; margin-right: 8px; }
.heading-zone { margin: 16px 0 -8px; }

/* ── Savollar ── */
.q-group { margin-bottom: 40px; }
.q-instr { margin-bottom: 16px; }
.q-instr p { margin: 0 0 4px; }
.q-range { font-weight: 700; line-height: 19px; margin-bottom: 8px !important; }
.q-item { margin: 0 0 16px; outline: none; }
.q-text { margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; }
.qn { display: inline-block; flex: none; min-width: 29px; padding: 4px 2px 3px; border: 2px solid transparent; border-radius: 3px; text-align: center; font-weight: 700; line-height: 16px; }
.is-current > .q-text .qn, tr.is-current .qn, .match-row.is-current .qn { border-color: var(--active); }
.opts { margin: 0; padding: 0; }
.opt { position: relative; display: flex; gap: 8px; padding: 9.6px 8px 9.6px 32px; border-radius: 3px; cursor: pointer; }
.opt:hover { background: var(--hover); }
.opt input { position: absolute; left: 5px; top: 13px; margin: 0; accent-color: #000; width: 15px; height: 15px; }
body.theme-wb .opt input, body.theme-yb .opt input, body.theme-wb .cell input, body.theme-yb .cell input { accent-color: var(--fg); }
.opt-l { font-weight: 700; min-width: 14px; }

.stem { line-height: 2.25; }
.stem h4 { margin: 0 0 8px; text-align: center; font-size: var(--fs); line-height: var(--lh); }
.stem ul { margin: 0 0 4px; padding-left: 24px; }
.stem .nh { font-weight: 700; margin: 12px 0 0; line-height: var(--lh); }
.stem p { margin: 0 0 4px; }
.form-box, .notes, .summary { border: 1px solid var(--line2); padding: 16px 24px; }
.form-table { border-collapse: collapse; width: 100%; }
.form-table td { padding: 2px 8px; vertical-align: middle; }
.form-table td:first-child { width: 42%; }

.gap { min-width: 104px; width: 150px; height: 24px; padding: 0 8px; margin: 0 4px; vertical-align: middle; line-height: 22px;
  border: 1px solid var(--input-line); border-radius: 3px; background: var(--input); }
.gap::placeholder { color: var(--fg); font-weight: 700; text-align: center; opacity: 1; }
.gap:focus { outline: none; border-color: var(--active); box-shadow: 0 0 0 1px var(--active); }
.gap:focus::placeholder { color: transparent; }

.grid-title { font-weight: 700; text-align: center; margin: 0 0 8px; }
.figure { text-align: center; margin: 0 0 16px; }
.figure svg, .figure img { max-width: 100%; height: auto; max-height: 440px; }
body.theme-wb .figure svg, body.theme-yb .figure svg, body.theme-wb .figure img, body.theme-yb .figure img { background: #fff; }
.grid { border-collapse: collapse; }
.grid th, .grid td { border: 1px solid var(--line2); padding: 4px 10px; text-align: center; }
.grid thead th { background: var(--banner); }
.grid tbody th { text-align: left; font-weight: 400; min-width: 220px; }
.cell { display: block; padding: 4px; cursor: pointer; }
.cell input { accent-color: #000; width: 16px; height: 16px; cursor: pointer; margin: 0; vertical-align: middle; }

/* ── Drag & drop ── */
.match { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.match-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 8px; }
.match-text { flex: 1; display: flex; gap: 8px; align-items: baseline; }
.pool-title { font-weight: 700; margin: 0 0 8px; }
.pool { display: flex; flex-direction: column; gap: 6px; min-height: 40px; align-items: flex-start; }
.chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 4px 10px; border: 1px solid var(--line2); border-radius: 3px;
  background: var(--bg); cursor: grab; line-height: 22px; max-width: 100%; }
.chip:hover { border-color: var(--fg); }
.chip.is-picked { outline: 2px solid var(--active); outline-offset: 1px; }
.chip-id { flex: none; }
.zone { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; min-width: 150px; min-height: 32px;
  margin: 2px 4px; padding: 1px; border: 1px dashed var(--line2); border-radius: 3px; background: var(--input); line-height: 22px; }
.zone-wide { min-width: 190px; }
.heading-zone .zone { display: flex; width: 100%; justify-content: flex-start; min-height: 36px; margin: 0; }
.zone-n { font-weight: 700; padding: 0 8px; }
.zone.is-over, .zone:focus, .zone.is-current { outline: none; border: 2px solid var(--active); padding: 0; }
.zone.is-filled { border-style: solid; }
.zone .chip { border: none; background: transparent; padding: 3px 8px; }

/* ── Writing ── */
.wr-prompt p { margin: 0 0 16px; }
.wr-box { height: 100%; display: flex; flex-direction: column; }
.wr-text { flex: 1; width: 100%; min-height: 320px; resize: none; padding: 8px 10px; border: 1px solid var(--input-line); border-radius: 3px;
  background: var(--input); line-height: var(--lh); }
.wr-text:focus { outline: none; border-color: var(--active); box-shadow: 0 0 0 1px var(--active); }
.wr-count { margin-top: 8px; }

/* ── Pastki navigatsiya ── */
.ex-nav { flex: none; height: 54px; display: flex; align-items: stretch; background: var(--bg); color: var(--muted); border-top: 1px solid var(--line); position: relative; z-index: 5; }
.flag { display: flex; align-items: center; gap: 6px; padding: 0 14px; font-weight: 600; color: var(--fg2); white-space: nowrap; cursor: pointer; border-right: 1px solid var(--line); }
.flag input { accent-color: #000; width: 15px; height: 15px; margin: 0; }
.nav-parts { flex: 1; min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
.nav-part { display: flex; align-items: center; }
.nav-part:not(.is-active) { flex: 1; }
.nav-part-btn { background: none; border: none; padding: 16px 20px; color: var(--fg2); white-space: nowrap; font-weight: 400; height: 100%; }
.nav-part.is-active .nav-part-btn { font-weight: 600; padding-right: 8px; }
.nav-part:not(.is-active) .nav-part-btn { width: 100%; text-align: left; }
.nav-part:not(.is-active) .nav-part-btn:hover { background: var(--hover); }
.nav-count { margin-left: 12px; color: var(--muted); }
.nav-nums { display: flex; align-items: center; padding-right: 12px; }
.qbtn { position: relative; min-width: 21px; height: 27px; padding: 2.4px 4px; border: 2px solid transparent; border-radius: 3px; background: none; color: var(--fg2); line-height: 18px; }
.qbtn::before { content: ''; position: absolute; left: 0; right: 0; top: -7px; height: 3px; background: transparent; }
.qbtn.is-done::before { background: var(--attempted); }
.qbtn.is-current { border-color: var(--active); background: var(--bg); font-weight: 700; }
.qbtn.is-flag { border-radius: 50%; border-color: var(--fg2); min-width: 27px; }
.qbtn.is-flag.is-current { border-color: var(--active); }
.qbtn:hover:not(.is-current) { text-decoration: underline; }
.deliver { flex: none; width: 77px; border: none; background: var(--deliver); color: var(--muted); display: grid; place-items: center; }
.deliver svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.deliver:hover { filter: brightness(.95); }
.nav-arrows { position: absolute; right: 32px; bottom: 89px; display: flex; gap: 2px; z-index: 6; }
.arrow { width: 56px; height: 55px; border: none; border-radius: 3px; background: #000; display: grid; place-items: center; }
.arrow svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.5; }
.arrow:disabled { background: var(--arrow-off); cursor: default; }
body.theme-wb .arrow:not(:disabled), body.theme-yb .arrow:not(:disabled) { background: var(--fg); }
body.theme-wb .arrow svg, body.theme-yb .arrow svg { stroke: var(--bg); }

/* ── Panellar va oynalar ── */
.popover { position: absolute; top: 56px; right: 72px; z-index: 50; background: var(--bg); border: 1px solid var(--line2); box-shadow: 0 6px 24px rgba(0,0,0,.2); width: 300px; }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.x { background: none; border: none; font-size: 24px; line-height: 1; padding: 0 4px; }
.pop-link { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: 12px 16px; }
.pop-link:hover { background: var(--hover); }
.pop-label { margin: 12px 16px 6px; font-weight: 700; }
.segs { display: flex; flex-direction: column; padding: 0 0 8px; }
.seg { text-align: left; border: none; background: none; padding: 8px 16px 8px 40px; position: relative; }
.seg:hover { background: var(--hover); }
.seg.is-on::before { content: '✓'; position: absolute; left: 16px; font-weight: 700; }
.notes-panel { position: absolute; top: 56px; right: 0; bottom: 54px; width: 320px; z-index: 40; background: var(--bg); border-left: 1px solid var(--line2); box-shadow: -4px 0 16px rgba(0,0,0,.1); overflow-y: auto; }
.note { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.note p { margin: 0 0 6px; }
.note-quote { font-style: italic; border-left: 3px solid var(--hl-note); padding-left: 8px; }
.note textarea { width: 100%; height: 72px; resize: vertical; border: 1px solid var(--input-line); border-radius: 3px; padding: 6px 8px; background: var(--input); }
.link-btn { background: none; border: none; color: var(--danger); padding: 4px 0; }
.overlay { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: grid; place-items: center; padding: 20px; }
.overlay .card { background: var(--bg); padding: 32px; border-radius: 4px; max-height: 90vh; overflow-y: auto; }
.hide-screen { background: var(--bg); }
.play-card { text-align: center; max-width: 520px; }
.play-card p { margin: 0 0 12px; }
.play-card svg { width: 64px; height: 64px; fill: none; stroke: var(--fg); stroke-width: 1.5; margin-bottom: 12px; }
.btn-play { background: #000; color: #fff; border: none; border-radius: 3px; padding: 10px 20px; min-width: 99px; }
.review .rv-part { margin: 16px 0; }
.review .rv-part p { margin: 0 0 8px; }
.rv-nums { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.rv-nums .qbtn { border-color: var(--line2); min-width: 32px; }

/* ── Highlight ── */
mark.hl { background: var(--hl); color: inherit; padding: 0; }
mark.hl-note { background: var(--hl-note); cursor: pointer; }
.ctx-menu { position: fixed; z-index: 1000; background: #fff; color: #000; border: 1px solid #949494; box-shadow: 0 4px 14px rgba(0,0,0,.25); padding: 4px 0; min-width: 160px; }
.ctx-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 8px 16px; font: 16px Arial, sans-serif; color: #000; }
.ctx-menu button:hover { background: #f0f0f0; }
.tg-pin { font-size: 14px; color: var(--muted); }
.tg-pin .pin { display: inline-block; margin-top: 4px; font: 700 24px/1.2 'Courier New', monospace; letter-spacing: 3px; color: var(--fg); }
/* ── Talaba kabineti: jarayon va natija ── */
.results { width: min(980px, 100%); display: grid; gap: 16px; }
.results .panel { padding: 24px 28px; }
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.res-head h1 { margin: 0 0 4px; }
.prog { height: 8px; background: var(--deliver); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.prog span { display: block; height: 100%; background: var(--attempted); }
.stages { list-style: none; margin: 18px 0 0; padding: 0; }
.stage { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.stage + .stage::before { content: ''; position: absolute; left: 13px; top: -10px; height: 20px; border-left: 2px solid var(--line); }
.st-dot { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--bg); }
.stage.is-done .st-dot { background: var(--attempted); border-color: var(--attempted); color: #fff; }
.stage.is-active .st-dot { border-color: var(--active); }
.stage.is-pending { color: var(--muted); }
.eta { margin-top: 16px; padding: 12px 16px; background: var(--banner); border: 1px solid var(--line); }
.overall { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.ov-band { font: 700 56px/1 Arial, sans-serif; margin: 4px 0; }
.ov-sk { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ov-sk div { border: 1px solid var(--line); padding: 10px; text-align: center; }
.ov-sk span { display: block; font-size: 13px; color: var(--muted); }
.ov-sk b { font-size: 24px; }
.ov-docs { display: grid; gap: 8px; }
.ov-docs .btn { text-align: center; text-decoration: none; color: inherit; }
.ov-docs .btn-primary { color: var(--bg); }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.res-card { background: var(--bg); border: 1px solid var(--line); padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.res-card header { display: flex; justify-content: space-between; align-items: baseline; }
.res-card h3 { margin: 0; font-size: 18px; }
.res-band { font: 700 30px/1 Arial, sans-serif; }
.crit-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.crit-t th { text-align: left; background: var(--banner); padding: 6px 8px; }
.crit-t td { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.crit-t td:last-child { text-align: right; white-space: nowrap; }
.bar { display: inline-block; width: 60px; height: 6px; background: var(--deliver); vertical-align: middle; margin-right: 6px; }
.bar i { display: block; height: 100%; background: var(--attempted); }
.fb-text p { margin: 4px 0; }
.mats { margin: 4px 0 0; padding-left: 20px; }
.mats a { color: var(--active); }
@media (max-width: 860px) { .overall { grid-template-columns: 1fr; } .res-grid { grid-template-columns: 1fr; } .ov-sk { grid-template-columns: repeat(2, 1fr); } }
