/* ==========================================
   TEMA NURSEDU — token desain bersama
   Dipakai oleh index.html dan halaman kuis.
   Ubah warna/huruf di sini, seluruh tampilan ikut berubah.
   ========================================== */
:root {
    /* Permukaan: putih bersih ala Astroship */
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f2faf6;
    --line: #d9eadf;
    --line-strong: #bfe0cc;

    /* Teks */
    --ink: #0f3d2e;
    --ink-2: #1f5a44;
    --muted: #4a7c63;

    /* Warna utama: hijau emerald */
    --accent: #19a66a;
    --accent-hover: #158f5a;
    --accent-deep: #0e6b42;
    --accent-soft: #e3f3ea;
    --accent-line: #b6dec9;

    /* Warna pendamping untuk ikon & kategori (dipakai lembut, tidak mencolok) */
    --tint-teal: #e6f4f1;   --tint-teal-ink: #0f766e;
    --tint-blue: #e8f0fb;   --tint-blue-ink: #2b5ca8;
    --tint-amber: #fbf1e1;  --tint-amber-ink: #a2610d;
    --tint-rose: #fbeaec;   --tint-rose-ink: #b23b4e;
    --tint-violet: #efecfa; --tint-violet-ink: #5a47a8;
    --tint-green: #e3f3ea; --tint-green-ink: #0e6b42;
    --tint-cyan: #e0f7fa;  --tint-cyan-ink: #00838f;

    /* Status */
    --ok: #227a4d;
    --ok-soft: #e5f4ec;
    --warn: #9a5b0b;
    --warn-soft: #fcf1df;
    --danger: #b3382c;
    --danger-soft: #fbe9e6;

    /* Huruf: Bricolage Grotesque untuk judul, Inter untuk isi */
    --font-heading: "Bricolage Grotesque", "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius-lg: 14px;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: none;
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.06);
}

html { -webkit-text-size-adjust: 100%; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

body {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "tnum" 1; /* angka sejajar, rapi untuk nilai klinis */
}

h1, h2, h3, .font-heading { font-family: var(--font-heading); }

/* ---------- Mode gelap (diaktifkan dengan data-theme="dark" pada html) ---------- */
html[data-theme="dark"] {
    --bg: #0b1411;
    --surface: #12201b;
    --surface-2: #183028;
    --line: #254538;
    --line-strong: #356554;
    --ink: #e6f2ea;
    --ink-2: #b6d6c5;
    --muted: #8fb3a2;
    --accent: #34d399;
    --accent-hover: #2bbd89;
    --accent-deep: #1fa66a;
    --accent-soft: #1f3b33;
    --accent-line: #2f5a4c;
    --tint-teal: #13312b; --tint-teal-ink: #4ade80;
    --tint-blue: #132235; --tint-blue-ink: #7dd3fc;
    --tint-amber: #2f2514; --tint-amber-ink: #fcd34d;
    --tint-rose: #2f1620; --tint-rose-ink: #fda4af;
    --tint-violet: #221638; --tint-violet-ink: #c4b5fd;
    --tint-green: #1f3b33; --tint-green-ink: #6ee7b7;
    --tint-cyan: #102a33; --tint-cyan-ink: #67e8f9;
    --ok: #4ade80; --ok-soft: #14312a;
    --warn: #fbbf24; --warn-soft: #3a2e12;
    --danger: #f87171; --danger-soft: #3a1c1c;
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* Tombol dasar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; stroke-width: 2; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: #f3f4f6; }
.btn-outline { background: var(--surface); border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: var(--ink); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Chip ikon berwarna */
.chip {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: #fff;
}
.chip svg { width: 19px; height: 19px; stroke-width: 1.9; }
/* Varian warna: tetap hitam, warna hanya di ring tipis agar kategori masih terbedakan */
.chip-blue { box-shadow: 0 0 0 3px var(--tint-blue); }
.chip-amber { box-shadow: 0 0 0 3px var(--tint-amber); }
.chip-rose { box-shadow: 0 0 0 3px var(--tint-rose); }
.chip-violet { box-shadow: 0 0 0 3px var(--tint-violet); }
