 .crumb { color: var(--muted); font-size: 12px; }
  .crumb a { color: var(--brand); font-weight: 700; }
  h1 { margin-top: 4px; font-size: 28px; line-height: 1.2; letter-spacing: -.6px; }
  .expand { margin-top: 4px; max-width: 70ch; color: var(--muted); }
  .page-head { margin-bottom: 18px; }

  .summary { display: grid; gap: 12px; margin-bottom: 18px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .sum-card { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .sum-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .sum-roman { color: var(--brand); font-weight: 800; font-size: 12px; letter-spacing: .5px; }
  .sum-count, .sum-bukti { color: var(--muted); font-size: 12px; }
  .sum-name { margin-top: 2px; font-weight: 700; }
  .sum-num { font-size: 24px; font-weight: 800; line-height: 1.3; }
  .sum-num small { font-size: 12px; font-weight: 600; color: var(--muted); }
  .dash { color: var(--muted); }
  .meter { width: 100%; height: 6px; margin-top: 6px; }
  .meter .bg { fill: var(--line); }
  .meter .fg { fill: var(--brand); }

  .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
  .panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; overflow: clip; }
  .list-panel { display: flex; flex-direction: column; position: sticky; top: 14px; height: calc(100vh - 28px); height: calc(100dvh - 28px); }
  .list-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }

  .search-wrap { position: sticky; top: 0; z-index: 6; flex: 0 0 auto; padding: 10px 12px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .search-box {
    display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px;
    border: 2px solid var(--brand); border-radius: 12px; background: var(--surface);
    box-shadow: 0 2px 0 var(--brand-soft);
  }
  .search-box:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
  .search-ico { flex: 0 0 20px; width: 20px; height: 20px; color: var(--brand); }
  .search {
    flex: 1; min-width: 0; min-height: 44px; padding: 8px 0; border: 0; outline: 0; border-radius: 0;
    background: transparent; font-weight: 700; -webkit-appearance: none; appearance: none;
  }
  .search::placeholder { color: var(--muted); font-weight: 600; opacity: 1; }
  .search::-webkit-search-cancel-button, .search::-webkit-search-decoration { -webkit-appearance: none; display: none; }
  .search-clear {
    flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0;
    border: 0; border-radius: 8px; background: var(--brand-soft); color: var(--brand-dark); font-size: 18px; line-height: 1; font-weight: 800;
  }
  .search-clear:hover { background: var(--brand-line); }
  .search-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding-top: 6px; }
  .search-count { color: var(--muted); font-size: 12px; }
  .link-btn { min-height: 28px; padding: 2px 4px; border: 0; background: none; color: var(--brand); font-size: 12px; font-weight: 800; }
  .link-btn:hover { text-decoration: underline; }

  .coach {
    display: flex; gap: 10px; align-items: flex-start; margin: 12px 14px;
    padding: 10px 12px; border: 1px solid var(--brand-line); border-left-width: 4px;
    border-radius: 10px; background: var(--notice-bg); color: var(--brand-dark); font-size: 13px; font-weight: 600;
  }
  .coach strong { font-weight: 800; }
  .coach-dot { position: relative; flex: 0 0 10px; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--brand); }
  .coach-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--brand); animation: ping 1.6s ease-out infinite; }
  .coach.done .coach-dot::after { animation: none; opacity: 0; }
  @keyframes ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
  @keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(194, 65, 12, .55); } 60% { box-shadow: 0 0 0 7px rgba(194, 65, 12, 0); } }

  details.bag > summary, details.kat > summary, details.more > summary { list-style: none; cursor: pointer; user-select: none; }
  details > summary::-webkit-details-marker { display: none; }
  .bag-sum, .kat-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
  .bag-sum { padding: 12px 16px; background: var(--bag-bg); color: var(--bag-ink); border-top: 1px solid var(--line); font-weight: 800; }
  details.bag:first-of-type > .bag-sum { border-top: 0; }
  .bag-sum .roman { margin-right: 8px; color: var(--bag-accent); }
  .kat-sum { padding: 10px 16px 10px 22px; border-top: 1px solid var(--line); font-weight: 700; }
  .kat-sum .kcode { margin-right: 6px; color: var(--brand); }
  .kat-sum > span:first-child, .bag-sum > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .sum-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
  .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; flex: 0 0 auto; }
  details[open] > summary .chev { transform: rotate(90deg); }
  .tag { padding: 3px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }

  .rows-head {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center;
    padding: 6px 16px 6px 22px; border-top: 1px solid var(--line); background: var(--surface-2);
    color: var(--muted); font-size: 12px; font-weight: 700;
  }
  .th-id { display: inline-flex; align-items: center; gap: 4px; }
  .tip {
    display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0;
    border: 1px solid var(--brand-line); border-radius: 50%; background: var(--notice-bg);
    color: var(--brand-dark); font-size: 12px; font-weight: 800; line-height: 1;
  }
  .tip:hover { background: var(--brand-soft); }

  .rows-head {
    display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center;
    padding: 6px 16px 6px 22px; border-top: 1px solid var(--line); background: var(--surface-2);
    color: var(--muted); font-size: 12px; font-weight: 700;
  }
  .row {
    display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: start;
    padding: 12px 16px 12px 22px; border-top: 1px solid var(--line-soft); font-size: 13px;
  }
  .row.active { background: var(--notice-bg); box-shadow: inset 3px 0 0 var(--brand); }
  .id-link {
    display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 32px;
    padding: 4px 8px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-dark);
    font-size: 12px; font-weight: 800; line-height: 1.2; letter-spacing: .2px;
    font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
   a.id-link:hover { background: var(--brand-line); }
  .id-link.off { background: var(--pill-bg); color: var(--muted); }
  .id-link.nudge { animation: nudge 1.8s ease-out infinite; }
  .row-name { min-width: 0; overflow-wrap: anywhere; }
  .row-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .row-text.open { display: block; -webkit-line-clamp: unset; }
  .row-sub { display: block; color: var(--muted); font-size: 12px; }
  .row-val { min-width: 34px; font-weight: 800; text-align: right; }
  .row-val.empty { color: var(--muted); }
  .more-btn { display: inline-block; min-height: 28px; padding: 3px 0; border: 0; background: none; color: var(--brand); font-size: 12px; font-weight: 700; }

  details.more { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  details.more[open] { border-color: var(--brand-line); }
  summary.more-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 4px 10px; color: var(--brand-dark); font-size: 12px; font-weight: 800; }
  summary.more-sum:hover { background: var(--notice-bg); border-radius: 9px; }
  .more-body { display: grid; gap: 12px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
  .more-body h4 { margin: 0 0 4px; color: var(--ink); font-size: 12px; font-weight: 800; }
  .more-body p, .bukti-list li { color: var(--muted); font-size: 12px; line-height: 1.55; }
  .bukti-list { margin: 0; padding-left: 18px; list-style: disc; }
  .bukti-list li { margin: 0 0 4px; }
  .more-body .insight { margin: 0; }

  .insight {
    margin-top: 8px; padding: 8px 12px;
    border: 1px solid var(--brand-line); border-left: 4px solid var(--brand);
    border-radius: 10px; background: var(--notice-bg);
  }

  .insight h4 { margin: 0 0 2px; font-size: 12px; font-weight: 800; color: var(--brand-dark); }
  .insight p  { margin: 0; font-size: 13px; color: var(--ink); }

  .bukti-inline { margin: 0; padding: 0; list-style: none; counter-reset: bk; color: var(--muted); font-size: 12px; }
  .bukti-inline li { display: inline; counter-increment: bk; }
  .bukti-inline li::before { content: "(" counter(bk) ") "; font-weight: 700; color: var(--brand-dark); }
  .bukti-inline li:not(:last-child)::after { content: "; "; }

  .bukti-list { margin: 0; padding-left: 18px; list-style: disc; }
  .more-body p, .bukti-list li { color: var(--muted); font-size: 12px; }
  .bukti-list li { margin: 0 0 4px; }

  .row-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
  .st { padding: 1px 8px; border-radius: 999px; background: var(--pill-bg); color: var(--pill-ink); font-size: 12px; font-weight: 700; }
  .st-proses { background: var(--warn-bg); color: var(--warn-ink); }
  .st-lengkap { background: var(--ok-bg); color: var(--ok-ink); }
  .bukti-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 10px; border: 1px solid var(--brand-line); border-radius: 999px; background: var(--surface); color: var(--brand-dark); font-size: 12px; font-weight: 700; }
  .bukti-btn:hover { background: var(--notice-bg); }
  .bukti-btn svg { width: 13px; height: 13px; }
  .bukti-btn.locked { color: var(--muted); border-style: dashed; border-color: var(--line); }

  .empty-note { padding: 26px 18px; color: var(--muted); text-align: center; }

  .pop { position: fixed; z-index: 90; width: min(300px, calc(100vw - 24px)); padding: 12px 14px; border: 1px solid var(--brand-line); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); font-size: 13px; }
  .pop a { display: inline-block; margin-top: 8px; padding: 7px 14px; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 800; }

  .viewer { position: sticky; top: 14px; height: calc(100vh - 28px); height: calc(100dvh - 28px); display: flex; flex-direction: column; }
  .viewer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .viewer-title { min-width: 0; flex: 1 1 160px; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .viewer-pos { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
  .viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .vbtn { min-height: 36px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 12px; font-weight: 700; white-space: nowrap; }
  .vbtn.primary { border-color: var(--brand); background: var(--brand); color: #fff; }
  .viewer-link { display: inline-flex; align-items: center; min-height: 36px; color: var(--brand); font-weight: 700; font-size: 12px; white-space: nowrap; }
  .viewer-close { display: none; }
  .viewer-empty { flex: 1; display: grid; place-content: center; padding: 24px; text-align: center; color: var(--muted); }
  .viewer-empty ul { margin-top: 14px; }
  .viewer-empty li a { display: inline-block; padding: 4px 0; color: var(--brand); font-weight: 700; }
  .viewer-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px; background: var(--track); }
  .pg { position: relative; max-width: 900px; margin: 0 auto 10px; aspect-ratio: 1 / 1.414; background: var(--surface); box-shadow: 0 1px 4px rgba(15, 23, 42, .15); overflow: hidden; }
  .pg.is-range { outline: 3px solid var(--brand); outline-offset: -3px; }
  .pg img { width: 100%; height: auto; }
  .pg-no { position: absolute; top: 6px; right: 8px; padding: 1px 8px; border-radius: 6px; background: rgba(15, 23, 42, .65); color: #fff; font-size: 12px; }
  .pg.is-target .pg-no { background: var(--brand); }
  .pg-more { display: block; width: 100%; max-width: 900px; min-height: 44px; margin: 0 auto 10px; padding: 9px; border: 1px dashed var(--brand-line); border-radius: 10px; background: var(--surface); color: var(--brand-dark); font-weight: 700; }
  .tools-left { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; min-width: 0; }
.scale-dd { position: relative; }
.scale-dd > summary { display: inline-flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; white-space: nowrap; }
.scale-dd > summary::-webkit-details-marker { display: none; }
.scale-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 20;
  width: min(420px, calc(100vw - 48px)); max-height: min(60vh, 420px); overflow-y: auto;
  padding: 12px 14px; border: 1px solid var(--brand-line); border-radius: 12px;
  background: var(--surface); box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
}
.scale-title { margin-bottom: 10px; font-size: 12px; font-weight: 800; }
.scale-list { display: grid; gap: 10px; }
.scale-item { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 12px; }
.scale-no { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; }
.scale-0 { background: var(--pill-bg); color: var(--pill-ink); }
.scale-1, .scale-2 { background: var(--warn-bg); color: var(--warn-ink); }
.scale-3 { background: var(--brand-soft); color: var(--brand-dark); }
.scale-4, .scale-5 { background: var(--ok-bg); color: var(--ok-ink); }



  @media (max-width: 1100px) {
    .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  }
  @media (max-width: 900px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .list-panel { position: static; height: auto; }
    .list-scroll { overflow: visible; }
    .viewer { display: none; }
    .viewer.mobile-open { display: flex; position: fixed; inset: 0; z-index: 60; height: auto; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom); }
    .viewer.mobile-open .viewer-head { padding-top: calc(10px + env(safe-area-inset-top)); }
    .viewer-close { display: inline-block; }
    .id-link { min-height: 40px; }
    .tip { width: 28px; height: 28px; }
    h1 { font-size: 24px; }
  }
  @media (max-width: 560px) {
    .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .sum-card { padding: 12px; }
    .coach { margin: 10px; }
    .bag-sum { padding-inline: 12px; }
    .kat-sum { padding-inline: 14px 12px; }
    .rows-head, .row { grid-template-columns: 84px minmax(0, 1fr) auto; padding-inline: 12px; gap: 8px; }
    .search-wrap { padding: 8px 10px 6px; }
    .viewer-actions { width: 100%; }
    .viewer-actions .vbtn { flex: 1 1 auto; }
    .viewer-body { padding: 6px; }
    .pg { margin-bottom: 6px; }
  }
  @media (max-height: 520px) and (orientation: landscape) {
    .viewer.mobile-open .viewer-head { padding-block: 6px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .coach-dot::after, .id-link.nudge { animation: none; }
    .chev { transition: none; }
  }


  :root[data-tema="dark"] {
  --surface-2: #0e1626;
  --line-soft: #1a2740;
  --track: #0b1220;
  --pill-bg: #1e293b;
  --pill-ink: #cbd5e1;
  --warn-bg: #3a2a0a;
  --warn-ink: #fcd34d;
  --ok-bg: #052e16;
  --ok-ink: #86efac;
  --bag-bg: #162036;
  --bag-ink: #e6edf7;
  --bag-accent: #fb923c;
}

.rekap-btn { display: inline-flex; align-items: center; min-height: 30px; padding: 2px 12px; border: 1px solid var(--brand-line); border-radius: 999px; background: var(--surface); color: var(--brand-dark); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.rekap-btn:hover { background: var(--brand-soft); }
.rekap-btn:focus-visible, .rekap-x:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rekap-dlg { box-sizing: border-box; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: auto; overflow: auto; overscroll-behavior: contain; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.rekap-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.rekap-in { display: block; }
.rekap-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.rekap-head h3 { min-width: 0; margin: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.rekap-head .kcode { margin-right: 6px; color: var(--brand); }
.rekap-x { flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }

.rekap-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 18px 18px;
  list-style: none;
}

.rekap-list li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-2);
  min-width: 0;
}

.rekap-label {
  font-weight: 800;
  line-height: 1.5;
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}

.rekap-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rekap-uraian {
  display: block;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.rekap-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.rekap-desc p {
  margin: 0 0 8px;
}

.rekap-desc p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .rekap-head { padding: 14px 14px 10px; }
  .rekap-list { padding: 12px 14px 14px; }
  .rekap-list li { grid-template-columns: minmax(0, 1fr); row-gap: 4px; padding: 10px 12px; }
  .rekap-label:empty { display: none; }
}
@media (pointer: coarse) { .rekap-btn { min-height: 36px; } }
body:has(.rekap-dlg[open]) { overflow: hidden; }

.sum-right { flex: 0 0 auto; }
.rekap-btn { flex: 0 0 auto; white-space: nowrap; min-height: 32px; padding: 4px 14px; border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.rekap-short { display: none; }
.rekap-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.rekap-grup { padding: 14px 18px 4px; }
.rekap-grup + .rekap-grup { border-top: 1px solid var(--line-soft); }
.rekap-grup h4 { margin: 0 0 8px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.rekap-grup h4 .kcode { margin-right: 6px; color: var(--brand); }
.rekap-grup .rekap-list { padding: 0 0 12px; }
@media (max-width: 640px) {
  .rekap-full { display: none; }
  .rekap-short { display: inline; }
  .rekap-grup { padding: 12px 14px 2px; }
}

.rekap-grup { padding: 0; }
.rekap-grup + .rekap-grup { border-top: 1px solid var(--line-soft); }
.rekap-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 18px; list-style: none; cursor: pointer; user-select: none; font-size: 14px; font-weight: 700; line-height: 1.4; }
.rekap-sum::-webkit-details-marker { display: none; }
.rekap-sum:hover { background: var(--surface-2); }
.rekap-sum:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.rekap-sum-t { min-width: 0; overflow-wrap: anywhere; }
.rekap-sum-t .kcode { margin-right: 6px; color: var(--brand); }
.rekap-grup .rekap-list { padding: 4px 18px 14px; }
.rekap-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.rekap-all { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--brand-dark); font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.rekap-all:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) {
  .rekap-sum { padding: 10px 14px; }
  .rekap-grup .rekap-list { padding: 2px 14px 12px; }
  .rekap-all { padding: 0 10px; }
}

/* Popup rekap: ukuran responsif */
dialog[id^="rekap-"] {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: 16px;
  overflow: auto; overscroll-behavior: contain;
}
dialog[id^="rekap-"]::backdrop { background: rgba(15, 23, 42, .55); }
