/* Komponen bento (Fase T1). Hanya token; tanpa hex mentah. */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile {
  position: relative; overflow: hidden; isolation: isolate; min-width: 0; min-height: 118px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  padding: var(--s4); border-radius: var(--r-tile); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-tile); text-decoration: none !important;
  transition: transform var(--t-fast) var(--ease);
  animation: tile-in var(--t-slow) var(--ease) both;
}
a.tile:active { transform: scale(.97); }
.t-2x1 { grid-column: span 2; }
.t-2x2 { grid-column: span 2; grid-row: span 2; min-height: 248px; }

.tile-label { font-size: var(--text-sm); font-weight: 500; opacity: .85; }
.tile-title {
  font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-num { font-family: var(--font-display); font-weight: 600; font-size: 36px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.t-2x1 .tile-num, .t-2x2 .tile-num { font-size: 30px; }
/* Rupiah tidak dipotong di tengah angka dan tinggi ubin tetap selama hitung naik; ukuran ikut lebar ubin.
   shortcut: miliaran di ubin 1×1 pada layar 320px bisa terpotong; taruh angka uang besar di ubin 2×1. */
.tile { container-type: inline-size; }
.tile-num[data-money="1"] { white-space: nowrap; font-size: clamp(16px, 10cqi, 30px); }
.tile-sub { font-size: var(--text-sm); opacity: .85; overflow-wrap: anywhere; }
.tile-ic { position: absolute; top: var(--s3); right: var(--s3); width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--card); color: var(--ink); opacity: .9; }

/* Nada */
.tone-spot { background: var(--grad-spot); color: var(--on-dark); min-height: 160px; box-shadow: var(--shadow-spot); }
.tone-spot::before { content: ""; position: absolute; z-index: -1; right: -34px; top: -34px; width: 160px; height: 160px; border-radius: 44px; background: var(--card); opacity: .16; transform: rotate(18deg); }
/* Lapisan gelap tipis di seluruh ubin: teks kecil tetap ≥ 4,5:1 di bagian paling terang (diuji di tokens.test.js). */
.tone-spot::after { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--scrim-spot); }
.tone-spot .tile-label, .tone-spot .tile-sub { opacity: 1; }
.tone-spot .tile-ic { display: none; }
.tone-dark { background: var(--ink); color: var(--on-dark); }
.tone-sun { background: var(--sun); color: var(--sun-ink); }
.tone-cyan { background: var(--cyan-soft); color: var(--cyan-ink); }

/* Bilah komposisi */
.split { display: flex; gap: 3px; height: 10px; margin-top: var(--s3); border-radius: 99px; }
.split > i { border-radius: 99px; min-width: 6px; }
.split:empty { background: currentColor; opacity: .18; }
.split-legend { display: grid; gap: 6px; margin: var(--s3) 0 0; font-size: var(--text-sm); }
.split-legend > div { display: flex; justify-content: space-between; gap: var(--s2); }
.split-legend dt { opacity: .85; min-width: 0; }
.split-legend dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: var(--s2); }
.seg-spot { background: var(--accent-bright); }
.seg-cyan { background: var(--cyan-soft); }
.seg-sun { background: var(--sun); }
.seg-muted { background: var(--muted); }

/* Masuk berurutan; dimatikan oleh aturan reduced-motion global di base.css. */
@keyframes tile-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.bento > :nth-child(2) { animation-delay: var(--stagger); }
.bento > :nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
.bento > :nth-child(4) { animation-delay: calc(var(--stagger) * 3); }
.bento > :nth-child(5) { animation-delay: calc(var(--stagger) * 4); }
.bento > :nth-child(6) { animation-delay: calc(var(--stagger) * 5); }
.bento > :nth-child(7) { animation-delay: calc(var(--stagger) * 6); }
.bento > :nth-child(n + 8) { animation-delay: calc(var(--stagger) * 7); }
