/* Website transparansi — motif buku kas & kartu jimpitan */
:root {
    --paper: #f6f8fb;
    --sheet: #ffffff;
    --ink: #1d2740;
    --ink-soft: #55607a;
    --rule: #c9d7ea;
    --margin: #c8463d;
    --line: #e3e8f0;
    --in: #13795b;
    --accent: #0f766e; /* ditimpa warna utama dari CMS */
    --radius: 14px;
    --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
    --body: 'Instrument Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--body); font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }

/* Header */
.site-head { background: var(--sheet); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.brand img, .brand .mark { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.brand .mark { background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { white-space: nowrap; color: var(--ink-soft); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--paper); }

/* Hero */
.hero { padding: 48px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: start; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; }
.hero .lead { font-size: 1.1rem; color: var(--ink-soft); margin-top: 16px; max-width: 34ch; }
.balance { margin-top: 32px; padding-top: 20px; border-top: 2px solid var(--ink); max-width: 360px; }
.balance .amount { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; display: block; margin-top: 2px; }
.balance .note { color: var(--ink-soft); font-size: .9rem; margin-top: 4px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1.5px solid var(--accent); background: var(--accent); color: #fff; font-size: .95rem; }
.btn.ghost { background: transparent; color: var(--accent); }

/* Halaman buku kas */
.book { background: var(--sheet); border-radius: 6px 14px 14px 6px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(29, 39, 64, .35); position: relative; padding: 18px 0 8px; overflow: hidden; }
.book::before { content: ''; position: absolute; top: 0; bottom: 0; left: 52px; width: 2px; background: var(--margin); opacity: .55; }
.book-title { padding: 0 20px 10px 68px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.book-title h2 { font-size: 1.1rem; }
.book table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.book th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: .8rem; padding: 6px 12px; border-bottom: 1.5px solid var(--rule); }
.book td { padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.book td:first-child, .book th:first-child { width: 52px; padding-left: 10px; padding-right: 8px; color: var(--ink-soft); font-size: .8rem; white-space: nowrap; }
.book .amt { text-align: right; white-space: nowrap; font-weight: 600; }
.book .amt.in { color: var(--in); }
.book .amt.out { color: var(--margin); }
.book .desc span { display: block; font-size: .8rem; color: var(--ink-soft); }
.book-foot { padding: 10px 20px 8px 68px; font-size: .9rem; }

/* Sections */
section.block { padding: 40px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.block-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.block-head p { color: var(--ink-soft); margin-top: 6px; max-width: 60ch; }

/* Pos dana */
.funds { display: grid; gap: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); }
.fund { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr minmax(130px, auto); gap: 20px; align-items: center; padding: 18px 20px; }
.fund + .fund { border-top: 1px solid var(--line); }
.fund .name { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.fund .swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.fund .flow { font-size: .85rem; color: var(--ink-soft); }
.fund .bar { height: 8px; border-radius: 99px; background: #eef2f7; overflow: hidden; margin-top: 6px; }
.fund .bar i { display: block; height: 100%; background: var(--margin); opacity: .75; }
.fund .bal { font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-align: right; white-space: nowrap; }

/* Grafik bulanan (CSS) */
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 190px; padding: 0 4px; }
.month { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.month .bars { display: flex; gap: 3px; align-items: flex-end; height: 150px; }
.month .bars i { width: 10px; border-radius: 3px 3px 0 0; min-height: 2px; }
.month .bars .b-in { background: var(--accent); }
.month .bars .b-out { background: var(--margin); opacity: .7; }
.month small { font-size: .72rem; color: var(--ink-soft); }
.legend { display: flex; gap: 18px; font-size: .85rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* Pungutan insidental */
.campaigns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.campaign { background: var(--sheet); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); border-radius: 8px var(--radius) var(--radius) 8px; padding: 18px 20px; }
.campaign p { color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }
.campaign .meter { margin-top: 14px; height: 8px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.campaign .meter i { display: block; height: 100%; background: var(--c, var(--accent)); }
.campaign .stats { display: flex; justify-content: space-between; margin-top: 8px; font-size: .88rem; }

/* Kartu jimpitan (rekap) */
.card-grid { overflow-x: auto; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); }
.card-grid table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .88rem; }
.card-grid th, .card-grid td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: center; }
.card-grid th { font-weight: 600; color: var(--ink-soft); font-size: .78rem; position: sticky; top: 0; background: var(--sheet); }
.card-grid td.house, .card-grid th.house { text-align: left; padding-left: 16px; position: sticky; left: 0; background: var(--sheet); white-space: nowrap; }
.card-grid td.house span { color: var(--ink-soft); font-size: .8rem; display: block; }
.stamp { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .9rem; font-weight: 700; }
.stamp.paid { border: 2px solid var(--accent); color: var(--accent); transform: rotate(-12deg); }
.stamp.unpaid { border: 2px dashed color-mix(in srgb, var(--margin) 60%, white); color: var(--margin); }
.stamp.waived { color: var(--ink-soft); }
.stamp.none { color: var(--rule); }

/* Pengumuman & pengurus */
.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.news article a { color: var(--ink); text-decoration: none; }
.news article a:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); }
.news img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; width: 100%; margin-bottom: 12px; }
.news time { font-size: .85rem; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.news p { color: var(--ink-soft); font-size: .93rem; margin-top: 6px; }
.pin { font-size: .78rem; font-weight: 600; color: var(--accent); }
.officers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.officer { display: flex; gap: 12px; align-items: center; }
.officer .ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--accent) 14%, white); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-family: var(--display); font-size: 1.2rem; flex: none; }
.officer b { display: block; }
.officer span { color: var(--ink-soft); font-size: .88rem; }

/* Banner strip */
.banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.banner { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: #fff; min-height: 150px; display: flex; align-items: flex-end; text-decoration: none; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.banner div { position: relative; padding: 20px; }
.banner b { font-family: var(--display); font-size: 1.2rem; display: block; }

/* Filter & tabel penuh */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters select, .filters button { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--sheet); text-decoration: none; color: var(--ink); }
.pager span { color: var(--ink-soft); }
.prose { max-width: 68ch; font-size: 1.05rem; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3 { margin: 1.4em 0 .5em; }
.prose img { border-radius: 10px; }
.page-title { padding: 40px 0 8px; }
.page-title h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; }
.page-title p { color: var(--ink-soft); margin-top: 8px; max-width: 60ch; }
.empty { padding: 28px; text-align: center; color: var(--ink-soft); background: var(--sheet); border: 1px dashed var(--rule); border-radius: var(--radius); }

.site-foot { border-top: 1px solid var(--line); background: var(--sheet); padding: 28px 0; margin-top: 40px; color: var(--ink-soft); font-size: .9rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-foot .powered { color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.site-foot .powered img { height: 16px; width: auto; vertical-align: middle; }

@media (max-width: 860px) {
    .hero { padding-top: 28px; }
    .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
    .fund { grid-template-columns: 1fr auto; }
    .fund .flow { grid-column: 1 / -1; order: 3; }
    .months { gap: 3px; }
    .month .bars i { width: 6px; }
    .nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .book-title span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Halaman bantuan warga */
.help-toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.help-toc a { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.help-toc a:hover { border-color: var(--accent); }
.help-toc span { width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, white); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.help-topic { scroll-margin-top: 12px; }
.help-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
.help-num { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }
.help-steps { list-style: none; counter-reset: s; padding: 0; margin: 22px 0 0; }
.help-steps li { counter-increment: s; position: relative; padding: 0 0 18px 48px; font-size: 1.05rem; line-height: 1.55; }
.help-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .95rem; }
.help-steps li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 2px; background: color-mix(in srgb, var(--accent) 22%, white); }
.phones { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x mandatory; }
.phone { margin: 0; flex: 0 0 min(230px, 70%); scroll-snap-align: start; border-radius: 26px; padding: 7px; background: #1d2740; box-shadow: 0 18px 40px -22px rgba(29, 39, 64, .55); }
.phone img { display: block; width: 100%; border-radius: 20px; }
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 800; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details > div { color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
@media (max-width: 860px) { .help-split { grid-template-columns: 1fr; gap: 24px; } }

/* Tombol unduh aplikasi (komponen x-store-buttons) */
.store-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 12px; text-decoration: none; min-width: 180px; border: 1.5px solid; }
.store i { font-size: 1.5rem; }
.store span { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.store small { font-family: var(--body); font-weight: 500; font-size: .72rem; opacity: .8; }
.store-dark .store { background: var(--ink); color: #fff; border-color: var(--ink); }
.store-dark .store.is-soon { background: transparent; color: var(--ink-soft); border-color: var(--rule); border-style: dashed; cursor: default; }
