/* ============================================================
   Sof tilim — Testlar
   ============================================================ */

/* Kartalar soni o'zgarsa ham bo'shliq qolmaydi: bitta test bo'lganda karta
   ustunni to'la egallaydi, ikkitasi qo'shilsa yonma-yon joylashadi. */
.st-kartalar {
  display: grid; gap: 20px; margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: 680px;
}
@media (max-width: 900px) { .st-kartalar { grid-template-columns: minmax(0, 1fr); } }

.st-karta {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--st-line); border-radius: 20px;
  padding: 26px 26px 24px; display: flex; flex-direction: column;
}
.st-karta::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--t, #0B57D0);
}
.st-karta::after {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 160px; height: 160px; border-radius: 50%; background: var(--t, #0B57D0); opacity: .07;
}

.st-karta__ikon {
  position: relative; z-index: 1;
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--t, #0B57D0); color: #fff;
}
.st-karta__ikon svg { width: 26px; height: 26px; }

.st-karta h3 {
  position: relative; z-index: 1;
  margin-top: 18px; font-size: 19px; line-height: 1.3; color: var(--st-navy);
}
.st-karta > p {
  position: relative; z-index: 1;
  margin: 9px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--st-ink-soft);
}

.st-karta__shart {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px;
}
.st-karta__shart span {
  font-size: 12.6px; font-weight: 600; color: var(--t, #0B57D0);
  background: var(--t-yengil, #EAF1FD); padding: 6px 12px; border-radius: 999px;
}

.st-karta ul {
  position: relative; z-index: 1;
  margin: 18px 0 0; padding: 0; list-style: none;
}
.st-karta ul li {
  position: relative; padding-left: 24px; margin-bottom: 9px;
  font-size: 14px; line-height: 1.55; color: var(--st-ink-soft);
}
.st-karta ul li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--t, #0B57D0);
}

.st-karta__oyoq {
  position: relative; z-index: 1;
  margin-top: auto; padding-top: 20px; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.st-karta__tugma {
  border: 0; cursor: pointer; border-radius: 12px;
  background: var(--t, #0B57D0); color: #fff;
  padding: 12px 22px; font: 600 15px/1 var(--st-font);
  transition: transform .16s, box-shadow .16s;
}
.st-karta__tugma:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(2, 20, 50, .18); }

.st-karta__natija { flex: 1 1 100%; }
.k-natija {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--st-muted); background: #F1F5F9;
  padding: 6px 12px; border-radius: 999px;
}
.k-natija.is-otdi { color: #0F7A3D; background: #E6F5EC; }

.st-karta__holat {
  position: relative; z-index: 1; margin-top: auto; padding-top: 20px;
  font-size: 13px; font-weight: 600; color: var(--st-muted);
}

/* ---------- Test oynasi ------------------------------------- */

.st-test-blok { display: none; margin-top: 26px; }

.t-bosh {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--st-line); border-radius: 16px;
  padding: 14px 18px;
}
.t-bosh b { font-size: 15px; color: var(--st-navy); }
.t-bosh .t-hisob {
  font-size: 13.5px; font-weight: 600; color: var(--st-muted);
  font-variant-numeric: tabular-nums;
}
.t-vaqt {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font: 700 16px/1 var(--st-font); font-variant-numeric: tabular-nums;
  color: var(--st-navy); background: #F1F5F9; padding: 9px 14px; border-radius: 10px;
}
.t-vaqt::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: #0F9D58;
}
.t-vaqt.is-ogoh { color: #B42318; background: #FEF0EF; }
.t-vaqt.is-ogoh::before { background: #D92D20; animation: tPulse 1s infinite; }
@keyframes tPulse { 50% { opacity: .25; } }

.t-chiziq { height: 4px; background: #E7ECF3; border-radius: 999px; margin: 14px 0 22px; overflow: hidden; }
.t-chiziq i { display: block; height: 100%; background: var(--t, #0B57D0); transition: width .25s; }

.t-panel {
  display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 240px;
  align-items: start;
}
@media (max-width: 900px) { .t-panel { grid-template-columns: minmax(0, 1fr); } }

.t-maydon {
  background: #fff; border: 1px solid var(--st-line); border-radius: 20px; padding: 28px 30px;
  min-width: 0;
}

.t-savol { display: flex; gap: 14px; align-items: flex-start; }
.t-savol__raqam {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--t-yengil, #EAF1FD); color: var(--t, #0B57D0);
  font: 700 15px/1 var(--st-font);
}
.t-savol p {
  margin: 4px 0 0; font-size: 18.5px; line-height: 1.5; color: var(--st-navy);
  font-weight: 600; overflow-wrap: anywhere;
}

.t-javoblar { display: grid; gap: 10px; margin-top: 24px; }
.t-javob {
  display: flex; align-items: flex-start; gap: 13px; text-align: left; width: 100%;
  background: #FBFCFE; border: 1.5px solid var(--st-line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer;
  font: 400 16px/1.5 var(--st-font); color: var(--st-ink);
  transition: border-color .14s, background .14s;
}
.t-javob:hover { border-color: var(--t, #0B57D0); background: #fff; }
.t-javob.is-tanlangan { border-color: var(--t, #0B57D0); background: var(--t-yengil, #EAF1FD); }

.t-harf {
  flex: none; width: 27px; height: 27px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: #E7ECF3; color: var(--st-muted); font: 700 13px/1 var(--st-font);
}
.t-javob.is-tanlangan .t-harf { background: var(--t, #0B57D0); color: #fff; }
.t-matn { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.t-oyoq {
  display: flex; align-items: center; gap: 10px; margin-top: 26px;
  padding-top: 20px; border-top: 1px solid var(--st-line-soft); flex-wrap: wrap;
}
.t-oyoq button {
  border: 1px solid var(--st-line); background: #fff; color: var(--st-navy);
  border-radius: 11px; padding: 11px 20px; cursor: pointer;
  font: 600 14.5px/1 var(--st-font);
}
.t-oyoq button:hover:not(:disabled) { border-color: var(--t, #0B57D0); }
.t-oyoq button:disabled { opacity: .4; cursor: not-allowed; }
.t-oyoq #stTKeyingi { background: var(--t, #0B57D0); color: #fff; border-color: transparent; }
.t-oyoq #stTKeyingi.is-yakun { background: #0F7A3D; }
.t-oyoq #stChiqish { margin-left: auto; color: var(--st-muted); }

/* Yon panel — savollar xaritasi */
.t-yon {
  background: #fff; border: 1px solid var(--st-line); border-radius: 20px; padding: 20px;
  position: sticky; top: 18px;
}
.t-yon h4 { margin: 0 0 4px; font-size: 14px; color: var(--st-navy); }
.t-yon .t-belgili { display: block; font-size: 12.5px; color: var(--st-muted); margin-bottom: 14px; }
.t-xarita { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.t-nuqta {
  aspect-ratio: 1; border: 1px solid var(--st-line); background: #FBFCFE;
  border-radius: 9px; cursor: pointer; color: var(--st-muted);
  font: 600 13px/1 var(--st-font); padding: 0;
}
.t-nuqta:hover { border-color: var(--t, #0B57D0); }
.t-nuqta.is-belgili { background: var(--t-yengil, #EAF1FD); color: var(--t, #0B57D0); border-color: transparent; }
.t-nuqta.is-faol { background: var(--t, #0B57D0); color: #fff; border-color: transparent; }

/* ---------- Natija ------------------------------------------ */

.st-natija-blok { display: none; margin-top: 26px; }

.n-bosh {
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--st-line); border-radius: 20px;
  padding: 28px 30px; border-left: 6px solid var(--st-muted);
}
.is-otdi .n-bosh { border-left-color: #0F9D58; }
.is-otmadi .n-bosh { border-left-color: #D92D20; }

.n-doira {
  flex: none; width: 128px; height: 128px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #F1F5F9; color: var(--st-navy);
}
.is-otdi .n-doira { background: #E6F5EC; color: #0F7A3D; }
.is-otmadi .n-doira { background: #FEF0EF; color: #B42318; }
.n-doira b { font-size: 34px; line-height: 1; letter-spacing: -.03em; }
.n-doira span { font-size: 13px; margin-top: 6px; opacity: .75; font-variant-numeric: tabular-nums; }

.n-matn { flex: 1; min-width: 260px; }
.n-matn h2 { margin: 0; font-size: 22px; color: var(--st-navy); }
.n-matn p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--st-ink-soft); }
.n-tugmalar { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.n-sarlavha { margin: 30px 0 14px; font-size: 17px; color: var(--st-navy); }

.n-savol {
  background: #fff; border: 1px solid var(--st-line); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 12px; border-left: 4px solid var(--st-line);
}
.n-savol.is-togri { border-left-color: #0F9D58; }
.n-savol.is-xato { border-left-color: #D92D20; }

.n-savol__bosh { display: flex; align-items: flex-start; gap: 11px; flex-wrap: wrap; }
.n-savol__bosh b {
  flex: 1; min-width: 200px; font-size: 15.5px; line-height: 1.5; color: var(--st-navy);
  overflow-wrap: anywhere;
}
.n-belgi {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 var(--st-font); color: #fff;
}
.is-togri .n-belgi { background: #0F9D58; }
.is-xato .n-belgi { background: #D92D20; }
.n-manba {
  flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--st-muted);
  background: #F1F5F9; padding: 4px 9px; border-radius: 6px;
}

.n-javob { margin: 10px 0 0 35px; font-size: 14.5px; line-height: 1.5; color: var(--st-ink); }
.n-javob span { color: var(--st-muted); }
.n-javob--togri { color: #0F7A3D; font-weight: 600; }
.n-javob--togri span { color: var(--st-muted); font-weight: 400; }
.n-izoh {
  margin: 12px 0 0 35px; padding: 11px 14px;
  background: #F7F9FC; border-radius: 10px;
  font-size: 14px; line-height: 1.6; color: var(--st-ink-soft);
}

/* ---------- Yuklanmoqda ------------------------------------- */

.st-yuklanmoqda {
  display: none; position: fixed; inset: 0; z-index: 120;
  align-items: center; justify-content: center; background: rgba(255, 255, 255, .8);
  font: 600 15px/1 var(--st-font); color: var(--st-navy);
}

@media (max-width: 640px) {
  .t-maydon { padding: 22px 18px; }
  .t-savol p { font-size: 17px; }
  .t-javob { font-size: 15px; padding: 12px 13px; }
  .n-bosh { padding: 22px 18px; gap: 18px; }
  .n-doira { width: 104px; height: 104px; }
  .n-doira b { font-size: 28px; }
  .n-javob, .n-izoh { margin-left: 0; }
}

/* Savoldagi inglizcha tarjima qatori */
.t-savol p i,
.n-savol__bosh b i {
  display: block; margin-top: 6px;
  font-style: normal; font-weight: 400; font-size: 15px;
  color: var(--st-muted);
}
.n-savol__bosh b i { font-size: 13.5px; margin-top: 4px; }
