/* ===========================================================================
   Akademik litsey — dizayn tizimi

   Uslub tashkenttech-edu.uz namunasiga qarab olingan: chuqur ko‘k asos,
   to‘q sariq urg‘u, Montserrat, yumshoq 14px burchaklar, ikki rangli
   sarlavhalar va pill shaklidagi tugmalar.

   Bootstrap 5.3 to‘r va komponent xulqini beradi; ko‘rinish shu yerda
   belgilanadi. Ranglar CSS o‘zgaruvchilarida — qorong‘i rejim faqat
   qiymatlarni almashtiradi.
   =========================================================================== */

:root {
  /* Asosiy ko‘k */
  --navy-900: #0a2a43;   /* eng quyuq: podval, qoplama */
  --navy-800: #0f3450;
  --navy-700: #143d5a;   /* firma rangi: fon va chegara uchun */
  --navy-ink: #143d5a;   /* o'sha rang matn uchun: qorong'i rejimda yorishadi */
  --navy-600: #1b4e71;
  --navy-500: #26638c;
  --navy-100: #e4edf4;
  --navy-50:  #f1f6fa;

  /* To‘q sariq urg‘u.
     --accent oq fonda 3.39 — bu faqat yirik matn va bezak uchun yetarli.
     Kichik matn va oq yozuvli tugmalar uchun --accent-ink (5.09) olinadi,
     shunda WCAG AA buzilmaydi, rang esa o‘sha oilada qoladi. */
  --accent:      #f05a28;
  --accent-ink:  #c63f14;
  --accent-soft: #fdede7;

  /* Quyuq fonda (qopqoq paneli, ko‘k bloklar) firma to‘q sarig‘i
     yetarlicha ajralmaydi: shaffof panel ortida yorug‘ kadr turganda
     kontrast 2,96 gacha tushadi. Shuning uchun ikkita yorug‘roq tus —
     talab matn o‘lchamiga qarab turlicha:
       --accent-on-dark     yirik sarlavha uchun  (4,30 — talab 3,0)
       --accent-on-dark-sm  kichik matn uchun     (5,65 — talab 4,5) */
  --accent-on-dark:    #fb8c60;
  --accent-on-dark-sm: #ffb08c;

  --ok-500:     #1f7a4d;
  --ok-bg:      #e8f6ee;
  --warn-500:   #a35c00;
  --warn-bg:    #fdf1e0;
  --danger-500: #b4291b;
  --danger-bg:  #fcecea;
  --info-500:   #10627f;
  --info-bg:    #e7f2f7;

  /* Yuzalar va matn */
  --bg:          #ffffff;
  --bg-alt:      #f5f5f5;   /* kulrang bo‘limlar */
  --surface:     #ffffff;
  --surface-alt: #f7f9fb;
  --border:      #e4e9ef;
  --border-firm: #cdd6e0;

  --text:       #143d5a;
  --text-muted: #5d7286;
  --text-faint: #93a3b3;
  --on-dark:    rgba(255, 255, 255, .82);

  --shadow-sm: 0 1px 2px rgba(10, 42, 67, .06);
  --shadow:    0 4px 16px rgba(10, 42, 67, .08);
  --shadow-lg: 0 18px 48px rgba(10, 42, 67, .16);

  /* Namunadagidek yumshoq burchaklar */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --sidebar-w: 264px;
  --header-h:  92px;   /* gerb 66 px — atrofida havo qolsin */

  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Qorong‘i rejim: o‘sha ko‘k oilaning quyuq uchi */
[data-bs-theme="dark"] {
  --navy-100: #1c3348;
  --navy-50:  #16283a;

  /* Matn uchun olingan ko'k quyuq fonda o'qilmaydi — oilaning
     yorug' uchini olamiz, kontrast 9,4 ga chiqadi. */
  --navy-ink: #cfe0ef;

  --accent-soft: #3a1d12;

  --ok-bg:     #12301f;
  --warn-bg:   #33260d;
  --danger-bg: #391714;
  --info-bg:   #0e2c39;

  --bg:          #0c1a26;
  --bg-alt:      #0f2130;
  --surface:     #132635;
  --surface-alt: #172d3f;
  --border:      #21394d;
  --border-firm: #2f4c64;

  --text:       #e6eef5;
  --text-muted: #9db0c1;
  --text-faint: #6f8598;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow:    0 4px 16px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
}

/* Bootstrap komponentlari ham firma ranglarida chiqsin */
:root,
[data-bs-theme="dark"] {
  --bs-primary: var(--navy-700);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-link-color: var(--accent-ink);
  --bs-link-hover-color: var(--navy-ink);
  --bs-font-sans-serif: var(--font);
  --bs-border-radius: var(--radius);
}

/* --------------------------------------------------------------- Asos */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

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

.text-muted-2 { color: var(--text-muted) !important; }
.text-faint   { color: var(--text-faint) !important; }
.text-accent  { color: var(--accent-ink) !important; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* «Asosiy qismga o‘tish» — klaviatura va ekran o‘quvchi uchun. Sichqonchada
   ko‘rinmaydi; Tab bosilganda tepada, o‘rtada tugma bo‘lib tushadi (chap
   chetga yopishib, yuqori qatorni yopib qo‘ymaydi). */
.skip-link {
  position: fixed; top: 12px; left: 50%; z-index: 2000;
  transform: translate(-50%, calc(-100% - 24px));
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--accent-ink); color: #fff; font-weight: 700; font-size: .95rem;
  text-decoration: none; white-space: nowrap;
  transition: transform .18s ease;
}
.skip-link::after { content: "↓"; font-weight: 800; }
.skip-link:focus, .skip-link:focus-visible {
  transform: translate(-50%, 0); color: #fff;
  outline: 3px solid #fff; outline-offset: 2px; box-shadow: var(--shadow-lg);
}
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
/* O‘tilgan joy — kursor shu yerga tushadi, lekin ramka chizilmaydi */
main[tabindex="-1"]:focus { outline: none; }

/* -------------------------------------------------- Bo‘lim sarlavhasi */
/* Namunadagi naqsh: kichik razryadli yozuv, ostida ikki rangli sarlavha */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .74rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px;
  background: var(--accent); flex-shrink: 0;
}
.eyebrow--center::before { display: none; }
.eyebrow--on-dark { color: var(--accent-on-dark-sm); }
.eyebrow--on-dark::before { background: var(--accent-on-dark); }

/* Sarlavhaning bir qismi to‘q sariq: <h2>Bizning <em>fanlar</em></h2> */
h1 em, h2 em, h3 em,
.tinted { font-style: normal; color: var(--accent); }

/* Quyuq blok ichida — yorug‘roq tus va oq matn */
.on-dark { color: var(--on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: #fff; }
.on-dark h1 em, .on-dark h2 em, .on-dark h3 em,
.on-dark .tinted { color: var(--accent-on-dark); }

.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
/* Oldingi bo‘lim ustiga chiqib turadigan yumaloq kartochka */
.section--raised {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -34px; position: relative; z-index: 2;
}

/* ---------------------------------------------------------------- Tugma */
.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 10px 22px;
  display: inline-flex; align-items: center; gap: 9px;
}
.btn-lg { padding: 13px 30px; font-size: 1rem; }
.btn-sm { padding: 7px 16px; font-size: .85rem; }

/* Oq yozuv --accent-ink ustida 5.09 — har qanday o‘lchamda AA */
.btn-accent {
  background: var(--accent-ink); border: 1px solid var(--accent-ink); color: #fff;
}
.btn-accent:hover { background: #a93410; border-color: #a93410; color: #fff; }

.btn-navy { background: var(--navy-700); border: 1px solid var(--navy-700); color: #fff; }
.btn-navy:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

.btn-outline-navy { background: none; border: 1.5px solid var(--navy-ink); color: var(--navy-ink); }
.btn-outline-navy:hover { background: var(--navy-700); color: #fff; }

.btn-soft { background: var(--accent-soft); border: 1px solid transparent; color: var(--accent-ink); }
.btn-soft:hover { background: var(--accent-ink); color: #fff; }

/* Qorong‘i fonda: shaffof, oq chegara */
.btn-on-dark { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .6); color: #fff; }
.btn-on-dark:hover { background: #fff; color: var(--navy-700); border-color: #fff; }

/* Doira ichidagi strelka — namunadagi karusel tugmasi */
.btn-round {
  width: 46px; height: 46px; padding: 0;
  border-radius: 50%; justify-content: center;
  background: var(--navy-700); border: none; color: #fff;
}
.btn-round:hover { background: var(--accent-ink); color: #fff; }

/* Pill tanlagich: faol — to‘q ko‘k, nofaol — och sariq fon */
.pill-tabs { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.pill-tab {
  padding: 10px 24px; border-radius: 999px;
  font-weight: 700; font-size: .92rem;
  background: var(--accent-soft); color: var(--accent-ink);
  border: none;
}
.pill-tab:hover { text-decoration: none; background: #fbdcd0; color: var(--accent-ink); }
.pill-tab.active { background: var(--navy-700); color: #fff; }

/* -------------------------------------------------------------- Kartalar */
.card-ui {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-ui + .card-ui { margin-top: 18px; }

.card-ui__header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-ui__title { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.card-ui__body { padding: 20px; }
.card-ui__footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Havola-kartochka: rasm tepada, matn pastda */
.tile {
  display: block; height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.tile__media { aspect-ratio: 16 / 10; background: var(--navy-100); overflow: hidden; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 18px 20px 22px; }
.tile__meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 6px; }
.tile__title { font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.tile:hover .tile__title { color: var(--accent-ink); }

/* Yo‘nalish kartochkasi: rasm ustida kod, pastda kafedra mudiri */
.tile--specialty { display: flex; flex-direction: column; border-radius: calc(var(--radius) + 4px); }
.tile--specialty .tile__media { position: relative; aspect-ratio: 16 / 9; }
.tile--specialty .tile__media img { transition: transform .35s ease; }
.tile--specialty:hover .tile__media img { transform: scale(1.04); }
.tile--specialty .tile__media::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to top, rgba(10, 30, 50, .55), transparent); pointer-events: none;
}
.tile__code {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em;
}
.tile--specialty .tile__body { flex: 1; padding: 18px 22px 12px; }
.tile--specialty .tile__title { font-size: 1.12rem; margin-bottom: 8px; }
.tile__desc { margin: 0 0 4px; font-size: .9rem; line-height: 1.5; color: var(--text-muted); }
.tile__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 22px; padding: 14px 0 18px; border-top: 1px solid var(--border);
}
.tile__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tile__head small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.tile__head b { display: block; font-size: .9rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: .85rem;
}
.tile__more { font-size: .88rem; font-weight: 700; color: var(--text); }
.tile__arrow {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.tile--specialty:hover .tile__arrow { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateX(3px); }

/* Yo‘nalish sahifasi: kafedra mudiri */
.head-card { display: flex; align-items: center; gap: 18px; padding: 20px 22px; }
.head-card__photo {
  flex: 0 0 76px; width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 1.4rem;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent-soft);
}
.head-card__name { font-size: 1.15rem; font-weight: 800; margin: 0 0 2px; }

/* --------------------------------------------------------- Statistik plita */
.stat {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.stat__icon {
  flex: 0 0 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--navy-50); color: var(--navy-ink);
  font-size: 1.2rem;
}
.stat__value {
  display: block; font-size: 1.75rem; font-weight: 800;
  line-height: 1.1; letter-spacing: -.02em;
}
.stat__label { display: block; font-size: .82rem; color: var(--text-muted); }
.stat > span:last-child { min-width: 0; }
/* Juda tor telefonda (320–399 px) ikki ustunli plitaga belgi va raqam yonma-yon
   sig‘maydi — ustma-ust joylashadi. */
@media (max-width: 399.98px) {
  .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat__icon { flex: 0 0 auto; width: 40px; height: 40px; font-size: 1rem; }
  .stat__value { font-size: 1.4rem; }
}

.stat--accent .stat__icon { background: var(--accent-soft); color: var(--accent-ink); }
.stat--ok     .stat__icon { background: var(--ok-bg);     color: var(--ok-500); }
.stat--warn   .stat__icon { background: var(--warn-bg);   color: var(--warn-500); }
.stat--danger .stat__icon { background: var(--danger-bg); color: var(--danger-500); }
.stat--info   .stat__icon { background: var(--info-bg);   color: var(--info-500); }

/* -------------------------------------------------------------- Nishonlar */
.badge-ui {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-ui--ok      { background: var(--ok-bg);      color: var(--ok-500); }
.badge-ui--warn    { background: var(--warn-bg);    color: var(--warn-500); }
.badge-ui--danger  { background: var(--danger-bg);  color: var(--danger-500); }
.badge-ui--info    { background: var(--info-bg);    color: var(--info-500); }
.badge-ui--accent  { background: var(--accent-soft); color: var(--accent-ink); }
.badge-ui--muted   { background: var(--surface-alt); color: var(--text-muted); }

/* Litsey gerbi. Doira shaklidagi belgi — kesilmasligi uchun `contain`. */
.brand-mark-img {
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Quyuq fonda gerbning tashqi halqasidagi ko‘k yozuv yo‘qoladi.
   Rasmiy gerblarni bunday joyda oq doira ustiga qo‘yish qabul qilingan —
   belgi o‘qiladi va medalyon ko‘rinishida tugallangan chiqadi. */
.brand-mark-img--on-dark {
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

/* --------------------------------------------------------------- Avatar */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--navy-100); color: var(--navy-ink);
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: .78rem;
}
.avatar--sm { width: 30px; height: 30px; font-size: .68rem; }
.avatar--md { width: 56px; height: 56px; font-size: 1.05rem; }
.avatar--lg { width: 88px; height: 88px; font-size: 1.5rem; }

/* ------------------------------------------------------ Onlayn belgisi */
/* Avatar burchagidagi yashil nuqta — hozir saytda. */
.people-avatar { position: relative; display: inline-flex; flex-shrink: 0; }
.presence-dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #2ecc71; border: 2px solid var(--surface);
}
/* «Holat» ustunidagi yozuv: yashil — onlayn, kulrang — oxirgi kirgan vaqt. */
.presence { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
.presence i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); opacity: .6; }
.presence--on { color: var(--ok-500); font-weight: 600; }
.presence--on i { background: #2ecc71; opacity: 1; box-shadow: 0 0 0 3px rgba(46, 204, 113, .2); }
.people-table [data-profile-card] { cursor: pointer; }
.people-table [data-profile-card]:hover { color: var(--accent-ink); text-decoration: underline; }
.min-w-0 { min-width: 0; }

/* ------------------------------------------------- Profil kartochkasi */
/* Ism ustiga bosilganda chiqadigan oyna. Sahifadagi hamma narsadan
   yuqorida turishi kerak: yopishqoq shapka `z-index: 1030` da, xizmat
   qatori 1031 da — kartochka ulardan ham tepada. */
.profile-card-pop {
  position: absolute; z-index: 1060;
  width: min(320px, calc(100vw - 24px));
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  padding: 16px;
}
.profile-card-pop[hidden] { display: none; }

.profile-card__head { display: flex; align-items: center; gap: 12px; }
.profile-card__name { font-size: 1rem; font-weight: 700; margin: 0; }
.profile-card__role { font-size: .82rem; color: var(--text-muted); margin: 2px 0 0; }

.profile-card__stats {
  display: flex; gap: 18px; margin-top: 12px;
  font-size: .82rem; color: var(--text-muted);
}
.profile-card__stats b { display: block; font-size: 1.05rem; color: var(--text); }

.profile-card__list {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: grid; gap: 6px; font-size: .82rem;
}
.profile-card__list i { color: var(--accent-ink); margin-inline-end: 4px; }

.profile-card__meta {
  margin: 12px 0 0; font-size: .78rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 10px;
}
.profile-card__score { color: var(--accent-ink); font-weight: 700; }

.profile-card__contacts {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  display: grid; gap: 4px; font-size: .82rem;
}

.profile-card__more { display: inline-block; margin-top: 12px; font-size: .82rem; }

/* Yuklanayotgan payt: oyna sakramasin, balandligi oldindan egallansin */
.profile-card-pop__loading {
  display: grid; place-items: center; min-height: 92px;
  color: var(--text-muted); font-size: .82rem;
}

/* -------------------------------------------------------------- Jadvallar */
.table-ui { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.table-ui th {
  text-align: start;
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  background: var(--surface-alt);
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-ui td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-ui tbody tr:last-child td { border-bottom: none; }
.table-ui tbody tr:hover { background: var(--surface-alt); }

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }

/* Tor ekranda jadval kartochkalarga aylanadi: har bir katak o'z
   sarlavhasi (`data-label`) bilan alohida qatorda. Gorizontal surishda
   oxirgi ustundagi amal tugmalari telefonda ekrandan chiqib ketardi. */
@media (max-width: 767.98px) {
  .table-ui--stack thead { display: none; }
  .table-ui--stack, .table-ui--stack tbody,
  .table-ui--stack tr, .table-ui--stack td { display: block; width: 100%; }
  .table-ui--stack tr { padding: 10px 16px; border-bottom: 1px solid var(--border); }
  .table-ui--stack tbody tr:last-child { border-bottom: none; }
  .table-ui--stack td { padding: 4px 0; border-bottom: none; text-align: start !important; }
  .table-ui--stack td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: .7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted);
  }
  .table-ui--stack td:last-child { padding-top: 8px; }
  .table-ui--stack td .justify-content-end { justify-content: flex-start !important; }
}

/* ------------------------------------------------------------ Bo‘sh holat */
.empty-state { padding: 56px 24px; text-align: center; color: var(--text-muted); }
.empty-state__icon { font-size: 2.5rem; color: var(--text-faint); margin-bottom: 14px; }
.empty-state__title { font-weight: 800; color: var(--text); margin-bottom: 6px; }

/* ------------------------------------------------------------------ Forma */
.form-label { font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: var(--text); }
.form-label .req { color: var(--danger-500); margin-inline-start: 2px; }

.form-control, .form-select {
  background: var(--surface);
  border: 1.5px solid var(--border-firm);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 13px;
}
.form-control:focus, .form-select:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  color: var(--text);
}
.form-control::placeholder { color: var(--text-faint); }
.form-text { font-size: .8rem; color: var(--text-muted); }
.invalid-feedback { font-size: .82rem; }

/* ---------------------------------------------------------- Sahifa boshi */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-head__title { margin: 0 0 4px; font-size: 1.75rem; }
.page-head__sub { color: var(--text-muted); font-size: .92rem; margin: 0; }

.breadcrumb { font-size: .82rem; margin-bottom: 12px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb .active { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------- Dars jadvali */
/* Haftalik to‘r: chap ustunda dars vaqti, qolganida hafta kunlari.
   Katak balandligi tenglashtirilmaydi — kichik guruh darslari ikkita
   bo‘lib turadi va katak o‘zi cho‘ziladi. */
.timetable { table-layout: fixed; min-width: 900px; }
.timetable th, .timetable td { vertical-align: top; }
.timetable__time {
  width: 108px; white-space: nowrap;
  background: var(--surface-alt); border-inline-end: 1px solid var(--border);
}
.timetable__num   { display: block; font-weight: 800; color: var(--text); font-size: .8rem; }
.timetable__hours { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.timetable__cell { padding: 8px; }
.timetable__cell.is-clash {
  background: var(--danger-bg);
  box-shadow: inset 3px 0 0 var(--danger-500);
}

.lesson {
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 8px 10px;
}
.lesson + .lesson { margin-top: 6px; }
.lesson__subject { font-weight: 700; font-size: .85rem; line-height: 1.3; }
.lesson__meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 4px; font-size: .74rem; color: var(--text-muted);
}
.lesson__meta i { margin-inline-end: 3px; opacity: .7; }
.lesson__note { margin-top: 4px; font-size: .72rem; color: var(--text-faint); }

.text-warn { color: var(--warn-500) !important; font-weight: 600; }

/* ---------------------------------------------------------- Yangiliklar */
/* Kartochka `.tile` ustiga quriladi: bir qatordagi to‘rttasi bir xil
   balandlikda tursin — sarlavha ikki, matn uch qatorga cheklanadi va
   sana bilan ko‘rishlar har doim pastki chekkada qoladi. */
.tile--news { display: flex; flex-direction: column; height: 100%; }
.tile--news .tile__body { flex: 1; padding-bottom: 12px; }

/* E’lon kartochkasi: rasm yo‘q, shuning uchun sarlavha tepadan
   boshlanadi va matn uzunroq ko‘rinadi. Chap chekkadagi rangli chiziq
   uni yangilik kartochkasidan bir qarashda ajratib turadi. */
.tile--announcement {
  display: flex; flex-direction: column; height: 100%;
  border-inline-start: 3px solid var(--accent);
}
.tile--announcement .tile__body { flex: 1; padding-top: 20px; padding-bottom: 12px; }
.tile--announcement .tile__meta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 700; margin-bottom: 10px;
}
.tile--announcement .tile__meta i { color: inherit; }
.tile--announcement .tile__text { -webkit-line-clamp: 4; line-clamp: 4; }
/* Rasmli e'lon: rasm tepada, matn esa qisqaroq ko'rinadi — kartochka
   rasmsizlari bilan bir xil balandlikda qolsin. */
.tile--announcement-photo .tile__body { padding-top: 16px; }
.tile--announcement-photo .tile__text { -webkit-line-clamp: 2; line-clamp: 2; }

/* ------------------------------------------------------------ Slayder */
/* Bosh sahifadagi e'lonlar va yangiliklar gorizontal siljiydi. Tugmalar
   ikki yon tomonda, kartochkalar chetiga tegib turadi.

   Tugmalar boshida yashirin (`hidden`): skript ishlamasa ular ishlamas
   tugma bo'lib qolmasin — kartochkalar oddiy ro'yxat bo'lib ko'rinadi.
   Skript ularni o'zi ochadi. */
.slider { position: relative; }

.slider__viewport { overflow: hidden; }
/* Uzluksiz lenta brauzerning o'z surilishida: sensorli ekranda inersiya
   va «yopishish» tekin keladi. Yo'lakcha ko'rinmaydi — surish tugma va
   sichqoncha bilan. */
.slider--strip .slider__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.slider--strip .slider__viewport::-webkit-scrollbar { display: none; }

.slider__track {
  display: flex;
  gap: var(--slider-gap, 24px);
  align-items: stretch;
}
/* Qadamli slayder `transform` bilan siljiydi — surish paytida
   animatsiya o'chadi, aks holda kartochka barmoq ortidan kechikadi. */
.slider__track--stepped { transition: transform .45s cubic-bezier(.22, .61, .36, 1); }
.slider__track--stepped.is-dragging { transition: none; }

.slider__item {
  flex: 0 0 var(--slide-basis, 100%);
  min-width: 0;
  scroll-snap-align: start;
}
.slider__viewport.is-grabbing { cursor: grabbing; }
.slider__viewport { cursor: grab; }
.slider--static .slider__viewport { cursor: auto; }

/* Kartochka slayder ichida to'liq balandlikni egallaydi */
.slider__item > .tile { height: 100%; }

.slider__nav {
  position: absolute; top: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  transform: translateY(-50%);
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--navy-ink);
  box-shadow: var(--shadow); cursor: pointer;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}
.slider__nav:hover:not(:disabled) { background: var(--navy-700); color: #fff; }
.slider__nav:disabled { opacity: .35; cursor: default; }
.slider__nav--prev { inset-inline-start: -22px; }
.slider__nav--next { inset-inline-end: -22px; }

/* Tor ekranda tugmalar chekkadan chiqib ketmasin */
@media (max-width: 1199.98px) {
  .slider__nav--prev { inset-inline-start: -6px; }
  .slider__nav--next { inset-inline-end: -6px; }
}

/* Ko'rinadigan kartochkalar soni. E'lonlarda matn ko'p — uchtadan,
   yangiliklarda rasm bor va ular kichikroq — to'rttadan. Telefonda
   keyingisining chekkasi ko'rinib turadi: surish mumkinligi shundan
   bilinadi. */
.slider--announcements { --slide-basis: calc((100% - 2 * var(--slider-gap, 24px)) / 3); }
.slider--news { --slide-basis: calc((100% - 3 * var(--slider-gap, 24px)) / 4); }

@media (max-width: 991.98px) {
  .slider--announcements,
  .slider--news { --slide-basis: calc((100% - var(--slider-gap, 24px)) / 2); }
}
@media (max-width: 575.98px) {
  .slider--announcements,
  .slider--news { --slide-basis: 86%; --slider-gap: 16px; }
}

.tile__placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--navy-50); color: var(--navy-100); font-size: 2rem;
}

/* Qator soni cheklanadi: uzun sarlavha kartochkani cho‘zib yubormaydi.
   `-webkit-` prefiksi shart — line-clamp barcha brauzerlarda shu nom
   bilan ishlaydi. */
.tile__title--clamp,
.tile__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile__title--clamp { -webkit-line-clamp: 2; line-clamp: 2; }
.tile__text {
  -webkit-line-clamp: 3; line-clamp: 3;
  margin: 0; font-size: .85rem; color: var(--text-muted); line-height: 1.55;
}

.tile__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
}
.tile__footer i { margin-inline-end: 6px; color: var(--accent-ink); }

/* Batafsil sahifadagi yon ustun: kichik rasm + sarlavha */
.news-mini {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
}
.news-mini:hover { border-color: var(--accent); text-decoration: none; }
.news-mini img {
  width: 78px; height: 56px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
}
.news-mini__title {
  display: block; font-weight: 700; font-size: .86rem;
  color: var(--text); line-height: 1.35;
}
.news-mini:hover .news-mini__title { color: var(--accent-ink); }
.news-mini__date { display: block; font-size: .74rem; color: var(--text-muted); margin-top: 4px; }

.news-body { font-size: 1.02rem; line-height: 1.75; }

/* Yangilik/e’lon galereyasi: birinchisi keng, qolganlari ikki ustunda */
.news-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.news-gallery__item {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: #0b1520; aspect-ratio: 4 / 3; width: 100%;
}
.news-gallery__item:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.news-gallery--single .news-gallery__item { aspect-ratio: auto; }
.news-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-gallery--single .news-gallery__item img { height: auto; }
video.news-gallery__item { object-fit: contain; }
.news-gallery__play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.4rem;
}
.news-gallery__caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; color: #fff; font-size: .9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}
.news-gallery__tg { min-height: 220px; }
@media (max-width: 575px) { .news-gallery { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------- Adminkadan kelgan matn */
/* «Litsey haqida» va «Litsey tarixi» sahifalari Word'dan ko'chirilgan
   yoki muharrirda yozilgan HTML dan quriladi. Word o'z o'lchamlarini
   olib keladi va ular saytnikidan katta-kichik bo'ladi, shuning uchun
   sarlavha, jadval va rasmga shu yerda o'z ko'rinishimiz beriladi. */
.rich-text {
  font-size: 1.02rem; line-height: 1.75;
  overflow-wrap: break-word;
  /* Keng jadval sahifani gorizontal cho'zib yubormasin: matn
     bloki o'z ichida suriladi. */
  overflow-x: auto;
}
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text p { margin-bottom: 1rem; }
.rich-text h1, .rich-text h2, .rich-text h3,
.rich-text h4, .rich-text h5, .rich-text h6 {
  margin: 1.8rem 0 .75rem; line-height: 1.3; color: var(--navy-ink);
}
.rich-text h1 { font-size: 1.6rem; }
.rich-text h2 { font-size: 1.4rem; }
.rich-text h3 { font-size: 1.2rem; }
.rich-text h4, .rich-text h5, .rich-text h6 { font-size: 1.06rem; }
.rich-text ul, .rich-text ol { margin: 0 0 1rem 1.25rem; }
.rich-text li { margin-bottom: .35rem; }
.rich-text a { color: var(--accent-ink); text-decoration: underline; }
.rich-text blockquote {
  margin: 1.25rem 0; padding: 12px 18px;
  border-left: 3px solid var(--accent); background: var(--navy-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
/* Rasm o'z o'lchamini saqlaydi, lekin ustundan chiqib ketmaydi. */
.rich-text img {
  max-width: 100%; height: auto;
  border-radius: var(--radius-sm); margin: .5rem 0;
}
.rich-text figure { margin: 1.25rem 0; }
.rich-text figcaption { font-size: .85rem; color: var(--text-muted); margin-top: 6px; }
.rich-text table {
  width: 100%; margin: 1.25rem 0;
  border-collapse: collapse; font-size: .95rem;
}
.rich-text table th, .rich-text table td {
  border: 1px solid var(--border); padding: 8px 12px; vertical-align: top;
}
.rich-text table th { background: var(--navy-50); text-align: left; }

/* ---------------------------------------------- Faxriy o'quvchi */
/* Kartochka tikka: rasm tepada yumaloq, ostida ism va yutuqlar ro'yxati.
   Xodim kartochkasidan farqli — u yerda rasm yonda turadi, chunki u
   ma'lumotnoma; bu yerda esa rasm asosiy va u ko'zga tashlanishi kerak. */
.achiever {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 22px 24px; text-align: center;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .18s ease;
}
.achiever:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.achiever__photo {
  width: 116px; height: 116px; margin-bottom: 16px;
  border-radius: 50%; overflow: hidden;
  background: var(--navy-50);
  border: 3px solid var(--accent-soft);
  display: grid; place-items: center;
}
.achiever__photo img { width: 100%; height: 100%; object-fit: cover; }
.achiever__initials {
  font-size: 2rem; font-weight: 800; color: var(--accent-ink);
}

.achiever__name {
  font-size: 1.05rem; font-weight: 800; color: var(--text); margin: 0 0 4px;
}
/* Ism kartochkani ochadi. Havola ko'rinishi sarlavhanikidek qoladi —
   ko'k tagi chizilgan matn kartochka tuzilishini buzardi. */
.achiever__link { color: inherit; text-decoration: none; cursor: pointer; }
.achiever__link:hover,
.achiever__link:focus-visible { color: var(--accent-ink); text-decoration: underline; }
.achiever__meta {
  font-size: .82rem; color: var(--text-muted); margin: 0 0 14px;
}

/* Yutuqlar ro'yxati chapga tekislanadi: uzun matn markazda o'qilmaydi. */
.achiever__list {
  list-style: none; margin: 0; padding: 0;
  text-align: start; width: 100%;
  display: flex; flex-direction: column; gap: 8px;
}
.achiever__list li {
  display: flex; gap: 9px; align-items: baseline;
  font-size: .88rem; line-height: 1.5; color: var(--text-muted);
}
.achiever__list i { color: var(--accent-ink); font-size: .78rem; flex-shrink: 0; }

/* O'quv yili nishoni: doskadagi natijalar qaysi yilniki ekani
   ko'rinib tursin. Yil almashganda eski uchlik yangi sinov o'tguncha
   qolib turadi va uni joriy natija deb o'ylash mumkin. */
.badge-year {
  display: inline-flex; align-items: center;
  padding: 3px 12px; border-radius: 999px;
  /* Mavzuga moslashadigan ranglar: `navy-50` qorong'i mavzuda fon
     bilan qo'shilib ketardi va yozuv o'qilmasdi. */
  background: var(--surface-alt); color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: .78rem; font-weight: 700;
}

/* Medal — reytingdagi uch o'rin uchun. Rang bilan birga so'z ham
   yoziladi: rangni ajrata olmaydigan odam ham o'rinni ko'rishi kerak.
   Kartochkaning yuqori chekkasidagi chiziq ham shu rangda — ro'yxatga
   bir qarashda kim birinchi ekani bilinadi. */
.achiever__medal {
  position: absolute; top: 14px; inset-inline-start: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 800; color: #4a3610;
  background: var(--medal, var(--navy-50));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.achiever--oltin  { --medal: linear-gradient(135deg, #f7d774, #d9a520); }
.achiever--kumush { --medal: linear-gradient(135deg, #e2e6ea, #a9b3bd); }
.achiever--bronza { --medal: linear-gradient(135deg, #e9b98c, #b9773f); }

.achiever--oltin,
.achiever--kumush,
.achiever--bronza { border-top: 3px solid transparent; }
.achiever--oltin  { border-top-color: #d9a520; }
.achiever--kumush { border-top-color: #a9b3bd; }
.achiever--bronza { border-top-color: #b9773f; }

/* Rasm halqasi ham medal rangida */
.achiever--oltin .achiever__photo  { border-color: #e8c65c; }
.achiever--kumush .achiever__photo { border-color: #c3cad1; }
.achiever--bronza .achiever__photo { border-color: #d09a68; }

/* Ball nishoni burchakda — kartochkani siljitmasin. */
.achiever__score {
  position: absolute; top: 14px; inset-inline-end: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: .8rem; font-weight: 800;
}

/* ------------------------------------------------- Xodim kartochkasi */
/* Rahbariyat va xodimlar sahifalarida ishlatiladi. Rasm yumaloq va
   qat'iy o'lchamda — turli nisbatdagi suratlar ro'yxatni buzmasin;
   rasm bo'lmasa bosh harflar chiqadi. */
.person {
  display: flex; gap: 20px; height: 100%;
  padding: 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
/* Rasm alohida kattalashtirilgan: rahbariyat sahifasida yuz ko'rinib
   turishi kerak, kartochkadagi qolgan hamma narsa esa bir xil nisbatda
   (matnlar ~20 % yirikroq). */
.person__photo { flex-shrink: 0; width: 120px; height: 120px; }
.person__photo img,
.person__initials {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; object-position: top center;
}
.person__initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-100); color: var(--navy-ink);
  font-weight: 800; font-size: 2rem;
}
.person__body { min-width: 0; }
.person__name { font-size: 1.2rem; font-weight: 800; margin: 0 0 3px; color: var(--text); }
.person__position { font-size: 1.02rem; font-weight: 600; color: var(--accent-ink); margin: 0 0 10px; }
.person__bio { font-size: 1rem; color: var(--text-muted); margin: 0 0 10px; line-height: 1.55; }
.person__meta { display: flex; flex-direction: column; gap: 5px; font-size: .96rem; color: var(--text-muted); }
.person__meta i { width: 17px; margin-inline-end: 7px; color: var(--accent-ink); }
.person__meta a { color: var(--text-muted); }
.person__meta a:hover { color: var(--accent-ink); }

/* Tor ekranda rasm biroz kichrayadi — aks holda matnga joy qolmaydi */
@media (max-width: 575.98px) {
  .person { gap: 14px; padding: 16px; }
  .person__photo { width: 88px; height: 88px; }
  .person__photo img,
  .person__initials { width: 88px; height: 88px; }
  .person__initials { font-size: 1.5rem; }
  .person__name { font-size: 1.08rem; }
  .person__position { font-size: .95rem; }
}

/* --------------------------------------------------------- Fan kartochkasi */
/* Fanlar sahifasidagi ro'yxat. Yo'nalish kartochkasidan farqli o'laroq
   rasm yo'q — fanlar ko'p va har biriga surat topib bo'lmaydi, shuning
   uchun belgi va matn. */
.subject {
  display: flex; gap: 14px; align-items: flex-start; height: 100%;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}
.subject:hover {
  border-color: var(--subject-accent, var(--accent));
  transform: translateY(-2px); text-decoration: none;
}
/* Belgi rangi fanning o'zidan keladi (`--subject-accent`): ro'yxatda
   o'ttizga yaqin kartochka turadi va bir xil tusda ular bir-biridan
   ajralmay qoladi. */
.subject__icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px; color: #fff;
  background: var(--subject-accent, var(--accent-ink));
}
.subject__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.subject__name { font-weight: 800; font-size: 1.02rem; color: var(--text); }
.subject:hover .subject__name { color: var(--subject-accent, var(--accent-ink)); }
.subject__hours { font-size: .84rem; color: var(--text-muted); }
.subject__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ------------------------------------------------ Fan sahifasi va materiallar */
/* Fan sahifasining tusi ham o'sha fandan keladi. Informatika uchun bu
   ko'kimtir-yashil, matematika uchun yashil — sahifa qaysi fanniki
   ekani sarlavhani o'qimasdan ham bilinadi. */
.subject-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
}
.subject-head__icon {
  flex: 0 0 auto; width: 60px; height: 60px; border-radius: 18px;
  display: grid; place-items: center; font-size: 1.5rem; color: #fff;
  background: var(--subject-accent, var(--accent));
}

.materials { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--border); }
.materials__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}

/* Kurs almashtirgich: ikkita tugma bitta pill ichida — bu tanlov
   ikkitadan iborat ekani shakldan ko'rinib tursin. */
.course-switch {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 999px;
}
.course-switch__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  font-size: .88rem; font-weight: 700; color: var(--text-muted);
  text-decoration: none; white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
.course-switch__btn:hover { color: var(--text); text-decoration: none; }
.course-switch__btn.is-active {
  background: var(--subject-accent, var(--accent)); color: #fff;
}
.course-switch__count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px;
  padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 16%, transparent);
  font-size: .74rem; font-weight: 800;
}
.course-switch__btn.is-active .course-switch__count {
  background: rgba(255, 255, 255, .24);
}

/* Kirish talab qilinadigan blok — ro'yxat tepasida turadi va nega
   tugmalar yopiqligini tushuntiradi. */
.materials__gate {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px;
  border: 1px solid var(--warn-500); border-radius: var(--radius);
  background: var(--warn-bg); font-size: .9rem;
}
.materials__gate > i { color: var(--warn-500); font-size: 1.1rem; }
.materials__gate > div { flex: 1; min-width: 240px; }

.material-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
/* Kartochka ikki qatorli: tepada belgi va matn, pastda tugmalar.
   Tugmalarni yon tomonga qo'yib ko'rilgandi — tor ekranda mavzu nomi
   har harfda bitta qatorga tushib ketardi. */
.material-card {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
  padding: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  border-inline-start: 3px solid var(--subject-accent, var(--accent));
}
.material-card__badge {
  flex: 0 0 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.2rem;
  background: var(--surface-alt); color: var(--text-muted);
}
.material-card__badge[data-ext="pptx"],
.material-card__badge[data-ext="ppt"] { background: #fdece7; color: #c2410c; }
.material-card__badge[data-ext="pdf"] { background: #fcecea; color: #b4291b; }
.material-card__badge[data-ext="docx"],
.material-card__badge[data-ext="doc"] { background: #e7f2f7; color: #10627f; }
.material-card__body { flex: 1 1 180px; min-width: 0; }
.material-card__title {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0 0 4px; font-size: 1rem; font-weight: 800; line-height: 1.4;
}
.material-card__number {
  flex: 0 0 auto; font-size: .78rem; font-weight: 800;
  color: var(--subject-accent, var(--accent));
}
.material-card__sub {
  margin: 0 0 8px; font-size: .86rem; color: var(--text-muted); line-height: 1.5;
}
.material-card__meta {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: .78rem; color: var(--text-muted);
}
.material-card__actions {
  flex: 1 0 100%; display: flex; align-items: center; gap: 8px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.material-card__locked {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; color: var(--text-faint);
}

@media (max-width: 575.98px) {
  .materials__head { align-items: flex-start; }
  .course-switch { width: 100%; }
  .course-switch__btn { flex: 1; justify-content: center; }
}

/* Virtual laboratoriya kartasi — fan sahifasida, materiallardan oldin */
.lab-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  border-inline-start: 4px solid var(--subject-accent, var(--accent));
  box-shadow: var(--shadow-sm);
}
.lab-card + .lab-card { margin-top: 14px; }
/* 2-kurs amaliy darslari — binafsha urg‘u, 1-kursdan ajralib tursin */
.lab-card--k2 { border-inline-start-color: #7c3aed; }
.lab-card--k2 .lab-card__icon { background: linear-gradient(135deg, #7c3aed, #db2777); }
.lab-card__icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.6rem; color: #fff; background: var(--subject-accent, var(--accent));
}
.lab-card__title { font-size: 1.15rem; font-weight: 800; margin: 0 0 6px; }
.lab-card__body p { margin: 0 0 10px; color: var(--text-muted); }
.lab-card__topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lab-card__topics li {
  font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text-muted);
}
@media (max-width: 767.98px) {
  .lab-card { grid-template-columns: auto 1fr; }
  .lab-card .btn { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------- Hamkorlar */
/* Ikki qatorli lenta. Har bir qatorning ichida ro'yxat ikki nusxada
   turadi, animatsiya esa aynan yarmiga (-50 %) siljiydi — shu payt
   ikkinchi nusxa birinchisining o'rnida bo'ladi va qaytish ko'rinmaydi. */
.marquee { display: flex; flex-direction: column; gap: 16px; }
/* Qator gorizontal bo'yicha qirqiladi — lenta chetdan chiqmasligi kerak.
   `overflow` esa ikkala o'q bo'yicha ishlaydi, shuning uchun ko'tarilgan
   kartochkaning yuqori chizig'i va soyasi ham qirqilardi. Ichkariga
   bo'sh joy qo'shiladi va u salbiy chekka bilan qaytariladi: qirqish
   ramkasi kengayadi, kartochkalar orasidagi masofa esa o'zgarmaydi. */
.marquee__row {
  overflow: hidden;
  padding-block: 12px;
  margin-block: -12px;
}
.marquee__track {
  display: flex; gap: 16px; width: max-content;
  animation: marquee-left 60s linear infinite;
}
.marquee__track--reverse { animation-name: marquee-right; }

@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Logotipni o'qish uchun to'xtatish */
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

.partner {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 210px; height: 108px; padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
/* Sichqoncha ustiga kelganda lenta to'xtaydi (`.marquee:hover`), kartochka
   esa biroz ko'tariladi — qaysi logotip ustida turgani ko'rinib tursin. */
.partner:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
/* Logotiplar biroz so'nik turadi — lenta bir butun ko'rinsin. To'liq
   kulrang qilinmaydi: och rangli emblemalar shunda umuman yo'qoladi. */
.partner img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  filter: grayscale(.55); opacity: .88;
  transition: filter .2s ease, opacity .2s ease;
}
.partner:hover img { filter: none; opacity: 1; }

/* Harakat cheklangan bo'lsa lenta oddiy to'rga aylanadi va
   nusxalangan yarmi umuman chizilmaydi. */
@media (prefers-reduced-motion: reduce) {
  .marquee { padding-inline: 16px; }
  .marquee__row { overflow: visible; }
  .marquee__track {
    animation: none; width: auto;
    flex-wrap: wrap; justify-content: center;
  }
  .partner--copy { display: none; }
}

@media (max-width: 575.98px) {
  .partner { width: 158px; height: 88px; padding: 12px 14px; }
}

/* ------------------------------------------------------------- Nashrlar */
/* Quyuq keng panel: chapda umumiy son, yonida turlar bo'yicha taqsimot.
   Raqamlar `data-count` bilan sanaladi — ko'rsatkichlar bloki bilan bir
   xil qoida. */
.figures {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 26px 32px;
  background: var(--navy-700); color: #fff;
  border-radius: var(--radius-lg);
}
.figures__lead {
  padding-inline-end: 28px;
  border-inline-end: 1px solid rgba(255, 255, 255, .18);
}
.figures__label {
  display: block; margin-bottom: 6px;
  font-size: .8rem; font-weight: 700; letter-spacing: .01em;
  color: var(--accent-on-dark-sm);
}
.figures__total { display: block; font-size: 2.9rem; font-weight: 800; line-height: 1; }
.figures__list { display: flex; flex: 1; gap: 36px; flex-wrap: wrap; }
.figures__value { display: block; font-size: 1.55rem; font-weight: 800; line-height: 1; }
.figures__icon {
  margin-inline-start: auto; font-size: 3.2rem;
  color: rgba(255, 255, 255, .16);
}

@media (max-width: 767.98px) {
  .figures { padding: 22px; gap: 20px; }
  .figures__lead {
    padding-inline-end: 0; padding-bottom: 18px;
    border-inline-end: none; border-bottom: 1px solid rgba(255, 255, 255, .18);
    width: 100%;
  }
  .figures__total { font-size: 2.4rem; }
  .figures__list { gap: 22px 28px; }
  .figures__icon { display: none; }
}

/* ------------------------------------------------- Suriganda paydo bo'lish */
/* Element ekranga kirganda pastdan yumshoq ko'tarilib chiqadi.
   Yashirish faqat `reveal-ready` sinfi bilan ishlaydi — uni JS qo'yadi.
   Shunda JS ishlamasa (yoki xato bersa) hamma narsa o'z joyida ko'rinib
   turaveradi va sayt bo'sh qolmaydi. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.22, .61, .36, 1),
              transform .55s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
  /* Animatsiya tugagach `will-change` olib tashlanadi: brauzer
     qatlamni bekorga xotirada saqlab turmasin */
  will-change: auto;
}

/* Harakat cheklangan bo'lsa hech narsa yashirilmaydi */
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------ Rol tanlash */
/* Ro'yxatdan o'tishda rol tugmacha ko'rinishida tanlanadi: oddiy
   radio tugmalar qatori tor ekranda chalkash bo'lib ketadi. */
.role-choice {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--border-firm);
  font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.role-choice:hover { border-color: var(--accent); }
.role-choice input { accent-color: var(--accent); }
.role-choice:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ------------------------------------------- Sertifikatga tayyorlash */
/* Bo'lim uch qavatli: fan tanlash → mavzular → dars va test. Har fanning
   o'z rangi bor va u adminkadan keladi (`--prep-accent`); shu o'zgaruvchi
   sahifa bo'ylab pastga uzatiladi, shuning uchun quyidagi barcha
   elementlar rangni o'zi so'ramaydi — meros oladi. */

/* Fan kartochkalari: bo'limning kirish sahifasi, boshqa hech narsa
   yo'q. Shuning uchun ular yirik va vertikal. */
.prep-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.prep-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 26px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--prep-accent, var(--accent));
  border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.prep-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: var(--prep-accent, var(--accent));
  border-top-color: var(--prep-accent, var(--accent));
  text-decoration: none; color: var(--text);
}
.prep-card__icon {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 10px;
  display: grid; place-items: center; font-size: 1.35rem; color: #fff;
  background: var(--prep-accent, var(--accent));
}
.prep-card__name { font-weight: 800; font-size: 1.18rem; }
.prep-card__sub { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }
.prep-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .82rem; font-weight: 700;
}
.prep-card__count { color: var(--text-muted); }
.prep-card__count i { margin-inline-end: 6px; }
.prep-card__go { color: var(--prep-accent, var(--accent)); white-space: nowrap; }
.prep-card__go i { margin-inline-start: 6px; transition: transform .16s ease; }
.prep-card:hover .prep-card__go i { transform: translateX(3px); }

/* Fan sahifasi: chapda fanlar ustuni, o'ngda mavzular. Ustun tor
   ekranda tepaga chiqadi va gorizontal lentaga aylanadi. */
.prep-layout { display: grid; gap: 24px; grid-template-columns: 240px 1fr; }
.prep-side__title {
  font-size: .74rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px;
}
.prep-side__list { display: grid; gap: 6px; position: sticky; top: 90px; }
.prep-side__link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .9rem;
}
.prep-side__link i { color: var(--prep-accent, var(--accent)); width: 18px; text-align: center; }
.prep-side__link:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }
.prep-side__link.is-active {
  background: var(--surface); border-color: var(--prep-accent, var(--accent));
  color: var(--prep-accent, var(--accent));
}
.prep-main { min-width: 0; }

@media (max-width: 991.98px) {
  .prep-layout { grid-template-columns: 1fr; }
  .prep-side__list {
    position: static; grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; padding-bottom: 4px;
  }
}

/* Mavzu kartochkalari — akademik ro'yxatdan ko'ra plitka: o'quvchi
   qaysi mavzuni yechganini bir qarashda ko'radi. */
.topic-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.topic-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.topic-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow);
  border-color: var(--prep-accent, var(--accent));
  color: var(--text); text-decoration: none;
}
.topic-card__number {
  width: 30px; height: 30px; border-radius: 9px; margin-bottom: 4px;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: color-mix(in srgb, var(--prep-accent, var(--accent)) 14%, transparent);
  color: var(--prep-accent, var(--accent));
}
.topic-card__title { font-weight: 800; font-size: .98rem; line-height: 1.4; }
.topic-card__sub { font-size: .84rem; color: var(--text-muted); line-height: 1.5; }
.topic-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 700;
  background: var(--navy-50); color: var(--navy-ink);
}
.chip--muted { background: var(--surface-alt); color: var(--text-faint); }
.chip--score { background: var(--ok-bg); color: var(--ok-500); }

/* Dars sahifasi */
.video-frame {
  position: relative; padding-top: 56.25%; border-radius: var(--radius);
  overflow: hidden; background: var(--navy-900);
}
.video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.topic-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

.attempt-list { display: grid; gap: 8px; }
.attempt-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none;
}
.attempt-row:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.attempt-row__score {
  flex: 0 0 52px; text-align: center; font-weight: 800; font-size: .95rem;
  color: var(--danger-500);
}
.attempt-row.is-passed .attempt-row__score { color: var(--ok-500); }
.attempt-row__count { display: block; font-weight: 700; font-size: .85rem; }
.attempt-row__date { display: block; font-size: .76rem; color: var(--text-muted); }

/* Test: savol kartochkalari va variantlar.
   Variant harflari (A, B, C…) CSS hisoblagichidan — shablonda
   qo'lda yozilsa, savol o'chirilganda tartib buzilardi. */
.test-form { display: grid; gap: 16px; }
.test-question { margin: 0; }
.test-question__head { display: flex; gap: 12px; align-items: flex-start; }
.test-question__number {
  flex: 0 0 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: var(--navy-50); color: var(--navy-ink);
}
.test-question__text { margin: 4px 0 0; font-weight: 700; line-height: 1.55; }
.test-question__image {
  display: block; max-width: 100%; margin: 14px 0 0 44px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.test-question__note {
  display: flex; gap: 8px; align-items: baseline;
  margin: 12px 0 0 44px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--surface-alt);
  font-size: .86rem; color: var(--text-muted);
}
.test-question.is-correct { border-inline-start: 3px solid var(--ok-500); }
.test-question.is-wrong { border-inline-start: 3px solid var(--danger-500); }
.test-question.is-correct .test-question__number { background: var(--ok-bg); color: var(--ok-500); }
.test-question.is-wrong .test-question__number { background: var(--danger-bg); color: var(--danger-500); }

.test-choices { counter-reset: choice; display: grid; gap: 8px; margin: 14px 0 0 44px; }
.test-choice {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: .92rem;
  transition: border-color .15s ease, background .15s ease;
}
.test-choice::before {
  counter-increment: choice; content: counter(choice, upper-alpha);
  flex: 0 0 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-alt); color: var(--text-muted);
  font-size: .78rem; font-weight: 800;
}
.test-choice input { position: absolute; opacity: 0; pointer-events: none; }
.test-choice:hover { border-color: var(--accent); }
.test-choice:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
}
.test-choice:has(input:checked)::before { background: var(--accent); color: #fff; }
.test-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.test-choice__text { flex: 1; }
.test-choice__tag {
  font-size: .72rem; font-weight: 800; text-transform: lowercase;
  color: var(--text-muted); white-space: nowrap;
}

/* Ochiq savol: variant yo'q, javob yozib beriladi. Maydon kartochka
   ichida turadi, shuning uchun chegarasi variantlarnikiga o'xshaydi —
   ikki xil savol bir xil ritmda ko'rinsin. */
.test-open { margin: 14px 0 0 44px; }
.test-open__label {
  display: block; margin-bottom: 6px;
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
}
.test-open__input {
  width: 100%; max-width: 420px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-firm); background: var(--surface);
  color: var(--text); font-family: inherit; font-size: .95rem;
}
.test-open__input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Natijadagi yozma javob: yuqorida o'quvchi yozgani, ostida to'g'risi */
.test-written { display: grid; gap: 8px; margin: 14px 0 0 44px; max-width: 520px; }
.test-written__row {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
}
.test-written__label {
  flex: 0 0 auto; font-size: .74rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
}
.test-written__value { font-weight: 700; }
.test-written__row.is-answer { border-color: var(--ok-500); background: var(--ok-bg); }
.test-written__row.is-answer .test-written__label { color: var(--ok-500); }
.test-written__row.is-chosen { border-color: var(--danger-500); background: var(--danger-bg); }
.test-written__row.is-chosen .test-written__label { color: var(--danger-500); }

.test-choice.is-static { cursor: default; }
.test-choice.is-answer {
  border-color: var(--ok-500); background: var(--ok-bg);
}
.test-choice.is-answer::before { background: var(--ok-500); color: #fff; }
.test-choice.is-answer .test-choice__tag { color: var(--ok-500); }
.test-choice.is-chosen {
  border-color: var(--danger-500); background: var(--danger-bg);
}
.test-choice.is-chosen::before { background: var(--danger-500); color: #fff; }
.test-choice.is-chosen .test-choice__tag { color: var(--danger-500); }

.test-actions {
  display: flex; justify-content: space-between; gap: 12px;
  position: sticky; bottom: 0; z-index: 2;
  padding: 14px 0; background: var(--bg);
  border-top: 1px solid var(--border);
}

/* Natija sarlavhasi */
.result-head {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; margin-bottom: 28px;
  border-radius: var(--radius); border: 1px solid var(--border);
  border-inline-start: 4px solid var(--danger-500);
  background: var(--surface);
}
.result-head.is-passed { border-inline-start-color: var(--ok-500); }
.result-head__score {
  flex: 0 0 auto; font-size: 2.6rem; font-weight: 800; line-height: 1;
  color: var(--danger-500);
}
.result-head.is-passed .result-head__score { color: var(--ok-500); }
.result-head__score small { font-size: 1.1rem; font-weight: 700; }
.result-head__actions { margin-inline-start: auto; display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 575.98px) {
  .test-choices, .test-question__image, .test-question__note,
  .test-open, .test-written { margin-inline-start: 0; }
  .result-head__actions { margin-inline-start: 0; width: 100%; }
}

/* Materiallar — bosiladigan qatorlar */
.prep-materials { display: grid; gap: 8px; }
.prep-material {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: .88rem;
}
.prep-material:hover {
  border-color: var(--accent); color: var(--accent-ink); text-decoration: none;
}
.prep-material__icon {
  flex: 0 0 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: .78rem;
  background: var(--accent-soft); color: var(--accent-ink);
}
.prep-material__title { display: block; font-weight: 700; }
.prep-material__note { display: block; font-size: .78rem; color: var(--text-muted); }

/* -------------------------------------------------- Litsey haqida */
/* Jonli sonlar — sahifa boshidagi katta plitkalar. Ular bazadan
   keladi, shuning uchun boshqa raqamlardan ajralib turishi kerak. */
.figure-tile {
  height: 100%; padding: 22px 18px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.figure-tile__icon {
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 6px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
}
.figure-tile__value {
  font-size: 2rem; font-weight: 900; line-height: 1; color: var(--navy-ink);
}
.figure-tile__label { font-size: .82rem; color: var(--text-muted); font-weight: 600; }

/* Raqamlar to'ri: xonalar, kutubxona, masofalar */
.fact-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.fact {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
}
.fact__icon {
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 8px;
  display: grid; place-items: center; font-size: .82rem;
  background: var(--navy-50); color: var(--navy-ink);
}
.fact__value { font-size: 1.35rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.fact__label { font-size: .84rem; color: var(--text-muted); font-weight: 600; }
.fact__note { font-size: .76rem; color: var(--text-faint, var(--text-muted)); }

/* Tarix — yillar chap ustunda, chiziq bilan bog'langan. Muassasa nomi
   to'rt marta o'zgargan, oddiy matnda buni o'qish qiyin. */
.history { list-style: none; margin: 0 0 12px; padding: 0; }
.history__item { position: relative; display: flex; gap: 20px; padding-bottom: 24px; }
.history__item:not(:last-child)::before {
  content: ""; position: absolute; inset-inline-start: 39px; top: 34px; bottom: 0;
  width: 2px; background: var(--border);
}
.history__year {
  flex: 0 0 80px; height: 34px; border-radius: 999px; z-index: 1;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 800; font-size: .86rem;
}
.history__title { font-size: 1rem; font-weight: 800; margin: 4px 0 4px; }
.history__note { font-size: .9rem; color: var(--text-muted); margin: 0; line-height: 1.6; }

/* Yo'nalish kartochkasi — bosiladigan, o'z sahifasiga olib boradi */
.about-direction {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.about-direction:hover {
  transform: translateY(-2px); box-shadow: var(--shadow);
  border-color: var(--accent); color: var(--text); text-decoration: none;
}
.about-direction__name { font-weight: 800; font-size: 1rem; }
.about-direction__note { font-size: .85rem; color: var(--text-muted); flex: 1; }
.about-direction__more {
  font-size: .8rem; font-weight: 700; color: var(--accent-ink); margin-top: 4px;
}

/* --------------------------------------------------- Litsey tarixi */
/* Qopqoq: quyuq fon va katta yil — sahifa nima haqda ekani birinchi
   ekranda ayon bo'lsin. */
.history-hero {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900, #0a2a43));
  color: #fff; padding: 34px 0 44px; margin-bottom: 44px;
}
.history-hero__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.history-hero__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 900;
  margin: 0 0 10px; color: #fff;
}
.history-hero__title em { color: var(--accent); font-style: normal; }
.history-hero__text {
  margin: 0; max-width: 54ch; color: rgba(255, 255, 255, .82); line-height: 1.7;
}
.history-hero__badge {
  flex: 0 0 auto; text-align: center;
  padding: 18px 26px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
}
.history-hero__year {
  display: block; font-size: 2.6rem; font-weight: 900; line-height: 1;
  color: var(--accent);
}
.history-hero__since {
  display: block; font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255, 255, 255, .7); margin-top: 6px;
}
.breadcrumb--light,
.breadcrumb--light a { color: rgba(255, 255, 255, .75); }
.breadcrumb--light .active { color: #fff; }
.eyebrow--light { color: var(--accent); }

/* Yo'l: bosqichlar navbatma-navbat ikki tomonda, o'rtada tik chiziq.
   Ro'yxatdan ko'ra yo'lga o'xshaydi — tarix shunday o'qiladi. */
.road { list-style: none; margin: 0 0 48px; padding: 0; position: relative; }
.road::before {
  content: ""; position: absolute; left: 50%; top: 8px; bottom: 8px;
  width: 2px; margin-left: -1px; background: var(--border);
}
.road__item {
  position: relative; width: 50%; padding: 0 44px 34px 0;
  box-sizing: border-box;
}
.road__item:nth-child(even) { margin-left: 50%; padding: 0 0 34px 44px; }

.road__year {
  position: absolute; top: 0; right: -34px; z-index: 1;
  display: grid; place-items: center;
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 900; font-size: .95rem;
  box-shadow: 0 0 0 6px var(--bg);
}
.road__item:nth-child(even) .road__year { right: auto; left: -34px; }

.road__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.road__card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.road__photo {
  width: 100%; border-radius: var(--radius-sm); margin-bottom: 14px;
  aspect-ratio: 16 / 9; object-fit: cover;
}
.road__title { font-size: 1.05rem; font-weight: 800; margin: 0 0 8px; }
.road__text { margin: 0; font-size: .9rem; color: var(--text-muted); line-height: 1.65; }

/* Telefonda ikki tomonlama joylashuv o'qishni qiyinlashtiradi —
   yo'l bitta ustunga tushadi, chiziq chapga suriladi. */
@media (max-width: 767.98px) {
  .road::before { left: 26px; }
  .road__item,
  .road__item:nth-child(even) {
    width: 100%; margin-left: 0; padding: 0 0 28px 68px;
  }
  .road__year,
  .road__item:nth-child(even) .road__year {
    left: 0; right: auto; width: 52px; height: 52px; font-size: .82rem;
  }
}

.today {
  padding: 28px; border-radius: var(--radius);
  background: var(--bg-alt); border: 1px solid var(--border);
}

/* ------------------------------------------------------------------
   Sertifikatga tayyorlash: yo‘l xaritasi, moslashtirish, taymer
   ------------------------------------------------------------------ */
.test-question__body { flex: 1; min-width: 0; }
.test-question__topic {
  display: inline-block; margin-top: 2px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--prep-accent, var(--accent-ink));
}
.chip--wrong { background: var(--danger-bg); color: var(--danger-500); }

/* Moslashtirish savoli: harflangan variantlar va har qator uchun tanlov */
.test-match { margin: 14px 0 0 44px; display: grid; gap: 12px; }
.test-match__options {
  list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 6px;
  border-radius: var(--radius-sm); background: var(--surface-alt); border: 1px solid var(--border);
  font-size: .92rem;
}
.test-match__letter {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-inline-end: 6px;
  border-radius: 7px; background: var(--navy-50); color: var(--navy-ink); font-weight: 800; font-size: .8rem;
}
.test-match__rows { display: grid; gap: 8px; }
.test-match__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
.test-match__row.is-static { cursor: default; }
.test-match__row.is-correct { border-color: var(--ok-500); }
.test-match__row.is-wrong { border-color: var(--danger-500); }
.test-match__left { flex: 1; min-width: 0; }
.test-match__select {
  flex: 0 0 auto; min-width: 76px; padding: 6px 10px; font-weight: 700;
  border: 1px solid var(--border-firm); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.test-match__select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.test-match__result { display: inline-flex; align-items: center; gap: 6px; }
.test-kinds { margin: 0 0 14px; padding-inline-start: 18px; display: grid; gap: 2px; }

/* Taymer */
.test-timer {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  background: var(--navy-50); color: var(--navy-ink);
  position: sticky; top: 90px; z-index: 3;
}
.test-timer.is-low { background: var(--danger-bg); color: var(--danger-500); }

/* Keyingi qadam */
.next-step {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
  padding: 18px 20px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--prep-accent, var(--accent)) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--prep-accent, var(--accent)) 35%, var(--border));
  color: var(--text); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.next-step:hover { color: var(--text); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.next-step__icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.2rem; background: var(--prep-accent, var(--accent)); color: #fff;
}
.next-step__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.next-step__label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.next-step__title { font-weight: 800; font-size: 1.05rem; }
.next-step__text { font-size: .88rem; color: var(--text-muted); }
.next-step__go { color: var(--prep-accent, var(--accent)); transition: transform .16s ease; }
.next-step:hover .next-step__go { transform: translateX(3px); }

/* O‘sish qatori */
.road-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.road-stats__bar { flex: 1 1 260px; }
.road-stats__label { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 6px; }
.road-stats__item { display: grid; text-align: center; color: var(--text); }
.road-stats__item strong { font-size: 1.25rem; line-height: 1.1; }
.road-stats__item span { font-size: .74rem; color: var(--text-muted); }
.road-stats__item--link:hover { text-decoration: none; color: var(--accent-ink); }
.progress-line { height: 8px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; border: 1px solid var(--border); }
.progress-line span { display: block; height: 100%; background: var(--prep-accent, var(--accent)); border-radius: inherit; transition: width .4s ease; }
.prep-about summary { cursor: pointer; list-style: none; }
.prep-about summary::-webkit-details-marker { display: none; }

/* Yo‘l xaritasi: bo‘limlar va mavzular */
.road { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.road-unit {
  position: relative; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.road-unit__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.road-unit__number {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; background: var(--prep-accent, var(--accent)); color: #fff;
}
.road-unit--locked .road-unit__number { background: var(--surface-alt); color: var(--text-faint); }
.road-unit__title { font-size: 1.05rem; font-weight: 800; margin: 0; }
.road-unit__sub { margin: 2px 0 0; font-size: .84rem; color: var(--text-muted); }
.road-unit__count { margin-inline-start: auto; font-size: .82rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.road-topics { display: grid; gap: 8px; }
.road-topic, .road-check {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; background: var(--surface);
}
a.road-topic:hover { border-color: var(--prep-accent, var(--accent)); color: var(--text); text-decoration: none; }
.road-topic__mark {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: .8rem; font-weight: 800;
  background: color-mix(in srgb, var(--prep-accent, var(--accent)) 14%, transparent);
  color: var(--prep-accent, var(--accent));
}
.road-topic__body { flex: 1; min-width: 0; display: grid; }
.road-topic__title { font-weight: 700; font-size: .93rem; }
.road-topic__sub { font-size: .8rem; color: var(--text-muted); }
.road-topic__meta { flex: 0 0 auto; }
.road-topic--passed .road-topic__mark, .road-check--passed .road-topic__mark { background: var(--ok-bg); color: var(--ok-500); }
.road-topic--mastered .road-topic__mark { background: var(--ok-500); color: #fff; }
.road-topic--locked { background: var(--surface-alt); }
.road-topic--locked .road-topic__mark, .road-check--locked .road-topic__mark { background: var(--surface-alt); color: var(--text-faint); border: 1px dashed var(--border-firm); }
.road-topic--locked .road-topic__title { color: var(--text-muted); }
.road-check { border-style: dashed; background: var(--surface-alt); }
.road-check--open { border-style: solid; border-color: var(--prep-accent, var(--accent)); background: var(--surface); }
.road-exam {
  display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 18px 20px;
  border-radius: var(--radius); border: 1px dashed var(--border-firm); background: var(--surface-alt);
}
.road-exam.is-ready { border-style: solid; border-color: var(--ok-500); background: var(--ok-bg); }
.road-exam__icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.3rem; background: var(--surface); color: var(--text-faint);
}
.road-exam.is-ready .road-exam__icon { background: var(--ok-500); color: #fff; }
.road-exam__body { flex: 1; min-width: 0; }
.road-exam__title { font-size: 1.02rem; font-weight: 800; margin: 0 0 2px; }
.lock-note {
  display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-500); font-size: .85rem;
}
@media (max-width: 575.98px) {
  .test-match { margin-inline-start: 0; }
  .road-unit { padding: 14px; }
  .road-topic__sub { display: none; }
  .next-step { align-items: flex-start; }
}

/* ------------------------------------------------------------------
   Sertifikat imtihonlari (apps/exams)
   ------------------------------------------------------------------ */
.exam-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.exam-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.exam-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--prep-accent); color: var(--text); text-decoration: none; }
.exam-card.is-locked { background: var(--surface-alt); }
.exam-card__icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem;
  background: color-mix(in srgb, var(--prep-accent) 14%, transparent); color: var(--prep-accent);
}
.exam-card__title { font-weight: 800; font-size: 1.02rem; }
.exam-card__sub { font-size: .84rem; color: var(--text-muted); }
.exam-card__foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }

.exam-structure { margin: 0 0 14px; padding-inline-start: 20px; display: grid; gap: 10px; }
.exam-structure li { padding-inline-start: 4px; }
.exam-structure__title { font-weight: 700; margin-inline-end: 8px; }
.exam-structure__sub { display: block; font-size: .84rem; color: var(--text-muted); }
.grade-scale { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.exam-rules { padding-inline-start: 18px; display: grid; gap: 4px; }

/* Yechish sahifasi */
.exam-bar {
  position: sticky; top: 0; z-index: 20; background: var(--surface);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.exam-bar__inner { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.exam-bar__title { flex: 1; min-width: 0; display: grid; }
.exam-bar__exam { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-bar__section { font-size: .82rem; color: var(--text-muted); }
.exam-bar__save { font-size: .78rem; color: var(--text-faint); }
.exam-bar__save[data-kind="error"] { color: var(--danger-500); }
.exam-bar__save[data-kind="ok"] { color: var(--ok-500); }
.exam-timer {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums;
  background: var(--navy-50); color: var(--navy-ink);
}
.exam-timer.is-low { background: var(--warn-bg); color: var(--warn-500); }
.exam-timer.is-critical { background: var(--danger-bg); color: var(--danger-500); }

.exam-form { display: grid; gap: 22px; }
.exam-instructions {
  display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--info-bg); color: var(--info-500); font-size: .9rem;
}
.exam-part { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.exam-part__head { margin-bottom: 14px; }
.exam-part__title { font-size: 1.08rem; font-weight: 800; margin: 0 0 4px; }
.exam-part__instructions { margin: 0; font-size: .88rem; color: var(--text-muted); }
.exam-part__body { display: grid; gap: 18px; }
@media (min-width: 992px) {
  .exam-part--reading .exam-part__body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .exam-part--reading .exam-passage { position: sticky; top: 80px; max-height: calc(100vh - 110px); overflow: auto; }
}
.exam-passage {
  padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-alt);
  border: 1px solid var(--border); line-height: 1.7; font-size: .95rem;
}
.exam-passage table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.exam-passage th, .exam-passage td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.exam-passage th { background: var(--navy-50); color: var(--navy-ink); }
.exam-map td { text-align: center !important; font-weight: 700; height: 52px; width: 25%; }
.exam-pictures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.exam-pictures figure { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.exam-pictures figcaption { margin-top: 6px; }
.exam-notice, .exam-discussion > p { padding: 10px 14px; border-left: 3px solid var(--navy-ink); background: var(--surface); margin-bottom: 8px; }
.exam-items { display: grid; gap: 14px; }
.exam-item { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.exam-item:last-child { border-bottom: 0; }
.exam-item__head { display: flex; gap: 10px; align-items: flex-start; }
.exam-item__label {
  flex: 0 0 auto; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 800; font-size: .82rem;
  background: var(--navy-50); color: var(--navy-ink);
}
.exam-item__prompt { flex: 1; min-width: 0; font-weight: 600; line-height: 1.55; padding-top: 3px; }
.exam-item__input, .exam-item__choices, .exam-item__match, .exam-letters, .exam-writing, .recorder { margin: 10px 0 0 44px; }
.exam-item__input { max-width: 420px; }
.exam-letters { display: flex; flex-wrap: wrap; gap: 8px; }
.exam-letter {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.exam-letters:has(.exam-letter__text) { display: grid; }
.exam-letter input { position: absolute; opacity: 0; pointer-events: none; }
.exam-letter__key {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-weight: 800;
  background: var(--surface-alt); color: var(--text-muted);
}
.exam-letter:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.exam-letter:has(input:checked) .exam-letter__key { background: var(--accent); color: #fff; }
.exam-letter:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.exam-writing {
  display: block; width: calc(100% - 44px); padding: 12px 14px; font: inherit; line-height: 1.6;
  border: 1px solid var(--border-firm); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
label .exam-writing, .rubric-grid + label .exam-writing { width: 100%; margin: 6px 0 0; }
.exam-writing:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.exam-writing__meta { margin: 6px 0 0 44px; font-size: .82rem; color: var(--text-muted); }
.exam-writing__meta.is-short strong, .exam-writing__meta span.is-short strong { color: var(--danger-500); }

.listen-player {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px;
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--navy-50);
}
.listen-player__left { font-size: .88rem; }
.listen-player__note { width: 100%; margin: 0; font-size: .82rem; color: var(--danger-500); }
.listen-player__wave { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; opacity: 0; }
.listen-player__wave i { width: 3px; height: 6px; background: var(--accent); border-radius: 2px; }
.listen-player.is-playing .listen-player__wave { opacity: 1; }
.listen-player.is-playing .listen-player__wave i { animation: wave .9s ease-in-out infinite; }
.listen-player.is-playing .listen-player__wave i:nth-child(2) { animation-delay: .15s; }
.listen-player.is-playing .listen-player__wave i:nth-child(3) { animation-delay: .3s; }
.listen-player.is-playing .listen-player__wave i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 18px; } }
@media (prefers-reduced-motion: reduce) { .listen-player.is-playing .listen-player__wave i { animation: none; height: 12px; } }

.recorder {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1px dashed var(--border-firm);
}
.recorder.is-recording { border-style: solid; border-color: var(--danger-500); background: var(--danger-bg); }
.recorder.is-done { border-style: solid; border-color: var(--ok-500); }
.recorder__state { font-size: .88rem; }
.recorder__clock { font-weight: 800; font-variant-numeric: tabular-nums; }
.recorder audio { width: 100%; max-width: 360px; }

.exam-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  position: sticky; bottom: 0; z-index: 5; padding: 14px 0; background: var(--bg); border-top: 1px solid var(--border);
}

/* Natija */
.exam-result {
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-bottom: 20px; padding: 22px 24px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  border-inline-start: 4px solid var(--danger-500);
}
.exam-result.is-good { border-inline-start-color: var(--ok-500); }
.exam-result__score { display: grid; text-align: center; min-width: 110px; }
.exam-result__level { font-size: 2.3rem; font-weight: 800; line-height: 1.05; color: var(--prep-accent); }
.exam-result__points { font-size: .9rem; color: var(--text-muted); font-weight: 700; }
.exam-result__body { flex: 1 1 320px; min-width: 0; }
.exam-result__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.exam-skills { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 20px; }
.exam-skill { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.exam-skill__title { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.exam-skill__score { font-size: 1.6rem; line-height: 1.1; }
.exam-skill__sub { font-size: .8rem; color: var(--text-muted); }
.unit-bars { display: grid; gap: 14px; }
.unit-bar__head { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; margin-bottom: 6px; }
.unit-bar__topics { margin: 6px 0 0; font-size: .82rem; color: var(--text-muted); }
.exam-review summary, .exam-transcript summary, .exam-model summary { cursor: pointer; }
.exam-review > summary { list-style: none; }
.exam-transcript { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-alt); font-size: .9rem; }
.exam-transcript p { margin: 6px 0 0; }
.exam-essay { margin: 12px 0 0 44px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-alt); white-space: normal; }
.exam-grade { margin: 12px 0 0 44px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ok-bg); }
.exam-grade__rubric { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-inline-start: 8px; }
.exam-model { margin: 12px 0 0 44px; font-size: .9rem; }
.rubric-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 14px; }
.rubric-grid__item { display: grid; gap: 4px; font-size: .84rem; }
.rubric-grid__item small { color: var(--text-faint); }
@media (max-width: 575.98px) {
  .exam-item__input, .exam-item__choices, .exam-item__match, .exam-letters, .recorder,
  .exam-writing__meta, .exam-essay, .exam-grade, .exam-model { margin-inline-start: 0; }
  .exam-writing { width: 100%; margin-inline-start: 0; }
  .exam-bar__save { display: none; }
  .exam-part { padding: 14px; }
}
.road-exam__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.road-exam__list .chip { text-decoration: none; }

/* ---------------------------------------------------------- Telegram tasdiq */
.tg-badge {
  width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 1.9rem; color: #fff; background: #229ed9;
}
.tg-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tg-step {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.tg-step__num {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .85rem; background: var(--navy-50); color: var(--navy-ink);
}
.tg-step.is-done { border-color: rgba(25, 135, 84, .45); }
.tg-step.is-done .tg-step__num { background: #198754; color: #fff; font-size: 0; }
.tg-step.is-done .tg-step__num::before { content: "¹3"; font-size: .9rem; }
.tg-code { letter-spacing: .5em; font-weight: 700; font-variant-numeric: tabular-nums; }


/* =========================================================================
   Reytinglar: shohsupa (`.podium-*`) va qatorlar (`.list-*`).
   DTM doskasi (`.achiever` kartochkalari) bilan ataylab har xil: har
   reyting o'z bo'limida, o'z rangi va shaklida. Klasslar ko'rinishni
   bildiradi, bo'limni emas: hozir sertifikat imtihonlari — ko'k-binafsha
   shohsupa, SAT — yashil-feruza qatorlar.
   ========================================================================= */

/* ------------------------------------------------ Shohsupa (sertifikat) */
.section--podium {
  background:
    radial-gradient(900px 360px at 50% -10%, rgba(129, 140, 248, .35), transparent 70%),
    linear-gradient(180deg, #1e1b4b, #172554);
  color: #e0e7ff;
}
.podium-board__head { text-align: center; margin-bottom: 36px; }
.podium-board__badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 12px;
  background: rgba(165, 180, 252, .16); border: 1px solid rgba(165, 180, 252, .35);
  color: #c7d2fe; font-size: .78rem; font-weight: 800; letter-spacing: .08em;
}
.podium-board__title { color: #fff; margin-bottom: 8px; }
.podium-board__title em {
  font-style: normal;
  background: linear-gradient(90deg, #a5b4fc, #60a5fa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.podium-board__sub { color: rgba(224, 231, 255, .75); max-width: 60ch; margin: 0 auto; }
.podium-board__link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  color: #c7d2fe; font-weight: 700; text-decoration: none;
}
.podium-board__link:hover { color: #fff; text-decoration: underline; }

/* Doska sahifasida alohida bo'lim yo'q — SAT o'z paneli ichida turadi. */
.podium-board { color: #e0e7ff; }
.podium-panel {
  padding: 36px 24px 0; border-radius: 26px; overflow: hidden;
  background:
    radial-gradient(700px 300px at 50% -10%, rgba(129, 140, 248, .35), transparent 70%),
    linear-gradient(180deg, #1e1b4b, #172554);
}

.podium {
  list-style: none; margin: 0 auto; padding: 0; max-width: 920px;
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 18px;
}
.podium__person {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 0 6px 14px;
}
.podium__crown { color: #fbbf24; font-size: 1.7rem; margin-bottom: 2px; filter: drop-shadow(0 4px 10px rgba(251, 191, 36, .45)); }
.podium__avatar {
  --ring: #cbd5e1;
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; margin-bottom: 8px;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.5rem; font-weight: 800;
  border: 4px solid var(--ring); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.podium__avatar img { width: 100%; height: 100%; object-fit: cover; }
.podium__col--1 .podium__avatar { --ring: #fbbf24; width: 108px; height: 108px; font-size: 1.9rem; }
.podium__col--2 .podium__avatar { --ring: #e2e8f0; }
.podium__col--3 .podium__avatar { --ring: #f59e0b; }
.podium__name { color: #fff; font-weight: 800; text-decoration: none; line-height: 1.25; }
a.podium__name:hover { color: #c7d2fe; text-decoration: underline; }
.podium__meta { color: rgba(224, 231, 255, .6); font-size: .8rem; }
.podium__points { font-size: 1.7rem; font-weight: 900; color: #fff; margin-top: 4px; }
.podium__points small { font-size: .8rem; font-weight: 600; color: #a5b4fc; }
.podium__stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.podium__stats span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: rgba(255, 255, 255, .08); color: #e0e7ff;
}
.podium__stats i { color: #93c5fd; }
.podium__step {
  border-radius: 18px 18px 6px 6px; display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 18px 40px rgba(0, 0, 0, .3);
}
.podium__step span { font-size: 2.8rem; font-weight: 900; color: rgba(255, 255, 255, .92); }
.podium__col--1 .podium__step { height: 160px; background: linear-gradient(180deg, #818cf8, #4338ca); }
.podium__col--2 .podium__step { height: 116px; background: linear-gradient(180deg, #60a5fa, #1d4ed8); }
.podium__col--3 .podium__step { height: 84px;  background: linear-gradient(180deg, #a78bfa, #6d28d9); }
.podium-board__empty {
  max-width: 460px; margin: 0 auto 32px; padding: 32px; border-radius: 22px; text-align: center;
  display: grid; gap: 8px; justify-items: center;
  background: rgba(255, 255, 255, .06); border: 1px dashed rgba(165, 180, 252, .4);
}
.podium-board__empty i { font-size: 2rem; color: #a5b4fc; }
.podium-board__empty strong { color: #fff; }
.podium-board__empty span { color: rgba(224, 231, 255, .7); font-size: .9rem; }

@media (max-width: 575.98px) {
  .podium { gap: 8px; }
  .podium__avatar { width: 58px; height: 58px; font-size: 1.1rem; border-width: 3px; }
  .podium__col--1 .podium__avatar { width: 72px; height: 72px; }
  .podium__name { font-size: .82rem; }
  .podium__points { font-size: 1.2rem; }
  .podium__stats, .podium__meta { display: none; }
  .podium__col--1 .podium__step { height: 110px; }
  .podium__col--2 .podium__step { height: 80px; }
  .podium__col--3 .podium__step { height: 60px; }
  .podium__step span { font-size: 2rem; }
}

/* ----------------------------------------------------- Qatorlar (SAT) */
:root { --list-accent: #0f8f7e; --list-soft: #e3f6f2; }
[data-bs-theme="dark"] { --list-accent: #2dd4bf; --list-soft: rgba(45, 212, 191, .12); }

.section--list {
  background:
    radial-gradient(700px 300px at 100% 0%, var(--list-soft), transparent 70%),
    var(--bg);
}
.list-board {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 28px;
  border-top: 5px solid var(--list-accent);
  box-shadow: var(--shadow);
}
.list-board__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.list-board__badge {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px;
  padding: 5px 13px; border-radius: 8px;
  background: var(--list-soft); color: var(--list-accent);
  font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
}
.list-board__title { margin-bottom: 6px; }
.list-board__title em { font-style: normal; color: var(--list-accent); }
.list-board__sub { color: var(--text-muted); margin: 0; max-width: 62ch; }
.list-board__link { color: var(--list-accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.list-board__link:hover { text-decoration: underline; }

.list-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list-row {
  --place: #94a3b8;
  display: grid; grid-template-columns: 58px 54px minmax(0, 1fr) 210px;
  align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 16px;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-left: 6px solid var(--place);
}
.list-row--1 { --place: #eab308; background: linear-gradient(90deg, rgba(234, 179, 8, .12), var(--surface-alt) 45%); }
.list-row--2 { --place: #94a3b8; }
.list-row--3 { --place: #c2702f; }
.list-row__place { display: grid; justify-items: center; line-height: 1; color: var(--place); }
.list-row__place i { font-size: 1.5rem; }
.list-row__place b { font-size: 1.05rem; margin-top: 4px; color: var(--text); }
.list-row__avatar {
  width: 54px; height: 54px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--list-soft); color: var(--list-accent); font-weight: 800;
}
.list-row__avatar img { width: 100%; height: 100%; object-fit: cover; }
.list-row__who { min-width: 0; }
.list-row__name { font-weight: 800; color: var(--text); text-decoration: none; }
.list-row__name:hover { color: var(--list-accent); text-decoration: underline; }
.list-row__meta { display: block; color: var(--text-muted); font-size: .8rem; }
.list-row__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.exam-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 8px; font-size: .74rem;
  background: var(--list-soft); color: var(--text); max-width: 100%;
}
.exam-chip i { color: var(--list-accent); }
.exam-chip b { color: var(--list-accent); }
.list-row__score { text-align: right; }
.list-row__score > b { display: block; font-size: 1.9rem; font-weight: 900; line-height: 1; color: var(--list-accent); }
.list-row__score small { color: var(--text-muted); font-size: .76rem; }
.list-row__bar { display: block; height: 7px; border-radius: 99px; margin-top: 8px; background: var(--border); overflow: hidden; }
.list-row__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14b8a6, var(--list-accent)); }
.list-board__empty {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px; border-radius: 16px; border: 1px dashed var(--list-accent);
  background: var(--list-soft);
}
.list-board__empty > i { font-size: 1.8rem; color: var(--list-accent); }
.list-board__empty div { flex: 1; display: grid; }
.list-board__empty span { color: var(--text-muted); font-size: .9rem; }

@media (max-width: 767.98px) {
  .list-board { padding: 18px; }
  .list-row { grid-template-columns: 40px 44px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .list-row__avatar { width: 44px; height: 44px; }
  .list-row__score {
    grid-column: 1 / -1; text-align: left;
    display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px;
  }
  .list-row__score > b { font-size: 1.4rem; }
  .list-row__bar { grid-column: 1 / -1; }
}

/* ------------------------------------------- «Batafsil — umumiy reyting»
   Har reyting tagida ochiladigan to'liq jadval (`<details>`). Tuzilishi
   bitta, rangi bo'limniki: DTM — navy, shohsupa — to'q ko'k-binafsha fonda
   shaffof, qatorlar — yashil-feruza. */
.rank-more { --rm-accent: var(--navy-ink); --rm-soft: var(--navy-50); margin-top: 28px; }
.rank-more--list { --rm-accent: var(--list-accent); --rm-soft: var(--list-soft); margin-top: 20px; }
.rank-more--podium { --rm-accent: #a5b4fc; --rm-soft: rgba(165, 180, 252, .12); max-width: 920px; margin: 28px auto 0; }
.podium-panel .rank-more--podium { margin-bottom: 28px; }

.rank-more__toggle {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px; border-radius: 14px; cursor: pointer; list-style: none;
  background: var(--rm-soft); border: 1px solid color-mix(in srgb, var(--rm-accent) 35%, transparent);
  color: var(--rm-accent); font-weight: 800; user-select: none;
  transition: background .2s ease;
}
.rank-more__toggle::-webkit-details-marker { display: none; }
.rank-more__toggle:hover { background: color-mix(in srgb, var(--rm-accent) 16%, transparent); }
.rank-more__toggle:focus-visible { outline: 3px solid var(--rm-accent); outline-offset: 2px; }
.rank-more__hint { font-weight: 600; opacity: .75; }
.rank-more__chev { margin-left: auto; transition: transform .25s ease; }
.rank-more[open] .rank-more__chev { transform: rotate(180deg); }
.rank-more[open] .rank-more__toggle { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.rank-more__body {
  padding: 18px 20px 8px; border: 1px solid color-mix(in srgb, var(--rm-accent) 35%, transparent);
  border-top: 0; border-radius: 0 0 14px 14px; background: var(--surface);
}
.rank-more--podium .rank-more__body { background: rgba(15, 23, 42, .35); color: #e0e7ff; }
.rank-more__note { color: var(--text-muted); font-size: .88rem; margin-bottom: 14px; }
.rank-more__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.rank-more__title { font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.rank-more__title small { color: var(--text-muted); font-size: .8rem; font-weight: 600; }
.rank-more__cut { font-size: .85rem; color: var(--text-muted); margin: 10px 0; }
.rank-more--podium .rank-more__cut a { color: #c7d2fe; font-weight: 700; }

.rank-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rank-table th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 700; padding: 8px 10px;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.rank-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rank-table tbody tr:last-child td { border-bottom: 0; }
.rank-table__place { width: 44px; font-weight: 800; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rank-table__row--oltin .rank-table__place { color: #ca8a04; }
.rank-table__row--kumush .rank-table__place { color: #64748b; }
.rank-table__row--bronza .rank-table__place { color: #c2702f; }
.rank-table__row--oltin, .rank-table__row--kumush, .rank-table__row--bronza { background: var(--rm-soft); }
.rank-table__name { font-weight: 700; color: var(--text); text-decoration: none; }
a.rank-table__name:hover { color: var(--rm-accent); text-decoration: underline; }
.rank-table__meta { display: block; font-size: .76rem; color: var(--text-muted); }
.rank-table__score { font-size: 1rem; color: var(--rm-accent); font-variant-numeric: tabular-nums; }
.rank-table__muted { color: var(--text-muted); white-space: nowrap; }
.rank-table__bar { display: block; width: 90px; height: 5px; margin: 5px 0 0 auto; border-radius: 99px; background: var(--border); overflow: hidden; }
.rank-table__bar i { display: block; height: 100%; border-radius: inherit; background: var(--rm-accent); }
.rank-table__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rank-table__chips--inline { display: none; }
.rank-table td.text-end { white-space: nowrap; }

/* SAT: to'q fon ustida */
.rank-more--podium .rank-table th { color: rgba(224, 231, 255, .6); border-color: rgba(165, 180, 252, .25); }
.rank-more--podium .rank-table td { border-color: rgba(165, 180, 252, .14); color: #e0e7ff; }
.rank-more--podium .rank-table__name { color: #fff; }
.rank-more--podium a.rank-table__name:hover { color: #c7d2fe; }
.rank-more--podium .rank-table__meta, .rank-more--podium .rank-table__muted,
.rank-more--podium .rank-table__place { color: rgba(224, 231, 255, .6); }
.rank-more--podium .rank-table__row--oltin .rank-table__place { color: #fbbf24; }
.rank-more--podium .rank-table__row--kumush .rank-table__place { color: #e2e8f0; }
.rank-more--podium .rank-table__row--bronza .rank-table__place { color: #f59e0b; }
.rank-more--podium .rank-table__muted i { color: #fb923c; }

@media (max-width: 575.98px) {
  .rank-more__toggle { padding: 12px 14px; }
  .rank-more__hint { order: 3; width: 100%; font-size: .75rem; }
  .rank-more__body { padding: 12px 10px 4px; }
  .rank-table { font-size: .82rem; }
  .rank-table td, .rank-table th { padding: 7px 6px; }
  .rank-table__bar { width: 60px; }
}
@media (max-width: 575.98px) {
  .rank-table__opt { display: none; }
  .rank-table__chips--inline { display: flex; margin-top: 5px; }
  .rank-more--list .exam-chip { font-size: .68rem; padding: 2px 7px; }
}

/* ===========================================================================
   2COIN — sarlavhadagi balans va «Coinlarim» sahifasi (`templates/coins/`)
   =========================================================================== */
.coin-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 4px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 700; font-size: 14px; line-height: 1;
  text-decoration: none; white-space: nowrap;
}
.coin-badge:hover { border-color: #e0b100; color: var(--text); }
.coin-badge img { display: block; border-radius: 50%; }
.coin-total { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--text); }
.coin-plus  { color: var(--ok-500); }
.coin-minus { color: var(--danger-500); }

/* ------------------------------------------------ DTM «Tarix» sahifasi
   Yillar — «papkalar» qatori, tanlangani ochiq papka. Sinovlar o'sha
   `rank-more` ochiladigan bloklari bilan. */
.dtm-years { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.dtm-years__item {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 700; text-decoration: none;
}
.dtm-years__item:hover { border-color: var(--navy-ink); color: var(--navy-ink); }
.dtm-years__item.is-active { background: var(--navy-50); border-color: var(--navy-ink); color: var(--navy-ink); }
.dtm-history__h2 { font-size: 1.2rem; margin: 36px 0 0; }
.dtm-history__exam { margin-top: 14px; }
.rank-more__history {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-weight: 700; color: var(--navy-ink); text-decoration: none;
}
.rank-more__history:hover { text-decoration: underline; }
