/* ===================== MTA o‘quv platformasi ===================== */
:root {
  --bg: #f3f5fa; --surface: #ffffff; --surface-2: #f6f8fc; --surface-3: #eef1f8;
  --border: #e1e6ef; --border-2: #cfd6e4;
  --text: #142033; --muted: #5d6a80; --faint: #8a95a8;
  --primary: #2447d6; --primary-2: #1a36a8; --primary-soft: #e7ecff; --on-primary: #fff;
  --accent-soft: rgba(36, 71, 214, .08);
  --violet: #6d28d9; --violet-soft: rgba(109, 40, 217, .09); --orange: #c2410c; --orange-soft: rgba(194, 65, 12, .09); --info: #0e7490; --info-soft: #e3f4f8;
  --ok: #10894a; --ok-soft: #e2f5ea; --warn: #b36b00; --warn-soft: #fff3da; --err: #c42f3a; --err-soft: #fde8ea;
  --code-bg: #0f1a2e; --code-text: #dfe7f5; --code-border: #1d2a44;
  --s1: #2447d6; --s2: #0e9f6e; --s3: #d97706; --s4: #9333ea; --s5: #0891b2; --s6: #dc2626; --s7: #db2777; --s8: #65a30d;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 40px rgba(16, 24, 40, .14);
  --radius: 14px; --radius-sm: 9px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
  --pc: 26px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a1120; --surface: #111a2c; --surface-2: #152036; --surface-3: #1a2740;
  --border: #22314b; --border-2: #2e3f5e;
  --text: #e5ebf6; --muted: #9aa7bd; --faint: #6f7d95;
  --primary: #6b8bff; --primary-2: #8aa3ff; --primary-soft: rgba(107, 139, 255, .15); --on-primary: #0a1120;
  --accent-soft: rgba(107, 139, 255, .12);
  --violet: #b39dfb; --violet-soft: rgba(179, 157, 251, .14); --orange: #fb923c; --orange-soft: rgba(251, 146, 60, .14); --info: #4cc9e6; --info-soft: rgba(76, 201, 230, .12);
  --ok: #3ccf85; --ok-soft: rgba(60, 207, 133, .13); --warn: #f0b14a; --warn-soft: rgba(240, 177, 74, .13); --err: #ff6b76; --err-soft: rgba(255, 107, 118, .13);
  --code-bg: #0a1322; --code-border: #1f2c45;
  --s1: #6b8bff; --s2: #34d399; --s3: #fbbf24; --s4: #c084fc; --s5: #22d3ee; --s6: #f87171; --s7: #f472b6; --s8: #a3e635;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 18px rgba(0, 0, 0, .25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.12rem; } h4 { font-size: 1rem; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
code, pre, .mono { font-family: var(--mono); }
:not(pre) > code { background: var(--surface-3); border: 1px solid var(--border); padding: .08em .38em; border-radius: 5px; font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.muted { color: var(--muted); } .tiny { font-size: .8rem; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.small { font-size: .9em; }
button { font: inherit; }
/* Kod belgilari asl holicha: != <= >= == -> kabi juftliklar ligaturaga (≠ ≤ ≥ →) aylanmasin (JetBrains Mono, Inter) */
*, *::before, *::after { font-variant-ligatures: none !important; font-feature-settings: "liga" 0, "calt" 0, "dlig" 0 !important; }

/* ---------- tugmalar va maydonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; transition: .15s; text-decoration: none !important; white-space: nowrap; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: var(--on-primary); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--err); border-color: var(--err); background: transparent; }
.btn.sm { padding: 6px 12px; font-size: .88rem; }
.btn.xs { padding: 2px 8px; font-size: .75rem; border-radius: 6px; }
.btn.block { width: 100%; }
.btn.icon { padding: 7px 11px; min-width: 38px; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; }
.btn.disabled:hover { border-color: var(--border-2); color: var(--text); }
.inp { width: 100%; padding: 9px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.inp.sm { width: auto; padding: 5px 9px; font-size: .9rem; }
textarea.inp { resize: vertical; line-height: 1.45; }
.inp.mono { font-family: var(--mono); font-size: .88rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }
/* Mashg‘ulot turlari: Ma’ruza — ko‘k, Mashg‘ulot — binafsha, Amaliy — to‘q sariq (yashil — faqat «bajarildi») */
.chip.lec { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip.grp { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.chip.pra { background: var(--orange-soft); color: var(--orange); border-color: transparent; }
.chip.ghost { background: transparent; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2.tight { gap: 12px; }
.grid2.top { align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guided > *, .quiz-list > *, .ord > *, .match > *, .opts > *, .grid2 > *, .grid3 > *, .cols2 > *, .cols3 > *, .cols4 > *, .pr-wrap > *, .io-pair > *, .pt > *, .lgrid > *, .sl-body > * { min-width: 0; }
.pgrid, .sv-grid, .mgrid { max-width: 100%; }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.form label .inp { margin-top: 5px; font-weight: 400; }
.form-err { color: var(--err); min-height: 1.2em; font-size: .9rem; margin: -4px 0 10px; }

/* ---------- toast ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { padding: 11px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 500; transform: translateY(12px); opacity: 0; transition: .25s; max-width: 380px; border-left: 4px solid var(--primary); }
.toast.show { transform: none; opacity: 1; }
.toast.ok { border-left-color: var(--ok); } .toast.warn { border-left-color: var(--warn); } .toast.err { border-left-color: var(--err); }

/* ---------- boot / logo ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 12px; justify-items: center; }
.logo { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #4f7dff, #22c3e6); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .04em; }
.logo.big { width: 72px; height: 72px; border-radius: 18px; font-size: 1.3rem; }
.logo-svg { width: 100%; height: 100%; display: block; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.brand-t small { color: var(--muted); font-size: .78rem; }
.tb-right { display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 3px 12px 3px 3px; cursor: pointer; color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.u-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.user-menu.open .menu { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 8px; border: 0; background: none; color: var(--text); cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--surface-3); }
.menu-h { padding: 8px 12px 10px; font-weight: 700; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-h small { display: block; font-weight: 400; color: var(--muted); }

.container { max-width: 1180px; margin: 0 auto; padding: 24px; }
.container.wide { max-width: 1440px; }
.foot { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; padding: 26px; color: var(--faint); font-size: .82rem; }
.foot a { color: var(--faint); }
.creator b { color: var(--muted); font-weight: 600; }
.auth-creator { margin-top: 14px; text-align: center; color: var(--faint); font-size: .82rem; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: radial-gradient(1200px 600px at 0% 0%, rgba(8, 145, 178, .35), transparent 60%), linear-gradient(150deg, #1b2f8f, #102063 60%, #0b1646); color: #eef2ff; padding: 64px clamp(24px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; }
.auth-hero h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 22px 0 10px; }
.auth-hero p { color: #c8d2f5; font-size: 1.05rem; }
.auth-feat { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.auth-feat li { display: flex; gap: 14px; align-items: flex-start; color: #dbe3ff; }
.auth-feat li > b { flex: none; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; }
.auth-rule { margin-top: 10px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); color: #e2e8ff; }
.auth-card { align-self: center; justify-self: center; width: min(440px, calc(100% - 32px)); margin: 32px 0; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-3); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tabs2 a { text-align: center; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs2 a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.mode-note { margin-top: 14px; font-size: .8rem; color: var(--muted); padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.mode-note.server { color: var(--primary); background: var(--primary-soft); }

/* ---------- dashboard ---------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: linear-gradient(120deg, var(--surface) 55%, var(--primary-soft)); }
.hero h1 { margin: 2px 0 14px; }
.hero-stats { display: flex; gap: 28px; margin-bottom: 18px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 1.4rem; }
.hero-stats span { color: var(--muted); font-size: .82rem; }
.hero-r { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 8px; }
.rules > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: .88rem; color: var(--muted); }
.rules b { color: var(--text); font-size: 1.05rem; margin-right: 4px; }
.rules .rule-pass { background: var(--primary-soft); color: var(--text); border-color: transparent; }
.module { margin-top: 28px; }
.mod-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.mod-kick { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--primary); }
.mod-head h2 { margin: 2px 0 0; }
/* Yig‘iladigan mavzular: kirishda yopiq — faqat nomi va foizi; sarlavhani bosib ochiladi */
.mod-toggle { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; }
.mod-toggle:hover { border-color: color-mix(in srgb, var(--acc, var(--primary)) 50%, var(--border)); }
.mod-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--acc, var(--primary)) 45%, transparent); outline-offset: 2px; }
.mod-sub { margin-top: 4px; }
.mod-prog { display: flex; align-items: center; gap: 12px; flex: none; }
.mod-chev { width: 12px; height: 12px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin: -6px 4px 0; opacity: .6; transition: transform .2s; }
.module.collapsed .mod-chev { transform: rotate(-45deg); margin-top: 0; }
.module.collapsed .lgrid { display: none; }
.module.collapsed .mod-head { margin-bottom: 0; }
.module { margin-top: 16px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lcard { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; position: relative; }
.lcard:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.lcard.done { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.lcard.locked { opacity: .62; cursor: not-allowed; }
.lcard.locked:hover { transform: none; border-color: var(--border); box-shadow: var(--shadow); }
.lc-top { display: flex; align-items: center; justify-content: space-between; }
.lc-num { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-weight: 800; display: grid; place-items: center; }
.lcard.done .lc-num { background: var(--ok-soft); color: var(--ok); }
.lc-title { font-weight: 700; line-height: 1.35; flex: 1; }
.lc-parts { display: grid; gap: 6px; }
.lc-foot { display: flex; align-items: center; gap: 12px; }
.lc-status { font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.lcard.done .lc-status { color: var(--ok); }
.pbar-l { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.pbar-l b { color: var(--text); font-weight: 600; }
.pbar-t { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pbar-f { height: 100%; border-radius: 99px; background: var(--primary); transition: width .4s; }
.pbar-f.full { background: var(--ok); }
.ring-bg { fill: none; stroke: var(--surface-3); }
.ring-fg { fill: none; stroke: var(--faint); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring.mid .ring-fg { stroke: var(--primary); }
.ring.ok .ring-fg { stroke: var(--ok); }
.ring-t { fill: var(--text); font-weight: 800; font-family: var(--font); }

/* ---------- dars sahifasi ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: .88rem; margin-bottom: 12px; flex-wrap: wrap; }
/* «Yo‘l» qismlari — yumaloq ramka (pill), fan ichida fan rangida; ajratgich «›» oddiy */
.crumbs > :nth-child(odd) { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .02em; line-height: 1.5; padding: 3px 12px; border-radius: 999px;
  color: var(--acc, var(--primary)); background: color-mix(in srgb, var(--acc, var(--primary)) 13%, transparent); }
.crumbs > a:nth-child(odd):hover { text-decoration: none; background: color-mix(in srgb, var(--acc, var(--primary)) 24%, transparent); }
.crumbs > :nth-child(even) { color: var(--faint); }
.lhead { display: flex; justify-content: space-between; gap: 28px; }
.lh-chips { display: flex; gap: 8px; margin-bottom: 10px; }
.lhead h1 { font-size: 1.55rem; margin-bottom: 12px; }
.lh-q summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.lh-q ol { margin: 8px 0 0; padding-left: 22px; color: var(--muted); }
.lh-q li { margin: 4px 0; }
.lh-prog { display: flex; gap: 18px; align-items: center; flex: none; width: 400px; }
.lh-bars { flex: 1; display: grid; gap: 8px; }
.ltabs { display: grid; grid-template-columns: repeat(var(--tabs, 3), minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.ltabs a { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; text-decoration: none; transition: .15s; }
.ltabs a:hover { border-color: var(--primary); }
.ltabs a.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-lg); }
.lt-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-size: .85rem; flex: none; }
.ltabs a.active .lt-n { background: rgba(255, 255, 255, .22); color: inherit; }
.lt-name { flex: 1; }
.lt-pct { font-size: .82rem; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.lt-pct.full { background: var(--ok-soft); color: var(--ok); }
.ltabs a.active .lt-pct { background: rgba(255, 255, 255, .2); color: inherit; }
.lnav { display: flex; justify-content: space-between; margin-top: 26px; }
.next-step { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; background: var(--primary-soft); border-color: transparent; }
.locked-card { text-align: center; max-width: 560px; margin: 40px auto; }
.big-lock svg { width: 54px; height: 54px; color: var(--faint); }

/* ---------- taqdimot ---------- */
.deck-wrap { display: grid; grid-template-columns: 1fr 270px; gap: 16px; align-items: start; }
.deck-wrap.toc-hidden { grid-template-columns: 1fr; }
.deck-wrap.toc-hidden .deck-toc { display: none; }
.deck-main { min-width: 0; }
.deck { container-type: inline-size; aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; position: relative; outline: none; }
.deck-stage { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; }
.slide { min-height: 100%; display: flex; flex-direction: column; padding: 3.2cqw 4.2cqw 2.4cqw; font-size: clamp(12px, 1.72cqw, 34px); line-height: 1.5; }
.slide.enter { animation: slideIn .35s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.sl-head { margin-bottom: 1.1em; }
.sl-kicker { display: block; font-size: .68em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: .25em; }
.sl-head h2 { font-size: 1.85em; margin: 0; }
.sl-body { flex: 1; display: grid; gap: 1.6em; align-content: start; }
.sl-split .sl-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: start; }
.sl-wide .sl-body { grid-template-columns: 1fr; }
.sl-foot { display: flex; justify-content: space-between; color: var(--faint); font-size: .62em; margin-top: 1.4em; padding-top: .8em; border-top: 1px solid var(--border); }
.slide ul, .slide ol { margin: 0 0 .6em; padding-left: 1.25em; }
.slide li { margin: .28em 0; }
.slide .code pre { font-size: .8em; }
.slide .tbl { font-size: .86em; }
.slide p { margin: 0 0 .6em; }
.sl-title { justify-content: center; background: radial-gradient(900px 500px at 100% 0%, rgba(8, 145, 178, .28), transparent 60%), linear-gradient(140deg, #1b2f8f, #0f1f5f 65%, #0b1646); color: #eef2ff; }
.sl-title-inner { max-width: 82%; }
.sl-org { font-size: .8em; letter-spacing: .14em; text-transform: uppercase; color: #9fb3ff; font-weight: 700; }
.sl-type { margin-top: 1.4em; display: inline-block; padding: .3em .9em; border-radius: 99px; background: rgba(255, 255, 255, .12); font-size: .82em; font-weight: 600; }
.sl-title h1 { font-size: 2.6em; margin: .5em 0 .4em; line-height: 1.15; }
.sl-sub { font-size: 1.1em; color: #c9d4ff; }
.sl-module { margin-top: 2em; font-size: .8em; color: #9fb3ff; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 1em; }
.sl-section { justify-content: center; background: linear-gradient(135deg, var(--surface) 40%, var(--primary-soft)); }
.sl-sec-inner { display: flex; align-items: center; gap: 1.4em; }
.sl-sec-num { font-size: 5em; font-weight: 800; color: var(--primary); line-height: 1; opacity: .9; }
.sl-sec-kick { font-size: .75em; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.sl-section h2 { font-size: 2.2em; margin: .2em 0; }
.sl-section p { color: var(--muted); font-size: 1.05em; }
.deck-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.d-progress { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.d-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--s5)); transition: width .3s; }
.d-count { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.deck-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-height: calc(100vh - 120px); overflow: auto; position: sticky; top: 76px; }
.toc-h { font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.deck-toc ol { list-style: none; margin: 0; padding: 6px; }
.deck-toc li { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: .84rem; color: var(--muted); }
.deck-toc li:hover { background: var(--surface-3); }
.deck-toc li.cur { background: var(--primary-soft); color: var(--text); font-weight: 600; }
.deck-toc li.sec { color: var(--text); font-weight: 700; margin-top: 4px; }
.toc-n { font-variant-numeric: tabular-nums; min-width: 20px; color: var(--faint); font-size: .78rem; }
.toc-t { flex: 1; }
.toc-seen { color: var(--ok); visibility: hidden; font-weight: 700; }
.deck-toc li.seen .toc-seen { visibility: visible; }
.deck-main:fullscreen { background: var(--bg); padding: 14px; display: flex; flex-direction: column; justify-content: center; }
.deck-main:fullscreen .deck { width: min(100%, calc((100vh - 80px) * 16 / 9)); margin: 0 auto; }
.deck-main:fullscreen .deck-bar { width: min(100%, calc((100vh - 80px) * 16 / 9)); margin: 12px auto 0; }

/* Slayd ichidagi elementlar */
.pts { list-style: none; padding: 0 !important; }
.pts > li { position: relative; padding-left: 1.3em; }
.pts > li::before { content: ''; position: absolute; left: .2em; top: .62em; width: .45em; height: .45em; border-radius: 2px; background: var(--primary); }
.box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .8em 1em; }
.note, .tip, .warn, .def { border-radius: 12px; padding: .75em 1em; margin: .6em 0; border-left: 4px solid; }
.note { background: var(--primary-soft); border-color: var(--primary); }
.tip { background: var(--info-soft); border-color: var(--info); }
.warn { background: var(--warn-soft); border-color: var(--warn); }
.def { background: var(--surface-2); border-color: var(--s4); }
.note b:first-child, .tip b:first-child, .warn b:first-child, .def b:first-child { display: inline; }
.formula { text-align: center; font-size: 1.2em; font-weight: 600; padding: .5em; margin: .4em 0; font-family: 'Cambria Math', 'Times New Roman', serif; }
.big { font-size: 1.3em; font-weight: 700; }
.hl { color: var(--primary); font-weight: 700; }
.ok-t { color: var(--ok); font-weight: 600; } .warn-t { color: var(--warn); font-weight: 600; } .err-t { color: var(--err); font-weight: 600; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.cols4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8em; }
.tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .8em 1em; }
.tile h4 { margin: 0 0 .3em; font-size: 1em; color: var(--primary); }
.tile p { margin: 0; font-size: .92em; color: var(--muted); }
.timeline { display: grid; gap: .45em; border-left: 3px solid var(--primary-soft); padding-left: 1em; }
.timeline div { position: relative; }
.timeline div::before { content: ''; position: absolute; left: -1.42em; top: .45em; width: .7em; height: .7em; border-radius: 50%; background: var(--primary); }
.timeline b { color: var(--primary); display: inline-block; min-width: 5.4em; }
.quote { font-style: italic; border-left: 3px solid var(--s3); padding: .3em 1em; color: var(--muted); }

/* ---------- jadvallar ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: .45em .7em; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tbl th { background: var(--surface-2); font-weight: 700; font-size: .92em; }
.tbl.small { font-size: .84rem; }
.tbl td.c, .tbl th.c { text-align: center; }

/* ---------- kod ---------- */
.code { position: relative; background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 12px; overflow: hidden; margin: .5em 0; color: var(--code-text); }
.code-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--code-border); background: rgba(255, 255, 255, .03); }
.code-title { font-size: .78em; color: #9fb0cc; font-family: var(--mono); flex: 1; }
.code-copy { border: 0; background: rgba(255, 255, 255, .06); color: #9fb0cc; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: .85rem; }
.code-copy:hover { color: #fff; }
.code-copy.floating { position: absolute; right: 8px; top: 8px; opacity: 0; transition: .15s; }
.code:hover .code-copy.floating { opacity: 1; }
.code pre { margin: 0; padding: .9em 1.1em; overflow: auto; font-size: .86rem; line-height: 1.55; tab-size: 4; }
.c-kw { color: #c792ea; } .c-ty { color: #7fdbca; } .c-bi { color: #82aaff; } .c-fn { color: #ffcb6b; } .c-str { color: #c3e88d; } .c-num { color: #f78c6c; } .c-com { color: #6b7d99; font-style: italic; } .c-pre { color: #ff9cac; }

/* ---------- tushuntirish va vazifalar ---------- */
.guided { display: grid; gap: 18px; }
.guided-intro { margin-bottom: 18px; background: var(--surface-2); }
.explain-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); border-top: 4px solid var(--s5); }
.ex-head { margin-bottom: 10px; }
.ex-badge { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--s5); }
.ex-head h3 { margin: 4px 0 0; font-size: 1.2rem; }
.ex-body ul, .ex-body ol { padding-left: 1.3em; }
.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); border-left: 4px solid var(--primary); }
.task-card.done { border-left-color: var(--ok); }
.tk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tk-badge { font-weight: 800; color: var(--primary); }
.task-card.done .tk-badge { color: var(--ok); }
.tk-type { font-size: .78rem; color: var(--muted); background: var(--surface-3); padding: 2px 9px; border-radius: 99px; }
.tk-st { margin-left: auto; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.tk-st.ok { background: var(--ok-soft); color: var(--ok); } .tk-st.part { background: var(--warn-soft); color: var(--warn); } .tk-st.bad { background: var(--err-soft); color: var(--err); } .tk-st.wait { background: var(--surface-3); color: var(--muted); }
.tk-q { font-weight: 500; margin-bottom: 10px; }
.tk-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.tk-inrow { display: flex; align-items: center; gap: 10px; max-width: 420px; }
.tk-fb { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: .94rem; }
.tk-fb.ok { background: var(--ok-soft); } .tk-fb.err { background: var(--err-soft); }
.tk-explain { margin-top: 6px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: .12s; background: var(--surface); }
.opt:hover { border-color: var(--primary); }
.opt input { margin-top: 5px; accent-color: var(--primary); }
.opt-l { font-weight: 700; color: var(--muted); min-width: 16px; }
.opt-t { flex: 1; }
.opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--err); background: var(--err-soft); }
.fill-code { margin: 0; padding: 1em 1.1em; overflow: auto; font-size: .88rem; line-height: 1.9; color: var(--code-text); }
.blank { font: inherit; font-family: var(--mono); background: rgba(255, 255, 255, .1); color: #fff; border: 1px dashed #7d93c9; border-radius: 5px; padding: 0 4px; margin: 0 2px; min-width: 3ch; }
.blank:focus { outline: none; border-style: solid; border-color: #9fb3ff; background: rgba(107, 139, 255, .2); }
.blank.bad { border-color: #ff6b76; background: rgba(255, 107, 118, .18); }
.blank:disabled { border-style: solid; border-color: #3ccf85; color: #b8f5d4; }
.ord { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ord-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-border); border-radius: 9px; cursor: grab; }
.ord-item code { flex: 1; min-width: 0; white-space: pre; background: none; border: 0; padding: 0; font-size: .86rem; color: inherit; overflow-x: auto; }
.ord-item.dragging { opacity: .45; }
.ord-grip { color: #5e6f8d; cursor: grab; }
.ord-btns { display: flex; gap: 3px; }
.ord-btns button { border: 1px solid #2d3d5c; background: #17243b; color: #9fb0cc; border-radius: 6px; cursor: pointer; padding: 1px 7px; font-size: .75rem; }
.ord-btns button:hover { color: #fff; border-color: #6b8bff; }
.match { display: grid; gap: 8px; }
.mrow { display: grid; grid-template-columns: 1fr 24px minmax(180px, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.mrow.wrong { border-color: var(--err); }
.mleft code { white-space: pre-wrap; }
.marrow { color: var(--faint); text-align: center; }
.quiz-sec { margin-top: 30px; }
.sec-h { margin-bottom: 14px; }
.quiz-list { display: grid; gap: 14px; }

/* ---------- amaliy topshiriqlar ---------- */
.pr-intro { margin-bottom: 16px; }
.pr-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pr-steps div { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.pr-steps b { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.pr-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.pr-list { display: grid; gap: 8px; position: sticky; top: 76px; }
.pr-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; cursor: pointer; color: var(--text); transition: .12s; }
.pr-item:hover { border-color: var(--primary); }
.pr-item.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pr-num { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; flex: none; }
.pr-item.ok .pr-num { background: var(--ok-soft); color: var(--ok); }
.pr-item.part .pr-num { background: var(--warn-soft); color: var(--warn); }
.pr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-t { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.pr-meta { font-size: .75rem; color: var(--muted); }
.pr-pct { font-size: .8rem; font-weight: 700; color: var(--muted); }
.pr-item.ok .pr-pct { color: var(--ok); }
.lvl { font-weight: 700; font-size: .75rem; padding: 1px 7px; border-radius: 6px; }
.lvl.easy { color: var(--primary); background: var(--primary-soft); } .lvl.medium { color: var(--warn); background: var(--warn-soft); } .lvl.hard { color: var(--err); background: var(--err-soft); }
.pr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.pr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pr-head h3 { margin: 0; font-size: 1.25rem; }
.pr-statement { font-size: .98rem; }
.io-fmt h4 { margin-top: .6em; }
.io-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.io-box { min-width: 0; }
.io-l { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.io-pre { margin: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; font-size: .86rem; max-height: 260px; overflow: auto; white-space: pre; }
.hint { margin: 8px 0; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); }
.hint summary { cursor: pointer; font-weight: 600; color: var(--warn); }
.hint > div { margin-top: 8px; }
.pr-tests-h { margin-top: 1.6em; }
.pt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: var(--surface); }
.pt.ok { border-color: var(--ok); background: var(--ok-soft); }
.pt.bad { border-color: var(--err); background: var(--err-soft); }
.pt-res { text-transform: none; letter-spacing: 0; }
.pt.ok .pt-res { color: var(--ok); } .pt.bad .pt-res { color: var(--err); }
.pt-diag { margin-top: 4px; color: var(--err); }
.pr-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- vizualizatsiyalar ---------- */
.viz { margin: .6em 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .8em; font-size: .9em; }
.vsvg { width: 100%; height: auto; display: block; }
.gl { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gl.thick { stroke-width: 3.4; }
.gg { stroke: var(--border); stroke-width: 1; }
.ga { stroke: var(--muted); stroke-width: 1.4; }
.gd { stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 4; }
.gt { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.gt.b { fill: var(--text); font-weight: 700; }
.viz-cap { margin-top: .5em; color: var(--muted); font-size: .92em; }
.viz-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: .6em; }
.viz-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.viz-row .chk { font-weight: 400; color: var(--muted); }
.viz-row input[type=range] { accent-color: var(--primary); }
.arr { display: flex; flex-wrap: wrap; gap: 4px; }
.acell { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.aval { min-width: 2.6em; padding: .45em .5em; text-align: center; border: 2px solid var(--primary); background: var(--surface); border-radius: 7px; font-weight: 700; font-family: var(--mono); }
.acell.hi .aval { background: var(--primary); color: var(--on-primary); }
.acell.sel .aval { background: var(--s3); border-color: var(--s3); color: #fff; }
.aidx { font-size: .75em; color: var(--muted); font-family: var(--mono); }
.aaddr { font-size: .68em; color: var(--faint); font-family: var(--mono); }
.mgrid { display: grid; gap: 4px; max-width: 420px; }
.mh { font-size: .75em; color: var(--muted); display: grid; place-items: center; font-family: var(--mono); }
.mc, .ms { border-radius: 6px; text-align: center; padding: .35em; font-family: var(--mono); font-weight: 700; cursor: pointer; border: 2px solid transparent; }
.mc.sel, .ms.sel { border-color: var(--text); }
.r0 { background: rgba(36, 71, 214, .16); } .r1 { background: rgba(14, 159, 110, .18); } .r2 { background: rgba(217, 119, 6, .18); } .r3 { background: rgba(147, 51, 234, .16); } .r4 { background: rgba(8, 145, 178, .18); } .r5 { background: rgba(220, 38, 38, .15); }
.mstrip { display: flex; flex-wrap: wrap; gap: 3px; }
.ms { display: flex; flex-direction: column; min-width: 2.4em; padding: .25em .3em; }
.ms small { font-size: .65em; color: var(--muted); font-weight: 400; }
.step-ctrl { display: flex; align-items: center; gap: 8px; margin-top: .6em; flex-wrap: wrap; }
.step-n { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 56px; text-align: center; }
.cs-wrap { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 1em; align-items: end; }
.cs-stack { display: flex; flex-direction: column; gap: 4px; min-height: 8em; justify-content: flex-end; }
.cs-frame { padding: .4em .7em; border-radius: 7px; font-family: var(--mono); font-weight: 600; background: var(--surface); border: 2px solid var(--border-2); text-align: center; transition: .2s; }
.cs-frame.top { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cs-frame.base { border-color: var(--s3); }
.cs-frame.ret { border-color: var(--primary); background: var(--primary-soft); }
.cs-base { border-top: 3px solid var(--muted); font-size: .72em; color: var(--muted); text-align: center; padding-top: 2px; }
.cs-info { display: grid; gap: .6em; align-self: center; }
.cs-note { font-weight: 500; }
.cs-out code { display: block; margin-top: 3px; font-size: 1.05em; }
.tree .te { stroke: var(--border-2); stroke-width: 1.6; }
.tree .tn { stroke: var(--surface); stroke-width: 2; opacity: .88; }
.tree .tt { fill: #fff; font-size: 11px; font-weight: 700; font-family: var(--mono); }
.dots { display: grid; gap: 4px; margin: .4em 0; }
.dot { width: 18px; height: 18px; border-radius: 50%; }
.dot.da { background: var(--s1); } .dot.db { background: var(--s3); }
.sv-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; max-width: 520px; }
.sv { text-align: center; padding: .25em 0; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); font-family: var(--mono); font-size: .85em; transition: .2s; }
.sv.x { opacity: .3; text-decoration: line-through; }
.sv.one { opacity: .25; }
.sv.pr { background: var(--violet-soft); border-color: var(--violet); color: var(--violet); font-weight: 700; }
.sv.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pgrid { display: grid; gap: 2px; overflow-x: auto; padding-bottom: 4px; }
.pc { width: var(--pc); height: var(--pc); display: grid; place-items: center; background: var(--primary); color: var(--on-primary); border-radius: 4px; font-family: var(--mono); font-weight: 700; font-size: .8em; }
.pc.sp { background: var(--surface-3); border: 1px dashed var(--border-2); }
.ph { font-size: .66em; color: var(--faint); display: grid; place-items: center; font-family: var(--mono); }
.p-pre { margin: 0; font-family: var(--mono); background: var(--code-bg); color: var(--code-text); padding: .8em 1em; border-radius: 9px; overflow: auto; line-height: 1.3; }
.hn-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: .4em 0; }
.hn-peg { position: relative; height: 190px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-radius: 10px; cursor: pointer; background: var(--surface); border: 2px solid var(--border); padding-bottom: 26px; transition: .15s; }
.hn-peg:hover { border-color: var(--primary); }
.hn-peg.sel { border-color: var(--s3); box-shadow: 0 0 0 3px rgba(217, 119, 6, .25); }
.hn-rod { position: absolute; bottom: 26px; top: 18px; width: 8px; border-radius: 4px; background: var(--border-2); }
.hn-disks { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hn-disk { height: 20px; border-radius: 6px; color: #fff; font-size: .72em; font-weight: 700; display: grid; place-items: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.hn-peg.sel .hn-disk:first-child { transform: translateY(-8px); outline: 2px solid var(--s3); }
.hn-name { position: absolute; bottom: 3px; font-weight: 800; color: var(--muted); }
.hn-msg { min-height: 1.4em; font-weight: 500; }
.hn-msg.ok { color: var(--ok); } .hn-msg.warn { color: var(--warn); } .hn-msg.err { color: var(--err); }
.hn-count { margin-left: auto; }
.jo svg { max-width: 330px; margin: 0 auto; }
.jo .jp circle { fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; }
.jo .jp text { font-size: 12px; font-weight: 700; fill: var(--text); font-family: var(--font); }
.jo .jp.dead circle { fill: var(--surface-3); stroke: var(--border-2); }
.jo .jp.dead > text:first-of-type { fill: var(--faint); text-decoration: line-through; }
.jo .jp.next circle { fill: var(--primary-soft); stroke-width: 3.5; }
.jo .jp.win circle { fill: var(--violet); stroke: var(--violet); }
.jo .jp.win text { fill: #fff; }
.jo-ord { font-size: 9px !important; fill: var(--err) !important; }
.jg-goal { margin-bottom: .5em; }
.jg-view { display: flex; gap: 20px; justify-content: center; }
.jug { width: 120px; text-align: center; }
.jug-body { fill: var(--surface); stroke: var(--muted); stroke-width: 2.5; }
.jug-water { fill: var(--s5); opacity: .8; transition: .3s; }
.jug-tick { stroke: var(--muted); stroke-width: 1; }
.jug-lbl { font-size: .9em; }
.jg-ops { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: .6em 0; }
.jg-info { text-align: center; }
.jg-msg { text-align: center; min-height: 1.4em; }
.jg-hist { text-align: center; }

/* ---------- admin roli ---------- */
:root { --ch1: #2a78d6; --ch2: #eb6834; --ch3: #4a3aa7; }
:root[data-theme="dark"] { --ch1: #3987e5; --ch2: #d95926; --ch3: #9085e9; }
.admin-link { margin-right: 2px; }
.chip.role { background: var(--primary-soft); color: var(--primary); border-color: transparent; padding: 1px 8px; }
.avatar.adm { background: var(--primary); color: var(--on-primary); }
.admin-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; background: var(--primary-soft); border-color: transparent; }

/* ---------- boshqaruv paneli ---------- */
.adm-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-top h1 { margin: 2px 0 4px; }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; }
.filters label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.filters label.grow .inp { width: 240px; max-width: 60vw; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi-l { font-size: .82rem; color: var(--muted); }
.kpi-v { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 4px 0 2px; letter-spacing: -.01em; }
.kpi-s { font-size: .78rem; color: var(--faint); }
.kpi.hero { grid-column: span 2; background: linear-gradient(120deg, var(--surface) 40%, var(--primary-soft)); }
.kpi.hero .kpi-v { font-size: 3rem; }
.charts { margin-bottom: 16px; }
.charts > .card { padding: 16px 18px; min-height: 120px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.chart-title { font-weight: 700; }
.chart-sub { font-size: .8rem; color: var(--muted); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart-plot { width: 100%; }
.csvg { display: block; overflow: visible; }
.csvg .cg { stroke: var(--border); stroke-width: 1; }
.csvg .cb { stroke: var(--border-2); stroke-width: 1; }
.csvg .cth { stroke: var(--muted); stroke-width: 1; }
.csvg .ct { fill: var(--muted); font: 11px var(--font); font-variant-numeric: tabular-nums; }
.csvg .ct.cl { fill: var(--text); font-size: 12px; }
.csvg .ct.cv { fill: var(--text); font-weight: 600; }
.csvg .cm { transition: opacity .12s; }
.csvg .cm.hov { opacity: .75; }
.csvg .chit { fill: transparent; cursor: default; outline: none; }
.csvg .chit:focus-visible { stroke: var(--primary); stroke-width: 2; }
.chart-tip { position: fixed; z-index: 300; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: .82rem; min-width: 120px; }
.ct-title { color: var(--muted); font-size: .76rem; margin-bottom: 4px; }
.ct-row { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.ct-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ct-lbl { color: var(--muted); }
.ct-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tbl.adm td, .tbl.adm th { white-space: nowrap; }
.tbl.adm tbody tr:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rep-head h1 { margin: 2px 0 4px; }
.rep-kpis { margin: 0; align-content: start; }
.rep-kpis .kpi.hero { grid-column: 1 / -1; }
.adm-l h4 { margin: .8em 0 .4em; font-size: .9rem; }
.narrowish { width: min(520px, 100%); }
.dl.creds dd { font-size: 1.15rem; }
section.card + section.card, .grid2.top + .grid2, .grid2 + section.card { margin-top: 16px; }

@media (max-width: 760px) {
  .kpi.hero { grid-column: 1 / -1; }
  .kpi.hero .kpi-v { font-size: 2.4rem; }
  .admin-banner { flex-direction: column; align-items: stretch; }
  .admin-link { display: none; }
  .filters label.grow .inp { width: 100%; }
}

@media print {
  .topbar, .foot, .no-print, .adm-actions, .chart-tbtn, .chart-tip, #toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .kpi { box-shadow: none; break-inside: avoid; border-color: #ccc; }
  .container.wide { max-width: none; padding: 0; }
  .adm-code { max-height: none; white-space: pre-wrap; }
}

/* ---------- profil / admin ---------- */
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin-bottom: 20px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 600; }
.narrow { max-width: 440px; margin: 40px auto; }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-sum { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.tbl.adm tbody tr { cursor: pointer; }
.tbl.adm tbody tr:hover { background: var(--surface-2); }
.tbl.adm .pc { width: auto; height: auto; display: table-cell; text-align: center; font-weight: 700; border-radius: 0; font-family: var(--font); font-size: .9em; }
.tbl.adm .pc.ok { background: var(--ok-soft); color: var(--ok); } .tbl.adm .pc.mid { background: var(--warn-soft); color: var(--warn); } .tbl.adm .pc.zero { background: transparent; color: var(--faint); }
.modal { position: fixed; inset: 0; background: rgba(5, 10, 25, .55); z-index: 200; display: grid; place-items: start center; overflow: auto; padding: 40px 16px; }
.modal-box { width: min(900px, 100%); position: relative; }
.modal-x { position: absolute; right: 14px; top: 14px; border: 0; background: var(--surface-3); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--text); }
.modal-actions { display: flex; gap: 8px; margin: 14px 0; }
.adm-l { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.adm-l summary { cursor: pointer; }
.adm-pct { float: right; font-weight: 700; color: var(--warn); }
.adm-pct.ok { color: var(--ok); }
.adm-parts { font-size: .88rem; color: var(--muted); margin: 8px 0; }
.adm-code { max-height: 320px; overflow: auto; background: var(--code-bg); color: var(--code-text); padding: 10px; border-radius: 8px; font-size: .8rem; }

/* Taqdimot ichidagi vizualizatsiyalar — 16:9 ramkaga sig‘ishi uchun (faqat keng ekranlarda) */
@media (min-width: 761px) {
  .slide .vsvg { max-height: 29cqw; }
  .slide .jo svg { max-width: none; }
  .slide .tbl.small, .slide .viz .tbl { font-size: .8em; }
  .slide .tiny { font-size: .78em; }
  .slide .viz { padding: .6em; }
  .slide .hn-board { gap: 1cqw; }
  .slide .hn-peg { height: 15cqw; padding-bottom: 2.3cqw; }
  .slide .hn-rod { bottom: 2.3cqw; top: 1.2cqw; }
  .slide .hn-name { bottom: .2cqw; }
  .slide .hn-disk { height: 1.6cqw; font-size: 1.05cqw; }
  .slide .jug { width: 7.5cqw; }
  .slide .sv-grid { max-width: 44cqw; }
  .slide .dot { width: 1.5cqw; height: 1.5cqw; }
  .slide .dots { grid-auto-rows: auto; }
}

/* ---------- moslashuvchan ---------- */
@media (max-width: 1100px) {
  .lhead { flex-direction: column; }
  .lh-prog { width: 100%; }
  .deck-wrap { grid-template-columns: 1fr; }
  .deck-toc { position: static; max-height: 320px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 24px; }
  .pr-wrap { grid-template-columns: 1fr; }
  .pr-list { position: static; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .pr-steps { grid-template-columns: 1fr 1fr; }
  .rules { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .container { padding: 16px; }
  .topbar { padding: 8px 16px; }
  .brand-t, .u-name { display: none; }
  .card { padding: 16px; }
  .hero { flex-direction: column-reverse; align-items: flex-start; }
  .hero-r { align-self: center; }
  .grid2, .grid3, .io-pair, .pt, .cols2, .cols3, .cols4 { grid-template-columns: 1fr; }
  .ltabs { grid-template-columns: 1fr; }
  .lh-prog { flex-direction: column; align-items: stretch; }
  .lh-ring { align-self: center; }
  .deck { aspect-ratio: auto; min-height: 72vh; }
  .deck-stage { position: relative; inset: auto; }
  .slide { font-size: 15px; padding: 18px 16px; }
  .sl-split .sl-body { grid-template-columns: 1fr; }
  .sl-title h1 { font-size: 1.9em; }
  .sl-sec-num { font-size: 3em; }
  .sl-section h2 { font-size: 1.6em; }
  .mrow { grid-template-columns: 1fr; }
  .marrow { display: none; }
  .pr-steps { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .cs-wrap { grid-template-columns: 1fr; }
  .hn-peg { height: 150px; }
  .next-step { flex-direction: column; align-items: stretch; }
  .lnav .btn { font-size: .85rem; padding: 8px 10px; }
  .dl { grid-template-columns: 1fr; }
  :root { --pc: 20px; }
}

/* ---------- Tasdiqlash kutilmoqda (talaba) ---------- */
.pending { display: flex; gap: 22px; align-items: flex-start; }
.pend-ic { font-size: 44px; line-height: 1; flex: none; }
.pending h1 { margin: 0 0 8px; font-size: 1.5rem; }
.pend-main { flex: 1; min-width: 0; }
.pend-act { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.how h2 { margin-top: 0; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 22px; }
.how-grid h3 { font-size: 1rem; margin: 6px 0; }
.how-grid p, .how-grid ul { margin: 6px 0; color: var(--muted); font-size: .93rem; }
.how-grid ul { padding-left: 0; list-style: none; display: grid; gap: 6px; }
.form label small { display: block; font-weight: 400; margin-top: 4px; font-size: .78rem; }
@media (max-width: 600px) { .pending { flex-direction: column; gap: 10px; } }

/* ---------- Admin: tasdiqlash, guruhlar ---------- */
.adm-pending:not(.empty) { border-color: var(--warn); }
.chip.warn-chip { background: var(--warn-soft); color: var(--warn); border-color: transparent; vertical-align: middle; }
.assign { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.assign select { min-width: 180px; }
.tbl td.r { text-align: right; white-space: nowrap; }
.btn.danger.ghost { color: var(--err); }
.grp-new { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.grp-new .inp { flex: 1 1 220px; }
.chk { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--primary); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.print-only { display: none; }
@media print { .print-only { display: inline; } }

/* ---------- Fanlar ro‘yxati ---------- */
.sec-title { margin: 26px 0 12px; font-size: 1.2rem; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.ccard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
/* Sahifa orqa foni: umumiy sahifalarda — ta’lim ikonkalari, fan ichida — o‘sha fan rangidagi naqsh (MTA — blok-sxema, SIA — neyron tarmoq) */
.site-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sb-glow { position: absolute; inset: 0 0 auto 0; height: 340px; background: linear-gradient(180deg, color-mix(in srgb, var(--acc, var(--primary)) 9%, transparent), transparent); }
.sb-art, .sb-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sb-art { color: var(--acc, var(--primary)); opacity: .11; }
:root[data-theme="dark"] .sb-art { opacity: .15; }
.sb-site .sb-art { opacity: .09; -webkit-mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.3) 35%, rgba(0,0,0,.3) 65%, #000 100%); mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.3) 35%, rgba(0,0,0,.3) 65%, #000 100%); }
:root[data-theme="dark"] .sb-site .sb-art { opacity: .12; }
@media print { .site-bg { display: none; } }
/* Fan kartasi rasmi («A» — chiziqli chizma): butun karta foni bo‘ylab katta, yozuvlar o‘qilishi uchun xira */
.ccard.has-art { position: relative; overflow: hidden; isolation: isolate; min-height: 250px; }
.cc-art { position: absolute; inset: 10px 6px; z-index: -1; pointer-events: none; opacity: .38;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.35) 0, rgba(0,0,0,.55) 40%, #000 72%); mask-image: linear-gradient(90deg, rgba(0,0,0,.35) 0, rgba(0,0,0,.55) 40%, #000 72%); }
:root[data-theme="dark"] .cc-art { opacity: .45; }
/* Yozuvlar rasm ustida ham bemalol o‘qilsin: karta rangidagi yengil «halo» */
.ccard.has-art h3, .ccard.has-art h3 + .muted, .ccard.has-art .cc-foot > span:first-child { text-shadow: 0 0 2px var(--surface), 0 0 6px var(--surface), 0 0 12px var(--surface); }
.ccard.has-art .ring { background: var(--surface); border-radius: 50%; }
.cc-art text { font-family: var(--mono); }
.c-mta { --acc: #2f6bff; --acc2: #10b4d8; }
.c-sia { --acc: #4f5bd5; --acc2: #2f8cff; }   /* indigo-ko‘k → havo rang (MTA: ko‘k → feruza) */
:root[data-theme="dark"] .c-mta { --acc: #6f92ff; --acc2: #3fd0ee; }
:root[data-theme="dark"] .c-sia { --acc: #8d96ff; --acc2: #5aa9ff; }
/* Har bir fan o‘z rangida: karta fonida yengil rangli nur, chegara, yuqori chiziq, logotip va halqa */
.ccard.fan-c { position: relative; overflow: hidden; isolation: isolate; border-color: color-mix(in srgb, var(--acc) 30%, var(--border));
  background: radial-gradient(130% 100% at 100% 0%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 62%),
              radial-gradient(110% 90% at 0% 100%, color-mix(in srgb, var(--acc2) 11%, transparent), transparent 60%), var(--surface); }
.ccard.fan-c::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.ccard.fan-c .logo { background: linear-gradient(135deg, var(--acc), var(--acc2)); }
/* Fan belgisi: kattaroq kvadrat, ichida fanga tegishli oq rasm (xira), ustida aniq yozuv */
.cc-top .logo.fan-logo { position: relative; overflow: hidden; width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 4px 12px color-mix(in srgb, var(--acc, var(--primary)) 30%, transparent); }
.fan-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .42; }
.fan-logo b { position: relative; font-size: 1.05rem; font-weight: 800; letter-spacing: .05em; text-shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 0 8px color-mix(in srgb, var(--acc, var(--primary)) 80%, transparent); }
.ccard.fan-c .ring.mid .ring-fg { stroke: var(--acc); }
.ccard.fan-c:hover { border-color: color-mix(in srgb, var(--acc) 55%, var(--border)); }
.hero.fan-hero { background: linear-gradient(120deg, var(--surface) 45%, color-mix(in srgb, var(--acc) 15%, var(--surface)) 80%, color-mix(in srgb, var(--acc2) 14%, var(--surface))); border-top: 4px solid var(--acc); }
.hero.fan-hero .hero-fan { color: var(--acc); background: color-mix(in srgb, var(--acc) 13%, transparent); }
.hero.fan-hero .ring.mid .ring-fg { stroke: var(--acc); }
/* Qo‘ng‘iroqcha (bildirishnomalar) */
.notif { position: relative; }
.notif-btn { position: relative; }
.nb-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--err); color: #fff; font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.notif-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 480px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; }
.notif.open .notif-menu { display: block; }
.nm-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.nm-h b { margin-right: auto; }
.nm-send { white-space: nowrap; }
.nm-item { display: flex; gap: 10px; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); text-decoration: none !important; }
.nm-item:last-child { border-bottom: 0; }
.nm-item:hover { background: var(--surface-2); }
.nm-item.new { background: var(--primary-soft); }
.nm-ic { flex: none; width: 22px; text-align: center; }
.nm-b { display: flex; flex-direction: column; min-width: 0; }
.nm-t { font-weight: 600; font-size: .9rem; line-height: 1.35; }
.nm-s { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.nm-at { color: var(--faint); font-size: .74rem; margin-top: 2px; }
.nm-empty { padding: 18px 14px; text-align: center; font-size: .9rem; }
@media (max-width: 640px) { .notif-menu { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; } }
.ccard.preview { border-style: dashed; }
.pv-chip { background: var(--surface-3); color: var(--muted); font-weight: 700; }
/* Ko‘rish rejimi (guruhga ochilmagan fan): o‘qish mumkin, yechish yopiq */
.preview-note { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding: 14px 18px; border-left: 4px solid var(--primary); background: linear-gradient(90deg, var(--primary-soft), var(--surface) 70%); font-size: .92rem; }
.pv-ic { font-size: 1.3rem; line-height: 1.2; }
.lh-prog.pv-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; min-width: 170px; padding: 10px; border: 1px dashed var(--border-2); border-radius: 12px; }
.task-card.locked-task { border-left-color: var(--border-2); }
.task-card.locked-task .tk-badge { color: var(--muted); }
.task-card.locked-task .tk-lock { margin-left: 0; display: inline-flex; gap: 4px; align-items: center; }
.task-card.locked-task .opt, .task-card.locked-task label { cursor: default; }
.task-card.locked-task input:disabled, .task-card.locked-task select:disabled, .task-card.locked-task textarea:disabled { opacity: .75; cursor: not-allowed; }
.pr-code:disabled { opacity: .7; cursor: not-allowed; }
.pr-locked { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--border-2); border-radius: 12px; background: var(--surface-2); font-size: .92rem; }
.ccard h3 { margin: 6px 0 0; font-size: 1.15rem; }
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-top .logo { width: 52px; height: 52px; font-size: .95rem; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }
.hero-fan { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }
.rep-fan { margin: 6px 0; }
.rep-fan label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.chk-list { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.chk-list .chk { font-size: .85rem; white-space: nowrap; }

/* ---------- Topshiriqlar ---------- */
.task { margin-bottom: 14px; }
.task-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.task-h h3 { margin: 2px 0 6px; }
.task-text { white-space: pre-wrap; margin: 12px 0; line-height: 1.55; }
.task-grade { background: var(--ok-soft); border-left: 4px solid var(--ok); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.task-ans, .adm-ans { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-family: var(--mono); font-size: .85rem; max-height: 320px; overflow: auto; }
.task-note { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; border-color: var(--warn); color: inherit; text-decoration: none; margin: 14px 0; }
.chip.ok-chip { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.err-chip { background: var(--err-soft); color: var(--err); border-color: transparent; }

/* ---------- Admin navigatsiyasi, mavzularni ochish, baholash ---------- */
.adm-nav { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.adm-nav a { padding: 9px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.adm-nav a:hover { color: var(--text); }
.adm-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.open-mod { border-top: 1px solid var(--border); padding: 12px 0; }
.open-mod-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.grade-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.grade-row input[data-grade] { width: 86px; }
.grade-row input[data-comment] { flex: 1 1 140px; }
/* Keng jadvallar tor ekranda sahifani emas, faqat o‘z blokini suradi */
.ex-body, .pr-statement, .task-text { overflow-x: auto; }

/* Bo‘lim natijasini tozalash */
.tab-tools { display: flex; justify-content: flex-end; margin: -6px 0 10px; }
.tab-tools .btn:disabled { opacity: .45; cursor: default; }

/* Parol maydonidagi «ko‘zcha» */
.pw-wrap { position: relative; display: block; }
.pw-wrap .inp { padding-right: 42px; width: 100%; }
.form label .pw-wrap { margin-top: 5px; }
.form label .pw-wrap .inp { margin-top: 0; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-eye:hover { background: var(--surface-3); color: var(--text); }
.pw-eye:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Checker: qiyinlik va tekshiruv natijalari */
.diff { font-size: .78rem; color: var(--muted); background: var(--surface-3); border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; cursor: help; }
.diff b { color: var(--text); }
.pr-code { min-height: 220px; tab-size: 4; line-height: 1.5; }
.jr { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.jr-sum { font-size: .95rem; padding: 8px 10px; border-radius: 8px; background: var(--surface-3); margin-bottom: 10px; }
.jr-sum.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.jr-sum.part { background: var(--warn-soft); }
.jr-sum.bad { background: var(--err-soft); }
.jr-sample { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface); }
.jr-sample.v-OK { border-color: var(--ok); }
.jr-sample.v-WA, .jr-sample.v-RE { border-color: var(--err); }
.jr-sample.v-TLE { border-color: var(--warn); }
.jr-sh { font-size: .92rem; margin-bottom: 4px; }
.jr-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .75rem; font-weight: 700; background: var(--surface-3); }
.v-OK .jr-ic { background: var(--ok); color: #fff; } .v-WA .jr-ic, .v-RE .jr-ic { background: var(--err); color: #fff; } .v-TLE .jr-ic { background: var(--warn); color: #fff; }
.jr-err { background: var(--code-bg); color: #ffb4b4; border-radius: 8px; padding: 8px 10px; font-size: .82rem; white-space: pre-wrap; margin: 6px 0 0; }
.jr-h { font-weight: 700; margin: 10px 0 6px; font-size: .92rem; }
.jr-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.jr-cell { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 6px; font-size: .72rem; font-weight: 700; font-family: var(--mono); background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }
.jr-cell.v-OK { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.jr-cell.v-WA, .jr-cell.v-RE { background: var(--err-soft); color: var(--err); border-color: transparent; }
.jr-cell.v-TLE { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.jr-order { margin-top: 8px; }
/* Masala sahifasi — robocontest.uz uslubida: belgilar qatori, #raqam + sarlavha, ko‘k bo‘lim sarlavhalari, misollar jadvali */
.pm-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.pm-chips .pm-lvl { font-size: .84rem; padding: 4px 12px; border-radius: 999px; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: .84rem; color: var(--text); background: var(--surface); white-space: nowrap; }
.pm-chip svg { width: 16px; height: 16px; flex: none; }
.pm-time svg { color: var(--primary); } .pm-mem svg { color: var(--info); } .pm-diff svg { color: var(--violet); } .pm-tests svg { color: var(--orange); }
.pm-title { font-size: 1.45rem; line-height: 1.3; margin: 2px 0 10px; }
.pm-code { color: var(--primary); font-weight: 800; }
.pm .pr-statement { font-size: 1rem; }
.pm-h { color: var(--primary); font-size: 1.12rem; font-weight: 700; margin: 20px 0 6px; }
.pm-h .muted { font-weight: 400; }
.pm-ex { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.pm-ex table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pm-ex th { text-align: left; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pm-ex th:first-child, .pm-ex .pm-n { width: 40px; text-align: center; color: var(--muted); font-weight: 700; }
.pm-ex td { vertical-align: top; padding: 0; border-bottom: 1px solid var(--border); }
.pm-ex tr:last-child td { border-bottom: 0; }
.pm-ex td + td { border-left: 1px solid var(--border); }
.pm-ex .pm-n { padding-top: 10px; }
.pm-cell { position: relative; }
.pm-cell .io-pre { border: 0; border-radius: 0; background: transparent; padding: 10px 44px 12px 12px; min-height: 64px; max-height: 260px; }
.pm-copy { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pm-copy:hover { border-color: var(--border); background: var(--surface-2); color: var(--primary); }
.pm-copy svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .pm-title { font-size: 1.2rem; } .pm-ex th:first-child, .pm-ex .pm-n { width: 28px; } }
.jr-cell.v-SKIP { opacity: .5; border-style: dashed; }
.jr-legend { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.jr-legend .jr-cell { min-width: 20px; height: 20px; }
.jr-why { margin-top: 10px; font-size: .88rem; }
/* Yashirin testni ko‘rish (faqat super admin va fan o‘qituvchisi) */
button.jr-cell { cursor: pointer; }
button.jr-cell:hover { outline: 2px solid var(--primary-soft); }
.jr-cell.sel { outline: 2px solid var(--primary); outline-offset: 1px; }
.jt-view:not(:empty) { margin-top: 10px; }
.jt-card { border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.jt-card.v-OK { border-left-color: var(--ok); } .jt-card.v-WA, .jt-card.v-RE { border-left-color: var(--err); } .jt-card.v-TLE { border-left-color: var(--warn); }
.jt-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; }
.jt-h .jt-close { margin-left: auto; }
.jt-card .io-box { margin-bottom: 10px; }
.jt-panel { margin-top: 12px; border: 1px dashed var(--border-2); border-radius: 10px; padding: 8px 12px; }
.jt-panel > summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.jt-panel[open] > summary { margin-bottom: 8px; }
.jt-meta { margin-top: 6px; }
.io-acts { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }

/* ---------- Yuqori menyu: Darslar · Masalalar · Musobaqalar · Reyting ---------- */
.tb-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; margin-left: 18px; }
.tb-nav a { padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: .92rem; color: var(--muted); text-decoration: none !important; white-space: nowrap; }
.tb-nav a:hover { background: var(--surface-3); color: var(--text); }
.tb-nav a.active { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .tb-nav { order: 3; width: 100%; margin: 2px 0 0; overflow-x: auto; scrollbar-width: none; }
  .tb-nav a { padding: 6px 10px; font-size: .86rem; }
}

/* ---------- «Masalalar» bo‘limi va musobaqalar ---------- */
.ar-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ar-nav a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none !important; }
.ar-nav a.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.ar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ar-head h1 { margin: 2px 0 6px; }
.ar-head p { margin: 0; max-width: 820px; }
.ar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ar-filters { margin-bottom: 14px; }
.ar-frow { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.ar-frow label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); min-width: 150px; }
.ar-frow label.grow { flex: 1 1 240px; }
.ar-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.ar-tagbtn { font: inherit; font-size: .8rem; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.ar-tagbtn:hover { border-color: var(--primary); }
.ar-tagbtn.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ar-tag { display: inline-block; font-size: .72rem; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.ar-count { margin-bottom: 8px; }
.ar-tbl td { vertical-align: middle; }
.ar-tbl tbody tr[data-href], .ar-tbl tbody tr[data-u] { cursor: pointer; }
.ar-tbl tbody tr[data-href]:hover, .ar-tbl tbody tr[data-u]:hover { background: var(--surface-2); }
.ar-title { font-weight: 600; color: var(--text); }
.ar-tagcell { max-width: 280px; }
.ar-ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.ar-me { background: var(--primary-soft) !important; }
.ar-diff { display: inline-block; min-width: 46px; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: .8rem; text-align: center; }
.ar-diff.b-easy { background: var(--info-soft); color: var(--info); }
.ar-diff.b-med { background: var(--warn-soft); color: var(--warn); }
.ar-diff.b-hard { background: var(--err-soft); color: var(--err); }
.ar-diff.b-exp { background: var(--violet-soft); color: var(--violet); }
.ar-st { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 6px; border-radius: 7px; font-weight: 800; font-size: .8rem; }
.ar-st.ok { background: var(--ok-soft); color: var(--ok); }
.ar-st.part { background: var(--warn-soft); color: var(--warn); }
.ar-st.bad { background: var(--err-soft); color: var(--err); }
.ar-pnote { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 12px 18px; font-size: .92rem; }
.pr-single { max-width: 1000px; }
/* musobaqalar */
.ar-ccard { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none !important; border-top: 4px solid var(--border-2); transition: transform .15s, box-shadow .15s; }
.ar-ccard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ar-ccard h3 { margin: 4px 0 2px; }
.ar-ccard.st-live { border-top-color: var(--ok); }
.ar-ccard.st-soon { border-top-color: var(--primary); }
.ar-cc-top { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-pill { font-size: .74rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.ar-pill.live { background: var(--ok-soft); color: var(--ok); }
.ar-pill.soon { background: var(--primary-soft); color: var(--primary); }
.ar-pill.rated { background: var(--warn-soft); color: var(--warn); }
.ar-chead { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ar-chead h1 { margin: 6px 0 4px; font-size: 1.5rem; }
.ar-timer { text-align: center; min-width: 170px; }
.ar-time { font: 800 1.6rem/1.2 var(--mono); color: var(--primary); }
.ar-desc { margin-bottom: 14px; }
.ar-ptabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pm-chip.pm-extra { color: var(--muted); border-style: dashed; }
.pr-extra { color: var(--muted); font-style: italic; }
.ar-sthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ar-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.ar-filters .inp { width: auto; max-width: 100%; }
.ar-subrow { cursor: pointer; }
.ar-code { max-height: 70vh; white-space: pre; }
.ar-ptabs a { min-width: 40px; text-align: center; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; color: var(--text); text-decoration: none !important; }
.ar-ptabs a.active { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.ar-ptabs a.ok:not(.active) { border-color: var(--ok); color: var(--ok); }
.ar-stand td, .ar-stand th { white-space: nowrap; }
.ar-cell { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; font-weight: 800; font-size: .86rem; }
.ar-cell small { font-weight: 500; font-size: .7rem; color: var(--muted); }
.ar-cell.ok { color: var(--ok); }
.ar-cell.bad { color: var(--err); }
.up { color: var(--ok); font-weight: 700; }
.down { color: var(--err); font-weight: 700; }
/* muharrirlar */
.ar-form textarea { resize: vertical; }
.ar-fs { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 14px; margin: 4px 0; }
.ar-fs legend { font-weight: 700; padding: 0 6px; }
.ar-rated { align-self: center; }
.ar-chosen { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.ar-chosen li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.ar-letter { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: var(--on-primary); flex: none; }
.ar-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ar-pick .inp { flex: 1 1 260px; }
.ar-picklist { max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.ar-pitem { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.ar-pitem:last-child { border-bottom: 0; }
.ar-pair { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) {
  .ar-pair { grid-template-columns: 1fr; }
  .ar-frow label { min-width: 0; flex: 1 1 45%; }
  .ar-time { font-size: 1.3rem; }
}
/* Codeforces unvon ranglari */
.r-gray { color: #808080; } .r-green { color: #008000; } .r-cyan { color: #03a89e; } .r-blue { color: #0000ff; }
.r-violet { color: #aa00aa; } .r-orange { color: #ff8c00; } .r-red { color: #ff0000; } .r-lgm { color: #ff0000; }
.cf-name { font-weight: 700; }
.cf-name.r-lgm::first-letter { color: var(--text); }
:root[data-theme="dark"] .r-blue { color: #6b8bff; }
:root[data-theme="dark"] .r-violet { color: #d070d0; }
:root[data-theme="dark"] .r-green { color: #3fbf5f; }
:root[data-theme="dark"] .r-gray { color: #a0a8b8; }
.ar-ranks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; }

/* ---------- Python kod muharriri (pyeditor.js, PyCharm uslubida) ---------- */
.pye { position: relative; border: 1px solid var(--code-border); border-radius: 12px; background: var(--code-bg); color: var(--code-text); margin: 6px 0 2px; }
.pye:focus-within { border-color: #4f6fd8; box-shadow: 0 0 0 3px var(--primary-soft); }
.pye-scroll { overflow: auto; max-height: min(70vh, 640px); border-radius: 12px 12px 0 0; scrollbar-color: #33415c transparent; }
.pye-in { display: grid; grid-template-columns: auto minmax(0, 1fr); width: max-content; min-width: 100%; }
.pye-gut { position: sticky; left: 0; z-index: 2; background: #0b1526; border-right: 1px solid var(--code-border); padding: 10px 0; user-select: none; }
.pye-ln { font: 13px/21px var(--mono); color: #4b5b78; padding: 0 10px 0 12px; text-align: right; min-width: 3.4em; }
.pye-ln.cur { color: #b9c6dd; background: rgba(255, 255, 255, .035); }
.pye-ln.err { color: #ff6b76; background: rgba(255, 107, 118, .13); cursor: help; }
.pye-ln.warn { color: #f0b14a; background: rgba(240, 177, 74, .1); cursor: help; }
.pye-code { position: relative; min-width: 0; cursor: text; }
.pye-hl, .pye-mk, .pye textarea.pye-ta { font-family: var(--mono); font-size: 14px; line-height: 21px; padding: 10px 14px; tab-size: 4; -moz-tab-size: 4; white-space: pre; letter-spacing: 0; word-spacing: 0; font-weight: 400; margin: 0; border: 0; }
.pye-hl, .pye-mk { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: none; color: var(--code-text); }
.pye-mk { color: transparent; }
.pye-cl { position: absolute; left: 0; right: 0; height: 21px; background: rgba(255, 255, 255, .035); pointer-events: none; }
.pye textarea.pye-ta { position: relative; z-index: 1; display: block; min-width: 100%; min-height: 0; resize: none; overflow: hidden; border-radius: 0; background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: #f2f5fb; outline: none; box-shadow: none; transition: none; }
.pye textarea.pye-ta:focus { box-shadow: none; border: 0; }
.pye textarea.pye-ta::selection { background: rgba(107, 139, 255, .38); -webkit-text-fill-color: transparent; }
.pye textarea.pye-ta::placeholder { color: #5e6f8d; -webkit-text-fill-color: #5e6f8d; opacity: 1; }
.pye textarea.pye-ta:disabled { opacity: 1; cursor: not-allowed; }
.pye:has(textarea:disabled) .pye-hl { opacity: .75; }
.pye-err, .pye-wrn { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.pye-err { text-decoration-color: #ff5c69; background: rgba(255, 92, 105, .1); }
.pye-wrn { text-decoration-color: #f0b14a; }
.pye-err.eol { background: rgba(255, 92, 105, .3); border-radius: 2px; }
.pye-bm { background: rgba(138, 163, 255, .28); box-shadow: inset 0 0 0 1px #8aa3ff; border-radius: 2px; }
.pye-bx { background: rgba(255, 92, 105, .35); border-radius: 2px; }
.pye-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 6px 12px; border-top: 1px solid var(--code-border); background: #0b1526; border-radius: 0 0 12px 12px; font-size: .8rem; color: #9fb0cc; min-height: 31px; }
.pye-probs { display: grid; gap: 3px; min-width: 0; }
.pye-pos { white-space: nowrap; color: #6f7f9b; font-family: var(--mono); font-size: .75rem; padding-top: 2px; }
.pye-ok { color: #3ccf85; }
.pye-hint { color: #6f7f9b; }
.pye-ph { font-size: .78rem; }
.pye-ec { color: #ff6b76; } .pye-wc { color: #f0b14a; }
.pye-pb { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pye-go { all: unset; cursor: pointer; color: #dfe7f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pye-go:hover { text-decoration: underline; }
.pye-pb.err .pye-go b { color: #ff8a93; } .pye-pb.warn .pye-go b { color: #f0b14a; }
.pye-en { color: #6f7f9b; font-family: var(--mono); font-size: .92em; margin-left: 6px; }
.pye-fix { flex: none; border: 1px solid #3b5bdb; background: rgba(79, 111, 216, .2); color: #c9d6ff; border-radius: 6px; padding: 0 8px; font: 600 .75rem var(--mono); cursor: pointer; }
.pye-fix:hover { background: #3b5bdb; color: #fff; }
.pye-more { color: #6f7f9b; }
.pye-ac { position: absolute; z-index: 40; min-width: 270px; max-width: min(480px, 92%); max-height: 262px; overflow-y: auto; background: #1b2436; border: 1px solid #33415c; border-radius: 9px; box-shadow: 0 12px 34px rgba(0, 0, 0, .5); padding: 4px; font: 13px/1.25 var(--mono); }
.pye-ai { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; color: #dfe7f5; }
.pye-ai:hover { background: #26324a; }
.pye-ai.sel { background: #2f4a8a; }
.pye-ai b { color: #8fb0ff; font-weight: 700; }
.pye-par { color: #6f7f9b; }
.pye-ik { flex: none; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font: 700 11px/1 var(--mono); }
.pye-ik.k-k { background: rgba(199, 146, 234, .2); color: #c792ea; }
.pye-ik.k-f { background: rgba(255, 203, 107, .18); color: #ffcb6b; }
.pye-ik.k-c { background: rgba(127, 219, 202, .18); color: #7fdbca; }
.pye-ik.k-m { background: rgba(130, 170, 255, .18); color: #82aaff; }
.pye-ik.k-M { background: rgba(247, 140, 108, .18); color: #f78c6c; }
.pye-ik.k-v { background: rgba(255, 156, 172, .16); color: #ff9cac; }
.pye-ik.k-e { background: rgba(255, 107, 118, .18); color: #ff6b76; }
.pye-nm { flex: none; }
.pye-ih { margin-left: auto; padding-left: 16px; color: #8a97ad; font: 12px/1.2 var(--font); overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.pye-at { padding: 5px 8px 2px; margin-top: 3px; border-top: 1px solid #2a3650; color: #6f7f9b; font: 11px/1.3 var(--font); }
@media (max-width: 760px) {
  .pye-hl, .pye-mk, .pye textarea.pye-ta { font-size: 13px; }
  .pye-bar { flex-direction: column; gap: 4px; }
  .pye-ih { display: none; }
}

/* ---------- Xabarlar va natijalarni tozalash ---------- */
.msg-card { margin-top: 14px; border-left: 4px solid var(--primary); }
.msg-card.sel { box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); }
.msg-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.msg-h h2 { margin: 0; font-size: 1.15rem; }
.msg-meta { margin: 4px 0 10px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.msg-list { display: grid; gap: 10px; }
.msg-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.msg-rh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-rh .btn { margin-left: auto; }
.msg-row .msg-text { margin-top: 6px; font-size: .92rem; }
.clr-box { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 10px; margin: 0; display: grid; gap: 6px; }
.clr-box legend { font-weight: 700; padding: 0 6px; }
.clr-lessons { max-height: 260px; overflow: auto; display: grid; gap: 8px; padding: 6px 2px 2px 22px; }
.clr-mod .chk-list { margin: 4px 0 0 22px; }

/* «Bitta masala» qoidasi: boshqa masalaga yuborish uchun kutish */
.pr-lock { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.5;
  background: var(--warn-soft); border: 1px solid var(--warn); }
.pr-lock[hidden] { display: none; }

/* Ko‘chirmachilik: talabaga ogohlantirish va o‘qituvchi uchun «Tekshiring» belgisi */
.jr-plag { margin: 10px 0; padding: 10px 14px; border-radius: 10px; background: var(--err-soft); border: 1px solid var(--err); font-size: 14px; line-height: 1.5; }
.plag-chip { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--err); background: var(--err-soft); border: 1px solid var(--err); white-space: nowrap; vertical-align: middle; }
.plag-pct { font-weight: 700; color: var(--err); }
.plag-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.plag-cmp .adm-code { max-height: 60vh; margin: 0; }
.plag-h { margin-bottom: 6px; }
@media (max-width: 760px) { .plag-cmp { grid-template-columns: 1fr; } }

/* Qo‘ng‘iroqcha ichidan xabar yuborish oynasi */
.cm-to { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cm-list { width: 100%; margin-top: 6px; min-height: 9.5em; }
.cm-sent h3 { margin: 18px 0 10px; font-size: 1rem; }

/* «N-Mavzu» havolasidan kelinganda mavzu bo‘limi qisqa yoritiladi */
.module { scroll-margin-top: 84px; border-radius: 16px; transition: box-shadow .4s, background .4s; }
.module.mod-focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc, var(--primary)) 45%, transparent); background: color-mix(in srgb, var(--acc, var(--primary)) 6%, transparent); }

/* Tiklangan (yuborilmagan) kod qoralamasi haqida izoh */
.pr-draft { margin: 6px 2px 0; }

/* Ma’ruza slaydidagi namuna misol: matn ostidagi bo‘sh joyga, maydaroq shriftda (boshqa matn va kod o‘lchami o‘zgarmaydi) */
.sl-ex { margin-top: .7em; padding: .42em .8em; font-size: .74em; line-height: 1.45; background: var(--surface-2);
  border-left: 3px solid var(--acc, var(--primary)); border-radius: 8px; }
.sl-ex code { font-size: .95em; }
.sl-ex-pre { margin: .2em 0 .1em; padding: 0; background: none; border: 0; font-family: var(--mono); font-size: 1em; line-height: 1.2; white-space: pre; color: inherit; }

/* 2-mavzu vizualizatsiyalari: binar qidiruv, saralash, bitlar, xesh-jadval */
.acell.dim .aval { opacity: .35; border-style: dashed; }
.acell.mid .aval { background: var(--primary-soft); border-color: var(--primary); }
.acell.ok .aval { background: var(--ok); border-color: var(--ok); color: #fff; }
.acell.cmp .aval { background: var(--orange-soft); border-color: var(--orange); }
.acell.done .aval { border-color: var(--ok); background: var(--ok-soft); }
.acell.piv .aval { background: var(--s3); border-color: var(--s3); color: #fff; }
.bt-tbl td { vertical-align: middle; }
.bits { display: flex; gap: 2px; }
.bit { display: inline-block; width: 1.5em; text-align: center; font-family: var(--mono); font-weight: 700; border-radius: 4px; border: 1px solid var(--border-2); }
.bit.b1 { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ht-tbl tr.hi td { background: var(--ok-soft); font-weight: 700; }
.ht-tbl tr.probe td { background: var(--orange-soft); }

/* ---------- Mustaqil ta’lim ---------- */
.grid3.tight { gap: 12px; }
.tk-st.saved { background: var(--primary-soft); color: var(--primary); }
.mi-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 8px; }
.mi-warn { margin: 10px 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.mi-bar { position: sticky; top: 64px; z-index: 20; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 14px; }
.mi-bar-t { flex: 1; min-width: 180px; }
.mi-bar-s { display: grid; text-align: center; }
.mi-bar-s b { font-size: 1.15rem; }
.mi-result { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.mi-result h2 { margin: 0 0 4px; }
.mi-grade { display: flex; align-items: baseline; gap: 4px; padding: 14px 20px; border-radius: var(--radius); background: var(--surface-3); color: var(--muted); }
.mi-grade b { font-size: 2.4rem; line-height: 1; }
.mi-grade.ok-chip { background: var(--ok-soft); color: var(--ok); } .mi-grade.warn-chip { background: var(--warn-soft); color: var(--warn); } .mi-grade.err-chip { background: var(--err-soft); color: var(--err); }
.mi-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.mi-work { display: flex; flex-direction: column; gap: 6px; }
.mi-work h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.mi-work-a { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
@media (max-width: 640px) { .mi-bar { gap: 10px; justify-content: space-between; } .mi-bar-t { display: none; } }
/* Mustaqil ta’lim — fan testi (assets/js/mtest.js): bo‘limlar, savol kartasi, variantlar, savollar paneli, natija */
.mt-banner { padding: 12px 16px; margin-bottom: 14px; }
.mt-banner.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.mt-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mt-part { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mt-part h3 { margin: 0; font-size: 1.05rem; }
.mt-part.passed { border-color: var(--ok); }
.mt-part .pend-act { margin-top: auto; padding-top: 6px; }
.mt-best { display: flex; align-items: baseline; gap: 6px; }
.mt-best b { font-size: 2.2rem; line-height: 1.1; }
.mt-mini { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .88rem; margin: 2px 0 8px; }
.mt-card { margin-bottom: 14px; }
.mt-qh { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.mt-q { font-size: 1.04rem; font-weight: 600; line-height: 1.55; margin-bottom: 10px; overflow-wrap: anywhere; }
.mt-opts { display: grid; gap: 8px; margin: 12px 0 6px; }
.mt-opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; line-height: 1.45; transition: border-color .12s, background .12s; }
button.mt-opt { cursor: pointer; }
button.mt-opt:not(:disabled):hover { border-color: var(--primary); background: var(--primary-soft); }
button.mt-opt:disabled { cursor: default; opacity: 1; }
.mt-opt.pending { border-color: var(--primary); background: var(--primary-soft); }
.mt-l { font-weight: 800; color: var(--muted); min-width: 18px; }
.mt-t { flex: 1; overflow-wrap: anywhere; }
.mt-mark { font-weight: 800; margin-left: 6px; }
.mt-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.mt-opt.right .mt-l, .mt-opt.right .mt-mark { color: var(--ok); }
.mt-opt.wrong { border-color: var(--err); background: var(--err-soft); }
.mt-opt.wrong .mt-l, .mt-opt.wrong .mt-mark { color: var(--err); }
.mt-opts.ro .mt-opt { padding: 8px 12px; }
.mt-fb { min-height: 30px; }
.mt-fb .tk-fb { margin-top: 6px; }
.mt-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.mt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.mt-lg { display: inline-flex; align-items: center; gap: 5px; }
.mt-lg::before { content: ''; width: 11px; height: 11px; border-radius: 3px; background: var(--surface-3); border: 1px solid var(--border); }
.mt-lg.ok::before { background: var(--ok); border-color: var(--ok); }
.mt-lg.bad::before { background: var(--err); border-color: var(--err); }
.mt-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-top: 10px; }
.mt-pb { height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-3); color: var(--muted); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.mt-pb:hover { border-color: var(--primary); }
.mt-pb.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.mt-pb.bad { background: var(--err); border-color: var(--err); color: #fff; }
.mt-pb.cur { outline: 2px solid var(--primary); outline-offset: 2px; }
.mt-result .mt-res-b { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.mt-res-a { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-rev-h { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; }
.mt-rev-h h2 { margin: 0; }
.mt-rev-h .ar-nav { margin: 0; }
.mt-rq { padding: 14px 0; border-top: 1px solid var(--border); }
.mt-rq:first-child { border-top: 0; }
.mt-adm-part { margin-top: 16px; }
.mt-adm-part h3 { font-size: 1rem; margin: 0 0 8px; }
.mt-det { margin-top: 10px; }
.mt-det summary { cursor: pointer; font-weight: 600; }
@media (max-width: 640px) { .mt-pal { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; } .mt-opt { padding: 10px 12px; } .mt-bar .mi-bar-s b { font-size: 1rem; } }
