/* ==========================================================================
   SPPG — tema portal informasi
   Latar putih, hijau tua dari logo, satu keluarga huruf (IBM Plex Sans).
   ========================================================================== */
:root {
  --accent: #1a3a7c;      /* biru tua: tombol, link, aksen */
  --navy-900: #0c1f4a;    /* biru gelap: bar atas & footer */
  --navy-50: #eef2f9;     /* biru sangat muda: hover & latar badge */
  --gold: #c9a227;        /* emas: garis & penanda */
  --gold-soft: #e9d79a;
  --ink: #1a1d1b;
  --ink-2: #4d5550;
  --ink-3: #78807a;
  --line: #dfe3e0;
  --bg: #ffffff;
  --bg-muted: #f7f8f7;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Utility bar ---------- */
.utility { background: var(--navy-900); color: #c8d2e6; font-size: 13px; }
.utility-in { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.utility a { color: #fff; text-decoration: none; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.site-header::after { content: ""; display: block; height: 3px;
  background: var(--gold); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.brand small { display: block; font-size: 13px; color: var(--ink-3); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 4px; }
.nav a:hover { color: var(--ink); background: var(--bg-muted); }
.nav a[aria-current] { color: var(--accent); background: var(--navy-50); }
.nav-toggle { display: none; font: 600 14px var(--font); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 8px 14px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.hero-in { display: grid; grid-template-columns: 1fr; }
.hero-in { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.hero h1 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 700; max-width: 22ch; margin-bottom: 16px; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 62ch; }
.hero-panel { border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; background: #fff; }
.hero-panel h2 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0; padding: 18px 22px 6px; }
.hero-updates { list-style: none; margin: 0; padding: 0 22px; }
.hero-updates li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hero-updates li:last-child { border-bottom: 0; }
.hero-updates time { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.hero-updates a { color: var(--ink); font-weight: 600; line-height: 1.4; text-decoration: none; }
.hero-updates a:hover { color: var(--accent); text-decoration: underline; }
.hero-contact { background: var(--navy-50); padding: 16px 22px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.hero-contact strong { color: var(--navy-900); }
.hero-contact a { color: var(--accent); overflow-wrap: anywhere; }

.search { margin-top: 28px; max-width: 560px; }
.search label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.search-row { display: flex; }
.search select {
  flex: 1; min-width: 0; font: 400 16px var(--font); color: var(--ink); padding: 12px 40px 12px 14px;
  border: 1px solid #b8bfba; border-right: 0; border-radius: 4px 0 0 4px; background: #fff; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.search button { font: 600 15px var(--font); background: var(--accent); color: #fff; border: 0; border-radius: 0 4px 4px 0; padding: 0 22px; cursor: pointer; }
.search button:hover { background: var(--navy-900); }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 32px 0 72px; }
.section-muted { background: var(--bg-muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 26px; margin: 0; padding-left: 14px; border-left: 4px solid var(--gold); line-height: 1.15; }
.section-head a { font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.section-head.stacked { flex-direction: column; gap: 12px; }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.note-small { font-size: 13px; color: var(--ink-3); margin-top: 14px; }

.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.item { border-top: 2px solid var(--ink); padding-top: 16px; }
.item h3 { font-size: 18px; margin-bottom: 8px; }
.item p { color: var(--ink-2); font-size: 15px; margin: 0; }

.prose { font-size: 17px; }
.prose h2 { font-size: 21px; margin-top: 1.8em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

.ref-box { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 22px 24px 6px; }
.ref-box h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 4px; font-weight: 600; }
.ref-box p { margin-bottom: 18px; }

/* ---------- Tabel wilayah ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--bg-muted); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--navy-50); }
.data-table tbody th { font-weight: 600; }
.data-table tbody th a { color: var(--ink); text-decoration: none; }
.data-table tbody th a:hover { color: var(--accent); text-decoration: underline; }
.data-table .type { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; width: 160px; }
.data-table .go { text-align: right; width: 90px; }
.data-table .go a { font-size: 14px; font-weight: 600; text-decoration: none; }
.na { color: var(--ink-3); }

/* ---------- Alur ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.steps li { position: relative; padding: 0 20px 0 0; }
.steps li::before { content: ""; position: absolute; top: 9px; left: 22px; right: 0; height: 1px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps span { position: relative; display: inline-block; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 3px; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.steps h3 { font-size: 16px; margin-bottom: 6px; }
.steps p { font-size: 14px; color: var(--ink-2); margin: 0; }

/* ---------- Berita ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.news-item { border-top: 1px solid var(--line); padding-top: 18px; }
.meta { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.news-item h3 { font-size: 18px; margin-bottom: 8px; }
.news-item h3 a, .news-row h2 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover, .news-row h2 a:hover { color: var(--accent); text-decoration: underline; }
.news-item p:last-child { font-size: 15px; color: var(--ink-2); }
.news-row { display: grid; grid-template-columns: 180px 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.news-row:first-child { border-top: 1px solid var(--line); }
.news-row time { font-size: 14px; color: var(--ink-3); padding-top: 2px; }
.news-row h2 { font-size: 21px; margin-bottom: 8px; }
.news-row p:last-child { color: var(--ink-2); margin: 0; }
.thumb { display: block; margin-bottom: 14px; }
.thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.news-side .thumb { margin: 10px 0 0; }
.article-figure { margin-top: 28px; margin-bottom: 0; }
.article-figure img { width: 100%; border-radius: 4px; }
.article-figure figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.article-figure .credit { color: var(--ink-3); }
.sources { margin-top: 32px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--bg-muted); font-size: 14px; color: var(--ink-2); }
.sources p { margin: 0; }
.sources p + p { margin-top: 6px; }
.sources-label { font-weight: 600; color: var(--ink); }
.sources a { text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 15px; color: var(--ink-3); }
.pager a { font-weight: 600; text-decoration: none; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); background: transparent; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 24px; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details p { color: var(--ink-2); padding-right: 40px; margin-bottom: 18px; }

/* ---------- Halaman dalam ---------- */
.page-head { padding: 40px 0 24px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 700; margin-bottom: 10px; }
.page-head .lede { margin-bottom: 0; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.h-small { font-size: 20px; margin-bottom: 16px; }
.list-numbered { padding-left: 22px; }
.list-numbered li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sppg-list { list-style: none; padding: 0; margin: 0; counter-reset: sppg; }
.sppg-list li { counter-increment: sppg; position: relative; padding: 18px 0 16px 44px; border-bottom: 1px solid var(--line); }
.sppg-list li:first-child { border-top: 1px solid var(--line); }
.sppg-list li::before { content: counter(sppg); position: absolute; left: 0; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-50); color: var(--accent); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.sppg-list h3 { font-size: 17px; margin-bottom: 4px; }
.sppg-list p { margin: 0 0 6px; color: var(--ink-2); }
.sppg-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.sppg-meta a { font-weight: 600; text-decoration: none; }
.sppg-meta a:hover { text-decoration: underline; }
.empty { color: var(--ink-2); background: var(--bg-muted); border: 1px dashed var(--line); padding: 16px 18px; border-radius: 4px; }
.byline { color: var(--ink-3); font-size: 15px; margin: 0; }
.article-body { padding-top: 32px; }
.article-foot { padding: 24px 24px 72px; }
.article-foot a { font-weight: 600; text-decoration: none; }

/* ---------- Kontak ---------- */
.contact-band { padding: 44px 0; border-top: 1px solid var(--line); }
.contact-band h2 { font-size: 22px; }
.contact-band p { color: var(--ink-2); max-width: 72ch; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 3px solid var(--gold); background: var(--navy-900); color: #c8d2e6; font-size: 15px; padding: 52px 0 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 60px; height: 60px; background: #fff; border-radius: 50%; padding: 3px; flex: none; }
.footer-brand strong { display: block; color: #fff; font-size: 17px; margin-bottom: 6px; }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #9aa8c6; font-weight: 600; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; padding-bottom: 24px; display: flex; justify-content: space-between; gap: 32px; font-size: 13px; color: #9aa8c6; }
.footer-bottom p { margin: 0; max-width: 80ch; }

/* ---------- Responsif ---------- */
/* ---------- Dasar responsif ---------- */
html, body { overflow-x: clip; }            /* pengaman: tidak ada geser samping */
.hero-text, .split > *, .hero-in > * { min-width: 0; }
.data-table .unit { display: none; }
.site-header { position: sticky; top: 0; z-index: 30; }
img, select, button, input { max-width: 100%; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .hero-in, .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cols-4 { grid-template-columns: 1fr 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 22px 70px; }
  .steps li::before { top: 22px; bottom: -2px; left: 26px; right: auto; width: 1px; height: auto; }
  .steps span { position: absolute; left: 0; top: 0; }
  .news-grid { grid-template-columns: 1fr; gap: 0; }
  .news-item { padding-bottom: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- HP ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }

  /* Bar atas & header */
  .utility-in { justify-content: center; text-align: center; }
  .utility-in span { font-size: 12px; }
  .utility-in a { display: none; }
  .header-in { min-height: 64px; gap: 12px; }
  .brand { gap: 10px; min-width: 0; }
  .brand img { width: 42px; height: 42px; flex: none; }
  .brand strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand small { font-size: 12px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; flex: none; }
  .nav-toggle::before { content: ""; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .nav-toggle[aria-expanded="true"]::before { display: none; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 4px 16px 12px; box-shadow: 0 10px 20px rgba(0,0,0,.08); max-height: calc(100vh - 100px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current] { background: transparent; }

  /* Hero */
  .hero { padding: 28px 0 32px; }
  .hero h1 { font-size: 28px; line-height: 1.2; }
  .lede { font-size: 16px; }
  .search { margin-top: 20px; }
  .search-row { flex-direction: column; gap: 8px; }
  .search select { border-right: 1px solid #b8bfba; border-radius: 4px; min-height: 48px; }
  .search button { border-radius: 4px; min-height: 48px; }

  /* Section */
  .section { padding: 40px 0; }
  .section-tight { padding: 24px 0 48px; }
  .section-head { margin-bottom: 20px; flex-wrap: wrap; }
  .section-head h2 { font-size: 21px; }
  .cols-4 { grid-template-columns: 1fr; gap: 0; }
  .item { padding: 14px 0 16px; border-top-width: 1px; }
  .prose { font-size: 16px; }
  .ref-box { padding: 18px 18px 4px; }

  /* Tabel wilayah jadi daftar yang bisa diketuk */
  .table-wrap { border-left: 0; border-right: 0; border-radius: 0; margin: 0 -16px; }
  .data-table thead { display: none; }
  .data-table tbody tr { display: flex; align-items: center; position: relative; border-bottom: 1px solid var(--line); }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table tbody th, .data-table tbody td { border-bottom: 0 !important; }
  .data-table tbody tr:active { background: var(--navy-50); }
  .data-table tbody th { flex: 1; padding: 14px 16px; }
  .data-table tbody th a::after { content: ""; position: absolute; inset: 0; }   /* seluruh baris bisa diketuk */
  .data-table .type { display: block; margin: 2px 0 0; }
  .data-table td.num { width: auto; padding: 14px 4px; white-space: nowrap; color: var(--ink-2); font-size: 14px; }
  .data-table .unit { display: inline; }
  .data-table .col-schools { display: none; }
  .data-table td.go { width: 36px; padding: 14px 16px 14px 6px; }
  .data-table .go-text { display: none; }
  .data-table td.go a::before { content: ""; display: block; width: 8px; height: 8px; border-top: 2px solid var(--ink-3); border-right: 2px solid var(--ink-3); transform: rotate(45deg); }

  /* Halaman dalam */
  .page-head { padding: 24px 0 18px; }
  .page-head h1 { font-size: 26px; }
  .crumbs { font-size: 13px; margin-bottom: 10px; }
  .sppg-list li { padding-left: 40px; }

  /* Berita */
  .news-row { grid-template-columns: 1fr; gap: 4px; padding: 20px 0; }
  .news-row h2 { font-size: 19px; }
  .article-body { padding-top: 20px; }
  .sources { margin-top: 24px; }
  .article-foot { padding: 20px 16px 48px; }
  .article-foot a { display: inline-block; padding: 10px 0; }
  .pager { font-size: 14px; }
  .pager a { padding: 10px 0; }

  /* FAQ & kontak */
  .faq summary { padding: 16px 36px 16px 0; }
  .contact-band { padding: 32px 0; }
  .contact-band h2 { font-size: 20px; }

  /* Footer */
  .site-footer { padding-top: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-bottom: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .site-footer li { margin-bottom: 0; }
  .site-footer li a { display: inline-block; padding: 6px 0; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 10px; }
}

/* HP kecil (≤ 360px) */
@media (max-width: 360px) {
  .brand small { display: none; }
  .hero h1 { font-size: 25px; }
}

/* ---------- Jaringan situs ---------- */
.net-group { margin-bottom: 40px; }
.net-group h2 { font-size: 20px; margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--gold); line-height: 1.2; }
.net-group h2 span { font-size: 14px; font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.net-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.net-list li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 18px; min-width: 0; }
.net-prov { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.net-links { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.net-links a { color: var(--accent); overflow-wrap: anywhere; text-decoration: none; }
.net-links a:hover { text-decoration: underline; }
.net-note { font-size: 14px; color: var(--ink-2); max-width: 70ch; }
@media (max-width: 960px) { .net-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .net-list { grid-template-columns: minmax(0, 1fr); } .net-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; } }

/* ---------- Logo teks (dipakai bila file logo belum ada) ---------- */
.logo-mark { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none; border-radius: 50%; background: var(--navy-900); border: 3px solid var(--gold); color: #fff; line-height: 1; text-align: center; }
.logo-mark b { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.logo-mark i { font-style: normal; font-size: 7px; font-weight: 600; letter-spacing: .06em; color: var(--gold-soft); margin-top: 3px; max-width: 90%; overflow: hidden; white-space: nowrap; }
.footer-brand .logo-mark b { font-size: 15px; }
.footer-brand .logo-mark i { font-size: 8px; }
