/* DaftarIsiKu — website produksi (statis, tanpa build step).
   Desain: putih/netral, satu aksen hijau tua #14532D, simpel.
   Jangan tambah gradien, hero bombastis, emoji, atau klaim AI. */

button, [role="button"], select, summary, input:not([type="checkbox"], [type="radio"]) { min-height: 2rem; }

:root {
  --bg: #f2f2ef;
  --surface: #ffffff;
  --surface-2: #f7f7f4;
  --ink: #1b1e1b;
  --muted: #5d665d;
  --line: #dcdad2;
  --accent: #14532d;
  --accent-hover: #0e3d21;
  --accent-soft: #e7efe9;
  --warn-bg: #fdf6e3;
  --warn-ink: #6b5410;
  --warn-line: #e8d48a;
  --err-bg: #fdf0ef;
  --err-ink: #7a2e26;
  --err-line: #e8b4ae;
  --paper: #ffffff;
  --paper-ink: #191919;
  --shadow: 0 1px 3px rgba(20, 30, 20, .08), 0 8px 28px rgba(20, 30, 20, .07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131513;
    --surface: #1e211e;
    --surface-2: #262926;
    --ink: #eceee9;
    --muted: #a3aca2;
    --line: #383c37;
    --accent: #2e7d46;
    --accent-hover: #359153;
    --accent-soft: #223528;
    --warn-bg: #33290f;
    --warn-ink: #e8cf7e;
    --warn-line: #6b5a1e;
    --err-bg: #3a1d18;
    --err-ink: #f2c1ba;
    --err-line: #6b3a32;
    --paper: #ffffff;
    --paper-ink: #191919;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
@media (min-width: 560px) {
  .app { box-shadow: var(--shadow); }
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark span { color: var(--accent); }
.mode-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.mode-tag[hidden] { display: none; }
.topbar nav a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 4px;
  display: inline-block;
}

/* ---------- Steps ---------- */
.steps {
  display: flex;
  gap: 0;
  padding: 14px 20px 4px;
}
.step {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  position: relative;
  padding-top: 18px;
}
.step::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  z-index: 1;
}
.step::after {
  content: "";
  position: absolute;
  top: 10px;
  left: calc(-50% + 8px);
  width: calc(100% - 16px);
  height: 2px;
  background: var(--line);
}
.step:first-child::after { display: none; }
.step.done { color: var(--ink); }
.step.done::before { background: var(--accent); border-color: var(--accent); }
.step.done::after { background: var(--accent); }
.step.now { color: var(--accent); font-weight: 700; }
.step.now::before { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Screens ---------- */
main { flex: 1; display: flex; flex-direction: column; }
.screen { display: none; padding: 26px 20px 34px; flex: 1; flex-direction: column; }
.screen.active { display: flex; }
h1 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.lede { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.grow { flex: 1; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn + .btn { margin-top: 10px; }
.fineprint { font-size: 13px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.backlink {
  align-self: flex-start;
  background: none; border: 0; padding: 8px 8px 8px 0;
  color: var(--accent); font: inherit; font-weight: 600;
  cursor: pointer; margin-bottom: 10px;
}

/* ---------- Pesan error ---------- */
.error {
  display: none;
  background: var(--err-bg);
  border: 1px solid var(--err-line);
  color: var(--err-ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 16px 0 0;
}
.error.show { display: block; }

/* ---------- Upload ---------- */
.filecard {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  background: var(--surface-2);
}
.filecard .fname { font-weight: 700; word-break: break-all; margin: 10px 0 2px; }
.filecard .fmeta { color: var(--muted); font-size: 13px; margin: 0; }
.filecard .sample-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 9px; border-radius: 999px;
}
.change-file {
  margin-top: 14px;
  background: none; border: 0; color: var(--accent);
  font: inherit; font-weight: 600; cursor: pointer; padding: 8px;
}
.note {
  font-size: 13px; color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0 0;
}
.note[hidden] { display: none; }

/* ---------- Opsi daftar gambar/tabel ---------- */
.opt-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  margin: 16px 0 0;
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.opt-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.opt-row small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Jenis dokumen ---------- */
.doc-types { margin: 22px 0 4px; }
.doc-types h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Processing ---------- */
.proc-list { list-style: none; margin: 8px 0 0; padding: 0; }
.proc-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.proc-list li:last-child { border-bottom: 0; }
.proc-dot {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.proc-list li.doing { color: var(--ink); font-weight: 600; }
.proc-list li.doing .proc-dot { border-color: var(--accent); border-top-color: transparent; animation: spin .7s linear infinite; }
.proc-list li.ok { color: var(--ink); }
.proc-list li.ok .proc-dot { background: var(--accent); border-color: var(--accent); animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .proc-list li.doing .proc-dot { animation: none; }
}
.wake-note { font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.wake-note[hidden] { display: none; }

/* ---------- Preview / paper ---------- */
.doc-meta {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: 13px; color: var(--muted); margin: 0 0 14px;
}
.doc-meta strong { color: var(--ink); }
.paper {
  background: var(--paper);
  color: var(--paper-ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 30px 26px 34px;
  font-family: "Times New Roman", Times, Georgia, serif;
  margin-bottom: 20px;
  /* Pratinjau tidak bisa diseleksi/disalin — hasil jadi hanya lewat download berbayar. */
  -webkit-user-select: none;
  user-select: none;
}
.paper[hidden] { display: none; }
.paper h2 {
  text-align: center;
  font-size: 17px;
  letter-spacing: .06em;
  margin: 0 0 22px;
  font-weight: 700;
}
.toc-row {
  display: flex;
  align-items: baseline;
  font-size: 14.5px;
  line-height: 1.45;
  margin: 3px 0;
}
.toc-row .t { white-space: normal; }
.toc-row .dots {
  flex: 1;
  border-bottom: 2px dotted #8a8a8a;
  margin: 0 5px;
  min-width: 18px;
  transform: translateY(-3px);
}
.toc-row .p { font-variant-numeric: tabular-nums; }
.toc-row.bold { font-weight: 700; }
.toc-row.lvl1 { padding-left: 20px; }
.toc-row.lvl2 { padding-left: 40px; }
.toc-row.lvl3 { padding-left: 60px; }
@media (max-width: 380px) {
  .paper { padding: 24px 16px 28px; }
  .toc-row { font-size: 13.5px; }
  .toc-row.lvl1 { padding-left: 14px; }
  .toc-row.lvl2 { padding-left: 28px; }
  .toc-row.lvl3 { padding-left: 42px; }
}
.lock-note {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--muted); margin: 0 0 16px;
}
.lock-note svg { flex: none; margin-top: 2px; }

/* ---------- AI Document Checker (v0.6.22) ---------- */
.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 16px;
  background: var(--surface);
}
.notice h3 { font-size: 15px; margin: 0 0 6px; }
.notice ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.notice li + li { margin-top: 4px; }

/* ---------- Bayar ---------- */
.order {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.order .row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 13px 16px; font-size: 15px;
}
.order .row + .row { border-top: 1px solid var(--line); }
.order .row .k { color: var(--muted); flex: none; }
.order .row .v { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.order .row.total { font-weight: 700; font-size: 16px; background: var(--surface-2); }
.qr-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
  background: var(--surface);
}
.qr-box img { display: block; margin: 0 auto 12px; background: #fff; padding: 8px; border-radius: 8px; }
.qr-box p { margin: 0; font-size: 13px; color: var(--muted); }
.qr-box .qr-title { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.qr-box .qr-amount { font-weight: 700; color: var(--ink); font-size: 17px; margin: 2px 0; }
.qr-box .qr-timer { font-weight: 600; color: var(--accent); font-size: 13px; margin-bottom: 8px; }
.success-box {
  text-align: center;
  padding: 26px 10px 8px;
}
.success-box .check {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.success-box h2 { font-size: 20px; margin: 0 0 6px; }
.success-box p { color: var(--muted); margin: 0 0 22px; font-size: 15px; }

/* ---------- Harga ---------- */
.price-list { list-style: none; margin: 0 0 22px; padding: 0; }
.price-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}
.price-list li:last-child { border-bottom: 0; }
.price-list .what { font-size: 15px; }
.price-list .what small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.price-list .amt { font-weight: 700; white-space: nowrap; }
.price-list .amt.free { color: var(--accent); }

footer {
  padding: 16px 20px 22px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
