/*
 * QXITT.uz — "Qishloq xo'jaligida innovatsion texnika va texnologiyalar" elektron darsligi
 * Uslublar jadvali (CSS)
 *
 * VOICE   : xotirjam, akademik, amaliy — talaba uchun o'quv qo'llanma.
 * IDEA    : haydalgan dala — har bir bob navbatdagi egat; test esa keyingi egatga o'tish darvozasi.
 * PICTURE : bosh sahifadagi qatlamli SVG dala manzarasi (egatlar, traktor, quyosh).
 * COLOUR  : tuproq jigarrangi (asosiy), dala yashili (yordamchi), bug'doy oltini (urg'u).
 * TYPE    : Archivo (sarlavhalar) + Source Sans 3 (matn) — lotin va kirill harflarini to'liq qo'llaydi.
 * LAYOUT  : chap tomonda boblar ro'yxati, o'ngda o'qish ustuni (≤ 760px); 900px dan torroqda yon panel tortma menyuga aylanadi.
 */

/* v3 — "bahorgi dala": yorqin barg yashili, kungaboqar sarig'i, osmon ko'ki; Unbounded + Manrope */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f8f3, #0d1611);
  --panel: light-dark(#ffffff, #14211a);
  --panel-2: light-dark(#f8fbf7, #182820);
  --ink: light-dark(#10291c, #e8f3ec);
  --muted: light-dark(#5c7266, #9db3a6);
  --line: light-dark(#dde8e1, #26392e);
  --soil: light-dark(#0c7d45, #5be095);
  --soil-deep: #10291c;
  --green: light-dark(#14a05a, #3ccf7e);
  --green-2: light-dark(#0c7d45, #5be095);
  --green-bg: light-dark(#e2f6ea, #13301f);
  --gold: light-dark(#e8a800, #ffd04d);
  --sun: #ffc21a;
  --gold-bg: light-dark(#fff3cc, #3a3010);
  --red: light-dark(#e2452d, #ff7a63);
  --red-bg: light-dark(#fde7e2, #3a1a14);
  --sky: light-dark(#1597d6, #4cb9ee);
  --sky-bg: light-dark(#e1f2fb, #10293a);
  --plum: light-dark(#7b5cd6, #a28af0);
  --plum-bg: light-dark(#efeafd, #241d3d);
  --shadow-a: light-dark(#10291c0f, #00000066);
  --shadow-b: light-dark(#10291c26, #000000cc);
  --shadow: 0 1px 2px var(--shadow-a), 0 6px 22px -8px var(--shadow-b);
  --f-display: Unbounded, "Arial Black", system-ui, sans-serif;
  --f-body: Manrope, "Segoe UI", Roboto, Arial, sans-serif;
  --fs: 17px;
  --side: 300px;
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }

* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--f-body);
  overflow-x: clip;
}
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; }
a { color: var(--green); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- yuqori panel ---------- */
.top {
  position: sticky; top: 0; z-index: 30; height: 60px;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: var(--soil-deep); color: #f4ead9;
}
.logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 800 20px/1 var(--f-display); }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo small { font: 500 13px/1.2 var(--f-body); opacity: .75; display: block; }
.menu-btn { display: none; background: none; border: 0; color: inherit; width: 44px; height: 44px; border-radius: 8px; }
.menu-btn:hover { background: #ffffff1a; }
.top .grow { flex: 1; }
.prog { display: flex; align-items: center; gap: 10px; font-size: 14px; white-space: nowrap; }
.prog .bar { width: 140px; height: 8px; border-radius: 9px; background: #ffffff26; overflow: hidden; }
.prog .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .5s; }
.fs-btns { display: flex; gap: 4px; }
.fs-btns button { background: #ffffff14; color: inherit; border: 0; border-radius: 6px; width: 36px; height: 36px; font-weight: 700; }
.fs-btns button:hover { background: #ffffff2a; }

/* ---------- asosiy maket ---------- */
.wrap { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.side {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
  background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px 30px;
}
.side h5 { margin: 18px 10px 6px; font: 700 13px/1.2 var(--f-body); color: var(--muted); }
.nav a {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.3;
}
.nav a:hover { background: var(--green-bg); }
.nav a.on { background: var(--soil); color: var(--bg); }
.nav a.locked { color: var(--muted); }
.nav .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--f-display); background: var(--line); color: var(--ink); }
.nav a.done .n { background: var(--green); color: #fff; }
.nav a.on .n { background: var(--gold); color: #231d16; }
.nav .st { font-size: 12px; white-space: nowrap; }
.side .reset { margin: 22px 10px 0; font-size: 13px; color: var(--muted); }
.side .reset button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 6px 10px; min-height: 36px; }
.side .reset button.warn { border-color: var(--red); color: var(--red); }

main { padding: 0 0 80px; }
.read { max-width: 820px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px); font-size: var(--fs); }
.read p { margin: 0 0 1em; }
.read h1 { font-size: clamp(28px, 4vw, 40px); margin: 6px 0 14px; }
.read h3 { font-size: 1.35em; margin: 2em 0 .7em; padding-top: .6em; border-top: 2px solid var(--line); color: var(--soil); }
.read h4 { font-size: 1.1em; margin: 1.6em 0 .6em; }
.read h4.block { background: var(--green-bg); color: var(--green); padding: 10px 14px; border-radius: 8px; }
.read figure { margin: 1.4em 0 .4em; text-align: center; }
.read figure img, .read .box img { max-width: 100%; height: auto; border-radius: 8px; cursor: zoom-in; box-shadow: 0 2px 14px #0000001f; }
.read .cap { text-align: center; font-size: .9em; color: var(--muted); margin-bottom: 1.6em; }
.read .tcap { text-align: left; margin: 1.6em 0 .5em; color: var(--ink); }
.read ul, .read ol { padding-left: 1.3em; }
.read blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--gold); background: var(--gold-bg); border-radius: 0 8px 8px 0; }
.tw { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 8px; }
.tw table { border-collapse: collapse; width: 100%; font-size: .88em; }
.tw th, .tw td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.tw th { background: var(--green-bg); }
.tw td p, .tw th p { margin: 0 0 .4em; }
.box { margin: 1.4em 0; padding: 16px 18px; border-radius: 10px; background: var(--gold-bg); border: 1px solid var(--line); }
.box > :last-child { margin-bottom: 0; }

.crumb { font-size: 14px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 10px; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 20px; padding: 6px 14px; font-size: 14px; min-height: 36px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips button:hover { border-color: var(--green); }

.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 10px; border: 0; background: var(--green); color: #fff; font-weight: 700; text-decoration: none; font-size: 16px; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.gold { background: var(--gold); color: #231d16; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }

/* ---------- bosh sahifa ---------- */
.hero { background: linear-gradient(180deg, #f6d98b 0%, #f2c46a 38%, #6d8f3c 38.1%, #4a6e2c 100%); position: relative; overflow: hidden; }
:root[data-theme=dark] .hero { background: linear-gradient(180deg, #2a2340 0%, #5c4466 38%, #2c3a1f 38.1%, #1c2714 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .hero { background: linear-gradient(180deg, #2a2340 0%, #5c4466 38%, #2c3a1f 38.1%, #1c2714 100%); } }
.hero-in { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: clamp(28px, 5vw, 60px) clamp(16px, 4vw, 40px) 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: end; }
.hero-txt { background: var(--panel); border-radius: 16px 16px 0 0; padding: clamp(20px, 3vw, 34px); box-shadow: 0 -6px 30px #0000002a; }
.hero-txt .kick { color: var(--soil); font-weight: 700; font-size: 15px; }
.hero-txt h1 { font-size: clamp(30px, 4.4vw, 50px); margin: 8px 0 12px; line-height: 1.05; }
.hero-txt .meta { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.hero svg.scene { width: 100%; height: auto; display: block; }
.namebox { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.namebox input { flex: 1 1 220px; min-height: 46px; font-size: 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.home { max-width: 1180px; margin: 0 auto; padding: 34px clamp(16px, 4vw, 40px); }
.home h2 { font-size: clamp(24px, 3vw, 32px); margin: 34px 0 14px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.step b { display: block; font: 800 34px/1 var(--f-display); color: var(--gold); margin-bottom: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--ink); text-decoration: none; min-height: 150px; }
.card:hover { border-color: var(--green); }
.card .no { font: 800 14px/1 var(--f-display); color: var(--soil); }
.card .tt { font-weight: 600; line-height: 1.3; flex: 1; }
.card .tag { align-self: flex-start; font-size: 13px; padding: 3px 10px; border-radius: 20px; background: var(--line); }
.card.done .tag { background: var(--green-bg); color: var(--green); }
.card.open .tag { background: var(--gold-bg); color: var(--soil); }
.card.locked { opacity: .62; }
.annot { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; font-size: 16.5px; }
.extras { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- test ---------- */
.test { margin-top: 48px; border: 2px solid var(--soil); border-radius: 16px; overflow: hidden; background: var(--panel); font-size: 16px; }
.test-h { background: var(--soil); color: var(--bg); padding: 18px 22px; }
.test-h h2 { margin: 0 0 4px; font-size: 24px; }
.test-h p { margin: 0; opacity: .9; }
.test-b { padding: 18px 22px 24px; }
.q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.q:last-of-type { border-bottom: 0; }
.q .qt { font-weight: 600; margin-bottom: 10px; }
.q .qt span { color: var(--soil); margin-right: 6px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; cursor: pointer; min-height: 44px; }
.opt:hover { border-color: var(--green); }
.opt input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.opt .l { font-weight: 700; color: var(--muted); }
.opt.sel { border-color: var(--green); background: var(--green-bg); }
.opt.ok { border-color: var(--green); background: var(--green-bg); }
.opt.bad { border-color: var(--red); background: var(--red-bg); }
.q .verdict { font-size: 14px; font-weight: 700; margin-top: 6px; }
.q .verdict.ok { color: var(--green); }
.q .verdict.bad { color: var(--red); }
.test-f { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 14px; }
.test-f .cnt { color: var(--muted); font-size: 15px; }
.result { margin: 18px 0 0; padding: 18px 20px; border-radius: 12px; }
.result.pass { background: var(--green-bg); }
.result.fail { background: var(--red-bg); }
.result h3 { margin: 0 0 6px; font-size: 22px; border: 0; padding: 0; }
.score { font: 800 clamp(34px, 6vw, 52px)/1 var(--f-display); }

/* ---------- qulflangan bob ---------- */
.lock { text-align: center; padding: 60px 20px; max-width: 560px; margin: 0 auto; }
.lock svg { width: 120px; height: 120px; }

/* ---------- glossariy qidiruvi ---------- */
.search { position: sticky; top: 68px; z-index: 5; margin-bottom: 18px; }
.search input { width: 100%; min-height: 48px; font-size: 16px; padding: 10px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); }
.hit { background: var(--gold-bg); }

/* ---------- natija / sertifikat ---------- */
.cert { border: 3px double var(--soil); border-radius: 16px; padding: clamp(20px, 4vw, 40px); background: var(--panel); text-align: center; }
.cert h2 { font-size: clamp(26px, 4vw, 38px); margin: 6px 0; }
.cert .who { font: 800 clamp(24px, 4vw, 34px)/1.1 var(--f-display); color: var(--green); margin: 14px 0; }
.rtab { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; text-align: left; }
.rtab td, .rtab th { border-bottom: 1px solid var(--line); padding: 8px; }
.rtab td.num { text-align: right; white-space: nowrap; }

/* ---------- rasm kattalashtirish ---------- */
.lb { position: fixed; inset: 0; z-index: 60; background: #000000d9; display: none; place-items: center; padding: 20px; cursor: zoom-out; }
.lb.show { display: grid; }
.lb img { max-width: 100%; max-height: 90vh; border-radius: 6px; background: #fff; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; background: var(--soil-deep); color: #fff; padding: 12px 18px; border-radius: 10px; display: none; max-width: 92vw; }
.toast.show { display: block; }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 30px 16px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-grid; place-items: center; }
  .side { position: fixed; left: 0; top: 60px; z-index: 40; width: min(330px, 88vw); transform: translateX(-102%); transition: transform .25s; box-shadow: 4px 0 30px #00000040; }
  .side.open { transform: none; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-in .art { order: -1; max-width: 520px; margin: 0 auto; width: 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .prog .bar { width: 80px; }
}
@media (max-width: 600px) {
  .logo small, .fs-btns { display: none; }
  .prog .txt { display: none; }
  .read { font-size: calc(var(--fs) - 1px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .top, .side, .pager, .test, .chips { display: none !important; }
  .wrap { display: block; }
}

/* ---------- foydalanuvchi, ro'yxatdan o'tish ---------- */
.userbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.userbox .who { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghostbtn { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 8px; border: 1px solid #ffffff40; background: transparent; color: inherit; text-decoration: none; font-size: 14px; }
.ghostbtn:hover { background: #ffffff1a; }
.auth { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 14px 0 4px; }
.auth .tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.auth .tabs button { flex: 1; min-height: 42px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 600; }
.auth .tabs button.on { background: var(--soil); color: var(--bg); border-color: var(--soil); }
.auth label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.auth input { display: block; width: 100%; margin-top: 4px; min-height: 46px; font-size: 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-weight: 400; }
.auth .btn { width: 100%; }
.ferr { color: var(--red); font-size: 14px; min-height: 1.2em; margin: 2px 0 8px; }
.welcome { margin-top: 10px; }
.welcome .kick { color: var(--muted); font-size: 14px; }
.welcome .wname { font: 800 clamp(22px, 3vw, 28px)/1.15 var(--f-display); color: var(--green); margin: 4px 0; }
.welcome .meta { margin-bottom: 14px; }
.card .mini { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.card .mini i { display: block; height: 100%; background: var(--green); }
.foot .demo { background: var(--gold-bg); color: var(--ink); border-radius: 8px; padding: 8px 12px; margin: 0 auto 12px; max-width: 760px; }

/* ---------- bob qismlari (stepper) ---------- */
.stepper { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 14px; margin-bottom: 8px; }
.stp { flex: none; display: flex; align-items: center; gap: 8px; max-width: 230px; min-height: 44px; padding: 6px 12px 6px 6px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 13.5px; text-align: left; }
.stp .d { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-weight: 700; font-size: 13px; }
.stp .tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stp.done .d { background: var(--green); color: #fff; }
.stp.open .d { background: var(--gold); color: #231d16; }
.stp.locked { opacity: .55; cursor: not-allowed; }
.stp.cur { border: 2px solid var(--soil); background: var(--gold-bg); }
.stp.test .d { background: var(--soil); color: var(--bg); }
.stp.test.done .d { background: var(--green); }
.pmeta { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.part > h3:first-of-type { margin-top: .6em; }
#endMark { height: 1px; }
.rbar { position: sticky; bottom: 0; z-index: 8; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px -12px 0; padding: 12px 14px; border-radius: 12px 12px 0 0; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 -6px 20px #0000001a; font-size: 15px; }
.rbar.ok { background: var(--green-bg); }
.rbar .rb-t { flex: 1 1 260px; }
.rbar .rb-p { flex: 1 1 120px; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.rbar .rb-p i { display: block; height: 100%; background: var(--gold); transition: width .8s linear; }
.rbar span:first-child:only-of-type { flex: 1; }
fieldset.q { border: 0; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
fieldset.q:last-of-type { border-bottom: 0; }
.score small { font-size: .45em; color: var(--muted); font-weight: 600; }
@media (max-width: 600px) { .userbox .who { display: none; } .rbar { margin: 18px -8px 0; } }
@media (min-width: 901px) { .hero-in .art { align-self: center; } }

/* ---------- muallif haqida (kirish sahifasi) ---------- */
.author-hero { background: linear-gradient(180deg, #f6d98b 0%, #f2c46a 45%, #6d8f3c 45.1%, #4a6e2c 100%); min-height: calc(100vh - 60px); display: flex; align-items: center; }
:root[data-theme=dark] .author-hero { background: linear-gradient(180deg, #2a2340 0%, #5c4466 45%, #2c3a1f 45.1%, #1c2714 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .author-hero { background: linear-gradient(180deg, #2a2340 0%, #5c4466 45%, #2c3a1f 45.1%, #1c2714 100%); } }
.author-in { width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.author-card, .book-card { background: var(--panel); border-radius: 18px; padding: clamp(20px, 3vw, 34px); box-shadow: 0 10px 40px #00000030; }
.author-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: start; }
.author-card .ph img { display: block; width: 150px; height: auto; border-radius: 12px; border: 4px solid var(--gold); box-shadow: 0 6px 18px #0000002e; background: #fff; }
.author-card .kick, .book-card .kick { color: var(--soil); font-weight: 700; font-size: 15px; }
.author-card h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 6px 0 10px; line-height: 1.1; }
.author-card .role { font-size: 17px; margin: 0 0 16px; }
.contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contacts li { display: grid; gap: 2px; padding: 10px 14px; border-radius: 10px; background: var(--green-bg); }
.contacts span { font-size: 13px; color: var(--muted); }
.contacts a { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; color: var(--green); text-decoration: none; }
.contacts a:hover { text-decoration: underline; }
.book-card { display: flex; flex-direction: column; }
.book-card h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 6px 0 10px; }
.book-card p { margin: 0 0 16px; color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.facts li { text-align: center; background: var(--gold-bg); border-radius: 10px; padding: 10px 4px; font-size: 13px; color: var(--muted); }
.facts b { display: block; font: 800 26px/1.1 var(--f-display); color: var(--soil); }
.btn.big { margin-top: auto; min-height: 56px; font-size: 18px; }
@media (max-width: 860px) { .author-in { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .author-card { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .contacts li { text-align: left; } }

/* ================================================================
 * Amaliy mashg'ulotlar va laboratoriya ishlari (m- prefiksi)
 * ================================================================ */
:root { --blue: light-dark(#2a5d86, #8ab9e0); --blue-bg: light-dark(#e6eff7, #172634); }
.read.m-wide-read { max-width: 1040px; }
.m-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font: 700 12px/1.4 var(--f-body); letter-spacing: .03em; }
.m-chip.a { background: var(--gold-bg); color: var(--soil); }
.m-chip.l { background: var(--blue-bg); color: var(--blue); }
.m-page .crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.m-page .crumb a { color: var(--muted); }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.m-meta b { color: var(--ink); font-weight: 600; }
.read h2.m-h { font-size: 1.3em; margin: 2em 0 .7em; display: flex; gap: 12px; align-items: baseline; }
.m-h span { font: 800 14px/1 var(--f-display); color: var(--gold); }
.m-theory { border-left: 4px solid var(--green); background: var(--green-bg); padding: 14px 18px; border-radius: 0 10px 10px 0; }
.m-theory > :last-child { margin-bottom: 0; }
.m-formula { display: grid; gap: 8px; margin: 14px 0 0; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel); overflow-x: auto;
  font: 600 1.05em/1.5 "Cambria Math", "Times New Roman", serif; }
.m-text .box, .m-text > p:first-child { margin-top: 0; }
.m-text strong { color: var(--soil); }
.m-cellin { width: 100%; min-width: 64px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 6px; padding: 5px 8px; font: inherit; }
.m-hint { color: var(--muted); font-size: 15px; margin-top: -4px; }
.m-qs li { margin-bottom: 6px; }
.m-report { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.m-report p { margin: 0 0 12px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.m-printhead { display: none; }

/* kalkulyator */
.m-calc { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0 0 18px; font-size: 16px; }
.m-calc > header { background: var(--soil-deep); color: #f4ead9; padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; justify-content: space-between; }
.m-calc > header h3 { margin: 0; padding: 0; border: 0; color: inherit; font-size: 16px; }
.m-calc > header span { font-size: 13px; opacity: .8; }
.m-in { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 16px 18px; }
.m-in label { display: grid; gap: 4px; align-content: end; font-size: 13.5px; color: var(--muted); line-height: 1.3; }
.m-in label.m-wide { grid-column: 1 / -1; }
.m-in input, .m-in textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; }
.m-in textarea { resize: vertical; }
.m-tw { margin: 0 18px 16px; }
.m-tw table { font-variant-numeric: tabular-nums; }
.m-tw tr.m-sel td { background: var(--gold-bg); font-weight: 700; }
.m-tw tfoot td { font-weight: 700; }
.m-ent td { padding: 4px 6px; }
.m-ent input { width: 100%; min-width: 64px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 6px; padding: 5px 8px; font: inherit; font-variant-numeric: tabular-nums; }
.m-ent tbody th { white-space: nowrap; }
.m-out { border-top: 1px solid var(--line); }
.m-out > .m-tw { margin-top: 16px; }
.m-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); }
.m-res > div { background: var(--panel); padding: 12px 18px; }
.m-res small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
.m-res b { font: 800 22px/1.25 var(--f-display); font-variant-numeric: tabular-nums; }
.m-res b i { font: 600 13px var(--f-body); font-style: normal; color: var(--muted); margin-left: 4px; }
.m-sub { color: var(--muted); font-size: 14px; margin: 12px 18px !important; }
.m-verdict { padding: 12px 18px; font-size: 15px; border-top: 1px solid var(--line); }
.m-verdict.good { background: var(--green-bg); } .m-verdict.mid { background: var(--gold-bg); } .m-verdict.bad { background: var(--red-bg); }
.m-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: var(--muted); }
.m-dot.good { background: var(--green); } .m-dot.mid { background: var(--gold); } .m-dot.bad { background: var(--red); }
.m-bars { display: grid; gap: 7px; padding: 16px 18px; }
.m-bars .row { display: grid; grid-template-columns: minmax(70px, 180px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.m-bars .track { position: relative; height: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.m-bars .fill { display: block; height: 100%; border-radius: 7px; background: var(--soil); transition: width .3s; }
.m-bars .lim { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.fill.good { background: var(--green); } .fill.gold { background: var(--gold); } .fill.soil { background: var(--soil); } .fill.bad { background: var(--red); }
.m-scale { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 18px 14px; font-size: 13px; color: var(--muted); }
.m-scale span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--muted); }
.m-scale .good::before { background: var(--green); } .m-scale .gold::before { background: var(--gold); } .m-scale .soil::before { background: var(--soil); } .m-scale .bad::before { background: var(--red); }
.m-prof { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding: 16px 18px 0; }
.m-prof i { flex: 1; background: var(--soil); border-radius: 3px 3px 0 0; min-height: 2px; }
.m-prof i.g { background: var(--green); }
.m-axis { display: flex; gap: 2px; padding: 4px 18px 0; font-size: 12px; color: var(--muted); }
.m-axis span { flex: 1; text-align: center; }
.m-svg { display: block; width: calc(100% - 36px); height: auto; margin: 12px 18px; }
.m-svg .ln { stroke: var(--line); stroke-width: 1.5; }
.m-svg .tx { fill: var(--muted); font: 12px var(--f-body); }
.m-svg .pj { fill: var(--gold); stroke: var(--soil); stroke-width: 1; }
.m-svg .tr1 { fill: none; stroke: var(--soil); stroke-width: 1.6; }
.m-svg .tr2 { fill: none; stroke: var(--green); stroke-width: 1.2; stroke-dasharray: 4 3; }
.m-gridin, .m-grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 0 18px 16px; max-width: 520px; }
.m-gridin input { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 6px; padding: 6px; text-align: center; font: inherit; font-variant-numeric: tabular-nums; }
.m-grid5 span { text-align: center; padding: 6px 2px; border-radius: 6px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.m-grid5 .cut { background: var(--gold-bg); color: var(--soil); } .m-grid5 .fill { background: var(--blue-bg); color: var(--blue); }

/* fan xaritasi va ro'yxatlar */
.m-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 22px; }
.m-stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.m-stats b { display: block; font: 800 28px/1.1 var(--f-display); color: var(--soil); }
.m-stats small { color: var(--muted); font-size: 13px; }
.m-map { display: grid; gap: 8px; }
.m-maprow { display: grid; grid-template-columns: 34px repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-maprow.head span { font: 700 12px/1.2 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.m-maprow .wk { display: grid; place-items: center; font: 800 16px/1 var(--f-display); color: var(--muted); }
.m-cell { display: block; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 12px; font-size: 14px; line-height: 1.3; color: var(--ink); text-decoration: none; }
.m-cell:hover { border-color: var(--green); }
.m-cell b { display: block; margin-bottom: 4px; font: 700 12px/1.2 var(--f-display); }
.m-cell.M b { color: var(--green); } .m-cell.A b { color: var(--soil); } .m-cell.L b { color: var(--blue); }
.m-cell.done { background: var(--green-bg); }
.m-cell.locked { color: var(--muted); }
.m-home { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.m-home a { display: grid; gap: 2px; padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.m-home a:hover { border-color: var(--green); }
.m-home b { font: 800 30px/1 var(--f-display); color: var(--soil); }
.m-home span { font-weight: 700; }
.m-home small { color: var(--muted); font-size: 14px; }
.box.mlink { background: var(--blue-bg); }
@media (max-width: 760px) {
  .m-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-home { grid-template-columns: minmax(0, 1fr); }
  .m-maprow { grid-template-columns: 24px repeat(3, minmax(0, 1fr)); gap: 5px; }
  .m-cell { font-size: 12.5px; padding: 7px 8px; }
  .m-bars .row { grid-template-columns: 64px minmax(0, 1fr) auto; }
}
@media print {
  .m-actions, .m-hint, .foot { display: none !important; }
  .m-printhead { display: block; font-size: 13px; border-bottom: 1px solid #999; padding-bottom: 6px; margin-bottom: 10px; }
  .m-calc, .m-formula, .tw { break-inside: avoid; }
  .m-calc > header { background: #eee; color: #000; }
}

/* hisobot yuborish */
.m-status { display: grid; gap: 4px; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 15px; }
.m-status.good { background: var(--green-bg); } .m-status.mid { background: var(--gold-bg); } .m-status.bad { background: var(--red-bg); }
.m-status span { color: var(--muted); font-size: 14px; }
.m-status .m-note { color: var(--ink); }
.m-grade { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font: 800 16px/1 var(--f-display); margin-left: 4px; }
.m-form { display: grid; gap: 12px; margin-bottom: 14px; }
.m-form label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.m-form input[type=file] { font-size: 15px; color: var(--ink); }
.m-form textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
@media print { .m-form, .m-status + p { display: none !important; } }

/* =====================================================================
 * v3 DIZAYN QATLAMI — yorqin interaktiv o'quv platformasi
 * (yuqoridagi uslublar ustidan yoziladi; klass nomlari o'zgarmagan)
 * ===================================================================== */
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
body { font-family: var(--f-body); }
h1, h2, h3, h4 { text-wrap: wrap; letter-spacing: -.01em; }
.read p, .read li, .annot, .box p, .m-theory p, .welcome .meta, .h-hello p { text-align: justify; text-justify: inter-word; hyphens: auto; overflow-wrap: break-word; }
:focus-visible { outline-color: var(--sky); }

/* yuqori panel */
.top { background: color-mix(in srgb, var(--panel) 90%, transparent); color: var(--ink); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); height: 66px; }
.logo { color: var(--ink); font: 800 18px/1 var(--f-display); }
.logo svg { width: 38px; height: 38px; }
.logo small { font: 600 11.5px/1.25 var(--f-body); color: var(--muted); opacity: 1; letter-spacing: .02em; }
.menu-btn:hover { background: var(--green-bg); }
.fs-btns button { background: var(--panel-2); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line) inset; border-radius: 10px; }
.fs-btns button:hover { background: var(--green-bg); }
.prog .bar { background: var(--line); }
.prog .bar i { background: linear-gradient(90deg, var(--green), var(--sky)); }
.prog .txt { font-weight: 700; color: var(--muted); }
.ghostbtn { border-color: var(--line); color: var(--ink); font-weight: 700; border-radius: 10px; }
.ghostbtn:hover { background: var(--green-bg); }
.userbox .who { font-weight: 700; }
.theme { border: 0; width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--panel-2); box-shadow: 0 0 0 1.5px var(--line) inset; transition: transform .2s; }
.theme:hover { transform: rotate(-15deg); }
.xp { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 99px; font-weight: 800; font-size: 13.5px; white-space: nowrap; background: var(--gold-bg); color: color-mix(in srgb, var(--gold) 45%, var(--ink)); font-variant-numeric: tabular-nums; }
.side { top: 66px; height: calc(100vh - 66px); background: var(--panel); }
.side h5 { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 11.5px; }
.nav a { border-radius: 12px; font-weight: 600; }
.nav a:hover { background: var(--green-bg); }
.nav a.on { background: var(--ink); color: var(--bg); }
.nav .n { background: var(--panel-2); box-shadow: 0 0 0 1.5px var(--line) inset; font-family: var(--f-display); font-size: 12px; }
.nav a.done .n { background: var(--green); box-shadow: none; }
.nav a.on .n { background: var(--sun); color: #241b00; box-shadow: none; }

/* tugmalar */
.btn { border-radius: 14px; font-weight: 800; background: var(--green); box-shadow: 0 4px 0 var(--green-2); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-2); }
.btn.ghost { background: var(--panel-2); color: var(--ink); border: 0; box-shadow: 0 0 0 1.5px var(--line) inset; }
.btn.ghost:active { transform: none; }
.btn.gold { background: var(--sun); color: #241b00; box-shadow: 0 4px 0 #c98f00; }
.btn[disabled] { box-shadow: none; }

/* o'qish */
.read h1 { font-size: clamp(24px, 3.2vw, 34px); }
.read h3 { color: var(--green-2); }
.read h4.block { border-radius: 12px; }
.read blockquote { border-left-color: var(--sky); background: var(--sky-bg); border-radius: 0 12px 12px 0; }
.box { border-radius: 16px; border: 0; box-shadow: var(--shadow); }
.tw { border-radius: 14px; }
.tw th { background: var(--green-bg); }
.crumb { font-weight: 700; }
.stepper { gap: 8px; }
.stp { border-radius: 99px; border: 0; box-shadow: 0 0 0 1.5px var(--line) inset; font-weight: 600; }
.stp .d { background: var(--panel-2); box-shadow: 0 0 0 1.5px var(--line) inset; }
.stp.done .d { background: var(--green); box-shadow: none; }
.stp.open .d { background: var(--sun); color: #241b00; box-shadow: none; }
.stp.cur { border: 0; box-shadow: 0 0 0 2px var(--sun) inset; background: var(--gold-bg); }
.stp.test .d { background: var(--sky); color: #fff; box-shadow: none; }
.rbar { border-radius: 16px 16px 0 0; border: 0; box-shadow: 0 -8px 26px -10px #10291c40; }
.rbar .rb-p i { background: linear-gradient(90deg, var(--green), var(--sky)); }

/* kartalar (boblar ro'yxati) */
.card { border: 0; border-radius: 18px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); border-color: transparent; }
.card .no { font-family: var(--f-display); color: var(--green-2); font-size: 12.5px; letter-spacing: .02em; }
.card .tag { font-weight: 700; }
.card .mini i { background: linear-gradient(90deg, var(--green), var(--sky)); }
.annot { border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.step { border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.step b { color: var(--sky); }

/* test */
.test { border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.test-h { background: linear-gradient(120deg, var(--green) 0%, #1fb36a 55%, var(--sky) 130%); color: #fff; }
.opt { border: 2px solid var(--line); border-radius: 14px; font-weight: 500; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--sky); }
.opt input { accent-color: var(--sky); }
.opt.sel { border-color: var(--sky); background: var(--sky-bg); }
.result { border-radius: 16px; }
.score { font-family: var(--f-display); color: var(--green-2); }
.cert { border: 2px solid var(--sun); border-radius: 22px; background: radial-gradient(circle at 15% 0%, var(--gold-bg), transparent 55%), radial-gradient(circle at 100% 100%, var(--green-bg), transparent 55%), var(--panel); box-shadow: var(--shadow); }
.cert .who { color: var(--green-2); }

/* ro'yxatdan o'tish */
.auth { border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.auth .tabs button { border-radius: 12px; font-weight: 700; }
.auth .tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.auth input, .namebox input, .search input { border-radius: 12px; border: 1.5px solid var(--line); }
.auth input:focus, .search input:focus { border-color: var(--sky); outline: none; }

/* muallif haqida */
.author-hero { background: linear-gradient(135deg, #14a05a 0%, #1fb36a 45%, #1597d6 120%); }
:root[data-theme=dark] .author-hero { background: linear-gradient(135deg, #0d3a24 0%, #0f4a2e 45%, #0c3550 120%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .author-hero { background: linear-gradient(135deg, #0d3a24 0%, #0f4a2e 45%, #0c3550 120%); } }
.author-card .ph img { border-color: var(--sun); border-radius: 16px; }
.author-card .kick, .book-card .kick { color: var(--green-2); }
.contacts li { border-radius: 12px; }
.facts li { border-radius: 12px; }
.facts b { font-family: var(--f-display); color: var(--green-2); }

/* ---------- bosh sahifa (v3) ---------- */
.h-page { max-width: 1220px; margin: 0 auto; padding-block: 26px 40px; padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }
.h-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.h-hello { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(20px, 3vw, 30px); color: #fff; box-shadow: var(--shadow);
  background: linear-gradient(120deg, #14a05a 0%, #1fb36a 55%, #1597d6 130%); }
:root[data-theme=dark] .h-hello { background: linear-gradient(120deg, #0f6b3c 0%, #12804a 55%, #0e5f8a 130%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .h-hello { background: linear-gradient(120deg, #0f6b3c 0%, #12804a 55%, #0e5f8a 130%); } }
.h-hello .kick { font: 800 12px/1 var(--f-body); letter-spacing: .09em; text-transform: uppercase; color: #ffffffd0; }
.h-hello h1 { font-size: clamp(23px, 3vw, 33px); margin: 8px 0 12px; color: #fff; }
.h-hello p { margin: 0 0 16px; color: #ffffffeb; }
.h-hello .rows { position: absolute; right: -30px; bottom: -40px; width: 300px; opacity: .2; pointer-events: none; }
.h-hello .btn { background: #fff; color: #0c7d45; box-shadow: 0 4px 0 #0000002a; }
.h-hello .auth { color: var(--ink); margin-top: 4px; }
.h-cont { display: flex; gap: 16px; align-items: center; background: #ffffff21; border-radius: 16px; padding: 14px; margin-bottom: 18px; }
.h-cont b { display: block; font-size: 15.5px; line-height: 1.35; }
.h-cont small { color: #ffffffe0; font-weight: 600; }
.h-ring { width: 84px; height: 84px; flex: none; position: relative; }
.h-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.h-ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 800 17px var(--f-display); }
.h-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.h-stat { background: var(--panel); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.h-stat i { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-style: normal; margin-bottom: 8px; }
.h-stat b { display: block; font: 800 25px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.h-stat b small { font-size: 14px; color: var(--muted); }
.h-stat > small { color: var(--muted); font-weight: 600; font-size: 13px; }
.h-sec { font-size: 18px; margin: 26px 0 14px; }
.h-week { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.h-lesson { display: grid; gap: 8px; align-content: start; border-radius: 16px; padding: 16px; background: var(--panel); box-shadow: 0 0 0 1.5px var(--line) inset; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.h-lesson:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--green) inset; }
.h-lesson .tg { justify-self: start; padding: 4px 10px; border-radius: 99px; font-weight: 800; font-size: 12px; }
.h-lesson b { font-size: 15px; line-height: 1.3; }
.h-lesson small { color: var(--muted); font-weight: 600; }
.tg.M { background: var(--green-bg); color: var(--green-2); } .tg.A { background: var(--gold-bg); color: color-mix(in srgb, var(--gold) 40%, var(--ink)); } .tg.L { background: var(--sky-bg); color: var(--sky); }
.h-bar { height: 7px; border-radius: 9px; background: var(--line); overflow: hidden; }
.h-bar i { display: block; height: 100%; border-radius: 9px; background: var(--green); }
.h-side { display: grid; gap: 22px; }
.h-box { background: var(--panel); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); position: relative; }
.h-box h2 { font-size: 17px; margin: 0 0 12px; }
.h-map svg { display: block; width: 100%; height: auto; }
.h-map a:focus-visible { outline: none; }
.h-map a:focus-visible circle.b { stroke: var(--sky); stroke-width: 4; }
.h-map circle.b { transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.h-map a:hover circle.b { transform: scale(1.12); }
.h-map .lbl { font: 800 13px var(--f-display); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.h-pulse { animation: hpulse 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes hpulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
.h-tip { position: absolute; z-index: 5; background: var(--ink); color: var(--bg); padding: 9px 12px; border-radius: 12px; font-size: 13.5px; max-width: 230px; pointer-events: none; transform: translate(-50%, -115%); box-shadow: var(--shadow); }
.h-badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.h-badge { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.h-badge span { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 18px; font-size: 25px; background: var(--panel-2); box-shadow: 0 0 0 1.5px var(--line) inset; filter: grayscale(1); opacity: .55; }
.h-badge.got { color: var(--ink); }
.h-badge.got span { background: linear-gradient(135deg, #ffc21a, #ff9d2e); box-shadow: 0 4px 0 #c97800; filter: none; opacity: 1; }
.h-more { margin-top: 30px; }
.h-more h2 { font-size: 20px; margin: 30px 0 14px; }
@media (max-width: 1100px) { .h-grid { grid-template-columns: minmax(0, 1fr); } .h-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
@media (max-width: 640px) {
  .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-week { grid-template-columns: minmax(0, 1fr); }
  .xp { display: none; }
}
@media (max-width: 900px) { .side { top: 66px; } }
@media print { .theme, .xp { display: none !important; } }
@media (max-width: 480px) { .logo > span { display: none; } .prog { display: none; } .top { gap: 10px; } }
[hidden] { display: none !important; }
.h-hello .auth .btn { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-2); }
.h-hello .auth .btn:active { box-shadow: 0 1px 0 var(--green-2); }

/* ---------- ilovani o'rnatish (PWA) ---------- */
.install { border: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 12px; font-weight: 800; font-size: 13.5px; white-space: nowrap;
  background: var(--green-bg); color: var(--green-2); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--green) 35%, transparent) inset; transition: transform .15s; }
.install:hover { transform: translateY(-1px); }
.install img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.inst { position: fixed; inset: 0; z-index: 90; background: #0a1a1199; display: grid; place-items: center; backdrop-filter: blur(3px);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 16px; }
.inst-in { position: relative; width: min(460px, 100%); max-height: 100%; overflow-y: auto; background: var(--panel); color: var(--ink); border-radius: 24px; padding: 28px 24px 24px; text-align: center; box-shadow: 0 20px 60px -10px #000a; }
.inst-in img { display: block; margin: 0 auto 12px; width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 8px 22px -6px #14a05a99; }
.inst-in h2 { font-size: 20px; margin: 0 0 8px; }
.inst-in > p { color: var(--muted); margin: 0 0 16px; }
.inst-steps { text-align: left; margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.inst-steps li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--panel-2); border-radius: 14px; padding: 10px 12px; font-size: 15px; line-height: 1.45; }
.inst-steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font: 800 14px var(--f-display); }
.inst-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); background: var(--gold-bg); border-radius: 12px; padding: 8px 12px; }
.inst-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel-2); color: var(--ink); font-size: 22px; line-height: 1; }
@media (max-width: 820px) { .install span { display: none; } .install { padding: 6px; } }
@media print { .install { display: none !important; } }
/* kurs xaritasidagi traktor: yo'nalish bo'yicha sekin yuradi, g'ildiraklar aylanadi */
.h-trac { animation: tracR 1.8s ease-in-out infinite alternate; }
.h-trac.left { animation-name: tracL; }
@keyframes tracR { from { transform: translateX(-3px); } to { transform: translateX(3px); } }
@keyframes tracL { from { transform: translateX(3px); } to { transform: translateX(-3px); } }
.h-trac .w { animation: tracW 1.1s linear infinite; transform-box: fill-box; transform-origin: center; }
.h-trac .w.s { animation-duration: .7s; }
@keyframes tracW { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .h-trac, .h-trac .w { animation: none; } }
/* soddalashtirilgan o'rnatish ko'rsatmasi */
.inst-steps.big li { grid-template-columns: 52px minmax(0, 1fr); align-items: center; font-size: 16.5px; padding: 12px 14px; }
.inst-steps.big li::before { display: none; }
.inst-steps.big .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-style: normal; font-size: 26px; font-weight: 800; background: var(--green); color: #fff; }
.inst-ok { width: 100%; margin-top: 16px; }
.inst-arrow { position: fixed; z-index: 95; font-size: 54px; line-height: 1; pointer-events: none; filter: drop-shadow(0 4px 8px #0006); }
.inst-arrow.down { left: 50%; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); animation: arrDown .8s ease-in-out infinite alternate; }
.inst-arrow.up { right: calc(10px + env(safe-area-inset-right, 0px)); top: calc(4px + env(safe-area-inset-top, 0px)); animation: arrUp .8s ease-in-out infinite alternate; }
@keyframes arrDown { from { translate: 0 -10px; } to { translate: 0 6px; } }
@keyframes arrUp { from { translate: 0 10px; } to { translate: 0 -4px; } }
@media (prefers-reduced-motion: reduce) { .inst-arrow { animation: none; } }
/* o'rnatish oynasi: 3 bo'lim (kompyuter / smartfon / iPhone) */
.inst-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 5px; margin: 0 0 14px; border-radius: 16px; background: var(--panel-2); box-shadow: 0 0 0 1.5px var(--line) inset; }
.inst-tabs button { border: 0; background: none; color: var(--muted); border-radius: 12px; padding: 8px 4px; display: grid; justify-items: center; gap: 2px; font-weight: 800; font-size: 13.5px; line-height: 1.2; }
.inst-tabs button span { font-size: 22px; line-height: 1; }
.inst-tabs button small { font-size: 10.5px; font-weight: 700; color: var(--green-2); }
.inst-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 2px 8px -2px #10291c33, 0 0 0 2px var(--green) inset; }
.inst-one { width: 100%; font-size: 16px; }
.inst-or { margin: 10px 0 8px; font-size: 13px; color: var(--muted); }
/* ---- Parolni tiklash va mustaqil ish (v3.9) ---- */
.auth-forgot { display: block; text-align: center; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--green-2); }
.auth label small { font-weight: 400; color: var(--muted); }
.rec-cred { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 6px; }
.rec-cred div { background: var(--panel); border: 2px dashed var(--green); border-radius: 12px; padding: 10px 14px; }
.rec-cred small { display: block; color: var(--muted); font-size: 13px; }
.rec-cred b { font-size: 22px; letter-spacing: .5px; font-family: ui-monospace, Consolas, monospace; user-select: all; word-break: break-all; }
.m-report.must { margin: 8px 0 26px; }
.m-report.must h2 { margin: 0 0 10px; font-size: 20px; }
.m-report.must h3 { margin: 4px 0 10px; font-size: 16px; }
.must-list .m-status { margin-bottom: 8px; }
.m-form select { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; }
@media (max-width: 560px) { .rec-cred { grid-template-columns: 1fr; } }
.must-prog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.must-prog > div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; text-align: center; }
.must-prog b { display: block; font-size: 22px; }
.must-prog small { color: var(--muted); font-size: 13px; }
.must-bar { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.must-bar i { display: block; height: 100%; background: var(--green); border-radius: 6px; }

/* ---- Sertifikat (A4 albom, 297×210 mm) ---- */
.qc-wrap { position: relative; width: 100%; overflow: hidden; margin: 10px 0 18px; }
.qc { position: absolute; left: 0; top: 0; transform-origin: 0 0; width: 297mm; height: 210mm; box-sizing: border-box; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #fffdf4 0%, #fbf6e6 70%, #f5eed6 100%); color: #10291c; font-family: Manrope, system-ui, sans-serif;
  box-shadow: 0 18px 40px -18px #10291c55; border-radius: 4px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qc-frame { position: absolute; inset: 9mm; border: 1.2mm solid #14a05a; border-radius: 3mm; }
.qc-frame::after { content: ""; position: absolute; inset: 2.2mm; border: .5mm solid #d9a400; border-radius: 1.8mm; }
.qc-corner { position: absolute; width: 30mm; height: 30mm; color: #b88a00; }
.qc-corner svg { width: 100%; height: 100%; display: block; }
.qc-corner.tl { left: 13mm; top: 13mm; transform: rotate(-90deg) scaleX(-1); }
.qc-corner.tr { right: 13mm; top: 13mm; transform: scaleX(-1) rotate(180deg) scaleX(-1) rotate(90deg); }
.qc-corner.bl { left: 13mm; bottom: 13mm; }
.qc-corner.br { right: 13mm; bottom: 13mm; transform: scaleX(-1); }
.qc-field { position: absolute; left: 9mm; right: 9mm; bottom: 9mm; width: calc(100% - 18mm); height: 34mm; }
.qc-body { position: absolute; inset: 18mm 26mm 16mm; display: flex; flex-direction: column; }
.qc-top { display: flex; align-items: center; justify-content: center; gap: 3mm; font-size: 3.6mm; font-weight: 700; letter-spacing: .5mm; text-transform: uppercase; color: #3c5a48; }
.qc-logo svg { width: 9mm; height: 9mm; display: block; }
.qc-text { text-align: center; margin-top: 3mm; }
.qc h1 { font-family: Unbounded, Manrope, sans-serif; font-weight: 800; font-size: 15mm; letter-spacing: 2.4mm; margin: 0; color: #14a05a; line-height: 1.05; }
.qc-sub { margin: 1mm 0 5mm; font-size: 4.4mm; font-weight: 600; color: #6b5a1e; letter-spacing: .3mm; }
.qc-small { margin: 0; font-size: 3.8mm; color: #3c5a48; }
.qc h2 { font-family: Unbounded, Manrope, sans-serif; font-weight: 700; font-size: 9.2mm; margin: 2.5mm auto 3mm; line-height: 1.15; color: #10291c;
  display: inline-block; padding: 0 6mm 2mm; border-bottom: .6mm solid #d9a400; }
.qc h2.long { font-size: 7.4mm; }
.qc-score { display: grid; grid-template-columns: 44mm 1fr; gap: 6mm; align-items: center; margin-top: 7mm; }
.qc-desc { margin: 0 auto; max-width: 168mm; font-size: 4.1mm; line-height: 1.5; color: #243d30; }
.qc-desc b { color: #10291c; }
.qc-seal { position: relative; width: 44mm; height: 44mm; filter: drop-shadow(0 2mm 3mm #10291c33); }
.qc-seal svg { width: 100%; height: 100%; display: block; }
.qc-seal-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.qc-seal-in b { font-family: Unbounded, Manrope, sans-serif; font-size: 11mm; line-height: 1; color: #14a05a; }
.qc-seal-in small { font-size: 2.9mm; font-weight: 700; color: #3c5a48; margin-top: .6mm; }
.qc-seal-in span { margin-top: 1mm; font-size: 2.7mm; font-weight: 800; letter-spacing: .3mm; color: #6b5a1e; }
.qc-parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.5mm; }
.qc-parts > div { background: #ffffffb3; border: .3mm solid #d8cfa8; border-radius: 2.5mm; padding: 2.6mm 3.6mm; }
.qc-parts small { display: block; font-size: 2.8mm; font-weight: 700; color: #3c5a48; text-transform: uppercase; letter-spacing: .15mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-parts b { display: block; font-family: Unbounded, Manrope, sans-serif; font-size: 6mm; line-height: 1.2; color: #10291c; }
.qc-parts b i { font-style: normal; font-size: 3.6mm; color: #6b7d72; font-family: Manrope, sans-serif; font-weight: 700; }
.qc-bar { display: block; height: 1.3mm; border-radius: 1mm; background: #e7e0c5; margin: 1.4mm 0 1.2mm; overflow: hidden; }
.qc-bar i { display: block; height: 100%; background: #14a05a; border-radius: 1mm; }
.qc-parts em { font-style: normal; font-size: 2.8mm; color: #6b7d72; }
.qc-scale { margin: 4mm 0 0; text-align: center; font-size: 3mm; color: #5a6e62; }
.qc-scale b { color: #10291c; }
.qc-foot { margin-top: auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8mm; align-items: end; }
.qc-foot > div { display: grid; gap: .6mm; font-size: 3.6mm; }
.qc-foot b { font-size: 3.9mm; }
.qc-foot small { font-size: 2.8mm; color: #5a6e62; line-height: 1.35; }
.qc-foot > div + div { text-align: center; border-top: .3mm solid #b9ae86; padding-top: 1.6mm; }
.qc-sign { display: flex; align-items: flex-end; gap: 2mm; margin-bottom: 1mm; }
.qc-line { position: relative; display: block; width: 58mm; border-bottom: .3mm solid #10291c; height: 12mm; }
.qc-esign { position: absolute; left: 5mm; bottom: .8mm; font-family: "Great Vibes", "Segoe Script", cursive; font-size: 10.5mm; line-height: 1; color: #1d3f8f;
  transform: rotate(-4deg); transform-origin: left bottom; white-space: nowrap; }
.qc-flourish { position: absolute; left: 3mm; bottom: -2.2mm; width: 50mm; height: 9mm; opacity: .85; }
.qc-sign em { font-style: normal; font-size: 2.6mm; color: #8a9a90; }
.cert-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.yk-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 14px 0; }
.yk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.yk-big { font-family: Unbounded, Manrope, sans-serif; font-size: 44px; font-weight: 800; line-height: 1; color: var(--green); }
.yk-big small { font-size: 18px; color: var(--muted); font-weight: 700; }
.yk-grade { font-weight: 800; font-size: 18px; }
.yk-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.yk-parts > div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.yk-parts b { font-size: 20px; } .yk-parts b i { font-style: normal; font-size: 14px; color: var(--muted); }
.yk-parts small, .yk-parts em { display: block; font-size: 13px; color: var(--muted); font-style: normal; }
.yk-parts .qc-bar { height: 6px; margin: 6px 0; background: var(--line); }
@media print {
  body.cert-print * { visibility: hidden !important; }
  body.cert-print .qc, body.cert-print .qc * { visibility: visible !important; }
  body.cert-print .qc { position: fixed !important; left: 0 !important; top: 0 !important; transform: none !important; box-shadow: none; border-radius: 0; }
}

/* ---- O'rnatish: qurilmani tanlash ---- */
.inst-ask { margin: 0 0 12px; font-weight: 700; color: var(--ink); }
.inst-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.inst-pick button { border: 0; border-radius: 18px; padding: 16px 6px 12px; background: var(--panel-2); color: var(--ink); display: grid; justify-items: center; gap: 4px; cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--line) inset; font: inherit; transition: transform .12s, box-shadow .12s; }
.inst-pick button:hover, .inst-pick button:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--green) inset, 0 8px 18px -10px #10291c66; outline: none; }
.inst-pick button span { font-size: 34px; line-height: 1; }
.inst-pick button b { font-size: 15px; }
.inst-pick button small { font-size: 11px; font-weight: 700; color: var(--green-2); min-height: 1.2em; }
.inst-pick button.mine { background: var(--green-bg); box-shadow: 0 0 0 2px var(--green) inset; }
.inst-back { border: 0; background: none; color: var(--green-2); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; padding: 0; margin: 0 0 6px; display: block; }
.inst-h { margin: 4px 0 12px; font-size: 18px; }
.inst-ok { margin: 6px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--green-bg); color: var(--ink); font-size: 15.5px; line-height: 1.45; }
@media (max-width: 380px) { .inst-pick { gap: 6px; } .inst-pick button span { font-size: 28px; } .inst-pick button b { font-size: 13.5px; } }
