/* Dasar bersama: reset, tipografi, scrollbar, seleksi, fokus, gerak. */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: var(--weight-semibold); line-height: var(--leading-tight); }
small { font-size: var(--text-sm); }
strong, b { font-weight: var(--weight-semibold); }
code, kbd, pre { font-family: var(--font-mono); font-size: .92em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* Angka sejajar */
table, td, th, input, output, progress, .tabular, .ui-num {
  font-variant-numeric: tabular-nums;
}
body { font-variant-numeric: tabular-nums; }

[hidden] { display: none !important; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: content-box;
}

::selection { background: var(--color-accent); color: var(--color-accent-contrast); }

/* Fokus jelas */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.ui-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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