/* ==========================================================
   SIPILKADES — halaman publik
   Palet: merah, emas, putih, hitam
   ========================================================== */
:root {
  --tinta: #B01E23;
  --tinta-700: #861519;
  --tinta-50: #FBEDEC;
  --ink: #151515;
  --muted: #5C5750;
  --kertas: #FFFFFF;
  --krem: #FAF7F0;
  --emas-tua: #9C7A22;
  --garis: #E7E1D5;
  --kunyit: #C9A13B;
  --daun: #2F7D5B;
  --merah: #B2382F;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--kertas);
  --bs-link-color: var(--tinta);
  --bs-link-hover-color: var(--tinta-700);
  --bs-link-color-rgb: 176, 30, 35;
  --bs-link-hover-color-rgb: 134, 21, 25;
}
body.pub { font-size: 1rem; line-height: 1.6; background: var(--kertas); }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--kunyit); outline-offset: 2px; }
.skip { position: absolute; left: 1rem; top: .5rem; z-index: 100; background: #fff; padding: .5rem 1rem; }

/* Tombol */
.btn-tinta { --bs-btn-bg: var(--tinta); --bs-btn-border-color: var(--tinta); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--tinta-700); --bs-btn-hover-border-color: var(--tinta-700); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--tinta-700); --bs-btn-active-border-color: var(--tinta-700); font-weight: 700; }
.btn-outline-tinta { --bs-btn-color: var(--tinta); --bs-btn-border-color: var(--tinta);
  --bs-btn-hover-bg: var(--tinta); --bs-btn-hover-border-color: var(--tinta); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--tinta-700); --bs-btn-active-color: #fff; font-weight: 600; }
.link-tinta { color: var(--tinta); font-weight: 600; text-decoration: none; }
.link-tinta:hover { text-decoration: underline; }

/* Navigasi */
.pub-nav { background: #fff; border-top: 4px solid var(--tinta); border-bottom: 1px solid var(--garis); box-shadow: inset 0 -2px 0 var(--kunyit); position: sticky; top: 0; z-index: 30; }
.pub-nav .navbar { padding: .6rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .65rem; color: var(--tinta); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.brand-text small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.emblem { color: var(--tinta); flex-shrink: 0; }
.emblem-img { object-fit: contain; flex-shrink: 0; }
.pub-nav .nav-link { font-weight: 600; color: var(--muted); padding: .5rem .8rem !important; border-radius: 8px; }
.pub-nav .nav-link:hover { color: var(--ink); background: var(--tinta-50); }
.pub-nav .nav-link.active { color: var(--tinta); background: var(--tinta-50); }
.navbar-toggler { border: 0; font-size: 1.6rem; color: var(--ink); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-place { color: var(--muted); font-weight: 600; margin-bottom: .75rem; }
.hero-title { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; margin-bottom: 1.1rem; max-width: 14ch; }
.hero-date { font-size: 1.1rem; font-weight: 600; display: flex; gap: .5rem; align-items: center; margin-bottom: 1.25rem; }
.hero-date i { color: var(--tinta); }
.hero-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.75rem; }
.hero-links .btn-link { color: var(--ink); font-weight: 600; }

.countdown { display: flex; gap: .6rem; flex-wrap: wrap; }
.countdown > div { background: var(--ink); color: #fff; border-radius: 10px; padding: .55rem .9rem; min-width: 80px; }
.countdown b { color: var(--kunyit); display: block; font-size: 1.75rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .8rem; opacity: .75; }
.countdown-done { margin: 0; font-weight: 700; color: var(--daun); }

/* Slip cek DPT — meniru potongan kertas bersobekan */
.slip { position: relative; background: #fff; border: 1px solid var(--garis); border-radius: 4px 4px 14px 14px; padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 1px 0 var(--garis), 0 18px 40px -24px rgba(21, 21, 21, .35); }
.slip { border-top: 6px solid var(--tinta); }
.slip::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: radial-gradient(circle at 7px -2px, var(--tinta) 6px, transparent 6.5px) 0 0 / 14px 10px repeat-x; }
.slip::after { content: ""; position: absolute; left: 1.75rem; right: 1.75rem; top: 14px; border-top: 2px dashed var(--garis); }
.slip-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; margin: .5rem 0 .35rem; }
.slip-text { color: var(--muted); font-size: .95rem; }
.slip-note { font-size: .82rem; color: var(--muted); margin: .85rem 0 0; }
.nik-input { font-variant-numeric: tabular-nums; letter-spacing: .08em; font-weight: 600; }
.form-control:focus, .form-select:focus { border-color: var(--tinta); box-shadow: 0 0 0 .2rem rgba(176, 30, 35, .18); }

/* Fakta */
.facts { background: var(--ink); color: #fff; }
.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts-row > div { padding: 1.25rem 1rem; border-left: 1px solid rgba(255, 255, 255, .14); }
.facts-row > div:first-child { border-left: 0; padding-left: 0; }
.facts-row dt { font-size: .85rem; font-weight: 500; color: var(--muted); }
.facts .facts-row dt { color: rgba(255, 255, 255, .7); }
.facts .facts-row dd { color: var(--kunyit); }
.facts-row dd { font-size: 1.7rem; font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.facts-small { background: #fff; border: 1px solid var(--garis); border-radius: 12px; }
.facts-small > div { border-left-color: var(--garis) !important; }
.facts-small > div:first-child { padding-left: 1rem; }
@media (max-width: 767px) {
  .facts-row { grid-template-columns: repeat(2, 1fr); }
  .facts-row > div { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  .facts-row > div:nth-child(-n+2) { border-top: 0; }
  .facts-small > div { padding-left: 1rem !important; }
}

/* Section */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--krem); border-top: 1px solid var(--garis); border-bottom: 1px solid var(--garis); }
.section-head { margin-bottom: 1.75rem; max-width: 60ch; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .35rem; }
.section-head p { color: var(--muted); margin: 0; }
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.75rem; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; }
.page-head p { color: var(--muted); max-width: 60ch; margin: 0; }
.narrow { max-width: 760px; }
.empty { color: var(--muted); padding: 2rem; text-align: center; border: 1px dashed var(--garis); border-radius: 12px; background: var(--krem); }

/* Surat suara — elemen utama halaman */
.ballot { background: #fff; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.ballot-head { display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; align-items: baseline;
  padding: .85rem 1.25rem; background: var(--ink); color: #fff; }
.ballot-head span { font-size: .85rem; opacity: .7; }
.ballot-head strong { font-weight: 700; color: var(--kunyit); }
.ballot-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ballot-cell { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .9rem;
  padding: 1.25rem 1rem 1.5rem; color: var(--ink); text-decoration: none; border-left: 2px solid var(--ink); transition: background .15s; }
.ballot-cell:first-child { border-left: 0; }
.ballot-cell:hover { background: var(--tinta-50); }
.ballot-cell:hover .ballot-no { background: var(--ink); box-shadow: 0 0 0 3px var(--kunyit); }
.ballot-no { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--tinta); color: #fff;
  font-size: 1.6rem; font-weight: 800; transition: background .15s; }
.ballot-foto { width: 100%; max-width: 220px; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--garis); background: var(--krem); }
.ballot-nama { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
@media (max-width: 767px) {
  .ballot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ballot-cell { border-left: 0; border-top: 2px solid var(--ink); }
  .ballot-cell:nth-child(even) { border-left: 2px solid var(--ink); }
  .ballot-cell:nth-child(-n+2) { border-top: 0; }
}
.calon-foto-kosong { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--tinta-50) 0 10px, #fff 10px 20px); color: var(--tinta); }
.calon-foto-kosong span { font-size: 2rem; font-weight: 800; }

/* Linimasa tahapan */
.timeline { list-style: none; padding: 0; margin: 0; max-width: 820px; }
.timeline li { display: grid; grid-template-columns: 210px 1fr; gap: 1.5rem; position: relative; padding: 0 0 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: 216px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--garis); }
.timeline li::after { content: ""; position: absolute; left: 221px; top: 1.3rem; bottom: 0; width: 2px; background: var(--garis); }
.timeline li:last-child::after { display: none; }
.tl-date { font-weight: 600; color: var(--muted); font-size: .92rem; text-align: right; font-variant-numeric: tabular-nums; }
.tl-body { padding-left: 1.4rem; }
.tl-body p { color: var(--muted); margin: .15rem 0 0; font-size: .95rem; }
.tl-done .tl-body strong { color: var(--muted); }
.tl-done::before { background: var(--garis) !important; }
.tl-now::before { background: var(--kunyit) !important; border-color: var(--kunyit) !important; box-shadow: 0 0 0 5px rgba(201, 161, 59, .25); }
.tl-badge { display: inline-block; margin-left: .5rem; font-size: .75rem; font-weight: 700; background: #F7EFD9; color: #6B5217; padding: .1rem .5rem; border-radius: 99px; }
@media (max-width: 575px) {
  .timeline li { grid-template-columns: 1fr; gap: .1rem; padding-left: 1.6rem; }
  .timeline li::before { left: 0; }
  .timeline li::after { left: 5px; }
  .tl-date { text-align: left; }
  .tl-body { padding-left: 0; }
}

/* Pengumuman */
.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.news-list-stack { grid-template-columns: 1fr; }
.news-item { border-top: 3px solid var(--tinta); padding-top: 1rem; }
.news-item time { font-size: .85rem; color: var(--muted); font-weight: 600; }
.news-item h3, .news-item h2 { font-size: 1.15rem; font-weight: 700; margin: .35rem 0 .5rem; line-height: 1.35; }
.news-item h3 a, .news-item h2 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover, .news-item h2 a:hover { color: var(--tinta); text-decoration: underline; }
.news-item p { color: var(--muted); margin: 0; }
@media (max-width: 767px) { .news-list { grid-template-columns: 1fr; } }
.article time { color: var(--muted); font-weight: 600; font-size: .9rem; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; margin: .5rem 0 1.5rem; }
.article-body { font-size: 1.08rem; line-height: 1.75; max-width: 68ch; }

/* Halaman calon */
.calon-list { display: grid; gap: 1.25rem; }
.calon-row { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; background: #fff; border: 1px solid var(--garis); border-radius: 14px; padding: 1.5rem; align-items: start; }
.calon-row-foto { position: relative; }
.calon-foto { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; }
.calon-no { position: absolute; top: -10px; left: -10px; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 1.35rem; border: 3px solid #fff; z-index: 2; }
.calon-no-lg { width: 3.6rem; height: 3.6rem; font-size: 1.8rem; }
.calon-row h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .2rem; }
.calon-meta { color: var(--muted); }
.calon-visi { font-size: 1.1rem; line-height: 1.55; border-left: 3px solid var(--kunyit); padding-left: 1rem; margin: 1rem 0 1.25rem; max-width: 60ch; }
@media (max-width: 575px) { .calon-row { grid-template-columns: 1fr; } .calon-row-foto { max-width: 220px; } }
.detail-foto { position: relative; margin-bottom: 1.5rem; }
.calon-foto-lg { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; }
.detail-nama { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 1.5rem; }
.detail-sub { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 .6rem; color: var(--tinta); }
.visi { font-size: 1.3rem; line-height: 1.5; font-weight: 600; margin: 0; max-width: 55ch; }
.misi { padding-left: 1.3rem; max-width: 65ch; }
.misi li { margin-bottom: .6rem; padding-left: .3rem; }
.misi li::marker { font-weight: 800; color: var(--tinta); }
.bio { display: grid; gap: .15rem; margin: 0; }
.bio dt { font-size: .82rem; color: var(--muted); font-weight: 500; margin-top: .6rem; }
.bio dd { margin: 0; font-weight: 600; }

/* Hasil cek DPT */
.result { background: #fff; border: 1px solid var(--garis); border-radius: 14px; padding: 1.75rem; height: 100%; }
.result h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: .6rem; }
.result-icon { font-size: 2.2rem; display: block; margin-bottom: .5rem; }
.result-ok { border-color: #BFDCCD; border-top: 6px solid var(--daun); }
.result-ok .result-icon { color: var(--daun); }
.result-no { border-top: 6px solid var(--merah); }
.result-no .result-icon { color: var(--merah); }
.result-wait { border-top: 6px solid var(--kunyit); }
.result-wait .result-icon { color: #9C7A22; }
.result-idle .result-icon { color: var(--tinta); }
.result-data { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 1rem 0; }
.result-data dt { color: var(--muted); font-weight: 500; }
.result-data dd { margin: 0; font-weight: 700; }
.result-tps { background: var(--tinta-50); border-radius: 10px; padding: 1rem 1.25rem; display: flex; flex-direction: column; }
.result-tps span { font-size: .85rem; color: var(--muted); }
.result-tps strong { font-size: 1.35rem; color: var(--tinta); font-weight: 800; }
.result-tps small { color: var(--muted); }

/* Hasil penghitungan */
.hasil-progress { color: var(--muted); }
.hasil-list { display: grid; gap: .75rem; }
.hasil-row { display: grid; grid-template-columns: 2.6rem 64px 1fr; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--garis); border-radius: 12px; padding: .9rem 1.1rem; }
.hasil-row.is-lead { border-color: var(--tinta); box-shadow: inset 4px 0 0 var(--tinta); }
.hasil-no { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.hasil-foto { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.hasil-foto.calon-foto-kosong span { font-size: 1.1rem; }
.hasil-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .45rem; }
.hasil-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.hasil-top b { color: var(--ink); font-size: 1.1rem; }
.hasil-bar { height: 12px; background: var(--krem); border-radius: 99px; overflow: hidden; }
.hasil-bar span { display: block; height: 100%; background: var(--tinta); border-radius: 99px; transition: width .6s ease; }
.table-hasil { background: #fff; border: 1px solid var(--garis); }
.table-hasil td, .table-hasil th { font-variant-numeric: tabular-nums; }

/* Footer */
.pub-footer { background: var(--ink); color: rgba(255, 255, 255, .85); border-top: 4px solid var(--kunyit); padding: 2.5rem 0 1.75rem; margin-top: 2rem; font-size: .95rem; }
.pub-footer a { color: #fff; text-decoration: none; }
.pub-footer a:hover { color: var(--kunyit); text-decoration: underline; }
.pub-footer .text-body-secondary { color: rgba(255, 255, 255, .6) !important; }
.pub-footer .emblem { color: var(--kunyit); }

/* Halaman login */
.login-page { background: #fff; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-side { background: var(--tinta); color: #fff; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
  background-image: radial-gradient(circle at 85% 110%, rgba(201, 161, 59, .35), transparent 45%); }
.login-brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; }
.login-brand .emblem { color: #fff; }
.login-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.login-brand strong { font-weight: 800; font-size: 1.2rem; }
.login-brand small { opacity: .75; }
.login-lead { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; max-width: 18ch; margin-bottom: 2rem; }
.role-row { display: flex; gap: 1rem; padding: 1rem 0; border-top: 1px solid rgba(255, 255, 255, .2); }
.role-row i { font-size: 1.4rem; color: var(--kunyit); }
.role-row strong { display: block; }
.role-row span { opacity: .8; font-size: .95rem; }
.login-form { display: grid; place-items: center; padding: 2rem; }
.login-card { width: 100%; max-width: 400px; }
@media (max-width: 991px) { .login-wrap { grid-template-columns: 1fr; } .login-side { display: none; } }

/* Tombol emas */
.btn-emas { --bs-btn-bg: var(--kunyit); --bs-btn-border-color: var(--kunyit); --bs-btn-color: var(--ink);
  --bs-btn-hover-bg: #B58E2C; --bs-btn-hover-border-color: #B58E2C; --bs-btn-hover-color: var(--ink);
  --bs-btn-active-bg: #A07C24; --bs-btn-active-border-color: #A07C24; --bs-btn-active-color: var(--ink); font-weight: 700; }

/* Tahapan daftar pemilih */
.facts-stage { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.facts-stage > span { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; }
.step { display: flex; align-items: center; gap: .45rem; }
.step:not(:last-child)::after { content: ""; width: 18px; height: 2px; background: rgba(255, 255, 255, .25); margin-left: .2rem; }
.step-dot { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; border: 2px solid rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .7); }
.step-name { font-weight: 700; font-size: .9rem; color: rgba(255, 255, 255, .7); }
.step-done .step-dot { background: var(--kunyit); border-color: var(--kunyit); color: var(--ink); }
.step-done .step-name { color: #fff; }
.step-now .step-dot { background: var(--tinta); border-color: var(--kunyit); color: #fff; box-shadow: 0 0 0 3px rgba(201, 161, 59, .35); }
.step-now .step-name { color: var(--kunyit); }
.step-desc { display: none; }

/* Pendaftaran petugas */
.recruit { height: 100%; background: #fff; border: 1px solid var(--garis); border-top: 6px solid var(--tinta); border-radius: 12px; padding: 1.75rem; display: flex; flex-direction: column; }
.recruit-kpps { border-top-color: var(--kunyit); }
.recruit-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.recruit-code { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--tinta); }
.recruit-kpps .recruit-code { color: var(--emas-tua); }
.recruit-state { font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; }
.recruit-state.open { background: #E6F3EC; color: #1F5E43; }
.recruit-state.closed { background: #EEE; color: #555; }
.recruit h2 { font-size: 1.25rem; font-weight: 800; }
.recruit h3 { font-size: 1rem; font-weight: 700; margin-top: .75rem; }
.recruit ul { padding-left: 1.1rem; color: var(--muted); margin-bottom: 1.5rem; }
.recruit ul li { margin-bottom: .3rem; }
.recruit .btn { margin-top: auto; align-self: flex-start; }
.recruit-band { background: var(--tinta); color: #fff; background-image: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 60%); border-top: 4px solid var(--kunyit); }
.recruit-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2.5rem 0; }
.recruit-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .35rem; color: #fff; }
.recruit-band p { margin: 0; opacity: .85; max-width: 52ch; }
.recruit-band-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Formulir publik */
.form-card { background: #fff; border: 1px solid var(--garis); border-top: 6px solid var(--tinta); border-radius: 12px; padding: 1.75rem; }
.form-card fieldset { margin-bottom: 1.5rem; }
.form-card legend { font-size: 1.05rem; font-weight: 800; padding-bottom: .5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--kunyit); width: 100%; float: none; }
.form-label { font-weight: 600; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-check-input:checked { background-color: var(--tinta); border-color: var(--tinta); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Pengaman warna: judul hitam, tombol tanpa gradien tema */
.pub { --bs-heading-color: var(--ink); --bs-link-color: var(--tinta); --bs-link-color-rgb: 176, 30, 35; --bs-link-hover-color: var(--tinta-700); }
.pub h1, .pub h2, .pub h3, .pub h4, .pub h5, .pub h6 { color: var(--bs-heading-color); }
.pub .btn { background-image: none; }

.pub-nav .nav-link, .pub-nav .btn { white-space: nowrap; }
@media (min-width: 1200px) { .pub-nav .nav-link { padding-left: .6rem !important; padding-right: .6rem !important; font-size: .95rem; } }

/* Panitia Pilkades */
.page-head .sekretariat { margin-top: .5rem; font-weight: 600; color: var(--ink); }
.group-title { font-size: 1.15rem; font-weight: 800; margin: 2rem 0 1rem; padding-left: .75rem; border-left: 4px solid var(--tinta); }
.group-title:first-child { margin-top: 0; }
.panitia-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.panitia-grid-inti { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.panitia-card { background: #fff; border: 1px solid var(--garis); border-radius: 12px; padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.panitia-inti { border-top: 5px solid var(--kunyit); }
.panitia-head { display: flex; gap: .75rem; align-items: center; }
.panitia-foto { width: 44px; height: 44px; max-width: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--kunyit); }
.panitia-inti .panitia-foto { width: 52px; height: 52px; max-width: 52px; }
.panitia-ini { display: grid; place-items: center; background: var(--ink); color: var(--kunyit); font-weight: 800; font-size: .9rem; }
.panitia-jabatan { display: inline-block; font-size: .78rem; font-weight: 800; color: #fff; background: var(--tinta); padding: .1rem .55rem; border-radius: 99px; }
.panitia-card h3 { font-size: 1.05rem; font-weight: 800; margin: .3rem 0 .1rem; }
.panitia-unsur { font-size: .85rem; color: var(--muted); }
.panitia-tugas { margin: 0; padding-left: 1.1rem; font-size: .92rem; }
.panitia-tugas li { margin-bottom: .25rem; }
.panitia-tugas li::marker { color: var(--tinta); }
.panitia-tugas .lainnya { list-style: none; margin-left: -1.1rem; color: var(--muted); font-size: .85rem; }
.panitia-hp { margin: 0; font-size: .9rem; font-weight: 600; }
.seksi-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.seksi { background: var(--ink); color: #fff; border-radius: 12px; padding: 1.1rem 1.25rem; }
.seksi h3 { font-size: .95rem; font-weight: 800; color: var(--kunyit); margin-bottom: .6rem; }
.seksi ul { list-style: none; padding: 0; margin: 0; }
.seksi li { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .92rem; }
.seksi li:first-child { border-top: 0; }
.seksi li span { color: rgba(255, 255, 255, .65); font-size: .82rem; white-space: nowrap; }
.dusun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.dusun-card { background: #fff; border: 1px solid var(--garis); border-top: 5px solid var(--tinta); border-radius: 12px; padding: 1.25rem; }
.dusun-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .35rem; }
.dusun-kadus { font-size: .92rem; margin-bottom: .5rem; }
.dusun-angka { display: flex; gap: 1.5rem; margin: .5rem 0; }
.dusun-angka dt { font-size: .8rem; font-weight: 500; color: var(--muted); }
.dusun-angka dd { font-size: 1.4rem; font-weight: 800; color: var(--tinta); margin: 0; }
.dusun-tps { list-style: none; padding: .6rem 0 0; margin: 0; border-top: 1px dashed var(--garis); font-size: .88rem; }
.dusun-tps li { padding: .15rem 0; }
.dusun-tps b { color: var(--tinta); margin-right: .3rem; }
@media (min-width: 1200px) { .pub-nav .nav-link { padding-left: .5rem !important; padding-right: .5rem !important; font-size: .92rem; } .pub-nav .navbar-brand { margin-right: .5rem; } }

/* Beranda: anggota panitia per seksi tampil sebagai kartu berfoto */
.panitia-home .panitia-grid-inti { margin-bottom: .5rem; }
.panitia-home .group-title-home { font-size: 1.05rem; margin: 1.75rem 0 .9rem; }

/* ===== Kegiatan: slide halaman utama ===== */
.kegiatan-slide { border-radius: 18px; overflow: hidden; background: #111; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.kegiatan-slide .carousel-item { position: relative; }
.ks-media { aspect-ratio: 16 / 9; background: #111; }
.ks-media .km-isi { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-media video.km-isi { object-fit: contain; background: #000; }
.ks-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 3.5rem 1.5rem 2.6rem; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.35) 60%, transparent); pointer-events: none; }
.ks-caption a, .ks-caption .ks-judul { pointer-events: auto; }
.ks-tgl { display: block; font-size: .85rem; opacity: .9; margin-bottom: .2rem; }
.ks-judul { display: block; color: #fff; font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.6rem); line-height: 1.2; text-decoration: none; }
.ks-judul:hover { text-decoration: underline; color: #fff; }
.ks-ket { display: block; font-size: .9rem; opacity: .9; margin-top: .2rem; max-width: 70ch; }
.kegiatan-slide .carousel-indicators { margin-bottom: .7rem; }
.kegiatan-slide .carousel-control-prev, .kegiatan-slide .carousel-control-next { width: 9%; }
.kegiatan-slide.ada-video .ks-caption { display: none; }
@media (max-width: 575.98px) {
  .ks-media { aspect-ratio: 4 / 3; }
  .ks-caption { padding: 2.5rem 1rem 2.2rem; }
  .ks-ket { display: none; }
}

/* Media umum (foto, video, YouTube) */
.km-kosong { width: 100%; height: 100%; min-height: 160px; display: grid; place-items: center; color: #9b948a; font-size: 2rem; background: var(--krem); }
.km-yt { position: relative; border: 0; padding: 0; width: 100%; height: 100%; background: #000; cursor: pointer; display: block; }
.km-yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.km-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.km-putar { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: var(--tinta);
  color: #fff; display: grid; place-items: center; font-size: 2.4rem; box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: transform .15s; }
.km-yt:hover .km-putar, .km-yt:focus-visible .km-putar { transform: scale(1.08); }
.km-putar-kecil { width: 46px; height: 46px; font-size: 1.6rem; }

/* Daftar kegiatan */
.kegiatan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.kegiatan-kartu { display: flex; flex-direction: column; background: var(--kertas); border: 1px solid var(--garis); border-radius: 16px; overflow: hidden;
  color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.kegiatan-kartu:hover { box-shadow: 0 10px 26px rgba(0,0,0,.08); transform: translateY(-2px); color: var(--ink); }
.kegiatan-kartu-gbr { position: relative; aspect-ratio: 16 / 10; background: var(--krem); }
.kegiatan-kartu-gbr img, .kegiatan-kartu-gbr video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kegiatan-jumlah { position: absolute; right: .6rem; bottom: .6rem; background: rgba(0,0,0,.65); color: #fff; font-size: .78rem; font-weight: 600; padding: .15rem .5rem; border-radius: 99px; }
.kegiatan-kartu-isi { padding: .9rem 1rem 1.1rem; }
.kegiatan-kartu-isi time { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kegiatan-kartu-isi h2 { font-size: 1.05rem; font-weight: 700; margin: .25rem 0 .35rem; line-height: 1.3; }
.kegiatan-kartu-isi p { color: var(--muted); }

/* Galeri satu kegiatan */
.kegiatan-galeri { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.kegiatan-galeri-item { margin: 0; }
.kegiatan-galeri-item .km-isi, .kegiatan-galeri-item > a { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #000; }
.kegiatan-galeri-item img.km-isi, .kegiatan-galeri-item > a img { width: 100%; height: 100%; object-fit: cover; }
.kegiatan-galeri-item video.km-isi { object-fit: contain; }
.kegiatan-galeri-item.kg-video { grid-column: 1 / -1; }
.kegiatan-galeri-item.kg-video .km-isi { aspect-ratio: 16 / 9; }
.kegiatan-galeri-item figcaption { font-size: .85rem; color: var(--muted); margin-top: .35rem; }
@media (max-width: 575.98px) { .kegiatan-galeri { grid-template-columns: 1fr; } }
