/* ═══════════════════════ Prime Seller ═══════════════════════
   Palette follows the PSA logo: violet (#6C30DC) carries the brand surfaces and "done",
   magenta (#DC1CB8) marks the one action per screen and "you are here"; everything else is white.
   Progress is always drawn as a strip: one segment per topic, grouped by lesson.
   Type: Golos Text for all Uzbek text; Unbounded only for the wordmark and numerals. */

@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos-text-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos-text-cyrillic-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Unbounded";
  src: url("../fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}

:root {
  --brand: #6C30DC;         /* логотипдаги бинафша */
  --brand-deep: #5521BE;
  --brand-soft: #F0EAFD;
  --ink: #6C30DC;           /* бренд рангидаги юзалар: ён панел, «давом эттириш» карточкаси */
  --ink-2: #5521BE;
  --text: #1C103F;
  --text-2: #4A3F73;
  --muted: #7C7199;
  --paper: #F8F6FD;
  --card: #FFFFFF;
  --line: #E9E4F5;
  --line-2: #D6CEEA;
  --fill: #EFEBF9;
  --tint: #FAF8FE;          /* жадвал сарлавҳаси каби жуда оч фон */
  --tint-2: #FCFBFE;
  --prime: #D31AB0;         /* логотипдаги пушти (оқ матн яхши ўқилиши учун бир оз тўқроқ) */
  --prime-deep: #B4139A;
  --prime-soft: #FCE7F7;
  --prime-ink: #8A0F73;     /* оч пушти фондаги матн */
  --prime-on-dark: #FF9BE7; /* тўқ фондаги пушти матн ва белгилар */
  --ok: #128A5B;   --ok-soft: #DDF3E8;
  --bad: #CF2F3A;  --bad-soft: #FBE4E6;
  --warn: #B25A00; --warn-soft: #FDEBD3;
  --hue: #6C30DC;  --hue-soft: #F0EAFD;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --num: "Unbounded", "Golos Text", system-ui, sans-serif;
  --r-l: 22px; --r-m: 14px; --r-s: 10px;
  --pop: 0 24px 60px -18px rgba(44, 18, 110, .32);
  color-scheme: light;
}

/* Видео саҳифаси: тунги кўриниш */
.night {
  --text: #F5F1FF;
  --text-2: #D2C8F3;
  --muted: #9F92CF;
  --paper: #120A2B;
  --card: #1C1142;
  --line: #30206A;
  --line-2: #45339A;
  --fill: #2A1B5E;
  --tint: #21154D;
  --tint-2: #251858;
  --seg-done: #FFFFFF;
  --seg-cur-bg: rgba(240, 79, 208, .48);
  --seg-cur: #F04FD0;
  color-scheme: dark;
}
.on-ink {
  --seg-empty: rgba(255, 255, 255, .22);
  --seg-done: #FFFFFF;
  --seg-cur-bg: rgba(255, 155, 231, .62);
  --seg-cur: #FFD9F6;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--paper); color: var(--text);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, dl, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; letter-spacing: -.012em; text-wrap: balance; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9A6BFF; outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 26px; height: 26px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.spacer { flex: 1; }

/* ─────────── Тугмалар ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 13px;
  background: transparent; font-weight: 600; font-size: 15.5px; line-height: 1.2; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-prime { background: var(--prime); color: #fff; }
.btn-prime:hover { background: var(--prime-deep); }
.on-ink .btn-prime { background: #fff; color: var(--brand-deep); }
.on-ink .btn-prime:hover { background: var(--brand-soft); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-line { background: var(--card); border-color: var(--line-2); color: var(--text); }
.btn-line:hover { border-color: var(--text-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--fill); color: var(--text); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover { background: #F7CFD3; }
.btn-sm { min-height: 36px; padding: 0 13px; border-radius: 10px; font-size: 14px; gap: 6px; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-off { opacity: .45; pointer-events: none; }
.link { color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.link-quiet { border: 0; background: none; padding: 0; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.link-quiet:hover { color: var(--text); }

/* ─────────── Майдонлар ─────────── */
.field { display: grid; gap: 7px; align-content: start; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--card); border: 1.5px solid var(--line-2); border-radius: 12px;
  font-size: 16px; line-height: 1.4;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.textarea { min-height: 132px; resize: vertical; }
.input-sm { min-height: 38px; padding: 6px 11px; font-size: 14.5px; border-radius: 10px; }
.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob { flex: none; width: 44px; height: 26px; margin-top: 1px; border-radius: 99px; background: var(--line-2); position: relative; transition: background-color .15s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(26,22,64,.3); }
.switch input:checked + .knob { background: var(--brand); }
.switch input:checked + .knob::after { transform: translateX(18px); }
.switch input:focus-visible + .knob { outline: 3px solid #9A6BFF; outline-offset: 2px; }
.switch b { display: block; font-weight: 600; }
.switch small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 38px; height: 38px; border-radius: 12px; background: var(--hue); border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line-2); cursor: pointer; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--text); }
.swatch input:focus-visible + span { outline: 3px solid #9A6BFF; outline-offset: 4px; }

/* ─────────── Белгилар ─────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 99px;
  background: var(--fill); color: var(--text-2);
  font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.chip-hue { background: var(--hue-soft); color: var(--hue); }
.chip-plain { background: var(--card); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-prime { background: var(--prime-soft); color: var(--prime-ink); }
.chip-ink { background: rgba(255,255,255,.18); color: #fff; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--hue); flex: none; }

.flashes { display: grid; gap: 8px; margin-bottom: 18px; }
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; font-weight: 500; line-height: 1.45;
  background: var(--ok-soft); color: #0A5E3E;
}
.flash .i { margin-top: 1px; }
.flash-bad { background: var(--bad-soft); color: #97202A; }
.flash-info { background: var(--prime-soft); color: var(--prime-ink); }
.flash button { margin-left: auto; border: 0; background: none; color: inherit; opacity: .6; padding: 0; display: flex; }
.flash button:hover { opacity: 1; }
.note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-m);
  background: var(--brand-soft); color: var(--text); line-height: 1.5;
}
.note > .i { color: var(--brand); margin-top: 2px; }
.note b { font-weight: 700; }
.note-prime { background: var(--prime-soft); }
.note-prime > .i { color: var(--prime); }

/* ─────────── Прогресс чизиғи: ҳар бўлак — битта мавзу ─────────── */
.strip { display: flex; gap: 9px; align-items: center; min-width: 0; }
.strip-group { display: flex; gap: 3px; min-width: 0; flex: 1 1 0; }
.seg { position: relative; flex: 1 1 0; min-width: 3px; height: 8px; border-radius: 3px; background: var(--seg-empty, var(--fill)); overflow: hidden; }
.seg > i { position: absolute; inset: 0 auto 0 0; background: var(--seg-cur, var(--prime)); }
.seg.is-done { background: var(--seg-done, var(--brand)); }
.seg.is-current { background: var(--seg-cur-bg, #F5C4EB); }
.seg.is-open > i { background: var(--seg-done, var(--brand)); opacity: .55; }
.seg.is-soon { background: transparent; box-shadow: inset 0 0 0 1.5px var(--seg-empty, var(--fill)); }
.strip-thin .seg { height: 6px; }
.strip-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.strip-legend span { display: inline-flex; align-items: center; gap: 6px; }
.strip-legend .seg { flex: none; width: 18px; }

/* ─────────── Бренд ─────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--num); font-weight: 700; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; color: var(--brand); }
.bm-bg { fill: var(--mark-bg, var(--prime)); }
.bm-fg { fill: var(--mark-fg, #fff); }
.side, .auth-brand { --mark-bg: #fff; --mark-fg: var(--brand); }
.side .brand-name, .auth-brand .brand-name, .night .brand-name { color: #fff; }

/* ═══════════════════════ Ўқувчи қисми ═══════════════════════ */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, calc((100% - 920px) / 2));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px 0 4px; margin-left: -4px; border-radius: 10px; font-weight: 600; color: var(--text-2); min-width: 0; }
.top-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-back:hover { background: var(--fill); color: var(--text); }
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.night .avatar { background: var(--fill); }
.me { position: relative; }
.me > summary { list-style: none; cursor: pointer; border-radius: 50%; }
.me > summary::-webkit-details-marker { display: none; }
.me-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30;
  width: min(280px, calc(100vw - 32px)); padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--pop);
  display: grid; gap: 12px;
}
.me-menu strong { display: block; font-size: 16px; line-height: 1.3; overflow-wrap: break-word; }
.me-menu span { color: var(--muted); font-size: 14px; }

.wrap { width: 100%; max-width: 952px; margin: 0 auto; padding: 22px 16px 64px; }
.wrap-narrow { max-width: 760px; }
.hello { font-size: 26px; margin-bottom: 18px; }
.section-title { font-size: 18px; margin: 30px 0 12px; }

/* Давом эттириш: саҳифадаги ягона тўқ панел */
.resume {
  display: grid; gap: 18px;
  padding: 22px; border-radius: var(--r-l);
  background: var(--ink); color: #fff;
}
.resume-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.resume-body { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: start; }
.resume-no { grid-row: span 2; font-size: 46px; font-weight: 700; line-height: 1; color: var(--prime-on-dark); padding-top: 2px; }
.resume-title { font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: break-word; }
.resume-sub { color: #E1D6FB; font-size: 15px; overflow-wrap: break-word; }
.resume-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.resume-foot .muted { color: #E1D6FB; font-size: 14.5px; }
.resume .strip { max-width: 420px; }

.tiles { display: grid; gap: 12px; }
.tile {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center;
  padding: 18px 18px 18px 22px; border-radius: var(--r-l);
  background: var(--card); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--hue); }
.tile:hover { border-color: var(--line-2); }
.tiles > :only-child { grid-column: 1 / -1; }
.tile-title { font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; }
.tile-meta { color: var(--muted); font-size: 14.5px; }
.tile-pct { grid-row: span 2; font-size: 26px; font-weight: 700; color: var(--brand); text-align: right; }
.tile-pct small { font-size: 14px; font-weight: 600; margin-left: 1px; }
.tile .strip { grid-column: 1 / -1; margin-top: 8px; }

.empty {
  display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 44px 24px; border-radius: var(--r-l);
  background: var(--card); border: 1.5px dashed var(--line-2); color: var(--text-2);
}
.empty h2 { font-size: 19px; color: var(--text); }
.empty .i { width: 34px; height: 34px; color: var(--muted); stroke-width: 1.6; }
.empty p { max-width: 46ch; }

/* Курс саҳифаси */
.course-head {
  display: grid; gap: 16px;
  padding: 22px; border-radius: var(--r-l);
  background: var(--brand-soft); border-top: 6px solid var(--hue);
}
.course-head h1 { font-size: 27px; overflow-wrap: break-word; }
.course-head p { color: var(--text-2); max-width: 62ch; }
.course-stats { display: flex; align-items: flex-end; gap: 10px 28px; flex-wrap: wrap; }
.course-pct { font-size: 44px; font-weight: 700; line-height: .95; color: var(--brand); }
.course-pct small { font-size: 20px; margin-left: 2px; }
.stat-pair { display: grid; gap: 1px; }
.stat-pair b { font-size: 17px; font-weight: 700; }
.stat-pair span { font-size: 13.5px; color: var(--text-2); }
.course-head .strip { --seg-empty: #fff; }
.course-head .btn { justify-self: start; }

.lessons { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.lesson + .lesson { border-top: 1px solid var(--line); }
.lesson > summary {
  display: grid; grid-template-columns: 46px 1fr auto 20px; gap: 4px 12px; align-items: center;
  padding: 16px 16px 16px 18px; cursor: pointer; list-style: none;
}
.lesson > summary::-webkit-details-marker { display: none; }
.lesson > summary:hover { background: var(--tint); }
.lesson-no { font-size: 22px; font-weight: 700; color: var(--brand); line-height: 1; }
.lesson-title { font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; }
.lesson-count { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.lesson-count .i { width: 18px; height: 18px; }
.lesson .chev { color: var(--muted); transition: transform .18s; }
.lesson[open] .chev { transform: rotate(180deg); }
.lesson > summary .strip { grid-column: 2 / 4; margin-top: 6px; max-width: 300px; }
.lesson.is-done .lesson-count { color: var(--brand); }
.lesson.is-soon .lesson-no, .lesson.is-locked .lesson-no { color: var(--line-2); }
.lesson.is-soon .lesson-title { color: var(--text-2); }

.topics { padding: 0 10px 12px; display: grid; gap: 2px; }
.topic {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  min-height: 52px; padding: 8px 10px 8px 8px; border-radius: 12px;
}
a.topic:hover { background: var(--fill); }
.topic-state { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--fill); color: var(--muted); }
.topic-state .i { width: 17px; height: 17px; }
.topic-name { font-weight: 500; line-height: 1.35; overflow-wrap: break-word; }
.topic-name small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.topic-time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.topic.is-done .topic-state { background: var(--brand-soft); color: var(--brand); }
.topic.is-current { background: var(--prime-soft); }
.topic.is-current .topic-state { background: var(--prime); color: #fff; }
.topic.is-current .topic-name { font-weight: 700; }
.topic.is-current .topic-time { color: var(--prime-ink); }
.topic.is-locked .topic-name, .topic.is-soon .topic-name { color: var(--muted); }
.topic.is-active { box-shadow: inset 0 0 0 2px var(--prime); }
.night .topic.is-current { background: rgba(240, 79, 208, .16); }
.night .topic.is-current .topic-time { color: var(--prime-on-dark); }
.night .topic.is-done .topic-state { background: rgba(169, 139, 255, .2); color: #C7B5FF; }
.night .lesson > summary:hover { background: transparent; }

/* ─────────── Кириш саҳифаси ─────────── */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.auth-brand {
  background: var(--ink); color: #fff;
  padding: 26px 22px 30px; display: grid; gap: 22px; align-content: start;
}
.auth-brand h1 { font-size: 27px; line-height: 1.18; max-width: 16ch; }
.auth-brand p { color: #E7DEFC; max-width: 40ch; }
.auth-courses { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-steps { display: none; gap: 14px; color: #F1EBFE; font-size: 15px; }
.auth-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.auth-steps .num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.18); color: #fff; font-size: 13px; font-weight: 700; }
.auth-form { padding: 28px 22px 40px; display: grid; align-content: start; justify-items: center; }
.auth-card { width: 100%; max-width: 400px; display: grid; gap: 18px; }
.auth-card h2 { font-size: 23px; }
.auth-card form { display: grid; gap: 16px; }
.input-code { font-family: var(--num); font-size: 26px; font-weight: 700; letter-spacing: .32em; text-align: center; padding-left: .32em; }
.input-phone { font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.auth-error { padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); color: #97202A; font-weight: 500; line-height: 1.45; }
.auth-test { padding: 12px 14px; border-radius: 12px; background: var(--prime-soft); color: var(--prime-ink); line-height: 1.45; }
.auth-test b { font-family: var(--num); font-size: 18px; letter-spacing: .12em; margin-left: 4px; }
.auth-foot { color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14.5px; }

/* ─────────── Видео саҳифаси ─────────── */
.watch { display: grid; gap: 22px; max-width: 1240px; margin: 0 auto; padding: 0 0 56px; }
.watch-main { min-width: 0; }
.watch-info { padding: 18px 16px 0; display: grid; gap: 14px; }
.watch-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; }
.watch-no { font-size: 15px; font-weight: 700; color: var(--prime-on-dark); }
.watch-info h1 { font-size: 23px; overflow-wrap: break-word; }
.watch-progress { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14.5px; }
.watch-progress .bar { flex: 1; max-width: 260px; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.watch-progress .bar i { display: block; height: 100%; width: 0; background: var(--prime); border-radius: 4px; transition: width .4s; }
.watch-progress.is-done .bar i { background: #B49CFF; }
.watch-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.watch-nav .btn-line { background: transparent; border-color: var(--line-2); }
.watch-nav .btn-line:hover { border-color: var(--text-2); }
.watch-hint { color: var(--muted); font-size: 14px; line-height: 1.5; }
.watch-side { padding: 0 16px; min-width: 0; }
.watch-side h2 { font-size: 16px; margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.watch-side h2 .num { color: var(--prime-on-dark); font-size: 15px; }
.watch-side .topics { padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); }
.watch-side .strip { margin-bottom: 12px; }

.player { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; }
.player:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.player:-webkit-full-screen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.pl-wm {
  position: absolute; z-index: 2; pointer-events: none;
  color: rgba(255,255,255,.3); font-size: clamp(11px, 1.5vw, 15px); font-weight: 600; white-space: nowrap;
  text-shadow: 0 0 3px rgba(0,0,0,.55); transition: top 1.2s, left 1.2s;
  top: 8%; left: 6%;
}
.pl-center {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  border: 0; background: transparent; padding: 0; color: #fff;
}
.pl-center span { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--prime); color: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.45); transition: transform .15s, opacity .2s; }
.pl-center .i { width: 32px; height: 32px; fill: currentColor; stroke: none; margin-left: 4px; }
.pl-center:hover span { transform: scale(1.06); }
.player.is-playing .pl-center span { opacity: 0; transform: scale(.8); }
.pl-spin { position: absolute; z-index: 3; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; display: none; pointer-events: none; }
.player.is-waiting .pl-spin { display: block; }
.player.is-waiting .pl-center span { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.pl-toast {
  position: absolute; z-index: 5; left: 50%; top: 14px; transform: translateX(-50%);
  max-width: calc(100% - 28px); padding: 8px 14px; border-radius: 10px;
  background: rgba(18, 10, 43, .92); color: #fff; font-size: 14px; font-weight: 500; text-align: center; line-height: 1.4;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.pl-toast.is-on { opacity: 1; }
.pl-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 26px 10px 8px; display: grid; gap: 2px;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
  transition: opacity .25s;
  pointer-events: none;   /* панелнинг бўш жойи остидаги «ижро» тугмасини тўсмайди */
}
.pl-bar > * { pointer-events: auto; }
.player.is-idle.is-playing .pl-bar { opacity: 0; }
.player.is-idle.is-playing .pl-bar > * { pointer-events: none; }
.player.is-idle.is-playing { cursor: none; }
.pl-seek { position: relative; height: 26px; cursor: pointer; touch-action: none; }
.pl-seek::before, .pl-reach, .pl-fill { content: ""; position: absolute; left: 0; top: 11px; height: 5px; border-radius: 3px; }
.pl-seek::before { right: 0; background: rgba(255,255,255,.22); }
.pl-reach { background: rgba(255,255,255,.42); width: 0; }
.pl-fill { background: var(--prime); width: 0; }
.pl-thumb { position: absolute; top: 6px; left: 0; width: 15px; height: 15px; margin-left: -7.5px; border-radius: 50%; background: var(--prime); box-shadow: 0 1px 6px rgba(0,0,0,.5); }
.pl-row { display: flex; align-items: center; gap: 2px; color: #fff; }
.pl-btn { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: #fff; font-weight: 700; font-size: 14px; }
@media (hover: hover) { .pl-btn:hover { background: rgba(255,255,255,.14); } }
.pl-btn:active { background: rgba(255,255,255,.14); }
.pl-btn .i { width: 22px; height: 22px; }
.pl-btn .fillable { fill: currentColor; stroke: none; }
.pl-time { font-size: 13.5px; font-variant-numeric: tabular-nums; padding: 0 8px; white-space: nowrap; color: #F1ECFF; }
.pl-end {
  position: absolute; inset: 0; z-index: 6; display: none; place-items: center; padding: 20px;
  background: rgba(18, 10, 43, .97); text-align: center;
}
.pl-end.is-on { display: grid; }
.pl-end div { display: grid; gap: 14px; justify-items: center; max-width: 440px; color: #fff; }
.pl-end b { font-size: 19px; line-height: 1.3; }
.pl-end span { color: #D2C8F3; font-size: 15px; }
.pl-error { position: absolute; inset: 0; z-index: 7; display: none; place-items: center; padding: 24px; background: #120A2B; color: #fff; text-align: center; line-height: 1.5; }
.pl-error.is-on { display: grid; }

/* ═══════════════════════ Админ панел ═══════════════════════ */
.adm { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.side {
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  position: sticky; top: 0; z-index: 25; overflow-x: auto; scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }
.side .brand-name { display: none; }
.side-nav { display: flex; gap: 2px; flex: 1; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 11px;
  color: #EBE3FD; font-weight: 600; font-size: 15px; white-space: nowrap;
  border: 0; background: none;
}
.side-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.side-link.is-on, .side-link.is-on:hover { background: #fff; color: var(--brand-deep); }
.side-link.is-on .i { color: var(--prime); }
.side-link span { display: none; }
.side-foot { display: flex; align-items: center; gap: 4px; }
.side-me { display: none; }
.adm-main { min-width: 0; padding: 20px 16px 72px; }
.adm-inner { max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; overflow-wrap: break-word; }
.page-head .sub { color: var(--text-2); margin-top: 6px; max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.crumbs a:hover { color: var(--text); }
.crumbs .i { width: 15px; height: 15px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel + .panel, .panel + .grid-2, .grid-2 + .panel, .note + .panel, .panel + .note, .stats + .panel, .stats + .grid-2 { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 17px; }
.panel-head p { color: var(--muted); font-size: 14px; }
.panel-body { padding: 18px 20px; }
.panel-body > * + * { margin-top: 14px; }
.panel-body > input[type=hidden] + * { margin-top: 0; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
.grid-2 > .panel { margin-top: 0; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-end { justify-content: flex-end; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); display: grid; gap: 4px; align-content: start; }
.stat b { font-family: var(--num); font-size: 27px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.stat span { font-size: 14px; color: var(--text-2); font-weight: 600; }
.stat small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.stat.is-warn b { color: var(--warn); }
.stat.is-ok b { color: var(--ok); }

.steps { display: grid; gap: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; }
.step + .step { border-top: 1px solid var(--line); }
.step-no { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--fill); color: var(--text-2); font-family: var(--num); font-weight: 700; font-size: 14px; }
.step.is-done .step-no { background: var(--ok-soft); color: var(--ok); }
.step b { display: block; font-weight: 700; }
.step small { color: var(--muted); font-size: 14px; }
.step.is-next .step-no { background: var(--prime); color: #fff; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--tint); }
.table th a:hover { color: var(--text); }
.table th a.is-on { color: var(--text); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--tint-2); }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.t-right { text-align: right; }
.t-name { display: block; min-width: 168px; font-weight: 600; line-height: 1.3; }
.t-name small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-pct { font-family: var(--num); font-weight: 700; font-size: 15px; letter-spacing: -.02em; white-space: nowrap; }
.t-sub td { background: var(--tint); }

/* Ўқувчи қатори: ҳар катак — битта мавзу */
.heat { display: flex; gap: 6px; align-items: center; }
.heat-group { display: flex; gap: 2px; }
.cell { width: 9px; height: 16px; border-radius: 2.5px; background: var(--fill); flex: none; }
.cell.l1 { background: color-mix(in srgb, var(--hue) 30%, #fff); }
.cell.l2 { background: color-mix(in srgb, var(--hue) 62%, #fff); }
.cell.l3 { background: var(--hue); }
.heat-group.is-soon .cell { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fill); }
.heat-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); align-items: center; }
.heat-legend span { display: inline-flex; gap: 6px; align-items: center; }

.meter { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.meter .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--hue); border-radius: 4px; }

/* Дарслар бўйича диаграмма */
.funnel { display: grid; gap: 9px; }
.funnel-row { display: grid; grid-template-columns: 30px minmax(0, 1.5fr) minmax(0, 1.7fr) 70px; gap: 12px; align-items: center; font-size: 14.5px; }
.funnel-no { font-family: var(--num); font-weight: 700; font-size: 13px; color: var(--hue); }
.funnel-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.funnel-bar { height: 22px; border-radius: 6px; background: var(--fill); overflow: hidden; }
.funnel-bar i { display: block; height: 100%; min-width: 2px; background: var(--hue); border-radius: 6px; }
.funnel-val { font-variant-numeric: tabular-nums; color: var(--text-2); text-align: right; white-space: nowrap; }
.funnel-row.is-soon .funnel-title, .funnel-row.is-soon .funnel-val { color: var(--muted); }
.funnel-row.is-soon .funnel-bar { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fill); }

/* Оқимга очиқ дарслар */
.gate { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gate button {
  min-width: 42px; height: 42px; padding: 0 6px; border-radius: 11px;
  border: 1.5px solid var(--line-2); background: var(--card); color: var(--muted);
  font-family: var(--num); font-weight: 700; font-size: 14px;
}
.gate button:hover { border-color: var(--brand); color: var(--brand); }
.gate button.is-open { background: var(--brand); border-color: var(--brand); color: #fff; }
.gate .gate-all { font-family: var(--font); font-size: 14.5px; font-weight: 600; padding: 0 14px; margin-left: 6px; }

/* Курс карточкалари (админ) */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
.ccard { display: grid; gap: 14px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); border-top: 6px solid var(--hue); }
.ccard:hover { border-color: var(--line-2); border-top-color: var(--hue); }
.ccard h2 { font-size: 20px; overflow-wrap: break-word; }
.ccard-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ccard-facts div { display: grid; gap: 1px; }
.ccard-facts b { font-family: var(--num); font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.ccard-facts span { font-size: 13px; color: var(--muted); }
.ccard-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Курс таҳрири: дарслар ва мавзулар */
.lib { display: grid; gap: 14px; margin-top: 18px; }
.lblock { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.lblock.is-hidden { background: var(--tint); }
.lblock-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; flex-wrap: wrap; }
.lblock-no { font-family: var(--num); font-weight: 700; font-size: 20px; color: var(--hue); min-width: 34px; }
.lblock-title { font-size: 17.5px; font-weight: 700; line-height: 1.3; flex: 1 1 220px; min-width: 0; overflow-wrap: break-word; }
.lblock-title small { display: block; font-size: 13.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.lblock-tools { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.trows { border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 10px 14px 10px 20px; }
.trow + .trow { border-top: 1px solid var(--line); }
.trow-no { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; font-weight: 600; }
.trow-title { font-weight: 600; line-height: 1.35; overflow-wrap: break-word; }
.trow-video { grid-column: 2; display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; min-height: 36px; }
.trow-tools { grid-column: 2; display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.trow-file { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.upbar { flex: 1 1 140px; max-width: 240px; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.upbar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .3s; }
.trow [data-show] { display: none; }
.trow[data-state="none"] [data-show~="none"],
.trow[data-state="queued"] [data-show~="queued"],
.trow[data-state="uploading"] [data-show~="uploading"],
.trow[data-state="processing"] [data-show~="processing"],
.trow[data-state="ready"] [data-show~="ready"],
.trow[data-state="failed"] [data-show~="failed"] { display: inline-flex; }
.trow[data-state="uploading"] .upbar[data-show], .trow[data-state="processing"] .upbar[data-show] { display: block; }
.lblock-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px 14px 20px; border-top: 1px solid var(--line); background: var(--tint); }
.lblock-empty { padding: 16px 20px; color: var(--muted); border-top: 1px solid var(--line); }
.drop-hint { font-size: 13.5px; color: var(--muted); }
.lblock.is-drag { outline: 3px dashed var(--hue); outline-offset: -3px; }
.queue {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(360px, calc(100vw - 32px));
  background: var(--ink); color: #fff; border-radius: var(--r-m); padding: 14px 16px; box-shadow: var(--pop);
  display: grid; gap: 8px;
}
.queue b { font-size: 15px; }
.queue span { font-size: 13.5px; color: #EBE3FD; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .upbar { max-width: none; background: rgba(255,255,255,.24); flex: none; }
.queue .upbar i { background: #fff; }

/* Оқим қаторлари */
.srows { display: grid; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 20px; }
.srow + .srow { border-top: 1px solid var(--line); }
.srow:hover { background: var(--tint-2); }
.srow-head, .srow-head:hover { background: var(--tint); }
.srow-name { font-weight: 700; font-size: 16.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.srow-facts { grid-column: 1 / -1; display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 14.5px; color: var(--text-2); align-items: center; }
.srow-facts b { color: var(--text); font-weight: 700; }
.srow-facts .meter { min-width: 160px; flex: 0 1 220px; }
.group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.group-head h2 { font-size: 18px; }

/* Диалог */
.dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--r-l); background: var(--card); color: var(--text); box-shadow: var(--pop); }
.dlg::backdrop { background: rgba(28, 16, 63, .5); }
.dlg-body { padding: 22px; display: grid; gap: 16px; }
.dlg-body h2 { font-size: 20px; padding-right: 30px; }
.dlg-body > p { color: var(--text-2); line-height: 1.5; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.dlg-x { position: absolute; top: 14px; right: 14px; }
.dlg-wide { width: min(880px, calc(100vw - 24px)); }
.dlg-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-m); display: block; }
.preview-count { font-size: 14px; font-weight: 600; color: var(--text-2); min-height: 21px; }
.preview-count.is-bad { color: var(--bad); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: break-word; }

.err-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.err-page div { display: grid; gap: 14px; justify-items: center; max-width: 440px; }
.err-code { font-size: 64px; font-weight: 700; color: var(--line-2); line-height: 1; }

/* ─────────── Кенг экранлар ─────────── */
@media (min-width: 620px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .hello { font-size: 30px; }
  .resume { padding: 28px; }
  .resume-no { font-size: 60px; }
  .resume-title { font-size: 25px; }
  .course-head { padding: 28px; }
  .course-head h1 { font-size: 32px; }
  .course-pct { font-size: 56px; }
  .trow { grid-template-columns: 40px minmax(0, 1.2fr) minmax(0, 1.4fr) auto; }
  .trow-video, .trow-tools { grid-column: auto; }
  .trow-tools { justify-content: flex-end; }
  .watch-info { padding: 20px 20px 0; }
  .watch-info h1 { font-size: 27px; }
  .watch-side { padding: 0 20px; }
}
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: 1fr; }
  .auth-brand { padding: 48px 56px; align-content: space-between; }
  .auth-brand h1 { font-size: 42px; }
  .auth-brand p { font-size: 17px; }
  .auth-steps { display: grid; }
  .auth-form { align-content: center; padding: 48px; }
  .grid-2 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .grid-2.even { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .adm { grid-template-columns: 236px minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; gap: 22px; padding: 22px 14px 16px; overflow: visible; }
  .side .brand { padding: 0 8px; }
  .side .brand-name { display: block; }
  .side-nav { flex-direction: column; gap: 3px; }
  .side-link span { display: inline; }
  .side-foot { flex-direction: column; align-items: stretch; gap: 3px; border-top: 1px solid rgba(255,255,255,.22); padding-top: 12px; }
  .side-me { display: block; padding: 4px 12px 8px; font-size: 13.5px; color: #D9CCFA; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .adm-main { padding: 32px 36px 80px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .watch { grid-template-columns: minmax(0, 1fr) 360px; padding: 22px 24px 64px; align-items: start; }
  .watch-main .player { border-radius: var(--r-m); }
  .watch-info { padding: 20px 0 0; }
  .watch-side { padding: 0; position: sticky; top: 78px; }
}
@media (max-width: 619px) {
  .funnel-row { grid-template-columns: 26px minmax(0, 1fr) 64px; }
  .funnel-bar { grid-column: 2 / 4; grid-row: 2; height: 12px; }
  .pl-btn.hide-xs { display: none; }
  .table { font-size: 14.5px; }
  /* Телефонда катта «ижро» тугмаси вақт чизиғини тўсмаслиги учун кичикроқ ва сал юқорироқ туради */
  .pl-center { padding-bottom: 34px; }
  .pl-center span { width: 62px; height: 62px; }
  .pl-center .i { width: 27px; height: 27px; }
  .pl-spin { margin-top: -40px; }
}
@media (pointer: coarse) {
  /* Бармоқ билан суриш осон бўлиши учун вақт чизиғининг майдони баландроқ */
  .pl-seek { height: 34px; }
  .pl-seek::before, .pl-reach, .pl-fill { top: 15px; }
  .pl-thumb { top: 9px; width: 17px; height: 17px; margin-left: -8.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Тўлдирилган белгилар (масалан, ▶) */
.i-fill { fill: currentColor; stroke: none; }

/* Иккитадан бирини танлаш */
.radio .knob { width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); margin-top: 0; }
.radio .knob::after { top: 5px; left: 5px; width: 10px; height: 10px; background: var(--brand); box-shadow: none; transform: scale(0); }
.radio input:checked + .knob { background: var(--card); border-color: var(--brand); }
.radio input:checked + .knob::after { transform: scale(1); }

/* Изоҳли вариантлардан бирини танлаш */
.choices { min-width: 0; margin-left: 0; margin-right: 0; padding: 0; border: 0; }
.choices legend { padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.choices .switch + .switch { margin-top: 12px; }
.panel-body > .choices, .panel-body > .choices + * { margin-top: 22px; }

/* Видео саҳифасида юқори панел видео билан бир текисда туради */
.top-wide { padding-left: max(16px, calc((100% - 1192px) / 2)); padding-right: max(16px, calc((100% - 1192px) / 2)); }
.wide-only { display: none; }
@media (min-width: 620px) { .wide-only { display: inline; } }
@media (max-width: 899px) {
  .auth-brand { gap: 16px; padding-bottom: 24px; }
  .auth-brand h1 { font-size: 23px; max-width: 20ch; }
  .auth-brand p { display: none; }
}


/* ═══════════════════════ Дизайн вариантлари ═══════════════════════
   Юқоридаги ранглар «Бинафша» вариантига тегишли. Қуйидагилар уларни ўзгартиради.
   Сайт одатда «Оқ» вариантда очилади; бошқаси «Созламалар → Сайт дизайни» да танланади. */

/* ── 1. Оқ: ҳамма юза оқ, тугмалар бинафша, пушти фақат «ҳозирги жой» учун ── */
:root[data-theme="white"] { --paper: #FCFBFF; }
[data-theme="white"] .btn-prime { background: var(--brand); color: #fff; }
[data-theme="white"] .btn-prime:hover { background: var(--brand-deep); }
[data-theme="white"] .btn-ink { background: var(--text); }
[data-theme="white"] .btn-ink:hover { background: #33215F; }
[data-theme="white"] .side { background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--line); --mark-bg: var(--prime); --mark-fg: #fff; }
[data-theme="white"] .side .brand-name { color: var(--brand); }
[data-theme="white"] .side-link { color: var(--text-2); }
[data-theme="white"] .side-link:hover { background: var(--fill); color: var(--text); }
[data-theme="white"] .side-link.is-on, [data-theme="white"] .side-link.is-on:hover { background: var(--brand-soft); color: var(--brand-deep); }
[data-theme="white"] .side-me { color: var(--muted); }
[data-theme="white"] .side-foot { border-top-color: var(--line); }
[data-theme="white"] .resume {
  background: var(--brand-soft); color: var(--text);
  --seg-empty: #fff; --seg-done: var(--brand); --seg-cur-bg: #F5C4EB; --seg-cur: var(--prime);
}
[data-theme="white"] .resume-no { color: var(--prime); }
[data-theme="white"] .resume-sub, [data-theme="white"] .resume-foot .muted { color: var(--text-2); }
[data-theme="white"] .resume .chip-ink, [data-theme="white"] .auth-brand .chip-ink { background: #fff; color: var(--brand-deep); }
[data-theme="white"] .resume .btn-prime { background: var(--brand); color: #fff; }
[data-theme="white"] .resume .btn-prime:hover { background: var(--brand-deep); }
[data-theme="white"] .auth-brand { background: var(--brand-soft); color: var(--text); --mark-bg: var(--prime); --mark-fg: #fff; }
[data-theme="white"] .auth-brand .brand-name { color: var(--brand); }
[data-theme="white"] .auth-brand p, [data-theme="white"] .auth-steps { color: var(--text-2); }
[data-theme="white"] .auth-steps .num { background: #fff; color: var(--prime); }
[data-theme="white"] .step.is-next .step-no { background: var(--brand); }

/* ── 2. Градиент: логотипдаги каби пуштидан бинафшага ўтиш ── */
:root[data-theme="gradient"] {
  --grad: linear-gradient(115deg, #DC1CB8 0%, #A326CB 46%, #6C30DC 100%);
}
[data-theme="gradient"] .side { background: linear-gradient(172deg, #B824C2 0%, #7A2FD9 34%, #5622BF 100%); }
[data-theme="gradient"] .resume, [data-theme="gradient"] .auth-brand {
  background: var(--grad);
  --seg-empty: rgba(255, 255, 255, .26); --seg-done: #fff; --seg-cur-bg: rgba(255, 255, 255, .55); --seg-cur: #fff;
}
[data-theme="gradient"] .resume-no { color: #fff; }
[data-theme="gradient"] .resume-sub, [data-theme="gradient"] .resume-foot .muted, [data-theme="gradient"] .auth-brand p { color: #F6E9FB; }
[data-theme="gradient"] .chip-ink { background: rgba(255, 255, 255, .22); }
[data-theme="gradient"] .btn-prime { background: var(--grad); color: #fff; }
[data-theme="gradient"] .btn-prime:hover { filter: brightness(.93); }
[data-theme="gradient"] .on-ink .btn-prime { background: #fff; color: var(--brand-deep); filter: none; }
[data-theme="gradient"] .course-head { background: linear-gradient(115deg, #FCE7F7 0%, #F0EAFD 62%); }
[data-theme="gradient"] .course-pct, [data-theme="gradient"] .tile-pct {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="gradient"] .avatar, [data-theme="gradient"] .pl-center span,
[data-theme="gradient"] .topic.is-current .topic-state, [data-theme="gradient"] .step.is-next .step-no { background: var(--grad); }

/* ── 3. Тунги: тўқ фон, ёрқин пушти ва бинафша ── */
:root[data-theme="dark"] {
  --text: #F5F1FF; --text-2: #D2C8F3; --muted: #9F92CF;
  --paper: #120A2B; --card: #1C1142; --line: #30206A; --line-2: #45339A; --fill: #2A1B5E;
  --tint: #21154D; --tint-2: #251858;
  --brand: #A283FF; --brand-soft: #2C1D66;
  --prime-soft: #3B1247; --prime-ink: #FFB8EE;
  --ok: #56D9A0; --ok-soft: #12382F;
  --bad: #FF8590; --bad-soft: #47162B;
  --warn: #FFB565; --warn-soft: #45290F;
  --hue: #A283FF;
  --pop: 0 24px 60px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
[data-theme="dark"] .side { background: #160C36; box-shadow: 0 0 0 1px var(--line); }
[data-theme="dark"] .side-link.is-on, [data-theme="dark"] .side-link.is-on:hover { background: var(--ink); color: #fff; }
[data-theme="dark"] .side-link.is-on .i { color: var(--prime-on-dark); }
[data-theme="dark"] .flash { color: #A5F2CF; }
[data-theme="dark"] .flash-bad, [data-theme="dark"] .auth-error { color: #FFC0C6; }
[data-theme="dark"] .flash-info { color: var(--prime-ink); }
[data-theme="dark"] .btn-danger:hover { background: #5C1D38; }
[data-theme="dark"] .chip-hue { background: color-mix(in srgb, var(--hue) 26%, transparent); color: color-mix(in srgb, var(--hue) 45%, #fff); }
[data-theme="dark"] .cell.l1 { background: color-mix(in srgb, var(--hue) 38%, var(--card)); }
[data-theme="dark"] .cell.l2 { background: color-mix(in srgb, var(--hue) 68%, var(--card)); }
[data-theme="dark"] .course-head .strip { --seg-empty: rgba(255, 255, 255, .14); }
[data-theme="dark"] .lblock-no, [data-theme="dark"] .funnel-no { color: color-mix(in srgb, var(--hue) 55%, #fff); }
[data-theme="dark"] .seg.is-current { background: var(--seg-cur-bg, rgba(240, 79, 208, .42)); }
[data-theme="dark"] .gate button.is-open { background: var(--ink); border-color: var(--ink); }
[data-theme="dark"] .switch .knob::after { background: #F5F1FF; }
[data-theme="dark"] .dlg::backdrop { background: rgba(5, 2, 15, .66); }
[data-theme="dark"] .brand-name { color: #fff; }
[data-theme="dark"] .lesson.is-soon .lesson-no, [data-theme="dark"] .lesson.is-locked .lesson-no { color: var(--line-2); }

/* ── 4. Контраст: тўқ ён панел, пушти карточка, бинафша тугмалар ── */
:root[data-theme="contrast"] { --ink: #1C103F; --ink-2: #2E1D63; }
[data-theme="contrast"] .side, [data-theme="contrast"] .auth-brand { --mark-bg: var(--prime); --mark-fg: #fff; }
[data-theme="contrast"] .side-link.is-on, [data-theme="contrast"] .side-link.is-on:hover { background: var(--prime); color: #fff; }
[data-theme="contrast"] .side-link.is-on .i { color: #fff; }
[data-theme="contrast"] .resume {
  background: var(--prime);
  --seg-empty: rgba(255, 255, 255, .28); --seg-done: #fff; --seg-cur-bg: rgba(255, 255, 255, .58); --seg-cur: #fff;
}
[data-theme="contrast"] .resume-no { color: #fff; }
[data-theme="contrast"] .resume-sub, [data-theme="contrast"] .resume-foot .muted { color: #FCE3F6; }
[data-theme="contrast"] .resume .chip-ink { background: rgba(255, 255, 255, .22); }
[data-theme="contrast"] .on-ink .btn-prime { background: #fff; color: var(--prime-deep); }
[data-theme="contrast"] .on-ink .btn-prime:hover { background: var(--prime-soft); }
[data-theme="contrast"] .btn-prime { background: var(--brand); color: #fff; }
[data-theme="contrast"] .btn-prime:hover { background: var(--brand-deep); }
[data-theme="contrast"] .avatar { background: var(--brand); }
[data-theme="contrast"] .auth-steps .num { color: var(--prime-on-dark); }
[data-theme="contrast"] .step.is-next .step-no { background: var(--brand); }
