:root {
  --ink: #06142f;
  --muted: #64748b;
  --accent: #1d4ed8;
  --accent-soft: #eaf2ff;
  --border: #dce9fa;
  --line: #e5e9f0;
  --bg: #f5faff;
  --card: #ffffff;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --ok: #067647;
  --disc-d: #e34948;
  --disc-i: #1baf7a;
  --disc-s: #eda100;
  --disc-c: #2a78d6;
}

* { box-sizing: border-box; }
/* iOS: cegah zoom karena ketukan ganda, hilangkan kilatan abu-abu, dan matikan gaya bawaan tombol/kolom isian */
button, a.btn, label, select, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, input[type="text"], input[type="email"], input[type="number"], input[type="password"], textarea { -webkit-appearance: none; appearance: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 140px; } /* ruang bawah lebar: tombol tidak menempel di area toolbar Safari iOS */
.wrap.wide { max-width: 1080px; }

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.card.missing { border-color: var(--warn); background: var(--warn-soft); }

.topbar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 8px; margin-bottom: 8px; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.2s; }
.steptext { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }

label.field { display: block; font-weight: 600; margin-bottom: 6px; }
.help { font-size: 14px; color: var(--muted); margin: -2px 0 8px; font-weight: 400; }
.optional { font-weight: 400; color: var(--muted); font-size: 14px; }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #c9d5e6; border-radius: 10px; padding: 11px 12px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #bcd0fb; outline-offset: 1px; border-color: var(--accent); }
.stack > * + * { margin-top: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }

.btn {
  font: inherit; font-weight: 700; border-radius: 10px; padding: 12px 20px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
a.btn { display: inline-block; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--accent); }
.btn.plain { background: #fff; color: var(--ink); border-color: #c9d5e6; font-weight: 600; }
.btn { min-height: 48px; }
.btn.sm { padding: 8px 12px; font-size: 14px; min-height: 40px; }
.btn:disabled { opacity: 0.55; cursor: default; }
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }

.notice { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.notice.warn { background: var(--warn-soft); border: 1px solid #fed7aa; color: #7c2d12; }
.notice.error { background: var(--danger-soft); border: 1px solid #fecdca; color: #7a271a; }
.notice.info { background: var(--accent-soft); border: 1px solid #c9dafa; }
.notice.ok { background: #ecfdf3; border: 1px solid #abefc6; color: #085d3a; }

/* Pilihan Paling / Paling tidak */
.qnum { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.stem { font-weight: 700; margin-bottom: 10px; }
.opt { border-top: 1px solid var(--line); padding: 12px 0; }
.opt:first-of-type { border-top: 0; }
.opt-text { margin-bottom: 8px; }
.pick { display: flex; gap: 8px; }
.pick button {
  flex: 1; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 99px; cursor: pointer;
  background: #fff; color: var(--muted); border: 1px solid #c9d5e6; min-height: 44px;
}
.pick button.on-most { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick button.on-least { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Skala 1–5 */
.likert-text { margin-bottom: 10px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button {
  font: inherit; font-weight: 700; padding: 10px 0; border-radius: 10px; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid #c9d5e6; min-height: 46px;
}
.scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend { font-size: 14px; color: var(--muted); }

.radio-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #c9d5e6; border-radius: 10px; cursor: pointer; background: #fff; }
.radio-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.radio-opt input { margin-top: 4px; width: 18px; height: 18px; flex: none; }

ul.clean { margin: 0 0 12px; padding-left: 20px; }
ul.clean li { margin-bottom: 6px; }

/* Admin */
.tabs { display: flex; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.tabs button { font: inherit; font-weight: 700; padding: 9px 14px; border-radius: 99px; border: 1px solid #c9d5e6; background: #fff; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover { background: var(--bg); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 820px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.stat { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }

.disc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.disc-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.disc-tile.top { border-color: var(--ink); border-width: 2px; }
.swatch { width: 14px; height: 40px; border-radius: 4px; flex: none; }
.disc-letter { font-weight: 800; font-size: 14px; }
.disc-pct { font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.bar-row { display: grid; grid-template-columns: minmax(120px, 42%) 1fr 44px; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.bar-track { height: 10px; background: #eef2f7; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--disc-c); border-radius: 0 4px 4px 0; }
.bar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 4px 0 14px; font-size: 15px; }
.path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
textarea.brief { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; } /* 16px: di bawah itu iOS memperbesar layar saat kolom disentuh */
@media (min-width: 820px) { textarea.brief { font-size: 12px; } }

/* Tahapan alur: Nama → Role → Roadmap → Kuesioner → Hasil */
.phases { list-style: none; display: flex; gap: 4px; margin: 0 0 10px; padding: 0; }
.phases li { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.phase-num { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: #fff; border: 1.5px solid #c9d5e6; color: var(--muted); }
.phase-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phases li.done .phase-num { background: var(--ink); border-color: var(--ink); color: #fff; }
.phases li.now { color: var(--ink); }
.phases li.now .phase-num { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Output profil */
.figure { padding: 12px; }
img.infographic { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; -webkit-touch-callout: default; }
