*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--text-md)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
.ic { display: inline-block; vertical-align: -0.2em; flex: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; }
h1 { font-size: var(--h1); }
.display { font-size: var(--display); }
h2 { font-size: var(--h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: var(--text-lg); font-weight: 600; line-height: 1.3; }
mark { background: var(--wash); color: var(--wash-ink); padding: 0 .18em; border-radius: 6px; }
em.accent { font-style: normal; color: var(--accent); }
/* Teks panjang tanpa spasi (nama, tautan) membungkus, tidak meluber di layar 320px. */
body { overflow-wrap: anywhere; }
.row > *, .kv > *, .sheet-head > h3 { min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }
.xs { font-size: var(--text-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Kerangka halaman */
#app { min-height: 100dvh; }
.page { max-width: var(--page); margin: 0 auto; padding: var(--s4) var(--s4) calc(var(--nav-h) + var(--s7)); }
.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.wrap { flex-wrap: wrap; }
.grid { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Transisi antarhalaman */
.view { animation: view-in var(--t-mid) var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

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