/* ==========================================================================
   Indikator Strategis Kabupaten Kutai Kartanegara
   Stylesheet utama
   ========================================================================== */

:root {
  /* Palet terang */
  --bg:            #FFF9F2;
  --bg-alt:        #FDF1E3;
  --surface:       #FFFFFF;
  --surface-2:     #FFF6EC;
  --border:        #F0DFCB;
  --border-strong: #E3C9AA;

  --text:          #2E1A12;
  --text-soft:     #6B4E3D;
  --text-mute:     #75563F;       /* ≥ 5:1 di putih & krem */

  --brand:         #ED7014;
  --brand-strong:  #D45D06;
  --brand-text:    #B5470A;       /* oranye sebagai TEKS kecil: ≥ 4,5:1 di putih/krem */
  --brand-btn:     #C2410C;       /* latar tombol utama dengan teks putih */
  --brand-btn-2:   #A33A0A;
  --green-text:    #2F7D4B;
  --rose-text:     #B8322E;
  --brand-soft:    #FFE9D2;
  --amber:         #F5B32B;
  --amber-soft:    #FFF1CE;
  --teal:          #2C8F8B;
  --rose:          #D9534F;
  --plum:          #6C63A6;
  --green:         #4B9E5F;

  --shadow-sm: 0 1px 2px rgba(70, 35, 12, .06);
  --shadow:    0 6px 24px -8px rgba(70, 35, 12, .18);
  --shadow-lg: 0 24px 60px -24px rgba(70, 35, 12, .32);

  --radius:    16px;
  --radius-lg: 24px;
  --radius-sm: 10px;

  --maxw: 1160px;
  --nav-h: 66px;

  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --grid-line: rgba(120, 80, 50, .12);
  --tick: #8B6B54;
}

[data-theme="dark"] {
  --bg:            #16100C;
  --bg-alt:        #1D1510;
  --surface:       #221912;
  --surface-2:     #2A1F17;
  --border:        #3A2A1E;
  --border-strong: #4E3826;

  --text:          #F6EADD;
  --text-soft:     #D2BBA4;
  --text-mute:     #B39A82;

  --brand:         #FF8C3B;
  --brand-strong:  #FFA35F;
  --brand-text:    #FFB27A;
  --brand-btn:     #C2410C;
  --brand-btn-2:   #A33A0A;
  --green-text:    #7EDCA6;
  --rose-text:     #F4A0A0;
  --brand-soft:    #3A2415;
  --amber:         #FFC44D;
  --amber-soft:    #3A2C10;
  --teal:          #4FC3BE;
  --rose:          #F0736E;
  --plum:          #9D93DE;
  --green:         #6FCB86;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 6px 24px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .8);

  --grid-line: rgba(255, 220, 190, .10);
  --tick: #A98D74;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--pintar-h, 0px) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ============================ NAVBAR ============================ */

.nav {
  position: sticky;
  top: var(--pintar-h, 0px);
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--amber) 100%);
  display: grid; place-items: center;
  color: #2E1A12;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.02em;
  box-shadow: 0 4px 12px -4px rgba(237, 112, 20, .6);
}

.brand__text { line-height: 1.15; }
.brand__title { font-weight: 800; font-size: 14.5px; letter-spacing: -.01em; }
.brand__sub { font-size: 11px; color: var(--text-mute); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav__links a {
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 13.25px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.nav__links a:hover { background: var(--brand-soft); color: var(--brand-text); }
.nav__links a.is-active { background: var(--brand); color: #fff; }


.nav__tools { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: .18s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-text); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }

.nav__burger { display: none; }

/* Drawer mobile */
.drawer {
  position: fixed;
  inset: calc(var(--nav-h) + var(--pintar-h, 0px)) 0 auto 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 18px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 99;
  box-shadow: var(--shadow);
}
.drawer.is-open { display: flex; }
.drawer a {
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-soft);
}
.drawer a:hover { background: var(--brand-soft); color: var(--brand-text); }

/* ============================ HERO ============================ */

.hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--amber) 26%, transparent), transparent 62%),
    radial-gradient(700px 380px at 8% 105%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
}
.hero__deco span {
  position: absolute;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.hero__deco span:nth-child(1) { width: 320px; height: 320px; right: -110px; top: -120px; }
.hero__deco span:nth-child(2) { width: 420px; height: 420px; right: -160px; top: -170px; border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.hero__deco span:nth-child(3) { width: 200px; height: 200px; left: -80px; bottom: -90px; }

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 46px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}
.eyebrow b {
  background: var(--brand-btn);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .05em;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 18px 0 16px;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brand) 0%, var(--amber) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: 1.03rem;
  color: var(--text-soft);
  max-width: 54ch;
  margin: 0 0 26px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.btn--primary {
  background: linear-gradient(135deg, var(--brand-btn) 0%, var(--brand-btn-2) 100%);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(237, 112, 20, .85);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(237, 112, 20, .95); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-text); transform: translateY(-2px); }

/* Kartu ringkas di hero */
.hero__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.hero__panel h3 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}
.hero__panel .period-note { font-size: 12.5px; color: var(--text-mute); margin: 0 0 16px; }

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
.mini__label { font-size: 11.5px; color: var(--text-mute); font-weight: 600; line-height: 1.35; }
.mini__value {
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.mini__value small { font-size: .58em; font-weight: 700; color: var(--text-mute); margin-left: 3px; }

/* ============================ SECTIONS ============================ */

section.block { padding: 72px 0; }
section.block.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.sec-head { max-width: 760px; margin-bottom: 34px; }
.sec-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-text);
  background: var(--brand-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.sec-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 0 10px;
  font-weight: 800;
}
.sec-head p { margin: 0; color: var(--text-soft); font-size: 1rem; }

/* ============================ KONTROL ============================ */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.seg {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  gap: 3px;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
  transition: .18s;
  white-space: nowrap;
}
.seg button:hover { color: var(--brand-text); }
.seg button.is-active {
  background: var(--brand-btn);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(237, 112, 20, .7);
}

.search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}
.search input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: .18s;
}
.search input::placeholder { color: var(--text-mute); }
.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-mute);
  pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: .18s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ============================ KPI CARDS ============================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px;
}

.kpi {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border-color .22s;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--kpi-accent, var(--brand));
  opacity: .9;
}
.kpi:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.kpi__top { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 14px; }
.kpi__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--kpi-accent, var(--brand)) 15%, transparent);
  color: var(--kpi-accent, var(--brand));
  font-size: 19px;
}
.kpi__label { font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--text); }
.kpi__abbr { font-size: 11px; color: var(--text-mute); font-weight: 600; }

.kpi__value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi__unit { font-size: .48em; font-weight: 700; color: var(--text-mute); margin-left: 4px; letter-spacing: 0; }
.kpi__note { font-size: 12px; color: var(--text-mute); margin-top: 9px; line-height: 1.45; }

.kpi__tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-mute);
}
.kpi__tag.good { color: var(--green-text); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 12%, transparent); }
.kpi__tag.warn { color: var(--rose-text, #B8322E); border-color: color-mix(in srgb, var(--rose) 40%, transparent); background: color-mix(in srgb, var(--rose) 12%, transparent); }

.kpi.is-hidden { display: none; }

/* tautan "dari angka ke layanan" di kaki tiap kartu */
.kpi__aksi {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px; font-weight: 700;
}
.kpi__aksi a { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-text); text-decoration: none; min-height: 28px; padding: 2px 0; }
.kpi__aksi a + a { color: var(--text-mute); }
.kpi__aksi a:hover { text-decoration: underline; }
.kpi__bagi { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 0; min-height: 28px; margin-left: auto; font: inherit; font-weight: 700; color: var(--text-mute); cursor: pointer; }
.kpi__bagi:hover { color: var(--brand-text); text-decoration: underline; }
.kpi__bagi:disabled { cursor: progress; opacity: .7; }
.alur-catatan { margin: 18px 0 0; font-size: 12.5px; color: var(--text-mute); line-height: 1.55; }
.alur-catatan b { color: var(--text-soft); }

/* ajakan ke gerbang layanan (PINTAR Kukar) */
.alur {
  margin-top: 28px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), color-mix(in srgb, #1D5FAD 12%, var(--surface)));
  border: 1px solid var(--border);
}
.alur h3 { margin: 0 0 6px; font-size: 1.15rem; letter-spacing: -.015em; }
.alur p { margin: 0 0 16px; font-size: 14px; color: var(--text-soft); max-width: 70ch; line-height: 1.6; }
.alur__tombol { display: flex; flex-wrap: wrap; gap: 10px; }

/* spanduk pratinjau draf */
.pratinjau {
  background: #FFF1CE; color: #6B4A00; border-bottom: 1px solid #F5D9A8;
  padding: 9px 20px; font-size: 13px; text-align: center;
}
[data-theme="dark"] .pratinjau { background: #3A2C10; color: #FFC44D; border-color: #5A4415; }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-mute);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 14.5px;
}

/* ============================ CARDS & CHARTS ============================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.card__title { font-size: 1.05rem; font-weight: 800; letter-spacing: -.015em; margin: 0; }
.card__sub { font-size: 13px; color: var(--text-mute); margin: 2px 0 18px; }

.chart-box { position: relative; height: 340px; }
.chart-box.tall { height: 400px; }
.chart-box.short { height: 280px; }

.split { display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; align-items: start; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.note-list { display: grid; gap: 12px; }
.note {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.note h4 { margin: 0 0 5px; font-size: 13.5px; font-weight: 800; }
.note p { margin: 0; font-size: 13px; color: var(--text-soft); line-height: 1.55; }
.note strong { color: var(--text); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat__value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.stat__label { font-size: 12px; color: var(--text-mute); font-weight: 600; line-height: 1.4; margin-top: 3px; }

/* Highlight banner */
.banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.banner__item {
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(135deg, var(--brand-btn) 0%, var(--brand-btn-2) 100%);   /* oranye pekat: teks putih ≥ 5:1 */
  color: #fff;
  box-shadow: 0 14px 30px -16px rgba(237, 112, 20, .9);
}
.banner__item.amber { background: linear-gradient(135deg, var(--amber) 0%, #E09400 100%); color: #2E1A12; box-shadow: 0 14px 30px -16px rgba(224, 148, 0, .9); }   /* kuning: teks gelap */
.banner__item h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; opacity: .96; letter-spacing: .02em; }
.banner__item .big { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.banner__item p { margin: 6px 0 0; font-size: 12.5px; opacity: .93; line-height: 1.5; }

/* ============================ PETA / CARTOGRAM ============================ */

.map-shell { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }

.cartogram {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, auto);
  gap: 10px;
  max-width: 560px;
  margin-inline: auto;
}

.region {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, outline-color .2s;
  outline: 2px solid transparent;
  outline-offset: 2px;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  font-family: inherit;
  color: inherit;
}
.region:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow); z-index: 2; }
.region.is-focus { outline-color: var(--text); }
.region.is-home { border: 2px dashed var(--text); }
.region__name { font-size: 11.5px; font-weight: 800; line-height: 1.2; }
.region__val { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.region__unit { font-size: 10px; font-weight: 600; opacity: .92; }

.map-side { display: grid; gap: 14px; }
.legend { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-mute); font-weight: 600; }
.legend__bar { flex: 1; height: 10px; border-radius: 999px; }

.region-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.region-detail h4 { margin: 0 0 2px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.region-detail .rank { font-size: 12px; color: var(--text-mute); font-weight: 600; margin-bottom: 14px; }
.region-detail dl { margin: 0; display: grid; gap: 10px; }
.region-detail .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.region-detail .row:last-child { border-bottom: 0; padding-bottom: 0; }
.region-detail dt { font-size: 12.5px; color: var(--text-mute); font-weight: 600; }
.region-detail dd { margin: 0; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Daftar definisi generik (dipakai komponen IPM) */
#ipmKomponen .row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--border);
}
#ipmKomponen .row:last-child { border-bottom: 0; padding-bottom: 0; }
#ipmKomponen dt { font-size: 13px; color: var(--text-soft); font-weight: 600; }
#ipmKomponen dd { margin: 0; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================ ACCORDION ============================ */

.acc { display: grid; gap: 12px; }
.acc__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.acc__item.is-open { border-color: var(--brand); box-shadow: var(--shadow); }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
}
.acc__num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 13px;
}
.acc__item.is-open .acc__num { background: var(--brand); color: #fff; }
.acc__label { flex: 1; font-weight: 800; font-size: 14.5px; letter-spacing: -.01em; }
.acc__chev { flex-shrink: 0; transition: transform .25s; color: var(--text-mute); }
.acc__item.is-open .acc__chev { transform: rotate(180deg); color: var(--brand); }
.acc__panel { display: none; padding: 0 20px 20px 66px; }
.acc__item.is-open .acc__panel { display: block; }
.acc__panel ul { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.acc__panel li { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }
.acc__panel li strong { color: var(--text); }

/* ============================ TABEL SUMBER ============================ */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 800; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-mute); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ============================ FOOTER ============================ */

.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer h5 { margin: 0 0 12px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); font-weight: 800; }
.footer p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { font-size: 13.5px; color: var(--text-soft); text-decoration: none; }
.footer ul a:hover { color: var(--brand-text); }
.footer__bar {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-mute);
}

/* ============================ ANIMASI ============================ */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Tombol ke atas */
.to-top {
  position: fixed;
  right: 20px; bottom: 76px;   /* di atas tombol Tanya PST (asisten) */
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--brand);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .25s;
  z-index: 90;
}
.to-top.is-show { opacity: 1; pointer-events: auto; transform: none; }

/* ============================ RESPONSIF ============================ */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 34px; }
  .split, .split-even, .map-shell { grid-template-columns: 1fr; }
  .split-3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 1340px) {
  .brand__sub { display: none; }
  .nav__links a { padding: 8px 9px; font-size: 12.75px; }
  .nav__inner { gap: 12px; }
}

@media (max-width: 1120px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
}

@media (max-width: 860px) {
  section.block { padding: 54px 0; }
  .hero { padding: 46px 0 44px; }
  .chart-box { height: 300px; }
  .brand__sub { display: none; }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 18px; }
  .cartogram { gap: 7px; }
  .region { min-height: 72px; padding: 9px 6px; }
  .region__name { font-size: 10px; }
  .region__val { font-size: .9rem; }
  .acc__panel { padding-left: 20px; }
  /* kendali segmen: boleh menyempit & membungkus supaya kartu tidak melebar di HP kecil */
  .seg { max-width: 100%; flex-wrap: wrap; justify-content: center; }
  .seg button { padding: 7px 12px; font-size: 12.5px; white-space: normal; }
  #ipmKomponen .row { flex-wrap: wrap; gap: 4px 12px; }
  .split, .split-even { grid-template-columns: minmax(0, 1fr); }
  .nav__inner { gap: 10px; }
  .nav__tools { margin-left: auto; }
  .brand__title { font-size: 13.5px; }
}


/* ---------------- Bandingkan kab/kota ---------------- */
.banding__pilih { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.banding__pilih button {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-soft); font: 600 12.5px 'Plus Jakarta Sans', sans-serif; cursor: pointer; transition: .15s;
}
.banding__pilih button:hover { border-color: var(--brand); color: var(--brand-text); }
.banding__pilih button[aria-pressed="true"] { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }
.banding__ring { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.banding__ring div { background: var(--surface-2, rgba(0,0,0,.03)); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.banding__ring b { display: block; font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.15; }
.banding__ring span { font-size: 11.5px; color: var(--text-mute); font-weight: 600; }
.banding__ring div.kukar { border-color: var(--brand); background: var(--brand-soft, rgba(237,112,20,.08)); }
.banding__ring div.kukar b { color: var(--brand-text); }
.chart-box--tinggi { height: 380px; }
.banding__sumber { margin: 12px 0 0; font-size: 12px; color: var(--text-mute); line-height: 1.55; }
.banding__sumber a { color: var(--brand-text); }
@media (max-width: 640px) { .chart-box--tinggi { height: 420px; } }
