/* Kalkulator Gratis — kalkulator gratis untuk kreator & UMKM.
   Mobile-first, satu stylesheet, tanpa webfont, tanpa framework.
   Aksen biru; tema mengikuti pengaturan sistem (prefers-color-scheme). */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #dbeafe;
  --accent: #4f46e5;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.92);
  --input-bg: #ffffff;
  --soft: #eff6ff;
  --code-bg: #f1f5f9;
  --warn-bg: #fffbeb;
  --warn-line: #fcd34d;
  --warn-ink: #92400e;
  --footer-bg: #f1f5f9;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 4px 8px rgba(15, 23, 42, 0.08), 0 12px 28px rgba(15, 23, 42, 0.10);
  --radius: 16px;
  --maxw: 920px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #60a5fa;
    --brand-dark: #93c5fd;
    --brand-soft: #1e3a8a;
    --accent: #818cf8;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --line: #334155;
    --bg: #0f172a;
    --card: #1e293b;
    --header-bg: rgba(15, 23, 42, 0.92);
    --input-bg: #0f172a;
    --soft: #172554;
    --code-bg: #0f172a;
    --warn-bg: #292524;
    --warn-line: #b45309;
    --warn-ink: #fde68a;
    --footer-bg: #1e293b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.45), 0 12px 28px rgba(0, 0, 0, 0.4);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--brand); } }
a:hover { color: var(--brand); }
img, svg { max-width: 100%; }
::selection { background: var(--brand-soft); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand span {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand:hover { color: var(--ink); }

/* Category chip bar */
.chipbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.chipbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chipbar-inner::-webkit-scrollbar { display: none; }
.chip-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.chip-link:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip-link[aria-current="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Layout */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 16px 44px;
}
main.narrow { max-width: 780px; }
h1 { font-size: 29px; line-height: 1.22; margin: 10px 0 10px; letter-spacing: -0.02em; }
h2 { font-size: 21px; margin: 34px 0 8px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 20px 0 6px; }
p { margin: 8px 0; }
.lede { color: var(--muted); font-size: 17px; margin-top: 0; max-width: 62ch; }
.small { font-size: 14px; color: var(--muted); }
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin: 0;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--brand); } }

/* Hero (homepage) */
.hero { padding: 14px 0 6px; }
.hero h1 { font-size: clamp(32px, 7.5vw, 44px); }
.hero-compact { padding: 8px 0 0; }
.hero-compact h1 { font-size: clamp(24px, 5.5vw, 30px); margin: 0; }
.hero-compact + section > h2 { margin-top: 12px; }
.hero h1 .grad {
  background: linear-gradient(115deg, var(--brand) 10%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .stats {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.hero .stats b { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { .hero .stats b { color: var(--brand); } }

/* Tool cards */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (min-width: 560px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
.tool-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}
.tool-card:active { transform: translateY(0); }
.tool-card .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}
.tool-card .chip svg { width: 26px; height: 26px; }
.chip-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.chip-indigo { background: linear-gradient(135deg, #6366f1, #4338ca); box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35) !important; }
.tool-card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.tool-card p { margin: 0; font-size: 14px; color: var(--muted); }
.tool-card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 10px;
}
@media (prefers-color-scheme: dark) { .tool-card .tag { color: var(--brand); } }
.tool-card .go {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dark);
}
@media (prefers-color-scheme: dark) { .tool-card .go { color: var(--brand); } }
.tool-card:hover .go { text-decoration: underline; }

/* Tool layout: inputs left, sticky result card right (desktop) */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 18px 0 8px;
  align-items: start;
}
@media (min-width: 860px) {
  .tool-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 22px;
  }
  .result-card { position: sticky; top: 76px; }
}
.calc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.calc h2 { margin-top: 0; }
.example-note {
  font-size: 13px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 8px;
  padding: 8px 11px;
  margin: 0 0 16px;
}
.example-note b { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { .example-note b { color: var(--brand); } }
.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 5px;
}
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.field .hint-block { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.input-wrap { position: relative; }
.input-wrap input[type="text"],
.input-wrap input[type="number"] {
  padding-right: 78px;
}
.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  font-size: 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.suffix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}
/* Slider + numeric pair */
.slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 122px;
  gap: 12px;
  align-items: center;
}
.slider-row input[type="range"] {
  width: 100%;
  height: 48px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

/* Result card */
.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.result-card h2 { margin-top: 0; }
.result-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.result-item:last-child { border-bottom: none; }
.result-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.result-value {
  margin: 3px 0 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}
@media (prefers-color-scheme: dark) { .result-value { color: var(--brand); } }
.result-item.small .result-value { font-size: 21px; }
.result-assumption {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.ref-rows {
  border-top: 1px dashed var(--line);
  margin-top: 11px;
  padding-top: 9px;
}
.ref-rows p { margin: 3px 0; font-size: 14px; color: var(--muted); }
.ref-rows b { color: var(--ink); }
.howto {
  margin-top: 14px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.howto h3 { margin: 0 0 6px; font-size: 14px; }
.howto p { margin: 4px 0; font-size: 14px; }
.error {
  display: none;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 0 0 4px;
}
@media (prefers-color-scheme: dark) {
  .error { color: #fca5a5; background: #450a0a; border-color: #7f1d1d; }
}
.error.visible { display: block; }
.rate-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.trust {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
}
.trust b { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { .trust b { color: var(--brand); } }

/* Callouts */
.notice {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 13px 15px;
  font-size: 14px;
  margin: 16px 0;
}
.notice strong { display: block; margin-bottom: 2px; color: var(--warn-ink); }
.formula {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  overflow-x: auto;
  white-space: nowrap;
}
.formula code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }

/* FAQ */
.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; }

/* Article column: keep long text readable on wide screens */
.prose { max-width: 68ch; }

/* Related + footer */
.related { margin-top: 28px; }
.related ul { padding-left: 20px; margin: 6px 0; }
.related li { margin: 4px 0; }
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 16px 30px;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
.footer-inner a { color: var(--muted); }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.breadcrumb a { color: var(--muted); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Tombol bagikan ke WhatsApp */
.share-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}
.share-wa:hover { background: #1fb857; color: #fff; }

/* Kuis */
.quiz-progress {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.quiz-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 18px;
}
.quiz-bar-fill {
  height: 100%;
  width: 12.5%;
  border-radius: 999px;
  background: linear-gradient(115deg, var(--brand), var(--accent));
  transition: width 0.25s ease;
}
.quiz-question {
  font-size: 21px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  text-align: left;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--input-bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.quiz-option:hover { border-color: var(--brand); background: var(--soft); }
.quiz-option:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.quiz-option.selected {
  border-color: var(--brand);
  background: var(--soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.quiz-nav { display: flex; margin-top: 16px; }

/* Tombol umum */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1.5px solid #2563eb;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--card); color: var(--brand-dark); border-color: var(--brand); }
.btn-block { width: 100%; }

/* Hasil kuis */
.result-actions { display: grid; gap: 10px; margin-top: 16px; }
.result-actions .share-wa { margin-top: 0; }
.persona-tips { margin: 8px 0; padding-left: 20px; }
.persona-tips li { margin: 6px 0; }

/* Chip kartu kuis */
.chip-pink { background: linear-gradient(135deg, #f472b6, #db2777); box-shadow: 0 4px 10px rgba(219, 39, 119, 0.35) !important; }
