/* Modulin v2 (Fable) — sistem desain. Brand: rapi · menenangkan · resmi-tapi-ramah. Biru #2447d6 + amber #ffb547, mode bawaan terang. */
:root {
  --brand: #2447d6; --brand2: #1a36a8; --brand3: #4f6df0; --brandSoft: #e8edff; --brandSoft2: #d6dfff; --brand-ungu: #6a3df0;
  --aksen: #ffb547; --aksenSoft: #fff1d9; --on-brand: #ffffff;
  --bg: #f3f5fa; --panel: #ffffff; --panel2: #f4f6fb; --panel3: #eaedf5; --line: #e3e7f0; --line2: #d3d9e6;
  --text: #141a2e; --muted: #5f6880; --dim: #8e96ad;
  --ok: #138a4c; --okSoft: #e1f5ea; --warn: #a15c00; --warnSoft: #fff3dd; --bad: #c62f2f; --badSoft: #fde8e8; --star: #e8a300;
  --kertas: #ffffff; --tinta: #111111; --garis-kertas: #999999; --kop-tabel: #d9e2f3; --pisah-kertas: #bbbbbb; --catatan-kertas: #888888; --sukses-kertas: #138a4c;
  --font-judul: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-isi: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sh1: 0 1px 2px rgba(20, 26, 46, .05), 0 1px 1px rgba(20, 26, 46, .03);
  --sh2: 0 2px 6px rgba(20, 26, 46, .06), 0 12px 32px -12px rgba(20, 26, 46, .12);
  --sh3: 0 24px 60px -20px rgba(36, 71, 214, .35);
  --r: 16px; --r2: 12px; --r3: 10px;
  --side: 264px; --top-h: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #7b93ff; --brand2: #9fb1ff; --brand3: #6a84ff; --brandSoft: #1f2750; --brandSoft2: #28336a;
  --aksenSoft: #3a2c12;
  --bg: #0f1220; --panel: #161a2b; --panel2: #1c2136; --panel3: #232943; --line: #272d47; --line2: #343b5c;
  --text: #e9ecf7; --muted: #a1a9c4; --dim: #6f7893;
  --ok: #4fd18b; --okSoft: #15301f; --warn: #ffb547; --warnSoft: #3a2c12; --bad: #ff7a7a; --badSoft: #3d1d22;
  --sh1: none; --sh2: 0 12px 32px -12px rgba(0, 0, 0, .5); --sh3: 0 24px 60px -20px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font-isi); }
body { overflow-x: hidden; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; font-family: var(--font-judul); letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: 1.75rem; font-weight: 800; } h2 { font-size: 1.25rem; } h3 { font-size: 1.02rem; } h4 { font-size: .95rem; }
small, .muted { color: var(--muted); }
.dim { color: var(--dim); }
[hidden] { display: none !important; }
::selection { background: var(--brandSoft2); }
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 14px; color: var(--muted); }
.boot img { width: 64px; height: 64px; margin: 0 auto; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .7; } }
.boot p { margin: 0; }
.boot .btn { margin: 0 auto; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
.brand { display: flex; gap: 11px; align-items: center; padding: 2px 8px 18px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; display: block; }
.brand b { display: block; font-family: var(--font-judul); font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.brand small { font-size: 12px; color: var(--muted); }
.nav-h { font-size: 11px; letter-spacing: .09em; font-weight: 700; color: var(--dim); margin: 16px 12px 6px; text-transform: uppercase; }
.nav-a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r3); color: var(--text); font-size: 14px; font-weight: 500; transition: background .12s; }
.nav-a svg.i, .nav-a .ic { width: 20px; height: 20px; color: var(--muted); display: grid; place-items: center; font-size: 16px; font-style: normal; }
.nav-a:hover { background: var(--panel2); }
.nav-a.on { background: var(--brandSoft); color: var(--brand); font-weight: 600; }
.nav-a.on svg.i { color: var(--brand); }
.nav-a .n { margin-left: auto; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.nav-a .tag { margin-left: auto; }
.nav-a.cta { background: var(--brand); color: var(--on-brand); font-weight: 700; margin: 4px 0; box-shadow: var(--sh1); }
.nav-a.cta svg.i { color: var(--aksen); }
.nav-a.cta:hover { background: var(--brand2); }
.side-user { margin-top: auto; padding: 12px; border-radius: var(--r2); background: var(--panel2); display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-ungu)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.side-user b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user > div { min-width: 0; flex: 1; }
.side-foot { padding: 10px 12px 0; font-size: 11px; color: var(--dim); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 8; height: var(--top-h); display: flex; gap: 10px; align-items: center; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 520px; }
.search svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 18px; height: 18px; }
.search input { width: 100%; height: 42px; padding: 0 44px 0 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); outline: none; transition: border-color .12s, box-shadow .12s; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brandSoft); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--font-mono); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; color: var(--dim); background: var(--panel2); }
.qres { position: absolute; left: 0; right: 0; top: 48px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh2); max-height: 60vh; overflow: auto; padding: 6px; z-index: 10; }
.qres a { display: flex; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 9px; color: var(--text); font-size: 14px; }
.qres a small { margin-left: auto; white-space: nowrap; }
.qres a:hover { background: var(--panel2); }
.qres .nav-h { margin: 8px 10px 4px; }
.icon-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 11px; width: 42px; height: 42px; display: inline-grid; place-items: center; flex: none; color: var(--muted); transition: background .12s; }
.icon-btn:hover { background: var(--panel2); color: var(--text); }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.top .btn { height: 42px; }
.view { padding: 26px 28px 40px; max-width: 1180px; width: 100%; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.foot { margin-top: auto; padding: 18px 28px; color: var(--dim); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------- primitives ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--sh1); }
.card.flat { box-shadow: none; }
.card.soft { background: var(--panel2); border-color: transparent; box-shadow: none; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gauto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gen { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 18px; } .mt2 { margin-top: 30px; } .mb { margin-bottom: 14px; } .mb0 { margin-bottom: 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 30px 0 12px; }
.sec-h h2 { margin: 0; }
.sec-h a { font-size: 14px; font-weight: 600; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: var(--r2); font-weight: 600; text-align: center; justify-content: center; transition: background .12s, transform .08s, box-shadow .12s; line-height: 1.3; }
.btn:hover { background: var(--brand2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel); color: var(--text); border-color: var(--line2); }
.btn.ghost:hover { background: var(--panel2); }
.btn.soft { background: var(--brandSoft); color: var(--brand); }
.btn.soft:hover { background: var(--brandSoft2); }
.btn.ok { background: var(--ok); }
.btn.ok:hover { filter: brightness(1.08); background: var(--ok); }
.btn.danger { background: var(--panel); color: var(--bad); border-color: var(--line2); }
.btn.danger:hover { background: var(--badSoft); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.big { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn.glow { box-shadow: 0 8px 24px -8px rgba(36, 71, 214, .55); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn .spin { width: 16px; height: 16px; border-width: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font-size: 13px; color: var(--text); font-weight: 500; transition: background .12s; }
.chip:hover { background: var(--panel2); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--panel3); color: var(--muted); letter-spacing: .02em; }
.tag.brand { background: var(--brandSoft); color: var(--brand); }
.tag.amber { background: var(--aksenSoft); color: var(--warn); }
.tag.Easy { background: var(--okSoft); color: var(--ok); } .tag.Medium { background: var(--warnSoft); color: var(--warn); } .tag.Hard { background: var(--badSoft); color: var(--bad); }
.code { font: 600 12px var(--font-mono); color: var(--brand); letter-spacing: .02em; }
.star { background: none; border: 0; font-size: 20px; color: var(--line2); padding: 2px 6px; line-height: 1; transition: transform .1s, color .1s; }
.star:hover { transform: scale(1.15); color: var(--star); }
.star.on { color: var(--star); }
.kbd { font: 11px var(--font-mono); border: 1px solid var(--line2); border-radius: 5px; padding: 0 5px; color: var(--dim); }

.item { display: flex; flex-direction: column; gap: 7px; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; }
.item:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--sh2); }
.item h3 { margin: 0; font-size: 1rem; }
.item .ide { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat { display: flex; gap: 12px; align-items: center; cursor: pointer; padding: 14px 16px; transition: transform .12s, border-color .12s, box-shadow .12s; }
.cat .ic { font-size: 22px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--panel2); flex: none; }
.cat b { display: block; font-size: 14px; }
.cat small { font-size: 12px; }
.cat:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--sh2); }

.list { padding: 4px 0; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .kind { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brandSoft); color: var(--brand); flex: none; }
.list-row .kind.soal { background: var(--aksenSoft); color: var(--warn); }
.list-row .t { flex: 1; min-width: 0; cursor: pointer; }
.list-row .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.list-row .t small { font-size: 12px; }
.list-row:hover { background: var(--panel2); }

label.f { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
label.f small { font-weight: 500; color: var(--dim); }
.in, select.in, textarea.in { width: 100%; padding: 10px 13px; border-radius: var(--r3); border: 1px solid var(--line2); background: var(--panel); outline: none; transition: border-color .12s, box-shadow .12s; min-height: 42px; }
.in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brandSoft); }
.in.err { border-color: var(--bad); }
select.in { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238e96ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
textarea.in { min-height: 90px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
.fgrid { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fgrid .full { grid-column: 1 / -1; }
.fgrid .third { grid-column: span 1; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--r3); overflow: hidden; flex-wrap: wrap; background: var(--panel); }
.seg button { border: 0; background: transparent; padding: 9px 14px; font-weight: 500; }
.seg button.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.check { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line2); border-radius: var(--r3); cursor: pointer; background: var(--panel); font-weight: 500; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brandSoft); color: var(--brand); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opt-btn { border: 1px solid var(--line2); background: var(--panel); border-radius: var(--r3); padding: 10px 12px; text-align: left; font-size: 13px; line-height: 1.3; display: flex; flex-direction: column; gap: 2px; }
.opt-btn small { font-size: 11px; }
.opt-btn.on { border-color: var(--brand); background: var(--brandSoft); color: var(--brand); }
.opt-btn.on small { color: var(--brand); opacity: .8; }
details.adv { border: 1px dashed var(--line2); border-radius: var(--r2); padding: 0 16px; }
details.adv summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary svg.i { transition: transform .15s; color: var(--muted); }
details.adv[open] summary svg.i { transform: rotate(90deg); }
details.adv > div { padding: 0 0 16px; }

.note { padding: 12px 14px; border-radius: var(--r2); background: var(--warnSoft); color: var(--warn); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.note svg.i { margin-top: 2px; }
.note.info { background: var(--brandSoft); color: var(--brand); }
.note.ok { background: var(--okSoft); color: var(--ok); }
.note.bad { background: var(--badSoft); color: var(--bad); }
.note a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.note.sm { font-size: 13px; padding: 10px 12px; }

.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty .e { width: 56px; height: 56px; border-radius: 16px; background: var(--brandSoft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .e svg.i { width: 26px; height: 26px; }
.empty p { margin: 0 0 14px; max-width: 420px; margin-left: auto; margin-right: auto; }
.spin { width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 40px 10px; color: var(--muted); }
.loading .spin { width: 32px; height: 32px; color: var(--brand); }
.bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin: 14px auto 0; max-width: 360px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-ungu)); transition: width .6s; }
.skel { background: linear-gradient(90deg, var(--panel2), var(--panel3), var(--panel2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- dashboard ---------- */
.hero { position: relative; overflow: hidden; border: 0; background: linear-gradient(118deg, var(--brand) 0%, #3b55e6 55%, var(--brand-ungu) 100%); color: #fff; padding: 26px 28px; box-shadow: var(--sh3); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 220px at 85% -20%, rgba(255, 255, 255, .22), transparent 60%), radial-gradient(400px 200px at 10% 120%, rgba(255, 181, 71, .25), transparent 60%); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { color: #fff; margin-bottom: 4px; }
.hero .sub { opacity: .9; margin: 0 0 16px; max-width: 640px; }
.hero .sub b { color: #fff; }
.quick { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; padding: 8px; backdrop-filter: blur(6px); }
.quick .in { min-width: 0; width: 100%; border-color: transparent; background: rgba(255, 255, 255, .95); color: #141a2e; min-height: 44px; }
.quick .in:focus { box-shadow: 0 0 0 3px rgba(255, 181, 71, .5); }
.quick .btn { background: var(--aksen); color: #1a1206; border-radius: var(--r3); font-weight: 800; white-space: nowrap; min-height: 44px; }
.quick .btn:hover { background: #ffc46a; }
.hero-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.hero-links a { color: #fff; opacity: .85; display: inline-flex; align-items: center; gap: 5px; }
.hero-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.stat .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brandSoft); color: var(--brand); flex: none; }
.stat .ic.amber { background: var(--aksenSoft); color: var(--warn); }
.stat .ic.ok { background: var(--okSoft); color: var(--ok); }
.stat b { display: block; font-family: var(--font-judul); font-size: 1.45rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; }
.draft-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-left: 4px solid var(--aksen); }
.draft-card .t { flex: 1; min-width: 0; }
.draft-card b { display: block; }
.draft-card small { color: var(--muted); }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.step3 { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--panel); }
.step3 .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--panel3); color: var(--muted); flex: none; }
.step3.done .n { background: var(--ok); color: #fff; }
.step3 b { display: block; font-size: 14px; }
.step3 small { font-size: 12px; color: var(--muted); }
.step3.done { opacity: .7; }
.contoh-card { display: flex; flex-direction: column; gap: 6px; }
.contoh-card .thumb { height: 92px; border-radius: 10px; background: linear-gradient(160deg, var(--panel2), var(--panel3)); border: 1px solid var(--line); position: relative; overflow: hidden; margin-bottom: 4px; }
.contoh-card .thumb i { position: absolute; left: 14px; right: 14px; height: 6px; border-radius: 3px; background: var(--line2); }
.contoh-card .thumb i:nth-child(1) { top: 16px; width: 40%; background: var(--brand); opacity: .6; }
.contoh-card .thumb i:nth-child(2) { top: 32px; } .contoh-card .thumb i:nth-child(3) { top: 46px; right: 40%; } .contoh-card .thumb i:nth-child(4) { top: 60px; right: 25%; }

/* ---------- wizard ---------- */
.wiz { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.wiz-side { position: sticky; top: calc(var(--top-h) + 16px); }
.wiz-side .card { padding: 16px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 13px; }
.summary dt { color: var(--muted); } .summary dd { margin: 0; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps div { flex: 1; height: 5px; border-radius: 6px; background: var(--line); }
.steps div.on { background: var(--brand); }
.stepname { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fsec { padding: 18px 0; border-top: 1px solid var(--line); }
.fsec:first-child { border-top: 0; padding-top: 0; }
.fsec h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.fsec h3 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ai-opt { border: 2px solid var(--line); border-radius: var(--r); padding: 18px; position: relative; }
.ai-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brandSoft) 35%, var(--panel)); }
.ai-opt h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ai-btns .btn { padding: 10px 8px; font-size: 13.5px; }
.ai-btn-logo { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; }
.olist { counter-reset: s; list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 8px; }
.olist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.olist li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--brandSoft); color: var(--brand); font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.paste-wrap { position: relative; }
.paste-wrap textarea { font: 13px/1.5 var(--font-mono); min-height: 130px; }
.paste-ok { position: absolute; right: 10px; top: 10px; }

/* ---------- dokumen ---------- */
.doc-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.doc-head h1 { margin-bottom: 2px; font-size: 1.5rem; }
.act-bar { position: sticky; top: calc(var(--top-h) + 8px); z-index: 4; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; }
.act-bar .sp { flex: 1; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; }
.paper-wrap { position: relative; }
.paper { overflow-x: auto; overflow-wrap: anywhere; }
.paper { background: var(--kertas); color: var(--tinta); border-radius: 8px; padding: 40px 48px; font-family: "Times New Roman", Georgia, serif; font-size: 15px; line-height: 1.5; box-shadow: var(--sh2); border: 1px solid var(--line); }
.paper h2 { text-align: center; font-size: 18px; margin: 0 0 4px; font-family: inherit; letter-spacing: 0; }
.paper h3 { font-size: 15px; margin: 18px 0 6px; font-family: inherit; letter-spacing: 0; }
.paper h4 { font-size: 15px; margin: 12px 0 4px; font-family: inherit; letter-spacing: 0; }
.paper table { border-collapse: collapse; width: 100%; margin: 6px 0; font-size: 14px; }
.paper td, .paper th { border: 1px solid var(--garis-kertas); padding: 5px 7px; vertical-align: top; text-align: left; }
.paper th { background: var(--kop-tabel); }
.paper ol, .paper ul { margin: 4px 0; padding-left: 24px; }
.paper .kop { text-align: center; border-bottom: 3px double var(--tinta); padding-bottom: 8px; margin-bottom: 14px; display: flex; align-items: center; gap: 14px; justify-content: center; }
.paper .kop img { width: 64px; height: 64px; object-fit: contain; }
.paper .kop b { font-size: 19px; display: block; }
.paper .stim { font-style: italic; margin-left: 22px; }
.paper .ops { list-style: upper-alpha; }
.paper .key { color: var(--sukses-kertas); font-weight: 700; }
.paper .lv { color: var(--garis-kertas); font-size: 12px; }
/* mode edit: blok teks bisa diketik langsung */
.paper.editing [data-e] { outline: 1px dashed #9db0ff; outline-offset: 2px; border-radius: 3px; cursor: text; min-width: 2em; display: inline-block; min-height: 1em; }
.paper.editing [data-e]:hover { background: #eef2ff; }
.paper.editing [data-e]:focus { outline: 2px solid #2447d6; background: #eef2ff; }
.paper.editing li[data-e], .paper.editing p[data-e], .paper.editing td[data-e] { display: block; }
.paper.editing td[data-e] { display: table-cell; }
.edit-tip { font-size: 13px; }
.pin { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; gap: 8px; align-items: center; background: var(--text); color: var(--bg); padding: 10px 12px 10px 16px; border-radius: 14px; box-shadow: var(--sh2); font-size: 14px; }
.pin .btn { padding: 7px 12px; font-size: 13px; }
.pin .btn.ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }

/* ---------- pengaturan ---------- */
.set-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(10, 14, 30, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .18s; }
.modal { background: var(--panel); color: var(--text); border-radius: 20px; max-width: 520px; width: 100%; box-shadow: var(--sh2); overflow: hidden; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal .mh { background: linear-gradient(118deg, var(--brand), var(--brand-ungu)); color: #fff; padding: 22px 24px; }
.modal .mh h2 { color: #fff; margin: 0; font-size: 1.35rem; }
.modal .mh p { margin: 4px 0 0; opacity: .9; font-size: 14px; }
.modal .mb { padding: 18px 24px; overflow: auto; margin: 0; }
.modal .mf { padding: 14px 24px 20px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); }
.news { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.news li { display: flex; gap: 12px; align-items: flex-start; }
.news .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brandSoft); color: var(--brand); display: grid; place-items: center; flex: none; }
.news b { display: block; font-size: 14px; }
.news small { font-size: 13px; color: var(--muted); }
.confirm-in { font-family: var(--font-mono); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; z-index: 80; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: var(--sh2); animation: up .2s ease-out; }
@keyframes up { from { transform: translate(-50%, 10px); opacity: 0; } }
.only-m { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(10, 14, 30, .45); z-index: 19; }
.bnav { display: none; }

/* ---------- HP ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 20; width: 284px; transform: translateX(-100%); transition: transform .22s; box-shadow: none; }
  .side.open { transform: none; box-shadow: var(--sh2); }
  .only-m { display: inline-grid; place-items: center; } .only-d { display: none !important; }
  .top { padding: 0 14px; height: 58px; --top-h: 58px; }
  .view { padding: 16px 14px 96px; }
  .foot { padding-bottom: 86px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3, .g2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px; }
  .stat b { font-size: 1.25rem; }
  .fgrid { grid-template-columns: 1fr; }
  .fgrid .third { grid-column: 1 / -1; }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 1.4rem; }
  .quick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .quick .in[name="topik"], .quick .btn { grid-column: 1 / -1; }
  .steps3 { grid-template-columns: 1fr; }
  .wiz { grid-template-columns: 1fr; }
  .wiz-side { position: static; }
  .ai-btns { grid-template-columns: 1fr; }
  .paper { padding: 20px 16px; font-size: 14px; }
  .act-bar { top: calc(58px + 6px); }
  h1 { font-size: 1.4rem; }
  .sec-h { margin-top: 24px; }
  .doc-head h1 { font-size: 1.25rem; }
  .pin { bottom: 76px; width: calc(100vw - 24px); justify-content: space-between; }
  .toast { bottom: 78px; }
  /* bottom nav */
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0; border-radius: 10px; }
  .bnav a svg.i { width: 22px; height: 22px; }
  .bnav a.on { color: var(--brand); }
  .bnav a.mid span.ic { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; margin-top: -22px; box-shadow: 0 8px 20px -6px rgba(36, 71, 214, .6); border: 3px solid var(--bg); }
  .bnav a.mid span.ic svg.i { width: 24px; height: 24px; color: var(--aksen); }
}
@media (max-width: 420px) {
  .view { padding: 14px 12px 96px; }
  .card { padding: 16px; }
  .ai-opt { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
