:root {
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f2f4f7;
  --line: #e5e7eb;
  --line-strong: #d7dce3;
  --text: #111827;
  --muted: #5f6b7a;
  --primary: #0f766e;
  --primary-soft: #e8f5f3;
  --accent: #0f172a;
  --warning: #8a5800;
  --danger: #b42318;
  --success: #027a48;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.05), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 800;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong,
h1,
h2,
h3 {
  font-family: var(--font-heading);
}

.brand-copy small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
}

.hero-section {
  padding: 42px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: stretch;
}

.hero-content,
.carousel-card,
.section-shell,
.speech-card,
.form-card,
.admin-auth-card,
.dashboard-panel,
.stat-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.hero-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--accent);
  line-height: 1.08;
}

h1 {
  margin-top: 16px;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
}

h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.8rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.hero-lead {
  margin-top: 18px;
  max-width: 55ch;
  font-size: 1.04rem;
}

.hero-meta {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-card,
.info-panel,
.form-note-card {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.meta-card span,
.detail-item span,
.stat-card span,
.carousel-overlay span,
.footer-copy span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-card strong {
  font-size: 1rem;
  line-height: 1.5;
}

.hero-actions,
.form-actions,
.dashboard-actions,
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
}

.button-secondary {
  background: var(--primary-soft);
  color: var(--primary);
}

.button-ghost {
  background: #eef1f5;
  color: var(--accent);
}

.carousel-card {
  padding: 18px;
}

.carousel-frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 8px);
  background: #dbe5eb;
}

.carousel-track {
  position: relative;
  aspect-ratio: 16 / 11;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.66));
  color: #ffffff;
}

.carousel-overlay span,
.carousel-overlay strong {
  color: #ffffff;
}

.carousel-overlay strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.5;
}

.carousel-controls {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.carousel-button,
.carousel-dots button {
  pointer-events: auto;
}

.carousel-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent);
  font-size: 1.6rem;
  display: grid;
  place-items: center;
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.48);
}

.carousel-dots button.is-active {
  background: #ffffff;
}

.carousel-credit {
  margin-top: 12px;
  font-size: 0.85rem;
}

.carousel-credit a {
  color: var(--primary);
  font-weight: 600;
}

.content-section {
  padding: 34px 0;
}

.section-soft {
  background: rgba(15, 23, 42, 0.02);
}

.section-shell,
.speech-card {
  padding: 32px;
}

.section-heading {
  display: grid;
  gap: 14px;
}

.stats-strip,
.info-grid,
.profile-grid,
.service-grid,
.stats-grid,
.detail-grid,
.filter-grid,
.form-grid,
.toggle-grid {
  display: grid;
  gap: 16px;
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.stats-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.stat-plate {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8fbfb 0%, #eef7f6 100%);
  border: 1px solid #dcebe8;
}

.stat-plate span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-plate strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--accent);
  font-family: var(--font-heading);
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.info-panel-wide {
  grid-column: span 3;
}

.info-panel p + p {
  margin-top: 12px;
}

.speech-shell {
  display: grid;
}

.speech-card {
  max-width: 1040px;
}

.speech-card p + p {
  margin-top: 14px;
}

.speech-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.speech-photo {
  border-radius: calc(var(--radius-xl) - 8px);
  overflow: hidden;
  background: #f3f4f6;
  min-height: 100%;
}

.speech-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.speech-copy {
  display: flex;
  flex-direction: column;
}

.signature-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.signature-block strong {
  display: block;
  font-family: var(--font-heading);
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

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

.service-card span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.vision-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  margin-top: 24px;
}

.vision-card,
.mission-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
}

.vision-card {
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
}

.vision-label {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vision-card h3,
.mission-card h3 {
  margin-top: 14px;
}

.mission-list {
  margin: 14px 0 0 20px;
  color: var(--muted);
}

.mission-list li + li {
  margin-top: 10px;
}

.apbdes-shell {
  display: grid;
  gap: 18px;
}

.apbdes-summary-grid,
.apbdes-panel-grid,
.apbdes-detail-grid {
  display: grid;
  gap: 16px;
}

.apbdes-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.apbdes-panel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apbdes-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apbdes-summary-card,
.apbdes-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.apbdes-summary-card {
  padding: 18px;
}

.apbdes-summary-card span,
.apbdes-summary-card small {
  display: block;
  color: var(--muted);
}

.apbdes-summary-card span {
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.apbdes-summary-card strong {
  display: block;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.12rem;
  line-height: 1.35;
}

.apbdes-summary-card small {
  margin-top: 5px;
}

.apbdes-positive strong {
  color: var(--primary);
}

.apbdes-panel {
  padding: 18px;
}

.apbdes-panel h3 {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}

.budget-row + .budget-row {
  margin-top: 14px;
}

.budget-row-head {
  display: grid;
  gap: 4px;
  margin-bottom: 7px;
}

.budget-row-head span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.budget-row-head strong {
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1.35;
}

.budget-row-head em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

.budget-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.budget-track span {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.budget-track .budget-fill-blue {
  background: #185fa5;
}

.budget-track .budget-fill-warm {
  background: #ba7517;
}

.budget-track .budget-fill-empty {
  width: 2px;
  background: #cbd5e1;
}

.apbdes-donut {
  width: min(220px, 72vw);
  aspect-ratio: 1;
  margin: 6px auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    var(--primary) 0 41.3%,
    #185fa5 41.3% 76.5%,
    #ba7517 76.5% 92.1%,
    #a32d2d 92.1% 100%
  );
  position: relative;
}

.apbdes-donut::after {
  content: "";
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
}

.apbdes-donut span {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
}

.apbdes-donut small {
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
}

.apbdes-legend {
  display: grid;
  gap: 8px;
}

.apbdes-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.apbdes-legend i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: 0 0 11px;
}

.legend-green {
  background: var(--primary);
}

.legend-blue {
  background: #185fa5;
}

.legend-warm {
  background: #ba7517;
}

.legend-red {
  background: #a32d2d;
}

.apbdes-financing {
  margin: 0;
}

.apbdes-financing div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.apbdes-financing div:last-child {
  border-bottom: 0;
}

.apbdes-financing dt {
  color: var(--muted);
}

.apbdes-financing dd {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
  text-align: right;
}

.apbdes-financing .apbdes-negative {
  color: var(--danger);
}

.form-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 24px;
  align-items: start;
}

.form-intro {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.form-card {
  padding: 28px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-grid {
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--accent);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(15, 118, 110, 0.48);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.upload-box {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px dashed rgba(15, 118, 110, 0.36);
  border-radius: var(--radius-lg);
  background: #fbfdfd;
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.file-preview,
.form-message,
.notice,
.mini-status {
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
}

.file-preview {
  background: var(--primary-soft);
  color: var(--primary);
}

.captcha-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid #dbe6e5;
  background: #f8fbfb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.field-caption {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.form-description {
  margin-top: 18px;
  font-size: 0.95rem;
}

.form-message[data-type="success"] {
  background: #ecfdf3;
  color: var(--success);
}

.form-message[data-type="error"] {
  background: #fef3f2;
  color: var(--danger);
}

.notice-warning {
  background: #fff7e8;
  color: var(--warning);
}

.site-footer {
  padding: 20px 0 44px;
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 1px solid var(--line);
}

.footer-shell strong {
  display: block;
  font-family: var(--font-heading);
}

.footer-copy {
  text-align: right;
}

.admin-body {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.06), transparent 22rem),
    linear-gradient(180deg, #f7f8fa 0%, #f2f4f7 100%);
}

.admin-shell {
  min-height: 100vh;
  padding: 30px 0 44px;
}

.admin-auth {
  width: var(--container);
  margin: 0 auto;
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
}

.admin-auth-card {
  width: min(540px, 100%);
  padding: 34px;
}

.admin-auth-card p {
  margin-top: 14px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.dashboard {
  display: grid;
  gap: 22px;
}

.dashboard-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.9rem;
  font-family: var(--font-heading);
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
  align-items: start;
}

.dashboard-panel {
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-wrap {
  margin-top: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.data-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #ffffff;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #edf0f4;
  vertical-align: top;
}

.data-table th {
  background: #f7faf9;
  color: var(--accent);
  font-size: 0.92rem;
}

.table-empty {
  text-align: center;
  padding: 30px 16px !important;
  color: var(--muted);
}

.row-button {
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.pagination {
  justify-content: space-between;
  margin-top: 16px;
}

.detail-panel {
  position: sticky;
  top: 24px;
}

.detail-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  padding: 20px;
}

.detail-content {
  display: grid;
  gap: 18px;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.detail-wide {
  grid-column: span 2;
}

.ktp-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.ktp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ktp-preview-wrap {
  margin-top: 14px;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  background: #ffffff;
}

.ktp-preview {
  width: 100%;
  object-fit: contain;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.status-pill.good {
  background: #ecfdf3;
  color: var(--success);
}

.status-pill.muted {
  background: #fff7e8;
  color: var(--warning);
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: #eef2f6;
}

/* Refined visual layer: cleaner village portal, less generic card styling. */
:root {
  --bg: #f6f5ef;
  --surface-soft: #f3f1e8;
  --line: #e4dfd2;
  --line-strong: #d4ccbc;
  --text: #1b2421;
  --muted: #66736e;
  --primary: #235c4b;
  --primary-soft: #e9f1ec;
  --accent: #18231f;
  --shadow: 0 16px 38px rgba(34, 44, 39, 0.06);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --container: min(1140px, calc(100vw - 36px));
}

body {
  background:
    linear-gradient(rgba(35, 92, 75, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 92, 75, 0.04) 1px, transparent 1px),
    #fbfaf6;
  background-size: 42px 42px;
}

.site-header {
  background: rgba(251, 250, 246, 0.94);
  border-bottom-color: rgba(35, 92, 75, 0.14);
}

.topbar {
  padding: 14px 0;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #f8f4dc;
}

.brand-copy strong {
  letter-spacing: -0.02em;
}

.brand-copy small {
  font-size: 0.82rem;
}

.site-nav {
  gap: 8px;
}

.site-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.93rem;
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--accent);
  color: #ffffff !important;
}

.hero-section {
  padding: 64px 0 24px;
  scroll-margin-top: 90px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 18px;
}

.hero-content,
.office-map-card,
.section-shell,
.speech-card,
.form-card,
.admin-auth-card,
.dashboard-panel,
.stat-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(35, 92, 75, 0.14);
  box-shadow: var(--shadow);
}

.hero-content {
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}

.hero-content::after {
  content: "";
  position: absolute;
  right: -88px;
  bottom: -88px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 38px solid rgba(35, 92, 75, 0.07);
}

.eyebrow {
  padding: 7px 11px;
  border-radius: 8px;
  background: #f3efe3;
  color: var(--primary);
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(2.35rem, 4.8vw, 4.9rem);
  line-height: 1;
}

h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.45rem);
}

p {
  line-height: 1.62;
}

.hero-lead {
  max-width: 46ch;
  color: #43514d;
  font-size: 1.08rem;
}

.hero-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meta-card,
.info-panel,
.form-note-card,
.service-card,
.vision-card,
.mission-card,
.apbdes-summary-card,
.apbdes-panel,
.detail-item,
.ktp-panel {
  background: #fffdf8;
  border-color: rgba(35, 92, 75, 0.13);
}

.meta-card {
  padding: 14px;
  border-radius: 14px;
}

.meta-card strong {
  font-size: 0.94rem;
}

.button {
  border-radius: 12px;
}

.button-primary {
  background: var(--accent);
}

.button-secondary {
  background: #efe9d9;
  color: var(--accent);
}

.button-ghost {
  background: #f1efe6;
}

.office-map-card {
  padding: 16px;
  border-radius: var(--radius-xl);
  display: grid;
  gap: 14px;
}

.map-header {
  display: grid;
  gap: 10px;
  padding: 6px 6px 0;
}

.map-header h2 {
  max-width: 12ch;
}

.map-frame {
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(35, 92, 75, 0.18);
  border-radius: 18px;
  background: #ece7d9;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  display: block;
}

.map-link {
  display: inline-flex;
  width: fit-content;
  margin-left: 6px;
  color: var(--primary);
  font-weight: 800;
}

.content-section {
  padding: 26px 0;
  scroll-margin-top: 92px;
}

.section-soft {
  background: transparent;
}

.section-shell,
.speech-card {
  padding: clamp(22px, 3vw, 34px);
}

.section-heading {
  max-width: 780px;
}

.stats-strip {
  gap: 10px;
}

.stat-plate {
  background: #f7f3e8;
  border-color: rgba(35, 92, 75, 0.12);
  border-radius: 14px;
}

.stat-plate strong {
  color: var(--primary);
  font-size: 1.42rem;
}

.profile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.info-panel {
  padding: 18px;
}

.info-panel-wide {
  grid-column: span 2;
}

.speech-card {
  max-width: none;
}

.speech-layout {
  grid-template-columns: 260px minmax(0, 1fr);
}

.speech-copy p {
  max-width: 70ch;
}

.speech-photo {
  border-radius: 16px;
}

.vision-shell {
  grid-template-columns: 0.82fr 1.18fr;
  gap: 12px;
}

.vision-card,
.mission-card,
.service-card {
  border-radius: 16px;
}

.vision-card {
  background: #fffdf8;
}

.mission-list {
  columns: 2;
  column-gap: 28px;
}

.mission-list li {
  break-inside: avoid;
}

.apbdes-shell {
  gap: 14px;
}

.apbdes-summary-grid,
.apbdes-panel-grid,
.apbdes-detail-grid {
  gap: 12px;
}

.apbdes-summary-card,
.apbdes-panel {
  border-radius: 16px;
}

.apbdes-summary-card strong {
  font-size: 1.02rem;
}

.budget-track {
  height: 8px;
  background: #ece7db;
}

.form-layout {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.field input,
.field select {
  border-radius: 10px;
  background: #fffefb;
}

.upload-box,
.captcha-box {
  background: #f7f3e8;
  border-color: rgba(35, 92, 75, 0.16);
  border-radius: 14px;
}

.site-footer {
  padding: 28px 0 48px;
}

.footer-apbdes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 20px;
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(35, 92, 75, 0.16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at right, rgba(35, 92, 75, 0.11), transparent 22rem),
    #fffdf8;
  box-shadow: var(--shadow);
}

.footer-apbdes p {
  margin-top: 10px;
}

.footer-budget {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.footer-budget article,
.footer-budget .button {
  padding: 16px;
  border-radius: 14px;
}

.footer-budget article {
  background: #f4f0e5;
  border: 1px solid rgba(35, 92, 75, 0.12);
}

.footer-budget span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-budget strong {
  display: block;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1rem;
}

.footer-budget .button {
  grid-column: span 2;
  text-align: center;
}

.admin-body {
  background: #f7f5ef;
}

.admin-shell {
  overflow-x: hidden;
}

.dashboard-topbar,
.dashboard-panel,
.stat-card,
.admin-auth-card,
.detail-item,
.ktp-panel {
  min-width: 0;
}

.dashboard-content {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.dashboard-panel {
  overflow: hidden;
}

.data-table {
  table-layout: fixed;
}

.data-table th,
.data-table td,
.detail-item strong,
.detail-item span,
.panel-header,
.stat-card small,
.stat-card strong,
.admin-auth-card h1,
.admin-auth-card p,
.form-message,
.notice,
.mini-status {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table th,
.data-table td {
  padding: 12px 13px;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
  width: 170px;
}

.data-table th:nth-child(8),
.data-table td:nth-child(8) {
  width: 150px;
}

.data-table th:nth-child(9),
.data-table td:nth-child(9) {
  width: 86px;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ktp-preview-wrap {
  max-width: 100%;
}

/* Homepage portal layout inspired by government information portals. */
.home-portal {
  padding: 38px 0 30px;
  background:
    linear-gradient(180deg, rgba(35, 92, 75, 0.08), rgba(35, 92, 75, 0)),
    transparent;
}

.portal-shell {
  display: grid;
  gap: 16px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 390px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(35, 92, 75, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(115deg, rgba(24, 35, 31, 0.96) 0%, rgba(24, 35, 31, 0.88) 46%, rgba(35, 92, 75, 0.18) 46.2%, rgba(35, 92, 75, 0.08) 100%),
    #18231f;
}

.hero-photo-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-photo-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms ease, transform 5800ms ease;
}

.hero-photo-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.portal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(24, 35, 31, 0.94) 0%, rgba(24, 35, 31, 0.78) 48%, rgba(24, 35, 31, 0.26) 100%),
    linear-gradient(0deg, rgba(24, 35, 31, 0.42), rgba(24, 35, 31, 0.08));
}

.portal-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding: clamp(30px, 6vw, 68px);
  position: relative;
  z-index: 2;
}

.portal-copy .eyebrow {
  background: rgba(248, 244, 220, 0.12);
  color: #f5edd3;
}

.portal-copy h1 {
  max-width: 11.5ch;
  margin-top: 18px;
  color: #ffffff;
  font-size: clamp(2.45rem, 5.4vw, 5.15rem);
  line-height: 0.96;
  letter-spacing: -0.058em;
}

.portal-copy p {
  max-width: 56ch;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.portal-photo-credit {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.78rem;
}

.portal-photo-credit a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portal-service-box {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 28px;
  background: rgba(255, 253, 248, 0.94);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  z-index: 2;
}

.portal-service-box span {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.portal-service-box a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(35, 92, 75, 0.16);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.portal-service-box a strong,
.portal-service-box a small {
  display: block;
}

.portal-service-box a small {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
}

.portal-service-box a::after {
  content: "Buka";
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e7eee9;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.portal-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(35, 92, 75, 0.14);
  border-radius: 16px;
  background: #fffdf8;
}

.portal-info-card {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid rgba(35, 92, 75, 0.12);
}

.portal-info-card:last-child {
  border-right: 0;
}

.portal-info-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.portal-info-card strong {
  display: block;
  color: var(--accent);
  font-size: 0.98rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.portal-map-panel {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(35, 92, 75, 0.14);
  border-radius: 16px;
  background: #fffdf8;
}

.portal-map-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 34px);
  border-right: 1px solid rgba(35, 92, 75, 0.12);
}

.portal-map-copy h2 {
  max-width: 12ch;
  margin-top: 14px;
}

.portal-map-copy p {
  margin-top: 14px;
}

.portal-map-panel .map-frame {
  min-height: 320px;
  border: 0;
  border-radius: 0;
}

.portal-map-panel .map-frame iframe {
  min-height: 320px;
}

.home-portal .map-link {
  margin: 18px 0 0;
}

#profil .section-shell {
  padding: 24px;
}

#profil .section-heading {
  grid-template-columns: 0.72fr 1fr;
  align-items: end;
  max-width: none;
}

#profil .section-heading .eyebrow {
  grid-column: 1 / -1;
}

#profil .section-heading p {
  max-width: 56ch;
  justify-self: end;
  font-size: 0.98rem;
}

#profil .stats-strip {
  margin-top: 18px;
}

#profil .stat-plate {
  padding: 14px 16px;
}

#profil .stat-plate strong {
  font-size: 1.22rem;
}

#profil .profile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

#profil .info-panel {
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 9px;
}

#profil .info-panel h3 {
  font-size: 1rem;
  line-height: 1.25;
}

#profil .info-panel p {
  font-size: 0.94rem;
  line-height: 1.55;
}

#sambutan .speech-card {
  position: relative;
  overflow: hidden;
}

#sambutan .speech-card::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 28px;
  width: 78px;
  height: 78px;
  border-top: 2px solid rgba(35, 92, 75, 0.18);
  border-right: 2px solid rgba(35, 92, 75, 0.18);
  border-radius: 0 18px 0 0;
}

.speech-greeting,
.speech-closing {
  color: var(--primary);
  font-weight: 800;
}

.speech-copy blockquote {
  margin: 16px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 14px 14px 0;
  background: #f7f3e8;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  font-weight: 700;
  line-height: 1.5;
}

.mission-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mission-pillars div {
  padding: 18px;
  border: 1px solid rgba(35, 92, 75, 0.13);
  border-radius: 14px;
  background: #fffdf8;
}

.mission-pillars strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--font-heading);
}

.mission-pillars p,
.vision-card p {
  font-size: 0.95rem;
  line-height: 1.55;
}

.vision-card p {
  margin-top: 14px;
}

.vision-card,
.mission-card {
  min-height: 250px;
}

.footer-actions {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 20px;
  align-items: stretch;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(35, 92, 75, 0.16);
  border-radius: var(--radius-xl);
  background: #18231f;
  box-shadow: var(--shadow);
}

.footer-actions h2,
.footer-actions p {
  color: #ffffff;
}

.footer-actions p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
}

.footer-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.footer-action-grid a {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transition: background 160ms ease, transform 160ms ease;
}

.footer-action-grid a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.11);
}

.footer-action-grid span {
  color: #d7cfb6;
  font-weight: 900;
}

.footer-action-grid strong {
  font-family: var(--font-heading);
  font-size: 1.02rem;
}

.footer-action-grid small {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .hero-grid,
  .speech-layout,
  .vision-shell,
  .apbdes-panel-grid,
  .form-layout,
  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .form-intro,
  .detail-panel {
    position: static;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-list {
    columns: 1;
  }

  .footer-apbdes {
    grid-template-columns: 1fr;
  }

  .portal-hero,
  .portal-map-panel {
    grid-template-columns: 1fr;
  }

  .portal-service-box {
    border-left: 0;
    border-top: 1px solid rgba(35, 92, 75, 0.12);
  }

  .portal-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-info-card:nth-child(2) {
    border-right: 0;
  }

  .portal-info-card:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(35, 92, 75, 0.12);
  }

  .portal-map-copy {
    border-right: 0;
    border-bottom: 1px solid rgba(35, 92, 75, 0.12);
  }

  #profil .section-heading,
  .footer-actions {
    grid-template-columns: 1fr;
  }

  #profil .section-heading p {
    justify-self: start;
  }

  .mission-pillars,
  .footer-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .topbar,
  .dashboard-topbar,
  .footer-shell,
  .captcha-box,
  .ktp-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav,
  .hero-meta,
  .stats-strip,
  .apbdes-summary-grid,
  .apbdes-detail-grid,
  .info-grid,
  .profile-grid,
  .service-grid,
  .stats-grid,
  .filter-grid,
  .form-grid,
  .toggle-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .office-map-card {
    min-width: 0;
  }

  .map-header h2 {
    max-width: none;
  }

  .map-frame,
  .map-frame iframe {
    min-height: 300px;
  }

  .footer-budget {
    grid-template-columns: 1fr;
  }

  .footer-budget .button {
    grid-column: auto;
  }

  .home-portal {
    padding-top: 24px;
  }

  .portal-hero {
    min-height: 0;
    background: #18231f;
  }

  .portal-copy {
    padding: 28px 22px;
  }

  .portal-copy h1 {
    max-width: none;
    font-size: clamp(2.3rem, 13vw, 3.7rem);
  }

  .portal-service-box {
    padding: 22px;
  }

  .portal-info-grid {
    grid-template-columns: 1fr;
  }

  .portal-info-card,
  .portal-info-card:nth-child(2),
  .portal-info-card:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(35, 92, 75, 0.12);
  }

  .portal-info-card:last-child {
    border-bottom: 0;
  }

  .portal-map-copy h2 {
    max-width: none;
  }

  .detail-wide {
    grid-column: span 1;
  }

  .info-panel-wide {
    grid-column: span 1;
  }

  .hero-content,
  .section-shell,
  .speech-card,
  .form-card,
  .dashboard-panel,
  .admin-auth-card,
  .stat-card {
    padding: 22px;
  }

  .footer-copy {
    text-align: left;
  }
}
