/* ============================================================
   QWorks Frame Design — stylesheet
   Identitas: lembar kerja perencana struktur — film gambar abu-hijau,
   panel putih, permukaan gelap grafit untuk model 3D, kuning survei
   sebagai aksen tindakan, biru cetak-biru untuk data.
   ============================================================ */
@import url('./ui/charts.css');
@import url('./ui/drawings.css');
@import url('./ui/view3d.css');
@import url('./ui/diagrams.css');

:root {
  --bg: #ECEEEC; --panel: #FFFFFF; --ink: #111827; --ink-2: #4B5563; --ink-3: #6B7280; --line: #E3E6E8; --line-2: #EEF0F2;
  /* permukaan gelap (sidebar, model 3D): aspal QWorks */
  --graphite: #25292D; --graphite-2: #30353A; --graphite-3: #424A51; --graphite-ink: #E9ECEE;
  --side: #25292D; --side-ink: #E9ECEE; --side-mute: #9AA3AB;
  --accent: #EAB308; --accent-hover: #FACC15; --accent-2: #FBF1D3; --accent-ink: #2A2206;
  --blue: #1F6F8B; --blue-2: #E3EFF4; --teal: #1F6F8B; --steel: #8C969B; --concrete: #B9BFBC;
  --ok: #1F8A5B; --ok-2: #E1F3EA; --warn: #B7791F; --warn-2: #FCF1DA; --bad: #C0392B; --bad-2: #FBE3E0;
  --r: 12px; --r-s: 8px; --shadow: 0 1px 2px rgba(16,38,43,.06), 0 4px 14px rgba(16,38,43,.05);
  --font: "Barlow", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-c: "Barlow Semi Condensed", "Barlow", "Arial Narrow", sans-serif;
  --display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
#app { display: grid; grid-template-columns: 272px 1fr; height: 100vh; }
a { color: var(--blue); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.005em; }
small { color: var(--ink-3); font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.spacer { flex: 1; }
.hint { color: var(--ink-3); font-size: 12px; line-height: 1.45; margin-top: 4px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- layar muat / gerbang ---------------------------------- */
.gate { max-width: 460px; margin: 12vh auto; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 32px; }

/* ---- sidebar (seragam Foundation/Pavement Design: tekstur aspal, alur bergaris marka) ---- */
.sidebar { background-color: var(--side); color: var(--side-ink); display: flex; flex-direction: column; overflow-y: auto; padding: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1.3px), radial-gradient(rgba(0,0,0,.25) 1px, transparent 1.4px); background-size: 9px 9px, 13px 13px; background-position: 0 0, 4px 6px; }
.lane-stripe { height: 4px; flex: none; background: repeating-linear-gradient(90deg, #EAB308 0 22px, transparent 22px 36px); }
.brand { display: flex; gap: 6px; align-items: center; height: 64px; padding: 0 16px; color: #fff; flex: none; }
.brand a { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; border-radius: 6px; }
.brand a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.brand img { height: 30px; width: auto; }
.brand-n { font-family: var(--display); font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.tag { flex: none; white-space: nowrap; border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: 700; line-height: 1.3; }
.tag.mod { background: #EAB308; color: #030712; }
.tag.beta { color: #FCD34D; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(245,158,11,.4); }
.brand .nav-close { display: none; margin-left: auto; color: var(--side-mute); border-color: transparent; font-size: 15px; }
.side-sec { font-size: 12px; color: var(--side-mute); padding: 12px 12px 6px; }
.proj-card { display: flex; gap: 10px; align-items: center; margin: 4px 18px 8px; background: rgba(255,255,255,.07); border-radius: 10px; padding: 10px; }
.pc-ico { font-size: 20px; } .pc-n { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; } .pc-s { font-size: 11px; opacity: .7; }
.proj-pick { padding: 12px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; }
.proj-pick label { display: block; font-size: 12px; color: var(--side-mute); margin-bottom: 6px; }
.proj-pick select { width: 100%; background: rgba(255,255,255,.07); color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 600; } .proj-pick select:focus { outline: 2px solid var(--accent); outline-offset: 1px; } .proj-pick select option { color: #111827; background: #fff; font-weight: 400; }
.proj-pick .pc-ws { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; } .proj-pick .pc-ws:hover { text-decoration: underline; }
/* catatan proyek contoh uji coba (qworks-sample.js) */
.proj-pick .pc-sample { margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--qw-rail-muted, var(--side-mute)); } .proj-pick .pc-sample .qw-sample-chip { margin: 0 6px 0 0 !important; }
.nav-in { padding: 8px 10px 8px; }
.steps { position: relative; display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.steps.road::before { content: ""; position: absolute; left: 20px; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: repeating-linear-gradient(to bottom, #E8B321 0 11px, transparent 11px 21px); opacity: .9; transform-origin: top; animation: roadDraw 1.2s cubic-bezier(.3,.7,.2,1) both; }
.steps.road::after { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 27px; border-left: 1px solid rgba(255,255,255,.12); border-right: 1px solid rgba(255,255,255,.12); pointer-events: none; }
@keyframes roadDraw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .steps.road::before { animation: none; } }
.steps.others { margin-top: 4px; }
.step { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-size: 14px; line-height: 1.25; }
.step:hover { background: rgba(255,255,255,.06); }
.step:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.step.on { background: rgba(232,179,33,.13); color: #fff; }
.step.off { opacity: .45; pointer-events: none; }
.step .sn { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 12px var(--display); background: #30353A; border: 2px solid #59626B; color: var(--side-ink); margin-left: -2px; transition: transform .2s; }
.step.done .sn { border-color: #5DBE8C; } .step.warn .sn { border-color: #E8B321; } .step.bad .sn { border-color: #E46A55; }
.step.on .sn { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.08); }
.step .si { display: none; }
.others .step .si { display: grid; place-items: center; width: 22px; height: 22px; flex: none; color: var(--side-mute); } .others .step.on .si { color: var(--accent); }
.step .si svg { width: 18px; height: 18px; display: block; }
.step .sl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .sd { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #5DBE8C; flex: none; } .step .sd.warn { background: #E8B321; } .step .sd.bad { background: #E46A55; }
.step .cnt { margin-left: auto; font: 600 12px var(--display); background: rgba(255,255,255,.1); padding: 1px 7px; border-radius: 9px; }
.side-foot { margin-top: auto; padding: 10px 18px 4px; font-size: 12px; line-height: 1.4; color: var(--side-mute); border-top: 1px solid rgba(255,255,255,.07); } .side-foot b { color: var(--side-ink); font-weight: 600; }
.rail-mods { flex: none; margin-top: 10px; padding: 10px 12px 12px; border-top: 1px solid rgba(255,255,255,.07); }
.mods { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 8px; } .mods a { display: block; font-size: 12px; line-height: 18px; text-align: center; padding: 6px 3px; border-radius: 8px; color: var(--side-ink); text-decoration: none; border: 1px solid rgba(255,255,255,.12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mods a:hover { background: rgba(255,255,255,.06); color: #fff; } .mods a:focus-visible { outline: 2px solid #EAB308; outline-offset: 2px; }
.user-box { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.user-ini { width: 36px; height: 36px; border-radius: 50%; background: #EAB308; color: #030712; font: 600 15px var(--display); display: grid; place-items: center; flex: none; }
.user-txt { min-width: 0; flex: 1; } #user-name { color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #user-email { font-size: 11px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-box .btn { color: var(--side-ink); border-color: transparent; background: transparent; font-size: 16px; } .user-box .btn:hover { background: rgba(255,255,255,.08); }

/* ---- area utama ---------------------------------------------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 32px; background: rgba(236,238,236,.85); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(17,24,39,.1); position: sticky; top: 0; z-index: 5; }
.crumb { min-width: 0; flex: 1; } .crumb-t { font-family: var(--display); font-size: 1.05rem; font-weight: 600; line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.chips { display: flex; gap: 6px; margin-top: 4px; overflow: hidden; } .chip-slot { display: contents; }
.chip { flex: none; white-space: nowrap; border-radius: 6px; padding: 2px 8px; font-size: 12px; line-height: 1.4; background: rgba(17,24,39,.05); color: #374151; box-shadow: inset 0 0 0 1px rgba(17,24,39,.1); }
.chip.hi { background: #FEF3C7; color: #78350F; box-shadow: inset 0 0 0 1px rgba(217,119,6,.25); } .chip b { color: var(--ink); }
.chip.ok { background: var(--ok-2); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(31,138,91,.22); } .chip.bad { background: var(--bad-2); color: var(--bad); box-shadow: inset 0 0 0 1px rgba(192,57,43,.22); } .chip.run { background: var(--blue-2); color: var(--blue); }
.saved { font-size: 13px; color: var(--ok); flex: none; white-space: nowrap; }
/* Tombol "? Panduan" di kepala halaman → /panduan/frame-design#langkah-N (pola Earth Retaining Design) */
.help-link { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; } .help-q { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }
@media print { .help-link { display: none; } }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status-pill.ok { background: var(--ok-2); color: var(--ok); } .status-pill.bad { background: var(--bad-2); color: var(--bad); } .status-pill.warn { background: var(--warn-2); color: var(--warn); } .status-pill.run { background: var(--blue-2); color: var(--blue); }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.content { flex: 1; overflow-y: auto; padding: 28px 32px 80px; position: relative; }
.calc-note { font-size: 11.5px; color: var(--ink-3); margin-top: 28px; max-width: 900px; }

.page-h { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.page-h .ph-txt { flex: 1; min-width: 280px; }
.kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #A16207; font-weight: 600; }
.page-h h1 { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; margin: 2px 0 6px; }
.page-h .lead { color: var(--ink-2); max-width: 820px; margin: 0; }
.page-h .ph-act { display: flex; gap: 8px; flex-wrap: wrap; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; align-items: start; }
.split > .sticky { position: sticky; top: 0; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1180px) { .two-col, .split, .three-col { grid-template-columns: minmax(0, 1fr); } .split > .sticky { position: static; } }
.topbar .menu-btn, .nav-scrim { display: none; }
@media (max-width: 880px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(292px, 86vw); z-index: 60; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.28); }
  body.nav-open .sidebar { transform: none; }
  .brand .nav-close { display: inline-flex; }
  .nav-scrim { position: fixed; inset: 0; background: rgba(20,28,32,.42); z-index: 55; }
  body.nav-open .nav-scrim { display: block; }
  .topbar .menu-btn { display: inline-flex; margin-left: -6px; }
  .topbar { padding: 8px 12px; gap: 8px; min-height: 56px; }
  .topbar .t-x { display: none; } .topbar .saved { font-size: 0; } .topbar .saved::first-letter { font-size: 13px; }
  .crumb { flex: 1; overflow: hidden; } .crumb b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content { padding: 16px 16px 48px; }
}

/* ---- panel ----------------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-h h3 { font-size: 14.5px; font-weight: 600; }
.card-h .meta { margin-left: auto; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-b { padding: 14px 16px; }
.card-b.flush { padding: 0; }
.card.dark { background: var(--graphite); border-color: var(--graphite); color: #E6ECEC; }
.card.dark .card-h { border-color: var(--graphite-3); } .card.dark .card-h .meta { color: #93A0A4; }
.callout { border-radius: 8px; padding: 11px 14px; margin-bottom: 14px; font-size: 13px; border-left: 3px solid transparent; background: var(--line-2); }
.callout.info { background: var(--blue-2); border-color: var(--blue); } .callout.warn { background: var(--warn-2); border-color: var(--warn); }
.callout.ok { background: var(--ok-2); border-color: var(--ok); } .callout.bad { background: var(--bad-2); border-color: var(--bad); }
.callout b { font-weight: 600; }

/* ---- form ------------------------------------------------------- */
.grid { display: grid; gap: 12px 14px; } .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .field.wide { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); } .unit { font-weight: 400; color: var(--ink-3); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #CDD4D1; border-radius: var(--r-s); padding: 7px 9px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(46,92,138,.28); border-color: var(--blue); }
input[type=number], .in-num { font-variant-numeric: tabular-nums; }
input:disabled, select:disabled { background: var(--line-2); color: var(--ink-3); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--blue); padding: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; cursor: pointer; font-size: 13px; } .check input { margin-top: 2px; flex: none; }
.in-s { width: 78px; padding: 5px 7px; } .in-m { min-width: 110px; padding: 5px 7px; }
.fieldset { border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 14px; } .fieldset > h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--ink-2); }
.btn { font: inherit; font-weight: 600; font-size: 13px; border-radius: 7px; padding: 7px 13px; border: 1px solid #CDD4D1; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--line-2); }
.btn.primary { background: #EAB308; border-color: #EAB308; color: #030712; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); } .btn.primary:hover { background: #FACC15; }
.btn.dark { background: var(--graphite); border-color: var(--graphite); color: #fff; } .btn.dark:hover { background: var(--graphite-2); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--line-2); }
.btn.small { padding: 4px 9px; font-size: 12px; } .btn.icon { padding: 3px 8px; line-height: 1; } .btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.row-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid #CDD4D1; border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { font: inherit; font-weight: 600; font-size: 12.5px; padding: 6px 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid #CDD4D1; }
.seg button.on { background: var(--graphite); color: #fff; }
.seg.small button { padding: 4px 9px; font-size: 12px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.toolbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.nav-foot { display: flex; justify-content: space-between; margin: 6px 0 24px; gap: 10px; }
details.more { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; background: var(--panel); }
details.more summary { cursor: pointer; font-weight: 600; font-size: 13px; }

/* ---- tabel ------------------------------------------------------- */
.tbl-wrap { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; font-family: var(--font-c); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl.compact td, .tbl.compact th { padding: 4px 6px; font-size: 12.5px; }
.tbl.input td { padding: 3px 5px; } .tbl.input input, .tbl.input select { padding: 5px 7px; }
.tbl tr.hl td { background: var(--accent-2); } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--line-2); } .tbl tr.sel td { background: var(--blue-2); }
.tbl tr.grp td { background: var(--line-2); font-weight: 600; font-size: 12px; color: var(--ink-2); }
.kv { display: grid; margin: 0; } .kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; } .kv dt { color: var(--ink-2); margin: 0; } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge.ok { background: var(--ok-2); color: var(--ok); } .badge.bad { background: var(--bad-2); color: var(--bad); } .badge.warn { background: var(--warn-2); color: #8F6206; } .badge.info { background: var(--blue-2); color: var(--blue); } .badge.gray { background: var(--line-2); color: var(--ink-2); }
.ratio-bar { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.ratio-bar .rb { flex: 1; height: 6px; background: var(--line-2); border-radius: 3px; position: relative; overflow: hidden; min-width: 60px; }
.ratio-bar .rb i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.ratio-bar .rb::after { content: ""; position: absolute; left: 90.9%; top: -2px; bottom: -2px; width: 1px; background: var(--ink-3); }

/* ---- angka utama -------------------------------------------------- */
.figs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; overflow: hidden; }
.figs > div { padding: 12px 16px; border-right: 1px solid var(--line-2); min-width: 0; }
.figs > div:last-child { border-right: 0; }
.figs .f-l { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.figs .f-v { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.25; margin-top: 2px; white-space: nowrap; }
.figs .f-v small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.figs .f-s { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.figs .f-v.ok { color: var(--ok); } .figs .f-v.bad { color: var(--bad); } .figs .f-v.warn { color: var(--warn); }
@media (max-width: 1280px) { .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .figs > div:nth-child(3n) { border-right: 0; } .figs > div:nth-child(-n+3) { border-bottom: 1px solid var(--line-2); } }

/* ---- verdict (ringkasan) ------------------------------------------ */
.verdict { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r); margin-bottom: 16px; border: 1px solid; }
.verdict.ok { background: var(--ok-2); border-color: #BFE0CC; } .verdict.bad { background: var(--bad-2); border-color: #F0C3BA; }
.verdict .v-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.verdict.ok .v-ic { background: var(--ok); } .verdict.bad .v-ic { background: var(--bad); }
.verdict h2 { font-size: 17px; font-weight: 700; } .verdict p { margin: 3px 0 0; color: var(--ink-2); font-size: 13px; }

/* ---- 3D host ------------------------------------------------------ */
.viewer-host { position: relative; width: 100%; height: 460px; border-radius: var(--r); overflow: hidden; background: var(--graphite); }
.viewer-host.tall { height: calc(100vh - 210px); min-height: 520px; }
.viewer-host.short { height: 340px; }

/* ---- daftar periksa & catatan --------------------------------------- */
.checks { display: flex; flex-direction: column; } .checks .ck { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.checks .ck .ref { font-size: 11.5px; color: var(--ink-3); }
.notes-list { margin: 0; padding: 0; list-style: none; } .notes-list li { padding: 8px 0 8px 22px; border-bottom: 1px solid var(--line-2); position: relative; font-size: 13px; color: var(--ink-2); }
.notes-list li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.notes-list li.warn::before { background: var(--warn); } .notes-list li.bad::before { background: var(--bad); }
.calc { font-family: var(--font); font-size: 13px; line-height: 1.65; background: #F7F9F8; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.calc .eq { font-variant-numeric: tabular-nums; } .calc .ref { color: var(--ink-3); font-size: 11.5px; }

/* ---- pemilih elemen ------------------------------------------------- */
.pick-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pick-list button { font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 7px; border: 1px solid #CDD4D1; background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pick-list button i { width: 8px; height: 8px; border-radius: 50%; }
.pick-list button.on { background: var(--graphite); color: #fff; border-color: var(--graphite); }

/* ---- template proyek ----------------------------------------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tpl { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.tpl .tpl-svg { background: var(--line-2); border-radius: 6px; padding: 6px; } .tpl h4 { font-size: 13.5px; } .tpl p { margin: 0; font-size: 12px; color: var(--ink-2); flex: 1; }

/* ---- proses hitung --------------------------------------------------- */
.running { position: absolute; top: 12px; right: 18px; z-index: 5; }

/* ---- cetak ------------------------------------------------------------ */
@media print {
  @page { size: A4; margin: 14mm 13mm 16mm; }
  body { background: #fff; font-size: 10.5pt; }
  #app { display: block; height: auto; }
  .sidebar, .topbar, .no-print, .calc-note, .nav-foot { display: none !important; }
  .main, .content { overflow: visible !important; padding: 0 !important; }
  .card { break-inside: avoid; border-color: #ccc; }
  .viewer-host { display: none; }
}

/* ---- halaman: komponen tambahan ------------------------------- */
.sec-h { font-size: 18px; font-weight: 700; margin: 22px 0 12px; display: flex; align-items: center; gap: 10px; }
.dim2 { display: inline-flex; align-items: center; gap: 4px; } .dim2 span { color: var(--ink-3); }
.dw-center { display: flex; justify-content: center; } .dw-center > svg { max-width: 100%; height: auto; }
/* gambar kerja = kertas: pada tema gelap tetap putih dengan warna asli (qw-paper mengecualikan pewarnaan ulang SVG global) */
@media screen { html[data-theme="dark"] :is(.dw-center, .dw-pair).qw-paper { padding: 12px; border-radius: 8px; } }
/* tombol segmen aktif pada tema gelap: latar terang + teks gelap (lapisan bersama memaksa teks gelap) */
@media screen { html[data-theme="dark"] .seg button.on { background: var(--qw-ink, #E6EDF3); color: #0B1016; } }
.diag-wrap { overflow-x: auto; }
.live-card .card-b { padding: 12px 14px; }
.ls .ls-top { margin-bottom: 8px; }
.ls-crit { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-2); font-size: 13px; }
.ls-crit .ratio-bar { margin-top: 4px; width: 100%; }
.fd-link { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
/* rujukan mutu dari lab (Concrete Lab / Material Lab) dan jejak perhitungan QWUI.trace */
.lab-ref { margin: 6px 0 4px; padding: 8px 10px; border-radius: 8px; background: var(--line-2); font-size: 13px; }
.lab-ref .hint { margin-top: 3px; }
details.qw-trace-wrap { margin-top: 10px; } details.qw-trace-wrap > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
details.qw-trace-wrap[open] > summary { margin-bottom: 8px; }
.hz-chart { margin-top: 12px; }

/* pratinjau geometri */
.pv { display: block; width: 100%; height: auto; font-family: var(--font); }
.pv-iso { background: var(--graphite); border-radius: 8px; margin-bottom: 12px; }
.pv-iso .pv-c { stroke: #E6ECEC; stroke-width: 2.2; stroke-linecap: round; }
.pv-iso .pv-b { stroke: #8FA4AA; stroke-width: 1.5; }
.pv-iso .pv-slab { fill: rgba(229,165,10,.07); stroke: rgba(229,165,10,.35); stroke-width: .8; }
.pv-light .pv-c { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; } .pv-light .pv-b { stroke: var(--steel); stroke-width: 1; } .pv-light .pv-slab { fill: rgba(46,92,138,.06); stroke: rgba(46,92,138,.25); stroke-width: .6; }
.pv-grid { stroke: var(--steel); stroke-width: .8; stroke-dasharray: 10 3 2 3; }
.pv-bub { fill: #fff; stroke: var(--ink-2); stroke-width: 1; } .pv-bt { font-size: 10px; font-weight: 600; text-anchor: middle; fill: var(--ink); }
.pv-dim { font-size: 10.5px; fill: var(--ink-2); text-anchor: middle; font-variant-numeric: tabular-nums; }
.pv-sec { stroke: var(--blue); stroke-width: 1.4; stroke-dasharray: 5 3; }
.pv-col { fill: var(--ink); } .pv-col.pv-edge { fill: var(--blue); } .pv-col.pv-corner { fill: var(--teal); }

/* ringkasan */
.sum-split .viewer-host { height: 470px; border-radius: 0 0 var(--r) var(--r); }
.sugg { border-color: #EBD3A3; background: linear-gradient(0deg, #fff, #fff) padding-box; }
.sugg .card-h { background: var(--accent-2); border-radius: var(--r) var(--r) 0 0; } .sugg .card-h svg { width: 16px; height: 16px; vertical-align: -3px; }
.sugg-main { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.sugg-t { font-size: 16px; font-weight: 600; }
.sugg-act { display: flex; gap: 8px; }
.sugg-res { margin-top: 10px; padding: 10px 12px; background: var(--line-2); border-radius: 8px; font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.delta { font-weight: 600; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.tbl.cmp td:first-child { font-weight: 600; color: var(--ink-2); white-space: nowrap; }

/* gambar kerja */
.sheet-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .sheet-layout { grid-template-columns: minmax(0, 1fr); } .sheet-nav { position: static; max-height: 260px; } }
.sheet-nav { position: sticky; top: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; max-height: calc(100vh - 140px); overflow-y: auto; }
.sheet-g + .sheet-g { margin-top: 8px; } .sheet-gt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 4px 8px; }
.sheet-nav button { display: block; width: 100%; text-align: left; font: inherit; font-size: 12.5px; padding: 6px 8px; border-radius: 6px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.sheet-nav button:hover { background: var(--line-2); } .sheet-nav button.on { background: var(--graphite); color: #fff; }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sheet-title { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); font-size: 13px; } .sheet-title span { color: var(--ink-3); }
.sheet-body { padding: 16px; overflow-x: auto; } .sheet-body > svg { display: block; width: 100%; height: auto; }

/* laporan */
.report { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 36px 42px; max-width: 1000px; margin: 0 auto; }
.rep-cover { display: flex; flex-direction: column; gap: 12px; padding-bottom: 26px; border-bottom: 2px solid var(--ink); margin-bottom: 26px; }
.rep-brand { font-weight: 700; font-size: 14px; } .rep-brand span { color: var(--ink-3); font-weight: 400; }
.rep-cover h1 { font-size: 27px; line-height: 1.2; max-width: 720px; } .rep-sub { color: var(--ink-2); font-size: 14px; max-width: 760px; }
.rep-iso { background: #F6F8F7; border-radius: 8px; padding: 6px; } .rep-iso svg { display: block; width: 100%; height: auto; }
.rep-status { align-self: flex-start; font-weight: 700; padding: 6px 12px; border-radius: 6px; } .rep-status.ok { background: var(--ok-2); color: var(--ok); } .rep-status.bad { background: var(--bad-2); color: var(--bad); }
.rep-sign { margin-top: 30px; font-size: 13px; }
.rep-sec { margin-bottom: 26px; } .rep-sec h2 { font-size: 18px; margin-bottom: 10px; padding-bottom: 4px; border-bottom: 1px solid var(--line); } .rep-sec h3 { font-size: 14.5px; margin: 14px 0 8px; }
.rep-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.rep-fig { margin: 10px 0; } .rep-fig svg { display: block; width: 100%; height: auto; } .rep-fig figcaption { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
ul.method { margin: 0; padding-left: 18px; } ul.method li { margin: 6px 0; font-size: 13px; color: var(--ink-2); }

@media print {
  .report { border: 0; padding: 0; max-width: none; }
  .rep-cover { break-after: page; min-height: 85vh; }
  .rep-sec h2 { break-after: avoid; } .rep-fig, .tbl-wrap, .rep-two, .kv, .checks { break-inside: avoid; }
  .sheet-layout { display: block; } .sheet { border: 0; } .sheet-title { padding: 0 0 6mm; }
  .content > .page-h, .content > .figs { display: none; }
  .split, .two-col, .three-col { display: block; }
}

/* ---- penyempurnaan ---------------------------------------------- */
.card-h h3 svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.btn.chip { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; background: var(--panel); border-color: #CDD4D1; }
.btn.chip:hover { border-color: var(--ink-3); }
.tbl.input .in-s { width: 64px; }
.toolbar-row select, .card-h .meta select { width: auto; max-width: 340px; }
.rep-foot { font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 24px; }
@media print { .rep-iso svg { max-height: 88mm; width: auto; margin: 0 auto; } .rep-cover { min-height: 0; } }

/* ---- editor denah per lantai ---- */
.pe-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .pe-layout { grid-template-columns: minmax(0, 1fr); } }
.pe-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; } .pe-bar .seg { margin: 0; flex-wrap: wrap; }
.pe-wrap { background: #FAFAF8; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.pe { display: block; width: 100%; height: auto; font-family: var(--font); user-select: none; }
.pe-grid { stroke: #B8C0C6; stroke-width: .8; stroke-dasharray: 8 3 2 3; }
.pe-cell { cursor: pointer; } .pe-cell rect { stroke-width: 1; transition: fill .15s; }
.pe-cell.pe-slab rect { fill: #EEF3F6; stroke: #C9D6DE; } .pe-cell.pe-slab:hover rect { fill: #E1EBF1; }
.pe-cell.pe-void rect { fill: #FFF8E6; stroke: #E8B321; stroke-dasharray: 4 3; } .pe-cell.pe-void line { stroke: #D89B0B; stroke-width: 1.2; } .pe-cell.pe-void:hover rect { fill: #FDEFC8; }
.pe-cell.pe-none rect { fill: transparent; stroke: #C4CACE; stroke-dasharray: 2 4; } .pe-cell.pe-none:hover rect { fill: rgba(17,24,39,.04); }
.pe-cell:focus-visible rect { outline: none; stroke: var(--teal); stroke-width: 2.5; }
.pe-tag { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-anchor: middle; fill: #8A6A10; pointer-events: none; } .pe-none .pe-tag { fill: #9AA3AB; font-weight: 500; letter-spacing: 0; }
.pe-beam { stroke: #4B5563; stroke-width: 3; stroke-linecap: round; pointer-events: none; } .pe-tbeam { stroke: #D9480F; stroke-width: 5.5; }
.pe-col { cursor: pointer; } .pe-col rect { stroke-width: 1.2; } .pe-col line { stroke: #C0392B; stroke-width: 1.6; }
.pe-col.on rect { fill: #111827; stroke: #111827; } .pe-col.on:hover rect { fill: #374151; }
.pe-col.off rect { fill: #fff; stroke: #C0392B; stroke-dasharray: 2 2; } .pe-col.auto rect { fill: #fff; stroke: #B8C0C6; stroke-dasharray: 1.5 2; } .pe-col.auto { cursor: default; }
.pe-col:focus-visible rect { outline: none; stroke: var(--teal); stroke-width: 3; }
.pe-tring { fill: rgba(217,72,15,.12); stroke: #D9480F; stroke-width: 2; }
.pe-hit { fill: transparent; stroke: none; } .pe-col:hover .pe-hit { fill: rgba(31,111,139,.10); }
.pe-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 4px; font-size: 12px; color: var(--ink-2); } .pe-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pe-legend .lg { width: 14px; height: 14px; border-radius: 3px; display: inline-block; } .lg.slab { background: #EEF3F6; border: 1px solid #C9D6DE; } .lg.void { background: #FFF8E6; border: 1px dashed #E8B321; } .lg.none { border: 1px dotted #9AA3AB; }
.pe-cant { cursor: pointer; } .pe-cant rect { stroke-width: 1; transition: fill .15s; }
.pe-cant.pe-c-none rect { fill: transparent; stroke: #C4CACE; stroke-dasharray: 3 3; } .pe-cant.pe-c-none:hover rect { fill: rgba(31,111,139,.07); stroke: #1F6F8B; }
.pe-cant.pe-c-beam rect { fill: #E3EEF4; stroke: #9DB8C7; } .pe-cant.pe-c-beam:hover rect { fill: #D4E5EE; }
.pe-cant.pe-c-slab rect { fill: #F1F5F7; stroke: #B5C3CB; stroke-dasharray: 5 2; } .pe-cant.pe-c-slab:hover rect { fill: #E6EEF2; }
.pe-cant.bad rect { stroke: #C0392B; stroke-dasharray: 3 2; fill: rgba(192,57,43,.06); }
.pe-cant:focus-visible rect { outline: none; stroke: var(--teal); stroke-width: 2.5; }
.pe-kb { stroke: #4B5563; stroke-width: 2.4; stroke-linecap: round; pointer-events: none; } .pe-kfree { stroke: #1F6F8B; stroke-width: 3; stroke-linecap: round; pointer-events: none; }
.pe-ctag { font-size: 9px; font-weight: 600; letter-spacing: .05em; text-anchor: middle; fill: #5B7A8B; pointer-events: none; } .pe-c-none .pe-ctag { fill: #9AA3AB; font-size: 12px; font-weight: 500; }
.lg.kb { background: #E3EEF4; border: 2px solid #4B5563; } .lg.ks { background: #F1F5F7; border: 1px dashed #B5C3CB; border-right: 3px solid #1F6F8B; }
.pv-cant { fill: rgba(31,111,139,.08); stroke: #9DB8C7; stroke-dasharray: 4 3; }
.lg.col { background: #111827; width: 10px; height: 10px; } .lg.coff { border: 1px dashed #C0392B; width: 10px; height: 10px; } .lg.tr { border-radius: 50%; border: 2px solid #D9480F; background: rgba(217,72,15,.12); } .lg.tb { height: 4px; border-radius: 2px; background: #D9480F; }
.pv-iso .pv-t, .pv-light .pv-t { stroke: #F07B3F; stroke-width: 2.6; }
html[data-theme="dark"] .pe-wrap { background: var(--panel); border-color: var(--line); }
html[data-theme="dark"] .pe-cell.pe-slab rect { fill: rgba(148,163,184,.14); stroke: rgba(148,163,184,.35); } html[data-theme="dark"] .pe-cell.pe-slab:hover rect { fill: rgba(148,163,184,.24); }
html[data-theme="dark"] .pe-cell.pe-void rect { fill: rgba(234,179,8,.12); } html[data-theme="dark"] .pe-tag { fill: #FCD34D; } html[data-theme="dark"] .pe-none .pe-tag { fill: #94A3B8; }
html[data-theme="dark"] .pe-beam { stroke: #CBD5E1; } html[data-theme="dark"] .pe-tbeam { stroke: #FB8C4F; }
html[data-theme="dark"] .pe-col.on rect { fill: #E6EDF3; stroke: #E6EDF3; } html[data-theme="dark"] .pe-col.off rect, html[data-theme="dark"] .pe-col.auto rect { fill: var(--panel); }
html[data-theme="dark"] .pe .pv-bub { fill: var(--panel); stroke: #94A3B8; } html[data-theme="dark"] .pe .pv-bt { fill: var(--ink); } html[data-theme="dark"] .pe-grid { stroke: #475569; }
html[data-theme="dark"] .pe-cant.pe-c-beam rect { fill: rgba(56,189,248,.12); stroke: rgba(148,163,184,.45); } html[data-theme="dark"] .pe-cant.pe-c-slab rect { fill: rgba(148,163,184,.08); stroke: rgba(148,163,184,.4); }
html[data-theme="dark"] .pe-kb { stroke: #CBD5E1; } html[data-theme="dark"] .pe-kfree { stroke: #38BDF8; } html[data-theme="dark"] .pe-ctag { fill: #94A3B8; } html[data-theme="dark"] .pv-cant { fill: rgba(56,189,248,.08); stroke: #475569; }
html[data-theme="dark"] .lg.slab { background: rgba(148,163,184,.2); } html[data-theme="dark"] .lg.col { background: #E6EDF3; }

/* ---- Laporan & ekspor (seragam Foundation/Pavement Design) ---- */
.rep-layout { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .rep-layout { grid-template-columns: minmax(0, 1fr); } }
.rep-side { position: sticky; top: 0; max-height: calc(100vh - 6rem); overflow-y: auto; padding-right: 2px; }
.rep-side .card { margin-bottom: 12px; } .rep-side select.wide { width: 100%; } .rep-side .check { margin-top: 8px; }
.rep-secs { list-style: none; margin: 10px 0 0; padding: 0; } .rep-secs li { border-top: 1px solid var(--line-2); padding: 6px 0; font-size: 13px; } .rep-secs li.na { color: var(--ink-3); } .rep-secs label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.rep-sign-set { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; display: grid; gap: 6px; } .rep-sign-set b { font-size: 12px; color: var(--ink-2); }
.static { padding: 8px 10px; background: #F3F4F6; border-radius: 8px; font-size: 13px; }
.rep-exports { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; } .rep-exports button { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--ink); } .rep-exports button:hover { background: #F7F7F5; } .rep-exports .ico { color: var(--teal); flex: none; } .rep-exports .ico svg { width: 16px; height: 16px; display: block; margin-top: 2px; } .rep-exports b { display: block; font-size: 13px; } .rep-exports small { display: block; color: var(--ink-3); font-size: 11px; }
.rep-preview { background: rgba(17,24,39,.06); border-radius: 14px; padding: 14px; } .rep-preview .report { margin: 0 auto; box-shadow: var(--shadow); }
.rep-blk + .rep-blk { margin-top: 26px; } .rep-foot { font-size: 10px; }
[data-kop-card] { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; font-size: 13px; } [data-kop-card] h2 { font-size: 15px; font-weight: 600; margin: 0 0 6px; } [data-kop-card] p { margin: 0 0 8px; color: var(--ink-2); } [data-kop-card] select { margin-top: 4px; width: 100%; } [data-kop-card] label { display: block; }
.refs { font-size: 12px; padding-left: 18px; } .refs li { margin: 3px 0; }
@media print {
  .rep-layout { display: block; } .rep-side, #rp-info, .content > .callout { display: none !important; }
  .rep-preview { background: none; padding: 0; border-radius: 0; } .rep-preview .report { box-shadow: none; }
  .rep-blk.pb { break-before: page; } .rep-cover { break-after: auto; min-height: 0; gap: 8px; padding-bottom: 14px; margin-bottom: 0; break-inside: avoid; }
  .rep-cover h1 { font-size: 22px; } .rep-cover .rep-iso { padding: 2px; } .rep-cover .rep-iso svg { max-height: 70mm; }
  .rep-cover .kv > div { padding: 3px 0; font-size: 10pt; } .rep-sign { margin-top: 10px; } .rep-sign .qw-sign-space { height: 40px !important; }
}

/* ---- layar ponsel (diletakkan terakhir agar menimpa aturan di atas) ---- */
@media (max-width: 640px) {
  .page-h h1 { font-size: 22px; } .page-h .ph-txt { min-width: 0; flex-basis: 100%; }
  .verdict { grid-template-columns: auto 1fr; padding: 14px; gap: 12px; } .verdict > :last-child:not(:nth-child(2)) { grid-column: 1 / -1; justify-self: start; }
  .verdict h2 { font-size: 15.5px; } .verdict .v-ic { width: 36px; height: 36px; }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs > div { border-right: 1px solid var(--line-2) !important; border-bottom: 1px solid var(--line-2); }
  .figs > div:nth-child(2n) { border-right: 0 !important; }
  .figs .f-v { font-size: 19px; }
  .card-b { padding: 12px; } .card-h { padding: 11px 12px; }
  .viewer-host { height: 380px; } .viewer-host.tall { height: calc(100vh - 170px); min-height: 420px; }
  .report { padding: 20px 16px; }
}

/* tautan rujukan pasal → Civil Learning */
.ck .ref a.learn { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.ck .ref a.learn:hover { text-decoration-style: solid; }
@media print { .ck .ref a.learn { text-decoration: none; } }
