:root {
    --paper: #F3F5F7;
    --surface: #FFFFFF;
    --ink: #13263A;
    --slate: #5B6B7B;
    --line: #D5DCE3;
    --red: #D7262E;
    --red-soft: #FCEBEC;
    --green: #1F8A5B;
    --green-soft: #E5F4EC;
    --amber-soft: #FFF4DB;
    --rail-w: 248px;
    --bar-h: 56px;
    --r-sm: 6px;
    --r-md: 12px;
    --sans: "Plus Jakarta Sans", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    background: var(--paper);
    color: var(--ink);
    font: 400 17px/1.55 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
code { font: 500 .86em var(--mono); background: #E8EDF2; padding: .1em .35em; border-radius: 4px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.12; }
h3 { font-size: 1.05rem; font-weight: 700; margin-top: .4rem; }
p { margin: 0; }
strong, b { font-weight: 700; }
.muted { color: var(--slate); font-size: .88rem; }
[hidden] { display: none !important; }

/* ---------- Rail: 12 langkah ---------- */
.rail {
    position: fixed; inset: 0 auto 0 0; width: var(--rail-w);
    background: var(--ink); color: #C9D4DF;
    padding: 22px 14px; display: flex; flex-direction: column; gap: 18px;
    overflow-y: auto;
}
.rail-brand { color: #fff; font-weight: 800; font-size: 1.4rem; text-decoration: none; letter-spacing: -.03em; padding: 0 8px; }
.rail-brand span { color: var(--red); margin-left: 6px; }
.rail-brand small { display: block; font-size: .72rem; font-weight: 500; color: #8DA2B6; letter-spacing: 0; margin-top: 2px; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail button {
    width: 100%; display: flex; gap: 10px; align-items: center; text-align: left;
    background: none; border: 0; padding: 7px 8px; border-radius: var(--r-sm); color: inherit; font-size: .86rem;
}
.rail button b {
    flex: none; width: 26px; height: 26px; display: grid; place-items: center;
    border: 1.5px solid #3A5068; border-radius: 50%; font-size: .78rem;
}
.rail button:hover { background: #1C3550; }
.rail button.done b { background: #2A4560; border-color: #2A4560; color: #fff; }
.rail button.now { background: #1C3550; color: #fff; }
.rail button.now b { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Deck & slides ---------- */
.deck { position: fixed; inset: 0 0 var(--bar-h) var(--rail-w); }
.slide {
    position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: clamp(24px, 4vw, 56px) clamp(16px, 5vw, 72px) 40px;
    display: flex; flex-direction: column; gap: clamp(16px, 2.4vw, 28px);
    visibility: hidden; opacity: 0; transform: translateX(24px);
    transition: opacity .35s ease, transform .35s ease, visibility 0s .35s;
}
.slide.active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.slide.past { transform: translateX(-24px); }
.slide > * { width: 100%; max-width: 1180px; margin-inline: auto; flex-shrink: 0; }
.slide > .sub { max-width: 1180px; }

/* Header: nomor langkah besar sebagai elemen visual */
.s-head { display: flex; gap: clamp(14px, 2vw, 28px); align-items: flex-start; }
.step-num {
    flex: none; font-weight: 800; line-height: .8;
    font-size: clamp(64px, 9vw, 128px); letter-spacing: -.06em;
    color: transparent; -webkit-text-stroke: 2px var(--red);
}
.step-of { color: var(--slate); font-size: .85rem; font-weight: 600; }
.sheets { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 2px 10px 2px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; }
.sheets > span { display: inline-flex; gap: 3px; }
.sheets i, .rail-sheets i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.sheets i.on { width: 16px; background: var(--red); }
.rail-sheets { margin-left: auto; display: flex; gap: 3px; flex: none; }
.rail-sheets i { width: 5px; height: 5px; background: #3A5068; }
.rail-sheets i.on { width: 12px; background: var(--red); }
.s-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); font-weight: 800; max-width: 28ch; margin-top: 2px; }
.s-head .sub, .sub { color: var(--slate); max-width: 70ch; }

/* Grids */
.grid { display: grid; gap: clamp(18px, 3vw, 40px); align-items: start; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-2-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.g-1-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 2.7fr); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.big { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.4; font-weight: 500; max-width: 46ch; }
.note { border-left: 3px solid var(--green); padding: 4px 0 4px 14px; color: var(--ink); max-width: 75ch; }
.scope { color: var(--slate); max-width: 80ch; font-size: .95rem; }

/* ---------- Cover ---------- */
.cover { flex-direction: row; align-items: center; justify-content: center; gap: clamp(24px, 5vw, 80px); }
.cover > * { margin: 0; width: auto; }
.cover-text { flex: 1 1 520px; max-width: 640px; display: flex; flex-direction: column; gap: 18px; }
.org { font-weight: 800; color: var(--red); font-size: 1.05rem; letter-spacing: .02em; }
.org span { display: block; font-weight: 500; color: var(--slate); font-size: .9rem; letter-spacing: 0; margin-top: 2px; }
.closing .org span { color: #A9BACB; }
.cover h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.lede { color: var(--slate); font-size: 1.05rem; max-width: 56ch; }
.meta { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 28px; margin: 8px 0 0; }
.meta dt { font-size: .8rem; color: var(--slate); }
.meta dd { margin: 0; font-weight: 600; font-size: .95rem; }

.sync-demo {
    flex: 0 1 380px; margin: 0; background: var(--surface); border: 1px solid var(--line);
    border-radius: 18px; padding: 24px; box-shadow: 0 24px 48px -28px rgba(19, 38, 58, .45);
    display: flex; flex-direction: column; gap: 14px;
}
.sd-item { display: flex; flex-direction: column; gap: 2px; }
.sd-code { font: 600 .8rem var(--mono); color: var(--slate); }
.sd-item strong { font-size: 1.15rem; }
.sd-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.sd-row span { color: var(--slate); font-weight: 600; }
.sd-num { font-size: clamp(3rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.sd-local .sd-num { color: var(--red); transition: color .4s; }
.sd-status { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; padding: 10px 12px; border-radius: var(--r-sm); background: var(--red-soft); color: #9C1C22; transition: background .4s, color .4s; }
.sd-status i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.sync-demo.synced .sd-local .sd-num { color: var(--green); }
.sync-demo.synced .sd-status { background: var(--green-soft); color: #136641; }

/* ---------- Agenda ---------- */
.s-head.plain h2 { max-width: none; }
.agenda-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.agenda-list button {
    width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 16px; font-weight: 600; font-size: 1rem; transition: border-color .2s;
}
.agenda-list button b { font-size: 1.7rem; font-weight: 800; color: var(--red); min-width: 1.6em; letter-spacing: -.04em; }
.agenda-list button:hover { border-color: var(--ink); }

/* ---------- Profile ---------- */
.profile { display: grid; gap: 12px; margin: 0; }
.profile div { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; }
.profile dt { color: var(--slate); font-size: .9rem; }
.profile dd { margin: 0; font-weight: 600; }
.problem { margin: 0; background: var(--red-soft); border-left: 4px solid var(--red); padding: 16px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-weight: 600; }
.problem span { display: block; font-size: .82rem; color: #9C1C22; margin-bottom: 4px; font-weight: 700; }

/* ---------- Tabs ---------- */
[role="tablist"] { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
[role="tab"] { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 600; color: var(--slate); white-space: nowrap; }
[role="tab"][aria-selected="true"] { color: var(--ink); border-color: var(--red); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 82ch; }
.facts li { padding-left: 18px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--ink); border-radius: 2px; }
.why { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: w; max-width: 760px; }
.why li { counter-increment: w; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px 12px 52px; position: relative; }
.why li::before { content: counter(w); position: absolute; left: 14px; top: 12px; font-weight: 800; color: var(--slate); }
.why li span { display: block; font-size: .85rem; color: var(--slate); }
.why li.root { border-color: var(--red); background: var(--red-soft); font-weight: 600; }
.why li.root::before { color: var(--red); }

/* ---------- Flows ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.flow li {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 10px 12px; font-size: .92rem; font-weight: 600; flex: 1 1 110px; margin-right: 14px;
}
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -15px; top: 50%; border: 6px solid transparent; border-left-color: var(--slate); transform: translateY(-50%); }
.flow li.pain { background: var(--red-soft); border-color: #F1B7BA; color: #8A1A1F; }
.flow.good li { background: var(--green-soft); border-color: #B5DEC8; color: #135C3B; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 6px; }
.stats div { border-top: 3px solid var(--ink); padding-top: 10px; }
.stats b { display: block; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats span { font-size: .82rem; color: var(--slate); }

/* Screenshots */
.shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.shot button { padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); cursor: zoom-in; display: block; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: .85rem; color: var(--slate); }
.shot.sm { max-width: 520px; }

/* ---------- Gemba (kronologi) ---------- */
[data-build] { transition: opacity .4s ease, transform .4s ease; }
[data-build]:not(.built) { opacity: 0; transform: translateY(8px); pointer-events: none; }
.gemba { display: flex; flex-direction: column; gap: 14px; }
.gemba-lead { font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.45; max-width: 62ch; }
.gemba-path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: g; }
.gemba-path li { counter-increment: g; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 16px 16px 54px; }
.gemba-path li::before { content: counter(g); position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: .82rem; }
.gemba-path li.here { border: 2px solid var(--ink); }
.gemba-path li.here::before { background: var(--ink); color: #fff; }
.gemba-path strong { display: block; margin-bottom: 4px; }
.gemba-path p { font-size: .9rem; color: var(--slate); }
.gemba-insight { margin: 0; padding: 14px 18px; border-left: 4px solid var(--green); background: var(--green-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: clamp(1.1rem, 1.8vw, 1.45rem); font-weight: 700; line-height: 1.35; }
.gemba-insight span { display: block; font-size: .8rem; font-weight: 700; color: #136641; margin-bottom: 4px; }

/* ---------- Tahapan (3 fase) ---------- */
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.phase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.phase header { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.phase-no { font-size: .78rem; font-weight: 700; color: var(--red); }
.phase h3 { font-size: 1.15rem; margin: 2px 0; }
.phase header p { font-size: .82rem; color: var(--slate); }
.milestones { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.milestones::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.milestones li { position: relative; padding-left: 24px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; }
.milestones li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--slate); }
.milestones li.key::before { background: var(--red); border-color: var(--red); }
.milestones time { font-weight: 800; font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.milestones strong { font-size: .92rem; }
.milestones p { grid-column: 1 / -1; font-size: .82rem; color: var(--slate); line-height: 1.4; }
.legend { font-size: .82rem; color: var(--slate); display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* ---------- Usulan ---------- */
.usulan { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
.usulan article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 8px; font-size: .94rem; }
.usulan article.primary { background: var(--ink); color: #E4EBF2; border-color: var(--ink); }
.usulan article.primary h3 { color: #fff; font-size: 1.25rem; }
.tag { margin-top: auto; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; align-self: flex-start; }
.tag.ok { background: var(--green); color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .82rem; color: var(--slate); font-weight: 700; background: #F8FAFB; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 700; min-width: 12em; }
td.bad { color: #9C1C22; }
td.ok { color: #136641; font-weight: 600; }
.diff td:nth-child(2) { color: var(--slate); }
.diff td:nth-child(3) { background: #FAFDFB; }

/* ---------- Process ---------- */
.process { margin: 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 10px; }
.process li { counter-increment: p; position: relative; padding: 0 0 12px 46px; border-bottom: 1px dashed var(--line); }
.process li::before { content: counter(p); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: .85rem; font-weight: 600; }

/* ---------- Architecture ---------- */
.arch { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.arch-flow { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.nodes li { position: relative; padding-bottom: 8px; }
.nodes li:not(:last-child)::after { content: ""; position: absolute; left: 27px; bottom: 0; height: 8px; width: 2px; background: var(--line); transition: background .3s; }
.nodes li.lit:not(:last-child)::after { background: var(--green); }
.nodes button {
    width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; text-align: left;
    padding: 7px 14px 7px 46px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
    position: relative; transition: border-color .25s, background .25s;
}
.nodes button::before { content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--slate); background: var(--surface); transition: all .25s; }
.nodes button b { font-size: .98rem; }
.nodes button span { font: 500 .78rem var(--mono); color: var(--slate); text-align: right; }
.nodes button:hover { border-color: var(--ink); }
.nodes button[aria-current="true"] { border-color: var(--ink); background: #EEF2F6; }
.nodes li.lit button::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.arch-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.primary-btn { background: var(--ink); color: #fff; border: 0; border-radius: 99px; padding: 10px 20px; font-weight: 700; }
.primary-btn:hover { background: #1F3A56; }
.primary-btn:disabled { opacity: .55; cursor: progress; }
.elapsed { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--slate); font-size: .9rem; }
.simbar { height: 6px; background: #E3E8EE; border-radius: 3px; overflow: hidden; }
.simbar i { display: block; height: 100%; width: 0; background: var(--green); }
.console {
    margin: 0; background: var(--ink); color: #CFE0D6; border-radius: var(--r-md); padding: 14px 16px;
    font: 400 .78rem/1.6 var(--mono); min-height: 8em; overflow-x: auto; white-space: pre;
}
.console .muted { color: #8DA2B6; }
.console .t { color: #8DA2B6; }
.console .k { color: #FFD08A; }
.arch-detail { min-width: 0; }
.arch-detail article { min-width: 0; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.code { margin: 0; background: #0F2131; color: #DCE7F0; border-radius: var(--r-sm); padding: 14px; font: .78rem/1.6 var(--mono); overflow-x: auto; }

/* Tiruan Produk Monitor (gaya aplikasi: AdminLTE/Bootstrap) */
.pm { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); font: 12px/1.4 system-ui, sans-serif; color: #1f2937; overflow: hidden; }
.pm-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eef0f3; flex-wrap: wrap; }
.pm-count { font-size: 10.5px; border: 1px solid #dee2e6; border-radius: 4px; padding: 0 6px; background: #f8f9fa; }
.pm-search { margin-left: auto; border: 1px solid #ced4da; border-radius: 4px; padding: 3px 8px; color: #9aa0a6; min-width: 120px; }
.pm-btn { background: #007bff; color: #fff; border-radius: 4px; padding: 3px 10px; font-weight: 600; }
.pm-scroll { overflow-x: auto; }
.pm table { font-size: 12px; min-width: 720px; }
.pm th { background: #f7f8fa; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; padding: 7px 6px; white-space: nowrap; }
.pm td { padding: 7px 6px; border-bottom: 1px solid #f1f3f5; white-space: nowrap; vertical-align: middle; }
.pm .r { text-align: right; }
.pm .k { font-family: ui-monospace, Menlo, monospace; color: #374151; }
.pm .b { font-weight: 700; }
.pm .acc { font-weight: 600; color: #4338ca; cursor: help; }
.pm .out { font-weight: 600; color: #b25e00; }
.pm .muted { color: #9aa0a6; }
.pm .t { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.pm .grup { background: #f3e8ff; color: #6d28d9; }
.pm .per { background: #eef2ff; color: #4338ca; }
.pm .ok, .pm .warn { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; cursor: help; }
.pm .ok { background: #e7f7ee; color: #1a7f47; }
.pm .ok::before { content: "✓ "; }
.pm .warn { background: #fff4e5; color: #b25e00; }
.pm .warn::before { content: "⚠ "; }
.pm .s { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.pm .man { background: #e8f4fd; color: #1565c0; }
.pm .auto { background: #e6f9ee; color: #1a7f47; }
.pm .act i { display: inline-grid; place-items: center; width: 22px; height: 20px; border: 1px solid #ced4da; border-radius: 4px; margin-right: 3px; font-style: normal; color: #6c757d; font-size: 11px; }
.pm .act i:first-child { border-color: #007bff; color: #007bff; }

/* ---------- Mode sync ---------- */
.day { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 10px; padding-top: 18px; margin: 4px 0; background: linear-gradient(90deg, var(--green-soft), var(--amber-soft) 70%, #E3E8EE) 0 0 / 100% 10px no-repeat; }
.day span { font-size: .78rem; color: var(--slate); font-weight: 600; border-left: 2px solid var(--ink); padding-left: 8px; }
.day span:nth-child(2) { text-align: center; border-left: 0; }
.day span:last-child { text-align: right; border-left: 0; border-right: 2px solid var(--ink); padding: 0 8px 0 0; }
.sim { display: flex; flex-direction: column; gap: 12px; }
.sim label, .nqi label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; }
input[type="number"] { font: 600 1.05rem var(--sans); padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); width: 100%; }
input[type="number"]:focus { outline: 3px solid var(--ink); outline-offset: 0; }
.sim-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sim-out > div { border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.sim-out span { font-size: .82rem; font-weight: 700; }
.sim-out b { font-size: 2.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.sim-out small { font-size: .78rem; }
.warn { background: var(--amber-soft); color: #7A5200; }
.okbox { background: var(--green-soft); color: #136641; }

/* ---------- Poka-yoke ---------- */
.pokayoke dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
.pokayoke div { padding: 12px 0; border-top: 1px solid var(--line); }
.pokayoke dt { font-weight: 700; }
.pokayoke dd { margin: 4px 0 0; color: var(--slate); font-size: .94rem; }

/* ---------- Sesudah ---------- */
.after-tabs [role="tabpanel"] { display: flex; flex-direction: column; gap: 18px; }
.compare { display: grid; gap: 14px; }
.compare-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.compare-tag { font-weight: 800; font-size: .9rem; text-align: center; padding: 8px 0; border-radius: var(--r-sm); }
.compare-tag.bad { background: var(--red-soft); color: #9C1C22; }
.compare-tag.ok { background: var(--green-soft); color: #136641; }
.compare .flow li { padding: 14px 14px; font-size: .95rem; }
.deltas { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deltas div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.deltas dt { font-size: .85rem; color: var(--slate); font-weight: 600; }
.deltas dd { margin: 6px 0 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.deltas s { color: #9C1C22; font-size: .95rem; }
.deltas b { color: #136641; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.branches { color: var(--slate); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.branches b { color: var(--ink); }
.branches span { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: .85rem; font-weight: 600; color: var(--ink); }
.shots-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.shot.one { max-width: 960px; }
.after-tabs .shot button { width: fit-content; max-width: 100%; }
.after-tabs .shot img { max-height: 54vh; width: auto; max-width: 100%; }

/* ---------- Biaya & manfaat ---------- */
.ledger { margin: 0; display: grid; gap: 0; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .94rem; }
.ledger dt { color: var(--slate); }
.ledger dd { margin: 0; font-weight: 600; text-align: right; }
.qcdsmp { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qcdsmp li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 16px 16px 64px; position: relative; font-size: .92rem; color: var(--slate); }
.qcdsmp b { position: absolute; left: 16px; top: 14px; font-size: 2rem; font-weight: 800; color: var(--red); line-height: 1; }
.qcdsmp strong { display: block; color: var(--ink); font-size: 1rem; }

/* ---------- NQI ---------- */
.nqi { display: grid; grid-template-columns: minmax(260px, 1fr) 1.4fr; gap: 28px; align-items: start; }
.nqi-in { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nqi fieldset { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 14px 16px; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nqi fieldset.nqi-rows { grid-template-columns: 1fr; gap: 6px; }
.nqi-row { display: grid; grid-template-columns: minmax(0, 1fr) 58px 58px 52px; gap: 6px; align-items: center; font-size: .86rem; font-weight: 600; }
.nqi-row small { display: block; font-weight: 400; color: var(--slate); font-size: .74rem; }
.nqi-row input { padding: 6px 8px; font-size: .95rem; }
.nqi-row output { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.nqi-hdr { font-size: .72rem; color: var(--slate); font-weight: 600; }
.nqi-hdr span { text-align: center; }
.nqi-hdr span:last-child { text-align: right; }
.nqi legend { font-weight: 700; padding: 0 6px; }
.nqi label small { font-weight: 400; color: var(--slate); font-size: .74rem; }
.nqi-out { display: flex; flex-direction: column; gap: 16px; }
.nqi-out dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nqi-out dl div { border-top: 2px solid var(--ink); padding-top: 8px; }
.nqi-out dt { font-size: .82rem; color: var(--slate); }
.nqi-out dd { margin: 2px 0 0; font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.nqi-total { background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 20px 22px; }
.nqi-total span { color: #A9BACB; font-weight: 600; font-size: .9rem; }
.nqi-total b { display: block; font-size: clamp(2.2rem, 4.6vw, 3.6rem); letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.nqi-total p { color: #CFE0D6; font-weight: 600; }
.nqi-soft { border-left: 3px solid var(--green); background: var(--surface); border-radius: 0 var(--r-md) var(--r-md) 0; padding: 12px 16px; }
.nqi-soft h3 { margin: 0 0 6px; font-size: .95rem; }
.nqi-soft ul { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 4px; }
.nqi-in > .muted { margin: 0; font-size: .82rem; }

/* Rincian manfaat */
.stat-btn { all: unset; cursor: pointer; display: block; }
.stat-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.stat-btn u { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

.breakdown th small, .breakdown td small { display: block; font-weight: 400; color: var(--slate); font-size: .82rem; margin-top: 3px; max-width: 52ch; }
.breakdown .r { text-align: right; }
.breakdown .num { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.breakdown .nowrap { white-space: nowrap; font-size: .88rem; }
.breakdown tfoot > * { border-top: 2px solid var(--ink); border-bottom: 0; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.pill.ok { background: var(--green-soft); color: #136641; }
.pill.warn { background: var(--amber-soft); color: #7A5200; }

/* ---------- Kesimpulan ---------- */
.conclude { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.conclude li { padding-left: 30px; position: relative; }
.conclude li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.who { font-size: .85rem; color: var(--slate); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.who span { font-weight: 700; color: var(--ink); }

/* ---------- Closing ---------- */
.closing { justify-content: center; background: var(--ink); color: #fff; }
.closing h2 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; max-width: 14ch; margin: 14px 0 20px; }
.closing .lede { color: #A9BACB; }
.sign { margin-top: 40px; font-weight: 700; }
.sign span { font-weight: 400; color: #A9BACB; }

/* ---------- Bar ---------- */
.bar {
    position: fixed; left: var(--rail-w); right: 0; bottom: 0; height: var(--bar-h);
    display: flex; align-items: center; gap: 8px; padding: 0 20px;
    background: var(--paper); border-top: 1px solid var(--line);
}
.progress { position: absolute; left: 0; right: 0; top: -1px; height: 3px; }
.progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .35s ease; }
.nav-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.nav-btn:hover { border-color: var(--ink); }
.nav-btn:disabled { opacity: .35; cursor: default; }
.counter { border: 0; background: none; font-weight: 700; font-variant-numeric: tabular-nums; padding: 8px 10px; min-width: 64px; }
.hint { margin-left: auto; font-size: .8rem; color: var(--slate); display: flex; align-items: center; gap: 6px; }
kbd { font: 600 .72rem var(--sans); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; background: var(--surface); }

/* ---------- Dialogs ---------- */
dialog { border: 0; border-radius: 16px; padding: 24px; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(19, 38, 58, .6); }
.close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: var(--paper); border-radius: 50%; font-size: 1.4rem; line-height: 1; }
.overview { width: min(720px, 92vw); }
.overview h2 { font-size: 1.3rem; margin-bottom: 12px; }
.overview ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.overview li button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-sm); font-size: .92rem; display: flex; gap: 10px; }
.overview li button span { color: var(--slate); min-width: 1.8em; font-variant-numeric: tabular-nums; }
.overview li button:hover, .overview li button[aria-current="true"] { background: var(--paper); }
.lightbox { width: min(1400px, 96vw); padding: 56px 16px 16px; }
.pm-zoom { cursor: zoom-in; border-radius: var(--r-md); }
.lightbox .pm-scroll { overflow: visible; }
.lightbox .pm table { font-size: 14px; }
.lightbox img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
.lightbox p { margin-top: 10px; color: var(--slate); font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .usulan { grid-template-columns: 1fr 1fr; }
    .usulan article.primary { grid-column: 1 / -1; }
    .arch { grid-template-columns: minmax(0, 1fr); }
    .agenda-list { grid-template-columns: repeat(2, 1fr); }
    .phases { grid-template-columns: minmax(0, 1fr); }
    .pokayoke dl { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    :root { --rail-w: 0px; }
    .rail { display: none; }
    body { font-size: 16px; }
    .grid.g-2, .grid.g-2-3, .grid.g-3-2, .grid.g-1-3, .nqi { grid-template-columns: minmax(0, 1fr); }
    .cover { flex-direction: column; align-items: stretch; justify-content: flex-start; }
    .cover-text, .sync-demo { flex: none; max-width: none; }
    .meta { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .pokayoke dl, .qcdsmp, .gemba-path, .phases, .deltas, .shots-2 { grid-template-columns: 1fr; }
    .compare-row { grid-template-columns: 1fr; }
    .hide-sm { display: none !important; }
    .nqi-out { order: -1; }
    .bar { justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 560px) {
    .agenda-list, .usulan, .sim-out, .nqi-out dl, .overview ol { grid-template-columns: 1fr; }
    .s-head { flex-direction: column; gap: 6px; }
    .step-num { font-size: 56px; }
    .profile div { grid-template-columns: 1fr; gap: 0; }
    .flow li { flex-basis: 100%; margin-right: 0; margin-bottom: 12px; }
    .flow li:not(:last-child)::after { right: auto; left: 20px; top: auto; bottom: -15px; transform: none; border-left-color: transparent; border-top-color: var(--slate); }
    [role="tablist"] { margin-inline: -16px; padding-inline: 16px; }
        .nodes button { grid-template-columns: 1fr; }
    .nodes button span { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .slide { transform: none !important; }
}
@media print {
    [data-build] { opacity: 1 !important; transform: none !important; }
    body { overflow: visible; }
    .rail, .bar { display: none; }
    .deck { position: static; }
    .slide { position: relative; visibility: visible; opacity: 1; transform: none; break-after: page; overflow: visible; min-height: 100vh; }
}

/* Bukti data: sparkline item per bulan, satu skala untuk semua cabang */
.evidence th small { display: block; font-weight: 400; color: var(--slate); font-size: .78rem; }
.evidence th, .evidence td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 26px; }
.spark i { width: 14px; height: max(var(--h), 1px); background: var(--ink); border-radius: 2px 2px 0 0; }

/* Kesimpulan: tempat video testimoni (ganti dengan <video> saat file siap) */
.voc-video { margin: 0; aspect-ratio: 16 / 9; border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface); display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--slate); text-align: center; }
.voc-video span { font-size: 2.4rem; line-height: 1; }
.voc-video figcaption { font-weight: 700; color: var(--ink); }
.voc-video small { display: block; font-weight: 400; color: var(--slate); }
