/* samuelpgt Design System — sp.css v1.4 (15 Nov 2026)
   v1.4: konvensi data-testid (lihat dokumentasi bagian QA) + mode QA html[data-qa="testid"].
   v1.3: lima aksen (sage, blush, lavender, sky, lime) berlaku di Joy dan Focus; gaya hanya mengatur netral & bentuk.
   v1.2.1: nama gaya diganti jadi Joy dan Focus (sebelumnya casual/corporate, hanya live beberapa menit).
   v1.2: dua gaya — Joy (default, gaya HariBahagia) dan Focus (data-style="focus", gaya samuelpgt.com).
   v1.1: mode gelap jadi default. Tanpa data-mode (atau data-mode="dark") = gelap; data-mode="light" = terang.
   Standar UI untuk semua produk samuelpgt. Sumber awal: HariBahagia (apps/haribahagia/src/theme.css).
   Pakai:  <link rel="stylesheet" href="https://samuelpgt.com/design-system/sp.css">
           <html data-style="joy|focus" data-theme="sage|blush|lavender|sky|lime" data-mode="dark|light">
   Dokumentasi: https://samuelpgt.com/design-system
   Aturan: ubah token di sini dulu, jangan menulis warna baru langsung di produk. */

/* ---------- 1. Token ---------- */
:root {
  /* Font sistem: CSP hanya mengizinkan sumber 'self', jadi Google Fonts tidak dimuat. */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
  /* Dasar netral terang & bersih; warna datang dari tema (data-theme). */
  --bg: #faf8f6;
  --surface: #ffffff;
  --surface-alt: #f4f1ee;
  --text: #26252b;
  --dim: #6c6872;
  --border: #ebe6e1;
  /* Tema Sage (default): aksen sage + pendamping blush. Aksen cukup gelap untuk teks putih (>= 4.5:1). */
  --accent: #4f7e68;
  --accent-text: #ffffff;
  --accent-2: #e8a0b0;
  --accent-2-ink: #a8475e;
  --terra: #c25e3a;
  --gold: #b98a2f;
  --danger: #b3372a;
  /* Aksen motif kategori tugas (migrasi 021): kalem, sejalan palet. */
  --phase-0: #4f7e68;
  --phase-1: #c25e3a;
  --phase-2: #b98a2f;
  --phase-3: #2c5d86;
  --phase-4: #7a5a72;
  --phase-5: #3f7a72;
  --phase-6: #9c3a4b;
  --phase-7: #6d7a35;
  --phase-8: #5a58a0;
  --phase-9: #7d9b6a;
  --phase-10: #7a4a9e;
  --phase-11: #6e7680;
  --radius: 14px;
  /* Pastel lucu-bersih (redesign 13 Nov 2026): latar lembut untuk ikon & kartu. */
  /* Pastel turunan tema: hanya dua rona (aksen + pendamping) agar tidak bertabrakan. */
  --mint: color-mix(in srgb, var(--accent) 13%, var(--surface));
  --sky: color-mix(in srgb, var(--accent) 7%, var(--surface));
  --blush: color-mix(in srgb, var(--accent-2) 20%, var(--surface));
  --butter: color-mix(in srgb, var(--accent-2) 10%, var(--surface));
  --lilac: color-mix(in srgb, var(--accent-2) 14%, var(--surface));
  --blush-ink: var(--accent-2-ink);
  /* Teks status: versi gelap di mode terang agar kontras >= 4.5:1 di atas latar tint. */
  --info: #2c5d86;
  --ok-text: #2f6b4f;
  --warn-text: #7a5a12;
  --info-text: #2c5d86;
  --danger-text: #a12a1f;
  /* Skala tipografi */
  --fs-display: 48px;
  --fs-h1: 26px;
  --fs-stat: 24px;
  --fs-h2: 18px;
  --fs-body: 16px;
  --fs-item: 15px;
  --fs-sm: 13px;
  --fs-xs: 12px;
  --fs-2xs: 11px;
  /* Bentuk & label (v1.2): gaya Joy membulat; Focus menimpanya. */
  --font-label: var(--font-body);
  --r-card: 20px;
  --r-hero: 24px;
  --r-input: 12px;
  --r-btn: 999px;
  --r-chip: 999px;
}

:root:not([data-mode="light"]) {
    color-scheme: dark;
    --bg: #141519;
    --surface: #1c1e23;
    --surface-alt: #262930;
    --text: #efebe6;
    --dim: #a39fa9;
    --border: #33363e;
    --accent: #8fc4aa;
    --accent-text: #10201a;
    --accent-2: #f0a8b8;
    --accent-2-ink: #f0a8b8;
    --terra: #e08a68;
    --gold: #d3ab55;
    --danger: #e07a6a;
    --phase-0: #8fc4aa;
    --phase-1: #e08a68;
    --phase-2: #d3ab55;
    --phase-3: #8cb8e0;
    --phase-4: #c49ab8;
    --phase-5: #7fb8ac;
    --phase-6: #d98a94;
    --phase-7: #aab87e;
    --phase-8: #a3a1d8;
    --phase-9: #aec4a2;
    --phase-10: #b493d4;
    --phase-11: #a9b0ba;
    --info: #8cb8e0;
    --ok-text: #8fd0ae;
    --warn-text: #e2bf72;
    --info-text: #9cc4e8;
    --danger-text: #f0958a;
}

/* Tema lain: aksen + pendamping. Varian gelap wajib ada (spesifisitas lebih tinggi dari mode gelap dasar). */
:root[data-theme="blush"] { --accent: #b0566e; --accent-2: #9ccbb3; --accent-2-ink: #3f7259; --phase-0: #b0566e; }
:root:not([data-mode="light"])[data-theme="blush"] { --accent: #eba4b5; --accent-text: #2a1118; --accent-2: #a6d4bc; --accent-2-ink: #a6d4bc; --phase-0: #eba4b5; }
:root[data-theme="lavender"] { --accent: #6c60a8; --accent-2: #f3b393; --accent-2-ink: #9c4f2c; --phase-0: #6c60a8; }
:root:not([data-mode="light"])[data-theme="lavender"] { --accent: #b9aee6; --accent-text: #1c1733; --accent-2: #f5bd9f; --accent-2-ink: #f5bd9f; --phase-0: #b9aee6; }
:root[data-theme="sky"] { --accent: #3d72a4; --accent-2: #eccb73; --accent-2-ink: #845f12; --phase-0: #3d72a4; }
:root:not([data-mode="light"])[data-theme="sky"] { --accent: #9cc3e8; --accent-text: #0f1d2b; --accent-2: #efd28a; --accent-2-ink: #efd28a; --phase-0: #9cc3e8; }
:root[data-theme="lime"] { --accent: #5c6b00; --accent-text: #ffffff; --accent-2: #8a9196; --accent-2-ink: #3f4549; --phase-0: #5c6b00; }
:root:not([data-mode="light"])[data-theme="lime"] { --accent: #e4f222; --accent-text: #08090a; --accent-2: #5b6268; --accent-2-ink: #b0b6b8; --phase-0: #e4f222; }
/* Pastel gelap: dicampur lebih sedikit agar tidak keruh. */
:root:not([data-mode="light"]) {
  --blush: color-mix(in srgb, var(--accent-2) 12%, var(--surface));
  --butter: color-mix(in srgb, var(--accent-2) 6%, var(--surface));
  --lilac: color-mix(in srgb, var(--accent-2) 8%, var(--surface));
  --mint: color-mix(in srgb, var(--accent) 14%, var(--surface));
  --sky: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

/* Gaya Focus (data-style="focus"): mengikuti samuelpgt.com — hitam pekat + lime, sans,
   sudut tegas, label monospace, tanpa doodle. Untuk alat bisnis (mis. akunting). Gaya hanya
   mengatur netral & bentuk; aksen tetap dari data-theme (Lime = warna samuelpgt.com).
   Kontras gelap: teks 18:1, dim 8,8:1, semua aksen >= 8,8:1. Terang: aksen >= 4,5:1. */
:root[data-style="focus"] {
  --font-display: var(--font-body);
  --font-label: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-card: 8px;
  --r-hero: 8px;
  --r-input: 6px;
  --r-btn: 6px;
  --r-chip: 4px;
}
:root[data-style="focus"]:not([data-mode="light"]) {
  --bg: #08090a; --surface: #141719; --surface-alt: #1c2023; --text: #f4f5f1; --dim: #b0b6b8; --border: #353a3e;
}
:root[data-style="focus"][data-mode="light"] {
  --bg: #fbfbfa; --surface: #ffffff; --surface-alt: #eff0ee; --text: #111418; --dim: #5b6268; --border: #e3e5e7;
}

/* ---------- 2. Dasar ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

.font-display { font-family: var(--font-display); }

button, a, input, select, textarea, label { touch-action: manipulation; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-text); padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700; z-index: 50; }
.skip:focus { left: 0; }

/* ---------- 3. Komponen ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card h3 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 800; }
.muted { color: var(--dim); }
.small { font-size: var(--fs-sm); }
.mt { margin-top: 16px; }
.mt-sm { margin-top: 8px; }

.btn {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center;
  border-radius: var(--r-btn); border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-danger { border-color: var(--danger); color: var(--danger-text); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 6px 14px; font-size: 13px; }
.btn .icon { margin-right: 4px; }
.btn-icon-only .icon { margin: 0; }
.btn-text { border-color: transparent; background: none; color: var(--accent); }

.input, select.input, textarea.input {
  width: 100%; min-height: 48px; border-radius: var(--r-input);
  border: 1px solid var(--border); background: var(--surface);
  padding: 10px 14px; font-size: 16px; color: var(--text);
  font-family: inherit; outline: none;
}
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 84px; resize: vertical; }
label.lbl { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); margin-bottom: 4px; }
.field { margin-bottom: 12px; min-width: 0; }
.field-err { color: var(--danger-text); font-size: 13px; font-weight: 600; margin: 4px 0 0; }
.input[aria-invalid="true"] { border-color: var(--danger); }

.progress { height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-alt); }
.progress > div { height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s; }
.progress.gold > div { background: var(--gold); }
.progress.terra > div { background: var(--terra); }
.progress.danger > div { background: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: var(--r-chip); background: var(--surface-alt);
  padding: 3px 10px; font-size: 12px; font-weight: 700;
}
.chip-accent { background: var(--accent); color: var(--accent-text); }

/* Hero: satu kartu sorotan per layar */
.hero {
  background: var(--accent); color: var(--accent-text);
  border-radius: var(--r-hero); padding: 24px;
}
/* Light: hero pastel (aksen + pendamping), teks gelap. */
.hero { position: relative; overflow: hidden; color: var(--text); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 24%, var(--surface)), color-mix(in srgb, var(--accent-2) 26%, var(--surface))); }
.hero .big { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 800; line-height: 1; }
.hero .progress { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.hero .progress > div { background: var(--accent); }
:root:not([data-mode="light"]) .hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent) 8%, var(--surface))); }
.hero.motif { --motif-color: var(--accent); --motif-op: .3; }

.notice { border: 1px solid var(--border); border-left: 4px solid var(--gold); background: var(--surface-alt); border-radius: var(--r-input); padding: 12px 14px; font-size: 14px; }
.notice.danger { border-left-color: var(--danger); }
.notice.ok { border-left-color: var(--accent); }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 14px; }

/* Segmented control */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-input); background: var(--surface-alt); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border: 0; border-radius: calc(var(--r-input) - 3px); background: none; color: var(--dim); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.14); }

/* Chip filter (dapat ditekan) dan chip status (teks) */
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chip-row::-webkit-scrollbar, .segmented::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .chip-row { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; } }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.fchip-n { font-size: 12px; font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
.schip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-chip);
  font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap;
  background: var(--surface-alt); color: var(--dim);
  transition: background-color .2s, color .2s;
}
.schip.ok { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ok-text); }
.schip.warn { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); color: var(--warn-text); }
.schip.info { background: color-mix(in srgb, var(--info) 14%, var(--surface)); color: var(--info-text); }
.schip.danger { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger-text); }

/* Baris daftar: satu baris = satu tombol yang membuka detail */
.list { display: grid; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 4px;
  border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background-color .15s;
}
.item:last-child, .item-wrap:last-child > .item { border-bottom: 0; }
.item:hover { background: color-mix(in srgb, var(--surface-alt) 60%, transparent); }
.item-main { flex: 1 1 auto; min-width: 0; }
.item-title { font-size: var(--fs-item); font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; font-size: var(--fs-sm); color: var(--dim); }
.item-note { margin-top: 2px; font-size: var(--fs-sm); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 44%; text-align: right; }
.item-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-amt-sub { font-size: 12px; color: var(--dim); white-space: nowrap; }
.item .icon.chev { color: var(--dim); }

/* Navigasi utama: bawah di HP, atas di layar >= 720px */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.tabs button {
  flex: 1; border: 0; background: none; color: var(--dim); cursor: pointer;
  font-size: 11px; font-weight: 700; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
}
.tabs button.active { color: var(--accent); }
.tabs button { position: relative; min-height: 48px; transition: color .15s; }
.tabs .menu-icon { width: 20px; height: 20px; flex: none; }
@media (min-width: 720px) {
  .tabs { position: static; justify-content: flex-start; gap: 4px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; margin: 0 0 4px; padding: 8px 0; background: none; }
  .tabs button { flex: 0 0 auto; flex-direction: row; gap: 8px; font-size: 14px; padding: 8px 14px; border-radius: var(--r-input); min-height: 40px; }
  .tabs button:hover { background: var(--surface-alt); color: var(--text); }
  .tabs button.active { background: var(--surface-alt); }
}

/* App bar 56px dengan pola garis tipis (cincin, hati, bunga, kilau). */
.appbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 4px;
  height: 56px; margin: 0 -16px; padding: 0 8px 0 16px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 720px) { .appbar { margin: 0 -24px; padding: 0 16px 0 24px; } }
.appbar { isolation: isolate; }
.appbar::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--accent); opacity: .16;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 56' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='15' cy='20' r='5'/%3E%3Ccircle cx='22' cy='20' r='5'/%3E%3Cpath d='M60 33c-1.6-3.4-7-2.8-7 1.1 0 3.4 7 6.9 7 6.9s7-3.5 7-6.9c0-3.9-5.4-4.5-7-1.1z'/%3E%3Ccircle cx='98' cy='18' r='1.8'/%3E%3Ccircle cx='98' cy='13.4' r='2.4'/%3E%3Ccircle cx='102.4' cy='16.6' r='2.4'/%3E%3Ccircle cx='100.7' cy='21.8' r='2.4'/%3E%3Ccircle cx='95.3' cy='21.8' r='2.4'/%3E%3Ccircle cx='93.6' cy='16.6' r='2.4'/%3E%3Cpath d='M40 8l1.2 2.8 2.8 1.2-2.8 1.2L40 16l-1.2-2.8L36 12l2.8-1.2z' fill='%23000' stroke='none'/%3E%3Ccircle cx='84' cy='42' r='1.3' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='44' r='1.1' fill='%23000' stroke='none'/%3E%3Ccircle cx='112' cy='46' r='1' fill='%23000' stroke='none'/%3E%3C/svg%3E") left top / 120px 56px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 56' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='15' cy='20' r='5'/%3E%3Ccircle cx='22' cy='20' r='5'/%3E%3Cpath d='M60 33c-1.6-3.4-7-2.8-7 1.1 0 3.4 7 6.9 7 6.9s7-3.5 7-6.9c0-3.9-5.4-4.5-7-1.1z'/%3E%3Ccircle cx='98' cy='18' r='1.8'/%3E%3Ccircle cx='98' cy='13.4' r='2.4'/%3E%3Ccircle cx='102.4' cy='16.6' r='2.4'/%3E%3Ccircle cx='100.7' cy='21.8' r='2.4'/%3E%3Ccircle cx='95.3' cy='21.8' r='2.4'/%3E%3Ccircle cx='93.6' cy='16.6' r='2.4'/%3E%3Cpath d='M40 8l1.2 2.8 2.8 1.2-2.8 1.2L40 16l-1.2-2.8L36 12l2.8-1.2z' fill='%23000' stroke='none'/%3E%3Ccircle cx='84' cy='42' r='1.3' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='44' r='1.1' fill='%23000' stroke='none'/%3E%3Ccircle cx='112' cy='46' r='1' fill='%23000' stroke='none'/%3E%3C/svg%3E") left top / 120px 56px repeat-x; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; border: 0; background: none; color: var(--text); font: inherit; transition: background-color .15s; }
.icon-btn:hover { background: var(--surface-alt); }

/* Motif doodle (mask SVG, warna ikut tema). Satu box utama per layar. */
.motif { position: relative; isolation: isolate; --motif-color: var(--blush-ink); --motif-op: .2; }
.motif::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: var(--motif-color); opacity: var(--motif-op);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 64' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M70 22c-2.5-5.5-11-4.6-11 1.8 0 5.6 11 11.2 11 11.2s11-5.6 11-11.2c0-6.4-8.5-7.3-11-1.8z'/%3E%3Cpath d='M34 8l2.4 6.2 6.2 2.4-6.2 2.4L34 25.2l-2.4-6.2-6.2-2.4 6.2-2.4z' fill='%23000' stroke='none'/%3E%3Ccircle cx='52' cy='48' r='4.5'/%3E%3Ccircle cx='59' cy='48' r='4.5'/%3E%3Ccircle cx='88' cy='46' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='16' cy='36' r='1.6' fill='%23000' stroke='none'/%3E%3Ccircle cx='86' cy='8' r='1.4' fill='%23000' stroke='none'/%3E%3C/svg%3E") right 10px top 8px / 88px 58px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 44' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14' cy='18' r='3'/%3E%3Ccircle cx='14' cy='10.5' r='3.6'/%3E%3Ccircle cx='21' cy='16' r='3.6'/%3E%3Ccircle cx='18.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='9.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='7' cy='16' r='3.6'/%3E%3Cpath d='M16 28c3 7 10 11 20 12'/%3E%3Cpath d='M28 37c1-5 5-8 10-8-1 5-5 8-10 8z'/%3E%3Ccircle cx='50' cy='22' r='1.6' fill='%23000' stroke='none'/%3E%3Ccircle cx='62' cy='34' r='1.4' fill='%23000' stroke='none'/%3E%3C/svg%3E") left 6px bottom 4px / 62px 38px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 64' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M70 22c-2.5-5.5-11-4.6-11 1.8 0 5.6 11 11.2 11 11.2s11-5.6 11-11.2c0-6.4-8.5-7.3-11-1.8z'/%3E%3Cpath d='M34 8l2.4 6.2 6.2 2.4-6.2 2.4L34 25.2l-2.4-6.2-6.2-2.4 6.2-2.4z' fill='%23000' stroke='none'/%3E%3Ccircle cx='52' cy='48' r='4.5'/%3E%3Ccircle cx='59' cy='48' r='4.5'/%3E%3Ccircle cx='88' cy='46' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='16' cy='36' r='1.6' fill='%23000' stroke='none'/%3E%3Ccircle cx='86' cy='8' r='1.4' fill='%23000' stroke='none'/%3E%3C/svg%3E") right 10px top 8px / 88px 58px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 44' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14' cy='18' r='3'/%3E%3Ccircle cx='14' cy='10.5' r='3.6'/%3E%3Ccircle cx='21' cy='16' r='3.6'/%3E%3Ccircle cx='18.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='9.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='7' cy='16' r='3.6'/%3E%3Cpath d='M16 28c3 7 10 11 20 12'/%3E%3Cpath d='M28 37c1-5 5-8 10-8-1 5-5 8-10 8z'/%3E%3Ccircle cx='50' cy='22' r='1.6' fill='%23000' stroke='none'/%3E%3Ccircle cx='62' cy='34' r='1.4' fill='%23000' stroke='none'/%3E%3C/svg%3E") left 6px bottom 4px / 62px 38px no-repeat;
  animation: motif-float 7s ease-in-out infinite; }
.motif-alt::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 64' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='60' cy='30' r='9'/%3E%3Ccircle cx='72' cy='30' r='9'/%3E%3Cpath d='M66 15l3-4 3 4-3 3z' fill='%23000' stroke='none'/%3E%3Cpath d='M28 12l4 6M40 6l-1 6M86 44l-5 3M20 44l5 2'/%3E%3Cpath d='M88 14l1.8 4.6 4.6 1.8-4.6 1.8L88 26.8l-1.8-4.6-4.6-1.8 4.6-1.8z' fill='%23000' stroke='none'/%3E%3Ccircle cx='44' cy='52' r='1.7' fill='%23000' stroke='none'/%3E%3C/svg%3E") right 10px top 8px / 88px 58px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 44' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14' cy='18' r='3'/%3E%3Ccircle cx='14' cy='10.5' r='3.6'/%3E%3Ccircle cx='21' cy='16' r='3.6'/%3E%3Ccircle cx='18.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='9.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='7' cy='16' r='3.6'/%3E%3Cpath d='M16 28c3 7 10 11 20 12'/%3E%3Cpath d='M28 37c1-5 5-8 10-8-1 5-5 8-10 8z'/%3E%3Ccircle cx='50' cy='22' r='1.6' fill='%23000' stroke='none'/%3E%3Ccircle cx='62' cy='34' r='1.4' fill='%23000' stroke='none'/%3E%3C/svg%3E") left 6px bottom 4px / 62px 38px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 64' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='60' cy='30' r='9'/%3E%3Ccircle cx='72' cy='30' r='9'/%3E%3Cpath d='M66 15l3-4 3 4-3 3z' fill='%23000' stroke='none'/%3E%3Cpath d='M28 12l4 6M40 6l-1 6M86 44l-5 3M20 44l5 2'/%3E%3Cpath d='M88 14l1.8 4.6 4.6 1.8-4.6 1.8L88 26.8l-1.8-4.6-4.6-1.8 4.6-1.8z' fill='%23000' stroke='none'/%3E%3Ccircle cx='44' cy='52' r='1.7' fill='%23000' stroke='none'/%3E%3C/svg%3E") right 10px top 8px / 88px 58px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 44' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14' cy='18' r='3'/%3E%3Ccircle cx='14' cy='10.5' r='3.6'/%3E%3Ccircle cx='21' cy='16' r='3.6'/%3E%3Ccircle cx='18.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='9.5' cy='24.5' r='3.6'/%3E%3Ccircle cx='7' cy='16' r='3.6'/%3E%3Cpath d='M16 28c3 7 10 11 20 12'/%3E%3Cpath d='M28 37c1-5 5-8 10-8-1 5-5 8-10 8z'/%3E%3Ccircle cx='50' cy='22' r='1.6' fill='%23000' stroke='none'/%3E%3Ccircle cx='62' cy='34' r='1.4' fill='%23000' stroke='none'/%3E%3C/svg%3E") left 6px bottom 4px / 62px 38px no-repeat; }
.hero.motif { --motif-color: var(--accent); --motif-op: .3; }
:root:not([data-mode="light"]) .motif { --motif-op: .26; }
/* Doodle kiri-bawah tidak boleh menimpa bar progres. */
.motif:has(.progress, .stack-bar)::before { -webkit-mask-size: 88px 58px, 0 0; mask-size: 88px 58px, 0 0; }
details.fold.motif::before { -webkit-mask-position: right 120px top 4px, left 0 bottom 0; mask-position: right 120px top 4px, left 0 bottom 0; -webkit-mask-size: 80px 52px, 0 0; mask-size: 80px 52px, 0 0; }
@keyframes motif-float { 50% { transform: translateY(-3px); } }

/* Wordmark samuelpgt + kredit produk */
.wordmark { font-family: var(--font-body); font-weight: 400; letter-spacing: -.03em; white-space: nowrap; }
.wordmark b { font-weight: 800; }
.made-by { font-size: var(--fs-sm); color: var(--dim); }
.made-by a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--text); text-decoration: none; font-size: 15px; }
.made-by a:hover .wordmark { text-decoration: underline; text-underline-offset: 3px; }

/* Label memakai --font-label (monospace di gaya Focus). */
label.lbl, .chip, .schip { font-family: var(--font-label); }

/* Gaya Focus: tanpa doodle/pola, hero datar dengan garis aksen, judul sans rapat. */
:root[data-style="focus"] .motif::before,
:root[data-style="focus"] .appbar::before,
:root[data-style="focus"] .hero::after { display: none; }
:root[data-style="focus"] .hero { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 3px solid var(--accent); }
:root[data-style="focus"] :is(h1, h2, h3, .font-display) { letter-spacing: -.02em; }

/* QA: <html data-qa="testid"> menandai semua elemen ber-data-testid (garis putus + label nama).
   Untuk debug dan review test saja; tidak dipakai di tampilan normal. */
:root[data-qa="testid"] [data-testid] { outline: 1px dashed var(--danger) !important; outline-offset: 1px; }
:root[data-qa="testid"] [data-testid]:not(input, select, textarea, img, .appbar, .tabs, .skip, .hero) { position: relative; }
:root[data-qa="testid"] [data-testid]:not(input, select, textarea, img)::after {
  content: attr(data-testid); position: absolute; left: 0; top: 0; transform: translateY(-100%); z-index: 60;
  padding: 0 4px; border-radius: 3px; background: var(--danger); color: #fff; opacity: 1;
  font: 600 10px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0; text-transform: none;
  white-space: nowrap; pointer-events: none; -webkit-mask: none; mask: none;
}

/* ---------- 4. Fokus & gerak ---------- */
.btn:focus-visible, .icon-btn:focus-visible, .fchip:focus-visible, .segmented button:focus-visible, .item:focus-visible, .tabs button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes bar-in { from { transform: scaleX(0); } }
.progress > div { transform-origin: left; animation: bar-in .7s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motif::before { animation: none !important; }
}
