/* ==========================================================================
   TOBA · token merek dan komponen dasar
   Versi 1.0 · 26 November 2026
   Satu sumber untuk tobalm.org DAN demo (inference2.tobalm.org).
   Salin file ini utuh ke kedua repo. Jangan mengubah nilai di salah satu repo saja.
   ========================================================================== */

:root {
  /* Danau (struktur, latar gelap, status terpilih) */
  --toba-lake-900: #0E1522;   /* header, footer, hero, sidebar demo */
  --toba-lake-800: #152036;   /* permukaan menonjol di latar gelap (chip, kartu) */
  --toba-lake-700: #24324A;   /* garis di latar gelap, menu aktif di latar gelap */
  --toba-lake-600: #3A4A66;   /* garis tepi tombol sekunder di latar gelap */
  --toba-lake-500: #3D5A8A;   /* dekorasi: gelombang, riak */
  --toba-lake-100: #E8EDF6;   /* status terpilih dan kotak keluaran di latar terang */

  /* Ikan (aksi dan aksen) */
  --toba-orange-500: #F07A1A; /* latar tombol utama — di latar terang maupun gelap */
  --toba-orange-700: #B4470C; /* tautan dan teks aksen di latar terang (5,1 : 1) */
  --toba-orange-300: #F5A15C; /* teks aksen di latar gelap (8,8 : 1) */
  --toba-orange-50:  #FFF1E6; /* latar label peringatan ringan */
  --toba-red-600:    #C0280F; /* dekorasi saja, bukan teks */

  /* Netral */
  --toba-ink:        #171F31; /* teks utama di latar terang */
  --toba-ink-muted:  #455370; /* teks sekunder di latar terang (7,2 : 1) */
  --toba-surface:    #F7F7F8; /* latar halaman */
  --toba-card:       #FFFFFF; /* kartu */
  --toba-line:       #E4E6EB; /* garis di latar terang */
  --toba-input:      #EEF1F6; /* kotak masukan, blok kode */

  /* Teks di latar gelap */
  --toba-on-dark:        #F7F4EF;
  --toba-on-dark-muted:  #C9D1DE;
  --toba-on-dark-soft:   #AEB8C8;
  --toba-on-orange:      #1A0E05; /* teks di tombol oranye (6,8 : 1) */

  /* Tipografi dan bentuk */
  --toba-font: 'Poppins', system-ui, sans-serif;
  --toba-radius-sm: 10px;
  --toba-radius-md: 14px;
  --toba-radius-lg: 28px;
  --toba-ease-out: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Dasar ---------- */
html { scrollbar-gutter: stable; }
body { font-family: var(--toba-font); color: var(--toba-ink); background: var(--toba-surface); }

a { color: var(--toba-orange-700); text-underline-offset: 3px; }
a:hover { color: var(--toba-ink); }

:focus-visible { outline: 3px solid var(--toba-orange-700); outline-offset: 3px; border-radius: 8px; }
.toba-dark :focus-visible { outline-color: var(--toba-orange-500); }

/* ---------- Tombol ---------- */
.toba-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: var(--toba-radius-sm);
  font: 600 15px/1 var(--toba-font); text-decoration: none; cursor: pointer;
}
.toba-btn--primary   { background: var(--toba-orange-500); color: var(--toba-on-orange); border: 0; }
.toba-btn--primary:hover { background: #F58A33; color: var(--toba-on-orange); }
.toba-btn--secondary { background: var(--toba-card); color: var(--toba-ink); border: 1px solid #C9D0DC; }
.toba-btn--secondary:hover { color: var(--toba-ink); border-color: var(--toba-lake-500); }
.toba-dark .toba-btn--secondary { background: transparent; color: var(--toba-on-dark); border-color: var(--toba-lake-600); }
.toba-dark .toba-btn--secondary:hover { color: var(--toba-on-dark); border-color: var(--toba-on-dark-soft); }

/* ---------- Status terpilih (tab, pilihan, menu aktif di latar terang) ---------- */
.toba-selected,
[aria-current="true"].toba-selectable,
[aria-selected="true"].toba-selectable {
  background: var(--toba-lake-100); color: var(--toba-ink); border: 1px solid var(--toba-lake-500);
}

/* ---------- Header dan footer gelap (semua halaman) ---------- */
.toba-header { background: var(--toba-lake-900); color: var(--toba-on-dark); }
.toba-header a:not(.toba-btn) { color: var(--toba-on-dark); text-decoration: none; }
.toba-header [aria-current="page"] { background: var(--toba-lake-700); border-radius: 999px; }
.toba-logo { width: 36px; height: 36px; }

.toba-footer { background: var(--toba-lake-900); color: var(--toba-on-dark-muted); }
.toba-footer a:not(.toba-btn) { color: var(--toba-on-dark); }

/* ---------- Kotak keluaran ---------- */
.toba-output { position: relative; background: var(--toba-lake-100); border-radius: var(--toba-radius-sm); }
.toba-output::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--toba-orange-500); border-radius: var(--toba-radius-sm) var(--toba-radius-sm) 0 0; }

/* ---------- Label kecil ---------- */
.toba-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 500 13px/1.4 var(--toba-font); background: var(--toba-lake-100); color: var(--toba-ink); }
.toba-badge--warn { background: var(--toba-orange-50); color: #8A3A0B; }

/* ---------- Tepi gelombang (bawah hero / bagian gelap) ---------- */
.toba-wave-edge { display: block; width: 100%; height: 36px; color: var(--toba-lake-900); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
