/* Pokja Vaisya — sistem desain tulis tangan, tanpa build step.
   Tiga sektor formulir (A pertanian, B sapi, C bisnis) punya warna tetap
   yang dipakai konsisten di lembar data, dasbor, dan berita. */

:root {
    --milk: #f3f6f0;
    --paper: #ffffff;
    --ink: #17231c;
    --ink-2: #4a584f;
    --ink-3: #6f7c73;
    --line: #dde5da;
    --line-strong: #c3cfc0;
    --forest: #143d2a;
    --forest-2: #1c5238;
    --on-forest: #e8f1ea;
    --on-forest-dim: #a9c3b2;

    --agri: #22794a;
    --agri-soft: #e4f1e8;
    --cow: #c98a12;
    --cow-soft: #f8eed6;
    --cow-ink: #7a5206;
    --biz: #4a4fb5;
    --biz-soft: #e8e9f8;

    --danger: #b3261e;
    --danger-soft: #fbeae8;
    --warn-ink: #7a5206;

    --font: "Anek Latin", "Segoe UI", system-ui, sans-serif;
    --r-s: 6px;
    --r-m: 10px;
    --r-l: 16px;
    --sidebar: 248px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--milk);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--agri); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--biz); outline-offset: 2px; border-radius: 4px; }

h1 { font-size: 2rem; line-height: 1.15; font-weight: 650; font-stretch: 112%; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 1.375rem; line-height: 1.25; font-weight: 650; font-stretch: 108%; }
h3 { font-size: 1rem; line-height: 1.35; font-weight: 600; }

.lead { color: var(--ink-2); max-width: 62ch; margin-top: 6px; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.num { text-align: right; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--paper); padding: 8px 12px; border-radius: var(--r-s); z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- Kerangka aplikasi ---------- */

.shell { min-height: 100vh; }

.side {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
    background: var(--forest); color: var(--on-forest);
    display: flex; flex-direction: column; padding: 24px 16px 16px; overflow-y: auto;
}

.brand { display: block; color: #fff; text-decoration: none; padding: 0 8px 20px; }
.brand-name { display: block; font-size: 1.5rem; font-weight: 700; font-stretch: 120%; line-height: 1.1; }
.brand-sub { display: block; margin-top: 6px; font-size: 0.8125rem; line-height: 1.35; color: var(--on-forest-dim); }
.brand-stripe { display: flex; gap: 3px; margin-top: 14px; }
.brand-stripe i { height: 4px; flex: 1; border-radius: 2px; }
.brand-stripe i:nth-child(1) { background: #5fc48d; }
.brand-stripe i:nth-child(2) { background: #e8b23f; }
.brand-stripe i:nth-child(3) { background: #9da2f2; }

.nav { display: grid; gap: 2px; margin-top: 8px; }
.nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-s);
    color: var(--on-forest); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--forest-2); }
.nav a[aria-current="page"] { background: #fff; color: var(--forest); font-weight: 650; }
.nav svg { width: 20px; height: 20px; flex: none; }

.side-foot { margin-top: auto; padding-top: 20px; display: grid; gap: 14px; }
.side :focus-visible { outline-color: #fff; }

.lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; padding: 2px; width: max-content; }
.lang form { display: contents; }
.lang button { border: 0; background: none; color: inherit; padding: 4px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.875rem; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--forest); }
.lang--light { border-color: var(--line-strong); color: var(--ink-2); }
.lang--light button[aria-pressed="true"] { background: var(--forest); color: #fff; }

.me { border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 14px; }
.me-name { font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.me-role { font-size: 0.8125rem; color: var(--on-forest-dim); }
.me-links { display: flex; gap: 14px; margin-top: 8px; font-size: 0.875rem; }
.me-links a, .me-links button { color: var(--on-forest); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.topbar { display: none; }

.main { margin-left: var(--sidebar); padding: 36px 40px 64px; }
.main-inner { max-width: 1120px; }

.page-head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }

/* ---------- Tombol & formulir ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 8px 16px; border-radius: var(--r-s);
    border: 1px solid var(--forest); background: var(--forest); color: #fff;
    font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--forest-2); }
.btn--quiet { background: var(--paper); color: var(--forest); border-color: var(--line-strong); }
.btn--quiet:hover { background: var(--milk); }
.btn--danger { background: var(--paper); color: var(--danger); border-color: #e3b4b0; }
.btn--danger:hover { background: var(--danger-soft); }
.btn--s { min-height: 34px; padding: 4px 10px; font-size: 0.875rem; }
.linkbtn { background: none; border: 0; padding: 4px 6px; color: var(--agri); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 0.875rem; }
.linkbtn--danger { color: var(--danger); }

.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 600; font-size: 0.9375rem; }
.field .hint { font-size: 0.8125rem; color: var(--ink-3); }
.field .err { font-size: 0.875rem; color: var(--danger); font-weight: 500; }
.optional { font-weight: 400; color: var(--ink-3); font-size: 0.8125rem; }

.input, select.input, textarea.input {
    width: 100%; min-height: 42px; padding: 8px 12px; border-radius: var(--r-s);
    border: 1px solid var(--line-strong); background: var(--paper);
}
.input:focus-visible { outline-offset: 0; border-color: var(--biz); }
.input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }

.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--forest); }

.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px 6px 10px; cursor: pointer; background: var(--paper); font-weight: 500; }
.choice input { accent-color: var(--forest); width: 16px; height: 16px; }
.choice label:has(input:checked) { border-color: var(--forest); background: var(--agri-soft); }

.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel--narrow { max-width: 720px; }
.panel > h2 { margin-bottom: 18px; }

.flash { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r-s); margin-bottom: 20px; font-weight: 500; background: var(--agri-soft); border: 1px solid #b9dcc5; color: #14432a; }
.flash--error { background: var(--danger-soft); border-color: #e3b4b0; color: #7c1711; }

.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-m); background: var(--paper); }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 18px; }

/* ---------- Tabel ---------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 0.875rem; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; }
tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 650; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; background: var(--milk); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill--on { background: var(--agri-soft); border-color: #b9dcc5; color: #14432a; }
.pill--off { background: #f0f0ee; color: var(--ink-3); }

/* ---------- Penanda sektor (huruf A/B/C dari formulir) ---------- */

.sector { --c: var(--agri); --c-soft: var(--agri-soft); --c-ink: var(--agri); }
.sector--cow { --c: var(--cow); --c-soft: var(--cow-soft); --c-ink: var(--cow-ink); }
.sector--biz { --c: var(--biz); --c-soft: var(--biz-soft); --c-ink: var(--biz); }

.letter {
    display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: var(--r-m);
    background: var(--c); color: #fff; font-size: 1.5rem; font-weight: 700; font-stretch: 125%; line-height: 1;
}
.sector--cow .letter { color: #2b1d02; }
.letter--s { width: 26px; height: 26px; border-radius: 7px; font-size: 0.9375rem; }

.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; display: inline-block; }

.sector-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }

/* ---------- Dasbor ---------- */

.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.filter .field { min-width: 240px; }

.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.summary-cell { padding: 22px 24px 24px; border-top: 5px solid var(--c); }
.summary-cell + .summary-cell { border-left: 1px solid var(--line); }
.summary-label { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-2); }
.summary-value { margin-top: 12px; font-size: 3rem; line-height: 1; font-weight: 700; font-stretch: 118%; letter-spacing: -0.02em; }
.summary-value small { font-size: 1.125rem; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--ink-2); margin-left: 4px; }
.summary-sub { margin-top: 10px; color: var(--ink-2); font-size: 0.9375rem; }

.notes { margin-top: 20px; }
.notes ul { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.notes li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.notes .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8125rem; font-weight: 700; background: var(--agri-soft); color: var(--agri); margin-top: 1px; }
.notes .warn .mark { background: var(--cow-soft); color: var(--warn-ink); }

.dash-section { margin-top: 40px; }
.charts { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px 22px 22px; }
.chart h3 { margin-bottom: 14px; }
.chart .hint { font-size: 0.8125rem; color: var(--ink-3); margin-top: 12px; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 34%) 1fr auto; gap: 12px; align-items: center; position: relative; border-radius: 4px; }
.bar-label { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.25; overflow-wrap: anywhere; }
.bar-track { height: 14px; border-radius: 0 4px 4px 0; background: transparent; border-left: 1px solid var(--line-strong); }
.bar-fill { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--c); }
.bar-value { font-weight: 600; font-size: 0.9375rem; min-width: 3.5ch; text-align: right; white-space: nowrap; }
.bar-value small { font-weight: 400; color: var(--ink-3); font-size: 0.8125rem; }
.bar-row:hover .bar-label, .bar-row:focus-visible .bar-label { color: var(--ink); }
.bar-row:hover .bar-fill, .bar-row:focus-visible .bar-fill { filter: brightness(0.88); }
.bar-row::after {
    content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 5;
    background: var(--ink); color: #fff; font-size: 0.8125rem; padding: 4px 8px; border-radius: 4px;
    white-space: nowrap; opacity: 0; pointer-events: none;
}
.bar-row:hover::after, .bar-row:focus-visible::after { opacity: 1; }
.chart-empty { color: var(--ink-3); font-size: 0.9375rem; padding: 8px 0; }

/* ---------- Lembar data (bentuk formulir Excel) ---------- */

.sheet-head { background: var(--forest); color: #fff; border-radius: var(--r-l); padding: 28px 32px; margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: flex-end; }
.sheet-head .form-name { color: var(--on-forest-dim); font-weight: 500; }
.sheet-head h1 { margin-top: 4px; }
.sheet-head .meta { color: var(--on-forest-dim); font-size: 0.9375rem; margin-top: 8px; }
.sheet-head .btn--quiet { border-color: transparent; }
.sheet-jump { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.sheet-jump a:hover { background: rgba(255, 255, 255, 0.2); }
.sheet-head :focus-visible { outline-color: #fff; }

.sheet-section { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: var(--r-m); padding: 24px 24px 8px; margin-bottom: 24px; scroll-margin-top: 16px; }
.sub { margin-bottom: 24px; }
.sub-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--c-soft); border-radius: var(--r-s); }
.sub-head h3 { display: flex; gap: 10px; align-items: baseline; font-size: 1.0625rem; }
.sub-head .n { font-weight: 700; color: var(--c-ink); }
.sheet-table { table-layout: fixed; }
.sheet-table th { font-size: 0.8125rem; }
.sheet-table th:nth-child(1) { width: 28%; }
.sheet-table th:nth-child(2) { width: 20%; }
.sheet-table th:nth-child(4) { width: 132px; }
.sheet-table td.who { font-weight: 600; }
.sheet-table td.data { white-space: nowrap; }
.sheet-table td.acts { text-align: right; white-space: nowrap; }
.sheet-table td { overflow-wrap: anywhere; }
.sheet-table .row-empty td { color: var(--ink-3); }
.note-line { display: block; color: var(--ink-3); font-size: 0.875rem; }

dialog { border: 0; border-radius: var(--r-l); padding: 0; width: min(560px, calc(100vw - 32px)); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(14, 32, 22, 0.55); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dlg-body { padding: 20px 24px; display: grid; gap: 16px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--milk); }
.dlg-errors { background: var(--danger-soft); border: 1px solid #e3b4b0; color: #7c1711; border-radius: var(--r-s); padding: 10px 14px; font-size: 0.9375rem; }
.dlg-errors ul { list-style: disc; padding-left: 18px; }
.two { display: grid; gap: 16px; grid-template-columns: 140px 1fr; }
[hidden] { display: none !important; }

/* ---------- Daftar unit ---------- */

.unit-list { display: grid; gap: 12px; }
.unit-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(72px, auto)) auto; gap: 20px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 22px; }
.unit-row h2 { font-size: 1.1875rem; }
.unit-open, .head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.unit-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.unit-row > .unit-name, .unit-row > .unit-open { grid-column: 1 / -1; }
.unit-row h2 a { color: var(--ink); text-decoration: none; }
.unit-row h2 a:hover { text-decoration: underline; }
.unit-stat { display: grid; gap: 2px; }
.unit-stat b { font-size: 1.25rem; font-weight: 650; line-height: 1.1; }
.unit-stat span { font-size: 0.8125rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }

/* ---------- Berita ---------- */

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 500; }
.tabs a[aria-current="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }

.lead-story { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; margin-bottom: 28px; }
.lead-story .shot { min-height: 320px; position: relative; background: var(--agri-soft); }
.lead-story .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lead-story .body { padding: 32px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.lead-story h2 { font-size: 1.75rem; line-height: 1.18; text-wrap: balance; }
.lead-story h2 a, .story h3 a { color: var(--ink); text-decoration: none; }
.lead-story h2 a:hover, .story h3 a:hover { text-decoration: underline; }

.stories { display: grid; gap: 28px 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story { display: flex; flex-direction: column; gap: 10px; }
.story .shot { aspect-ratio: 16 / 9; border-radius: var(--r-m); overflow: hidden; background: var(--agri-soft); border: 1px solid var(--line); }
.story .shot img { width: 100%; height: 100%; object-fit: cover; }
.story h3 { font-size: 1.125rem; line-height: 1.3; }
.story p { color: var(--ink-2); font-size: 0.9375rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 0.8125rem; color: var(--ink-3); }
.topic { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; }
.pager .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ---------- Halaman masuk ---------- */

.gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.gate-verse { background: var(--forest); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.gate-verse .brand { padding: 0; }
.verse { display: grid; gap: 22px; }
.verse-word { display: grid; gap: 8px; }
.verse-word b { font-size: clamp(2.75rem, 6.2vw, 5.5rem); line-height: 0.95; font-weight: 700; font-stretch: 125%; letter-spacing: -0.02em; }
.verse-word span { display: flex; align-items: center; gap: 12px; color: var(--on-forest-dim); font-size: 1.0625rem; }
.verse-word span::before { content: ""; width: 56px; height: 5px; border-radius: 3px; background: var(--c); }
.verse-word:nth-child(1) { --c: #5fc48d; }
.verse-word:nth-child(2) { --c: #e8b23f; }
.verse-word:nth-child(3) { --c: #9da2f2; }
.verse-foot { color: var(--on-forest); max-width: 44ch; }
.verse-foot cite { display: block; font-style: normal; color: var(--on-forest-dim); margin-top: 6px; font-size: 0.9375rem; }

.gate-form { display: flex; flex-direction: column; padding: 32px 48px 48px; }
.gate-form .top { display: flex; justify-content: flex-end; }
.gate-card { margin: auto 0; width: 100%; max-width: 400px; align-self: center; display: grid; gap: 20px; }
.gate-card form { display: grid; gap: 18px; }
.gate-help { font-size: 0.875rem; color: var(--ink-3); }

@media (prefers-reduced-motion: no-preference) {
    .verse-word { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .verse-word:nth-child(2) { animation-delay: 0.14s; }
    .verse-word:nth-child(3) { animation-delay: 0.28s; }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
    dialog[open] { animation: pop 0.16s ease-out; }
    @keyframes pop { from { opacity: 0; transform: translateY(8px); } }
}

/* ---------- Layar sempit ---------- */

@media (max-width: 1080px) {
    .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .unit-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .unit-row > .unit-name, .unit-row > .unit-open { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
    .side { transform: translateX(-100%); z-index: 40; width: min(300px, 86vw); visibility: hidden; }
    .side.is-open { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax rgba(14, 32, 22, 0.5); }
    .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 30; background: var(--forest); color: #fff; padding: 10px 16px; }
    .topbar .brand-name { font-size: 1.1875rem; }
    .topbar button { background: none; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; border-radius: var(--r-s); padding: 6px 12px; font-weight: 600; cursor: pointer; }
    .topbar :focus-visible { outline-color: #fff; }
    .main { margin-left: 0; padding: 24px 16px 48px; }
    h1 { font-size: 1.625rem; }
    .summary { grid-template-columns: 1fr; }
    .summary-cell + .summary-cell { border-left: 0; }
    .summary-value { font-size: 2.5rem; }
    .charts, .notes ul, .form-grid { grid-template-columns: 1fr; }
    .lead-story { grid-template-columns: 1fr; }
    .lead-story .body { padding: 20px; }
    .lead-story h2 { font-size: 1.375rem; }
    .sheet-head { padding: 22px 20px; }
    .sheet-section { padding: 16px 14px 4px; }
    .panel { padding: 18px 16px; }
    .gate { grid-template-columns: 1fr; }
    .gate-verse { padding: 28px 20px 32px; gap: 28px; }
    .gate-form { padding: 20px 20px 40px; }
    .gate-card { margin: 28px 0 0; }

    /* Tabel lembar data jadi tumpukan baris supaya tidak menggulir ke samping */
    .sheet-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .sheet-table, .sheet-table tbody, .sheet-table tfoot, .sheet-table tr, .sheet-table td { display: block; }
    .sheet-table tr { padding: 10px 4px; border-bottom: 1px solid var(--line); }
    .sheet-table td { padding: 2px 8px; border: 0; }
    .sheet-table td.num { text-align: left; }
    .lead-story .shot { min-height: 0; aspect-ratio: 16 / 10; }
    .sheet-table td.acts { text-align: left; width: auto; padding-top: 6px; }
    .sheet-table td.acts .linkbtn { padding-left: 0; padding-right: 14px; }
    .sheet-table tfoot td:empty { display: none; }
}

@media (max-width: 560px) {
    .stories { grid-template-columns: 1fr; }
    .unit-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
    .two { grid-template-columns: 1fr; }
    .bar-row { grid-template-columns: 1fr auto; }
    .bar-label { grid-column: 1 / -1; }
    .filter .field { min-width: 0; flex: 1 1 100%; }
}

@media print {
    .side, .topbar, .acts, .sub-head .btn, .sheet-jump, .flash, .head-actions { display: none !important; }
    .main { margin: 0; padding: 0; }
    body { background: #fff; }
    .sheet-head { background: none; color: #000; padding: 0 0 12px; }
    .sheet-head .form-name, .sheet-head .meta { color: #333; }
}
