/* FizOmuz — услуб. Оддӣ, равшан, барои телефон дар навбати аввал. */
:root {
  --brand: #1f6feb; --brand-d: #1550c0; --accent: #f59e0b; --accent-l: #fef3c7;
  --night: #070b14; --night-2: #0f1a30; --glow: #4da3ff; --silver: #c7cdd8; --chalk: #9be7a8;
  --ink: #0f172a; --text: #1e293b; --muted: #64748b; --line: #e2e8f0;
  --bg: #f6f8fc; --card: #fff; --ok: #16a34a; --ok-l: #dcfce7; --bad: #dc2626; --bad-l: #fee2e2;
  --sec: var(--brand); --r: 16px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.06);
  font-size: 17px;
}
html.bigtext { font-size: 20px; }
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: var(--brand); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main { min-height: 70vh; padding-top: 20px; padding-bottom: 40px; outline: none; }
button { font: inherit; cursor: pointer; }
.ic { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ic svg, .bottomnav svg, .search svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Сарлавҳа ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--night); border-bottom: 1px solid #1c2740; }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--brand); }
.logo-mark { display: block; width: 40px; height: 40px; border-radius: 50%; clip-path: circle(48.5%); }
.logo-text { font-family: Comfortaa, "Trebuchet MS", sans-serif; font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: .01em; text-shadow: 0 0 10px rgba(77,163,255,.55); }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { text-decoration: none; color: var(--silver); font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.mainnav a:hover { background: #142038; color: #fff; }
.mainnav a.on { background: #15305f; color: #fff; box-shadow: inset 0 0 0 1px #2b5ca8; }
.textsize { border: 1.5px solid #2a3654; background: transparent; border-radius: 10px; padding: 4px 10px; font-weight: 800; color: #fff; }
.textsize span { color: var(--glow); }
.textsize[aria-pressed="true"] { background: #15305f; border-color: var(--glow); }

.bottomnav { display: none; }
@media (max-width: 760px) {
  .mainnav { display: none; }
  .textsize { margin-left: auto; }
  body { padding-bottom: 72px; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--night); border-top: 1px solid #1c2740; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: #8b95a7; font-size: .75rem; font-weight: 600; padding: 4px 0; border-radius: 12px; }
  .bottomnav svg { width: 26px; height: 26px; }
  .bottomnav a.on { color: #fff; background: #15305f; }
  .bottomnav a.on svg { color: var(--glow); filter: drop-shadow(0 0 4px rgba(77,163,255,.7)); }
  .logo-text { font-size: 1.3rem; }
  h1 { font-size: 1.45rem; }
}

/* ---------- Тугмаҳо ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 700; text-decoration: none; min-height: 44px; transition: transform .1s, background .15s; }
.btn:hover { background: var(--brand-d); }
.btn:active { transform: scale(.98); }
.btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.btn.big { padding: 14px 22px; font-size: 1.05rem; min-height: 54px; }
.btn.alt { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px var(--silver); }
.btn.alt:hover { background: rgba(255,255,255,.08); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 8px 14px; font-weight: 600; text-decoration: none; min-height: 42px; }
.chip.on { background: var(--sec); border-color: var(--sec); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; margin: 20px 0; }

/* ---------- Асосӣ ---------- */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; border-radius: 24px; padding: 36px; margin-bottom: 20px; color: #e2e8f0;
  background: radial-gradient(circle at 78% 50%, rgba(31,111,235,.35), transparent 55%), linear-gradient(135deg, #0b1324, var(--night)); box-shadow: 0 12px 34px rgba(7,11,20,.35); }
.hero > * { position: relative; }
.hero h1 { font-size: 2.4rem; color: #fff; }
.hero .lead { color: #b6c0d1; }
.hero .btn:not(.alt) { background: var(--brand); box-shadow: 0 0 18px rgba(77,163,255,.45); }
.lead { font-size: 1.1rem; color: var(--muted); }
.slogan { font-family: Georgia, "Times New Roman", serif; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .85rem; color: var(--silver); margin-bottom: .6em; }
.slogan i { font-style: normal; color: var(--glow); padding: 0 .25em; }
.chalk { position: absolute !important; inset: 0; pointer-events: none; font-family: Caveat, "Segoe Print", "Bradley Hand", cursive; font-size: 1.5rem; }
.chalk span { position: absolute; white-space: nowrap; opacity: .22; color: #fff; transform: rotate(-4deg); }
.chalk span:nth-child(odd) { color: var(--chalk); opacity: .3; }
.chalk span:nth-child(1) { top: 6%; left: 46%; } .chalk span:nth-child(2) { top: 80%; left: 52%; } .chalk span:nth-child(3) { top: 12%; left: 82%; }
.chalk span:nth-child(4) { top: 86%; left: 4%; } .chalk span:nth-child(5) { top: 44%; left: 88%; } .chalk span:nth-child(6) { top: 3%; left: 4%; }
.chalk span:nth-child(7) { top: 66%; left: 86%; } .chalk span:nth-child(8) { top: 90%; left: 30%; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 800; color: var(--sec); margin-bottom: .4em; }
.hero-art { display: flex; justify-content: center; }
.hero-art .badge { width: 100%; max-width: 300px; height: auto; display: block; border-radius: 50%; clip-path: circle(48.5%); box-shadow: 0 0 40px rgba(77,163,255,.4); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding: 24px 20px; text-align: center; } .hero h1 { font-size: 1.7rem; } .hero-art { order: -1; } .hero-art .badge { max-width: 150px; } .cta .btn { width: 100%; } .chalk { font-size: 1.2rem; } }
.continue { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--night-2); border: 2px solid #2b5ca8; border-radius: var(--r); padding: 14px 18px; text-decoration: none; color: #fff; margin-bottom: 24px; }
.continue small { display: block; color: var(--glow); font-weight: 700; }
.continue .ic { color: var(--glow); }
.continue b { font-size: 1.1rem; }
section { margin-bottom: 32px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.steps li span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 8px; }
.steps li b { display: block; color: var(--ink); }
.steps li p { color: var(--muted); margin: 4px 0 0; }
@media (max-width: 760px) { .steps ol { grid-template-columns: 1fr; } .steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; } .steps li span { grid-row: span 2; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 28px; }
.card { display: flex; flex-direction: column; background: #fff; border-radius: var(--r); padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border-top: 5px solid var(--sec); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.1); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-top .ic { width: 44px; height: 44px; padding: 9px; border-radius: 12px; background: color-mix(in srgb, var(--sec) 12%, #fff); color: var(--sec); }
.num { font-weight: 800; color: var(--sec); opacity: .5; font-size: 1.4rem; }
.card h3 { margin-bottom: 4px; }
.card p { color: var(--muted); font-size: .95rem; flex: 1; }
.card-foot { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.card-foot .bar { flex: 1; }
.big-card .btn { margin-top: 10px; align-self: flex-start; background: var(--sec); }
.best { color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--sec); border-radius: 99px; transition: width .3s; }
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.subj { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: #fff; border-radius: var(--r); padding: 18px 10px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 2px solid var(--c); }
.subj .ic { width: 40px; height: 40px; color: var(--c); }
.subj small { font-weight: 700; color: var(--c); }
.subj.soon { border-color: var(--line); opacity: .75; }
.subj.soon small { color: var(--muted); }
.yt { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); flex-wrap: wrap; }
.yt > .ic { width: 48px; height: 48px; color: #dc2626; }
.yt div { flex: 1; min-width: 200px; } .yt p { margin: 0; color: var(--muted); }
.yt .btn { background: #dc2626; }

/* ---------- Саҳифаҳо ---------- */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs i { font-style: normal; opacity: .6; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.page-head { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); border-left: 6px solid var(--sec); margin-bottom: 18px; }
.page-head > .ic { width: 56px; height: 56px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--sec) 12%, #fff); color: var(--sec); }
.page-head h1 { margin-bottom: 4px; } .page-head p { color: var(--muted); margin-bottom: 8px; }
.page-head > div { flex: 1; }
.prog { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); max-width: 360px; }
h2.sub { font-size: 1.15rem; margin: 22px 0 12px; }
.banner { display: flex; align-items: center; gap: 14px; background: var(--accent-l); border: 2px solid var(--accent); border-radius: var(--r); padding: 14px 18px; text-decoration: none; color: var(--ink); }
.banner > .ic:first-child { width: 36px; height: 36px; color: #b45309; }
.banner span { flex: 1; } .banner small { display: block; color: #92400e; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border: 2px solid transparent; min-height: 64px; }
.row:hover { border-color: var(--sec); }
.row-num { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--sec) 12%, #fff); color: var(--sec); font-weight: 800; }
.row-num .ic { width: 22px; height: 22px; }
.row.done .row-num { background: var(--ok); color: #fff; }
.row-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-main b { color: var(--ink); font-size: 1.05rem; }
.row-main small { color: var(--muted); }
.row-main .bar { max-width: 240px; height: 6px; margin-top: 4px; }
.row-meta { display: flex; align-items: center; gap: 4px; color: var(--sec); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.row.nolesson .row-meta { color: var(--muted); font-weight: 500; }
.row.done .row-meta { color: var(--ok); }
@media (max-width: 520px) { .row-meta { font-size: 0; } .row-meta .ic { font-size: 17px; } }
.back { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; text-decoration: none; font-weight: 700; padding: 10px 0; }
.empty { text-align: center; padding: 40px 0; }
.empty > .ic { width: 72px; height: 72px; color: var(--sec); }

/* ---------- Дарс ---------- */
.lesson-grid { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.side { position: sticky; top: 80px; background: #fff; border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.side > b { padding: 4px 8px 8px; color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.side a { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: .93rem; line-height: 1.35; }
.side a span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); font-size: .75rem; font-weight: 800; }
.side a.done span { background: var(--ok); color: #fff; }
.side a.on { background: color-mix(in srgb, var(--sec) 12%, #fff); font-weight: 700; color: var(--ink); }
.side a.on span { background: var(--sec); color: #fff; }
article { min-width: 0; }
@media (max-width: 900px) { .lesson-grid { grid-template-columns: 1fr; } .side { position: static; order: 2; } }
.lesson-head { margin-bottom: 16px; }
.lesson-head h1 { font-size: 2rem; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools .chip .ic { color: var(--sec); }
.box { background: #fff; border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); margin: 18px 0; }
.box h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.box.key { border-left: 6px solid var(--sec); background: color-mix(in srgb, var(--sec) 6%, #fff); }
.box.key ul { margin: 0; padding-left: 1.2em; } .box.key li { margin-bottom: 6px; }
.box.fx { border: 2px solid color-mix(in srgb, var(--sec) 35%, #fff); }
.box.ex { border-left: 6px solid #16a34a; }
.box.tip { border-left: 6px solid var(--accent); background: #fffbeb; }
.box.tip h2::before { content: "💡"; }
.box.soonbox { text-align: center; border: 2px dashed var(--line); box-shadow: none; }
.box.info { border-left: 6px solid var(--sec); }
.prose { background: #fff; border-radius: var(--r); padding: 6px 20px 14px; box-shadow: var(--shadow); }
.prose h3 { margin-top: 1.1em; color: var(--sec); }
.note { background: #f1f5f9; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.list { padding-left: 1.2em; margin: 0 0 .5em; } .list li { margin-bottom: 6px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.fx-item { background: var(--bg); border-radius: 12px; padding: 12px; text-align: center; }
.fx-item .f { font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; font-size: 1.35rem; color: var(--ink); min-height: 2.2em; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.fx-item small { color: var(--muted); }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 2px; }
.frac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 3px; }
.frac > span { line-height: 1.25; font-size: .9em; }
.sqrt > span { border-top: 1.5px solid currentColor; padding: 0 2px; }
.vec { position: relative; display: inline-block; }
.vec::after { content: "→"; position: absolute; left: 0; right: 0; top: -.85em; font-size: .7em; text-align: center; }
.ex-q { font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.ex-steps { margin: 12px 0; padding-left: 1.4em; } .ex-steps li { margin-bottom: 8px; padding-left: 4px; }
.ex-a { background: var(--ok-l); border-radius: 10px; padding: 10px 14px; color: #14532d; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; margin: 12px 0; font-size: .95rem; box-shadow: var(--shadow); }
.tbl th { background: color-mix(in srgb, var(--sec) 12%, #fff); color: var(--ink); text-align: left; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose .tbl { box-shadow: none; border: 1px solid var(--line); }
.fig { margin: 14px 0; text-align: center; }
.fig svg { width: 100%; max-width: 420px; height: auto; }
.fig .t { font-size: 14px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.fig figcaption { color: var(--muted); font-size: .9rem; }
.ohm { display: grid; grid-template-columns: 1fr 1fr; width: 160px; margin: 10px auto; font-size: 1.6rem; font-weight: 800; text-align: center; color: var(--sec); }
.ohm div:first-child { grid-column: span 2; border-bottom: 3px solid var(--sec); padding-bottom: 4px; }
.ohm div:nth-child(2) { border-right: 3px solid var(--sec); }
.quiz { margin-top: 28px; }
.qlist { display: flex; flex-direction: column; gap: 14px; }
.donebtn { width: 100%; margin-top: 24px; background: #fff; color: var(--ok); border: 2px solid var(--ok); }
.donebtn:hover { background: var(--ok-l); }
.donebtn.is-done { background: var(--ok); color: #fff; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.pn a { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); font-weight: 700; line-height: 1.3; }
.pn a.nx { justify-content: flex-end; text-align: right; }
.pn small { display: block; color: var(--muted); font-weight: 500; }
.pn .ic { color: var(--sec); }
@media (max-width: 520px) { .pn { grid-template-columns: 1fr; } }

/* ---------- Савол ---------- */
.q { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 2px solid transparent; }
.q.ok { border-color: var(--ok); } .q.bad { border-color: var(--bad); }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q-num { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; }
.q-type { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.q-text { color: var(--ink); font-weight: 600; margin-bottom: 12px; }
.q-text .fig svg { max-width: 340px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .opts { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 52px; color: var(--text); }
.opt:hover:not(:disabled) { border-color: var(--sec); background: var(--bg); }
.L { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--muted); font-weight: 800; color: var(--ink); font-size: .9rem; }
.L.n { border-radius: 8px; }
.opt.sel, .bub.sel { border-color: var(--sec); background: color-mix(in srgb, var(--sec) 10%, #fff); }
.opt.sel .L { background: var(--sec); border-color: var(--sec); color: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-l); } .opt.right .L { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-l); } .opt.wrong .L { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt:disabled { cursor: default; color: var(--text); }
.q-fb { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.q.ok .q-fb { background: var(--ok-l); color: #14532d; } .q.bad .q-fb { background: var(--bad-l); color: #7f1d1d; }
.expl { margin-top: 4px; color: var(--text); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .match { grid-template-columns: 1fr; } }
.match ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.match li { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.hint { font-size: .9rem; color: var(--muted); margin: 12px 0 8px; }
.msheet { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.mrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mrow > .L { background: var(--ink); color: #fff; border-color: var(--ink); }
.bub { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-weight: 800; color: var(--text); }
.bub:hover:not(:disabled) { border-color: var(--sec); }
.bub.sel { background: var(--sec); color: #fff; }
.bub.right { background: var(--ok); border-color: var(--ok); color: #fff; }
.bub.wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.bub:disabled { cursor: default; }
.open { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; color: var(--ink); }
.open input { font: inherit; font-size: 1.15rem; width: 160px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; }
.open input:focus { outline: none; border-color: var(--sec); }
.open em { font-style: normal; color: var(--muted); }
.check { margin-top: 10px; }

/* ---------- ИМД ---------- */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.type { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); position: relative; }
.type b { display: block; color: var(--ink); margin: 6px 0; line-height: 1.35; }
.type p { color: var(--muted); font-size: .95rem; }
.tn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #1f1300; font-weight: 800; }
.mini { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini .L.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.ansline { border-bottom: 2px solid var(--ink); padding: 0 16px 2px 0; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.links a { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); text-decoration: none; border-left: 5px solid var(--accent); }
.links b { display: block; color: var(--ink); } .links small { color: var(--muted); }
.hist { display: flex; flex-direction: column; gap: 6px; }
.hist div { display: flex; justify-content: space-between; background: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); }
.startbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.ptop { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ptop span { color: var(--muted); }
.qhost { margin-top: 16px; }
.pnext { margin-top: 16px; display: flex; justify-content: flex-end; }
@media (max-width: 600px) { .pnext .btn { width: 100%; } }
.result { text-align: center; background: #fff; border-radius: 24px; padding: 28px 16px; box-shadow: var(--shadow); margin: 10px 0 20px; }
.ring { --p: 0; width: 140px; height: 140px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sec) calc(var(--p) * 1%), var(--line) 0); }
.ring b { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 50%; background: #fff; font-size: 1.8rem; color: var(--ink); }
.secres { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.secres a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border-top: 4px solid var(--sec); }
.secres .bar { flex-basis: 100%; }
.review { display: flex; flex-direction: column; gap: 14px; }

/* Варақаи имтиҳон (дар шакли варақаҳои ММТ) */
.paper { background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 22px 22px; box-shadow: 0 10px 30px rgba(15,23,42,.08); }
.paper-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 3px double var(--ink); padding: 14px 0 10px; margin-bottom: 16px; font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.paper-head b { color: var(--ink); font-size: 1rem; }
.paper.intro { max-width: 760px; margin: 0 auto; }
.paper.intro .btn { margin-top: 16px; }
.paper-sec { font-size: .95rem; text-align: center; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 4px; margin: 22px 0 14px; letter-spacing: .03em; }
.paper .q { box-shadow: none; border: 0; border-bottom: 1px dashed #cbd5e1; border-radius: 0; padding: 16px 0; }
.paper .q-num { border-radius: 4px; }
.paper .finish { width: 100%; margin-top: 20px; }
.mock-grid { display: grid; grid-template-columns: 1fr 270px; gap: 20px; align-items: start; }
.sheet { position: sticky; top: 80px; background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); border-top: 5px solid var(--accent); }
.sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; background: var(--bg); padding: 4px 10px; border-radius: 8px; }
.timer.low { background: var(--bad-l); color: var(--bad); }
.sheet-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 10px; }
.sheet-grid a { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); text-decoration: none; color: var(--text); font-weight: 700; font-size: .85rem; }
.sheet-grid a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sheet .finish { width: 100%; }
@media (max-width: 900px) {
  .mock-grid { grid-template-columns: 1fr; }
  .sheet { position: sticky; top: auto; bottom: 76px; z-index: 10; padding: 10px 12px; box-shadow: 0 -6px 20px rgba(15,23,42,.15); }
  .sheet-grid { grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); gap: 4px; }
  .sheet-top { margin-bottom: 6px; }
  .sheet .finish, .sheet #answered { display: none; }
  .paper { padding: 0 14px 16px; }
}
@media (min-width: 761px) and (max-width: 900px) { .sheet { bottom: 10px; } }

/* ---------- Ҷустуҷӯ ---------- */
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 6px 14px; margin-bottom: 12px; }
.search:focus-within { border-color: var(--brand); }
.search svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 1.1rem; padding: 8px 0; min-width: 0; background: transparent; }

.footer { background: var(--night); color: #b6c0d1; padding: 26px 0; font-size: .9rem; }
.footer b { color: #fff; } .footer a { color: var(--glow); } .footer .muted { color: #8b95a7; }
.footer p { margin: 0 0 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Услуби канал: тахтаи синф ва дурахши кабуд */
.yt { background: linear-gradient(135deg, #0b1324, var(--night)); color: #e2e8f0; }
.yt b { color: #fff; } .yt p { color: #b6c0d1 !important; }
.paper-sec { background: var(--night); box-shadow: inset 0 -2px 0 var(--glow); }
.q-num { background: var(--night); }
.steps li span { background: var(--night); box-shadow: 0 0 0 2px var(--glow); }
.lesson-head h1 { position: relative; padding-bottom: 10px; }
.lesson-head h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 4px; background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.box.ex { background: linear-gradient(#fff, #fff) padding-box; }
.ex-steps { font-family: inherit; }

/* ---------- Сатҳи душворӣ ---------- */
.q-head { flex-wrap: wrap; }
.q-d { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: .8rem; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 999px; }
.q-d i, .dchip i { display: inline-block; width: 6px; height: 14px; border-radius: 2px; background: currentColor; opacity: .25; }
.q-d i:last-of-type { margin-right: 4px; }
.d1 { --dc: #16a34a; } .d2 { --dc: #d97706; } .d3 { --dc: #dc2626; }
.q-d { color: var(--dc); background: color-mix(in srgb, var(--dc) 12%, #fff); }
.d1 i:nth-child(-n+1), .d2 i:nth-child(-n+2), .d3 i:nth-child(-n+3) { opacity: 1; }
.dchip { color: var(--dc); border-color: color-mix(in srgb, var(--dc) 40%, #fff); }
.dchip i { width: 5px; height: 12px; margin-right: 0; }
.dchip i { opacity: 1; margin-right: 4px; }
.chip.dchip.on { background: var(--dc); border-color: var(--dc); color: #fff; }
.quizbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.quizbar .chips { margin: 0; }
#regen { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, #fff); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 8px; }
.stats div { background: var(--night); color: #b6c0d1; border-radius: var(--r); padding: 16px; text-align: center; }
.stats b { display: block; font-size: 2rem; color: #fff; text-shadow: 0 0 12px rgba(77,163,255,.6); }
.stats span { font-size: .85rem; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } .stats div { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 16px; } .stats b { font-size: 1.5rem; min-width: 3ch; } }

/* ---------- Графикҳо ---------- */
.graph svg { color: var(--ink); max-width: 400px; }
.graph .gr { stroke: #e2e8f0; stroke-width: 1; }
.graph .ax { stroke: var(--ink); stroke-width: 1.6; }
.graph .tk { font-size: 11px; fill: var(--muted); font-family: inherit; }
.graph .al { font-size: 13px; font-weight: 700; fill: var(--ink); font-family: inherit; font-style: italic; }
.graph .ll { font-size: 14px; font-weight: 800; font-family: inherit; fill: var(--ink); }
.q-text .graph { margin: 12px 0 4px; }
.graph.mini { margin: 0; }
.graph.mini svg { width: 120px; max-width: 100%; }
.opt .graph.mini { flex: 1; text-align: left; }

.previewbar { position: sticky; top: 0; z-index: 40; background: #f59e0b; color: #1f1300; text-align: center; padding: 8px 12px; font-weight: 700; font-size: .9rem; }
.previewbar a { color: #1f1300; margin-left: 8px; }
.gerr { color: var(--bad); }

/* ---------- Менюи кушодашаванда (dropdown) ---------- */
.mainnav { align-items: center; }
.mainnav > a, .dd-btn { text-decoration: none; color: var(--silver); font-weight: 600; padding: 8px 12px; border-radius: 999px; font-size: .95rem; white-space: nowrap; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem; }
.dd-btn:hover, .mainnav > a:hover { background: #142038; color: #fff; }
.dd.on > .dd-btn, .mainnav > a.on { background: #15305f; color: #fff; box-shadow: inset 0 0 0 1px #2b5ca8; }
.chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; transition: transform .2s; }
.dd.open .chev { transform: rotate(180deg); }
.dd-menu { display: none; position: absolute; top: calc(100% + 10px); left: 0; min-width: 320px; background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(7,11,20,.25); padding: 8px; z-index: 50; }
.dd-menu::before { content: ""; position: absolute; top: -6px; left: 28px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.dd.open .dd-menu { display: grid; gap: 2px; }
.dd-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.dd-item:hover { background: var(--bg); }
.dd-item > .ic { width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--brand)) 12%, #fff); color: var(--c, var(--brand)); }
.dd-item b { display: block; font-size: .95rem; }
.dd-item small { color: var(--muted); font-size: .82rem; }
.dd-item.soon { opacity: .55; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--silver); }
.iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.iconbtn:hover, .iconbtn.on { background: #15305f; color: #fff; }
.menubtn { display: none; align-items: center; gap: 6px; border: 1.5px solid #2a3654; background: transparent; color: #fff; border-radius: 10px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.menubtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (max-width: 1180px) { .mainnav { display: none !important; } .menubtn { display: inline-flex; } .iconbtn { margin-left: auto; } }
@media (max-width: 760px) { .menubtn, .iconbtn { display: none; } .textsize { margin-left: auto; } }

/* Менюи паҳлӯӣ (drawer) */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(7,11,20,.55); display: flex; justify-content: flex-end; }
.drawer-panel { width: min(380px, 88vw); height: 100%; background: #fff; overflow-y: auto; padding: 0 0 30px; animation: drIn .2s ease-out; }
@keyframes drIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.dr-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--night); color: #fff; }
.dr-close { border: 0; background: #15305f; color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.dr-link { display: block; padding: 14px 20px; font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.dr-link.on { color: var(--brand); background: #eff6ff; }
.dr-group { border-bottom: 1px solid var(--line); padding: 8px 0; }
.dr-group p { margin: 0; padding: 8px 20px 4px; font-size: .8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dr-sub { display: block; padding: 10px 20px 10px 32px; color: var(--ink); text-decoration: none; font-weight: 600; }
.dr-sub:hover, .dr-link:hover { background: var(--bg); }
.dr-sub.soon { color: var(--muted); font-weight: 500; }
body.noscroll { overflow: hidden; }

/* ---------- Филтрҳо (dropdown) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 16px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.filters select { font: inherit; font-size: 1rem; color: var(--ink); min-width: 200px; padding: 10px 40px 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.filters select:focus { outline: none; border-color: var(--sec); }
@media (max-width: 600px) { .filters label { flex: 1 1 100%; } .filters select { width: 100%; } }

/* ---------- Олимпиадаҳо ---------- */
.banner.gold { background: #fefce8; border-color: #ca8a04; margin: 4px 0 8px; }
.banner.gold > .ic:first-child { color: #ca8a04; }
.intl { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.intl-card { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.intl-card .abbr { align-self: flex-start; background: var(--night); color: #fff; font-weight: 800; letter-spacing: .05em; padding: 4px 12px; border-radius: 8px; box-shadow: inset 0 -2px 0 var(--glow); }
.intl-card small { color: var(--muted); }
.intl-card .cta { margin-top: 8px; gap: 8px; }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: .9rem; }
.btn.alt2 { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 2px #bfdbfe; }
.btn.ghost2 { background: #fff; color: var(--sec); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sec) 40%, #fff); }
.oset { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; border-top: 5px solid var(--sec); }
.oset > header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.oset > header small { color: var(--muted); }
.ochip { display: inline-block; background: var(--sec); color: #fff; font-weight: 800; border-radius: 8px; padding: 3px 10px; }
.ofiles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ofiles a { background: var(--bg); border-radius: 10px; padding: 8px 12px; text-decoration: none; font-weight: 600; }
.oprob { border-top: 1px dashed var(--line); padding: 14px 0 6px; }
.osol { margin-top: 10px; }
.osol .prose { box-shadow: none; background: var(--bg); }

/* ---------- Ифтихори мо ---------- */
.pride-hero, .anc-hero { border-radius: 24px; padding: 32px; color: #e2e8f0; background: radial-gradient(circle at 85% 20%, rgba(202,138,4,.35), transparent 50%), linear-gradient(135deg, #0b1324, var(--night)); margin-bottom: 18px; }
.pride-hero h1, .anc-hero h1 { color: #fff; max-width: 760px; }
.medals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.medals .m { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 16px; text-align: center; }
.medals b { display: block; font-size: 2.2rem; color: #fff; }
.medals span { font-size: .85rem; color: #b6c0d1; }
.medals .silver b { color: #e5e7eb; text-shadow: 0 0 14px rgba(229,231,235,.5); }
.medals .bronze b { color: #f0a868; text-shadow: 0 0 14px rgba(205,127,50,.5); }
.medals .hm b { color: #9fd0ff; }
@media (max-width: 700px) { .medals { grid-template-columns: 1fr 1fr; } .pride-hero, .anc-hero { padding: 22px; } }
.ptimeline { display: flex; flex-direction: column; gap: 12px; }
.py { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: start; }
.py .ochip { background: var(--night); text-align: center; margin-top: 6px; }
.prow-list { display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.prow b { flex: 1; color: var(--ink); min-width: 160px; }
.medal { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.medal.gold { background: linear-gradient(135deg, #fde68a, #d4a017); }
.medal.silver { background: linear-gradient(135deg, #f8fafc, #9ca3af); }
.medal.bronze { background: linear-gradient(135deg, #f4c095, #b06a2b); }
.medal.hm { background: #dbeafe; border: 2px solid #93c5fd; }
.aw { font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.aw.silver { background: #f1f5f9; color: #475569; } .aw.bronze { background: #fbe7d6; color: #8a4b16; } .aw.gold { background: #fef3c7; color: #92400e; } .aw.hm { background: #eff6ff; color: #1e40af; }
.small { font-size: .85rem; }
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.story { display: flex; gap: 14px; background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.story img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.story blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--sec); font-style: italic; }

/* ---------- Ситораҳои ниёгон ---------- */
.anc-hero { background: radial-gradient(circle at 85% 20%, rgba(124,58,237,.4), transparent 50%), linear-gradient(135deg, #0b1324, var(--night)); }
.anc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.anc-card { display: flex; gap: 14px; background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); border-left: 5px solid var(--c); transition: transform .15s; }
.anc-card:hover { transform: translateY(-2px); }
.anc-card h3 { margin: 0 0 2px; }
.anc-card small { color: var(--muted); }
.anc-card p { margin: 8px 0; font-size: .95rem; }
.avatar { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.3rem; letter-spacing: .02em;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c, var(--sec)) 70%, #fff), var(--c, var(--sec))); box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, var(--c, var(--sec)) 35%, #fff); font-family: Georgia, "Times New Roman", serif; }
.avatar.big { width: 96px; height: 96px; font-size: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--sec)) 12%, #fff); color: var(--c, var(--sec)); }
.anc-head { display: flex; gap: 20px; align-items: center; background: #fff; border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); border-left: 6px solid var(--c); flex-wrap: wrap; }
.anc-head h1 { margin: 0 0 4px; } .anc-head p { margin: 0 0 8px; color: var(--muted); }

/* ---------- Илм – фурӯғи маърифат ---------- */
.ilm-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ilm-nav a { background: #fff; border: 2px solid color-mix(in srgb, var(--sec) 35%, #fff); color: var(--sec); padding: 8px 14px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.ilm-sec { margin-bottom: 22px; }
.ilm-sec h2 { border-left: 5px solid var(--sec); padding-left: 10px; }
.grid.more .card { min-height: 170px; }
.mainnav .dd-menu a.dd-item { color: var(--ink); background: none; font-weight: 400; padding: 10px 12px; border-radius: 12px; font-size: 1rem; white-space: normal; box-shadow: none; }
.mainnav .dd-menu a.dd-item:hover { background: var(--bg); color: var(--ink); }

/* ---------- Маҷмӯаи ИМД ---------- */
.bk-part { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--sec); color: #fff; font-weight: 800; font-size: 1.5rem; font-family: Georgia, serif; }
.bk-card .num { opacity: 1; color: var(--ink); font-size: 1.6rem; }
.bk-card .num::after { content: " савол"; font-size: .85rem; color: var(--muted); font-weight: 600; }
.bk-toc .paper-head b { text-transform: none; }
.toc-rows { display: flex; flex-direction: column; gap: 6px; }
.toc-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 0; }
.toc-row > a:first-child { flex: 1; display: flex; flex-direction: column; padding: 10px 14px; text-decoration: none; color: var(--ink); border-radius: 10px; }
.toc-row > a:first-child:hover { background: var(--bg); }
.toc-row small { color: var(--muted); }
.toc-off { font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.toc-off:hover { background: var(--bg); color: var(--brand); }
.bk .paper-head a { font-size: .8rem; text-transform: none; letter-spacing: 0; }
.bk-secname { text-align: center; font-size: 1rem; letter-spacing: .04em; color: var(--ink); margin: 6px 0 12px; }
.bk-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.bk-tools.bottom { margin-top: 16px; }
.bk-pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-pager .filters { margin: 0; }
.bk-pager .filters select { min-width: 170px; padding-top: 7px; padding-bottom: 7px; }
#bk-key.on { background: var(--sec); color: #fff; }
.bk-key .tbl { max-width: 360px; box-shadow: none; border: 1px solid var(--line); }
.bk-key .tbl td { padding: 6px 12px; }
.bk-key .tbl tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.bk-key .tbl tr { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.bk-key .tbl { max-width: none; }
.bk-key .tbl td { border: 0; }
.nuc { display: inline-flex; align-items: center; white-space: nowrap; }
.nuc > span { display: inline-flex; flex-direction: column; align-items: flex-end; font-size: .68em; line-height: 1.05; margin-right: 1px; }
.nuc sup, .nuc sub { font-size: 1em; vertical-align: baseline; position: static; line-height: 1.05; }
.paper .q-head .q-num { background: var(--ink); }
@media (max-width: 600px) { .bk-pager { width: 100%; justify-content: space-between; } .bk-pager .filters { flex: 1; } .bk-pager .filters select { min-width: 0; width: 100%; } }

/* Расмҳои саволҳо — услуби китоби дарсӣ */
.figq { margin: 12px 0 4px; }
.figq svg { width: 100%; height: auto; background: #fff; }
.figq .ft { font-family: "Times New Roman", Times, "Liberation Serif", serif; font-weight: 700; font-size: 16px; fill: #111; }
.figq .fi { font-style: italic; }
.figq .fn { font-weight: 400; }

/* Графикҳо — услуби китоб */
.graph .gr { stroke: #c4c4c4; stroke-width: .9; }
.graph .ax { stroke: #111; stroke-width: 1.8; }
.graph .tk, .graph .al, .graph .ll { font-family: "Times New Roman", Times, "Liberation Serif", serif; fill: #111; }
.graph .tk { font-size: 13px; }
.graph .al { font-size: 15px; font-weight: 700; }
.graph .ll { font-size: 16px; font-weight: 700; }

/* Расми дарс */
.lfig { margin: 18px 0; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.lfig img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #fff; }
.lfig figcaption { padding: 10px 16px 12px; font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); }
.lfig figcaption::before { content: "Расм. "; font-weight: 700; color: var(--ink); }

/* ---- Дарсҳои нав: услуби китоби дарсӣ ---- */
.hook { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, var(--night, #070b14), #12203d); color: #e8eefc; border-radius: var(--r); padding: 16px 20px; margin: 0 0 18px; font-size: 1.05rem; line-height: 1.55; }
.hook-ic { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--glow, #4da3ff); color: #04101f; font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.hook b { color: #fff; }
.prose .def { border-left: 5px solid var(--sec); background: color-mix(in srgb, var(--sec) 7%, #fff); border-radius: 0 12px 12px 0; padding: 10px 14px; margin: 12px 0; }
.prose .def::before { content: "Таъриф"; display: block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sec); margin-bottom: 2px; }
.prose .law::before { content: "Қонун"; }
.prose .warn { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.prose .warn::before { content: "⚠ Диққат"; display: block; font-size: .78rem; font-weight: 800; color: #c2410c; margin-bottom: 2px; }
.prose .nsteps { counter-reset: st; list-style: none; padding: 0; }
.prose .nsteps li { counter-increment: st; position: relative; padding-left: 38px; margin-bottom: 8px; min-height: 26px; }
.prose .nsteps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--sec); color: #fff; font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.prose .eq { text-align: center; font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; font-size: 1.3rem; margin: 12px 0; }
.box.defs dl { margin: 0; display: grid; }
.box.defs dl > div { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.box.defs dl > div:last-child { border-bottom: 0; }
.box.defs dt { font-weight: 700; color: var(--sec); } .box.defs dd { margin: 0; }
@media (max-width: 560px) { .box.defs dl > div { grid-template-columns: 1fr; gap: 2px; } }
.box.life { border-left: 6px solid #0891b2; background: #ecfeff; }
.box.life h2::before { content: "🌍"; }
.ex-part { margin: 6px 0; } .ex-part b { color: #15803d; }
.stepn { display: inline-block; font-size: .78rem; font-weight: 800; color: #fff; background: #16a34a; border-radius: 999px; padding: 1px 9px; margin-right: 6px; }
.ex-sol .ex-steps { list-style: none; padding-left: 0; }
.ex-rem { margin: 10px 0 0; color: var(--muted); font-size: .95rem; }
.box.qquiz { border-left: 6px solid #7c3aed; }
.box.qquiz h2::before { content: "✋"; }
.qq { padding: 10px 0; border-top: 1px solid var(--line); } .qq p { margin: 0 0 8px; }
.qq-a { background: #f5f3ff; border-radius: 10px; padding: 10px 14px; }
.box.mist { border-left: 6px solid var(--bad); background: #fff5f5; }
.box.mist h2::before { content: "✗"; color: var(--bad); font-weight: 800; }
.box.mist ul { margin: 0; padding-left: 1.2em; } .box.mist li { margin-bottom: 6px; }

/* ---- Расмҳои шарҳдор (DG) ва моделҳои интерактивӣ ---- */
.dfig { margin: 18px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 10px 10px; }
.dfig svg { display: block; width: 100%; height: auto; max-width: var(--mw, 640px); margin: 0 auto; }
.dfig svg text { font-family: inherit; }
.dfig .dsym, .wdg .dsym { font-family: "Times New Roman", Times, "Liberation Serif", serif; font-style: italic; }
.dfig figcaption { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); text-align: left; }
.dfig figcaption::before { content: "Расм. "; font-weight: 700; color: var(--ink); }
.dleg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 8px; font-size: .86rem; color: var(--ink); }
.dleg span { display: inline-flex; align-items: center; gap: 7px; }
.dleg i { display: inline-block; width: 26px; height: 5px; border-radius: 3px; }
.cn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #f59e0b; color: #fff; font-size: .78rem; font-weight: 800; vertical-align: 1px; margin: 0 2px; }
.cv { color: #2563eb; } .ca { color: #16a34a; } .cs { color: #7c3aed; } .cF { color: #dc2626; } .cg { color: #ea580c; } .cx { color: #0891b2; } .cy { color: #db2777; }
.prose .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.prose .two > div { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.prose .two h4 { margin: 0 0 6px; }
@media (max-width: 640px) { .prose .two { grid-template-columns: 1fr; } }
.prose .idea { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.prose .idea::before { content: "💡 Фикри асосӣ"; display: block; font-size: .78rem; font-weight: 800; color: #1d4ed8; margin-bottom: 2px; }
.prose .analogy { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.prose .analogy::before { content: "🔎 Барои фаҳмидан осонтар"; display: block; font-size: .78rem; font-weight: 800; color: #15803d; margin-bottom: 2px; }
.prose h3 { scroll-margin-top: 90px; }
.prose h4 { margin: 1em 0 .3em; }
.toc { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 18px; margin: 0 0 18px; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 28px; }
.toc li { margin: 0 0 5px; break-inside: avoid; }
.toc button { background: none; border: 0; padding: 0; color: var(--sec, var(--brand)); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.wdg { background: #fff; border: 2px solid color-mix(in srgb, var(--sec, var(--brand)) 35%, #fff); border-radius: var(--r); padding: 14px; margin: 18px 0; }
.wdg-h { font-weight: 800; margin-bottom: 10px; }
.wdg-h::before { content: "🎛 "; }
.wdg-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.wdg-ctl label { display: block; font-size: .95rem; }
.wdg-ctl input[type=range] { display: block; margin-top: 4px; }
.wdg-ctl input[type=range] { width: 100%; accent-color: var(--sec, var(--brand)); height: 28px; }
@media (max-width: 640px) { .wdg-ctl { grid-template-columns: 1fr; } }
.wdg-svg svg { display: block; width: 100%; height: auto; margin: 8px auto 0; }
.wdg-out { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0; font-size: .92rem; }
.wdg-out span { background: var(--bg); border-radius: 999px; padding: 3px 10px; }
.wdg-out .now { background: #fef3c7; }
.wdg-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wdg-chk { font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.wdg-note { font-size: .9rem; color: var(--muted); margin: 10px 0 0; }
.box.ex .dfig { margin: 10px 0; }
/* ҷадвалҳои васеъ дар экрани хурд — лағжиши уфуқӣ дар дохили ҷадвал, на тамоми саҳифа */
@media (max-width: 640px) {
  .prose .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: .88rem; }
  .prose .tbl th, .prose .tbl td { padding: 6px 8px; }
}

/* ---------- «Илм – фурӯғи маърифат» ---------- */
.ilm-fmt { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ilm-fmt > div { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 4px solid var(--sec); }
.ilm-fmt b { display: block; color: var(--sec); margin-bottom: 4px; }
.ilm-fmt p { margin: 0; color: var(--text); }
.ilm-topic { background: #fff; border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 10px; border-left: 5px solid var(--sec); }
.ilm-topic.astro { border-left-color: #1e40af; }
.ilm-topic > summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.ilm-topic > summary::-webkit-details-marker { display: none; }
.ilm-topic > summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--muted); font-weight: 700; }
.ilm-topic[open] > summary::after { content: "−"; }
.ilm-topic.astro .row-num { background: #dbeafe; color: #1e40af; }
.ilm-topic .tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ilm-topic .tt small { color: var(--muted); }
.ilm-topic ol { list-style: none; margin: 0; padding: 0 16px 14px; }
.ilm-topic li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ilm-topic li p { margin: 0 0 6px; }
.ilm-topic .bn { flex: none; min-width: 38px; font-weight: 800; color: var(--sec); }
.ilm-topic.astro .bn { color: #1e40af; }
.lks { display: flex; flex-wrap: wrap; gap: 6px; }
.lk { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; text-decoration: none; color: var(--sec); background: color-mix(in srgb, var(--sec) 9%, #fff); border: 1px solid color-mix(in srgb, var(--sec) 25%, #fff); border-radius: 999px; padding: 3px 10px 3px 6px; max-width: 100%; }
.lk .ic { width: 15px; height: 15px; flex: none; }
.lk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk:hover { background: color-mix(in srgb, var(--sec) 16%, #fff); }
.tks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tk { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; border-top: 4px solid var(--sec); }
.tk h3 { font-size: 1.02rem; margin: 0 0 8px; color: var(--sec); }
.tk ol { margin: 0; padding-left: 1.3em; }
.tk li { margin-bottom: 8px; }
.tk li > span { display: block; margin-bottom: 4px; }
.tk li.astro::marker { color: #1e40af; font-weight: 800; }
.tk li.astro > span { color: #1e3a8a; }
.rt p { margin-top: 0; }
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.rt-bar .btn { background: var(--sec); }
.rt-bar .btn.ghost2 { background: #fff; color: var(--sec); border: 2px solid var(--sec); }
.rt-clock { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--sec); }
.rt-clock.over { color: #dc2626; }
#rt-out .tk { box-shadow: none; border: 2px solid var(--sec); }
h3.bk-g { color: var(--sec); }
.booklist { padding-left: 1.4em; }
.booklist li { margin-bottom: 8px; }
.lvb { display: inline-block; margin-left: 8px; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: 1px; }
.lv-s { background: #dcfce7; color: #166534; } .lv-u { background: #ede9fe; color: #5b21b6; } .lv-b { background: #f1f5f9; color: #475569; }
@media (max-width: 600px) { .tks { grid-template-columns: 1fr; } .ilm-topic li { flex-direction: column; gap: 4px; } }

/* ---------- Блоки формула (дарсҳои астрономия ва физикаи таҷрибавӣ) ---------- */
.prose .formula { text-align: center; font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; font-size: 1.18rem; line-height: 1.6; background: color-mix(in srgb, var(--sec) 7%, #fff); border: 1px solid color-mix(in srgb, var(--sec) 22%, #fff); border-radius: 12px; padding: 10px 14px; margin: 12px 0; overflow-x: auto; }
@media (max-width: 600px) { .prose .formula { font-size: 1.02rem; padding: 8px 10px; } }

/* ---------- Фикру мулоҳиза ---------- */
.fbpage .lead { color: var(--muted); max-width: 720px; }
.fbform { max-width: 760px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.fbform fieldset { border: 0; padding: 0; margin: 0; }
.fbform legend { font-weight: 700; margin-bottom: 8px; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-kinds .chip { cursor: pointer; position: relative; }
.fb-kinds .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-kinds .chip.on { border-color: var(--sec); background: color-mix(in srgb, var(--sec) 12%, #fff); color: var(--sec); }
.fb-kinds .chip:focus-within { outline: 2px solid var(--sec); outline-offset: 2px; }
.fb-l { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.fbform textarea, .fbform input:not([type=radio]) { font: inherit; font-weight: 400; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; color: var(--text); width: 100%; box-sizing: border-box; }
.fbform textarea { resize: vertical; min-height: 140px; }
.fbform textarea:focus, .fbform input:focus { outline: none; border-color: var(--sec); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec) 18%, transparent); }
.fb-cnt { align-self: flex-end; color: var(--muted); font-weight: 400; }
.req { color: #dc2626; }
.fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .fb-two { grid-template-columns: 1fr; } .fbform .btn.big { width: 100%; } }
.fb-note { margin: -4px 0 0; font-size: .9rem; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-page { margin: 0; background: color-mix(in srgb, var(--sec) 8%, #fff); border-radius: 10px; padding: 8px 12px; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 0 4px; }
.fb-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 700; }
.stars { display: inline-flex; gap: 2px; }
.stars button { background: none; border: 0; font-size: 1.9rem; line-height: 1; color: #cbd5e1; cursor: pointer; padding: 2px 4px; min-width: 40px; min-height: 40px; }
.stars button.on { color: #f59e0b; }
.fbform .btn { align-self: flex-start; background: var(--sec); }
.fbform .btn:disabled { opacity: .6; cursor: wait; }
.fb-msg:empty { display: none; }
.fb-msg { border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.fb-msg.ok { background: #ecfdf5; color: #047857; }
.fb-msg.err { background: #fef2f2; color: #b91c1c; }
.fbdone { max-width: 760px; }
.fbdone h2 { color: #047857; margin-top: 0; }
.fb-hint { text-align: center; margin: 14px 0 0; }
.fb-hint a { color: var(--muted); }
.footer .fb-foot { font-weight: 700; color: inherit; }

/* ---------- Тамос ---------- */
.cts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.ct { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 14px 7px 10px; text-decoration: none; font-weight: 700; min-height: 40px; }
.ct svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ct small { font-weight: 500; opacity: .75; }
.ct span { overflow-wrap: anywhere; }
.footer .ct { background: rgba(255,255,255,.08); color: #e2e8f0; border: 1px solid rgba(255,255,255,.14); }
.footer .ct:hover { background: rgba(255,255,255,.16); }
.fbcontact { max-width: 760px; }
.fbcontact h2 { margin-top: 0; }
.fbcontact .ct { background: color-mix(in srgb, var(--sec) 9%, #fff); color: var(--text); border: 1px solid color-mix(in srgb, var(--sec) 25%, #fff); }
.fbcontact .ct-ig svg { color: #c13584; } .fbcontact .ct-yt svg { color: #dc2626; } .fbcontact .ct-mail svg { color: var(--sec); }
