/* ==========================================================================
   Articles.Com.Uz — ommaviy sayt uslublari
   ========================================================================== */

/* ---------- Dizayn tokenlari ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f3f3f5;
  --text: #0c0c10;
  --text-2: #3b3b44;
  --muted: #6e6e78;
  --faint: #a1a1aa;
  --border: #ebebef;
  --border-strong: #d9d9e0;
  --overlay: rgba(12, 12, 16, .42);
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .05);
  --shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 8px 24px -8px rgba(16, 16, 24, .10);
  --shadow-lg: 0 24px 64px -16px rgba(16, 16, 24, .25), 0 2px 6px rgba(16, 16, 24, .06);
  --code-bg: #0e1116;
  --code-text: #e6edf3;
  --mark: rgba(255, 213, 79, .45);

  --primary: #0071e3;
  --primary-ink: #ffffff;
  --accent: #ff6a3d;
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-reading: Georgia, serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --fs-reading: 19px;
  --content-w: 700px;
  --site-w: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --progress-h: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4vw, 32px);

  /* O'qish sozlamalari (JS orqali o'zgaradi) */
  --rd-size: var(--fs-reading);
  --rd-lh: 1.75;
  --rd-width: var(--content-w);
  --rd-font: var(--font-reading);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0b0d;
  --bg-soft: #111114;
  --surface: #141417;
  --surface-2: #1c1c21;
  --text: #f1f1f3;
  --text-2: #c8c8d0;
  --muted: #90909b;
  --faint: #5f5f69;
  --border: #232329;
  --border-strong: #2f2f37;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, .7);
  --code-bg: #08090c;
  --mark: rgba(255, 213, 79, .28);
  color-scheme: dark;
}

/* ---------- Asosiy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: -.022em; line-height: 1.15; margin: 0; }
p { margin: 0; }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
.container { width: 100%; max-width: calc(var(--site-w) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { width: 100%; max-width: calc(var(--content-w) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
kbd { font: 500 11px/1 var(--font-body); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); background: var(--bg-soft); }

/* ---------- Tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, #000); }
.btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text); }
.btn-light { background: #fff; color: #111; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; color: var(--text-2); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn-sm { width: 32px; height: 32px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.link-btn:hover { color: var(--text); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--text-2); }
.link-arrow .ic { transition: transform .25s var(--ease); }
.link-arrow:hover { color: var(--primary); }
.link-arrow:hover .ic { transform: translateX(3px); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.chip-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.is-active .chip-count { color: inherit; opacity: .6; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.badge .ic { width: 12px; height: 12px; }
.badge-accent { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.avatar-xs { width: 22px; height: 22px; }
.avatar-lg { width: 72px; height: 72px; }
.avatar-initials { display: inline-grid; place-items: center; font: 700 15px/1 var(--font-heading); color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.avatar-lg.avatar-initials { font-size: 24px; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid transparent; transition: border-color .3s, transform .35s var(--ease), background-color .3s; }
.site-header.is-sticky { position: sticky; top: 0; }
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.site-header.is-centered .header-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
.site-header.is-centered .brand { justify-self: center; grid-column: 2; grid-row: 1; }
.site-header.is-centered .main-nav { grid-column: 1; grid-row: 1; }
.site-header.is-centered .header-actions { grid-column: 3; justify-self: end; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 750 19px/1 var(--font-heading); letter-spacing: -.03em; flex-shrink: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--text); color: var(--bg); font-size: 17px; font-weight: 800; transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-dot { color: var(--accent); }
.brand-logo { height: 32px; width: auto; }
.brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: block; }
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; padding: 4px; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .2s, background-color .2s; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"], .nav-link.is-current { color: var(--text); }
.nav-link[aria-current="page"]::after, .nav-link.is-current::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.nav-chevron { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.nav-mega.is-open .nav-chevron { transform: rotate(180deg); }
.nav-mega.is-open .nav-trigger { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.search-trigger { display: inline-flex; align-items: center; gap: 8px; width: auto; height: 38px; padding: 0 6px 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); color: var(--muted); transition: border-color .2s, color .2s, background-color .2s; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.search-trigger .ic { width: 16px; height: 16px; }
.search-trigger-label { font-size: 14px; margin-right: 14px; }
.search-trigger kbd { height: 24px; display: inline-flex; align-items: center; }
.script-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); margin: 0 4px; }
.script-switch a { padding: 5px 10px; font-size: 12.5px; font-weight: 600; border-radius: 999px; color: var(--muted); transition: all .2s; }
.script-switch a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.header-cta { margin-left: 6px; }
.header-cta .ic { width: 16px; height: 16px; }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }
.menu-toggle { display: none; }
.mobile-menu { border-top: 1px solid var(--border); background: var(--bg); max-height: calc(100vh - var(--header-h)); overflow-y: auto; animation: slideDown .3s var(--ease); }
.mobile-menu nav { display: grid; padding-top: 8px; padding-bottom: 16px; }
.mobile-menu a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; font-size: 17px; font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-menu a .ic { color: var(--muted); }
.mobile-menu .count { margin-left: auto; font-size: 13px; color: var(--faint); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Reading progress ---------- */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: var(--progress-h); z-index: 120; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; border-radius: 0 2px 2px 0; }

/* ---------- Mega-menyu (Bo'limlar) ---------- */
.nav-mega { position: static; }
.mega-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; padding: 0 var(--gutter); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s; pointer-events: none; }
.nav-mega.is-open .mega-panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.mega-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.mega-inner, .mega-foot { max-width: var(--site-w); margin: 0 auto; }
.mega-inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; margin-top: 8px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); }
.mega-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.mega-label span { padding: 2px 7px; border-radius: 999px; background: var(--surface-2); font-size: 11px; letter-spacing: 0; }
.mega-label .ic { width: 14px; height: 14px; color: var(--accent); }
.mega-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-height: min(420px, 60vh); overflow-y: auto; }
.mega-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; transition: background-color .15s; }
.mega-item:hover, .mega-item.is-active { background: var(--surface-2); }
.mega-thumb { position: relative; width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; border-radius: 12px; color: #fff; font: 800 17px/1 var(--font-heading); background: linear-gradient(140deg, var(--ph-a), var(--ph-b)); }
.mega-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega-text { flex: 1; min-width: 0; }
.mega-text strong { display: block; font-size: 14.5px; font-weight: 650; }
.mega-text small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-count { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.mega-feature { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--border); transition: transform .25s var(--ease), box-shadow .25s; }
.mega-feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mega-feature-media { position: relative; display: block; aspect-ratio: 1200 / 630; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.mega-feature-media img { width: 100%; height: 100%; object-fit: cover; }
.mega-feature .mega-label { margin: 4px 0 0; }
.mega-feature strong { font: 700 16px/1.3 var(--font-heading); letter-spacing: -.015em; }
.mega-feature small { font-size: 12.5px; color: var(--muted); }
.mega-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding: 13px 22px; background: var(--bg-soft); border: 1px solid var(--border); border-top: 1px solid var(--border); border-radius: 0 0 22px 22px; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 600; }
.mega-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.mega-foot a:hover { color: var(--primary); }
.mega-foot .ic { width: 15px; height: 15px; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(40px, 6vw, 84px) 0 clamp(36px, 5vw, 64px); }
.hero-bg { position: absolute; inset: -20% 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 55% at 88% 12%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(45% 60% at 8% 0%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 70%); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; opacity: .55; mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%); -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-grid.is-single { grid-template-columns: minmax(0, 860px); }
.hero-text { min-width: 0; }
.hero-pill { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; color: var(--text-2); }
.hero-pill-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); animation: pulse 2.4s infinite; flex-shrink: 0; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.hero-title { font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; letter-spacing: -.045em; line-height: 1.03; margin: 22px 0 20px; text-wrap: balance; background: linear-gradient(180deg, var(--text) 55%, color-mix(in srgb, var(--text) 62%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 560px; line-height: 1.6; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-side { min-width: 0; display: grid; gap: 14px; }
.spotlight { position: relative; display: block; border-radius: calc(var(--radius) + 8px); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); transition: transform .4s var(--ease), box-shadow .4s; }
.spotlight:hover { transform: translateY(-4px); }
.spotlight-media { position: relative; display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--surface-2); }
.spotlight-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.spotlight:hover .spotlight-media img { transform: scale(1.04); }
.spotlight-badge { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(10, 10, 14, .55); color: #fff; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.spotlight-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.spotlight-title { font: 750 clamp(19px, 1.8vw, 23px)/1.25 var(--font-heading); letter-spacing: -.022em; text-wrap: balance; }
.spotlight-excerpt { color: var(--muted); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* ---------- Sections ---------- */
.section { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 750; }
.page-hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(16px, 3vw, 32px); display: flex; gap: 28px; align-items: center; }
.page-hero-image { width: 96px; height: 96px; border-radius: 24px; object-fit: cover; box-shadow: var(--shadow); }
.page-title { font-size: clamp(34px, 5.5vw, 60px); font-weight: 800; letter-spacing: -.04em; margin: 12px 0 14px; }
.page-lead { font-size: 19px; color: var(--muted); max-width: 640px; margin-bottom: 10px; }
.empty-state { text-align: center; padding: 72px 16px; }
.empty-state h2 { font-size: 24px; margin: 18px 0 8px; }
.empty-state p { color: var(--muted); }
.empty-state a { color: var(--primary); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 20px; background: var(--surface-2); color: var(--muted); }
.empty-icon .ic { width: 28px; height: 28px; }

/* ---------- Kartalar ---------- */
.cards { display: grid; gap: clamp(20px, 3vw, 36px) clamp(20px, 2.4vw, 32px); }
.cards-grid, .cards-magazine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-magazine .card-lead { grid-column: 1 / -1; }
.cards-list { grid-template-columns: 1fr; gap: 0; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-media { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); aspect-ratio: 1200 / 630; isolation: isolate; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s; }
.card-media::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); pointer-events: none; }
.card:hover .card-media img { transform: scale(1.04); }
.card-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(16px, 2.4vw, 26px); color: #fff; background: radial-gradient(120% 100% at 100% 0%, var(--ph-b) 0%, transparent 55%), linear-gradient(140deg, var(--ph-a), color-mix(in srgb, var(--ph-a) 70%, #000)); }
.card-ph::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(135deg, transparent 30%, #000); }
.card-ph-label { position: relative; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.card-ph-title { position: relative; font: 750 clamp(17px, 1.8vw, 22px)/1.15 var(--font-heading); letter-spacing: -.025em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; flex: 1; }
.card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 18px; }
.card-cat { position: relative; z-index: 2; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.card-cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-title { font-size: clamp(19px, 1.6vw, 22px); font-weight: 720; letter-spacing: -.022em; line-height: 1.25; text-wrap: balance; }
.card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-title a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .4s var(--ease); }
.card:hover .card-title a { background-size: 100% 1.5px; }
.card-excerpt { color: var(--muted); font-size: 15.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 4px; font-size: 13.5px; color: var(--muted); }
.card-meta .ic { width: 14px; height: 14px; margin-right: 4px; }
.meta-author { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 500; }
.meta-item { display: inline-flex; align-items: center; }

.card-lead .card-media { aspect-ratio: 16 / 9; }
.card-lead .card-title { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.035em; line-height: 1.1; }
.card-lead .card-excerpt { font-size: 17px; -webkit-line-clamp: 3; }
.card-lead .card-body { padding-top: 22px; gap: 12px; }

.card-list { flex-direction: row-reverse; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--border); align-items: center; }
.card-list:first-child { padding-top: 4px; }
.card-list .card-media { width: clamp(120px, 24%, 220px); flex-shrink: 0; aspect-ratio: 4 / 3; border-radius: calc(var(--radius) - 4px); }
.card-list .card-body { padding-top: 0; }
.card-list .card-ph-title { font-size: 14px; -webkit-line-clamp: 2; }
.card-list .card-ph-label { display: none; }

.cards-mini { display: grid; }
.card-mini { flex-direction: row; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.card-mini:last-child { border-bottom: 0; }
.card-mini .card-body { padding: 0; gap: 6px; }
.card-mini .card-title { font-size: 16px; line-height: 1.35; }
.card-mini .card-meta { font-size: 12.5px; }
.card-index { font: 800 26px/1 var(--font-heading); color: var(--border-strong); letter-spacing: -.04em; min-width: 34px; font-variant-numeric: tabular-nums; }

.featured-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); }
.featured-side { display: grid; gap: 28px; align-content: start; }
.featured-side .card-title { font-size: 19px; }
.featured-side .card-excerpt { display: none; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.split-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 28px; }
.aside-block { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.aside-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.aside-title .ic { color: var(--accent); }
.cta-card { background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface)); }
.cta-card h2 { font-size: 20px; margin: 14px 0 8px; }
.cta-card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.cta-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); }
.cta-icon .ic { width: 24px; height: 24px; }
.load-more-wrap { display: flex; justify-content: center; padding-top: 28px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 48px; }
.page-btn { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); font-weight: 600; font-size: 15px; transition: all .2s; }
.page-btn:hover { border-color: var(--text); }
.page-btn.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.page-gap { align-self: center; color: var(--muted); padding: 0 4px; }

/* ---------- Maqola sahifasi ---------- */
.preview-banner { background: #fff7e0; color: #5c4400; border-bottom: 1px solid #f2dfa4; font-size: 14px; }
.preview-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.preview-banner span { display: inline-flex; align-items: center; gap: 8px; }
[data-theme="dark"] .preview-banner { background: #2a2208; color: #f6dd92; border-color: #4a3c10; }

.article-header { max-width: calc(var(--rd-width) + var(--gutter) * 2); margin: 0 auto; padding: clamp(24px, 4vw, 40px) var(--gutter) 0; transition: max-width .3s var(--ease); }
.article-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: clamp(28px, 5vw, 48px); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; color: var(--muted); padding: 6px 12px 6px 8px; margin-left: -8px; border-radius: 999px; transition: all .2s; }
.back-link:hover { color: var(--text); background: var(--surface-2); }
.back-link .ic { transition: transform .25s var(--ease); }
.back-link:hover .ic { transform: translateX(-3px); }
.reading-tools { display: flex; gap: 4px; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); background: var(--surface); transition: all .2s; }
.tool-btn:hover, .tool-btn[aria-expanded="true"], .tool-btn[aria-pressed="true"] { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.tool-btn .ic { width: 17px; height: 17px; }
.article-cat { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.article-title { font-size: clamp(34px, 5.4vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.article-subtitle { font-family: var(--font-body); font-size: clamp(19px, 2.3vw, 23px); line-height: 1.5; color: var(--muted); margin-top: 18px; text-wrap: pretty; }
.article-byline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-top: 32px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.byline-author { display: inline-flex; align-items: center; gap: 12px; }
.byline-author strong { display: block; font-size: 15.5px; }
.byline-author small { display: block; font-size: 13.5px; color: var(--muted); }
.byline-author:hover strong { color: var(--primary); }
.byline-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.byline-meta > * { display: inline-flex; align-items: center; gap: 6px; }
.byline-meta .ic { width: 15px; height: 15px; }
.article-cover { max-width: 1080px; margin: clamp(28px, 5vw, 48px) auto 0; padding: 0 var(--gutter); }
.article-cover img { width: 100%; border-radius: var(--radius); aspect-ratio: 1200 / 630; object-fit: cover; background: var(--surface-2); box-shadow: var(--shadow); }
.article-cover figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; }

.article-layout { position: relative; display: grid; grid-template-columns: 1fr minmax(0, calc(var(--rd-width) + var(--gutter) * 2)) 1fr; margin-top: clamp(32px, 5vw, 56px); }
.article-main { grid-column: 2; padding: 0 var(--gutter); min-width: 0; }
.article-aside { grid-column: 1; grid-row: 1; justify-self: end; width: 100%; max-width: 270px; padding: 0 28px 0 var(--gutter); }

/* ---------- Mundarija (TOC) ---------- */
.toc-title { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc-title .ic { width: 16px; height: 16px; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list .toc-list { padding-left: 14px; }
.toc-item a { display: block; position: relative; padding: 6px 0 6px 14px; font-size: 14px; line-height: 1.4; color: var(--muted); transition: color .2s; }
.toc-item a::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--border); transition: background-color .25s, transform .25s; }
.toc-item a:hover { color: var(--text); }
.toc-item a.is-active { color: var(--text); font-weight: 600; }
.toc-item a.is-active::before { background: var(--primary); }
.toc-h3 a { font-size: 13.5px; }
.toc-sidebar { position: sticky; top: calc(var(--header-h) + 32px); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; scrollbar-width: thin; }
.toc-sidebar .toc-title { margin-bottom: 12px; }
.toc-inline { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); margin-bottom: 36px; overflow: hidden; }
.toc-inline summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; user-select: none; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline .toc-title { color: var(--text); letter-spacing: .04em; }
.toc-count { font-size: 13px; color: var(--muted); margin-left: auto; }
.toc-chevron { transition: transform .3s var(--ease); color: var(--muted); }
.toc-inline[open] .toc-chevron { transform: rotate(180deg); }
.toc-inline > .toc-list { padding: 0 18px 16px; max-height: 50vh; overflow-y: auto; }
.toc-inline-wrap.only-mobile { display: none; }

/* ---------- Maqola kontenti (prose) ---------- */
.prose { font-family: var(--rd-font); font-size: var(--rd-size); line-height: var(--rd-lh); color: var(--text); overflow-wrap: break-word; transition: font-size .2s, line-height .2s; }
.prose > * + * { margin-top: 1.15em; }
.prose p { text-wrap: pretty; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--font-heading); color: var(--text); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h1 { font-size: 1.75em; margin-top: 2em; font-weight: 800; }
.prose h2 { font-size: 1.5em; margin-top: 1.9em; font-weight: 760; letter-spacing: -.028em; }
.prose h3 { font-size: 1.22em; margin-top: 1.7em; font-weight: 700; }
.prose h4 { font-size: 1.05em; margin-top: 1.5em; font-weight: 700; }
.prose h1 + *, .prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 700; }
.prose mark { background: var(--mark); color: inherit; padding: 0 .15em; border-radius: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--text); font-style: italic; font-size: 1.08em; color: var(--text-2); }
.prose hr { border: 0; height: auto; margin: 2.6em 0; text-align: center; }
.prose hr::before { content: '• • •'; letter-spacing: .9em; color: var(--muted); font-size: 18px; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--border); padding: .12em .38em; border-radius: 6px; }
.prose pre { position: relative; font-family: var(--font-mono); font-size: 14.5px; line-height: 1.65; background: var(--code-bg); color: var(--code-text); padding: 20px 22px; border-radius: 14px; overflow-x: auto; tab-size: 4; margin-left: calc(var(--gutter) * -.5); margin-right: calc(var(--gutter) * -.5); }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 52px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .4); font-family: var(--font-body); }
.code-copy { position: absolute; top: 8px; right: 8px; height: 28px; padding: 0 8px; border-radius: 8px; font: 500 12px var(--font-body); color: rgba(255, 255, 255, .65); background: rgba(255, 255, 255, .08); display: inline-flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .2s, background-color .2s; }
.prose pre:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.code-copy .ic { width: 14px; height: 14px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img, .prose figure video { width: 100%; border-radius: 12px; background: var(--surface-2); }
.prose figure img { cursor: zoom-in; }
.prose figcaption { font-family: var(--font-body); font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; margin-top: 10px; }
.prose .size-small { max-width: 60%; margin-left: auto; margin-right: auto; }
.prose .size-wide { margin-left: max(-140px, calc((var(--rd-width) - 980px) / 2)); margin-right: max(-140px, calc((var(--rd-width) - 980px) / 2)); }
.prose .size-full { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.prose .size-full img, .prose .size-full video { border-radius: 0; }
.prose .x-embed-frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.prose .x-embed-video { aspect-ratio: 16 / 9; }
.prose .x-embed-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .x-embed-frame:not(.x-embed-video) iframe { display: block; width: 100%; border: 0; min-height: 360px; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: .82em; line-height: 1.5; }
.prose caption { caption-side: bottom; padding: 10px; font-size: 13px; color: var(--muted); }
.prose th, .prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 650; background: var(--bg-soft); }
.prose tr:last-child td { border-bottom: 0; }
.prose tr + tr td, .prose td + td, .prose th + th { border-left: 0; }
.prose .fn-ref a { font-family: var(--font-body); font-size: .72em; font-weight: 700; text-decoration: none; padding: 0 .2em; }
.prose .footnotes { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--border); font-family: var(--font-body); font-size: 15px; color: var(--text-2); }
.prose .footnotes ol { padding-left: 1.2em; }
.prose .fn-back { text-decoration: none; margin-left: 4px; }
.prose :target { animation: targetFlash 1.6s var(--ease); border-radius: 4px; }
@keyframes targetFlash { 0%, 40% { background: var(--mark); } }

.article-end { display: flex; justify-content: center; gap: 10px; margin: 56px 0 40px; }
.article-end span { width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article-share { margin-top: 36px; padding: 24px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--border); }
.article-share-title { font-weight: 650; margin-bottom: 16px; font-size: 16px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 550; transition: all .2s var(--ease); }
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: transparent; }
.share-btn .ic { width: 17px; height: 17px; }
.share-telegram .ic { color: #229ed9; }
.share-facebook .ic { color: #1877f2; }
.share-whatsapp .ic { color: #25d366; }
.share-linkedin .ic { color: #0a66c2; }
.share-more { width: 40px; padding: 0; justify-content: center; }
.article-after { padding-top: 24px; }

.social-row { display: flex; flex-wrap: wrap; gap: 6px; }
.social-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--text-2); transition: all .2s var(--ease); }
.social-btn:hover { color: var(--text); border-color: var(--text); transform: translateY(-2px); }
.social-btn .ic { width: 17px; height: 17px; }

/* ---------- Reader panel va Reader Mode ---------- */
.reader-panel { position: fixed; z-index: 140; top: calc(var(--header-h) + 12px); right: max(var(--gutter), calc((100vw - var(--site-w)) / 2)); width: min(360px, calc(100vw - 32px)); padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: popIn .25s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.rp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.rp-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.rp-label .ic { width: 16px; height: 16px; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); }
.seg button { height: 30px; padding: 0 10px; border-radius: 9px; font-size: 13px; font-weight: 550; color: var(--muted); transition: all .2s; }
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg output { min-width: 34px; text-align: center; align-self: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.font-serif-sample { font-family: var(--reader-serif); }
.font-sans-sample { font-family: var(--reader-sans); }
.seg-swatches button { position: relative; padding-left: 26px; }
.seg-swatches button::before { content: ''; position: absolute; left: 8px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.sw-light::before { background: #fff; }
.sw-sepia::before { background: #f4ecd8; }
.sw-dark::before { background: #16161a; }
.rp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
[data-reader-only] { display: none; }
.reader-on [data-reader-only] { display: flex; }

.reader-bar { position: fixed; z-index: 110; top: 0; left: 0; right: 0; display: none; align-items: center; justify-content: space-between; gap: 16px; height: 56px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); transform: translateY(-100%); transition: transform .35s var(--ease); }
.reader-bar-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); opacity: 0; transition: opacity .3s; }
.reader-bar.show-title .reader-bar-title { opacity: 1; }
.reader-bar-actions { display: flex; gap: 6px; flex-shrink: 0; }
.tool-btn-exit { color: var(--text); }

html.reader-on .site-header,
html.reader-on .site-footer,
html.reader-on .article-aside,
html.reader-on .toc-inline-wrap,
html.reader-on .reading-tools,
html.reader-on .back-link,
html.reader-on .article-share,
html.reader-on .article-tags,
html.reader-on .article-after,
html.reader-on .preview-banner,
html.reader-on .article-end { display: none !important; }
html.reader-on .reader-bar { display: flex; transform: none; }
html.reader-on .article-topbar { margin-bottom: 8px; min-height: 56px; }
html.reader-on .article-header { padding-top: 64px; }
html.reader-on .article-layout { grid-template-columns: 1fr minmax(0, calc(var(--rd-width) + var(--gutter) * 2)) 1fr; }
html.reader-on .article-cover { max-width: calc(var(--rd-width) + var(--gutter) * 2); }
html.reader-on .reader-panel { top: 68px; }
html.reader-on body { padding-bottom: 80px; }
html.reader-on .prose .size-wide { margin-left: 0; margin-right: 0; }
html.reader-on[data-reader-bg="sepia"] {
  --bg: #f4ecd8; --bg-soft: #ece2c8; --surface: #f8f1df; --surface-2: #e9dec2; --text: #3b2f1e; --text-2: #4d3f2a;
  --muted: #7a6a50; --faint: #a39272; --border: #e0d3b4; --border-strong: #d2c29d; --code-bg: #2b2418; color-scheme: light;
}
html.reader-on[data-reader-bg="dark"] {
  --bg: #121214; --bg-soft: #18181b; --surface: #1a1a1e; --surface-2: #232328; --text: #e7e7ea; --text-2: #c7c7cd;
  --muted: #8d8d97; --faint: #5f5f69; --border: #26262c; --border-strong: #33333a; color-scheme: dark;
}
html.reader-on[data-reader-bg="light"] {
  --bg: #ffffff; --bg-soft: #f7f7f8; --surface: #ffffff; --surface-2: #f3f3f5; --text: #111114; --text-2: #3b3b44;
  --muted: #6e6e78; --border: #ebebef; --border-strong: #d9d9e0; color-scheme: light;
}

/* ---------- Muallif sahifasi ---------- */
.social-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; font-weight: 550; transition: all .2s var(--ease); }
.social-pill:hover { border-color: var(--text); transform: translateY(-2px); }
.social-pill .ic { width: 16px; height: 16px; }
.tabs .tab-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin-bottom: 8px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14.5px; font-weight: 550; color: var(--muted); white-space: nowrap; transition: all .2s; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.is-active { background: var(--text); color: var(--bg); }
.tab.is-active .chip-count { color: inherit; opacity: .6; }
.tab-panel .link-arrow { margin-top: 18px; }

/* ---------- Qidiruv ---------- */
.search-modal, .share-modal { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search-backdrop, .share-backdrop { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.search-panel { position: relative; width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .25s var(--ease); }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.search-field > .ic { width: 20px; height: 20px; color: var(--muted); }
.search-field input { flex: 1; height: 62px; border: 0; outline: 0; background: none; font-size: 18px; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-results { overflow-y: auto; padding: 10px; }
.search-hint { padding: 12px 10px; }
.search-hint .eyebrow { margin-bottom: 12px; }
.search-result { display: flex; gap: 14px; padding: 12px; border-radius: 14px; align-items: center; transition: background-color .15s; }
.search-result.is-active, .search-result:hover { background: var(--surface-2); }
.search-result img, .search-result .sr-ph { width: 76px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.sr-ph { display: grid; place-items: center; color: var(--muted); }
.search-result strong { display: block; font-size: 15.5px; line-height: 1.35; }
.search-result p { font-size: 13.5px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-result small { display: block; font-size: 12px; color: var(--faint); margin-top: 4px; }
.search-footer { display: block; text-align: center; padding: 12px; font-size: 14px; font-weight: 600; color: var(--primary); border-top: 1px solid var(--border); }
.search-status { padding: 28px; text-align: center; color: var(--muted); }
.search-page-form { display: flex; align-items: center; gap: 10px; max-width: 640px; margin-top: 18px; padding: 6px 6px 6px 18px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); }
.search-page-form input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; height: 44px; min-width: 0; }
.search-page-form > .ic { color: var(--muted); }
.search-list { display: grid; }
.search-item { padding: 26px 0; border-bottom: 1px solid var(--border); }
.search-item-top { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.search-item h2 { font-size: 22px; margin-bottom: 8px; }
.search-item h2 a:hover { color: var(--primary); }
.search-item p { color: var(--text-2); margin-bottom: 12px; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Ulashish oynasi ---------- */
.share-modal { align-items: center; padding-top: 16px; }
.share-panel { position: relative; width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); animation: popIn .25s var(--ease); }
.share-head { display: flex; align-items: center; justify-content: space-between; }
.share-head h2 { font-size: 20px; }
.share-preview { color: var(--muted); font-size: 14.5px; margin: 6px 0 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.share-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px; border-radius: 16px; font-size: 12.5px; font-weight: 550; color: var(--text-2); transition: background-color .2s, transform .2s var(--ease); }
.share-tile:hover { background: var(--surface-2); transform: translateY(-2px); }
.share-tile-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.share-tile-icon .ic { width: 22px; height: 22px; }
.share-copy { display: flex; gap: 8px; margin-top: 18px; padding: 6px; border: 1px solid var(--border); border-radius: 999px; }
.share-copy input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0 12px; font-size: 14px; color: var(--muted); }
.share-copy .btn { height: 38px; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; z-index: 300; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14.5px; font-weight: 550; box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); white-space: nowrap; }
.toast .ic { width: 18px; height: 18px; color: #22c55e; }
.toast.is-leaving { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .88); cursor: zoom-out; animation: fadeIn .25s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: popIn .3s var(--ease); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(48px, 8vw, 96px); border-top: 1px solid var(--border); background: var(--bg-soft); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding: 56px 0 40px; }
.footer-about p { color: var(--muted); margin: 16px 0 20px; max-width: 420px; }
.footer-col h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-2); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.site-footer.is-minimal .footer-bottom { border-top: 0; }

/* ---------- Xato sahifasi ---------- */
.error-page { text-align: center; padding-top: 12vh; padding-bottom: 10vh; }
.error-code { font: 800 clamp(96px, 18vw, 180px)/1 var(--font-heading); letter-spacing: -.06em; background: linear-gradient(135deg, var(--text) 30%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: clamp(26px, 4vw, 36px); margin: 12px 0; }
.error-page .page-lead { margin: 0 auto; }
.error-page .hero-actions { justify-content: center; }
.error-debug { text-align: left; max-width: 760px; margin: 24px auto; padding: 16px; background: var(--surface-2); border-radius: 12px; white-space: pre-wrap; font-size: 13px; }

/* ---------- Animatsiya ---------- */
.reveal { animation: reveal .8s var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Responsive ---------- */
@media (min-width: 1200px) {
  .has-toc-sidebar .toc-inline-wrap.only-mobile { display: none; }
}
@media (max-width: 1199px) {
  .article-aside { display: none; }
  .toc-inline-wrap.only-mobile { display: block; }
  .article-layout { grid-template-columns: 0 minmax(0, 1fr) 0; max-width: calc(var(--rd-width) + var(--gutter) * 2); margin-left: auto; margin-right: auto; }
  .prose .size-wide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 1024px) {
  .split-layout { grid-template-columns: 1fr; }
  .split-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .search-trigger-label, .search-trigger kbd { display: none; }
  .search-trigger { width: 40px; padding: 0; border: 0; justify-content: center; }
}
@media (max-width: 860px) {
  :root { --header-h: 58px; }
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-cta span { display: none; }
  .header-cta { width: 36px; padding: 0; }
  .cards-grid, .cards-magazine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-side { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .tool-btn .tool-label { display: none; }
  .tool-btn { width: 38px; padding: 0; justify-content: center; }
  .reader-bar .tool-btn-exit .tool-label { display: inline; }
  .reader-bar .tool-btn-exit { width: auto; padding: 0 12px; }
  .site-header.is-centered .header-inner { display: flex; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .cards-grid, .cards-magazine, .featured-side { grid-template-columns: 1fr; }
  .card-list { gap: 16px; padding: 20px 0; align-items: flex-start; }
  .card-list .card-media { width: 104px; aspect-ratio: 1; }
  .card-list .card-excerpt { display: none; }
  .card-list .card-title { font-size: 17px; }
  .card-list .meta-author { display: none; }
  .script-switch a { padding: 5px 8px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .page-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .article-byline { flex-direction: column; align-items: flex-start; }
  .article-cover { padding: 0; }
  .article-cover img { border-radius: 0; }
  .prose pre { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; }
  .prose .size-small { max-width: 100%; }
  .share-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .share-modal { align-items: flex-end; padding: 0; }
  .share-panel { border-radius: 24px 24px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); animation: sheetUp .35s var(--ease); }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  .search-modal { padding: 0; align-items: stretch; }
  .search-panel { max-height: none; height: 100%; border-radius: 0; border: 0; }
  .reader-panel { top: auto !important; bottom: 0; right: 0; left: 0; width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: sheetUp .35s var(--ease); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .toast-stack { bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media print {
  .site-header, .site-footer, .reading-tools, .article-share, .article-after, .reading-progress, .article-aside, .toc-inline-wrap, .reader-bar, .reader-panel { display: none !important; }
  .prose { font-size: 12pt; }
}

/* ---------- Header / hero: moslashuvchanlik ---------- */
@media (max-width: 1100px) {
  .mega-inner { grid-template-columns: minmax(0, 1fr); }
  .mega-feature { display: none; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-side { max-width: 640px; }
}
@media (max-width: 600px) {
  .hero { padding-top: 28px; }
  .spotlight-body { padding: 14px 16px 16px; }
}
.mobile-script { display: none; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--muted); }
.mobile-script .script-switch { margin: 0; }
@media (max-width: 480px) {
  .header-actions .script-switch { display: none; }
  .mobile-script { display: flex; }
  .brand { font-size: 18px; }
  .header-inner { gap: 12px; }
}

/* ---------- Ulashish kartasi ---------- */
.share-card { position: relative; overflow: hidden; margin-top: 40px; padding: clamp(20px, 3vw, 28px); border-radius: calc(var(--radius) + 8px); border: 1px solid var(--border); background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 55%), var(--surface); box-shadow: var(--shadow); }
.share-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.share-card-icon { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.share-card-icon .ic { width: 22px; height: 22px; }
.share-card-title { font-size: 19px; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.share-card-sub { color: var(--muted); font-size: 14.5px; margin-top: 3px; }
.share-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; }
.share-card .share-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg); font-size: 13px; font-weight: 600; color: var(--text-2); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, background-color .25s; }
.share-card .share-tile:hover { transform: translateY(-3px); border-color: transparent; box-shadow: var(--shadow); color: var(--text); }
.share-tile-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--text); transition: transform .3s var(--ease); }
.share-tile:hover .share-tile-icon { transform: scale(1.08); }
.share-tile-icon .ic { width: 20px; height: 20px; }
.share-telegram .share-tile-icon { background: #229ed9; }
.share-facebook .share-tile-icon { background: #1877f2; }
.share-x .share-tile-icon { background: #0f0f10; }
.share-whatsapp .share-tile-icon { background: #25d366; }
.share-linkedin .share-tile-icon { background: #0a66c2; }
.share-email .share-tile-icon { background: #6b7280; }
.share-other .share-tile-icon { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
[data-theme="dark"] .share-x .share-tile-icon { background: #fff; color: #000; }
.share-card-link { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); }
.share-card-link > .ic { width: 17px; height: 17px; color: var(--muted); }
.share-card-url { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; }
.share-card-link .btn { flex-shrink: 0; }
html.reader-on .share-card { display: none !important; }
@media (max-width: 600px) {
  .share-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .share-card .share-tile { padding: 12px 2px 10px; font-size: 11.5px; }
  .share-tile-icon { width: 38px; height: 38px; }
  .share-card-link .btn span { display: none; }
}
.share-card .share-tile-icon .ic { color: #fff; }
.share-card .share-other .share-tile-icon .ic { color: var(--text); }
[data-theme="dark"] .share-card .share-x .share-tile-icon .ic { color: #000; }
.byline-author .avatar { flex-shrink: 0; }

/* ---------- Footer (yangilangan) ---------- */
.site-footer { background: var(--bg-soft); }
.footer-cta { display: flex; align-items: center; gap: 18px; margin-top: 48px; padding: 22px 24px; border-radius: calc(var(--radius) + 6px); border: 1px solid var(--border); background: radial-gradient(100% 160% at 100% 0%, color-mix(in srgb, #229ed9 14%, transparent), transparent 60%), var(--surface); box-shadow: var(--shadow-sm); }
.footer-cta-icon { width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; border-radius: 16px; background: #229ed9; color: #fff; }
.footer-cta-icon .ic { width: 26px; height: 26px; }
.footer-cta-text { flex: 1; min-width: 0; }
.footer-cta-text strong { display: block; font: 750 18px/1.3 var(--font-heading); letter-spacing: -.015em; }
.footer-cta-text span { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.footer-cta .btn .ic { width: 16px; height: 16px; }
.footer-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 48px 0 40px; }
.footer-about .brand-logo { height: 30px; }
.footer-col a:hover { color: var(--primary); }
.footer-top { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .2s; }
.footer-top:hover { border-color: var(--text); color: var(--text); }
.footer-top .ic { transform: rotate(-45deg); width: 15px; height: 15px; }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .footer-cta { flex-direction: column; align-items: flex-start; }
  .footer-cta .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Kontent himoyasi: chop etish bloklangan ---------- */
@media print {
  html[data-protect] body > * { display: none !important; }
  html[data-protect] body::before { content: 'Bu sahifani chop etish o‘chirilgan. Maqolani saytda o‘qing.'; display: block; padding: 40px; font: 600 16pt/1.5 system-ui, sans-serif; text-align: center; }
}

/* ---------- Bo'limlar explorer'i (papkalar) ---------- */
.mega-inner.mega-explorer { grid-template-columns: 300px minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.mx-folders { display: flex; flex-direction: column; min-height: 0; max-height: min(500px, 66vh); padding: 14px 12px 10px; background: var(--bg-soft); border-right: 1px solid var(--border); }
.mx-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; margin-bottom: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.mx-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.mx-search .ic { width: 16px; height: 16px; }
.mx-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; }
.mx-folders .mega-label { padding: 0 6px; margin-bottom: 6px; }
.mx-list { list-style: none; margin: 0; padding: 0 2px 4px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.mx-folder { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--text-2); transition: background-color .15s, color .15s; }
.mx-folder:hover, .mx-folder:focus-visible { color: var(--text); }
.mx-folder.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.mx-folder.is-current .mx-name::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.mx-icon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--ph-b); flex-shrink: 0; }
.mx-icon .ic { width: 20px; height: 20px; fill: color-mix(in srgb, var(--ph-b) 22%, transparent); }
.mx-icon .mx-open, .mx-folder.is-active .mx-closed { display: none; }
.mx-folder.is-active .mx-open { display: block; }
.mx-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-count { min-width: 24px; height: 20px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--surface-2); font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.mx-folder.is-active .mx-count { background: color-mix(in srgb, var(--ph-b) 16%, transparent); color: var(--ph-a); }
[data-theme="dark"] .mx-folder.is-active .mx-count { color: var(--ph-b); }
.mx-empty { padding: 14px 8px; font-size: 13.5px; color: var(--muted); }
.mx-preview { min-width: 0; padding: 20px 22px 18px; }
.mx-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.mx-head-icon { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(140deg, var(--ph-a, var(--primary)), var(--ph-b, var(--accent))); }
.mx-head-icon .ic { width: 22px; height: 22px; }
.mx-head-text { flex: 1; min-width: 0; }
.mx-head-text strong { display: block; font: 750 18px/1.25 var(--font-heading); letter-spacing: -.015em; }
.mx-head-text small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-go { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .2s; }
.mx-go:hover { border-color: var(--text); color: var(--text); }
.mx-go .ic { width: 15px; height: 15px; }
.mx-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mx-post { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; transition: background-color .15s; min-width: 0; }
.mx-post:hover { background: var(--surface-2); }
.mx-post-media { width: 104px; aspect-ratio: 1200 / 630; flex-shrink: 0; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.mx-post-media img { width: 100%; height: 100%; object-fit: cover; }
.mx-post-text { min-width: 0; }
.mx-post-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 650; line-height: 1.35; }
.mx-post-text small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.mx-note { grid-column: 1 / -1; padding: 24px 0; text-align: center; color: var(--muted); font-size: 14px; }
.mx-skeleton { height: 70px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--bg-soft), var(--surface-2)); background-size: 200% 100%; animation: mxShimmer 1.2s infinite linear; }
@keyframes mxShimmer { to { background-position: -200% 0; } }
@media (max-width: 1100px) { .mx-posts { grid-template-columns: minmax(0, 1fr); } }

/* Footer: ijtimoiy tarmoqlar o'ng ustunda */
.footer-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); }
.footer-social .social-row { display: grid; grid-template-columns: repeat(4, 38px); gap: 8px; }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } .footer-social .social-row { display: flex; flex-wrap: wrap; } }

/* ---------- Ro'yxat sahifasi: chap papka paneli ---------- */
.listing-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 3.5vw, 48px); align-items: start; }
.folder-nav { position: sticky; top: calc(var(--header-h) + 20px); }
.folder-nav-inner { display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 48px); padding: 14px 10px 10px; border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); background: var(--bg-soft); }
.folder-nav-title { display: flex; align-items: center; gap: 8px; padding: 0 8px 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.folder-nav-title .ic { width: 16px; height: 16px; }
.folder-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; scrollbar-width: thin; }
.folder-list .mx-folder.is-active { font-weight: 600; }
.folder-all .mx-icon { color: var(--text-2); }
.folder-all .mx-icon .ic { fill: none; }
.listing-main { min-width: 0; }
.listing-layout .cards-grid, .listing-layout .cards-magazine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1280px) { .listing-layout .cards-grid, .listing-layout .cards-magazine { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  /* Planshet va telefonda panel gorizontal "papka chiplari"ga aylanadi */
  .listing-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .folder-nav { position: static; }
  .folder-nav-inner { max-height: none; padding: 0; border: 0; background: none; }
  .folder-nav-title, .folder-nav .mx-search, .folder-nav .mx-empty { display: none; }
  .folder-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .folder-list::-webkit-scrollbar { display: none; }
  .folder-list li { flex-shrink: 0; }
  .folder-list .mx-folder { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 12px; }
  .folder-list .mx-folder.is-active { border-color: var(--text); }
}
@media (max-width: 600px) { .listing-layout .cards-grid, .listing-layout .cards-magazine { grid-template-columns: 1fr; } }

/* ---------- Telefon uchun moslashuv ---------- */
/* Grid ustunlari kontent kengligidan oshib ketmasligi uchun (spotlight rasmi kesilib qolardi) */
.hero-side { grid-template-columns: minmax(0, 1fr); }
.hero-side > * { min-width: 0; }
.page-hero > div { flex: 1 1 auto; min-width: 0; }
img, video, iframe, svg { max-width: 100%; }
.byline-author:not([href]) { cursor: default; }
@media (max-width: 860px) {
  .page-hero > div { width: 100%; }
  .search-page-form { padding-left: 14px; }
  .search-page-form .btn { padding: 0 16px; }
}
@media (max-width: 480px) {
  .spotlight-badge { right: 10px; top: 10px; height: 26px; font-size: 11.5px; padding: 0 10px; }
}

/* ---------- Biz haqimizda (/about) ---------- */
.about-hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(8px, 2vw, 16px); }
.about-hero-inner { max-width: 760px; }
.about-title { font: 800 clamp(34px, 6vw, 60px)/1.05 var(--font-heading); letter-spacing: -.035em; margin: 10px 0 0; text-wrap: balance; }
.about-lead { margin-top: 18px; font-size: clamp(17px, 2vw, 20px); line-height: 1.6; color: var(--text-2); }
.about-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: clamp(28px, 4vw, 44px) 0 0; }
.about-stats > div { padding: 18px 20px; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--surface); }
.about-stats dt { font-size: 13.5px; color: var(--muted); }
.about-stats dd { margin: 4px 0 0; font: 800 clamp(24px, 3vw, 32px)/1.1 var(--font-heading); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.about-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.about-body.has-image { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.about-prose { max-width: 720px; }
.about-prose > h2:first-child { margin-top: 0; }
.about-figure { margin: 0; border-radius: calc(var(--radius) + 8px); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.about-figure img { display: block; width: 100%; height: auto; }
.about-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.about-value { padding: 22px; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--surface); }
.about-value-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.about-value-icon .ic { width: 20px; height: 20px; }
.about-value h3 { margin: 14px 0 6px; font-size: 17px; font-weight: 700; }
.about-value p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.about-topics .chip .ic { width: 16px; height: 16px; color: var(--muted); }
.about-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 4vw, 40px); border-radius: calc(var(--radius) + 10px); border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, var(--surface)), var(--surface) 70%); }
.about-cta-text { max-width: 560px; }
.about-cta-text h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 780; letter-spacing: -.025em; }
.about-cta-text p { margin-top: 8px; color: var(--text-2); line-height: 1.6; }
.about-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
@media (max-width: 960px) {
  .about-body.has-image { grid-template-columns: minmax(0, 1fr); }
  .about-body.has-image .about-figure { order: -1; }
  .about-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .about-stats { gap: 8px; }
  .about-stats > div { padding: 14px; }
  .about-stats dt { font-size: 12.5px; }
  .about-cta-actions { width: 100%; flex-direction: column; }
  .about-cta-actions .btn { width: 100%; justify-content: center; }
}
@media (max-width: 380px) {
  .header-inner { gap: 8px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; font-size: 15px; }
  .brand-logo { height: 26px; }
  .header-actions { gap: 0; }
  .header-actions .icon-btn { width: 36px; height: 36px; }
}

/* ---------- PDF yuklab olish kartasi ---------- */
.pdf-card { margin: 28px 0 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); background: var(--surface); }
.pdf-card-main { display: flex; align-items: center; gap: 14px; }
.pdf-card-icon { position: relative; flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 52px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.pdf-card-icon .ic { width: 24px; height: 24px; margin-top: -8px; }
.pdf-card-icon b { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); padding: 1px 5px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; }
.pdf-card-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.35; }
.pdf-card-btn { flex-shrink: 0; }
@media (max-width: 600px) {
  .pdf-card-main { flex-wrap: wrap; }
  .pdf-card-btn { width: 100%; justify-content: center; }
}

/* ---------- Kirish (mualliflar uchun) ---------- */
.header-login { margin-left: 4px; }
.header-login .ic { width: 16px; height: 16px; }
.auth-out, .auth-in { display: inline-flex; align-items: center; gap: 6px; }
.auth-in, html.is-signed .auth-out { display: none; }
html.is-signed .auth-in { display: inline-flex; }
.auth-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent); }
.mobile-menu a.mobile-login { margin-top: 12px; justify-content: center; border: 1px solid var(--border); border-radius: 999px; padding: 12px 16px; font-size: 16px; font-weight: 600; }
.mobile-menu a.mobile-login .ic { color: var(--primary); }
.mobile-menu a.mobile-login .auth-out, .mobile-menu a.mobile-login .auth-in { gap: 12px; }
@media (max-width: 860px) { .header-login { display: none; } }

/* Bosh sahifa: sarlavha harflarining yuqori chizig'i o'ng ustundagi karta bilan bir chiziqda */
.hero-grid { align-items: start; }
@media (min-width: 961px) {
  .hero-grid:not(.is-single) .hero-title { margin-top: -.1em; }
}
