:root {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --ink: #1d1a17;
  --muted: #6b6259;
  --line: #e9e1d7;
  --brand: #e8590c;
  --brand-ink: #ffffff;
  --brand-soft: #fff0e6;
  --alt: #0b7a6f;
  --error: #c0392b;
  --ok: #1e7d3a;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 20px rgb(60 40 20 / 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120f;
    --surface: #1f1b17;
    --ink: #f4ede5;
    --muted: #b3a89b;
    --line: #342d26;
    --brand: #ff7a2e;
    --brand-ink: #1a0d04;
    --brand-soft: #3a2214;
    --alt: #3cc3b2;
    --error: #ff7b6b;
    --ok: #5fd182;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main, .top, footer { max-width: 640px; margin: 0 auto; padding: 0 16px; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 6px;
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 15px; margin-right: 4px;
}
.top-cta { color: var(--brand); font-weight: 600; text-decoration: none; font-size: 0.95rem; }

.hero { padding: 24px 0 8px; }
.eyebrow { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.02em; }
.hl { color: var(--brand); }
.lede { color: var(--muted); margin: 0; font-size: 1.05rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 16px; margin: 18px 0;
}
.card h2 { margin: 0 0 12px; font-size: 1.25rem; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.opt { color: var(--muted); font-weight: 400; }
input, textarea {
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 100%;
}
textarea { resize: vertical; min-height: 104px; }
input:focus-visible, textarea:focus-visible, button:focus-visible, .chip:focus-within {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px;
}
.hint { color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.center { text-align: center; margin: 0; }

fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; background: var(--bg);
}
.chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.chip input { accent-color: var(--brand); margin: 0; }

.tick { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.88rem; color: var(--muted); }
.tick input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--alt); }

.btn {
  font: inherit; font-weight: 700; font-size: 1.05rem; border: 0; border-radius: 12px; cursor: pointer;
  padding: 15px 18px; background: var(--brand); color: var(--brand-ink); min-height: 52px;
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-alt { background: var(--alt); color: #fff; }

.error { color: var(--error); margin: 0; font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.perangkap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.hasil { scroll-margin-top: 12px; }
.hasil-kepala { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; }
.hasil-kepala h2 { margin: 0; font-size: 1.3rem; }
.seksyen-kepala { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.seksyen h3 { margin: 0; font-size: 1.05rem; }
.salin {
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--brand); background: var(--brand-soft);
  border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap;
}
.salin.done { color: var(--ok); }
.item {
  display: flex; gap: 10px; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.item:first-child { border-top: 0; padding-top: 0; }
.item p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.item .label { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 0.88rem; }

.memuat { display: grid; gap: 10px; }
.rangka { height: 64px; border-radius: var(--radius); background: linear-gradient(90deg, var(--line), var(--surface), var(--line)); background-size: 200% 100%; animation: kilat 1.2s infinite linear; }
@keyframes kilat { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .rangka { animation: none; } }

footer { color: var(--muted); font-size: 0.8rem; padding-bottom: 32px; text-align: center; }
