/* ============================================================
   CARBAR · Theory exam (data.gov.il)
   Aligned with directories.css tokens — navy primary, orange A3 accent.
   Used by: /theory, /theory/{class}/{lang}, /catalog, /exam, results
   Mobile-first; desktop styles in @media (min-width: 768px).
   ============================================================ */
:root {
  --thx-navy: #002b80;
  --thx-navy-600: #00225f;
  --thx-navy-800: #001540;
  --thx-ink: #0f172a;
  --thx-ink-soft: #475569;
  --thx-ink-faint: #94a3b8;
  --thx-rule: #e2e8f0;
  --thx-rule-strong: #cbd5e1;
  --thx-surface: #ffffff;
  --thx-soft: #f8fafc;
  --thx-warm: #fefcf8;
  --thx-pass: #137a45;
  --thx-pass-soft: #ecfdf5;
  --thx-fail: #aa1c1c;
  --thx-fail-soft: #fef2f2;
  --thx-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px -6px rgba(15,23,42,.08);
  --thx-shadow-md: 0 4px 12px -4px rgba(15,23,42,.08), 0 16px 32px -16px rgba(15,23,42,.10);
  --thx-shadow-lg: 0 8px 24px -8px rgba(15,23,42,.12), 0 24px 48px -24px rgba(15,23,42,.16);
  --thx-ease: cubic-bezier(.4,0,.2,1);
  /* Default accent — overridden per class via .thx--ebike */
  --thx-accent: #002b80;
  --thx-accent-soft: #eef2ff;
  --thx-accent-strong: #001540;
  --thx-accent-glow: rgba(0,43,128,.18);
}

.thx--standard { --thx-accent: #002b80; --thx-accent-soft: #eef2ff;  --thx-accent-strong: #001540; --thx-accent-glow: rgba(0,43,128,.18); }
.thx--ebike    { --thx-accent: #c2410c; --thx-accent-soft: #fff7ed;  --thx-accent-strong: #7c2d12; --thx-accent-glow: rgba(194,65,12,.18); }

.thx {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}
@media (min-width: 768px) {
  .thx { padding: 24px; }
}

/* ─────────────────────── Hero ─────────────────────── */
.thx__hero {
  position: relative;
  border-radius: 16px;
  padding: 24px 22px;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--thx-shadow-md);
  margin-bottom: 20px;
  background: linear-gradient(135deg,
    var(--thx-accent-strong) 0%,
    var(--thx-accent) 55%,
    color-mix(in srgb, var(--thx-accent) 80%, #fff 20%) 100%);
}
@media (min-width: 768px) {
  .thx__hero { border-radius: 20px; padding: 36px 40px; margin-bottom: 28px; }
}
.thx__hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(at 20% 100%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(at 100% 0%, rgba(255,255,255,.12), transparent 50%);
  pointer-events: none;
}
.thx__hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px;
  width: 360px; height: 360px;
  background: conic-gradient(from 30deg, rgba(255,255,255,.05), transparent 30%, rgba(255,255,255,.04) 60%, transparent 90%);
  border-radius: 50%;
  pointer-events: none;
}
.thx__hero-grid {
  position: relative; display: flex; flex-direction: column; gap: 18px;
}
@media (min-width: 768px) {
  .thx__hero-grid { flex-direction: row; gap: 32px; align-items: center; justify-content: space-between; }
}
.thx__hero-copy { flex: 1; min-width: 0; }
.thx__source-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(12px);
  padding: 6px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.22);
}
.thx__source-tag .material-symbols-outlined { font-size: 16px; }
.thx__title {
  font-family: 'Heebo', system-ui, sans-serif;
  font-size: 1.7rem; font-weight: 900; margin: 0 0 8px;
  letter-spacing: -0.018em; line-height: 1.1;
}
@media (min-width: 768px) {
  .thx__title { font-size: 2.4rem; margin-bottom: 10px; }
}
.thx__lead {
  margin: 0; font-size: .9rem;
  color: rgba(255,255,255,.88);
  max-width: 640px; line-height: 1.6;
}
@media (min-width: 768px) {
  .thx__lead { font-size: 1rem; }
}
.thx__hero-stats { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
@media (min-width: 768px) {
  .thx__hero-stats { gap: 12px; flex-wrap: nowrap; }
}
.thx__stat {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(12px);
  padding: 10px 14px; border-radius: 12px;
  text-align: center; min-width: 80px; flex: 1;
}
@media (min-width: 768px) {
  .thx__stat { padding: 14px 20px; border-radius: 14px; min-width: 100px; flex: 0 0 auto; }
}
.thx__stat-num {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .thx__stat-num { font-size: 1.55rem; } }
.thx__stat-label {
  display: block;
  font-size: .65rem; font-weight: 600;
  color: rgba(255,255,255,.78);
  margin-top: 2px; letter-spacing: 0.06em;
}
@media (min-width: 768px) { .thx__stat-label { font-size: .72rem; } }

/* ─────────────────────── Index page — language tiles ─────────────────────── */
.thx__section { margin-bottom: 28px; }
.thx__section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 4px 12px;
}
.thx__section-title {
  font-size: 1.1rem; font-weight: 800; color: var(--thx-ink);
  letter-spacing: -0.01em; margin: 0;
}
@media (min-width: 768px) { .thx__section-title { font-size: 1.25rem; } }
.thx__section-divider { font-size: .68rem; color: var(--thx-ink-faint); font-family: 'JetBrains Mono', monospace; }

.thx__lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.thx__tile {
  position: relative;
  background: var(--thx-surface);
  border: 1px solid var(--thx-rule);
  border-radius: 14px;
  padding: 16px;
  transition: all .2s var(--thx-ease);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.thx__tile::before {
  content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--thx-accent), color-mix(in srgb, var(--thx-accent) 60%, transparent));
  opacity: .6; transition: opacity .2s var(--thx-ease);
}
.thx__tile:hover {
  border-color: var(--thx-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--thx-accent-glow);
}
.thx__tile:hover::before { opacity: 1; }

.thx__tile-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.thx__tile-name {
  font-size: 1.15rem; font-weight: 800; color: var(--thx-ink);
  letter-spacing: -0.01em;
}
.thx__tile-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem; font-weight: 700; color: var(--thx-accent);
  background: var(--thx-accent-soft); padding: 3px 8px; border-radius: 6px;
  letter-spacing: 0.04em;
}
.thx__tile-actions { display: flex; flex-direction: column; gap: 6px; }
.thx__tile-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--thx-rule);
  background: var(--thx-surface);
  color: var(--thx-ink);
  text-decoration: none; font-size: .92rem; font-weight: 600;
  transition: all .15s var(--thx-ease);
  min-height: 44px; /* mobile-touch */
}
.thx__tile-btn .material-symbols-outlined { font-size: 18px; color: var(--thx-ink-soft); }
.thx__tile-btn:hover { background: var(--thx-soft); border-color: var(--thx-rule-strong); }
.thx__tile-btn--primary {
  background: var(--thx-accent); color: #fff; border-color: var(--thx-accent);
  box-shadow: 0 4px 12px var(--thx-accent-glow);
}
.thx__tile-btn--primary .material-symbols-outlined { color: rgba(255,255,255,.9); }
.thx__tile-btn--primary:hover { background: var(--thx-accent-strong); border-color: var(--thx-accent-strong); }

/* ─────────────────────── Quiz card ─────────────────────── */
.thx__card {
  background: var(--thx-surface);
  border: 1px solid var(--thx-rule);
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: var(--thx-shadow-sm);
}
@media (min-width: 768px) { .thx__card { padding: 32px 36px; border-radius: 20px; } }

.thx__crumb {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; color: var(--thx-ink-soft);
  margin-bottom: 16px;
}
.thx__crumb a { color: var(--thx-ink-soft); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.thx__crumb a:hover { color: var(--thx-accent); }
.thx__crumb-meta { font-family: 'JetBrains Mono', monospace; font-size: .72rem; }

.thx__qmeta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .7rem; font-weight: 700;
  color: var(--thx-accent);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.thx__qmeta-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem; font-weight: 600;
  background: var(--thx-soft); color: var(--thx-ink-soft);
  padding: 2px 7px; border-radius: 4px;
  letter-spacing: 0.02em; text-transform: none;
}

.thx__qtext {
  font-family: 'Heebo', system-ui, sans-serif;
  font-size: 1.15rem; font-weight: 700;
  line-height: 1.55; color: var(--thx-ink);
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}
@media (min-width: 768px) {
  .thx__qtext { font-size: 1.4rem; line-height: 1.5; margin-bottom: 28px; }
}

.thx__choices { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

.thx__choice {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: var(--thx-surface);
  border: 1.5px solid var(--thx-rule);
  border-radius: 12px;
  color: var(--thx-ink);
  text-decoration: none; cursor: pointer;
  transition: all .15s var(--thx-ease);
  text-align: start; width: 100%; font: inherit;
  min-height: 48px;
}
.thx__choice:hover:not(.is-correct):not(.is-wrong):not(:disabled) {
  border-color: var(--thx-accent);
  background: var(--thx-accent-soft);
  transform: translateX(-2px);
}
[dir="ltr"] .thx__choice:hover:not(.is-correct):not(.is-wrong):not(:disabled) { transform: translateX(2px); }

.thx__choice.is-correct { border-color: var(--thx-pass); background: var(--thx-pass-soft); }
.thx__choice.is-wrong   { border-color: var(--thx-fail); background: var(--thx-fail-soft); }
.thx__choice.is-picked  { font-weight: 700; }
.thx__choice:disabled, .thx__choice[aria-disabled="true"] { cursor: default; }

.thx__choice-marker {
  flex: 0 0 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--thx-soft); color: var(--thx-ink-soft);
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700; font-size: .82rem;
  transition: all .15s var(--thx-ease);
}
.thx__choice.is-correct .thx__choice-marker { background: var(--thx-pass); color: #fff; }
.thx__choice.is-wrong .thx__choice-marker   { background: var(--thx-fail); color: #fff; }
.thx__choice-text { flex: 1; line-height: 1.5; font-size: .95rem; }
.thx__choice-icon { color: currentColor; }

/* Verdict banner shown after AJAX answer */
.thx__verdict {
  margin-top: 18px; padding: 14px 18px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  animation: thxFade .25s var(--thx-ease);
}
.thx__verdict--ok   { background: var(--thx-pass-soft); color: var(--thx-pass); border: 1px solid color-mix(in srgb, var(--thx-pass) 30%, transparent); }
.thx__verdict--bad  { background: var(--thx-fail-soft); color: var(--thx-fail); border: 1px solid color-mix(in srgb, var(--thx-fail) 30%, transparent); }
.thx__verdict .material-symbols-outlined { font-size: 22px; }
@keyframes thxFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.thx__actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 22px;
  justify-content: space-between;
}
.thx__actions-group { display: flex; flex-wrap: wrap; gap: 8px; }

.thx__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 10px;
  border: 1px solid var(--thx-rule);
  background: var(--thx-surface); color: var(--thx-ink);
  text-decoration: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .9rem;
  transition: all .15s var(--thx-ease);
  min-height: 44px;
}
.thx__btn .material-symbols-outlined { font-size: 18px; }
.thx__btn:hover { background: var(--thx-soft); border-color: var(--thx-rule-strong); }
.thx__btn:disabled { opacity: .5; cursor: not-allowed; }
.thx__btn--primary {
  background: var(--thx-accent); color: #fff; border-color: var(--thx-accent);
  box-shadow: 0 4px 12px var(--thx-accent-glow);
}
.thx__btn--primary:hover { background: var(--thx-accent-strong); border-color: var(--thx-accent-strong); }

/* Loading spinner during AJAX swap */
.thx__loading {
  display: none; position: absolute; inset: 0;
  background: rgba(255,255,255,.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; z-index: 5;
  border-radius: inherit;
}
.thx__card.is-loading .thx__loading { display: flex; }
.thx__spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--thx-rule);
  border-top-color: var(--thx-accent);
  border-radius: 50%;
  animation: thxSpin .7s linear infinite;
}
@keyframes thxSpin { to { transform: rotate(360deg); } }

/* Metadata details */
.thx__meta {
  margin-top: 24px;
  border-top: 1px solid var(--thx-rule);
  padding-top: 16px;
}
.thx__meta-summary {
  cursor: pointer; user-select: none;
  font-size: .78rem; color: var(--thx-ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 0;
}
.thx__meta-summary:hover { color: var(--thx-accent); }
.thx__meta-summary::-webkit-details-marker { display: none; }
.thx__meta-summary::before {
  content: "▸"; font-family: monospace; transition: transform .15s;
}
.thx__meta[open] .thx__meta-summary::before { transform: rotate(90deg); }
.thx__meta-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 18px;
  font-size: .76rem; direction: ltr; text-align: left;
}
@media (min-width: 600px) {
  .thx__meta-grid { grid-template-columns: max-content 1fr; }
}
.thx__meta-grid dt { color: var(--thx-ink-faint); font-weight: 600; }
.thx__meta-grid dd { color: var(--thx-ink); margin: 0; word-break: break-word; }
.thx__meta-grid dd code, .thx__meta-grid dd .mono { font-family: 'JetBrains Mono', monospace; font-size: .76rem; }

/* ─────────────────────── Catalog page ─────────────────────── */
.thx__catalog-bar {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 12px;
}
@media (min-width: 600px) {
  .thx__catalog-bar { flex-direction: row; align-items: center; justify-content: space-between; }
}
.thx__catalog-status { font-size: .82rem; color: var(--thx-ink-soft); }
.thx__catalog-status strong { color: var(--thx-ink); }
.thx__chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--thx-accent-soft); color: var(--thx-accent);
  padding: 4px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600;
  text-decoration: none;
}
.thx__chip-clear { color: var(--thx-ink-soft); margin-inline-start: 4px; }
.thx__chip-clear:hover { color: var(--thx-accent); }

.thx__rows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.thx__row {
  background: var(--thx-surface);
  border: 1px solid var(--thx-rule);
  border-radius: 12px;
  transition: all .15s var(--thx-ease);
}
.thx__row:hover { border-color: var(--thx-accent); box-shadow: var(--thx-shadow-sm); }
.thx__row-link {
  display: block; padding: 14px 16px;
  text-decoration: none; color: inherit;
}
.thx__row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.thx__row-num {
  font-family: 'JetBrains Mono', monospace; font-size: .72rem;
  font-weight: 700; color: var(--thx-accent);
  background: var(--thx-accent-soft); padding: 2px 8px; border-radius: 6px;
}
.thx__row-cat {
  font-size: .68rem; padding: 2px 8px; border-radius: 999px;
  background: var(--thx-soft); color: var(--thx-ink-soft);
  font-weight: 600; text-decoration: none;
  transition: all .15s var(--thx-ease);
}
.thx__row-cat:hover { background: var(--thx-accent-soft); color: var(--thx-accent); }
.thx__row-text { font-size: .94rem; line-height: 1.55; color: var(--thx-ink); }

.thx__pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 24px;
}
.thx__pager-status {
  font-family: 'JetBrains Mono', monospace; font-size: .82rem; color: var(--thx-ink-soft);
}

/* ─────────────────────── Exam page ─────────────────────── */
.thx__exam-bar {
  position: sticky; top: 76px; z-index: 10;
  background: var(--thx-surface);
  border: 1px solid var(--thx-rule);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: var(--thx-shadow-sm);
  margin-bottom: 16px;
}
@media (min-width: 768px) {
  .thx__exam-bar { padding: 16px 20px; border-radius: 14px; margin-bottom: 20px; }
}
.thx__exam-bar-text { min-width: 0; }
.thx__exam-bar-name { font-weight: 800; font-size: .92rem; color: var(--thx-ink); letter-spacing: -0.005em; }
.thx__exam-bar-meta { font-size: .72rem; color: var(--thx-ink-soft); margin-top: 2px; }
.thx__exam-bar-progress {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .76rem; color: var(--thx-ink-soft);
}
.thx__exam-bar-progress-num { color: var(--thx-accent); font-weight: 700; }
.thx__exam-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; font-weight: 800;
  background: var(--thx-accent); color: #fff;
  padding: 8px 12px; border-radius: 8px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--thx-accent-glow);
}
@media (min-width: 768px) { .thx__exam-timer { font-size: 1.3rem; padding: 8px 16px; } }
.thx__exam-timer.is-warning { background: #f59e0b; }
.thx__exam-timer.is-danger  { background: var(--thx-fail); animation: thxPulse .9s ease-in-out infinite alternate; }
@keyframes thxPulse { from { opacity: 1; } to { opacity: .7; } }

.thx__exam-progress {
  height: 4px; background: var(--thx-rule);
  border-radius: 999px; overflow: hidden; margin-bottom: 16px;
}
.thx__exam-progress-fill {
  height: 100%; background: var(--thx-accent);
  transition: width .3s var(--thx-ease);
  width: 0%;
}

.thx__exam-card {
  background: var(--thx-surface);
  border: 1px solid var(--thx-rule);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  scroll-margin-top: 160px;
  transition: all .15s var(--thx-ease);
}
@media (min-width: 768px) { .thx__exam-card { padding: 20px 24px; border-radius: 16px; } }
.thx__exam-card.is-answered {
  background: linear-gradient(180deg, var(--thx-accent-soft) 0%, var(--thx-surface) 100%);
  border-color: color-mix(in srgb, var(--thx-accent) 40%, transparent);
}
.thx__exam-card-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.thx__exam-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800; font-size: .82rem;
  background: var(--thx-accent); color: #fff;
  padding: 3px 10px; border-radius: 6px;
  flex-shrink: 0;
}
.thx__exam-cat {
  font-size: .68rem; padding: 3px 8px; border-radius: 999px;
  background: var(--thx-soft); color: var(--thx-ink-soft); font-weight: 600;
}
.thx__exam-id { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: var(--thx-ink-faint); margin-inline-start: auto; }
.thx__exam-q {
  font-size: 1rem; font-weight: 700; line-height: 1.55;
  color: var(--thx-ink); margin: 0 0 12px;
  letter-spacing: -0.005em;
}
@media (min-width: 768px) { .thx__exam-q { font-size: 1.1rem; } }

.thx__exam-options { display: flex; flex-direction: column; gap: 6px; }
.thx__exam-option {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border: 1.5px solid var(--thx-rule);
  border-radius: 10px; cursor: pointer;
  transition: all .15s var(--thx-ease);
  min-height: 48px; font-size: .92rem;
}
.thx__exam-option:hover { border-color: var(--thx-accent); background: var(--thx-accent-soft); }
.thx__exam-option:has(input:checked) {
  border-color: var(--thx-accent);
  background: var(--thx-accent-soft);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--thx-accent);
}
.thx__exam-option input { accent-color: var(--thx-accent); flex-shrink: 0; }
.thx__exam-option-marker {
  flex: 0 0 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--thx-soft); color: var(--thx-ink-soft);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .74rem;
}
.thx__exam-option:has(input:checked) .thx__exam-option-marker {
  background: var(--thx-accent); color: #fff;
}
.thx__exam-option-text { flex: 1; line-height: 1.5; }

.thx__submit-bar {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; gap: 10px; padding: 14px;
  background: var(--thx-surface);
  border: 1px solid var(--thx-rule);
  border-radius: 14px;
  box-shadow: 0 -8px 24px rgba(15,23,42,.06), var(--thx-shadow-md);
  margin-top: 16px;
  flex-direction: column;
}
@media (min-width: 600px) {
  .thx__submit-bar { flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 20px; }
}

/* ─────────────────────── Result page ─────────────────────── */
.thx__result-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 22px; border-radius: 16px;
  border: 1.5px solid;
  flex-direction: column; text-align: center;
}
@media (min-width: 600px) {
  .thx__result-hero { flex-direction: row; text-align: start; padding: 26px 30px; }
}
.thx__result-hero.is-pass { background: var(--thx-pass-soft); border-color: var(--thx-pass); color: color-mix(in srgb, var(--thx-pass) 70%, var(--thx-ink) 30%); }
.thx__result-hero.is-fail { background: var(--thx-fail-soft); border-color: var(--thx-fail); color: color-mix(in srgb, var(--thx-fail) 70%, var(--thx-ink) 30%); }
.thx__result-icon { font-size: 56px !important; flex-shrink: 0; }
.thx__result-body { flex: 1; }
.thx__result-title { font-size: 1.5rem; font-weight: 900; margin: 0 0 6px; letter-spacing: -0.01em; }
@media (min-width: 768px) { .thx__result-title { font-size: 1.8rem; } }
.thx__result-sub { font-size: .9rem; margin: 2px 0; opacity: .9; }
.thx__result-score {
  text-align: center; padding-block: 8px;
  border-top: 1px solid currentColor; min-width: 120px;
}
@media (min-width: 600px) {
  .thx__result-score { border-top: 0; border-inline-start: 1px solid currentColor; padding-inline-start: 22px; padding-block: 0; }
}
.thx__result-score-num { font-family: 'JetBrains Mono', monospace; font-size: 1.8rem; font-weight: 800; }
.thx__result-score-pct { font-size: .85rem; opacity: .8; }

.thx__review-card {
  background: var(--thx-surface);
  border: 1px solid var(--thx-rule);
  border-inline-start-width: 4px;
  border-radius: 12px; padding: 14px 18px;
  margin-bottom: 8px;
}
.thx__review-card.is-correct { border-inline-start-color: var(--thx-pass); }
.thx__review-card.is-wrong   { border-inline-start-color: var(--thx-fail); }
.thx__review-card.is-skip    { border-inline-start-color: var(--thx-ink-faint); }
.thx__review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.thx__review-num {
  font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: .78rem;
  background: var(--thx-soft); color: var(--thx-ink-soft);
  padding: 2px 8px; border-radius: 6px;
}
.thx__review-status { font-size: .78rem; font-weight: 700; }
.thx__review-card.is-correct .thx__review-status { color: var(--thx-pass); }
.thx__review-card.is-wrong   .thx__review-status { color: var(--thx-fail); }
.thx__review-card.is-skip    .thx__review-status { color: var(--thx-ink-faint); }
.thx__review-cat { font-size: .68rem; padding: 2px 8px; border-radius: 999px; background: var(--thx-soft); color: var(--thx-ink-soft); }
.thx__review-view { margin-inline-start: auto; font-size: .76rem; color: var(--thx-accent); text-decoration: none; font-weight: 600; }
.thx__review-view:hover { text-decoration: underline; }
.thx__review-q { font-size: .92rem; line-height: 1.55; margin-bottom: 10px; color: var(--thx-ink); }
.thx__review-options { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.thx__review-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--thx-soft);
  font-size: .85rem;
}
.thx__review-option.is-correct { background: var(--thx-pass-soft); color: color-mix(in srgb, var(--thx-pass) 70%, var(--thx-ink) 30%); }
.thx__review-option.is-wrong   { background: var(--thx-fail-soft); color: color-mix(in srgb, var(--thx-fail) 70%, var(--thx-ink) 30%); }
.thx__review-option.is-picked  { font-weight: 700; }
.thx__review-option-marker {
  flex: 0 0 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: .68rem; font-weight: 700;
}

/* ─────────────────────── Empty / Not available ─────────────────────── */
.thx__empty {
  text-align: center; padding: 60px 20px;
}
.thx__empty .material-symbols-outlined { font-size: 64px; color: var(--thx-ink-faint); }
.thx__empty h2 { margin: 12px 0 6px; font-size: 1.3rem; font-weight: 800; color: var(--thx-ink); }
.thx__empty p { margin: 0 0 16px; color: var(--thx-ink-soft); }
