/*
 * IlmiyTadqiqot.uz — «Ilmiy tadqiqot metodologiyasi» elektron darsligi
 * Uslublar jadvali (CSS)
 *
 * VOICE   : xotirjam, akademik — magistrant uchun tadqiqotchi qo'llanmasi.
 * IDEA    : ilmiy bilish sikli (kuzatish → faraz → tajriba → nazariya); har bir bob — sikldagi navbatdagi qadam, test — keyingi qadam darvozasi.
 * PICTURE : bosh sahifadagi koordinata to'ri ustidagi bilish sikli, kitob, grafik va lupa (SVG).
 * COLOUR  : chuqur siyoh-ko'k (asosiy), firuza (yordamchi), qadimiy oltin (urg'u), pergament fon.
 * TYPE    : Archivo (sarlavhalar) + Source Sans 3 (matn) — lotin va kirill harflarini to'liq qo'llaydi.
 * LAYOUT  : chap tomonda mundarija, o'ngda o'qish ustuni (≤ 820px); 900px dan torroqda yon panel tortma menyuga aylanadi.
 */

:root {
  color-scheme: light dark;
  --bg: light-dark(#faf8f3, #12151c);
  --panel: light-dark(#ffffff, #1a1e27);
  --ink: light-dark(#1c2333, #e8ebf2);
  --muted: light-dark(#5d6577, #a6aebf);
  --line: light-dark(#e2e0d8, #2f3544);
  --soil: light-dark(#24365c, #9fb3d9);
  --soil-deep: #17233d;
  --green: light-dark(#1f6f6b, #7fd1c7);
  --green-bg: light-dark(#e4f2f0, #15302e);
  --gold: light-dark(#c8901a, #e6b64a);
  --gold-bg: light-dark(#fff4dc, #3a2e14);
  --red: light-dark(#b23a2a, #ef8a7a);
  --red-bg: light-dark(#fbe9e5, #3a1d18);
  /* rangli fon ustidagi matn: tungi rejimda fon och bo'lgani uchun matn to'q bo'lishi kerak */
  --on-green: light-dark(#ffffff, #0b1f1d);
  --on-red: light-dark(#ffffff, #2a0f0a);
  /* ilmiy "millimetrli qog'oz" to'ri (bosh sahifa va muallif sahifasi foni uchun) */
  --grid-line: #ffffff10;
  --fs: 17px;
  --side: 310px;
}
: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 "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: clip;
}
h1, h2, h3, h4 { font-family: Archivo, "Segoe UI", Arial, sans-serif; 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 Archivo, sans-serif; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo small { font: 500 13px/1.2 "Source Sans 3", sans-serif; 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); height: calc(100dvh - 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 "Source Sans 3", sans-serif; 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 Archivo, sans-serif; background: var(--line); color: var(--ink); }
.nav a.done .n { background: var(--green); color: var(--on-green); }
.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 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: var(--on-green); 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(160deg, #17233d 0%, #24365c 55%, #1f4f5c 100%); position: relative; overflow: hidden; }
:root[data-theme=dark] .hero { background: linear-gradient(160deg, #0d1424 0%, #17233d 60%, #133338 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .hero { background: linear-gradient(160deg, #0d1424 0%, #17233d 60%, #133338 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 Archivo, sans-serif; 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 Archivo, sans-serif; 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 Archivo, sans-serif; }

/* ---------- 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 Archivo, sans-serif; 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 Archivo, sans-serif; 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: var(--on-green); }
.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) ---------- */
.hero, .author-hero { background-image:
  linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
  linear-gradient(160deg, #17233d 0%, #24365c 55%, #1f4f5c 100%); background-size: 28px 28px, 28px 28px, auto; }
.author-hero { min-height: calc(100vh - 60px); display: flex; align-items: center; }
:root[data-theme=dark] .author-hero { background: linear-gradient(160deg, #0d1424 0%, #17233d 60%, #133338 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .author-hero { background: linear-gradient(160deg, #0d1424 0%, #17233d 60%, #133338 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: start; }
.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 .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 Archivo, sans-serif; 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; } }

/* ---------- Muallif sahifasi: monogramma va tarjimai hol ---------- */
.mono { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font: 800 44px/1 Archivo, sans-serif; color: #fff;
  background: radial-gradient(circle at 30% 25%, #3a5487, #17233d); border: 4px solid var(--gold); box-shadow: 0 6px 18px #0000002e; letter-spacing: 1px; }
.contacts b { font-size: 16px; }
.bio { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 6px; }
.bio h3 { font-size: 17px; margin: 14px 0 6px; color: var(--soil); }
.tline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--gold); }
.tline li { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 4px 0; font-size: 15px; }
.tline li::before { content: ""; position: absolute; left: -20px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--gold); }
.tline b { color: var(--soil); font-variant-numeric: tabular-nums; }
.small { font-size: 14px; color: var(--muted); }
@media (max-width: 520px) { .author-card { grid-template-columns: minmax(0, 1fr); } .bio { text-align: left; } .tline li { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* ---------- Bob yakuni: sharh, topshiriqlar, keyslar, izohlar ---------- */
.sharh h4 { color: var(--soil); margin-top: 1.4em; }
.read p.src { font-size: 14px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 1.6em; }
ol.tasks > li { margin-bottom: .7em; }
.case { border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 14px 0; background: var(--panel); }
.case-h { font: 700 17px/1.3 Archivo, sans-serif; color: var(--soil); margin-bottom: 6px; }
.case ol { margin-bottom: 0; }
.qnote { margin-top: 8px; font-size: 15px; background: var(--green-bg); border-radius: 8px; padding: 8px 12px; }
.pmeta b { color: var(--soil); }

/* ---------- Umumiy bloklar ---------- */
.read.wide { max-width: 1040px; }
.lead { font-size: calc(var(--fs) + 1px); color: var(--muted); }
.note { background: var(--gold-bg); border-radius: 10px; padding: 10px 14px; margin: 12px 0 16px; font-size: 15px; }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi b { display: block; font: 800 clamp(24px, 3vw, 32px)/1.05 Archivo, sans-serif; color: var(--soil); }
.kpi span { font-size: 14px; color: var(--muted); }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 14px; padding: 30px 20px; text-align: center; color: var(--muted); }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn.danger { color: var(--red); border-color: var(--red); }
.badge { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.badge.oa { background: var(--green-bg); color: var(--green); border-color: transparent; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Jurnallar katalogi ---------- */
.jtools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 8px 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 4px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.chips button small { color: var(--muted); font-weight: 400; }
.chips button.on { background: var(--soil); color: var(--bg); border-color: var(--soil); }
.chips button.on small { color: inherit; opacity: .8; }
.jtools input { flex: 1 1 260px; max-width: 380px; min-height: 44px; font-size: 16px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.jlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.jcard, .acard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; }
.jcard { border-top: 5px solid var(--line); }
.jcard.t-xalqaro { border-top-color: var(--gold); }
.jcard.t-oak { border-top-color: var(--green); }
.jcard.t-milliy { border-top-color: var(--soil); }
.jh { display: flex; flex-wrap: wrap; gap: 6px; }
.jcard h3, .acard h3 { font-size: 18px; margin: 10px 0 8px; line-height: 1.25; }
.jcard dl { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 2px 10px; margin: 0 0 8px; font-size: 14px; }
.jcard dt { color: var(--muted); }
.jcard dd { margin: 0; }
.jn { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.jl { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 6px; }

/* ---------- Mening maqolalarim ---------- */
.acard { margin: 12px 0; }
.acard .am { font-size: 14.5px; color: var(--muted); margin: 0 0 6px; }
.acard .ab { font-size: 15px; margin: 0 0 6px; }
.acard .file { font-size: 14px; margin-right: auto; overflow-wrap: anywhere; }
.badge.st-nashr_etilgan { background: var(--green-bg); color: var(--green); border-color: transparent; }
.badge.st-yuborilgan { background: var(--gold-bg); color: var(--ink); border-color: transparent; }
.badge.rv-ok { background: var(--green); color: var(--on-green); border-color: transparent; }
.badge.rv-bad { background: var(--red-bg); color: var(--red); border-color: transparent; }
.badge.rv-wait { background: var(--bg); }
.rnote { border-radius: 8px; padding: 8px 12px; font-size: 15px; margin: 4px 0 6px; background: var(--bg); }
.rnote.ok { background: var(--green-bg); }
.rnote.bad { background: var(--red-bg); }
.aform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; }
.aform h2 { grid-column: 1 / -1; margin: 0 0 8px; font-size: 22px; }
.aform .full { grid-column: 1 / -1; }
.aform label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.aform input, .aform select, .aform textarea { display: block; width: 100%; margin-top: 4px; min-height: 46px; font: 400 16px/1.4 "Source Sans 3", sans-serif; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.aform textarea { resize: vertical; }
.aform input[type=file] { padding: 10px; }
@media (max-width: 640px) { .aform { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .top .prog { display: none; }
  .logo span { font-size: 17px; }
  .logo small { display: none; }
}
/* Muallif surati — dumaloq ramkada */
.author-card .ph img { width: 150px; height: 150px; object-fit: cover; object-position: 50% 18%; border-radius: 50%; border: 4px solid var(--gold); box-shadow: 0 6px 18px #0000002e; background: #fff; }
.contacts a { font-size: 15px; overflow-wrap: break-word; }
/* Muallifning ilmiy profillari */
.profiles { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 6px; }
.profiles h3 { font-size: 17px; margin: 12px 0 10px; color: var(--soil); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pgrid a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--ink); }
.pgrid a:hover { border-color: var(--green); }
.pgrid b { color: var(--green); font-size: 15px; }
.pgrid small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 520px) { .profiles { text-align: left; } }

/* ---------- Matn: qator to'liq to'lgach keyingisi boshlanadi (ikki tomonlama tekislash) ---------- */
.read p, .read li, .read dd, .annot, .case p, .jn, .acard .ab, .wtext, .book-card p { text-align: justify; text-justify: inter-word; hyphens: auto; }
.read .crumb, .read .pmeta, .read .small.full, .rbar span { text-align: left; }
/* tor ekranda o'zbek tili uchun bo'g'in ko'chirish lug'ati yo'q — justify so'zlar orasida katta "teshiklar" qoldiradi */
@media (max-width: 600px) { .read p, .read li, .read dd, .annot, .case p, .jn, .acard .ab, .wtext, .book-card p { text-align: left; } }

/* ---------- O'quv dasturi ---------- */
.ychips { margin: 4px 0 8px; }
.rtab tbody th { text-align: left; vertical-align: top; width: 220px; color: var(--muted); font-weight: 600; }
.grid.crit { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.crit .kpi b { font-size: 22px; }
.grid.crit ul { margin: 6px 0 0; padding-left: 18px; font-size: 14.5px; }
a.jcard.prac { text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
a.jcard.prac:hover { border-color: var(--green); transform: translateY(-1px); }
.case.chosen { border-left-color: var(--green); background: var(--green-bg); }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
.slot { border: 2px dashed var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; background: var(--panel); }
.slot.full { border-style: solid; border-color: var(--green); }
.slot b { color: var(--soil); }
.slot a { font-size: 14.5px; }
.wtext { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 6px 0 8px; font-size: 15px; max-height: 360px; overflow: auto; }
@media (max-width: 760px) { .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rtab tbody th { width: auto; } }

/* ---------- Amaliy mashg'ulot: material → interaktiv topshiriq → yozma ish ---------- */
.stepper.mini3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 18px; }
.stepper.mini3 .stp { cursor: default; }
.prac-mat h3 { margin-top: 1.4em; }
.case.namuna { border-left-color: var(--green); }
.lockbox { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); background: var(--panel); }
.quiz fieldset.q { margin-bottom: 14px; }
.quiz fieldset.qok, .quiz fieldset.qbad { border-left: 4px solid; padding-left: 14px; }
.quiz fieldset.qok { border-left-color: var(--green); }
.quiz fieldset.qbad { border-left-color: var(--red); }
.numans { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.numans input { width: 180px; min-height: 44px; font-size: 17px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
#qBox .result .score small, #main .result .score small { font-size: 16px; }

/* ---------- 100 ballik reyting ---------- */
.total { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 8px 0 14px; flex-wrap: wrap; }
.total b { font: 800 56px/1 Archivo, sans-serif; color: var(--soil); }
.total span { font-size: 18px; color: var(--muted); }
.total em { font-style: normal; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.total em.g5 { background: var(--green); color: var(--on-green); border-color: transparent; }
.total em.g4 { background: var(--green-bg); color: var(--green); }
.total em.g3 { background: var(--gold-bg); }
.total em.g2 { background: var(--red-bg); color: var(--red); }
.rtab.rating td .small { font-size: 13px; color: var(--muted); }
.rtab .bar { width: 26%; }
.rtab .hb { display: block; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.rtab .hb i { display: block; height: 100%; background: var(--gold); }
.rtab tr.sum td { border-top: 2px solid var(--ink); }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- Sertifikat bloki (Mening reytingim) ---------- */
#certBox { text-align: left; margin: 4px 0 18px; }
.certok { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--gold-bg); border: 1.5px solid var(--gold); border-radius: 14px; padding: 14px 16px; }
.certok .ci { font-size: 34px; line-height: 1; }
.certok .ct { flex: 1 1 260px; display: grid; gap: 2px; }
.certok .ct b { font: 800 17px/1.3 Archivo, sans-serif; }
.certok .ca { display: flex; gap: 8px; flex-wrap: wrap; }
.certwait { background: var(--panel); border: 1.5px dashed var(--line); border-radius: 14px; padding: 12px 16px 14px; }
.certwait h3 { margin: 0 0 4px; border: 0; padding: 0; font-size: 18px; color: var(--ink); }
.certconds { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; }
.certconds li { display: flex; gap: 8px; align-items: baseline; font-size: 15px; }
.certconds li span { font-weight: 800; color: var(--muted); width: 18px; }
.certconds li.ok span { color: var(--green); }
.certconds li em { font-style: normal; color: var(--muted); font-size: 13.5px; margin-left: auto; }
@media (max-width: 640px) { .stepper.mini3 { grid-template-columns: minmax(0, 1fr); } .rtab .bar { display: none; } }

/* Mutaxassislik sohasiga oid qo'shimcha savollar (bob testidan keyin) */
.soha-q { margin: 26px 0 8px; }
.soha-q h3 { margin-bottom: 4px; }
.soha-q .small { color: var(--muted); font-size: 14px; }
