:root {
  color-scheme: light;
  --page: #f7f5f2;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --accent: #1f4fc4;
  --accent-ink: #ffffff;
  --accent-soft: #e8eefb;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  /* ordinal blue ramp (Top -> bottom) + neutral + red arm for scales */
  --o1: #1c5cab; --o2: #3987e5; --o3: #c3c2b7; --o4: #ec9a95; --o5: #d03b3b;
  --good: #006300; --bad: #d03b3b; --warn-bg: #fff4d6; --warn-ink: #6b4a00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: #3d2820; --brand-2: #7a4e36; --bronze: #b98a5e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #242422;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,.1);
    --accent: #6b93ee; --accent-soft: #1c2640;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
    --o1: #5598e7; --o2: #256abf; --o3: #4a4a46; --o4: #9c4a47; --o5: #e66767;
    --good: #0ca30c; --bad: #e66767; --warn-bg: #3a2f12; --warn-ink: #f5d488;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #242422;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,.1);
  --accent: #6b93ee; --accent-soft: #1c2640;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;
  --o1: #5598e7; --o2: #256abf; --o3: #4a4a46; --o4: #9c4a47; --o5: #e66767;
  --good: #0ca30c; --bad: #e66767; --warn-bg: #3a2f12; --warn-ink: #f5d488;
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden], .banner:empty { display: none !important; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); line-height: 1.45; font-size: 15px; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 14px; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; margin-right: auto; }
.brand small { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.nav a.on { background: var(--accent-soft); color: var(--accent); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.wrap.narrow { max-width: 760px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.muted { color: var(--muted); } .ink2 { color: var(--ink-2); }
.small { font-size: 13px; }

button, .btn { font: inherit; font-size: 14px; font-weight: 600; border-radius: 8px; padding: 9px 16px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { background: var(--surface-2); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.primary:hover { filter: brightness(1.08); background: var(--accent); }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

input[type=text], input[type=number], input[type=date], input[type=month], input[type=tel], input[type=password], select, textarea {
  font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink);
}
textarea { min-height: 70px; resize: vertical; }
label { display: block; }

/* ---------- Form ---------- */
.progress { height: 4px; background: var(--grid); border-radius: 4px; overflow: hidden; margin: 8px 0 0; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.steps { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.steps button { padding: 6px 10px; font-size: 13px; white-space: nowrap; font-weight: 500; }
.steps button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.steps button.done { border-color: var(--accent); color: var(--accent); }
.sec-head { margin: 8px 0 12px; }
.sec-head p { margin: 4px 0 0; }
.q { padding: 14px 0; border-top: 1px solid var(--grid); }
.q:first-child { border-top: 0; padding-top: 0; }
.q-label { font-weight: 600; margin-bottom: 8px; display: flex; gap: 8px; }
.q-no { flex: none; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.q-hint { font-size: 13px; color: var(--muted); margin: -4px 0 8px; }
.req { color: var(--bad); }
.sub { margin-top: 10px; }
.sub > .sub-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span { display: inline-block; padding: 7px 12px; border: 1px solid var(--axis); border-radius: 999px; font-size: 14px; background: var(--surface); user-select: none; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:disabled + span { opacity: .4; }
.nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.nps .chip span { width: 100%; text-align: center; padding: 8px 0; border-radius: 8px; }
.nps-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.unit { display: flex; align-items: center; gap: 8px; }
.unit input { max-width: 240px; }
.unit em { font-style: normal; color: var(--muted); font-size: 13px; }
.other-in { margin-top: 6px; max-width: 360px; }
.mtx { width: 100%; border-collapse: collapse; font-size: 14px; }
.mtx th, .mtx td { padding: 7px 6px; border-bottom: 1px solid var(--grid); text-align: center; }
.mtx th:first-child, .mtx td:first-child { text-align: left; }
.mtx thead th { font-size: 12px; color: var(--ink-2); font-weight: 600; vertical-align: bottom; }
.mtx input { width: 18px; height: 18px; accent-color: var(--accent); }
.mtx-scroll { overflow-x: auto; }
.err { color: var(--bad); font-size: 13px; margin-top: 6px; }
.q.invalid .q-label { color: var(--bad); }
.formnav { pointer-events: none; display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--page) 30%); }
.banner { padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.done-box { text-align: center; padding: 40px 16px; }
.done-box .big { font-size: 40px; }

/* ---------- Dashboard ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters label { font-size: 12px; color: var(--muted); font-weight: 600; }
.filters select { width: auto; min-width: 130px; padding: 7px 10px; font-size: 14px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 12px 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .lab { font-size: 13px; color: var(--ink-2); }
.kpi .val { font-size: 30px; font-weight: 650; margin-top: 4px; letter-spacing: -.01em; }
.kpi .foot { font-size: 12px; color: var(--muted); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 12px; }
.grid2 > .card + .card { margin-top: 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 20px 0 12px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 12px; color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ch-title { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.ch-meta { font-size: 12px; color: var(--muted); margin: 2px 0 12px 34px; }
.ch-title + .ch-meta { margin-left: 34px; }
.ch-title.nono + .ch-meta { margin-left: 0; }

.bars { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 6px 10px; align-items: center; font-size: 13px; }
.bars .lab { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.bars .track { height: 16px; position: relative; border-left: 1px solid var(--axis); }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
.bars .num { font-variant-numeric: tabular-nums; color: var(--ink); min-width: 70px; text-align: right; }
.bars .num small { color: var(--muted); }
.bars .row-hit { display: contents; }
.bars .row-hit:hover .lab { color: var(--ink); }
.bars .row-hit:hover .fill { filter: brightness(1.1); }

.stack { display: flex; height: 22px; gap: 2px; }
.stack i { display: block; height: 100%; min-width: 0; }
.stack i:first-child { border-radius: 4px 0 0 4px; } .stack i:last-child { border-radius: 0 4px 4px 0; }
.stack-rows { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 8px 10px; align-items: center; font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.gbars { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: 10px 10px; align-items: center; font-size: 13px; }
.gbars .set { display: grid; gap: 2px; border-left: 1px solid var(--axis); }
.gbars .b { height: 8px; border-radius: 0 4px 4px 0; min-width: 2px; }

.stat-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 10px; }
.stat-row div b { display: block; font-size: 20px; font-weight: 650; }
.stat-row div span { font-size: 12px; color: var(--muted); }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 90px; border-bottom: 1px solid var(--axis); }
.hist i { flex: 1; background: var(--s1); border-radius: 4px 4px 0 0; min-height: 1px; }
.hist-ax { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

.verb { max-height: 280px; overflow: auto; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.verb li { padding: 7px 0; border-bottom: 1px solid var(--grid); }
.verb li small { color: var(--muted); margin-left: 6px; }
.verb-search { margin-bottom: 8px; padding: 6px 10px; font-size: 13px; }

.tip { position: fixed; pointer-events: none; z-index: 50; background: var(--ink); color: var(--page); font-size: 12px; padding: 6px 9px; border-radius: 6px; max-width: 280px; opacity: 0; transition: opacity .08s; }
.tip.on { opacity: 1; }
.empty { text-align: center; padding: 48px 16px; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.badge.ok { background: #e3f3e3; color: #006300; }
:root[data-theme="dark"] .badge.ok { background: #13301a; color: #7fd67f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.ok { background: #13301a; color: #7fd67f; } }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
table.data th { color: var(--ink-2); font-weight: 600; font-size: 12px; }
table.data td.n { font-variant-numeric: tabular-nums; text-align: right; }
.scroll-x { overflow-x: auto; }

@media (max-width: 600px) {
  .nps { grid-template-columns: repeat(6, 1fr); }
  .kpi .val { font-size: 26px; }
  .bars, .gbars { grid-template-columns: minmax(80px, 40%) 1fr auto; }
  .gbars { grid-template-columns: minmax(80px, 40%) 1fr; }
}
@media print { .topbar, .filters, .toolbar, .tabs, .formnav { display: none !important; } }
.formnav button { pointer-events: auto; }


/* ---------- Brand header ---------- */
.brand { flex-direction: row; align-items: center; gap: 10px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); flex: none; }
.topbar .in { padding-top: 8px; padding-bottom: 8px; }

.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero .in { position: relative; max-width: 1180px; margin: 0 auto; padding: 24px 16px; }
.hero h1 { font-size: clamp(26px, 5vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; margin: 6px 0 8px; }
.hero p { margin: 0; max-width: 46ch; font-size: 15px; color: rgba(255,255,255,.88); }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.18); align-self: flex-start; }

/* Form: foto banner */
.hero-photo { background: #2b231f url(img/hero-sm.jpg) 62% 40% / cover no-repeat; transition: min-height .25s ease; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(22,15,11,.88) 0%, rgba(22,15,11,.45) 45%, rgba(22,15,11,.05) 75%); }
.hero-photo .in { min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; max-width: 760px; }
.hero-photo.compact .in { min-height: 0; padding-top: 14px; padding-bottom: 14px; }
.hero-photo.compact h1 { font-size: 20px; margin: 0; }
.hero-photo.compact .eyebrow, .hero-photo.compact p { display: none; }
.hero-photo.compact::before { background: rgba(22,15,11,.62); }
@media (min-width: 701px) {
  .hero-photo { background-image: url(img/hero.jpg); background-position: center 12%; }
  .hero-photo::before { background: linear-gradient(90deg, rgba(22,15,11,.86) 0%, rgba(22,15,11,.6) 34%, rgba(22,15,11,0) 62%); }
  .hero-photo .in { min-height: 420px; justify-content: center; max-width: 1180px; }
  .hero-photo.compact .in { max-width: 760px; }
}

/* Dashboard: band bronze + foto motor */
.hero-band { background: radial-gradient(120% 140% at 85% 30%, var(--bronze) 0%, var(--brand-2) 35%, var(--brand) 75%); }
.hero-band::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: rgba(255,255,255,.12); }
.hero-band .in { display: flex; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 0; min-height: 200px; }
.hero-copy { flex: 1; min-width: 0; padding-bottom: 18px; }
.hero-band p { font-variant-numeric: tabular-nums; }
.hero-bike { flex: none; width: clamp(150px, 26vw, 280px); height: auto; align-self: flex-end; margin-bottom: -6px; filter: drop-shadow(0 14px 18px rgba(0,0,0,.35)); }
@media (max-width: 520px) { .hero-bike { width: 120px; } .hero-band .in { min-height: 160px; } }

/* sentuhan form */
.sec-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.steps button.on { background: var(--brand); }
.progress > i { background: linear-gradient(90deg, var(--brand-2), var(--accent)); }
.chip span { transition: background .12s, border-color .12s; }
.chip:hover span { border-color: var(--accent); }
.kpi .val { font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .hero-photo, .chip span { transition: none; } }
