/* base.css — reset, kanvas mobile-first, kerangka halaman */

*, *::before, *::after { box-sizing: border-box; }

html {
  /* Basis 17px: semua ukuran rem/em bawaan browser ikut naik,
     dan body memakai --fs-14 (17px) agar teks utama tidak pernah < 16px. */
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
  font-size: var(--fs-14);
  line-height: var(--lh-body);
  overflow-wrap: break-word;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }

#app {
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: clip;
}

.view { display: none; }
.view.is-active {
  display: block;
  animation: view-in .18s ease-out both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

.page {
  display: grid;
  gap: 14px;
  padding: 16px var(--gutter) 28px;
}

/* header halaman dalam */
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) var(--gutter) 14px;
}

.page-back {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-card);
  flex: 0 0 auto;
}
.page-back:active { background: var(--surface-2); }

.page-title { min-width: 0; }
.page-title h1 {
  font-size: var(--fs-24);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.4px;
}
.page-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.4;
}
.page-action { margin-left: auto; }

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: var(--fs-10);
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.muted-note {
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.6;
}

/* Catatan kanan judul section. Dibiarkan wrap setelah font diperbesar,
   supaya tidak menabrak judul di layar sempit. */
.section-note {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted-3);
  font-size: var(--fs-10);
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
}

.link {
  color: var(--emerald);
  font-size: var(--fs-12);
  font-weight: 700;
}

.ico { flex: 0 0 auto; }

:focus-visible {
  outline: 3px solid rgba(18, 113, 90, .32);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .view.is-active { animation: none; }
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
