/* Metis — gaya dabtive: kertas #F8F7F3, tinta #161616, aksen merah #F02D2D. Tema terang & gelap. */
:root {
  --ink: #161616; --paper: #f8f7f3; --surface: #fff; --surface-2: #f3f1eb;
  --red: #f02d2d; --red-dark: #d92121; --red-soft: #fdeceb;
  --muted: #73716c; --copy: #56534e; --line: #ddd9d0; --line-soft: #e8e5de; --placeholder: #a3a09a;
  --ok: #1f7a4d; --ok-soft: #e6f2ea; --warn: #9a5b00; --warn-soft: #fbf0dc; --danger: #c42b1c; --danger-soft: #fbe9e7;
  --header-bg: rgba(248, 247, 243, .94); --overlay: rgba(22, 22, 22, .38); --shadow: 0 10px 30px rgba(24, 20, 14, .055);
  --on-ink: #fff;
  --sans: 'Plus Jakarta Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f0eb; --paper: #0e0e0f; --surface: #171719; --surface-2: #202022;
    --red: #ff3a3a; --red-dark: #ee2626; --red-soft: #3a1a1a;
    --muted: #aaa7a1; --copy: #c9c6c0; --line: #2c2c2e; --line-soft: #252527; --placeholder: #6f6d69;
    --ok: #5cc28c; --ok-soft: #16281e; --warn: #e0a447; --warn-soft: #2e2415; --danger: #ff6b5e; --danger-soft: #331a18;
    --header-bg: rgba(14, 14, 15, .94); --overlay: rgba(0, 0, 0, .55); --shadow: 0 12px 35px rgba(0, 0, 0, .25);
    --on-ink: #0e0e0f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f2f0eb; --paper: #0e0e0f; --surface: #171719; --surface-2: #202022;
  --red: #ff3a3a; --red-dark: #ee2626; --red-soft: #3a1a1a;
  --muted: #aaa7a1; --copy: #c9c6c0; --line: #2c2c2e; --line-soft: #252527; --placeholder: #6f6d69;
  --ok: #5cc28c; --ok-soft: #16281e; --warn: #e0a447; --warn-soft: #2e2415; --danger: #ff6b5e; --danger-soft: #331a18;
  --header-bg: rgba(14, 14, 15, .94); --overlay: rgba(0, 0, 0, .55); --shadow: 0 12px 35px rgba(0, 0, 0, .25);
  --on-ink: #0e0e0f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
a { color: var(--red-dark); }
code { background: var(--surface-2); color: var(--ink); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex-shrink: 0; position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; padding: 26px 18px 0; background: var(--paper); border-right: 1px solid var(--line); }
.brand { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.06em; color: var(--ink); text-decoration: none; margin: 0 10px 28px; width: max-content; }
.brand > span { color: var(--red); }
.new-button { display: flex; align-items: center; gap: 9px; min-height: 43px; padding: 0 14px; background: var(--red); color: #fff; border: 0; border-radius: 7px; font-weight: 700; font-size: 13.5px; transition: .18s ease; }
.new-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.new-button > span { margin-left: auto; opacity: .85; }
.nav-caption { font-size: 10.5px; letter-spacing: .11em; color: var(--muted); margin: 30px 10px 10px; font-weight: 800; }
nav[aria-label="Navigasi utama"] { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; border: 1px solid transparent; background: none; text-align: left; padding: 10px 11px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.nav-item:hover { color: var(--ink); background: var(--surface-2); }
.nav-item.active { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 700; }
.nav-item.active svg { color: var(--red); }
.count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--ink); padding: 1px 8px; border-radius: 99px; }
.profile { margin-top: auto; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; padding: 18px 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: 11px; font-weight: 800; }
.profile b { display: block; font-size: 12.5px; }
.profile small { display: block; font-size: 11px; color: var(--muted); }
.workspace { margin-left: 236px; width: calc(100% - 236px); }
.topbar { position: sticky; top: 0; z-index: 4; height: 64px; padding: 0 40px; background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.slash { color: var(--line); }
.save-state { font-size: 12px; color: var(--muted); }
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); display: grid; place-items: center; transition: border-color .18s ease; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
main { max-width: 1440px; margin: 0 auto; padding: 38px 40px 0; }
.page-heading { margin-bottom: 28px; }
.eyebrow { color: var(--red); font-size: 10.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; margin-bottom: 10px; }
.page-heading h1 { font-size: 40px; line-height: 1.08; font-weight: 800; letter-spacing: -.045em; margin: 0 0 10px; text-wrap: balance; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.accent { color: var(--red); }
.site-footer { max-width: 1440px; margin: 0 auto; padding: 34px 40px 24px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.footer-dot { margin: 0 8px; color: var(--line); }

/* ---------- stepper ---------- */
.stepper { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 22px; overflow: hidden; }
.stepper button { border: 0; border-left: 1px solid var(--line-soft); background: none; padding: 12px 14px; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.stepper button:first-child { border-left: 0; }
.stepper button small { display: block; font-size: 11px; font-weight: 500; margin-top: 2px; }
.stepper button:hover { color: var(--ink); background: var(--surface-2); }
.stepper button.done { color: var(--ink); }
.stepper button.done .step::after { content: ' ✓'; color: var(--red); }
.stepper button.active { background: var(--ink); color: var(--on-ink); }
.stepper button.active .step { color: var(--red); }
.stepper button.active small { color: var(--on-ink); opacity: .7; }
.step { font-size: 11px; color: var(--red); font-weight: 800; letter-spacing: .04em; margin-right: 4px; }

/* ---------- panel ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(440px, 1.25fr); gap: 22px; align-items: start; }
.editor-grid.solo { grid-template-columns: 1fr; }
/* Review: lembar tulisan di kiri, rekomendasi di kanan. */
.editor-grid.swap { grid-template-columns: minmax(440px, 1.25fr) minmax(340px, .9fr); }
.editor-grid.swap .side { order: 2; }
/* Final: cek di atas, lembar tulisan di bawah. */
.editor-grid.stack { grid-template-columns: 1fr; }
.editor-grid.stack .result-panel { position: static; }
.final-tabs, .sub-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 0; }
.final-tabs { border-bottom: 1px solid var(--line); }
.final-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 9px 12px; font-size: 13px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.final-tabs button:hover { color: var(--ink); }
.final-tabs button.selected { color: var(--ink); border-bottom-color: var(--red); }
.sub-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sub-tabs button.selected { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.badge { font-size: 10px; font-weight: 700; background: var(--warn-soft); color: var(--warn); border-radius: 99px; padding: 0 6px; }
.final-body { padding-top: 6px; }
.link-button { border: 0; background: none; padding: 0; color: var(--red-dark); font-weight: 600; text-align: left; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.panel, .result-panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.panel-heading, .result-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.panel-heading h2, .result-top h2 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; margin: 0; }
.panel-heading h2 .step, .result-top h2 .step { font-size: 11px; }
.panel-body { padding: 20px 22px 22px; }
h3 { font-size: 14px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rule { height: 1px; background: var(--line-soft); margin: 24px 0; }
.field { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 14px; }
.req { color: var(--red); }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13.5px; font-weight: 400; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240, 45, 45, .12); }
textarea { resize: vertical; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
select { appearance: none; padding-right: 30px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2373716c' stroke-width='1.6'%3E%3Cpath d='m3 4 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 11px center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 12px; }
.error { color: var(--danger); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.spacer { flex: 1; }
.advanced summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 14px 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary span { margin-left: auto; font-size: 18px; font-weight: 500; color: var(--red); transition: transform .18s ease; }
.advanced[open] summary span { transform: rotate(45deg); }
.check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; margin-bottom: 14px; }
.check input { width: auto; margin: 0; accent-color: var(--red); }

/* ---------- tombol ---------- */
.generate-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 18px; min-height: 45px; padding: 0 17px; border: 0; border-radius: 7px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; transition: .18s ease; }
.generate-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.generate-button span { margin-right: auto; }
.row .generate-button { width: auto; margin-top: 0; }
.ghost-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; margin-bottom: 10px; transition: .18s ease; }
.ghost-button:hover { border-color: var(--ink); }
.row .ghost-button { margin-bottom: 0; }
.text-button { border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 600; padding: 4px; }
.text-button:hover { color: var(--red); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.chip.off { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.upload { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .18s ease; }
.upload:hover { border-color: var(--ink); }
.upload svg { color: var(--red); }
.upload small { color: var(--muted); font-weight: 400; }
.upload input { display: none; }

/* ---------- tag & item ---------- */
.tag { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tag.human { background: var(--ink); color: var(--on-ink); }
.tag.ai { background: var(--red-soft); color: var(--red-dark); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.item { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: var(--surface); }
.item textarea, .item input { margin-top: 6px; }
.item p { margin: 6px 0; font-size: 13px; }
.item.pending, .item.open { border-left-color: var(--red); }
.item.accepted, .item.fixed, .item.ok { border-left-color: var(--ok); background: var(--surface-2); }
.item.rejected, .item.ignored { opacity: .6; }
.item.gagal { border-left-color: var(--danger); }
.note { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 14px; margin: 12px 0; font-size: 13px; }
.quote { display: block; width: 100%; text-align: left; font-style: italic; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 6px; padding: 6px 10px; margin: 6px 0; font-size: 13px; }
.doc { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.doc summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
pre#brief { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 12px; max-height: 380px; overflow: auto; font-size: 12px; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 13px; }
td { border-bottom: 1px solid var(--line-soft); padding: 7px 6px; vertical-align: top; }
td:first-child { width: 28px; }
.score { border-radius: 8px; padding: 12px 14px; margin: 12px 0; border: 1px solid var(--line-soft); }
.score.ok { background: var(--ok-soft); }
.score.warn { background: var(--warn-soft); }
.score p { margin: 4px 0 0; font-size: 13px; }
.option { display: block; width: 100%; text-align: left; margin: 6px 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; }
.option:hover { border-color: var(--ink); }

/* ---------- lembar tulisan ---------- */
.result-panel { position: sticky; top: 80px; display: flex; flex-direction: column; overflow: hidden; }
.draft-state { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line-soft); padding: 3px 9px; border-radius: 99px; color: var(--ink); font-size: 11px; font-weight: 600; }
.draft-state i, .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; }
.document-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line-soft); height: 46px; }
.result-tabs { display: flex; height: 100%; gap: 20px; }
.result-tab { background: none; border: 0; border-bottom: 2px solid transparent; font-size: 12.5px; font-weight: 700; padding: 0; color: var(--muted); }
.result-tab:hover { color: var(--ink); }
.result-tab.selected { border-bottom-color: var(--red); color: var(--ink); }
.doc-actions { display: flex; gap: 4px; }
.icon-button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 5px 8px; border-radius: 6px; color: var(--ink); font-size: 12px; font-weight: 700; }
.icon-button:hover { background: var(--surface-2); color: var(--red); }
.icon-button svg { width: 15px; height: 15px; }
.paper { height: calc(100vh - 250px); min-height: 460px; }
.paper textarea { height: 100%; margin: 0; border: 0; border-radius: 0; padding: 26px 32px; resize: none; font: 14.5px/1.8 var(--sans); box-shadow: none; }
.prose { height: 100%; overflow: auto; padding: 28px 36px; }
.prose h1 { font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.045em; margin: 0 0 18px; }
.prose h2 { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.035em; margin: 30px 0 10px; }
.prose h3 { font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; margin: 22px 0 8px; display: block; }
.prose p, .prose li { font-size: 15px; line-height: 1.8; color: var(--copy); }
.prose strong { color: var(--ink); }
.prose blockquote { font-size: 17px; line-height: 1.6; font-style: italic; border-left: 3px solid var(--red); padding-left: 16px; margin: 20px 0; color: var(--muted); }
.document-footer { border-top: 1px solid var(--line-soft); padding: 12px 22px; display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); }
.document-footer > span { display: flex; align-items: center; gap: 6px; }

/* ---------- draf & pengaturan ---------- */
.draft-list { display: grid; gap: 12px; max-width: 980px; }
.draft-card { display: flex; justify-content: space-between; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; background: var(--surface); transition: border-color .18s ease; }
.draft-card:hover { border-color: var(--ink); }
.draft-card h3 { font-size: 19px; line-height: 1.27; letter-spacing: -.02em; margin: 0 0 6px; display: block; }
.draft-card p { font-size: 12px; color: var(--muted); margin: 0; }
.draft-card-actions { display: flex; gap: 8px; }
.draft-card-actions button { border: 1px solid var(--line); border-radius: 7px; background: transparent; min-height: 36px; padding: 0 14px; font-size: 12.5px; font-weight: 700; }
.draft-card-actions button:hover { border-color: var(--ink); }
.draft-card-actions .primary { background: var(--red); border-color: var(--red); color: #fff; }
.draft-card-actions .primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.empty-state { padding: 56px 30px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); max-width: 980px; background: var(--surface); }
.empty-state h2 { font-size: 28px; font-weight: 800; letter-spacing: -.04em; color: var(--ink); margin: 0 0 8px; }
.settings-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(380px, 1.4fr); gap: 22px; align-items: start; }
.site b { word-break: break-all; font-size: 13px; }
.notes { padding-left: 18px; margin: 8px 0 0; font-size: 12.5px; }
.notes li { margin-bottom: 6px; }
#addSite input { flex: 1; margin: 0; min-width: 200px; }

/* ---------- rekomendasi review ---------- */
.rec-label { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.rec .quote { text-decoration: line-through; text-decoration-color: var(--red); color: var(--ink); }
.rec .fix { margin: 4px 0 6px; padding: 6px 10px; border-radius: 6px; background: var(--ok-soft); }
.rec.applied { opacity: .6; }
.rec.applied .quote { text-decoration: none; }
.done-label { color: var(--ok); font-weight: 700; }

/* ---------- popup loading ---------- */
.loading { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--overlay); backdrop-filter: blur(3px); }
.loading-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px 32px; text-align: center; min-width: 280px; max-width: 90vw; box-shadow: var(--shadow); }
.loading-box p { margin: 14px 0 4px; font-weight: 700; }
.loading-box small { color: var(--muted); font-size: 12px; }
.spinner { display: inline-block; width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .new-button, .generate-button, .ghost-button, .toast { transition: none; }
  .new-button:hover, .generate-button:hover { transform: none; }
}

/* ---------- toast & print ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px); background: var(--ink); color: var(--on-ink); padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; max-width: min(92vw, 560px); text-align: center; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsif ---------- */
@media (max-width: 1180px) {
  .editor-grid, .editor-grid.swap, .settings-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .stepper { grid-template-columns: repeat(3, 1fr); }
  .stepper button:nth-child(4) { border-left: 0; }
  .stepper button:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { position: static; width: 100%; padding: 16px 16px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { font-size: 26px; margin: 0 0 12px; }
  .new-button, .nav-caption, .profile { display: none; }
  nav[aria-label="Navigasi utama"] { flex-direction: row; overflow-x: auto; }
  .nav-item { flex-shrink: 0; padding: 8px 10px; }
  .workspace { margin: 0; width: 100%; }
  .topbar { padding: 0 16px; height: 52px; }
  .breadcrumb > span { display: none; }
  main { padding: 24px 16px 0; }
  .page-heading h1 { font-size: 30px; }
  .stepper { grid-template-columns: repeat(2, 1fr); }
  .stepper button:nth-child(odd) { border-left: 0; }
  .stepper button:nth-child(4) { border-left: 1px solid var(--line-soft); }
  .stepper button:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .panel-body, .panel-heading, .result-top { padding-inline: 16px; }
  .document-toolbar { padding: 0 12px; }
  .paper textarea, .prose { padding: 20px 16px; }
  .draft-card { flex-direction: column; align-items: flex-start; }
  .site-footer { flex-direction: column; padding: 24px 16px; }
}

/* ---------- final: hasil, unduh, salin ---------- */
.score-head { display: flex; align-items: baseline; gap: 4px; }
.score-num { font-size: 32px; font-weight: 800; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.score-head b { margin-left: 10px; }
.score ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.checklist { list-style: none; padding: 0; margin: 10px 0; }
.checklist li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { flex-shrink: 0; width: 20px; }
.checklist b { display: block; }
.checklist span:not(.mark) { color: var(--muted); }
.export-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.export-row .ghost-button { margin: 0; min-height: 44px; padding: 0 16px; }
.menu { position: relative; }
.menu > summary { list-style: none; margin: 0; width: auto; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; z-index: 10; bottom: calc(100% + 6px); left: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 6px; }
.menu-list button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; text-align: left; }
.menu-list button:hover { background: var(--surface-2); color: var(--red); }
mark.hl { background: #ffe58a; color: #161616; border-radius: 3px; padding: 0 2px; }

/* ---------- switch AI ---------- */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slider { width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .slider { background: var(--red); }
.switch input:checked + .slider::after { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--red); outline-offset: 2px; }
