/* ==========================================================
   SAT Rocket — asosiy uslublar
   Ranglar 2-rasmdagi yorug' SaaS panel palitrasidan olingan.
   ========================================================== */

:root {
  /* Fon va yuzalar */
  --bg:          #eef0fb;
  --surface:     #ffffff;
  --surface-2:   #f6f7fd;
  --border:      #e6e8f4;
  --border-2:    #d9ddef;

  /* Matn */
  --text:        #171a2e;
  --text-2:      #48506e;
  --muted:       #858ca6;

  /* Urg'u ranglar */
  --purple:      #6c5ce7;
  --purple-600:  #5a49d6;
  --purple-soft: #ece9ff;

  --green:       #00b894;
  --green-soft:  #dcf6f0;

  --orange:      #ff9f43;
  --orange-soft: #fff0dd;

  --blue:        #3b9ae1;
  --blue-soft:   #e0f0fc;

  /* O'lchamlar */
  --radius:      16px;
  --radius-sm:   12px;
  --radius-pill: 999px;
  --max:         1120px;

  --shadow:      0 1px 2px rgba(23, 26, 46, .04), 0 8px 24px rgba(23, 26, 46, .06);
  --shadow-lift: 0 2px 4px rgba(23, 26, 46, .05), 0 16px 36px rgba(108, 92, 231, .16);

  --font:        "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif:       "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  /* yumshoq binafsha yorug'lik — 2-rasmdagi fon hissi */
  background-image:
    radial-gradient(900px 380px at 50% -140px, #ffffff 0%, rgba(255,255,255,0) 70%),
    radial-gradient(600px 300px at 100% 0%, #e6e2ff 0%, rgba(230,226,255,0) 65%);
  background-repeat: no-repeat;
}

h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: 0; }

button { font: inherit; color: inherit; }

/* ==========================================================
   TEPA PANEL
   ========================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--purple) 0%, #8f7bff 100%);
  box-shadow: 0 6px 16px rgba(108, 92, 231, .35);
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; font-weight: 800; }
.brand-text strong em { font-style: normal; color: var(--purple); }
.brand-text small {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-actions { display: flex; align-items: center; gap: .5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; }

.chip-btn { cursor: pointer; transition: border-color .15s, color .15s, box-shadow .15s; }
.chip-btn:hover { border-color: var(--purple); color: var(--purple); box-shadow: 0 4px 12px rgba(108,92,231,.14); }

.chip-live { background: var(--green-soft); border-color: transparent; color: #067a63; }
.chip-live .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 184, 148, .2);
}

.user { display: flex; align-items: center; gap: .55rem; padding-left: .3rem; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: .9rem;
  color: #fff;
  background: linear-gradient(140deg, #ff9f43, #ff7a45);
}
.user-name { font-weight: 600; font-size: .9rem; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: #e0554a; border-color: #f3c9c5; }

/* ==========================================================
   SAHIFA
   ========================================================== */

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.25rem 0 .85rem;
}

/* ==========================================================
   BUGUNGI VAZIFALAR
   ========================================================== */

.today {
  background: linear-gradient(120deg, #ffffff 0%, #f4f2ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.today-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.today-title {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.today-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--purple-soft);
  color: var(--purple);
  flex-shrink: 0;
}
.today-icon svg { width: 18px; height: 18px; }

.today-meta { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .85rem; }
.today-date { font-weight: 600; font-variant-numeric: tabular-nums; }

.pill {
  padding: .25rem .7rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-2);
  font-weight: 700;
  font-size: .82rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.caret { display: grid; place-items: center; transition: transform .2s ease; }
.caret svg { width: 16px; height: 16px; }
.today-head[aria-expanded="true"] .caret { transform: rotate(90deg); }

.today-body { padding: 0 1.15rem 1.15rem; }

.progress {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border);
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), #8f7bff);
  transition: width .4s ease;
}

/* ==========================================================
   HERO
   ========================================================== */

.hero { text-align: center; padding: 3.25rem 1rem 2.5rem; }

.eyebrow {
  margin: 0 0 .6rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--purple);
}

.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: .6rem;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--purple);
}

.lead {
  margin: 0 auto;
  max-width: 34rem;
  text-wrap: balance;
  color: var(--text-2);
  font-size: 1.03rem;
}

/* ==========================================================
   BO'LIM KARTALARI
   ========================================================== */

.tiles {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 132px;
  padding: 1.25rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
.tile[aria-pressed="true"] { border-color: var(--tile); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tile) 18%, transparent); }

.tile-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--tile-soft);
  color: var(--tile);
  margin-bottom: .65rem;
}
.tile-icon svg { width: 23px; height: 23px; }
.tile .tile-name { margin-top: auto; }

.tile-name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  text-wrap: balance;
}

/* ==========================================================
   STATISTIKA — hozir sahifada ishlatilmaydi.
   Keyin "Faoliyatim" sahifasini qurganimizda shu uslublar
   tayyor turadi, qaytadan yozmaymiz.
   ========================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.05rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tile-soft);
  color: var(--tile);
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }

.stat-body { display: flex; flex-direction: column; line-height: 1.25; }
.stat-body b { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-body small { font-size: .8rem; color: var(--muted); }

/* ==========================================================
   VAZIFALAR RO'YXATI
   ========================================================== */

.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }

.task {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(23,26,46,.04);
  transition: border-color .15s, box-shadow .15s;
}
.task:hover { border-color: var(--border-2); }

.task-mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1.5px solid var(--border-2);
  color: transparent;
}
.task-mark svg { width: 14px; height: 14px; }

.task-main { flex: 1; min-width: 0; }
.task-name { font-weight: 600; font-size: .95rem; display: block; }
.task-meta { font-size: .8rem; color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: .12rem .55rem;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--tile-soft);
  color: var(--tile);
}

.task-action {
  padding: .5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--purple);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.task-action:hover { background: var(--purple-600); }

/* --- bajarilgan --- */
.task.is-done { background: var(--surface-2); }
.task.is-done .task-mark { background: var(--green); border-color: var(--green); color: #fff; }
.task.is-done .task-name { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--border-2); }
.task.is-done .task-action { background: var(--surface); color: var(--muted); border: 1px solid var(--border-2); }

/* --- qulflangan --- */
.task.is-locked { background: repeating-linear-gradient(135deg, #fafbff, #fafbff 10px, #f4f6fd 10px, #f4f6fd 20px); }
.task.is-locked .task-name { color: var(--muted); }
.task.is-locked .task-mark { color: var(--muted); border-style: dashed; }
.task.is-locked .task-action { background: var(--surface); color: var(--muted); border: 1px solid var(--border-2); cursor: not-allowed; }

.empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  font-size: .92rem;
}

/* ==========================================================
   FUTER
   ========================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: .84rem;
}
.site-footer p { margin: 0; }

/* ==========================================================
   KICHIK EKRANLAR
   ========================================================== */

@media (max-width: 900px) {
  .tiles, .stats { grid-template-columns: repeat(2, 1fr); }
  .user-name { display: none; }
  .chip-btn span { display: none; }
}

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; padding: .7rem 1rem; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .chip-live { display: none; }
  .page { padding: 1.25rem 1rem 3rem; }
  .hero { padding: 2.25rem .5rem 1.75rem; }
  .today-date { display: none; }
  .task { flex-wrap: wrap; }
  .task-action { width: 100%; }
}

@media (max-width: 460px) {
  .tiles, .stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================
   SAHIFA SARLAVHASI (bo'lim sahifalari uchun)
   ========================================================== */

.topbar-left { display: flex; align-items: center; gap: .7rem; }

.back-btn { text-decoration: none; }
.back-btn:hover { color: var(--purple); border-color: var(--purple); }

.page-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .5rem;
}

.page-head-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--tile-soft);
  color: var(--tile);
  flex-shrink: 0;
}
.page-head-icon svg { width: 27px; height: 27px; }

.page-head-text { flex: 1; min-width: 0; }
.page-head-text h1 { font-size: 1.75rem; font-weight: 800; }
.page-head-text p { margin: .3rem 0 0; color: var(--text-2); font-size: .93rem; max-width: 46rem; }

.page-head-stat { text-align: right; flex-shrink: 0; }
.page-head-stat b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.page-head-stat small { font-size: .8rem; color: var(--muted); }

/* ==========================================================
   DARAJA BLOKI
   ========================================================== */

.level { margin-top: 2.5rem; }

.level-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: .9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.level-badge {
  width: 52px; height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  align-content: center;
  background: linear-gradient(140deg, var(--purple) 0%, #8f7bff 100%);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(108, 92, 231, .3);
}
.level-badge b { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.level-badge small { font-size: .55rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }

.level-text { flex: 1; min-width: 0; }
.level-text h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
}
.level-text p { margin: .1rem 0 0; font-size: .85rem; color: var(--muted); }
.level-text p span { opacity: .5; margin: 0 .2rem; }

.level-progress { text-align: right; flex-shrink: 0; }
.level-progress-bar {
  display: block;
  width: 120px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border);
  overflow: hidden;
  margin-bottom: .35rem;
}
.level-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #4fd1b0);
}
.level-progress small { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ==========================================================
   PASSAGE KARTALARI
   ========================================================== */

.pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.pcard {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
a.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }

.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }

.pcard-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.pcard-label b { font-weight: 800; color: var(--tile); }
.pcard-label i { font-style: normal; color: var(--border-2); }
.pcard-topic { color: var(--muted); font-weight: 700; }

.pcard-lock { display: grid; place-items: center; color: var(--muted); }
.pcard-lock svg { width: 15px; height: 15px; }

.pcard-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.3;
  text-wrap: balance;
  margin: .25rem 0 .1rem;
}

.pcard .tag { align-self: flex-start; }

.pcard-meta {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pcard-meta span { opacity: .5; margin: 0 .1rem; }

.pcard-foot {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
  font-size: .82rem;
}

.card-score {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  color: #067a63;
}
.card-score svg { width: 14px; height: 14px; }

.card-due {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  color: var(--text-2);
}
.card-due svg { width: 14px; height: 14px; }
.card-due.is-soon { color: #d97706; }
.card-due.is-late { color: #dc2626; }

.card-note { color: var(--muted); }

.card-go {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  color: var(--tile);
}
.card-go i { font-style: normal; transition: transform .16s ease; }
a.pcard:hover .card-go i { transform: translateX(3px); }

/* --- qulflangan karta --- */
.pcard.is-locked { background: var(--surface-2); box-shadow: none; }
.pcard.is-locked .pcard-label b { color: var(--muted); }
.pcard.is-locked .pcard-title { color: var(--muted); }
.pcard.is-locked .tag { background: var(--border); color: var(--muted); }

/* --- bajarilgan karta --- */
.pcard.is-done { border-color: color-mix(in srgb, var(--green) 30%, var(--border)); }

/* ==========================================================
   BO'LIM SAHIFALARI — KICHIK EKRANLAR
   ========================================================== */

@media (max-width: 900px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .page-head-stat { display: none; }
  .level-progress-bar { width: 90px; }
}

@media (max-width: 640px) {
  .pgrid { grid-template-columns: 1fr; }
  .page-head { padding-top: 1.25rem; }
  .page-head-text h1 { font-size: 1.45rem; }
  .page-head-text p { font-size: .87rem; }
  .level-head { flex-wrap: wrap; }
  .level-progress { width: 100%; text-align: left; }
  .level-progress-bar { width: 100%; }
}

/* --- hali tayyor bo'lmagan bo'lim kartasi --- */
.tile.is-soon { opacity: .55; cursor: default; }
.tile.is-soon:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }

/* ==========================================================
   PASSAGE RUNNER — bitta passage o'qish va savollarga javob berish
   ========================================================== */

html:has(.runner-body), .runner-body {
  height: 100%;
}

.runner-body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ---------- tepa panel ---------- */

.runner-top {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.runner-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1.25rem;
}

.runner-id { display: flex; align-items: center; gap: .7rem; min-width: 0; }

.runner-back {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.runner-back svg { width: 17px; height: 17px; }
.runner-back:hover { color: var(--purple); border-color: var(--purple); }

.runner-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.runner-meta { display: flex; align-items: center; gap: .9rem; flex-shrink: 0; }

.runner-section {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--purple);
}

.runner-progress {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- yo'riqnoma banneri ---------- */

.runner-banner {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: .55rem;
  flex-wrap: wrap;
  padding: .65rem 1.25rem;
  background: var(--purple-soft);
  border-bottom: 1px solid var(--border);
  font-size: .87rem;
}
.runner-banner b { color: var(--purple-600); font-weight: 700; }
.runner-banner span { color: var(--text-2); }

/* ---------- asboblar paneli ---------- */

.runner-toolbar {
  flex-shrink: 0;
  display: flex;
  padding: .55rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tool-group { display: flex; align-items: center; gap: .5rem; }

.tool-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: .3rem;
}

.swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--sw);
  box-shadow: 0 0 0 1px var(--border-2);
  cursor: pointer;
  padding: 0;
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); }

.tool-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
.tool-btn[aria-pressed="true"] { background: var(--ink, var(--text)); color: var(--surface); border-color: var(--text); }

/* ---------- ikki panel: matn + savollar ---------- */

.runner {
  flex: 1;
  display: flex;
  min-height: 0;
}

.runner-passage,
.runner-questions {
  flex: 1 1 50%;
  min-width: 0;
  overflow-y: auto;
  padding: 2rem 2.25rem 6rem;
}

.runner-passage {
  border-right: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--reading-serif, "Lora", Georgia, serif);
  color: var(--text);
  line-height: 1.75;
}

.runner-passage #passage-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5em;
  line-height: 1.3;
  margin: 0 0 1.1em;
  text-wrap: balance;
}

.runner-passage p { margin: 0 0 1.15em; max-width: 42em; }
.runner-passage p:last-child { margin-bottom: 0; }

.runner-questions { background: var(--surface-2); font-family: var(--font); }

/* ---------- savol bloki ---------- */

.q-block {
  padding: 1.1rem 1.2rem 1.3rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-margin-top: 1rem;
}

.q-head {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: .9rem;
}

.q-num {
  flex-shrink: 0;
  width: 1.7em; height: 1.7em;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-600);
  font-weight: 800;
  font-size: .92em;
}

.q-prompt { flex: 1; margin: .1em 0 0; font-weight: 600; font-size: 1em; line-height: 1.45; }

.q-eliminate {
  flex-shrink: 0;
  padding: .3em .55em;
  border-radius: 7px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  cursor: pointer;
  color: var(--text-2);
}
.elim-label { font-size: .72em; font-weight: 800; letter-spacing: .03em; text-decoration: line-through; text-decoration-thickness: 2px; }
.q-eliminate[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.q-eliminate:disabled { opacity: .4; cursor: default; }

/* ---------- variantlar ---------- */

.q-options { display: flex; flex-direction: column; gap: .5rem; }

.q-option {
  display: flex;
  align-items: center;
  gap: .65em;
  padding: .55em .7em;
  border-radius: 9px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.q-option:hover { border-color: var(--border-2); background: var(--surface-2); }

.opt-radio {
  position: relative;
  flex-shrink: 0;
  width: 1.15em; height: 1.15em;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.q-option.is-selected .opt-radio { border-color: var(--purple); background: var(--purple); }
.q-option.is-selected .opt-radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fff;
}

.opt-letter { flex-shrink: 0; font-weight: 800; color: var(--muted); font-size: .88em; width: 1em; }
.opt-text { flex: 1; font-size: .96em; line-height: 1.4; }

.opt-strike {
  flex-shrink: 0;
  width: 1.6em; height: 1.6em;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.opt-strike svg { width: 55%; height: 55%; }

.q-option.is-struck { background: var(--surface-2); }
.q-option.is-struck .opt-text { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .5; }
.q-option.is-struck .opt-radio { opacity: .35; pointer-events: none; }
.q-option.is-struck .opt-strike { background: #fbe4e4; color: #c23b3b; border-color: #f0b8b8; }

/* --- javob tekshirilgandan keyin --- */

.q-block.is-graded .q-option { cursor: default; }
.q-block.is-graded .opt-radio { pointer-events: none; }

.q-option.is-correct-answer {
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  background: var(--green-soft);
}
.q-option.is-correct-answer .opt-radio { border-color: var(--green); background: var(--green); }

.q-option.is-wrong-answer:not(.is-correct-answer) {
  border-color: color-mix(in srgb, #dc2626 40%, var(--border));
  background: #fdeceb;
}
.q-option.is-wrong-answer:not(.is-correct-answer) .opt-radio { border-color: #dc2626; background: #dc2626; }

/* ---------- belgilash (highlight / underline) ---------- */

mark.hl { border-radius: 2px; padding: 0 .05em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.hl-yellow { background: #fbe08a; }
mark.hl-green  { background: #a9e6c2; }
mark.hl-blue   { background: #a8d4f5; }
mark.hl-pink   { background: #f3b8d3; }

u.hl-underline {
  text-decoration: none;
  border-bottom: 2px solid var(--purple);
  padding-bottom: 1px;
}

/* ---------- pastki panel ---------- */

.runner-bottom {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .65rem 1.25rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.runner-qnav {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  overflow-x: auto;
}

.qnav-btn {
  width: 2.1rem; height: 2.1rem;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 700;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.qnav-btn.is-answered { background: var(--purple-soft); border-color: var(--purple); color: var(--purple-600); }
.qnav-btn.is-active { outline: 2px solid var(--purple); outline-offset: 1px; }

.runner-result {
  flex-shrink: 0;
  font-weight: 800;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  padding: .5rem .9rem;
  border-radius: var(--radius-pill);
}
.runner-result.is-good { background: var(--green-soft); color: #067a63; }
.runner-result.is-low  { background: #fdeceb; color: #b3261e; }

.runner-submit {
  flex-shrink: 0;
  padding: .65rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
.runner-submit:hover { background: var(--purple-600); }

/* ---------- kattalashtirish tugmalari ---------- */

.zoom-control {
  flex-shrink: 0;
  display: flex;
  gap: .3rem;
  padding: .3rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
}

.zoom-control button {
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.zoom-control button svg { width: 16px; height: 16px; }
.zoom-control button:hover:not(:disabled) { background: var(--surface-2); color: var(--purple); }
.zoom-control button:disabled { opacity: .3; cursor: default; }

/* ---------- kichik ekranlar: panellarni ustma-ust qilamiz ---------- */

@media (max-width: 860px) {
  .runner { flex-direction: column; overflow-y: auto; }
  .runner-passage, .runner-questions { overflow: visible; flex: none; padding: 1.5rem 1.15rem 2rem; }
  .runner-passage { border-right: 0; border-bottom: 1px solid var(--border); }
  .runner-top-inner { flex-wrap: wrap; gap: .5rem; }
  .runner-section { display: none; }
  .runner-bottom { flex-wrap: wrap; row-gap: .5rem; }
  .zoom-control { order: 1; }
  .runner-result { order: 2; }
  .runner-submit { order: 3; margin-left: auto; }
  .runner-qnav { order: 4; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .runner * { transition: none !important; }
}
