/* =========================================================
   E-TADQIQOT — elektron ilmiy maqolalar bazasi
   Dizayn tizimi: neytral fon + logotipdan olingan ko'k va yashil urg'u
   ========================================================= */

:root {
  /* Brend — logotipdan olingan: to'q ko'k + yashil */
  --brand:        #1B4F9C;
  --brand-600:    #164380;
  --brand-700:    #113566;
  --brand-soft:   #EAF1FA;
  --brand-line:   #C5D8F0;
  --green:        #3E8E41;
  --green-soft:   #EDF6EE;
  --accent:       #B45309;
  --accent-soft:  #FDF3E7;

  /* Neytral */
  --bg:           #F5F7F7;
  --surface:      #FFFFFF;
  --surface-2:    #FAFBFB;
  --ink:          #0C1418;
  --ink-2:        #24343B;
  --muted:        #5D6E77;
  --faint:        #8A9AA2;
  --line:         #E2E8EA;
  --line-2:       #CFD8DB;

  /* Holat */
  --ok:           #15803D;
  --ok-soft:      #E8F6EC;
  --err:          #B91C1C;
  --err-soft:     #FCECEC;

  --radius:       14px;
  --radius-sm:    9px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 2px rgba(12,20,24,.05);
  --shadow:       0 2px 8px rgba(12,20,24,.06), 0 1px 2px rgba(12,20,24,.04);
  --shadow-lg:    0 18px 46px rgba(12,20,24,.13);
  --maxw:         1180px;
  --font:         'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif:        'Lora', Georgia, 'Times New Roman', serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand:      #6BA6EE;
    --brand-600:  #8DBDF4;
    --brand-700:  #A9CFF8;
    --brand-soft: #122641;
    --brand-line: #1F3F68;
    --accent:     #E0A155;
    --green:      #6FC275;
    --green-soft: #13291A;
    --accent-soft:#2E2113;
    --bg:         #0A0F11;
    --surface:    #121A1D;
    --surface-2:  #161F22;
    --ink:        #E8F0F1;
    --ink-2:      #C6D3D6;
    --muted:      #93A5AC;
    --faint:      #74868D;
    --line:       #222E32;
    --line-2:     #2E3D42;
    --ok:         #4ADE80;
    --ok-soft:    #11291A;
    --err:        #F87171;
    --err-soft:   #2A1516;
    --shadow-sm:  0 1px 2px rgba(0,0,0,.4);
    --shadow:     0 2px 10px rgba(0,0,0,.45);
    --shadow-lg:  0 20px 50px rgba(0,0,0,.6);
  }
  :root:not([data-theme="light"]) .btn-primary { color: #0A1B2E; }
}

:root[data-theme="dark"] {
  --brand:      #6BA6EE;
  --brand-600:  #8DBDF4;
  --brand-700:  #A9CFF8;
  --brand-soft: #122641;
  --brand-line: #1F3F68;
  --accent:     #E0A155;
  --green:      #6FC275;
  --green-soft: #13291A;
  --accent-soft:#2E2113;
  --bg:         #0A0F11;
  --surface:    #121A1D;
  --surface-2:  #161F22;
  --ink:        #E8F0F1;
  --ink-2:      #C6D3D6;
  --muted:      #93A5AC;
  --faint:      #74868D;
  --line:       #222E32;
  --line-2:     #2E3D42;
  --ok:         #4ADE80;
  --ok-soft:    #11291A;
  --err:        #F87171;
  --err-soft:   #2A1516;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.4);
  --shadow:     0 2px 10px rgba(0,0,0,.45);
  --shadow-lg:  0 20px 50px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 820px; }

/* ================= HEADER ================= */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
/* Logotip belgisi — kichik o'lchamda faqat emblema (kitob, qalpoq, lupa)
   ko'rinishi uchun to'liq logotip kadrlanadi. Oq doira qorong'i rejimda ham
   emblemaning o'qilishini ta'minlaydi. */
.brand-mark {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  flex-shrink: 0; background: #fff; overflow: hidden; display: block;
  box-shadow: 0 1px 4px rgba(12,20,24,.16), inset 0 0 0 1.5px var(--brand);
}
.brand-mark img {
  position: absolute; width: 179%; height: auto; max-width: none;
  left: -39.5%; top: -13.8%;
}
.site-footer .brand-mark { width: 46px; height: 46px; }

/* To'liq logotip — matni o'qiladigan o'lchamda.
   Doira shaklida kesiladi: qorong'i rejimda burchaklardagi oq fon ko'rinmaydi. */
.logo-full { width: 148px; height: auto; margin-bottom: 18px; border-radius: 50%; }
.brand-name { font-weight: 800; font-size: 1.06rem; letter-spacing: -0.03em; color: var(--ink); line-height: 1.15; }
.brand-name span { color: var(--brand); }
.brand-sub { font-size: .695rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  color: var(--ink-2); font-size: .925rem; font-weight: 550;
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  transition: background .15s, color .15s; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 650; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: .925rem; font-weight: 650; line-height: 1;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: all .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 32%, transparent); }
:root[data-theme="dark"] .btn-primary { color: #0A1B2E; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 14px; font-size: .86rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center; font-size: 1rem; transition: border-color .15s;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }

.burger { display: none; width: 38px; height: 38px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 9px; cursor: pointer; }
.burger span { display: block; width: 17px; height: 1.8px; background: var(--ink); margin: 3.5px auto; border-radius: 2px; transition: .2s; }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--surface); padding: 10px 20px 18px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 11px 4px; color: var(--ink-2); font-weight: 550; border-bottom: 1px solid var(--line); text-decoration: none; }
.mobile-nav a:last-of-type { border-bottom: 0; }
.mobile-nav a.active { color: var(--brand); }

@media (max-width: 940px) {
  .nav, .header-actions .btn { display: none; }
  .burger { display: block; margin-left: auto; }
  .header-actions { margin-left: 0; gap: 6px; }
}

/* ================= HERO ================= */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 12% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(700px 380px at 92% 0%, color-mix(in srgb, var(--green) 13%, transparent), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 74px 0 64px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}
.hero > .wrap { position: relative; z-index: 2; }

/* ---- Hero orqa foni: rasmlar karuseli ----
   Rasmlar matn ostida turadi. "Scrim" qatlami chap tomonni deyarli to'liq
   fon rangi bilan yopadi — shuning uchun matn har qanday rasmda ham o'qiladi. */
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.hero-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 1.6s ease-in-out;
}
.hero-bg img.on { opacity: .5; }
/* Niqob matn ustuniga bog'langan, viewport foiziga emas: konteyner markazlashgani
   uchun (max 1180px) matn o'ng chekkasi taxminan 50% + 150px da tugaydi.
   Shu nuqtagacha fon to'liq shaffofmas — matn har qanday ekran enida o'qiladi. */
.hero-scrim {
  position: absolute; inset: 0; display: block;
  background:
    linear-gradient(100deg,
      var(--surface) 0,
      var(--surface) calc(50% + 150px),
      color-mix(in srgb, var(--surface) 72%, transparent) calc(50% + 300px),
      color-mix(in srgb, var(--surface) 30%, transparent) calc(50% + 520px),
      transparent 100%),
    linear-gradient(to bottom, transparent 58%, var(--surface) 100%);
}
.hero.has-bg::after { opacity: .22; }

@media (max-width: 900px) {
  /* Tor ekranda matn butun enni egallaydi — rasm sezilarli darajada susaytiriladi */
  .hero-bg img.on { opacity: .2; }
  .hero-scrim { background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 72%, transparent) 0%,
      color-mix(in srgb, var(--surface) 88%, transparent) 40%,
      var(--surface) 82%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg img { transition: none; }
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.25rem); letter-spacing: -0.035em;
  max-width: 17ch; margin-bottom: 18px;
}
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--brand); letter-spacing: -0.01em; }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; margin-bottom: 30px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand-700);
  border: 1px solid var(--brand-line);
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* Qidiruv */
.searchbar { display: flex; gap: 10px; max-width: 640px; margin-bottom: 26px; }
.searchbar .field { position: relative; flex: 1; }
.searchbar input {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: 12px; padding: 14px 16px 14px 44px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.searchbar input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.searchbar .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 1rem; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-stat .num { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); }
.hero-stat .lbl { font-size: .82rem; color: var(--muted); font-weight: 550; }

/* ================= SECTION ================= */
.section { padding: 62px 0; }
.section-sm { padding: 42px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -0.025em; }
.section-head p { color: var(--muted); font-size: .95rem; margin-top: 5px; }
.link-more { font-weight: 650; font-size: .92rem; color: var(--brand); display: inline-flex; align-items: center; gap: 5px; }

/* ================= MAQOLA KARTOCHKASI ================= */
.card-list { display: flex; flex-direction: column; gap: 14px; }

.art-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; transition: border-color .18s, box-shadow .18s, transform .18s;
  position: relative;
}
.art-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.art-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.art-title { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.4; margin-bottom: 8px; }
.art-title a { color: var(--ink); }
.art-title a:hover { color: var(--brand); text-decoration: none; }
.art-authors { font-size: .93rem; color: var(--ink-2); margin-bottom: 8px; }
.art-authors b { font-weight: 600; }
.art-abstract { font-size: .93rem; color: var(--muted); line-height: 1.65; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: var(--faint); }
.art-foot .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .755rem; font-weight: 650; letter-spacing: .02em;
  padding: 4px 9px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.tag-field { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-700); }
.tag-lang { text-transform: uppercase; letter-spacing: .06em; }
.tag-demo { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.tag-id { font-variant-numeric: tabular-nums; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .74rem; }

/* ================= GRID / KARTA ================= */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color .18s, transform .18s, box-shadow .18s;
  text-decoration: none; display: block; color: inherit;
}
.tile:hover { border-color: var(--brand-line); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tile-ico {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; margin-bottom: 14px;
  border: 1px solid var(--brand-line);
}
.tile h3 { font-size: 1.02rem; margin-bottom: 6px; letter-spacing: -0.015em; }
.tile p { font-size: .9rem; color: var(--muted); }
.tile .count { font-size: .82rem; color: var(--brand); font-weight: 650; margin-top: 10px; }

/* Qadamlar */
.steps { counter-reset: st; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; position: relative;
}
.step::before {
  counter-increment: st; content: counter(st, decimal-leading-zero);
  font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--brand);
  display: block; margin-bottom: 10px; letter-spacing: -0.02em;
}
.step h3 { font-size: 1.02rem; margin-bottom: 7px; }
.step p { font-size: .92rem; color: var(--muted); }

/* ================= MAQOLA SAHIFASI ================= */
.article-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 30px 0 34px; }
.crumbs { font-size: .85rem; color: var(--faint); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 316px; gap: 34px; align-items: start; padding: 34px 0 60px; }
@media (max-width: 950px) { .article-layout { grid-template-columns: 1fr; gap: 24px; } .side { position: static !important; } }

h1.a-title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em;
  font-size: clamp(1.45rem, 3vw, 2.05rem); line-height: 1.32; margin: 12px 0 18px;
}
.a-authors { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.a-author { display: flex; gap: 12px; align-items: flex-start; }
.a-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-700)); color: #fff;
  font-weight: 700; font-size: .95rem;
}
.a-avatar.has-photo { background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.a-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.a-avatar-lg { width: 54px; height: 54px; font-size: 1.15rem; }
.a-author-name { font-weight: 650; color: var(--ink); font-size: 1rem; }
.a-author-aff { font-size: .875rem; color: var(--muted); line-height: 1.5; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; }
.panel h2, .panel h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--brand); font-weight: 750; margin-bottom: 11px; }
.panel .body { font-size: 1.005rem; line-height: 1.78; color: var(--ink-2); }

.kw-row { display: flex; flex-wrap: wrap; gap: 7px; }
.kw {
  font-size: .855rem; font-weight: 550; padding: 5px 11px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none;
}
.kw:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.cover-wrap {
  position: relative; border-radius: 12px; overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(12,20,24,.16), 0 2px 6px rgba(12,20,24,.08);
  aspect-ratio: 1 / 1.414; background: var(--surface-2);
  display: block;
}
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .4s ease; }
.cover-wrap:hover img { transform: scale(1.03); }
.cover-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(8,14,16,.88) 12%, rgba(8,14,16,0) 100%);
  color: rgba(255,255,255,.94); padding: 26px 12px 10px;
  font-size: .73rem; font-weight: 600; line-height: 1.4; letter-spacing: .01em;
}
.cover-zoom {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px;
  background: rgba(8,14,16,.55); color: #fff; display: grid; place-items: center;
  font-size: .8rem; opacity: 0; transition: opacity .2s;
}
.cover-wrap:hover .cover-zoom { opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(6,10,12,.9);
  display: none; align-items: center; justify-content: center; padding: 28px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox .close {
  position: absolute; top: 18px; right: 20px; width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff;
  font-size: 1.2rem; cursor: pointer; font-family: inherit;
}

.side { position: sticky; top: 86px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.meta-row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-row:first-child { padding-top: 0; }
.meta-k { font-size: .715rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; margin-bottom: 2px; }
.meta-v { font-size: .93rem; color: var(--ink); line-height: 1.5; }

.pdf-btn { width: 100%; margin-bottom: 9px; }
.pdf-none { font-size: .86rem; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 14px; text-align: center; }

.cite-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 15px; font-size: .88rem; line-height: 1.65; color: var(--ink-2); position: relative; }
.cite-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.cite-tab { font-size: .78rem; font-weight: 650; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font-family: inherit; }
.cite-tab.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-700); }
.copy-btn { position: absolute; top: 9px; right: 9px; font-size: .74rem; font-weight: 650; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); cursor: pointer; font-family: inherit; }
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ================= BAZA (filtr) ================= */
.db-layout { display: grid; grid-template-columns: 262px minmax(0,1fr); gap: 28px; align-items: start; padding: 30px 0 60px; }
@media (max-width: 900px) { .db-layout { grid-template-columns: 1fr; } .filters { position: static !important; } }
.filters { position: sticky; top: 86px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.filter-group { margin-bottom: 18px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-title { font-size: .715rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; margin-bottom: 9px; }
.filter-opt { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.filter-opt input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.filter-opt .n { margin-left: auto; font-size: .78rem; color: var(--faint); font-variant-numeric: tabular-nums; }

.db-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.db-bar input[type="search"] {
  flex: 1; min-width: 200px; font-family: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 10px;
  padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.db-bar input[type="search"]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent); }
.db-bar select {
  font-family: inherit; font-size: .9rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-2); border-radius: 10px; padding: 11px 13px; outline: none; cursor: pointer;
}
.db-count { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.db-count b { color: var(--ink); font-weight: 700; }

/* Arxiv ro'yxati */
.archive-list { list-style: decimal; margin: 0 0 30px 26px; }
.archive-list li { margin-bottom: 12px; line-height: 1.55; }
.archive-list a { font-weight: 600; }
.arch-meta { display: block; font-size: .86rem; color: var(--muted); margin-top: 2px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 2.2rem; margin-bottom: 10px; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ================= FORMA ================= */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
@media (max-width: 600px) { .form-card { padding: 20px 16px; } }
.fgroup { margin-bottom: 18px; }
.fgroup label { display: block; font-size: .875rem; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.fgroup label .req { color: var(--err); }
.fgroup .hint { font-size: .8rem; color: var(--faint); margin-top: 5px; line-height: 1.5; }
.fgroup input[type="text"], .fgroup input[type="email"], .fgroup input[type="tel"],
.fgroup select, .fgroup textarea {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line-2); border-radius: 10px;
  padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.fgroup textarea { resize: vertical; min-height: 128px; line-height: 1.6; }
.fgroup input:focus, .fgroup select:focus, .fgroup textarea:focus {
  border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent);
}
.fgroup input.bad, .fgroup textarea.bad, .fgroup select.bad { border-color: var(--err); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .frow { grid-template-columns: 1fr; } }

.drop {
  border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--surface-2);
  padding: 22px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .ico { font-size: 1.6rem; margin-bottom: 6px; }
.drop .t { font-weight: 650; font-size: .93rem; color: var(--ink); }
.drop .s { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.drop input[type="file"] { display: none; }
.file-chip {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent);
  border-radius: 10px; padding: 10px 12px; font-size: .88rem; color: var(--ink);
}
.file-chip .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-chip .sz { color: var(--muted); font-size: .82rem; }
.file-chip button { border: 0; background: transparent; color: var(--err); cursor: pointer; font-size: 1rem; font-family: inherit; }

.pay-card {
  background: linear-gradient(140deg, var(--brand-700), var(--brand));
  color: #fff; border-radius: var(--radius); padding: 22px 24px;
}
.pay-card .amt { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; }
.pay-card .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; font-weight: 700; }
.pay-num {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 1.15rem;
  letter-spacing: .1em; margin: 12px 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pay-num button { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 7px; padding: 4px 9px; font-size: .74rem; font-weight: 650; cursor: pointer; font-family: inherit; }
.pay-card small { opacity: .85; font-size: .84rem; }

.alert { border-radius: 11px; padding: 14px 16px; font-size: .92rem; line-height: 1.6; margin-bottom: 16px; }
.alert-info { background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-700); }
.alert-warn { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.alert-ok { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent); color: var(--ok); }
.alert-err { background: var(--err-soft); border: 1px solid color-mix(in srgb, var(--err) 32%, transparent); color: var(--err); }

.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.progress i { display: block; height: 100%; width: 0%; background: var(--brand); transition: width .35s ease; }

/* ================= PROZA ================= */
.prose { font-size: 1.01rem; line-height: 1.8; color: var(--ink-2); }
.prose h2 { font-size: 1.32rem; margin: 34px 0 12px; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.08rem; margin: 26px 0 9px; }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface-2); font-weight: 650; }
.prose blockquote { border-left: 3px solid var(--brand); background: var(--surface-2); padding: 12px 16px; margin: 16px 0; border-radius: 0 8px 8px 0; color: var(--muted); }

.page-title { padding: 44px 0 10px; }
.page-title h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.035em; margin-bottom: 10px; }
.page-title p { color: var(--muted); font-size: 1.04rem; max-width: 64ch; }

/* ================= FOOTER ================= */
.site-footer { margin-top: auto; background: var(--surface); border-top: 1px solid var(--line); padding: 46px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 750; margin-bottom: 12px; }
.footer-grid a { display: block; font-size: .91rem; color: var(--muted); padding: 4px 0; }
.footer-grid a:hover { color: var(--brand); }
.footer-about { font-size: .91rem; color: var(--muted); line-height: 1.7; max-width: 42ch; margin-top: 12px; }
.footer-bot { border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .855rem; color: var(--faint); }

/* ================= YORDAMCHI ================= */
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0 !important; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.cta-band {
  background: linear-gradient(140deg, var(--brand-700), var(--brand));
  border-radius: var(--radius-lg); padding: 40px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-bottom: 8px; letter-spacing: -0.025em; }
.cta-band p { opacity: .9; max-width: 52ch; font-size: .98rem; }
.cta-band .btn { background: #fff; color: var(--brand-700); }
.cta-band .btn:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.2); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 90px);
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 11px;
  font-size: .91rem; font-weight: 600; z-index: 200; opacity: 0; transition: .3s ease; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media print {
  .site-header, .site-footer, .side, .crumbs, .theme-toggle { display: none !important; }
  body { background: #fff; }
  .article-layout { grid-template-columns: 1fr; }
}
