/* =========================================================
   Website Desa - gaya tampilan publik (mobile-first)
   Warna aksen diatur dari admin lewat variabel --accent
   ========================================================= */
:root {
  --accent: #0f766e; --accent-dark: #0b5952; --accent-soft: #e7f1f0; --accent-softer: #f3f8f8; --accent-text: #0f766e; --on-accent: #fff;
  --bg: #ffffff; --bg-alt: #f5f7f9; --text: #1f2937; --muted: #6b7280; --line: #e5e7eb; --card: #fff;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --info: #0369a1;
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(15,23,42,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --bottom-nav: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom)); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: #111827; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.75rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.d-block { display: block; }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 999; }
.skip:focus { left: 8px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.print-only { display: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Tombol & input ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .65em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none !important; transition: transform .1s, background .2s, box-shadow .2s; min-height: 44px; }
.btn:hover { background: var(--bg-alt); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: #fff; border-color: #fff; color: var(--accent-text); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.8); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5b; }
.btn-sm { padding: .4em .85em; font-size: .85rem; min-height: 36px; }
.btn-lg { padding: .85em 1.6em; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--bg-alt); }
.icon-btn .ic { width: 22px; height: 22px; }
.input { width: 100%; padding: .7em .9em; border: 1px solid #d1d5db; border-radius: var(--radius-sm); font: inherit; font-size: 16px; background: #fff; color: var(--text); min-height: 44px; }
.input:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.input-sm { width: auto; min-height: 38px; padding: .4em .8em; font-size: .9rem; }
textarea.input { resize: vertical; }
.field { margin-bottom: 14px; }
.field label, .field legend { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.help { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.req { color: var(--bad); }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; margin: 8px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }

/* ---------- Pemberitahuan ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; font-size: .95rem; border: 1px solid; }
.alert .ic { margin-top: 3px; }
.alert-success { background: #ecfdf3; border-color: #a7f3c4; color: #14532d; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.flash-wrap { padding-top: 14px; }

/* ---------- Bilah atas & header ---------- */
.topbar { background: var(--accent-dark); color: rgba(255,255,255,.92); font-size: .82rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; }
.topbar a { color: inherit; }
.topbar-links { display: none; gap: 16px; }
.office-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; display: inline-block; flex-shrink: 0; }
.is-open .dot { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.3); }
.is-closed .dot { background: #f87171; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.brand strong { display: block; font-size: 1.02rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; gap: 4px; }

/* Menu (HP: laci samping) */
.nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); background: #fff; z-index: 70; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; overflow-y: auto; padding: 0 0 24px; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
.nav.open { transform: none; visibility: visible; }
.nav-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.nav-search { display: flex; align-items: center; gap: 8px; margin: 12px 16px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; }
.nav-search input { border: 0; outline: 0; font: inherit; font-size: 16px; padding: 10px 0; width: 100%; background: transparent; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.nav-backdrop.show { opacity: 1; pointer-events: auto; }
.menu, .sub { list-style: none; margin: 0; padding: 0; }
.menu > li > a, .menu summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; color: var(--text); font-weight: 600; cursor: pointer; list-style: none; text-decoration: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu details[open] summary .ic { transform: rotate(180deg); }
.menu .active { color: var(--accent-text); }
.sub { background: var(--bg-alt); padding: 4px 0; }
.sub a { display: block; padding: 10px 18px 10px 32px; color: var(--text); font-size: .95rem; }
.sub a:hover { background: var(--accent-soft); text-decoration: none; }
body.nav-open { overflow: hidden; }

/* Pita pengumuman penting */
.ticker { background: #fff7ed; border-bottom: 1px solid #fed7aa; font-size: .9rem; }
.ticker-in { display: flex; align-items: center; gap: 10px; min-height: 42px; overflow: hidden; }
.ticker-label { display: inline-flex; gap: 6px; align-items: center; background: #ea580c; color: #fff; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .78rem; flex-shrink: 0; }
.ticker-items { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.ticker-items::-webkit-scrollbar { display: none; }
.ticker-items a { color: #9a3412; font-weight: 600; }

/* ---------- Navigasi bawah (HP) ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 20px rgba(0,0,0,.05); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--bottom-nav); color: var(--muted); font: inherit; font-size: .7rem; font-weight: 600; background: none; border: 0; cursor: pointer; text-decoration: none !important; }
.bottom-nav .ic { width: 22px; height: 22px; }
.bottom-nav .active { color: var(--accent-text); }
.wa-float { position: fixed; right: 16px; bottom: calc(var(--bottom-nav) + 16px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37,211,102,.45); z-index: 45; }
.wa-float .ic { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--accent-dark); }
.hero-static { position: relative; background: linear-gradient(135deg, var(--accent-dark), var(--accent)); background-size: cover; background-position: center; color: #fff; }
.hero-static::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)); }
.hero-text { position: relative; padding: 56px 16px 96px; }
.hero-text h1 { color: #fff; max-width: 760px; }
.hero-text p { font-size: 1.05rem; max-width: 640px; opacity: .95; }
.hero-kicker { display: inline-block; background: rgba(255,255,255,.18); padding: 4px 12px; border-radius: 999px; font-size: .8rem; margin-bottom: 12px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.slider { position: relative; overflow: hidden; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; max-height: 560px; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.42) 45%, rgba(0,0,0,.75)); }
/* bayangan teks agar tetap terbaca di atas gambar terang */
.slide-text { position: absolute; left: 0; right: 0; bottom: 64px; z-index: 2; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.55), 0 4px 18px rgba(0,0,0,.45); }
.slide-text h2 { color: #fff; font-size: clamp(1.35rem, 4.5vw, 2.4rem); max-width: 720px; }
.slider-dots { position: absolute; bottom: 52px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.slider-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; transition: width .2s; }
.slider-dots button.active { width: 24px; background: #fff; }

/* ---------- Akses cepat ---------- */
.quick-wrap { position: relative; margin-top: -40px; z-index: 5; }
.hero-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; min-width: 0; background: transparent; }
.hero-search .btn { min-height: 40px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 4px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .78rem; font-weight: 600; line-height: 1.25; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.quick-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.qi-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.qi-icon .ic { width: 22px; height: 22px; }

/* ---------- Bagian & judul ---------- */
.section { padding-top: 44px; padding-bottom: 44px; }
.section-sm { padding-top: 22px; padding-bottom: 22px; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.eyebrow { display: block; color: var(--accent-text); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.sub-title { margin: 28px 0 14px; font-size: 1.25rem; }
.mini-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.page-head { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; padding: 28px 0 30px; }
.page-head h1 { color: #fff; margin: 6px 0 4px; }
.page-head p { margin: 0; opacity: .9; max-width: 720px; }
.crumbs { font-size: .82rem; opacity: .9; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: inherit; }
.article-head .crumbs { color: var(--muted); }
.article-head .crumbs a { color: var(--accent-text); }

/* ---------- Grid & kartu ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.gap-lg { gap: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card.pad, .pad { padding: 18px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 1.08rem; margin-bottom: 14px; }
.card-media { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--accent-soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.03); }
.ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent-text); opacity: .5; }
.ph .ic { width: 40px; height: 40px; }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { margin: 6px 0; font-size: 1.02rem; }
.card-body h3 a { color: var(--text); }
.card-body p { color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: .84rem; }
.meta .ic { width: 1em; height: 1em; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.empty-state .ic { width: 40px; height: 40px; opacity: .45; margin-bottom: 6px; }
.link-card { display: flex; gap: 14px; align-items: center; color: var(--text); text-decoration: none !important; }
.link-card .ic { width: 28px; height: 28px; color: var(--accent-text); }
.link-card small { display: block; color: var(--muted); }

/* Statistik ringkas */
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stat-box .ic { color: var(--accent-text); width: 22px; height: 22px; margin-bottom: 4px; }
.stat-box strong { font-size: 1.35rem; line-height: 1.2; color: #111827; }
.stat-box span { color: var(--muted); font-size: .82rem; }
.stat-row.compact { margin-bottom: 20px; }

/* Sambutan */
.greeting { display: grid; gap: 22px; align-items: center; }
.greeting-photo { max-width: 260px; margin: 0 auto; aspect-ratio: 4 / 5; width: 100%; border-radius: 20px; overflow: hidden; background: var(--accent-soft); box-shadow: var(--shadow); }
.greeting-photo img { width: 100%; height: 100%; object-fit: cover; }
.sign { margin-top: 12px; }

/* Progres & status */
.progress { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.progress.big { height: 14px; }
.progress-meta { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); }
.progress-meta strong { color: var(--text); }
.status { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #f3f4f6; color: #374151; }
.card-media .status { position: absolute; top: 10px; left: 10px; }
.status-rencana { background: #e0f2fe; color: #075985; }
.status-berjalan { background: #fef3c7; color: #92400e; }
.status-selesai { background: #dcfce7; color: #166534; }
.status-c-baru { background: #fee2e2; color: #991b1b; }
.status-c-diproses { background: #fef3c7; color: #92400e; }
.status-c-selesai { background: #dcfce7; color: #166534; }
.status-c-ditolak { background: #e5e7eb; color: #374151; }

/* APBDes */
.apb-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.apb-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px; }
.apb-label { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.apb-card strong { display: block; font-size: 1.35rem; margin-top: 4px; color: #111827; }
.apb-card small { color: var(--muted); }
.toolbar-public { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.year-pick { display: flex; align-items: center; gap: 8px; }
.year-pick label { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.year-pick .input { width: auto; }
.donut-wrap { display: grid; gap: 18px; align-items: center; }
.donut { width: 190px; height: 190px; border-radius: 50%; margin: 0 auto; position: relative; display: grid; place-items: center; }
.donut::before { content: ""; position: absolute; inset: 30px; background: #fff; border-radius: 50%; }
.donut span { position: relative; font-weight: 700; font-size: .95rem; }
.legend { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.legend li span { flex: 1; }
.legend i { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { margin-bottom: 14px; }
.hb-label { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin-bottom: 4px; }
.hb-label b { white-space: nowrap; }
.hb-track { position: relative; height: 12px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.hb-track span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.hb-budget { background: var(--accent-soft); background: color-mix(in srgb, var(--accent) 35%, #fff); }
.hb-real { background: var(--accent); top: 3px !important; bottom: 3px !important; }
.hbars small { color: var(--muted); font-size: .78rem; }
.legend-inline { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.legend-inline i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.lg-budget { background: color-mix(in srgb, var(--accent) 35%, #fff); }
.lg-real { background: var(--accent); margin-left: 10px; }
.apb-detail { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; overflow: hidden; }
.apb-detail summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; font-weight: 700; cursor: pointer; background: var(--accent-softer); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--bg-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table .num { text-align: right; white-space: nowrap; }
.group-row td { font-weight: 700; background: #fafafa; }
.indent { padding-left: 26px !important; }

/* Berita & artikel */
.layout-side { display: grid; gap: 28px; grid-template-columns: 1fr; }
.sidebar-public .widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.widget h3 { font-size: 1rem; margin-bottom: 10px; }
.side-search { display: flex; gap: 8px; margin-bottom: 16px; }
.side-search .btn { flex-shrink: 0; }
.side-search.big { padding: 12px; }
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.cat-list a:hover, .cat-list a.active { background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }
.cat-list span { color: var(--muted); font-size: .85rem; }
.popular { margin: 0; padding-left: 20px; }
.popular li { margin-bottom: 10px; }
.popular a { color: var(--text); font-weight: 600; font-size: .92rem; }
.popular small { display: block; color: var(--muted); }
.article-head { padding-top: 24px; }
.article-head .meta { margin-bottom: 18px; }
.article-cover { margin: 0 auto 22px; }
.article-cover img { width: 100%; border-radius: var(--radius); }
.prose { font-size: 1.04rem; line-height: 1.8; overflow-wrap: break-word; }
.prose h2 { font-size: 1.4rem; margin-top: 1.5em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.3em; }
.prose img { border-radius: 10px; margin: 1em 0; }
.prose blockquote { margin: 1.2em 0; padding: 10px 18px; border-left: 4px solid var(--accent); background: var(--accent-softer); border-radius: 0 10px 10px 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; }
.prose a { text-decoration: underline; }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 1em 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.share span { font-weight: 600; font-size: .9rem; margin-right: 4px; }
.share a, .share button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-alt); color: var(--text); border: 0; cursor: pointer; }
.share .sh-wa { background: #25d366; color: #fff; }
.share .sh-fb { background: #1877f2; color: #fff; }
.share .sh-tg { background: #229ed9; color: #fff; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.before-after figure { margin: 0; position: relative; }
.before-after img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.before-after figcaption { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 99px; }
.info-card .status { margin-bottom: 6px; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: .9rem; margin: 10px 0 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 600; text-align: right; }

/* Paginasi & filter */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0 8px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 600; }
.pagination .current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.pill { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none !important; }
.pill.active, .pill:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Agenda & pengumuman */
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.event { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.event-date { flex-shrink: 0; width: 58px; text-align: center; background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 6px 0; line-height: 1.1; }
.event-date strong { display: block; font-size: 1.4rem; }
.event-date span { font-size: .75rem; text-transform: uppercase; font-weight: 700; }
.event h3 { margin: 0 0 4px; font-size: 1rem; }
.event-body { flex: 1; min-width: 0; }
.event-body p { margin: 8px 0; font-size: .92rem; }
.event-img { display: none; }
.event-list.past .event-date { background: #e5e7eb; color: #374151; }
.ann-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ann-list a { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); text-decoration: none !important; }
.ann-list .ic { color: var(--accent-text); margin-top: 3px; }
.ann-list small { display: block; color: var(--muted); }
.ann-list .important a { border-color: #fdba74; background: #fff7ed; }
.ann-list .important .ic { color: #ea580c; }
.ann-cards { display: grid; gap: 14px; }
.ann-card.important { border-left: 4px solid #ea580c; }
.ann-card.expired { opacity: .7; }
.ann-card h2 { font-size: 1.2rem; margin: 8px 0; }
.cl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Perangkat desa */
.people-scroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.person { flex: 0 0 150px; scroll-snap-align: start; text-align: center; }
.person img, .person .ph { width: 150px; height: 180px; object-fit: cover; border-radius: var(--radius); background: var(--accent-soft); margin-bottom: 8px; }
.person strong { display: block; font-size: .92rem; line-height: 1.3; }
.person small { color: var(--muted); font-size: .8rem; }
.people-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.person-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.person-card img, .person-card .ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--accent-soft); margin-bottom: 8px; }
.person-card strong { font-size: .95rem; line-height: 1.3; }
.person-card .role { color: var(--accent-text); font-size: .85rem; font-weight: 600; }

/* Galeri */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery-grid a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--accent-soft); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-grid a:hover img { transform: scale(1.05); }
.g-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 8px; color: #fff; font-size: .8rem; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 82vh; max-width: 100%; object-fit: contain; border-radius: 6px; }
.lb-caption { color: #fff; margin-top: 10px; text-align: center; }
.lb-close { position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; display: grid; place-items: center; }

/* UMKM */
.product .card-media { aspect-ratio: 1; }
.price { font-weight: 800; color: var(--accent-text); margin: 6px 0 10px; }

/* Dokumen */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc-list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.doc-list li > .btn { grid-column: 1 / -1; }
.doc-list small { display: block; color: var(--muted); }
.doc-list p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.doc-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: .72rem; }

/* Layanan */
.service-list { display: grid; gap: 10px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.service summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.service summary::-webkit-details-marker { display: none; }
.service summary > span:nth-child(2) { flex: 1; }
.service summary small { display: block; color: var(--muted); font-size: .85rem; }
.service[open] summary > .ic { transform: rotate(180deg); }
.svc-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.svc-body { padding: 0 16px 16px 70px; }
.svc-body h4 { margin: 0 0 6px; font-size: .95rem; }
.svc-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; color: var(--muted); font-size: .9rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding: 4px 0 4px 26px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }

/* Pengaduan */
.form-grid-public { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.ticket-box { text-align: center; background: #ecfdf3; border: 1px solid #a7f3c4; border-radius: var(--radius); padding: 24px 18px; margin-bottom: 20px; }
.ticket-box > .ic { width: 44px; height: 44px; color: var(--ok); }
.ticket-code { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 16px; }
.ticket-code code { font-size: 1.3rem; font-weight: 800; background: #fff; padding: 8px 16px; border-radius: 10px; border: 2px dashed var(--ok); letter-spacing: .04em; }
.complaint-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.complaint-list h3 { margin: 10px 0 6px; }
.response { margin-top: 12px; padding: 12px 14px; background: var(--accent-softer); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; }
.response p { margin: 6px 0; }
.timeline { list-style: none; display: flex; padding: 0; margin: 18px 0; counter-reset: s; }
.timeline li { flex: 1; text-align: center; position: relative; font-size: .82rem; color: var(--muted); padding-top: 34px; counter-increment: s; }
.timeline li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: #e5e7eb; color: #6b7280; display: grid; place-items: center; font-weight: 700; z-index: 1; }
.timeline li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px; background: #e5e7eb; }
.timeline li:first-child::after { display: none; }
.timeline li.done { color: var(--text); font-weight: 600; }
.timeline li.done::before, .timeline li.done::after { background: var(--accent); color: var(--on-accent); }
.visitor-list { list-style: none; padding: 0; margin: 0; }
.visitor-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .9rem; }
.visitor-list.light li { border-color: var(--line); }

/* Survei */
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars-input input { position: absolute; opacity: 0; pointer-events: none; }
.stars-input label { font-size: 2.4rem; line-height: 1; color: #d1d5db; cursor: pointer; margin: 0 !important; transition: color .1s; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: #f59e0b; }
.stars-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score strong { font-size: 3rem; color: var(--accent-text); line-height: 1; }

/* Kontak */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 10px; padding: 7px 0; align-items: flex-start; }
.contact-list .ic { margin-top: 4px; }
.contact-list.dark .ic { color: var(--accent-text); }
.office-box { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; margin-top: 14px; background: var(--bg-alt); }
.office-box small { display: block; color: var(--muted); }
.office-box.is-open { background: #ecfdf3; }
.office-box.is-closed { background: #fef2f2; }
.phone-list { list-style: none; padding: 0; margin: 0; }
.phone-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.map-box { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; background: var(--bg-alt); }
.map-box iframe { width: 100%; height: 100%; border: 0; }

/* Pencarian */
.search-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.search-results li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.search-results li > a { display: block; margin-top: 6px; font-size: 1.05rem; }
.search-results p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }

/* Ajakan */
.cta-box { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; border-radius: 22px; padding: 28px 22px; display: grid; gap: 18px; }
.cta-box h2 { color: #fff; }
.cta-box p { opacity: .92; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Halaman galat */
.error-page { padding-top: 60px; padding-bottom: 60px; }
.error-code { font-size: 5rem; font-weight: 800; color: var(--accent-text); line-height: 1; margin-bottom: 10px; }
.error-code .ic { width: 70px; height: 70px; }
.maintenance { padding: 0; display: grid; place-items: center; min-height: 100vh; }
.maintenance img { margin: 0 auto 16px; }
.lead { font-size: 1.15rem; }

/* ---------- Kaki halaman ---------- */
.footer { background: #0f172a; color: #cbd5e1; padding-top: 40px; margin-top: 20px; font-size: .92rem; }
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer a { color: #e2e8f0; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding-bottom: 28px; }
.brand-footer strong { color: #fff; }
.brand-footer small { color: #94a3b8; }
.brand-footer img { background: #fff; border-radius: 10px; padding: 4px; }
.footer p { margin-top: 12px; }
.socials { display: flex; gap: 8px; margin-top: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.socials a:hover { background: var(--accent); }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; font-size: .82rem; color: #94a3b8; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Layar menengah ---------- */
@media (min-width: 600px) {
  .quick-grid { grid-template-columns: repeat(8, 1fr); }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-2-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .apb-cards { grid-template-columns: repeat(2, 1fr); }
  .people-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid-public { grid-template-columns: 1fr 1fr; }
  .form-grid-public .full { grid-column: 1 / -1; }
  .doc-list li { grid-template-columns: auto 1fr auto; }
  .doc-list li > .btn { grid-column: auto; }
  .donut-wrap { grid-template-columns: 190px 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .slide { aspect-ratio: 16 / 7; }
  .event-img { display: block; width: 120px; flex-shrink: 0; }
  .event-img img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; }
}

/* ---------- Layar besar (desktop) ---------- */
@media (min-width: 992px) {
  body { padding-bottom: 0; }
  .bottom-nav, .only-mobile { display: none !important; }
  .wa-float { bottom: 24px; right: 24px; }
  .topbar-links { display: flex; }
  .header-in { min-height: 76px; }
  .nav { position: static; transform: none; visibility: visible; width: auto; box-shadow: none; overflow: visible; padding: 0; background: transparent; }
  .nav-backdrop { display: none; }
  .menu { display: flex; align-items: center; gap: 2px; }
  .menu > li { position: relative; }
  .menu > li > a, .menu summary { padding: 10px 12px; border-radius: 10px; font-size: .95rem; gap: 4px; }
  .menu > li > a:hover, .menu summary:hover { background: var(--bg-alt); text-decoration: none; }
  .menu .sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 60; }
  .menu .sub a { padding: 9px 12px; border-radius: 8px; }
  .has-sub details:not([open]) .sub { display: none; }
  /* jembatan tak terlihat di celah antara menu & submenu agar submenu tidak tertutup saat kursor lewat */
  .menu .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-2-3 { grid-template-columns: repeat(3, 1fr); }
  .apb-cards { grid-template-columns: repeat(4, 1fr); }
  .stat-row { grid-template-columns: repeat(6, 1fr); }
  .stat-row.compact { grid-template-columns: repeat(4, 1fr); }
  .people-grid { grid-template-columns: repeat(5, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .layout-side { grid-template-columns: minmax(0, 1fr) 320px; }
  .layout-side .grid-2-3 { grid-template-columns: repeat(2, 1fr); }
  .greeting { grid-template-columns: 300px 1fr; gap: 44px; }
  .greeting-photo { max-width: none; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .cta-box { grid-template-columns: 1fr auto; align-items: center; padding: 40px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero-text { padding: 90px 16px 130px; }
  .slide-text { bottom: 90px; }
  .quick-wrap { margin-top: -56px; }
  .page-head { padding: 44px 0; }
}
@media (max-width: 991px) { .hide-mobile { display: none !important; } }

/* Hemat animasi bila pengguna meminta */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Cetak ---------- */
@media print {
  .topbar, .header, .bottom-nav, .wa-float, .footer, .ticker, .no-print, .share, .sidebar-public, .page-head .crumbs { display: none !important; }
  body { padding: 0; font-size: 12px; }
  .page-head { background: none; color: #000; padding: 0; }
  .page-head h1 { color: #000; }
  .print-only { display: block; }
  .card, .apb-card { break-inside: avoid; box-shadow: none; }
  .apb-detail { break-inside: auto; }
  .apb-detail:not([open]) > *:not(summary) { display: block; }
  a { color: #000; }
  .layout-side { display: block; }
}

/* Pita mode demo */
.demo-bar { background: #111827; color: #f9fafb; text-align: center; font-size: .82rem; padding: 7px 16px; }
.demo-bar a { color: #fde68a; text-decoration: underline; }
@media print { .demo-bar { display: none; } }
