:root {
  --bg-silver: #e8eaee;
  --navy-900: #0f172a;
  --navy-800: #162033;
  --navy-700: #1e293b;
  --slate-italic: #3f516d;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;

  --cobalt-600: #0052ff;
  --cobalt-500: #2563eb;
  --cobalt-400: #38bdf8;
  --cobalt-glow: rgba(0, 82, 255, 0.28);
  --ok: #10b981;

  --glass-bg: rgba(255, 255, 255, 0.56);
  --glass-bg-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.92);
  --glass-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--navy-900);
  background: var(--bg-silver);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==================== CANVAS ==================== */
.page-canvas {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #dce0e7 0%, #e8ebf0 28%, #eff1f5 56%, #e2e6ee 80%, #eceef2 100%);
  /* clip — sticky nav ishlashi uchun (hidden scroll-konteyner yaratadi) */
  overflow: clip;
  isolation: isolate;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: -1;
}
.orb-1 { width: 520px; height: 520px; top: 20px; right: 4%; background: radial-gradient(circle, rgba(0, 82, 255, 0.22) 0%, rgba(56, 189, 248, 0.14) 60%, transparent 100%); }
.orb-2 { width: 580px; height: 580px; top: 34%; left: -10%; background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(255, 255, 255, 0.6) 65%, transparent 100%); }
.orb-3 { width: 620px; height: 620px; bottom: 8%; right: -8%; background: radial-gradient(circle, rgba(0, 82, 255, 0.18) 0%, rgba(56, 189, 248, 0.12) 65%, transparent 100%); }

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-xl);
}

/* ==================== NAVBAR ==================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 12px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-900);
}
.brand-link img { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.brand-text span { color: var(--cobalt-600); font-weight: 700; font-size: 15px; }

.pill-btn-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #fff;
  color: var(--navy-900);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font: 800 11px var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease;
}
.pill-btn-white:hover { transform: translateY(-2px); }

/* ==================== HERO ==================== */
.hero {
  text-align: center;
  padding: 56px 0 44px;
}

.domain-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.04); } }

.hero-title {
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 900;
  -webkit-text-stroke: 0.6px currentColor;
  line-height: 1.04;
  letter-spacing: -0.035em;
  min-height: 1.04em;
}
.italic-accent { font-style: italic; font-weight: 900; color: var(--slate-italic); }
.caret {
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 0.06em;
  background: var(--cobalt-600);
  vertical-align: -0.04em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-subtitle {
  font-size: 16px;
  color: var(--slate-600);
  font-weight: 500;
  max-width: 560px;
  margin: 18px auto 0;
  line-height: 1.65;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 170px));
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}
.stat {
  padding: 16px 22px;
  border-radius: var(--radius-lg);
}
.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
.stat span { font-size: 12px; font-weight: 600; color: var(--slate-500); }

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* Umumiy progress chizig'i */
.progress {
  max-width: 534px;
  margin: 22px auto 0;
  text-align: left;
}
.progress-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-500);
  margin-bottom: 8px;
}
.progress-top b { color: var(--cobalt-600); }
.progress-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #1e3a8a 0%, #0052ff 60%, #38bdf8 100%);
  transition: width 0.5s ease;
}

/* ==================== SECTION HEADINGS ==================== */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-600);
  margin-bottom: 10px;
}
.section-heading {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  -webkit-text-stroke: 0.4px currentColor;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.section-lead {
  max-width: 560px;
  margin: 12px auto 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.65;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--navy-800);
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1px 7px;
  border-radius: 7px;
  overflow-wrap: anywhere;
}

/* ==================== KIMLAR UCHUN ==================== */
.intro {
  padding: 40px 36px;
  text-align: center;
  margin-bottom: 28px;
}
.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
  text-align: left;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.95);
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.6;
}
.step b { color: var(--navy-900); font-weight: 700; }
.step-num {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--cobalt-600);
  padding-top: 2px;
}

/* ==================== STICKY NAV ==================== */
.nav-wrap {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin: 0 0 28px;
}
.pill-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.pill-nav::-webkit-scrollbar { display: none; }
.pill-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800);
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, color 0.2s ease;
}
.pill-nav a::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--g, var(--cobalt-600));
}
.pill-nav a:hover { background: rgba(15, 23, 42, 0.06); }
.pill-nav a.active { background: var(--navy-900); color: #fff; }
.pill-nav a.done::before { background: var(--ok); }
.nav-progress {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-500);
  padding: 0 14px 0 10px;
}
.nav-progress b { color: var(--cobalt-600); }

/* ==================== MODUL ==================== */
.module {
  scroll-margin-top: 92px;
  margin-bottom: 12px;
}
.module[data-g="a"] { --g: #0052ff; }
.module[data-g="b"] { --g: #38bdf8; }
.module[data-g="c"] { --g: #1e3a8a; }
.module[data-g="d"] { --g: #10b981; }
.module[data-g="e"] { --g: #4f46e5; }
.module[data-g="f"] { --g: #0891b2; }

.group-label {
  text-align: center;
  margin: 52px 0 24px;
}
.module:first-of-type .group-label { margin-top: 8px; }

/* ==================== DARS KARTASI ==================== */
.lesson {
  margin-bottom: 14px;
  scroll-margin-top: 92px;
  border-radius: var(--radius-lg);
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
}
.lesson:hover { box-shadow: 0 26px 60px rgba(15, 23, 42, 0.09); }

.lesson summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  cursor: pointer;
}
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary:focus-visible { outline: 2px solid var(--cobalt-600); outline-offset: -4px; border-radius: var(--radius-lg); }

.num-tile {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background:
    radial-gradient(circle at 80% 18%, rgba(56, 189, 248, 0.5) 0%, transparent 55%),
    linear-gradient(145deg, #0f172a 0%, var(--g) 100%);
  box-shadow: 0 12px 26px rgba(0, 82, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.lesson.is-done .num-tile { background: linear-gradient(145deg, #065f46 0%, var(--ok) 100%); box-shadow: 0 12px 26px rgba(16, 185, 129, 0.25); }

.lesson-head { flex: 1 1 auto; min-width: 0; }
.lesson-head h3 {
  font-size: clamp(18px, 2.4vw, 21px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.lesson-head p {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.5;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--navy-800);
}
.tag.mono { font-family: var(--font-mono); letter-spacing: 0.02em; text-transform: none; font-weight: 700; color: var(--slate-600); }
.tag.ok { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); color: #047857; }
.lesson:not(.is-done) .tag.ok { display: none; }

.chev {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #fff;
  color: var(--navy-900);
  transition: transform 0.3s ease, background 0.2s ease;
}
.chev svg { width: 16px; height: 16px; }
.lesson[open] .chev { transform: rotate(180deg); background: var(--navy-900); color: #fff; }

.lesson-body {
  padding: 4px 24px 26px 94px;
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.7;
}
.lesson-body > * + * { margin-top: 14px; }
.lesson-body b { color: var(--navy-900); font-weight: 700; }
.lesson-body ul, .lesson-body ol { padding-left: 20px; }
.lesson-body li + li { margin-top: 6px; }
.lesson-body li::marker { color: var(--cobalt-600); font-weight: 700; }
.lesson-body h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-600);
  margin-top: 22px;
}

.tip {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(0, 82, 255, 0.06);
  border: 1px solid rgba(0, 82, 255, 0.14);
  font-size: 14px;
}
.tip.warn { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compare div {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.95);
  font-size: 13.5px;
}
.compare span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.compare .bad span { color: #b45309; }
.compare .good span { color: #047857; }

/* Terminal oyna — >_ brend belgisidan */
.term {
  text-align: left;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 0%, rgba(56, 189, 248, 0.16) 0%, transparent 40%),
    linear-gradient(160deg, #090e1a 0%, #0f172a 70%, #0b1a3d 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #94a3b8;
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(148, 163, 184, 0.3); }
.term-dots i:first-child { background: var(--cobalt-400); }
.term-title b { color: #fff; font-weight: 700; }
.term-title em { font-style: normal; color: var(--cobalt-400); }
.term-copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font: 700 11px var(--font-sans);
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s ease;
}
.term-copy svg { width: 13px; height: 13px; }
.term-copy:hover { background: var(--cobalt-600); border-color: var(--cobalt-600); }
.term-copy.ok { background: var(--ok); border-color: var(--ok); color: #fff; }

pre {
  margin: 0;
  padding: 18px 22px 20px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font: 13.5px/1.7 var(--font-mono);
  color: #e2e8f0;
  max-height: 380px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}
pre::selection, pre *::selection { background: rgba(0, 82, 255, 0.55); color: #fff; }

.lesson-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px !important;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font: 800 12px var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-dark {
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
.btn-dark:hover { background: var(--cobalt-600); transform: translateY(-2px); box-shadow: 0 14px 30px var(--cobalt-glow); }
.btn-light {
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy-900);
  border: 1px solid #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}
.btn-light:hover { transform: translateY(-2px); }
.lesson.is-done .btn-done { background: rgba(16, 185, 129, 0.12); color: #047857; border-color: rgba(16, 185, 129, 0.35); }

/* Solishtirma jadval */
.tbl-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.95);
  scrollbar-width: thin;
}
.tbl {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}
.tbl th, .tbl td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.tbl th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-500);
  background: rgba(15, 23, 42, 0.04);
}
.tbl tr + tr td { border-top: 1px solid rgba(15, 23, 42, 0.07); }
.tbl td:first-child { font-weight: 700; color: var(--navy-900); }
.tbl .hl { color: var(--cobalt-600); font-weight: 700; }
.src-note {
  font-size: 12.5px;
  color: var(--slate-500);
}

/* PDF qo'llanma kartasi */
.pdf-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
}
.pdf-cover {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease;
}
.pdf-cover:hover { transform: translateY(-3px) rotate(-0.5deg); }
.pdf-cover img { display: block; width: 100%; height: auto; }
.pdf-info .eyebrow { margin-bottom: 6px; }
.pdf-info h3 {
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.pdf-info p {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.6;
}
.pdf-info .lesson-actions { margin-top: 16px !important; }

/* ==================== YAKUN ==================== */
.finale {
  margin-top: 52px;
  padding: 44px 36px;
  text-align: center;
  background:
    radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.28) 0%, transparent 45%),
    linear-gradient(150deg, #0f172a 0%, #1e3a8a 60%, #0052ff 100%);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.finale .eyebrow { color: var(--cobalt-400); }
.finale .section-heading .italic-accent { color: #bfdbfe; }
.finale .section-lead { color: rgba(226, 232, 240, 0.85); }
.finale .hero-actions .btn-light { background: #fff; }
.finale .btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.finale .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

/* ==================== RIGHT DASH INDICATOR ==================== */
.dash-indicator {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.dash-indicator a {
  display: block;
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.22);
  transition: width 0.3s ease, background 0.3s ease;
}
.dash-indicator a:hover { width: 22px; background: rgba(15, 23, 42, 0.45); }
.dash-indicator a.active { width: 32px; background: var(--cobalt-600); box-shadow: 0 0 10px var(--cobalt-glow); }

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  padding: 50px 0 60px;
  font-size: 13px;
  color: var(--slate-500);
  font-weight: 500;
}
footer a { color: var(--navy-900); font-weight: 700; text-decoration: none; }
footer a:hover { color: var(--cobalt-600); }

/* Kirish animatsiyasi */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 1180px) { .dash-indicator { display: none; } }

@media (max-width: 700px) {
  .container { padding: 0 16px; }
  .navbar .pill-btn-white .long { display: none; }
  .hero { padding: 36px 0 32px; }
  .stats-row { gap: 8px; }
  .stat { padding: 14px 6px; border-radius: 20px; }
  .stat b { font-size: 21px; }
  .intro { padding: 30px 18px; }
  .intro-grid { grid-template-columns: 1fr; }
  .lesson summary { flex-wrap: wrap; gap: 12px 14px; padding: 18px 16px; }
  .num-tile { width: 44px; height: 44px; font-size: 14px; border-radius: 14px; }
  .lesson-head { flex-basis: calc(100% - 106px); }
  .lesson summary .tags { order: 3; flex-basis: 100%; padding-left: 58px; }
  .lesson-body { padding: 0 16px 22px; font-size: 14.5px; }
  .compare { grid-template-columns: 1fr; }
  .pdf-card { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .tbl { font-size: 12.5px; }
  .btn { flex: 1 1 100%; justify-content: center; }
  pre { padding: 16px; font-size: 12.5px; }
  .nav-wrap { top: 8px; }
  .nav-progress { display: none; }
  .finale { padding: 34px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ==================== BETLAR MENYUSI ==================== */
.page-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 8px auto 0;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  border: 1.5px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 9px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800);
  transition: background 0.2s ease, color 0.2s ease;
}
.page-tabs a b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(15, 23, 42, 0.07);
}
.page-tabs a:hover { background: rgba(15, 23, 42, 0.06); }
.page-tabs a.active { background: var(--navy-900); color: #fff; }
.page-tabs a.active b { background: var(--cobalt-600); }

@media (max-width: 700px) {
  .page-tabs { justify-content: flex-start; }
  .page-tabs a { font-size: 12px; padding: 8px 12px 8px 8px; }
}

/* ==================== KIT KARTASI (promptlar) ==================== */
.kit-cover {
  display: grid;
  place-items: center;
  gap: 14px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background:
    radial-gradient(circle at 85% 12%, rgba(56, 189, 248, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(0, 82, 255, 0.5) 0%, transparent 55%),
    linear-gradient(155deg, #090e1a 0%, #0f172a 52%, #003cc7 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  transition: transform 0.3s ease;
}
.kit-cover:hover { transform: translateY(-3px); }
.kit-cover img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 12px 30px rgba(0, 82, 255, 0.45); }
.kit-cover span { font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.kit-cover small { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: rgba(226, 232, 240, 0.7); text-align: center; }

/* ==================== KIRISH ESLATMALARI (3 bosqich) ==================== */
html.eslatma-ochiq { overflow: hidden; }

.eslatma-fon {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: eslatma-fon 0.3s ease;
}
@keyframes eslatma-fon { from { opacity: 0; } }

.eslatma {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 18px 18px 26px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--glass-border);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  text-align: center;
  animation: eslatma-kir 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes eslatma-kir { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

.eslatma-rasm {
  display: block;
  width: 100%;
  height: auto; /* HTML height atributi nisbatni buzmasin */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
  background: #e8eaee;
}
.eslatma-qadam { animation: eslatma-qadam 0.35s ease; }
@keyframes eslatma-qadam { from { opacity: 0; transform: translateX(14px); } }

.eslatma .eyebrow { margin: 20px 0 6px; }
.eslatma h2 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 900;
  -webkit-text-stroke: 0.3px currentColor;
  letter-spacing: -0.03em;
  line-height: 1.15;
  padding: 0 8px;
}
.eslatma p {
  margin: 10px auto 0;
  max-width: 460px;
  padding: 0 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.6;
}
.eslatma p b { color: var(--navy-900); }

.eslatma-royxat {
  display: grid;
  gap: 8px;
  margin: 16px 8px 0;
  text-align: left;
}
.eslatma-royxat div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(232, 234, 238, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.95);
  font-size: 13.5px;
  color: var(--slate-600);
  line-height: 1.5;
}
.eslatma-royxat i {
  flex: 0 0 auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--cobalt-600);
  padding-top: 1px;
}
.eslatma-royxat b { color: var(--navy-900); }

.eslatma-iqtibos {
  margin: 16px 8px 0;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(56, 189, 248, 0.25) 0%, transparent 45%),
    linear-gradient(150deg, #0f172a 0%, #1e3a8a 70%, #0052ff 100%);
  color: #fff;
  text-align: left;
}
.eslatma-iqtibos p { margin: 0; padding: 0; max-width: none; color: rgba(226, 232, 240, 0.92); font-size: 14.5px; }
.eslatma-iqtibos p + p { margin-top: 8px; }
.eslatma .eslatma-iqtibos b { color: #fff; } /* .eslatma p b dan ustun bo'lishi kerak */
.eslatma-imzo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 800;
}
.eslatma-imzo img { width: 32px; height: 32px; border-radius: 9px; }
.eslatma-imzo small { display: block; font-weight: 500; font-size: 11.5px; color: rgba(226, 232, 240, 0.7); }

.eslatma-nuqtalar {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.eslatma-nuqtalar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.15);
  transition: width 0.3s ease, background 0.3s ease;
}
.eslatma-nuqtalar span.on { width: 26px; background: var(--cobalt-600); }

.eslatma-tugmalar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 8px;
}
.eslatma-tugmalar .btn { flex: 1 1 0; justify-content: center; max-width: 260px; }
.eslatma-tugmalar .btn[hidden] { display: none; }

.eslatma-qayta {
  border: 0;
  background: none;
  color: var(--navy-900);
  font: 700 13px var(--font-sans);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.eslatma-qayta:hover { color: var(--cobalt-600); }

@media (max-width: 700px) {
  .eslatma-fon { padding: 12px; align-items: end; }
  .eslatma { padding: 12px 12px 20px; border-radius: 26px; }
  .eslatma-rasm { border-radius: 16px; }
  .eslatma-tugmalar .btn { flex: 1 1 0; padding: 14px 12px; }
}

/* ==================== «QANDAY ISHLAYDI?» SXEMALARI ==================== */
.module[data-g="f"] { --g: #0891b2; }

.sxema-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.sxema {
  position: relative;
  padding: 26px 24px 24px;
  border-radius: var(--radius-lg);
  scroll-margin-top: 92px;
}
.sxema-belgi {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background:
    radial-gradient(circle at 80% 18%, rgba(56, 189, 248, 0.5) 0%, transparent 55%),
    linear-gradient(145deg, #0f172a 0%, var(--g) 100%);
}
.sxema h3 {
  margin-top: 14px;
  font-size: clamp(19px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.sxema > p {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.6;
}
.sxema > * + .term,
.sxema > * + .tbl-wrap,
.sxema > * + .compare { margin-top: 14px; }
.sxema h4 {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-600);
}
.sxema .term pre { font-size: 12.5px; max-height: none; }

/* qadamlar — tik chiziq bilan bog'langan raqamlar */
.qadamlar {
  list-style: none;
  counter-reset: q;
  margin-top: 16px;
}
.qadamlar li {
  position: relative;
  counter-increment: q;
  padding: 0 0 16px 44px;
  font-size: 13.5px;
  color: var(--slate-600);
  line-height: 1.55;
}
.qadamlar li::before {
  content: counter(q);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 13px var(--font-mono);
  color: var(--cobalt-600);
  background: #fff;
  border: 2px solid rgba(0, 82, 255, 0.25);
}
.qadamlar li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(0, 82, 255, 0.3), rgba(56, 189, 248, 0.15));
}
.qadamlar li:last-child { padding-bottom: 0; }
.qadamlar b { display: block; color: var(--navy-900); font-weight: 700; font-size: 14.5px; }

/* ==================== LUG'AT ==================== */
.lugat-asbob {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-bottom: 20px;
}
.lugat-qidiruv {
  position: relative;
  width: min(560px, 100%);
}
.lugat-qidiruv svg {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--slate-500);
  pointer-events: none;
}
.lugat-qidiruv input {
  width: 100%;
  padding: 15px 20px 15px 48px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg-strong);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  font: 500 15px var(--font-sans);
  color: var(--navy-900);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lugat-qidiruv input:focus { border-color: var(--cobalt-600); box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.12); }
.lugat-chiplar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.lugat-chiplar button {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.75);
  color: var(--navy-800);
  font: 700 12.5px var(--font-sans);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lugat-chiplar button:hover { background: #fff; }
.lugat-chiplar button.on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.lugat-son {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-500);
}

.lugat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.atama {
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  scroll-margin-top: 92px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.atama:hover, .atama[open] { background: rgba(255, 255, 255, 0.82); box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08); }
.atama summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.atama summary::-webkit-details-marker { display: none; }
.atama summary:focus-visible { outline: 2px solid var(--cobalt-600); outline-offset: -3px; border-radius: var(--radius-md); }
.atama-nom { flex: 1 1 auto; min-width: 0; }
.atama-nom b { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--navy-900); }
.atama-nom small {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-500);
}
.atama-nom > span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.45;
}
.atama .chev { width: 28px; height: 28px; }
.atama .chev svg { width: 14px; height: 14px; }
.atama[open] .chev { transform: rotate(180deg); background: var(--navy-900); color: #fff; }
.atama-tana {
  padding: 0 16px 16px;
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.65;
}
.atama-tana > * + * { margin-top: 10px; }
.atama-tana b { color: var(--navy-900); }
.atama-tana .oxshash,
.atama-tana .maslahat {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
}
.atama-tana .oxshash { background: rgba(0, 82, 255, 0.06); border: 1px solid rgba(0, 82, 255, 0.14); }
.atama-tana .maslahat { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25); }
.atama-tana pre.mini {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(160deg, #090e1a 0%, #0f172a 100%);
  color: #e2e8f0;
  font: 12.5px/1.6 var(--font-mono);
  max-height: none;
  white-space: pre;
  overflow-x: auto;
}
.atama-teg {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt-600);
}
.lugat-bosh {
  margin-top: 8px;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-500);
}

@media (max-width: 760px) {
  .sxema-grid, .lugat-grid { grid-template-columns: minmax(0, 1fr); } /* 1fr ichidagi keng jadval ustunni kengaytirib yuboradi */
  .sxema { padding: 22px 16px 18px; }
  .lugat-chiplar { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .lugat-chiplar::-webkit-scrollbar { display: none; }
  .lugat-chiplar button { flex: 0 0 auto; }
}
.qadamlar code, .atama-nom code { white-space: nowrap; }
/* toq sondagi oxirgi sxema butun kenglikni egallaydi */
.sxema-grid > .sxema:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ==================== SCROLL CHIZIQLARI YASHIRIN (butun sayt) ====================
   Aylantirish ishlayveradi (g'ildirak, sensor, klaviatura) — faqat chiziq ko'rinmaydi */
* { scrollbar-width: none !important; -ms-overflow-style: none !important; }
*::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
