/* MPP extras: design tokens dari laporan.css (MaiTua / Satu Data) */

.mpp-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.mpp-nav a:hover,
.mpp-nav a.is-active {
  color: var(--brand-deep);
  font-weight: 600;
}

.filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.filters input,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand-deep);
}

.btn--ghost {
  background: rgba(26, 79, 191, 0.08);
  color: var(--brand);
}

.report-actions,
.hero__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.85rem;
  width: auto;
  max-width: none;
}

.report-actions .btn,
.hero__actions .btn {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 2.1rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 650;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn--pdf {
  background: var(--brand);
  color: #fff;
}

.btn--xls {
  background: #fff;
  color: var(--brand-deep);
  border-color: #b9ccea;
}

.btn--pdf:hover,
.btn--xls:hover {
  transform: translateY(-1px);
}

.btn--pdf:hover {
  background: var(--brand-deep);
}

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.export-modal[hidden] {
  display: none;
}

.export-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 35, 64, 0.45);
}

.export-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(12, 35, 64, 0.28);
  padding: 1.45rem 1.4rem 1.35rem;
}

.export-modal__close {
  position: absolute;
  top: 0.45rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  color: #5b6d82;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.export-modal__title {
  margin: 0 1.5rem 0.35rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.export-modal__lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.export-modal__actions {
  display: grid;
  gap: 0.75rem;
}

.export-choice {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid #d4e0ef;
  background: #f8fbff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.export-choice strong {
  font-size: 0.98rem;
  color: var(--brand-deep);
}

.export-choice span {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

.export-choice:hover {
  border-color: var(--brand);
  background: #fff;
  transform: translateY(-1px);
}

.export-choice--full {
  background: #0d3a8c;
  border-color: #0d3a8c;
}

.export-choice--full strong,
.export-choice--full span {
  color: #fff;
}

.export-choice--full span {
  color: rgba(255, 255, 255, 0.82);
}

.export-choice--full:hover {
  background: #1a4fbf;
  border-color: #1a4fbf;
}

.export-loading {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(12, 35, 64, 0.55);
  backdrop-filter: blur(2px);
}

.export-loading[hidden] {
  display: none;
}

.export-loading__card {
  width: min(380px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(12, 35, 64, 0.3);
  padding: 1.5rem 1.35rem 1.4rem;
  text-align: center;
}

.export-loading__pct {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #0d3a8c;
  font-variant-numeric: tabular-nums;
}

.export-loading__bar {
  width: 100%;
  height: 10px;
  margin: 0 0 1rem;
  border-radius: 999px;
  background: #e7eef8;
  overflow: hidden;
}

.export-loading__bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a4fbf, #0d3a8c);
  transition: width 0.25s ease;
}

.export-loading__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.export-loading__text {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

body.modal-open,
body.export-loading-open {
  overflow: hidden;
}

.crumb-nav {
  margin: 0 0 0.85rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.crumb-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumb-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.crumb-nav__sep {
  color: var(--muted);
  font-weight: 400;
}

.crumb-nav a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: none;
}

.crumb-nav a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-hero .detail-title,
.detail-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.ref-row:target {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  background: #eef5fc;
}

.ref-row {
  scroll-margin-top: 5.5rem;
}

.ref-row:target td {
  background: transparent;
}

.detail-hero .eyebrow {
  display: block;
  margin-bottom: 0.55rem;
}

a.data-source-link {
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.data-source-link:hover {
  color: var(--brand);
}

tr.is-clickable {
  cursor: pointer;
}

tr.is-clickable:hover td {
  background: #eef5fc;
}

.stat-grid--5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1100px) {
  .stat-grid--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 920px) {
  .stat-grid--5 {
    grid-template-columns: 1fr;
  }
}

a.chart-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(13, 58, 140, 0.1);
}

.agency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.agency-card {
  display: block;
  padding: 1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.agency-card:hover {
  transform: translateY(-2px);
  background: #eef5fc;
  box-shadow: 0 22px 40px rgba(8, 40, 84, 0.14);
}

.agency-card__kat {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.agency-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.agency-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-grid > .panel:only-child {
  grid-column: 1 / -1;
  max-width: 40rem;
}

.detail-kpis:has(.kpi:only-child) {
  grid-template-columns: 1fr;
}

.detail-hero__grid {
  align-items: start;
}

.detail-kpis {
  align-self: start;
}

.detail-hero .kpi {
  padding: 0.7rem 0.85rem;
}

.detail-hero .kpi strong {
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.detail-block ul,
.steps {
  margin: 0;
  padding-left: 1.15rem;
}

.detail-block li {
  margin-bottom: 0.35rem;
}

.badge--tinggi { background: rgba(11, 107, 203, 0.14); color: var(--aktif); }
.badge--sedang { background: rgba(208, 137, 31, 0.16); color: var(--historis); }
.badge--rendah { background: rgba(122, 135, 144, 0.16); color: var(--kosong); }
.badge--tidak-aktif { background: rgba(185, 28, 28, 0.12); color: #b91c1c; }
.badge--aktif { background: rgba(11, 107, 203, 0.14); color: var(--aktif); }
.badge--historis { background: rgba(208, 137, 31, 0.16); color: var(--historis); }
.badge--kosong { background: rgba(122, 135, 144, 0.16); color: var(--kosong); }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.pill {
  background: #eaf2fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.pill-row--filters {
  flex-wrap: nowrap;
  gap: 0.55rem;
  margin: 0 0 1.15rem;
  padding: 0.15rem 0 0.35rem;
  overflow-x: visible;
}

.pill--filter {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-deep);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(13, 58, 140, 0.05);
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pill--filter:hover {
  background: #eef5fc;
  border-color: #c5d7ef;
  transform: translateY(-1px);
}

.pill--filter.is-active {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 58, 140, 0.18);
}

.pill--filter.is-active:hover {
  background: var(--brand-deep);
  color: #fff;
  transform: none;
}

.more {
  margin: 0.9rem 0 0;
}

.more a {
  color: var(--brand);
  font-weight: 700;
}

.status-explain {
  margin: 1.15rem 0 1.5rem;
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 14px;
  background: #eaf2fb;
  border: 1px solid var(--line);
}

.status-explain__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
}

.status-explain__label {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.status-explain__body {
  margin: 0;
  line-height: 1.6;
}

.status-explain__hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.status-explain-panel {
  margin: 0.85rem 0 1.35rem;
}

.status-explain-list {
  margin-top: 1rem;
  gap: 0.95rem;
}

.status-explain-item .status-explain__body {
  margin-top: 0.65rem;
}

.status-explain-item .status-explain__hint {
  margin-top: 0.5rem;
}

.section .section__head {
  margin-bottom: 0.35rem;
}

.section .section__head + .status-explain {
  margin-top: 1rem;
}

.section .section__head + .table-wrap {
  margin-top: 1.1rem;
}

.section .status-explain + .table-wrap {
  margin-top: 0.25rem;
}

.probe-panel {
  max-width: 46rem;
}

.probe-panel__hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.probe-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.probe-select,
.probe-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.probe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
  margin-bottom: 0.85rem;
}

.probe-input:disabled,
.probe-input--readonly {
  background: rgba(122, 135, 144, 0.08);
  color: var(--muted);
  cursor: not-allowed;
}

.probe-row .btn {
  flex: 0 0 auto;
  min-width: 7.5rem;
}

.probe-result {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(26, 79, 191, 0.04);
}

.probe-result__status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.probe-result__meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.probe-result__detail {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 920px) {
  .agency-grid,
  .detail-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    align-items: flex-start;
  }

  .status-explain {
    padding: 1rem 1.05rem 1.1rem;
  }

  .crumb-nav,
  .breadcrumb {
    display: none;
  }

  .report-actions,
  .hero__actions {
    gap: 0.5rem;
    margin-top: 1.55rem;
  }

  .report-actions .btn,
  .hero__actions .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    min-height: 2rem;
  }

  .pill-row--filters {
    gap: 0.4rem;
  }

  .pill--filter {
    padding: 0.48rem 0.45rem;
    font-size: 0.82rem;
  }
}
