/* ============================================================
   QWorks Civil Learning — stylesheet
   Token mengikuti design system QWorks (concrete, ink, signal,
   brand-accent). Kuning sinyal hanya untuk satu aksi utama per layar.
   Warna gambar: biru = reaksi/data, jingga = beban, abu = pembanding.
   ============================================================ */
:root {
  --bg: #ECEEEC; --surface: #FFFFFF; --surface-2: #F3F4F6; --ink: #101828; --ink-strong: #030712; --ink-2: #364153; --muted: #4A5565; --faint: #6A7282;
  --line: #D1D5DC; --line-subtle: #E5E7EB;
  --panel: #101828; --panel-raised: #1E2939; --panel-ink: #FFFFFF; --panel-muted: #99A1AF;
  --signal: #FDB503; --signal-hover: #D08700; --signal-tint: #FEF9C2;
  --accent: #1D4ED8; --accent-tint: #E8EEFB; --brand: #0D192B;
  --load: #CA3500; --load-tint: #FFF1EB; --teal: #00786F; --teal-tint: #E6F4F2;
  --success: #007A55; --success-tint: #ECFDF5; --warning: #973C00; --warning-tint: #FFFBEB; --danger: #C10007; --danger-tint: #FEF2F2;
  --soil-1: #E8D9BF; --soil-2: #D9C3A0; --soil-3: #C7AC84; --rock: #B8B2A7; --water: #CFE3F5; --water-ink: #1E5A96; --concrete: #DADDE0; --steel: #4A5565;
  --font: Barlow, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Barlow Semi Condensed", Barlow, ui-sans-serif, system-ui, sans-serif;
  --r: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 400 16px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
p { margin: 0; }
sub, sup { font-size: .72em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layar muat & gerbang ---------- */
.gate { max-width: 460px; margin: 12vh auto; text-align: center; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--signal); color: var(--ink-strong); border-color: transparent; box-shadow: inset 0 -2px 0 0 rgba(0,0,0,.14); }
.btn.primary:hover { background: var(--signal-hover); }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Kerangka aplikasi ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--panel) 272px, transparent 272px); }
.side { background: var(--panel); color: var(--panel-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.hazard { height: 6px; flex: none; background: repeating-linear-gradient(45deg, var(--signal) 0 8px, var(--panel) 8px 16px); }
.side-brand { display: flex; align-items: center; gap: 8px; padding: 16px 18px 12px; color: #fff; text-decoration: none; }
.side-brand img { width: 30px; height: auto; }
.side-brand b { font-family: var(--display); font-size: 21px; font-weight: 700; }
.tag-mod { margin-left: auto; flex: none; white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: #6EE7B7; color: #052E1F; }
.tag-beta { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; color: #FCD34D; box-shadow: inset 0 0 0 1px rgba(245,158,11,.45); }
.side-sec { padding: 14px 18px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-muted); }
.side-nav { display: flex; flex-direction: column; gap: 1px; padding: 0 10px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #E5E7EB; text-decoration: none; font-size: 14px; line-height: 1.3; text-align: left; cursor: pointer; }
.side-nav a:hover, .side-nav button:hover { background: rgba(255,255,255,.06); }
.side-nav a[aria-current="page"], .side-nav a.on { background: var(--panel-raised); color: #fff; font-weight: 600; }
.side-nav .sn { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--display); background: #30353A; border: 2px solid #59626B; color: #E5E7EB; }
.side-nav .done .sn, .side-nav a.done .sn { border-color: #5DBE8C; background: #14532D; color: #D1FAE5; }
.side-nav a.on .sn { background: var(--signal); border-color: var(--signal); color: var(--ink-strong); }
.side-nav .ico { flex: none; width: 22px; height: 22px; display: grid; place-items: center; color: var(--panel-muted); }
.side-nav .cnt { margin-left: auto; font: 600 12px var(--display); color: var(--panel-muted); }
.side-foot { margin-top: auto; padding: 14px 18px 18px; font-size: 12px; line-height: 1.45; color: var(--panel-muted); border-top: 1px solid rgba(255,255,255,.08); }
.side-foot a { color: #E5E7EB; }
.side-toggle { display: none; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 64px; }
.main-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: static; height: auto; }
  .side-toggle { display: inline-flex; margin-left: auto; color: #fff; border-color: rgba(255,255,255,.2); background: transparent; }
  .side.collapsed .side-body { display: none; }
  .side-brand { padding-right: 12px; }
}

/* ---------- Teks ---------- */
.eyebrow { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead { color: var(--ink-2); max-width: 70ch; }
.caption { font-size: 13px; line-height: 18px; color: var(--muted); }
.note { font-size: 13px; line-height: 19px; color: var(--muted); }
.page-title { display: flex; flex-direction: column; gap: 8px; }
.page-title h1 { font-size: clamp(28px, 3.6vw, 36px); line-height: 1.1; }
/* Kepala halaman: eyebrow/chip di kiri, tautan "? Panduan" di kanan (aksen hijau modul belajar, seperti .tag-mod) */
.page-eyebrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; }
.help-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 7px; border-radius: 9999px; border: 1px solid #A7F3D0; background: var(--success-tint); color: var(--success); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.help-link:hover { background: #D1FAE5; }
.help-q { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--success); color: #fff; font-size: 12px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 9999px; background: var(--surface); color: var(--ink-2); font-size: 12px; line-height: 18px; font-weight: 600; border: 1px solid var(--line-subtle); white-space: nowrap; }
.chip.level { background: var(--accent-tint); color: var(--ink); border-color: transparent; }
.chip.ok { background: var(--success-tint); color: var(--success); border-color: transparent; }
.chip.bad { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.chip.warn { background: var(--warning-tint); color: var(--warning); border-color: transparent; }
.chip.beta { background: var(--warning-tint); color: var(--warning); border-color: transparent; }
.beta-note { padding: 12px 14px; border-radius: 10px; background: var(--warning-tint); color: var(--warning); font-size: 14px; line-height: 1.5; }
.beta-note b { font-weight: 600; }

/* ---------- Kartu & panel ---------- */
.card { background: var(--surface); border: 1px solid var(--line-subtle); border-radius: var(--r); padding: 20px; }
.panel { background: var(--surface-2); border-radius: 8px; padding: 14px 16px; }
.panel.accent { background: var(--accent-tint); }
.panel.warn { background: var(--warning-tint); color: var(--warning); }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > * { flex: 1 1 300px; min-width: 0; }
.split > .wide { flex: 2 1 420px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
ul.plain, ol.plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Beranda modul ---------- */
.continue { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.continue .info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bar { height: 8px; border-radius: 9999px; background: var(--line-subtle); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 9999px; transition: width .3s ease; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 30px; line-height: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.filters button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--accent-tint); color: var(--ink); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.jcard { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.jcard:hover { border-color: var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.jcard .head { display: flex; gap: 12px; align-items: center; }
.jicon { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.jcard h3 { font-size: 18px; line-height: 1.25; }
.jcard .meta { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 13px; color: var(--muted); }
.jcard .meta .bar { flex: 1 1 auto; height: 6px; }
.search { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); width: 320px; max-width: 100%; }
.search input { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 15px; color: var(--ink); }

/* daftar topik di halaman jalur */
.tlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tlist li { border-top: 1px solid var(--line-subtle); }
.tlist li:first-child { border-top: 0; }
.tlist a { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 14px 4px; text-decoration: none; color: inherit; }
.tlist a:hover { background: var(--surface-2); }
.tlist .tt { flex: 1 1 320px; min-width: 0; }
.tlist .tt b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.tlist .tt span { font-size: 14px; color: var(--muted); }
.tlist .prog { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }

/* ---------- Halaman topik ---------- */
.block { background: var(--surface); border: 1px solid var(--line-subtle); border-radius: var(--r); padding: 22px clamp(16px, 3vw, 28px); display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 16px; }
.block.hero { border: 2px solid var(--accent); }
.block > header { display: flex; flex-direction: column; gap: 2px; }
.block h2 { font-size: 22px; line-height: 1.2; }
.block h3 { font-size: 18px; line-height: 1.25; }
.block-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line-subtle); padding-top: 12px; }
.mark { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; min-height: 32px; }
.mark input { width: 18px; height: 18px; accent-color: var(--success); }
.formulas { display: flex; flex-direction: column; }
.frow { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line-subtle); }
.frow:last-child { border-bottom: 1px solid var(--line-subtle); }
.frow .k { flex: 0 0 220px; font-size: 14px; color: var(--muted); }
.frow .f { flex: 1 1 260px; font-size: 18px; font-style: italic; min-width: 0; }
.ref { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-style: normal; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 15px; }
table.t th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; background: var(--surface-2); padding: 10px 12px; }
table.t td { padding: 9px 12px; border-top: 1px solid var(--line-subtle); vertical-align: middle; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { border: 1px solid var(--line-subtle); border-radius: var(--r); padding: 14px 16px; display: flex; gap: 14px; }
.step .n { flex: 0 0 30px; height: 30px; border-radius: 9999px; background: var(--panel); color: var(--panel-ink); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.step .body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.step h4 { font-family: var(--font); font-size: 16px; font-weight: 600; }
.kv { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 2px 12px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.kv dd.res { font-weight: 600; }
.example-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.video { display: flex; gap: 14px; align-items: center; background: var(--panel); color: var(--panel-ink); border-radius: var(--r); padding: 14px 16px; }
.video .play { flex: 0 0 44px; height: 44px; border-radius: 9999px; background: var(--signal); display: grid; place-items: center; }
.video p { font-size: 14px; color: var(--panel-muted); }
.video strong { color: var(--panel-ink); display: block; font-size: 15px; }

/* ---------- Gambar ---------- */
figure { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fig { width: 100%; height: auto; background: var(--surface-2); border-radius: 8px; display: block; }
.fig text { font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { height: 0; border-top: 2px dashed currentColor; }
.beam, .sup { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.ground { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.hatch { stroke: var(--muted); stroke-width: 1; }
.solid { fill: var(--ink); }
.s-load { stroke: var(--load); stroke-width: 2; fill: none; } .f-load { fill: var(--load); } .t-load { fill: var(--load); font-weight: 600; font-size: 13px; }
.s-react { stroke: var(--accent); stroke-width: 2.5; fill: none; } .f-react { fill: var(--accent); } .t-react { fill: var(--accent); font-weight: 600; font-size: 13px; }
.s-res { stroke: var(--muted); stroke-width: 2; fill: none; stroke-dasharray: 5 4; } .f-res { fill: var(--muted); } .t-res { fill: var(--muted); font-weight: 600; font-size: 12px; }
.s-teal { stroke: var(--teal); stroke-width: 2; fill: none; } .f-teal { fill: var(--teal); } .t-teal { fill: var(--teal); font-weight: 600; font-size: 13px; }
.s-dim { stroke: var(--muted); stroke-width: 1; fill: none; } .t-dim { fill: var(--ink-2); font-size: 12px; } .t-lab { fill: var(--ink); font-weight: 600; font-size: 13px; } .t-small { fill: var(--muted); font-size: 11px; }
.faded { opacity: .3; }
/* Halo terang di belakang teks SVG agar tetap terbaca di atas garis: <text class="t-dim halo"> */
.halo { paint-order: stroke; stroke: var(--surface-2); stroke-width: 4px; stroke-linejoin: round; }
.fill-tint { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 1.2; }
.fill-load { fill: var(--load-tint); stroke: var(--load); stroke-width: 1.2; }
.fill-warn { fill: var(--warning-tint); stroke: var(--warning); stroke-width: 1.2; }
.fill-soil1 { fill: var(--soil-1); } .fill-soil2 { fill: var(--soil-2); } .fill-soil3 { fill: var(--soil-3); } .fill-rock { fill: var(--rock); }
.fill-water { fill: var(--water); } .s-water { stroke: var(--water-ink); stroke-width: 1.5; fill: none; } .t-water { fill: var(--water-ink); font-size: 12px; font-weight: 600; }
.fill-concrete { fill: var(--concrete); stroke: var(--ink); stroke-width: 1.2; } .fill-steel { fill: var(--steel); }
.fill-surface { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; }
.s-grid { stroke: var(--line-subtle); stroke-width: 1; } .s-axis { stroke: var(--muted); stroke-width: 1; fill: none; } .t-axis { fill: var(--muted); font-size: 11px; } .t-axis-title { fill: var(--ink-2); font-size: 12px; }
.ser-accent { stroke: var(--accent); stroke-width: 2.5; fill: none; } .ser-load { stroke: var(--load); stroke-width: 2.5; fill: none; } .ser-muted { stroke: var(--faint); stroke-width: 1.8; fill: none; stroke-dasharray: 5 4; } .ser-teal { stroke: var(--teal); stroke-width: 2.5; fill: none; }
.area-accent { fill: var(--accent); opacity: .12; } .area-load { fill: var(--load); opacity: .12; }
.dot-accent { fill: var(--accent); } .dot-load { fill: var(--load); } .dot-hollow { fill: var(--surface); stroke: var(--accent); stroke-width: 2; } .dot-warn { fill: var(--warning-tint); stroke: var(--warning); stroke-width: 2; }

/* ---------- Kontrol ---------- */
.controls { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .field > .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.field output { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.field > .slv-head { flex-wrap: wrap; align-items: center; row-gap: 4px; }
.slv-head label { min-width: 0; }
.slv-wrap { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.slv { width: 8.5ch; min-width: 6ch; max-width: 18ch; field-sizing: content; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.slv:hover { border-color: var(--faint); }
.slv:focus { border-color: var(--accent); }
.slv[aria-invalid="true"], .numin[aria-invalid="true"] { border-color: var(--danger); }
.slv-u { font-weight: 600; }
.slv-note { font-size: 12.5px; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.slv-note.err { color: var(--danger); }
.slv-note.warn { color: var(--warning); }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 28px; }
.numin { height: 40px; width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-variant-numeric: tabular-nums; }
select.numin { padding-right: 6px; }
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); line-height: 1.5; resize: vertical; font-variant-numeric: tabular-nums; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 8px; }
.seg button { flex: 1 1 auto; min-height: 38px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Hasil ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: 8px; padding: 10px 14px; min-width: 0; }
.tile .k { font-size: 13px; line-height: 18px; color: var(--muted); }
.tile .v { font-size: 22px; line-height: 30px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .d { font-size: 12px; color: var(--muted); }
.tile.strong { background: var(--panel); color: var(--panel-ink); }
.tile.strong .k, .tile.strong .d { color: var(--panel-muted); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checks li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 9px 0; border-top: 1px solid var(--line-subtle); font-size: 15px; }
.checks li > span:first-child { min-width: 0; flex: 1 1 260px; }
.calc { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.calc li::marker { color: var(--muted); font-weight: 600; }

/* ---------- Latihan ---------- */
.answer { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.answer label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.answer input { height: 44px; width: 180px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 16px; font-variant-numeric: tabular-nums; }
.feedback { padding: 12px 14px; border-radius: 8px; font-weight: 600; }
.feedback.ok { background: var(--success-tint); color: var(--success); }
.feedback.no { background: var(--warning-tint); color: var(--warning); }
.reveal { display: flex; flex-wrap: wrap; gap: 8px; }
.mcq { display: flex; flex-direction: column; gap: 10px; }
.mcq fieldset { border: 1px solid var(--line-subtle); border-radius: var(--r); padding: 12px 16px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mcq legend { font-weight: 600; padding: 0 4px; }
.mcq label { display: flex; gap: 10px; align-items: center; min-height: 36px; cursor: pointer; }
.mcq input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.toast { min-height: 20px; font-size: 14px; font-weight: 600; color: var(--success); }

/* ---------- Step Solver ---------- */
.ss-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ss-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 14px; border-radius: 8px; background: var(--accent-tint); }
.ss-bar-t { flex: 1 1 260px; min-width: 0; font-size: 14px; color: var(--ink-2); }
.ss-jalur { font-size: 15px; margin-top: 10px; color: var(--ink-2); }
.ss-g1 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.ss-g1-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-subtle); border-radius: 8px; color: inherit; text-decoration: none; }
.ss-g1-item:hover { background: var(--surface-2); border-color: var(--line); }
.ss-g1-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ss-g1-item b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.ss-plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; margin: 0; padding-left: 18px; color: var(--ink-2); }
.ss-segera { border-style: dashed; }
.ss-host.ss-hide .tiles, .ss-host.ss-hide .checks, .ss-host.ss-hide ol.calc, .ss-host.ss-hide .steps, .ss-host.ss-hide .panel:has(> ol.calc) { display: none; }
.ss-host.ss-hide svg .t-react { visibility: hidden; }
.ss-answers { display: flex; flex-direction: column; gap: 10px; }
.ss-ans { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(110px, 1fr) minmax(48px, auto) minmax(0, 1.4fr); gap: 6px 10px; align-items: center; }
.ss-ans label { font-size: 14px; font-weight: 600; }
.ss-mark { font-size: 13px; font-weight: 600; }
.ss-mark.ok { color: var(--success); } .ss-mark.no { color: var(--warning); }
@media (max-width: 560px) { .ss-ans { grid-template-columns: minmax(0, 1fr) auto; } .ss-ans label { grid-column: 1 / -1; } .ss-mark { grid-column: 1 / -1; } }
.ss-share { display: flex; gap: 8px; }
.ss-share .numin { min-width: 0; flex: 1 1 auto; font-size: 13px; }
.ss-share .btn { white-space: nowrap; flex: none; }
.tier-note p { color: var(--ink-2); }
.lock { display: flex; flex-direction: column; gap: 10px; border: 2px dashed var(--line); }
.ss-promo { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.ss-promo .info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Cetak halaman topik: tanpa sidebar dan tombol ---------- */
/* ---------- Kelas: tugas Step Solver per NIM (src/kelas/) ---------- */
.kl-form { gap: 14px; }
.kl-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.kl-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.kl-in { width: 100%; min-height: 44px; }
textarea.kl-in { min-height: 88px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); resize: vertical; }
select.kl-in { padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.kl-num { width: 92px; min-height: 36px; }
.kl-status { min-height: 20px; font-size: 14px; font-weight: 600; margin: 0; }
.kl-status.err { color: var(--danger); }
.kl-status.ok { color: var(--success); }
.kl-details > summary { cursor: pointer; font-weight: 600; color: var(--accent); min-height: 32px; display: flex; align-items: center; }
.kl-details[open] > summary { margin-bottom: 12px; }
.kl-kodecard { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.kl-kode { font-family: var(--display); font-size: 40px; line-height: 44px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--ink); }
.kl-kode-inline { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.kl-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line-subtle); z-index: 2; }
.kl-konfirm { margin-top: 4px; }
.kl-salah { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kl-salah li { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(80px, 2fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.kl-salah .bar > i { background: var(--load); }
.ss-host.kelas-kunci .field, .ss-host.kelas-kunci .seg, .ss-host.kelas-kunci .presets, .ss-host.kelas-kunci select { opacity: .85; }
.ss-host.kelas-kunci .presets { display: none; }

@media print {
  @page { size: A4; margin: 16mm 14mm 20mm; }
  body { background: #fff; }
  .app { display: block; background: none; }
  .side, .block-foot, .presets, .reveal, form.answer, .ss-bar, .ss-tools, .ss-share, .help-link { display: none !important; }
  .block { break-inside: avoid-page; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
