:root {
  --bg: #f5f7fb; --card: #fff; --text: #172033; --muted: #66708a; --line: #e3e8f2;
  --brand: #2f5bea; --brand-2: #1d3fb8; --ok: #12a150; --bad: #e5484d; --warn: #f5a524;
  --soft: #eef2ff; --radius: 14px; --hl: #ffe066; --sel: #e8eeff; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f1420; --card: #171e2e; --text: #e8ecf5; --muted: #98a2b8; --line: #263049; --soft: #1c2640; --hl: #8a6d00; --sel: #1f3170; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0f1420; --card: #171e2e; --text: #e8ecf5; --muted: #98a2b8; --line: #263049; --soft: #1c2640; --hl: #8a6d00; --sel: #1f3170; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "DM Sans", Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; }
.logo { background: var(--brand); color: #fff; font-weight: 800; padding: 4px 9px; border-radius: 9px; letter-spacing: .5px; }
#nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#nav a, #nav button { padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px; }
#nav a.active, #nav a:hover { background: var(--soft); color: var(--brand); }
main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 80px; }
h1 { font-size: 26px; margin: 0 0 6px; } h2 { font-size: 20px; margin: 24px 0 12px; } h3 { margin: 0 0 6px; font-size: 17px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 16px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 26px; } .stat span { color: var(--muted); font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--brand-2); } .btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--soft); color: var(--brand); } .btn.danger { background: var(--bad); } .btn.sm { padding: 6px 12px; font-size: 13px; }
button.link { background: none; border: 0; cursor: pointer; font: inherit; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
textarea { min-height: 260px; font-family: ui-monospace, monospace; font-size: 13px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .row > * { flex: 1; min-width: 140px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--brand); }
.badge.ok { background: #12a1501f; color: var(--ok); } .badge.bad { background: #e5484d1f; color: var(--bad); }
.hero { text-align: center; padding: 50px 10px 30px; }
.hero h1 { font-size: 38px; } .hero p { font-size: 18px; max-width: 600px; margin: 10px auto 24px; }
.auth { max-width: 420px; margin: 30px auto; }
.steps { padding-left: 20px; color: var(--muted); } .steps li { margin: 6px 0; }
.q { margin-bottom: 14px; } .q .num { color: var(--muted); font-size: 13px; font-weight: 600; }
.q .text { font-weight: 600; margin: 4px 0 12px; white-space: pre-wrap; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; margin: 7px 0; cursor: pointer; background: var(--card); width: 100%; text-align: left; font: inherit; color: inherit; }
.opt:hover { border-color: var(--brand); } .opt.sel { border-color: var(--brand); background: var(--soft); }
.opt.right { border-color: var(--ok); background: #12a15014; } .opt.wrong { border-color: var(--bad); background: #e5484d14; }
.opt .l { font-weight: 700; min-width: 20px; }
.explain { margin-top: 10px; padding: 10px 12px; background: var(--soft); border-radius: 10px; font-size: 14px; }
.testbar { position: sticky; top: 62px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 18px; } .timer.low { color: var(--bad); }
.dots { display: flex; flex-wrap: wrap; gap: 5px; } .dots a { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; font-size: 12px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.dots a.done { background: var(--brand); color: #fff; border-color: var(--brand); }
.bar { height: 8px; background: var(--line); border-radius: 9px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--brand); }
table { width: 100%; border-collapse: collapse; font-size: 14px; } th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; } th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
.score-big { font-size: 56px; font-weight: 800; color: var(--brand); line-height: 1; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; } .tabs a { padding: 8px 14px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 500; } .tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; } .chart div { flex: 1; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; } .chart div span { position: absolute; top: -18px; width: 100%; text-align: center; font-size: 11px; color: var(--muted); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #172033; color: #fff; padding: 11px 18px; border-radius: 10px; opacity: 0; transition: .25s; pointer-events: none; z-index: 99; max-width: 90vw; }
#toast.show { opacity: 1; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
@media (max-width: 600px) { .hero h1 { font-size: 28px; } .topbar { padding: 10px 14px; } .testbar { top: 100px; } }

#nav .theme-btn { display: inline-flex; align-items: center; padding: 6px 8px; color: var(--muted); }

/* ================= EXAM (TKT Digital uslubi) ================= */
body.exam-mode .topbar { display: none; }
body.exam-mode main { max-width: none; padding: 0; }
.exam { --exfs: 16px; position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); font-size: var(--exfs); }
.ex-head { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 15px; }
.ex-brand { display: flex; align-items: center; gap: 8px; }
.ex-cand { display: flex; flex-direction: column; line-height: 1.2; padding-left: 14px; border-left: 1px solid var(--line); }
.ex-cand small { color: var(--muted); font-size: 11px; }
.ex-timer { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 20px; padding: 4px 12px; border-radius: 9px; background: var(--soft); }
.ex-timer.low { color: #fff; background: var(--bad); }
.ex-tools { display: flex; align-items: center; gap: 6px; }
.ex-ic { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); cursor: pointer; font: inherit; font-weight: 700; }
.ex-ic:hover { border-color: var(--brand); color: var(--brand); }
.ex-ic.on { background: var(--hl); color: #172033; border-color: #d4b100; }
.ex-body { flex: 1; overflow-y: auto; padding: 20px max(16px, calc((100% - 960px) / 2)) 40px; }
.ex-instr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; }
.ex-qrange { font-weight: 700; margin-bottom: 4px; }
.ex-context { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; line-height: 1.75; }
.exq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; scroll-margin: 20px; }
.exq.cur { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent); }
.exq-head { display: flex; gap: 12px; align-items: flex-start; }
.ex-num { flex: 0 0 auto; min-width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid var(--text); border-radius: 4px; font-weight: 700; font-size: 0.9em; }
.exq-text { flex: 1; font-weight: 600; padding-top: 2px; }
.ex-flag { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.ex-flag:hover { color: var(--brand); } .ex-flag.on { color: #e5484d; } .ex-flag.on svg { fill: currentColor; }
.ex-ohead { margin: 12px 0 0 42px; font-size: 0.8em; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.ex-opts { margin: 8px 0 0 42px; display: flex; flex-direction: column; gap: 4px; }
.ex-opt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 1em; font-weight: 400; color: var(--text); margin: 0; border: 1px solid transparent; }
.ex-opt:hover { background: var(--soft); }
.ex-opt.sel { background: var(--sel); border-color: var(--brand); }
.ex-opt input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--brand); padding: 0; }
.ex-l { font-weight: 700; min-width: 16px; }
mark { background: var(--hl); color: inherit; border-radius: 2px; padding: 0 1px; }
.hl-mode .hlable { cursor: text; } .hl-mode mark { cursor: pointer; }
.ex-foot { display: flex; align-items: stretch; gap: 10px; background: var(--card); border-top: 1px solid var(--line); padding: 8px 12px; }
.ex-parts { flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.ex-pt { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; line-height: 1.25; }
.ex-pt small { color: var(--muted); }
.ex-pt:hover { border-color: var(--brand); }
.ex-pt.cur { flex-direction: row; align-items: center; gap: 10px; background: var(--soft); border-color: var(--brand); cursor: default; }
.ex-ptname { font-weight: 700; white-space: nowrap; }
.ex-nums { display: flex; gap: 4px; flex-wrap: wrap; }
.ex-n { position: relative; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; display: inline-grid; place-items: center; }
.ex-n.done { background: var(--brand); border-color: var(--brand); color: #fff; }
.ex-n.cur { outline: 2px solid var(--text); outline-offset: 1px; }
.ex-n.flag::after { content: ""; position: absolute; top: -4px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; border: 2px solid var(--card); }
.ex-arrows { display: flex; gap: 6px; align-items: center; }
.ex-arrow { width: 48px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.ex-arrow.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.ex-arrow:disabled { opacity: .35; cursor: default; }
.ex-overlay { position: fixed; inset: 0; background: rgba(10, 15, 30, .55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.ex-overlay[hidden] { display: none; }
.ex-menu { width: min(640px, 100%); max-height: 85vh; overflow-y: auto; }
.ex-mpart { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ex-mpart b { min-width: 58px; font-size: 14px; }
.ex-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ex-legend span { display: inline-flex; align-items: center; gap: 6px; } .ex-legend .ex-n { min-width: 16px; height: 16px; cursor: default; }
.partgrid { display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 760px) {
  .ex-head { gap: 8px; padding: 8px 10px; }
  .ex-brandtxt, .ex-cand { display: none; }
  .ex-timer { font-size: 17px; margin-left: 0; }
  .ex-tools { margin-left: auto; gap: 4px; }
  .ex-ic { min-width: 34px; height: 34px; padding: 0 5px; }
  .ex-opts, .ex-ohead { margin-left: 0; }
  .ex-body { padding: 14px 12px 30px; }
  .ex-arrow { width: 40px; }
}

/* ---------- Matching layout ---------- */
.mx { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.mx-qs .exq { margin-bottom: 10px; }
.mx-side { position: sticky; top: 0; max-height: calc(100vh - 190px); overflow-y: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mx-stitle { font-size: 0.75em; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 2px 4px 4px; }
.mx-stitle span { font-weight: 500; text-transform: none; letter-spacing: 0; }
.mx-opt { position: relative; display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; user-select: none; -webkit-user-select: none; line-height: 1.45; transition: border-color .15s, transform .1s; }
.mx-opt:hover { border-color: var(--brand); }
.mx-opt:active { transform: scale(.99); }
.mx-opt.used { border-left: 4px solid var(--brand); }
.mx-letter, .mx-badge { flex: 0 0 auto; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--brand); color: var(--brand); font-size: 0.75em; font-weight: 700; margin-top: 1px; }
.mx-otext { flex: 1; }
.mx-used { flex: 0 0 auto; align-self: center; font-size: 0.72em; font-weight: 700; color: #fff; background: var(--brand); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.ex-numbtn { background: var(--card); color: var(--text); cursor: pointer; font: inherit; font-weight: 700; font-size: 0.9em; }
.ex-numbtn:hover { border-color: var(--brand); color: var(--brand); }
.exq.cur .ex-numbtn { background: var(--brand); color: #fff; border-color: var(--brand); }
.mx-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 42px; }
.mx-picker[hidden] { display: none; }
.mx-pl { width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.mx-pl:hover { border-color: var(--brand); color: var(--brand); }
.mx-pl.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.mx-drop { display: flex; align-items: center; gap: 10px; margin: 10px 0 0 42px; min-height: 44px; padding: 8px 12px; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--bg); font-size: 0.95em; }
.mx-drop.filled { border-style: solid; border-color: var(--brand); background: var(--sel); }
.mx-ph { color: var(--muted); font-size: 0.8em; }
.mx-dtext { flex: 1; }
.mx-clear { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.mx-clear:hover { color: var(--bad); }
.mxq.over { border-color: var(--brand); background: var(--sel); }
.mxq.over .mx-drop { border-color: var(--brand); }
.mx-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: .92; box-shadow: 0 10px 30px rgba(0,0,0,.25); border-color: var(--brand); cursor: grabbing; }
.exam.dragging, .exam.dragging * { cursor: grabbing !important; user-select: none; }
@media (max-width: 760px) {
  .mx { grid-template-columns: 1fr; }
  .mx-side { order: -1; top: -14px; z-index: 3; max-height: 38vh; box-shadow: 0 6px 14px rgba(0,0,0,.08); }
  .mx-picker, .mx-drop { margin-left: 0; }
  .mx-opt { padding: 8px 10px; }
}
.fin-short { display: none; }
@media (max-width: 760px) {
  .ex-head { flex-wrap: nowrap; }
  .ex-tools { gap: 3px; }
  .ex-ic { min-width: 32px; height: 32px; padding: 0 4px; font-size: 13px; }
  .ex-ic svg { width: 17px; height: 17px; }
  .ex-timer { font-size: 15px; padding: 3px 8px; }
  .ex-head .logo { font-size: 14px; padding: 3px 7px; }
  .fin-full { display: none; } .fin-short { display: inline; }
  #finish { min-width: 34px; height: 32px; padding: 0 10px; }
  .mx-side { max-height: 32vh; padding: 8px; gap: 5px; font-size: 0.9em; }
  .mx-stitle span { display: none; }
}

/* Natija sharhi: yorqin to'g'ri / xato */
.opt.right { border: 2px solid #12a150; background: #d3f5e1; color: #0b4d28; font-weight: 600; }
.opt.right .l { color: #0b7a3b; }
.opt.wrong { border: 2px solid #e5484d; background: #fde0e1; color: #7a1418; font-weight: 600; }
.opt.wrong .l { color: #c42b30; }
.otag { flex: 0 0 auto; align-self: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; color: #fff; white-space: nowrap; }
.otag.ok { background: #12a150; } .otag.bad { background: #e5484d; }
.badge.ok { background: #12a150; color: #fff; } .badge.bad { background: #e5484d; color: #fff; }
:root[data-theme="dark"] .opt.right { background: #0f3d25; color: #c9f5da; border-color: #2fcf78; }
:root[data-theme="dark"] .opt.right .l { color: #5ee39a; }
:root[data-theme="dark"] .opt.wrong { background: #4a1518; color: #ffd6d8; border-color: #ff6b70; }
:root[data-theme="dark"] .opt.wrong .l { color: #ff8a8e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .opt.right { background: #0f3d25; color: #c9f5da; border-color: #2fcf78; }
  :root:not([data-theme="light"]) .opt.right .l { color: #5ee39a; }
  :root:not([data-theme="light"]) .opt.wrong { background: #4a1518; color: #ffd6d8; border-color: #ff6b70; }
  :root:not([data-theme="light"]) .opt.wrong .l { color: #ff8a8e; }
}
@media (max-width: 600px) { .opt { flex-wrap: wrap; } .otag { margin-left: 30px; } }

/* Modul kartochkalari */
.modgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 18px; }
.modcard { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.modcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--brand); }
.modcard:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30, 50, 120, .12); border-color: var(--brand); }
.modcard h2 { margin: 6px 0 0; font-size: 22px; }
.modcard p { margin: 0; font-size: 14px; }
.modcard.nodata { opacity: .8; }
.modtop { display: flex; justify-content: space-between; align-items: center; }
.modicon { font-size: 30px; line-height: 1; }
.modprog { margin-top: 12px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.modsoon { margin-top: 12px !important; font-size: 13px; color: var(--muted); font-style: italic; }
.modgo { margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--brand); font-size: 14px; }
.modhead { display: flex; gap: 14px; align-items: center; margin: 14px 0 20px; }
.modhead .modicon { font-size: 40px; }
.testcard h3 { margin-bottom: 2px; }
.cred { margin-top: 16px; padding: 16px; border-radius: 12px; background: #d3f5e1; border: 2px solid #12a150; color: #0b4d28; }
.cred .credrow { display: flex; gap: 10px; align-items: center; margin: 6px 0; font-size: 16px; }
.cred .credrow span { min-width: 52px; }
.cred code { font-size: 18px; font-weight: 700; background: #fff; padding: 2px 10px; border-radius: 6px; color: #0b4d28; }
.cred .btn { margin-top: 8px; }
:root[data-theme="dark"] .cred { background: #0f3d25; color: #c9f5da; border-color: #2fcf78; }
.codein { font-size: 22px; letter-spacing: 4px; text-transform: uppercase; text-align: center; font-family: ui-monospace, monospace; }
.modpick { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chk { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-weight: 500; cursor: pointer; }
.chk input { width: auto; margin: 0; accent-color: var(--brand); }
.modcard.locked { opacity: .7; }
.modcard.locked::before { background: var(--muted); }
.badge.keyneed { background: #f5a524; color: #3b2600; }
.keybox { border-left: 4px solid #f5a524; }
.qimg { display: block; max-width: min(100%, 360px); height: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; }
.courses { max-width: 1000px; margin: 10px auto 30px; padding: 26px 22px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 18px; }
.courses h2 { margin: 0 0 4px; text-align: center; font-size: 26px; }
.courses > p.muted { text-align: center; margin: 0 0 18px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.ccard { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, rgba(47,91,234,.07), rgba(47,91,234,0)); }
.ccard b { font-size: 17px; } .ccard small { color: var(--muted, #667); line-height: 1.35; }
.ccard .cic { font-size: 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 22px 0 10px; }
.btn.big { padding: 14px 22px; font-size: 16px; }
.small { font-size: 13px; }
@media (max-width: 600px) { .courses { padding: 18px 14px; } .cta .btn { width: 100%; text-align: center; } }
.lbgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
table.lb { width: 100%; border-collapse: collapse; }
table.lb td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
table.lb tr:last-child td { border-bottom: 0; }
table.lb .rk { width: 34px; text-align: center; font-weight: 700; }
table.lb tr.me td { background: var(--soft); }
.ctabox { margin-top: 14px; border-color: var(--brand); background: linear-gradient(135deg, rgba(47,91,234,.10), rgba(47,91,234,0)); }
.optbtn { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.optbtn:disabled { cursor: default; }
.optbtn:not(:disabled):hover { border-color: var(--brand); }
.mq .mi { font-size: 14px; color: var(--muted); margin: 6px 0 10px; white-space: pre-line; }
.mctx { margin: 6px 0 10px; font-size: 14px; } .mctx summary { cursor: pointer; color: var(--brand); } .mctx > div { white-space: pre-line; padding: 10px; background: var(--soft); border-radius: 10px; margin-top: 6px; }
.warnt { color: var(--warn); font-weight: 600; } .badt { color: var(--bad); font-weight: 600; }
.ucode { font-size: 14px; font-weight: 700; letter-spacing: .5px; background: var(--soft); padding: 3px 7px; border-radius: 6px; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 12px 16px; border-color: var(--brand); position: sticky; top: 64px; z-index: 5; }
.bulkbar b { margin-right: 6px; }
tr.selrow td { background: var(--soft); }
#uTable input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.exgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.exgrid .card h3 { margin-top: 0; }
.exlist { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.exs { align-items: flex-start !important; } .exs input { margin-top: 4px; }
.installbtn { color: var(--brand) !important; font-weight: 600 !important; }
.logoimg { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--brand); }
.ex-head .logoimg { width: 32px; height: 32px; }
.herobtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 720px; margin: auto; }
.herobtns .btn { white-space: nowrap; min-width: 160px; }
@media (max-width: 600px) { .herobtns .btn { flex: 1 1 100%; } }
.updbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 200; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: min(680px, calc(100% - 24px)); padding: 12px 16px; background: var(--card); border: 1.5px solid var(--brand); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 14px; }
.updbar span { flex: 1 1 260px; }
body.exam-mode .updbar { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

/* ===================== MUYDINOV ACADEMY — yangi uslub ===================== */
:root { --navy: #152140; --accent: #f4a340; --glow1: rgba(108, 125, 255, .28); --glow2: rgba(170, 140, 255, .22); --glow3: rgba(244, 163, 64, .14); --glass: rgba(255, 255, 255, .72); --display: "Syne", "DM Sans", system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glow1: rgba(90, 110, 255, .22); --glow2: rgba(150, 110, 255, .16); --glow3: rgba(244, 163, 64, .08); --glass: rgba(23, 30, 46, .72); } }
:root[data-theme="dark"] { --glow1: rgba(90, 110, 255, .22); --glow2: rgba(150, 110, 255, .16); --glow3: rgba(244, 163, 64, .08); --glass: rgba(23, 30, 46, .72); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40vw 40vw at 8% 12%, var(--glow1), transparent 70%), radial-gradient(38vw 38vw at 95% 30%, var(--glow2), transparent 70%), radial-gradient(34vw 34vw at 30% 95%, var(--glow3), transparent 70%); }
body.exam-mode::before { display: none; }
.topbar { background: var(--glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.brand span { font-family: var(--display); letter-spacing: -.01em; }
#scrollBar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--brand), #8b7bff, var(--accent)); }
h1, h2 { font-family: var(--display); letter-spacing: -.02em; }

body.landing main#app { max-width: none; padding: 0; }
.lp-glass { background: var(--glass); border: 1px solid color-mix(in srgb, var(--brand) 14%, var(--line)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 20px; box-shadow: 0 10px 40px -18px rgba(40, 60, 160, .25); }
.lp-hero { position: relative; overflow: hidden; min-height: min(640px, 86vh); display: grid; place-items: center; padding: 70px max(16px, env(safe-area-inset-left, 0px)) 60px; text-align: center; }
#lpNet { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent); mask-image: radial-gradient(closest-side, #000 55%, transparent); }
.lp-hero-in { position: relative; max-width: 1000px; }
.lp-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.lp-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.lp-h1 { font-size: clamp(30px, 5vw, 58px); line-height: 1.08; margin: 22px 0 18px; color: var(--text); text-wrap: balance; }
.lp-type { background: linear-gradient(90deg, var(--brand), #8b5cf6 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-caret { display: inline-block; width: 3px; height: .9em; margin-left: 4px; vertical-align: -.08em; background: var(--brand); animation: lpblink 1s steps(1) infinite; }
@keyframes lpblink { 50% { opacity: 0; } }
.lp-sub { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 620px; margin: 0 auto 30px; }
.lp-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 99px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line)); background: var(--glass); color: var(--text); box-shadow: 0 6px 20px -10px rgba(40, 60, 160, .35); transition: transform .2s, box-shadow .2s; text-decoration: none; }
.lp-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(40, 60, 160, .45); }
.lp-btn.primary { background: linear-gradient(135deg, var(--brand), #6d5cff); color: #fff; border-color: transparent; }
.lp-btn.light { background: #fff; color: var(--navy); border-color: transparent; }
.lp-btn.outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.lp-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lp-stats { max-width: 880px; margin: -30px auto 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 26px 10px; }
.lp-stats > div { text-align: center; padding: 6px 10px; border-right: 1px solid var(--line); }
.lp-stats > div:last-child { border-right: 0; }
.lp-stats b { display: block; font-family: var(--display); font-size: clamp(26px, 4vw, 40px); color: var(--brand); font-variant-numeric: tabular-nums; }
.lp-stats span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.lp-marquee { overflow: hidden; margin: 46px 0 10px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.lp-track { display: flex; gap: 14px; width: max-content; animation: lpscroll 40s linear infinite; }
.lp-chip { padding: 10px 20px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); font-weight: 600; color: var(--muted); white-space: nowrap; }
@keyframes lpscroll { to { transform: translateX(-33.333%); } }
.lp-sec { max-width: 1120px; margin: 0 auto; padding: 70px max(16px, env(safe-area-inset-left, 0px)) 10px; }
.lp-h2 { text-align: center; font-size: clamp(30px, 4.4vw, 46px); margin: 0; background: linear-gradient(90deg, var(--brand), #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-h2::after { content: ""; display: block; width: 46px; height: 3px; border-radius: 3px; margin: 14px auto 0; background: var(--accent); }
.lp-h2.left { text-align: left; } .lp-h2.left::after { margin-left: 0; }
.lp-lead { text-align: center; color: var(--muted); margin: 12px 0 34px; font-size: 17px; }
.lp-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.lp-course, .lp-feat { padding: 22px; transition: transform .25s, box-shadow .25s; min-width: 0; }
.lp-course:hover, .lp-feat:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(40, 60, 160, .4); }
.lp-course h3, .lp-feat h3 { font-family: var(--display); font-size: 18px; margin: 14px 0 6px; }
.lp-course p, .lp-feat p { margin: 0; color: var(--muted); font-size: 14.5px; }
.lp-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-family: var(--display); font-weight: 800; color: #fff; font-size: 15px; }
.lp-ic.g0 { background: linear-gradient(135deg, #2f5bea, #6d5cff); } .lp-ic.g1 { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.lp-ic.g2 { background: linear-gradient(135deg, #f4a340, #f97316); } .lp-ic.g3 { background: linear-gradient(135deg, #152140, #2f5bea); }
.lp-about { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 48px; align-items: center; }
.lp-photo img { width: 100%; height: auto; border-radius: 50%; box-shadow: 0 30px 60px -25px rgba(21, 33, 64, .55); }
.lp-text { color: var(--muted); font-size: 16.5px; max-width: 62ch; margin: 18px 0; }
.lp-text b { color: var(--text); }
.lp-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lp-fi { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 22px; background: color-mix(in srgb, var(--brand) 10%, transparent); }
.lp-cta { max-width: 1080px; margin: 80px auto 0; padding: 54px 24px; border-radius: 28px; text-align: center; color: #fff; background: radial-gradient(60% 120% at 85% 0%, rgba(244, 163, 64, .35), transparent 60%), linear-gradient(135deg, var(--navy), #2a3f8f); }
.lp-cta h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); margin: 0 0 10px; }
.lp-cta p { color: rgba(255, 255, 255, .8); margin: 0 0 26px; }
.lp-foot { max-width: 1120px; margin: 60px auto 0; padding: 26px max(16px, env(safe-area-inset-left, 0px)) 34px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.lp-foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 17px; }
.lp-foot-brand img { border-radius: 50%; }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 18px; } .lp-foot nav a { color: var(--muted); } .lp-foot nav a:hover { color: var(--brand); }
.lp-foot small { color: var(--muted); }
body.landing #pubLb .card { background: var(--glass); backdrop-filter: blur(12px); }
@media (max-width: 760px) {
  .lp-stats { grid-template-columns: repeat(2, 1fr); margin: -20px 16px 0; row-gap: 14px; }
  .lp-stats > div:nth-child(2) { border-right: 0; }
  .lp-about { grid-template-columns: 1fr; gap: 26px; text-align: center; } .lp-photo { max-width: 240px; margin: auto; }
  .lp-h2.left { text-align: center; } .lp-h2.left::after { margin-left: auto; } .lp-text { margin-inline: auto; }
  .lp-cta { margin: 60px 16px 0; } .lp-btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .lp-track { animation: none; } .lp-caret { animation: none; } .lp-btn, .lp-course, .lp-feat { transition: none; } }
.nw { white-space: nowrap; }
/* test himoyasi */
.exam { -webkit-touch-callout: none; }
.ex-wm { position: absolute; inset: 0; z-index: 30; pointer-events: none; background-repeat: repeat; background-image: var(--wm-d); }
@media (max-width: 760px), (pointer: coarse) { .ex-wm { background-image: var(--wm-m); } }
.ex-shield { position: fixed; inset: 0; z-index: 400; background: #000; color: #fff; display: grid; place-items: center; padding: 24px; text-align: center; }
.ex-shield > div { display: grid; gap: 14px; max-width: 420px; justify-items: center; }
.ex-shield b { font-size: 22px; } .ex-shield span { color: #bbb; font-size: 15px; }
@media print { body * { visibility: hidden !important; } body::after { content: "Chop etish taqiqlangan — Muydinov Academy"; visibility: visible; position: fixed; top: 40%; left: 0; right: 0; text-align: center; font-size: 24px; } }
#toast { z-index: 500; }
.ex-shield[hidden] { display: none; }
