/* EdifAI ma'lumot sayti (edifai.uz). Ranglar ishchi tizimdagidek; yorug' va qorong'i mavzu sarlavhadagi tugma bilan (html[data-theme], src/theme.ts) */
:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-alt: #eef0f8;
  --border: #e2e6f0;
  --text: #1e293b;
  --muted: #5b6478;
  --accent: #667eea;
  --accent-2: #764ba2;
  --gold: #f59e0b;
  --ok: #10b981;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(30, 41, 59, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0e1a;
  --surface: #141b30;
  --surface-alt: #0f1526;
  --border: #252d4d;
  --text: #e6eaf3;
  --muted: #9aa4bd;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 780px; }

/* ---- Tugmalar ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border); }

/* ---- Sarlavha ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---- Bosh qism ---- */
.hero { padding: 72px 0 64px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.grad { background: linear-gradient(135deg, var(--gold), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; list-style: none; color: var(--muted); font-size: 14px; }
.hero-points li::before { content: '✓'; color: var(--ok); font-weight: 700; margin-right: 6px; }

/* Tizim ko'rinishidan namuna */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mock-title { font-weight: 700; }
.mock-badge { font-size: 13px; color: var(--muted); }
.mock-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-alt); }
.chip b { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.chip.done { border-color: rgba(16, 185, 129, 0.5); }
.chip.done b { color: var(--ok); }
.chip.late { border-color: rgba(239, 68, 68, 0.55); }
.chip.late b { color: var(--danger); }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-alt); }
.avatar {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; background: linear-gradient(135deg, #a855f7, #6366f1);
}
.mock-name { flex: 1; font-weight: 600; font-size: 14px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.pill.ok { color: var(--ok); background: rgba(16, 185, 129, 0.12); }
.pill.debt { color: var(--danger); background: rgba(239, 68, 68, 0.12); }
.mock-ai {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(139, 92, 246, 0.16));
}
.mock-ai small { display: block; color: var(--muted); font-size: 12px; }
.spark { font-size: 22px; color: var(--gold); }

/* ---- Bo'limlar ---- */
.section { padding: 72px 0; }
.section.alt { background: var(--surface-alt); }
.section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; text-align: center; letter-spacing: -0.01em; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 12px auto 0; font-size: 17px; }
.left { text-align: left; margin-left: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }

.grid { display: grid; gap: 18px; margin-top: 36px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
/* Rol kartalari: ranglar tizimning kirish sahifasidagidek (src/pages/Landing.tsx) */
.role-director { --g1: #a855f7; --g2: #6366f1; --glow: rgba(168, 85, 247, 0.35); }
.role-teacher { --g1: #3b82f6; --g2: #06b6d4; --glow: rgba(59, 130, 246, 0.35); }
.role-student { --g1: #10b981; --g2: #06b6d4; --glow: rgba(16, 185, 129, 0.35); }
.role-parent { --g1: #f59e0b; --g2: #ef4444; --glow: rgba(245, 158, 11, 0.35); }
.role {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.role::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
}
.role::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--g1) 14%, transparent), transparent 55%);
}
.role:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--g1) 45%, var(--border));
  box-shadow: 0 14px 34px var(--glow);
}
.role > * { position: relative; z-index: 1; }
.role-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 8px 22px var(--glow);
}
.role h3 {
  width: fit-content;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.feature .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px;
  font-size: 18px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* AI */
.ai-inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: center; }
.steps { margin: 24px 0 0 20px; display: grid; gap: 12px; }
.steps li { padding-left: 6px; }
.note { margin-top: 18px; font-size: 14px; color: var(--muted); }
.ai-card { margin-top: 24px; background: linear-gradient(160deg, var(--surface), var(--surface-alt)); }
.ai-card p + p { margin-top: 12px; font-size: 14px; }

/* Tariflar */
.plans { max-width: 860px; margin-left: auto; margin-right: auto; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border: 2px solid var(--accent); }
/* AI Max: oltin chegara va toj */
.plan.max { border: 2px solid rgba(245, 158, 11, 0.6); }
.plan.max .plan-icon { color: #f59e0b; }
.tg-tag.max-tag { margin: 0 0 0 6px; vertical-align: middle; color: #f59e0b; background: rgba(245, 158, 11, 0.14); }
.ribbon {
  position: absolute; top: -12px; right: 20px; font-size: 12px; font-weight: 700; color: #fff;
  padding: 4px 12px; border-radius: 20px; background: linear-gradient(135deg, var(--gold), var(--accent-2));
}
.price { color: var(--text) !important; }
.price b { font-size: 36px; font-weight: 800; }
.price span { color: var(--muted); font-size: 14px; }
.list { list-style: none; display: grid; gap: 10px; flex: 1; align-content: start; }
.list li { position: relative; padding-left: 26px; font-size: 15px; }
.list li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
/* Tariflar ostida: bepul sinov haqida ajratilgan blok. "5 kunlik bepul" oltin-binafsha rangda */
.plans-note {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  max-width: 760px; margin: 28px auto 0; padding: 16px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), color-mix(in srgb, var(--gold) 8%, var(--surface)));
  box-shadow: var(--shadow);
  color: var(--text); font-size: 15px;
}
.plans-note p { margin: 0; }
.plans-note-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--accent-2));
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}
.trial-highlight {
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plans-note-limits { color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) {
  .plans-note { align-items: flex-start; text-align: left; padding: 14px 16px; }
  .plans-note-limits { white-space: normal; }
}

/* Hali chiqmagan AI Ultra: tizimdagi tarif kartasidagidek (src/components/PlanCards.scss) */
.plans.grid-3 { max-width: 1180px; }
.plan.upcoming {
  overflow: hidden;
  justify-content: center;
  min-height: 320px;
  border: 1px dashed rgba(245, 158, 11, 0.5);
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.18), transparent 60%),
    linear-gradient(160deg, rgba(245, 158, 11, 0.08), rgba(139, 92, 246, 0.16)),
    var(--surface);
}
.plan.upcoming .ribbon.soon { top: 14px; right: 14px; z-index: 2; }
.ultra-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 70%);
  transform: translate(-50%, -60%);
  pointer-events: none;
  animation: ultra-pulse 4s ease-in-out infinite;
}
.ultra-spark {
  position: absolute;
  color: #fbbf24;
  opacity: 0.8;
  pointer-events: none;
  animation: ultra-twinkle 3s ease-in-out infinite;
}
.ultra-spark.s1 { top: 18%; left: 14%; }
.ultra-spark.s2 { top: 30%; right: 16%; animation-delay: 1s; }
.ultra-spark.s3 { bottom: 18%; left: 22%; animation-delay: 2s; }
.ultra-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.ultra-body h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ultra-crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.35);
}
.plan .ultra-teaser { max-width: 260px; color: var(--text); font-size: 18px; font-weight: 700; line-height: 1.35; }
.ultra-locked { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 260px; margin-top: 6px; list-style: none; }
.ultra-locked li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.ultra-locked svg { flex-shrink: 0; }
.ultra-locked span { height: 8px; border-radius: 999px; background: linear-gradient(90deg, rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0.12)); }
.ultra-locked .w78 { width: 78%; }
.ultra-locked .w62 { width: 62%; }
.ultra-locked .w70 { width: 70%; }
.ultra-locked .w54 { width: 54%; }
.plan .ultra-note { margin-top: 4px; padding: 4px 12px; border-radius: 999px; background: rgba(245, 158, 11, 0.12); color: #f59e0b; font-size: 13px; font-weight: 600; }

@keyframes ultra-pulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -60%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -60%) scale(1.12); }
}
@keyframes ultra-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 0.9; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .ultra-glow, .ultra-spark { animation: none; }
}

/* Planshet eni (2 ustun): AI Ultra pastki qatorda yolg'iz qolmasin - butun enga cho'ziladi, ichi yonma-yon:
   chapda toj, o'rtada nom, shior va izoh, o'ngda yopiq imkoniyatlar */
@media (min-width: 601px) {
  .plan.upcoming {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 28px 32px;
  }
  .plan.upcoming .ultra-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "crown title  locked"
      "crown teaser locked"
      "crown note   locked";
    align-items: center;
    column-gap: 28px;
    row-gap: 6px;
    text-align: left;
  }
  .plan.upcoming .ultra-crown { grid-area: crown; }
  .plan.upcoming .ultra-body h3 { grid-area: title; align-self: end; }
  .plan.upcoming .ultra-teaser { grid-area: teaser; max-width: none; }
  .plan.upcoming .ultra-note { grid-area: note; justify-self: start; align-self: start; }
  .plan.upcoming .ultra-locked { grid-area: locked; max-width: none; margin-top: 0; }
  .plan.upcoming .ultra-glow { left: 18%; transform: translate(-50%, -50%); animation: none; }
  /* Yulduzchalar chiziqlar ustiga tushmasin: toj atrofi va o'ng pastki burchak */
  .plan.upcoming .ultra-spark.s1 { top: 14%; left: 14%; }
  .plan.upcoming .ultra-spark.s2 { top: auto; bottom: 12%; right: 4%; }
  .plan.upcoming .ultra-spark.s3 { bottom: 10%; left: 4%; }
}

/* Ishonchlilik */
.stats { margin-bottom: 24px; }
.stat { text-align: center; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 14px; }

/* Savollar */
details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin-top: 12px; }
details:first-of-type { margin-top: 32px; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-weight: 700; font-size: 20px; line-height: 1; }
details[open] summary::after { content: '−'; }
details p { margin-top: 10px; color: var(--muted); }

/* Bog'lanish */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.contact-links { display: grid; gap: 12px; }
.contact-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.contact-item span { color: var(--muted); }
.contact-item:hover { border-color: var(--accent); text-decoration: none; }

/* Pastki qism */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- Planshet va telefon ---- */
@media (max-width: 960px) {
  .hero-inner, .ai-inner, .contact-inner { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .header-inner .btn { margin-left: auto; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 52px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---- Telegram bo'limi ---- */
.tg-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.tg-cards { display: grid; gap: 12px; margin-top: 28px; }
.tg-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
}
.tg-card h3 { font-size: 16px; margin-bottom: 4px; }
.tg-card p { color: var(--muted); font-size: 14px; }
.tg-dot { flex: 0 0 12px; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; }
.tg-dot.absent { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.tg-dot.pay { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15); }
.tg-dot.safe { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); }
.tg-tag {
  display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.tg-tag.all { color: var(--ok); background: rgba(16, 185, 129, 0.12); }
.tg-group {
  margin-top: 20px; padding: 18px 20px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface);
}
.tg-group h3 { font-size: 17px; margin-bottom: 6px; }
.tg-group > p { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.tg-group ul { margin: 0 0 12px 20px; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.tg-group b { color: var(--text); }
.tg-how { margin-top: 24px; }
.tg-how h3 { font-size: 16px; margin-bottom: 8px; }
.tg-how ol { margin-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.tg-how b { color: var(--text); }

/* Telefon va Telegram chat ko'rinishi (Telegram'ning o'z ranglari, mavzudan qat'i nazar) */
.phone {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 340px;
  padding: 12px;
  border-radius: 44px;
  background: #0b0f1a;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35), inset 0 0 0 2px #2b3245;
}
.phone-notch {
  position: absolute; top: 18px; left: 50%; z-index: 2;
  width: 96px; height: 24px; border-radius: 14px; background: #0b0f1a;
  transform: translateX(-50%);
}
.tg-screen {
  display: flex; flex-direction: column;
  height: 600px; overflow: hidden;
  border-radius: 34px;
  background: #c4d7a3 linear-gradient(160deg, #d5e4b5 0%, #a9c58f 55%, #8fb38a 100%);
}
.tg-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 44px 14px 10px;
  color: #fff; background: #517da2;
}
.tg-back { font-size: 28px; line-height: 1; margin-right: 2px; }
.tg-avatar { width: 36px; height: 36px; border-radius: 50%; }
.tg-title { display: flex; flex-direction: column; line-height: 1.2; }
.tg-title b { font-size: 15px; }
.tg-title small { font-size: 12px; opacity: 0.8; }
/* Telegram kabi: eng yangi xabar pastda to'liq ko'rinadi, joy yetmasa eskilari tepaga suriladi */
.tg-chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px 10px; overflow: hidden; }
.tg-day {
  align-self: center; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; color: #fff; background: rgba(0, 0, 0, 0.28);
}
.tg-msg {
  position: relative;
  align-self: flex-start;
  max-width: 88%;
  padding: 8px 10px 18px;
  border-radius: 14px 14px 14px 4px;
  font-size: 13px; line-height: 1.4; color: #111;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}
.tg-msg time { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: #8a96a3; }
.tg-input {
  display: flex; justify-content: space-between; align-items: center;
  margin: 8px; padding: 10px 14px; border-radius: 22px;
  background: #fff; color: #9aa4ae; font-size: 14px;
}
.tg-send { color: #517da2; }

@media (max-width: 960px) {
  .tg-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tg-screen { height: 560px; }
  .phone { max-width: 320px; }
}

/* ---- Navigatsiya (src/main.ts bilan) ---- */
/* Skriptsiz ham bo'limga o'tganda sarlavha uni yopib qo'ymasin */
section[id] { scroll-margin-top: 72px; }
section[id]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Skript ishlaganda aylantirishni u boshqaradi (CSS smooth "darhol" buyrug'ini ham sekinlashtirardi) */
html.js { scroll-behavior: auto; }

.site-header { transition: box-shadow 0.2s ease, background 0.2s ease; }
.site-header.scrolled { box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }

/* Ekrandagi bo'lim menyuda belgilanadi */
.nav a { position: relative; padding: 4px 0; }
.nav a[aria-current="true"] { color: var(--text); }
.nav a[aria-current="true"]::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Telefon menyusi tugmasi: faqat skript ishlaganda va tor ekranda */
.menu-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer;
}
.menu-toggle span {
  display: block; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .header-inner { gap: 12px; }
  .js .menu-toggle { display: flex; }
  .js .site-header.menu-open .nav {
    display: flex;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px 20px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  }
  .js .site-header.menu-open .nav a {
    padding: 12px 0; font-size: 16px; color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .js .site-header.menu-open .nav a:last-child { border-bottom: none; }
  .js .site-header.menu-open .nav a[aria-current="true"]::after { display: none; }
  .js .site-header.menu-open .nav a[aria-current="true"] { color: var(--accent); }
}

/* ---- AI tekshiruv: telefonda o'qituvchining AI tekshiruv sahifasi (mavzudan qat'i nazar och ranglarda) ---- */
.ai-steps { list-style: none; margin-top: 24px; display: grid; gap: 14px; }
.ai-steps li { display: flex; gap: 14px; align-items: flex-start; }
.ai-steps b { color: var(--text); }
.ai-step-n {
  flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.ai-screen {
  display: flex; flex-direction: column;
  height: 600px; overflow: hidden;
  border-radius: 34px;
  background: #f4f6fb; color: #1e293b;
}
.ai-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 44px 16px 12px;
  color: #fff; background: linear-gradient(135deg, #667eea, #764ba2);
}
.ai-back { font-size: 28px; line-height: 1; }
.ai-bar-title { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.ai-bar-title b { font-size: 15px; }
.ai-bar-title small { font-size: 12px; opacity: 0.85; }
.ai-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.22);
}
.ai-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; flex: 1; min-height: 0; }
.ai-task { padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid #e2e6f0; }
.ai-task small { display: block; font-size: 11px; color: #5b6478; }
.ai-task b { font-size: 13px; }
.ai-student { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ai-ava {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font-size: 12px; color: #fff; background: linear-gradient(135deg, #10b981, #06b6d4);
}
.ai-name { flex: 1; }
.ai-count { font-size: 11px; font-weight: 600; color: #5b6478; padding: 3px 8px; border-radius: 8px; background: #e8ebf5; }

/* Daftar rasmi: chiziqli qog'oz, qo'lyozma, AI belgilagan xatolar */
.ai-photo {
  position: relative; overflow: hidden;
  border-radius: 14px; border: 1px solid #e2e6f0;
  box-shadow: 0 6px 16px rgba(30, 41, 59, 0.1);
}
.paper {
  padding: 10px 12px 10px 34px;
  background:
    linear-gradient(90deg, transparent 24px, rgba(239, 68, 68, 0.45) 24px, rgba(239, 68, 68, 0.45) 25px, transparent 25px),
    repeating-linear-gradient(#fffdf5 0 25px, #c9d6ee 25px 26px);
  font-family: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
  font-size: 19px; line-height: 26px; color: #1f3a8a;
  transform: rotate(-0.6deg);
}
.paper p { white-space: nowrap; }
.paper .tick { font-style: normal; color: #10b981; font-weight: 700; margin-left: 4px; }
.paper .mark {
  color: #1f3a8a;
  border-radius: 40%;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.85);
  padding: 0 3px;
}
.ai-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 34px;
  background: linear-gradient(180deg, transparent, rgba(102, 126, 234, 0.28) 70%, rgba(102, 126, 234, 0.7));
  border-bottom: 2px solid #667eea;
  animation: ai-scan 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ai-scan {
  0% { transform: translateY(-40px); opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(140px); opacity: 0; }
}
.ai-photo-tag {
  position: absolute; right: 8px; bottom: 8px;
  font-size: 10px; font-weight: 600; color: #fff;
  padding: 3px 8px; border-radius: 8px; background: rgba(15, 23, 42, 0.6);
}

.ai-result {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #e2e6f0;
}
.ai-score {
  position: relative; flex: none;
  display: grid; place-content: center; text-align: center;
  width: 70px; height: 70px; border-radius: 50%;
  background: conic-gradient(#10b981 0 86%, #e5e9f2 86% 100%);
}
.ai-score::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.ai-score b, .ai-score small { position: relative; line-height: 1; }
.ai-score b { font-size: 22px; font-weight: 800; color: #0f766e; }
.ai-score small { font-size: 10px; color: #5b6478; margin-top: 2px; }
.ai-result-text > b { font-size: 13px; }
.ai-feedback { list-style: none; margin-top: 4px; display: grid; gap: 3px; font-size: 12px; color: #334155; }
.ai-feedback li { position: relative; padding-left: 16px; }
.ai-feedback li::before { position: absolute; left: 0; font-weight: 800; }
.ai-feedback li.ok::before { content: '✓'; color: #10b981; }
.ai-feedback li.err::before { content: '✕'; color: #ef4444; }
.ai-feedback s { color: #ef4444; }
.ai-feedback b { color: #10b981; }

.ai-actions { display: flex; gap: 8px; margin-top: auto; }
.ai-btn {
  flex: 1; text-align: center; padding: 10px 8px; border-radius: 12px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
}
.ai-btn.ghost { color: #475569; background: #fff; border: 1px solid #e2e6f0; }

@media (max-width: 960px) {
  /* Ustma-ust: avval matn, keyin telefon */
  .ai-text { order: -1; }
}
@media (max-width: 600px) {
  .ai-screen { height: 560px; }
  .paper { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-scan { animation: none; opacity: 0; }
}

/* ---- Tarif kartalari: ishchi saytdagi "Tarif va to'lov" kartalari (PlanCards) bilan bir xil ko'rinish ---- */
.plan { gap: 14px; }
.plan-head { display: flex; align-items: center; gap: 10px; }
.plan .plan-head h3 { margin: 0; font-size: 20px; font-weight: 700; }
.plan-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border-radius: 10px;
  color: var(--accent); background: rgba(102, 126, 234, 0.12);
}
.plan.pro .plan-icon { color: #8b5cf6; background: rgba(139, 92, 246, 0.12); }
.plan .plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 26px; font-weight: 800; color: var(--text); }
.plan .plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; margin: 0; padding: 0; }
.plan .plan-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text); }
.plan-features li svg { flex: none; margin-top: 2px; color: var(--ok); }
.plan .plan-features li.off { color: var(--muted); }
/* Tarifda yo'q imkoniyat: qizil "✕" */
.plan-features li.off svg { color: var(--danger); }

/* ---- Mavzu tugmasi (src/main.ts): qorong'ida quyosh, yorug'da oy. Skriptsiz ko'rinmaydi ---- */
.theme-toggle {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.js .theme-toggle { display: inline-flex; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.js .theme-toggle + .header-login { margin-left: 0; }
/* Planshet/telefonda menyu yashirin: tugma va "Tizimga kirish" o'ngga suriladi */
@media (max-width: 960px) { .js .theme-toggle { margin-left: auto; } }

/* Oldingi tarifdan ustunlik belgisi: "AI Pro'dan +15 ta", "2 baravar ko'p", "Faqat AI Max" (ishchi saytdagi kabi) */
.plan-up {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  line-height: 18px; white-space: nowrap; vertical-align: 1px; color: #7c3aed;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.3);
}
.plan-up.max { color: #b45309; background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.4); }
.ribbon.top { background: linear-gradient(135deg, #f59e0b, #8b5cf6); }
/* Narx ostida: oldingi tarifdagi hammasi + nima qo'shiladi */
.plan-extra {
  margin: -4px 0 0; padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 1.4;
  color: #7c3aed; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.25);
}
.plan-extra.max { color: #b45309; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.35); }
:root[data-theme="dark"] .plan-up, :root[data-theme="dark"] .plan-extra { color: #c4b5fd; }
:root[data-theme="dark"] .plan-up.max, :root[data-theme="dark"] .plan-extra.max { color: #fbbf24; }
