/* custom.css - pelengkap Tailwind CDN untuk tryout.blajar.net */

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --ink: #0f172a;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); }
h1, h2, h3, .font-display { font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; }

:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Teks soal dan pembahasan: hormati baris baru, jaga rumus panjang tidak melebar */
.teks-soal { white-space: pre-line; line-height: 1.75; overflow-wrap: anywhere; }
.teks-soal .katex-display { overflow-x: auto; overflow-y: hidden; padding: .25rem 0; }
.teks-soal .katex { font-size: 1.08em; }

/* Gambar figural responsif */
.gambar-soal { display: block; max-width: 100%; height: auto; border-radius: 1rem; border: 1px solid #e2e8f0; background: #fff; }

/* Tombol opsi jawaban */
.opsi-btn { display: flex; width: 100%; gap: .75rem; align-items: flex-start; text-align: left; padding: .75rem .9rem; border-radius: 1rem; border: 2px solid #e2e8f0; background: #fff; transition: border-color .15s, background-color .15s; }
.opsi-btn:hover { border-color: #93c5fd; background: #f8fafc; }
.opsi-btn[aria-checked="true"] { border-color: var(--brand); background: #eff6ff; }
.opsi-huruf { flex: none; width: 2rem; height: 2rem; border-radius: 9999px; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: #f1f5f9; color: #334155; }
.opsi-btn[aria-checked="true"] .opsi-huruf { background: var(--brand); color: #fff; }

/* Grid navigasi nomor soal */
.nomor-btn { height: 2.5rem; border-radius: .75rem; font-weight: 600; font-size: .85rem; border: 3px solid transparent; transition: transform .1s; }
.nomor-btn:active { transform: scale(.94); }
.nomor-belum { background: #e2e8f0; color: #334155; }
.nomor-jawab { background: #10b981; color: #fff; }
.nomor-ragu { background: #fbbf24; color: #1e293b; }
.nomor-aktif { border-color: #1d4ed8; box-shadow: 0 0 0 2px #bfdbfe; }

/* Panel navigasi: lembar bawah di layar kecil, kolom sticky di layar lebar */
@media (max-width: 1023px) {
  #panel-nav { position: fixed; left: 0; right: 0; bottom: 0; max-height: 85vh; overflow-y: auto; z-index: 50; border-radius: 1.5rem 1.5rem 0 0; transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -12px 40px rgba(15, 23, 42, .25); }
  #panel-nav.terbuka { transform: none; }
}

/* Timer */
.timer-peringatan { background: #fef3c7 !important; color: #92400e !important; }
.timer-bahaya { background: #fee2e2 !important; color: #b91c1c !important; animation: denyut 1s ease-in-out infinite; }
@keyframes denyut { 50% { opacity: .65; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .timer-bahaya { animation: none; }
  #panel-nav, .nomor-btn, .opsi-btn { transition: none; }
}

/* Batang skor dengan penanda passing grade */
.bar-skor { position: relative; height: .6rem; border-radius: 9999px; background: #e2e8f0; overflow: visible; }
.bar-skor > .isi { height: 100%; border-radius: 9999px; }
.bar-skor > .penanda { position: absolute; top: -.25rem; bottom: -.25rem; width: 3px; border-radius: 2px; background: #0f172a; }

.sembunyi { display: none !important; }

@media print {
  header, #panel-nav, .no-print { display: none !important; }
}
