/* =====================================================================
   Papua Barat portal design system (v2, 2026-11-23)
   Loaded after portal.css on every public page. Tokens, local type,
   buttons, header/navigation and footer. See docs/07-ui-ux-design-system.md.
   ===================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Anchor and accent palette (contrast ratios in the design-system doc). */
  --c-navy-900: #0b1f3a;
  --c-navy-800: #12305a;
  --c-cobalt-600: #1d4ed8;
  --c-cobalt-800: #1e3a8a;
  --c-ochre-400: #f2b632;
  --c-ochre-300: #f7c95a;
  --c-amber-800: #92400e;
  --c-teal-800: #115e59;
  --c-teal-300: #5fd4c4;
  --c-terra-800: #9a3412;
  --c-terra-500: #e2622b;
  --c-sky-50: #eef5ff;
  --c-sand-50: #fff7e6;
  --c-gray-50: #f4f6fa;
  --c-ink: #0f172a;
  --c-muted: #475569;
  --c-line: #d9e0ea;
  --c-line-strong: #94a3b8;

  /* Legacy aliases used across portal.css and directory pages. */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: var(--c-gray-50);
  --text: var(--c-ink);
  --muted: var(--c-muted);
  --border: var(--c-line);
  --primary: var(--c-cobalt-600);
  --primary-hover: var(--c-cobalt-800);
  --accent: #0c694e;
  --accent-gold: var(--c-ochre-400);

  /* Type: one family, one modular scale (≈1.25), fluid only at heading sizes. */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-display: clamp(2.25rem, 1.7rem + 2.2vw, 3.5rem);
  --fs-h1: clamp(2rem, 1.65rem + 1.5vw, 2.75rem);
  --fs-h2: clamp(1.5rem, 1.32rem + .8vw, 2rem);
  --fs-h3: 1.25rem;
  --fs-card: 1.125rem;
  --fs-lead: 1.125rem;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-label: .8125rem;
  --lh-tight: 1.15;
  --lh-heading: 1.3;
  --lh-body: 1.65;

  /* Spacing, shape and motion. */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem;
  --radius: 6px;
  --radius-lg: 10px;
  --tap: 48px;
  --shadow-card: 0 1px 2px #0b1f3a14, 0 8px 24px #0b1f3a12;
  --ease: .18s ease;

  /* Ornament assets. */
  --motif-noken: url("/assets/patterns/noken-mesh.svg");
  --motif-tifa: url("/assets/patterns/tifa-band.svg");
  --motif-rule: url("/assets/patterns/tifa-rule.svg");
}

html { font-size: 16px; line-height: var(--lh-body); }
body { font-family: var(--font-sans); font-size: var(--fs-body); color: var(--c-ink); background: #fff; font-feature-settings: "calt", "kern"; }

/* ---------- Type scale (public pages) ---------- */
h1, h2, h3, h4 { font-family: var(--font-sans); color: var(--c-navy-900); font-weight: 750; overflow-wrap: break-word; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -.025em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); letter-spacing: -.01em; }
h4 { font-size: var(--fs-card); line-height: var(--lh-heading); }
p, li, dd { font-size: var(--fs-body); }
.eyebrow, .hero-kicker { font-size: var(--fs-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-intro, .publications-intro { font-size: var(--fs-lead); }
.prose { font-size: 1.0625rem; }
.prose h2 { font-size: var(--fs-h2); }
.prose h3 { font-size: var(--fs-h3); }

/* Normalise earlier one-off heading sizes to the shared scale. */
.directory-hero h1, .contact-intro h1, .district-detail-heading h1, .article-title { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -.025em; }
.directory-results h2, .district-context h2, .contact-address h2, .regional-section h2 { font-size: var(--fs-h2); }
.archive-item h2, .publication-directory h2, .district-directory-item h2, .contact-channel h3, .service-directory-item h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); }
.district-facts h2 { font-size: var(--fs-card); }
.directory-hero p { font-size: var(--fs-lead); }

/* Section heading rule: short tifa ornament above every public h2 in section heads. */
.section-head h2::before, .ds-rule::before {
  content: ""; display: block; width: 48px; height: 8px; margin-bottom: var(--space-3);
  background: var(--motif-rule) no-repeat left center / 48px 8px;
}

/* ---------- Links & focus ---------- */
a { color: var(--c-cobalt-600); text-underline-offset: 3px; }
a:hover { color: var(--c-cobalt-800); }
:focus-visible { outline: 3px solid var(--c-cobalt-600); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; border-radius: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible, .gov-bar :focus-visible { outline-color: var(--c-ochre-400); box-shadow: 0 0 0 2px var(--c-navy-900); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap); padding: .75rem 1.25rem; border-radius: var(--radius);
  font: 650 var(--fs-body)/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.btn svg { flex: none; }
.btn-primary { background: var(--c-cobalt-600); color: #fff; border-color: var(--c-cobalt-600); }
.btn-primary:hover { background: var(--c-cobalt-800); border-color: var(--c-cobalt-800); color: #fff; }
.btn-secondary, .btn-outline { background: #fff; color: var(--c-cobalt-600); border-color: var(--c-cobalt-600); }
.btn-secondary:hover, .btn-outline:hover { background: var(--c-sky-50); color: var(--c-cobalt-800); border-color: var(--c-cobalt-800); }
.btn-accent { background: var(--c-ochre-400); color: var(--c-navy-900); border-color: var(--c-ochre-400); }
.btn-accent:hover { background: var(--c-ochre-300); border-color: var(--c-ochre-300); color: var(--c-navy-900); }
.btn-light { background: transparent; color: #fff; border-color: #ffffffb3; }
.btn-light:hover { background: #ffffff1a; color: #fff; border-color: #fff; }
.btn:active { transform: translateY(1px); }

/* ---------- Government bar ---------- */
.gov-bar { background: var(--c-navy-900); color: #d6e2f2; font-size: var(--fs-small); padding: .4rem 0; }
.gov-bar a { color: #fff; }
@media (min-width: 640px) { .gov-bar-inner > span:first-child { display: inline-flex; align-items: center; gap: var(--space-2); } }
.gov-bar-inner > span:first-child::before { content: ""; width: 24px; height: 8px; background: var(--motif-tifa) repeat-x left center / 24px 8px; }

/* ---------- Header & primary navigation ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: 0 1px 0 #0b1f3a0a; }
.header-inner { min-height: 76px; gap: var(--space-4); }
.brand img { width: 44px; height: 44px; }
.brand-title { font-size: 1.0625rem; font-weight: 750; color: var(--c-navy-900); letter-spacing: -.01em; }
.brand-sub { font-size: var(--fs-label); color: var(--c-muted); }

.main-nav a, .explore-menu summary {
  position: relative; display: inline-flex; align-items: center; min-height: var(--tap);
  padding: .5rem .8rem; font-size: .9375rem; font-weight: 600; color: var(--c-ink); border-radius: var(--radius); text-decoration: none;
}
.explore-menu summary { list-style: none; gap: .4rem; }
.explore-menu summary::-webkit-details-marker { display: none; }
.explore-menu summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform var(--ease); }
.explore-menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.main-nav a:hover, .explore-menu summary:hover { background: var(--c-sky-50); color: var(--c-cobalt-800); }
/* Active page: colour change plus a 3px bar (non-colour cue). */
.main-nav > a[aria-current="page"], .explore-menu.has-current > summary { color: var(--c-cobalt-600); background: transparent; text-decoration: none; }
.main-nav > a[aria-current="page"]::after, .explore-menu.has-current > summary::before {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 2px; height: 3px; background: var(--c-cobalt-600); border-radius: 2px;
}
.explore-menu[open] > summary { background: var(--c-sky-50); color: var(--c-cobalt-800); }
.explore-panel { border-top: 4px solid var(--c-ochre-400); border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: 0 16px 32px #0b1f3a24; }
.main-nav .explore-panel a { display: flex; width: 100%; font-weight: 500; }
.main-nav .explore-panel a[aria-current="page"] { background: var(--c-sky-50); color: var(--c-cobalt-800); font-weight: 650; box-shadow: inset 3px 0 0 var(--c-cobalt-600); }
.nav-group-title { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }

/* Search entry in header: always visible, labelled on wide screens. */
.header-search {
  order: 2; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; flex: none;
  min-height: var(--tap); min-width: var(--tap); padding: 0 1rem; border: 2px solid var(--c-cobalt-600); border-radius: var(--radius);
  color: var(--c-cobalt-600); font-weight: 650; font-size: .9375rem; text-decoration: none; background: #fff;
}
.header-search:hover { background: var(--c-cobalt-600); color: #fff; }
.header-search[aria-current="page"] { background: var(--c-cobalt-600); color: #fff; }
.brand { order: 0; }
.main-nav { order: 1; }
.nav-toggle { order: 3; min-height: var(--tap); min-width: var(--tap); border-color: var(--c-line-strong); }
@media (min-width: 960px) { .main-nav { margin-left: auto; } }
@media (min-width: 960px) and (max-width: 1200px) { .header-search .label { display: none; } .header-search { padding: 0; } .main-nav a, .explore-menu summary { padding: .5rem .5rem; } .main-nav > a[aria-current="page"]::after, .explore-menu.has-current > summary::before { left: .5rem; right: .5rem; } }
@media (max-width: 959px) {
  .header-search { margin-left: auto; }
  .header-search .label { display: none; }
  .header-search { padding: 0; }
  .main-nav.is-open { box-shadow: 0 16px 24px #0b1f3a1f; border-top: 1px solid var(--c-line); }
  .main-nav.is-open > a, .main-nav.is-open .explore-menu summary { width: 100%; }
  .main-nav > a[aria-current="page"]::after, .explore-menu.has-current > summary::before { left: 0; right: auto; top: .6rem; bottom: .6rem; width: 3px; height: auto; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: var(--fs-small); }
.breadcrumbs a { color: var(--c-cobalt-600); text-decoration: underline; text-decoration-color: #1d4ed855; }
.breadcrumbs [aria-current="page"] { color: var(--c-ink); font-weight: 600; }

/* ---------- Form fields ---------- */
.form-control, .search-form input[type="search"], .search-form input[type="text"] { min-height: var(--tap); border: 1px solid var(--c-line-strong); border-radius: var(--radius); font-size: var(--fs-body); }
.form-control:focus-visible, .search-form input:focus-visible { outline: 3px solid var(--c-cobalt-600); outline-offset: 0; box-shadow: none; }

/* ---------- Inner-page hero accent (directories) ---------- */
.directory-hero { border-bottom: 0; }
.directory-hero::before { content: ""; position: absolute; inset: auto 0 0; height: 16px; background: var(--motif-tifa) repeat-x left center / 48px 16px; }
.directory-hero::after { background: var(--motif-noken) repeat 0 0 / 48px 48px; opacity: .22; }
.directory-hero h1 { color: var(--c-navy-900); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--c-navy-900); color: #c8d6ea; padding: 4.5rem 0 1.5rem; margin-top: 0; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 16px; background: var(--motif-tifa) repeat-x left center / 48px 16px; }
.site-footer h3, .site-footer h4 { color: #fff; margin-top: 0; }
.site-footer h3 { font-size: var(--fs-h3); }
.site-footer h4 { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .08em; color: var(--c-ochre-400); }
.site-footer a { color: #fff; }
.footer-links a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-bottom { border-color: #ffffff2e; color: #c8d6ea; }

/* ---------- Utility ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) { .btn, .explore-menu summary::after { transition: none; } .btn:active { transform: none; } }

/* ---------- Article & page detail: reading column + related sidebar ---------- */
.article-page { padding-top: var(--space-5); }
.article-layout { display: grid; gap: var(--space-7); align-items: start; }
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 820px) 340px; justify-content: space-between; gap: var(--space-8); }
  .article-aside { position: sticky; top: 100px; }
}
.article-main { min-width: 0; }
.article-header { margin-bottom: var(--space-5); }
.article-kicker { color: var(--c-amber-800); margin-bottom: var(--space-2); }
.article-meta { margin-bottom: var(--space-3); }
.article-meta > span:first-child { color: var(--c-cobalt-600); font-weight: 700; }
.article-title, .article-page h1 { font-size: clamp(1.75rem, 1.45rem + 1.1vw, 2.375rem); line-height: 1.2; letter-spacing: -.02em; max-width: none; margin: 0; }
.article-image { width: 100%; max-width: none; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 0 var(--space-6); border-radius: var(--radius-lg); }
.article-page .prose { max-width: none; font-size: 1.0625rem; line-height: 1.75; }
.article-page .prose > :first-child { margin-top: 0; }
.article-page .prose h2 { font-size: 1.5rem; line-height: 1.3; margin: var(--space-7) 0 var(--space-3); letter-spacing: -.015em; }
.article-page .prose h3 { font-size: 1.1875rem; line-height: 1.35; margin: var(--space-6) 0 var(--space-2); }
.article-page .prose h4 { font-size: 1.0625rem; margin: var(--space-5) 0 var(--space-2); }
.article-page .prose table { display: table; width: auto; min-width: 60%; }
.article-page .prose th, .article-page .prose td { padding: .6rem .9rem; border-color: var(--c-line); }
.article-page .prose img { border-radius: var(--radius); }
/* Editor image presets (CMS WYSIWYG, classes img-size-* / img-align-*). Free sizes are not
   supported: inline style is blocked by CSP. On narrow screens floats are dropped. */
.prose { display: flow-root; }
.prose img.img-size-sm { width: 33%; }
.prose img.img-size-md { width: 50%; }
.prose img.img-size-lg { width: 75%; }
.prose img.img-align-center { display: block; margin-inline: auto; }
.prose img.img-align-left { float: left; margin: .35rem var(--space-5) var(--space-3) 0; }
.prose img.img-align-right { float: right; margin: .35rem 0 var(--space-3) var(--space-5); }
.prose h2, .prose h3, .prose h4 { clear: both; }
@media (max-width: 640px) {
  .prose img.img-align-left, .prose img.img-align-right { float: none; display: block; margin: 0 auto var(--space-3); }
  .prose img.img-size-sm { width: 60%; }
  .prose img.img-size-md, .prose img.img-size-lg { width: 100%; }
}

.article-aside { display: grid; gap: var(--space-5); min-width: 0; }
.aside-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: calc(12px + var(--space-5)) var(--space-5) var(--space-5); }
.aside-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 12px; background: var(--motif-tifa) repeat-x left center / 36px 12px; }
.aside-card h2 { font-size: var(--fs-card); margin: 0 0 var(--space-3); }
.aside-card.related-content { margin-top: 0; padding-top: calc(12px + var(--space-5)); border-top: 1px solid var(--c-line); }
.aside-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.aside-list li { display: grid; gap: .15rem; padding: var(--space-3) 0; border-top: 1px solid var(--c-line); }
.aside-list a { display: block; color: var(--c-navy-900); font-weight: 600; font-size: .9375rem; line-height: 1.45; text-decoration: none; }
.aside-list a:hover { color: var(--c-cobalt-600); text-decoration: underline; }
.aside-list time { font-size: var(--fs-label); color: var(--c-muted); }
.aside-nav li { padding: 0; }
.aside-nav a { padding: .65rem .75rem; min-height: 44px; display: flex; align-items: center; border-radius: var(--radius); }
.aside-nav a[aria-current="page"] { background: var(--c-sky-50); color: var(--c-cobalt-800); box-shadow: inset 3px 0 0 var(--c-cobalt-600); }
.aside-card .btn { width: 100%; }
.aside-card-dark { background: var(--c-navy-900); border-color: var(--c-navy-900); color: #e8eef7; isolation: isolate; }
.aside-card-dark::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--motif-noken) repeat 0 0 / 48px 48px; opacity: .12; }
.aside-card-dark h2 { color: #fff; }
.aside-search { display: flex; gap: 6px; padding: 5px; background: #fff; border-radius: var(--radius); }
.aside-search input { flex: 1; min-width: 0; min-height: 44px; border: 0; padding: 0 .6rem; font: inherit; color: var(--c-ink); background: transparent; }
.aside-search .btn { width: auto; min-height: 44px; padding-inline: 1rem; }
.aside-quick { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.aside-quick li { border-top: 1px solid #ffffff2e; }
.aside-quick a { display: flex; align-items: center; min-height: 44px; color: #fff; font-weight: 600; text-decoration: none; }
.aside-quick a::after { content: "→"; margin-left: auto; color: var(--c-ochre-400); }
.aside-quick a:hover { text-decoration: underline; }

/* ---------- Contact page ---------- */
.contact-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--c-navy-900); padding: clamp(2.5rem, 5vw, 4rem) 0 calc(clamp(2.5rem, 5vw, 4rem) + 16px); }
.contact-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--motif-noken) repeat 0 0 / 48px 48px; opacity: .14; -webkit-mask-image: linear-gradient(90deg, transparent 10%, #000 70%); mask-image: linear-gradient(90deg, transparent 10%, #000 70%); }
.contact-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 16px; background: var(--motif-tifa) repeat-x left center / 48px 16px; }
.contact-hero-grid { display: grid; gap: var(--space-6); align-items: center; }
.contact-hero .hero-kicker { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--c-ochre-400); margin-bottom: var(--space-3); }
.contact-hero .hero-kicker::before { content: ""; width: 32px; height: 10px; background: var(--motif-tifa) repeat-x left center / 30px 10px; }
.contact-hero h1 { color: #fff; margin: 0 0 var(--space-3); }
.contact-hero p { color: #d6e2f2; font-size: var(--fs-lead); max-width: 46ch; margin: 0 0 var(--space-5); }
.contact-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.contact-card { position: relative; overflow: hidden; background: #fff; color: var(--c-ink); border-radius: var(--radius-lg); padding: calc(12px + var(--space-5)) var(--space-5) var(--space-5); box-shadow: 0 24px 48px #00000040; }
.contact-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 12px; background: var(--motif-tifa) repeat-x left center / 36px 12px; }
.contact-card .eyebrow { color: var(--c-amber-800); margin-bottom: var(--space-2); }
.contact-card h2 { font-size: var(--fs-h3); margin: 0 0 var(--space-3); }
.contact-facts { margin: 0; }
.contact-facts > div { padding: var(--space-3) 0; border-top: 1px solid var(--c-line); }
.contact-facts dt { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-small); font-weight: 650; color: var(--c-muted); margin-bottom: .25rem; }
.contact-facts dt svg { color: var(--c-cobalt-600); }
.contact-facts dd { margin: 0 0 0 calc(22px + var(--space-2)); font-weight: 600; overflow-wrap: anywhere; }
.contact-facts address { font-style: normal; }
.contact-facts a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) { .contact-hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-8); } }

.contact-channels-section { background: var(--c-gray-50); }
.channel-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.channel-card { --tone: var(--c-cobalt-600); position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); background: #fff; border: 1px solid var(--c-line); border-top: 6px solid var(--tone); border-radius: var(--radius-lg); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.channel-card.tone-navy { --tone: var(--c-navy-900); }
.channel-card.tone-terra { --tone: var(--c-terra-800); }
.channel-card.tone-teal { --tone: var(--c-teal-800); }
.channel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--tone); }
.channel-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; background: var(--tone); color: #fff; margin-bottom: var(--space-2); }
.channel-card .eyebrow { color: var(--c-muted); margin: 0; }
.channel-card h3 { font-size: var(--fs-card); line-height: 1.4; margin: 0; }
.channel-card h3 a { color: var(--c-navy-900); text-decoration: none; }
.channel-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.channel-card h3 a:focus-visible { outline: none; box-shadow: none; }
.channel-card:focus-within { outline: 3px solid var(--c-cobalt-600); outline-offset: 2px; }
.channel-card p { color: var(--c-muted); margin: 0 0 var(--space-3); }
.channel-cta { margin-top: auto; font-size: var(--fs-small); font-weight: 700; color: var(--tone); }
.channel-card:hover .channel-cta { text-decoration: underline; }

.guide-steps { list-style: none; counter-reset: step; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.guide-steps li { counter-increment: step; position: relative; display: grid; gap: .3rem; padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + 52px); background: var(--c-sand-50); border: 1px solid #ecd9ad; border-radius: var(--radius-lg); }
.guide-steps li::before { content: counter(step); position: absolute; left: var(--space-5); top: var(--space-5); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-navy-900); color: var(--c-ochre-400); font-weight: 800; }
.guide-steps strong { color: var(--c-navy-900); font-size: var(--fs-card); }
.guide-steps span { color: var(--c-muted); }
.guide-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--c-line); border-radius: var(--radius-lg); }
.guide-cta p { margin: 0; max-width: 52ch; }
.guide-cta .contact-next-links { margin: 0; }
@media (prefers-reduced-motion: reduce) { .channel-card { transition: none; } .channel-card:hover { transform: none; } }
.channel-card.contact-channel, .channel-card.contact-channel:nth-child(2n) { padding: var(--space-5); border: 1px solid var(--c-line); border-top: 6px solid var(--tone); }
.channel-card.contact-channel:hover { border-color: var(--tone); }

/* Top government bar removed (2026-11-23): identity lives in the brand, search in the header.
   A thin tifa strip keeps the ornamental edge at the top of every page. */
.site-header::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--motif-tifa) repeat-x left center / 18px 6px; }
.header-inner { padding-top: 6px; }
.section-lede { margin: var(--space-2) 0 0; color: var(--c-muted); max-width: 60ch; }
.guide-steps li { align-content: start; }

/* ---------- Section page: list of pages as cards ---------- */
.section-cards .service-link { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); min-height: 120px; padding: var(--space-5); background: #fff; color: var(--c-navy-900); border: 1px solid var(--c-line); border-top: 6px solid var(--c-cobalt-600); border-radius: var(--radius-lg); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.section-cards .service-link:nth-child(3n+2) { border-top-color: var(--c-teal-800); }
.section-cards .service-link:nth-child(3n+3) { border-top-color: var(--c-terra-800); }
.section-cards .service-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); color: var(--c-navy-900); }
.section-cards .service-link strong { font-size: var(--fs-card); line-height: 1.4; font-weight: 650; }
.section-cards .card-cta { font-size: var(--fs-small); font-weight: 650; color: var(--c-cobalt-600); }
.section-cards .service-link:hover .card-cta { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .section-cards .service-link { transition: none; } .section-cards .service-link:hover { transform: none; } }

/* ---------- Directory heroes (services navy/cobalt, districts teal) ---------- */
.directory-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: clamp(2.5rem, 5vw, 4rem) 0 calc(clamp(2.5rem, 5vw, 4rem) + 16px);
  background: linear-gradient(102deg, var(--c-navy-900) 0 62%, var(--c-ochre-400) 62% 63%, var(--c-cobalt-600) 63% 100%); }
.district-hero { background: linear-gradient(102deg, var(--c-teal-800) 0 62%, var(--c-ochre-400) 62% 63%, var(--c-navy-900) 63% 100%); }
.directory-hero::after { inset: 0; z-index: -1; opacity: .16; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 55%); mask-image: linear-gradient(90deg, transparent 0, #000 55%); }
.directory-hero .container { position: relative; z-index: 1; }
.directory-hero h1 { color: #fff; margin: 0 0 var(--space-3); max-width: 22ch; }
.directory-hero p { color: #d6e2f2; max-width: 52ch; margin: 0; }
.directory-hero .hero-kicker { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--c-ochre-400); margin-bottom: var(--space-3); }
.directory-hero .hero-kicker::before { content: ""; width: 32px; height: 10px; background: var(--motif-tifa) repeat-x left center / 30px 10px; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-5) 0 var(--space-5); padding: 0; }
.hero-stats li { display: inline-flex; align-items: baseline; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; background: #ffffff1a; border: 1px solid #ffffff33; font-size: var(--fs-small); color: #e8eef7; }
.hero-stats strong { font-size: 1.25rem; color: var(--c-ochre-400); }
.hero-directory-search.directory-search { margin: 0; padding: var(--space-4); background: #ffffff14; border: 1px solid #ffffff33; border-radius: var(--radius-lg); backdrop-filter: blur(2px); max-width: 1000px; }
.hero-directory-search label { color: #fff; }
.hero-directory-search input, .hero-directory-search select { border-color: #fff; border-radius: var(--radius); min-height: 50px; }
.hero-directory-search .btn { min-height: 50px; }
@media (max-width: 959px) { .directory-hero, .district-hero { background-size: auto; } .directory-hero { background: var(--c-navy-900); } .district-hero { background: var(--c-teal-800); } }

/* ---------- Category tones (shared by chips and service cards) ---------- */
.svc-tone-navy { --tone: var(--c-navy-900); --tone-ink: #fff; --tone-text: var(--c-navy-900); }
.svc-tone-cobalt { --tone: var(--c-cobalt-600); --tone-ink: #fff; --tone-text: var(--c-cobalt-600); }
.svc-tone-teal { --tone: var(--c-teal-800); --tone-ink: #fff; --tone-text: var(--c-teal-800); }
.svc-tone-terra { --tone: var(--c-terra-800); --tone-ink: #fff; --tone-text: var(--c-terra-800); }
.svc-tone-ochre { --tone: var(--c-ochre-400); --tone-ink: var(--c-navy-900); --tone-text: var(--c-amber-800); }

.services-directory { padding-top: var(--space-6); }
.directory-categories { gap: var(--space-2); margin: 0 0 var(--space-6); }
.directory-categories a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .6rem .5rem 1rem; border-radius: 999px; background: #fff; color: var(--c-navy-900); border: 2px solid var(--tone, var(--c-navy-900)); font-weight: 650; text-decoration: none; }
.directory-categories a span { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 .4rem; margin: 0; border-radius: 999px; background: var(--tone); color: var(--tone-ink); font-size: var(--fs-label); font-weight: 750; }
.directory-categories a:hover { background: var(--c-gray-50); }
.directory-categories a[aria-current] { background: var(--tone); color: var(--tone-ink); }
.directory-categories a[aria-current] span { background: var(--tone-ink); color: var(--tone); }

/* ---------- Service cards with solid coloured heads ---------- */
.service-directory-grid { gap: var(--space-5); }
.svc-card.service-directory-item { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: #fff; color: var(--c-navy-900); border: 1px solid var(--c-line); border-top: 0; border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.svc-card.service-directory-item:hover { background: #fff; transform: translateY(-3px); box-shadow: 0 2px 4px #0b1f3a1f, 0 16px 32px #0b1f3a24; border-color: var(--tone); }
.svc-head { position: relative; isolation: isolate; display: flex; align-items: center; gap: var(--space-4); min-height: 104px; padding: var(--space-5) var(--space-5) calc(10px + var(--space-5)); background: var(--tone); color: var(--tone-ink); }
.svc-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--motif-noken) repeat 0 0 / 48px 48px; opacity: .14; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%); mask-image: linear-gradient(90deg, transparent 20%, #000 100%); }
.svc-head::after { content: ""; position: absolute; inset: auto 0 0; height: 10px; background: var(--motif-tifa) repeat-x left center / 30px 10px; }
.svc-card .directory-service-icon { flex: none; width: 56px; height: 56px; margin: 0; border-radius: 10px; background: #ffffff26; color: var(--tone-ink); box-shadow: inset 0 0 0 1px #ffffff40; }
.svc-tone-ochre .directory-service-icon { background: #0b1f3a14; box-shadow: inset 0 0 0 1px #0b1f3a26; }
.svc-card .svc-cat { margin: 0; color: var(--tone-ink); font-size: var(--fs-label); line-height: 1.35; }
.svc-body { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; padding: var(--space-5); }
.svc-card h3 { font-size: var(--fs-card); line-height: 1.4; margin: 0; color: var(--c-navy-900); }
.svc-card p { margin: 0 0 var(--space-3); color: var(--c-muted); font-size: var(--fs-body); line-height: 1.6; }
.svc-cta { margin-top: auto; font-size: var(--fs-small); font-weight: 700; color: var(--tone-text); }
.svc-card:hover .svc-cta { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .svc-card.service-directory-item { transition: none; } .svc-card.service-directory-item:hover { transform: none; } }

.directory-hero + .page-section { padding-top: var(--space-7); }

/* ---------- Section pages (Profil, Potensi, Destinasi) ---------- */
.section-hero { background: linear-gradient(102deg, var(--c-navy-900) 0 62%, var(--c-ochre-400) 62% 63%, var(--c-teal-800) 63% 100%); }
.section-hero .hero-stats { margin-bottom: 0; }
.section-cards .service-link { position: relative; padding-top: var(--space-5); }
.section-cards .card-index { font-size: 1.75rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--c-cobalt-600); }
.section-cards .service-link:nth-child(3n+2) .card-index { color: var(--c-teal-800); }
.section-cards .service-link:nth-child(3n+3) .card-index { color: var(--c-terra-800); }
.section-description { max-width: 75ch; }

/* ---------- Officials archive ---------- */
.officials-hero { background: linear-gradient(102deg, var(--c-navy-900) 0 62%, var(--c-ochre-400) 62% 63%, var(--c-terra-800) 63% 100%); }
.officials-hero .hero-directory-search { margin-top: var(--space-5); max-width: 760px; display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); }
.officials-hero .hero-directory-search > div { flex: 1 1 200px; }
.officials-hero .hero-directory-search label { display: block; font-size: var(--fs-small); font-weight: 650; margin-bottom: .4rem; }
.officials-hero .hero-directory-search select { width: 100%; padding: .6rem; font: inherit; color: var(--c-ink); background: #fff; }
.official-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.official-card.archive-item { display: flex; flex-direction: column; padding: 0; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--ease), box-shadow var(--ease); }
.official-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.official-photo.portrait-frame { display: block; aspect-ratio: 4 / 5; max-height: none; background: var(--c-sky-50); border: 0; }
.official-photo .portrait-placeholder { display: grid; place-content: center; height: 100%; color: var(--c-muted); font-size: var(--fs-small); }
.official-body { position: relative; display: flex; flex-direction: column; gap: var(--space-2); flex: 1; padding: calc(12px + var(--space-4)) var(--space-5) var(--space-5); }
.official-body::before { content: ""; position: absolute; inset: 0 0 auto; height: 12px; background: var(--motif-tifa) repeat-x left center / 36px 12px; }
.official-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.official-tags .eyebrow { margin: 0; color: var(--c-amber-800); }
.status-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: var(--fs-label); font-weight: 700; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.is-active { background: #e3f4ee; color: #0c694e; }
.status-pill.is-past { background: var(--c-gray-50); color: var(--c-muted); }
.official-card h2 { font-size: var(--fs-card); line-height: 1.4; margin: var(--space-1) 0 0; }
.official-card h2 a { color: var(--c-navy-900); text-decoration: none; }
.official-card h2 a:hover { color: var(--c-cobalt-600); text-decoration: underline; }
.official-term { margin: var(--space-2) 0 var(--space-3); display: grid; gap: var(--space-2); }
.official-term > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--space-2); font-size: var(--fs-small); }
.official-term dt { color: var(--c-muted); }
.official-term dd { margin: 0; font-weight: 600; }
.official-link { margin-top: auto; font-size: var(--fs-small); font-weight: 700; color: var(--c-cobalt-600); text-decoration: none; }
.official-card:hover .official-link { text-decoration: underline; }
@media (max-width: 959px) { .section-hero { background: var(--c-navy-900); } .officials-hero { background: var(--c-navy-900); } }
@media (prefers-reduced-motion: reduce) { .official-card { transition: none; } .official-card:hover { transform: none; } }
/* Officials: compact horizontal cards — portrait as a thumbnail, not a poster. */
.official-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.official-card.archive-item { flex-direction: row; align-items: stretch; }
.official-photo.portrait-frame { flex: none; width: 136px; aspect-ratio: 4 / 5; align-self: flex-start; margin: var(--space-4) 0 var(--space-4) var(--space-4); border-radius: var(--radius); overflow: hidden; }
.official-body { padding: var(--space-4) var(--space-5) var(--space-4) var(--space-4); }
.official-body::before { inset: 0 auto 0 0; width: 0; height: auto; }
.official-card.archive-item { border-left: 6px solid var(--c-cobalt-600); }
.official-card.archive-item:not(.is-current) { border-left-color: var(--c-line-strong); }
.official-term { margin: var(--space-1) 0 var(--space-2); gap: var(--space-1); }
.official-term > div { grid-template-columns: 6.5rem 1fr; }
@media (max-width: 479px) {
  .official-photo.portrait-frame { width: 88px; margin: var(--space-3) 0 var(--space-3) var(--space-3); }
  .official-body { padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3); }
  .official-term > div { grid-template-columns: 1fr; gap: 0; }
}
/* Officials: one card per person, every term listed with Indonesian dates. */
.term-count { margin: 0; font-size: var(--fs-label); font-weight: 700; color: var(--c-cobalt-600); }
.official-terms { list-style: none; margin: var(--space-1) 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); }
.official-terms li { display: grid; gap: .1rem; padding-left: var(--space-3); border-left: 3px solid var(--c-line); }
.official-terms li.is-current { border-left-color: #0c694e; }
.term-role { font-size: var(--fs-small); color: var(--c-muted); }
.term-dates { font-size: var(--fs-small); font-weight: 650; color: var(--c-ink); }
.term-history { margin: var(--space-4) 0 var(--space-5); padding: var(--space-4) var(--space-5); background: var(--c-gray-50); border-radius: var(--radius-lg); }
.term-history h2 { font-size: var(--fs-card); margin: 0 0 var(--space-3); }
.term-history .official-terms { margin: 0; }

/* Footer content from portal_settings (tagline, phone, social links). */
.footer-tagline { color: var(--c-ochre-400); font-weight: 600; font-size: var(--fs-small); }
.footer-social { list-style: none; display: flex; gap: var(--space-2); margin: var(--space-4) 0 0; padding: 0; }
.footer-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff40; color: #fff; }
.footer-social a:hover { background: #ffffff1a; border-color: #fff; }

/* Attachment card (announcements, performance reports). */
.attachment-file { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-4); }
.attachment-type { flex: none; display: grid; place-items: center; min-width: 48px; height: 56px; padding: 0 .4rem; border-radius: 6px; background: var(--c-terra-800); color: #fff; font-size: var(--fs-label); font-weight: 800; letter-spacing: .04em; }
.attachment-name { font-size: var(--fs-small); font-weight: 600; color: var(--c-ink); overflow-wrap: anywhere; }
.aside-empty { color: var(--c-muted); font-size: var(--fs-small); margin: 0 0 var(--space-4); }

/* Performance report: lead photo, gallery, video links. */
.report-lead { margin: 0 0 var(--space-6); }
.report-lead img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); background: var(--c-gray-50); }
.report-lead figcaption, .report-gallery figcaption { margin-top: var(--space-2); font-size: var(--fs-small); color: var(--c-muted); }
.report-gallery, .report-videos { margin-top: var(--space-6); }
.report-gallery h2, .report-videos h2 { font-size: var(--fs-h3); margin: 0 0 var(--space-4); }
.report-gallery h2 span { font-size: var(--fs-small); font-weight: 600; color: var(--c-muted); }
.report-gallery ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.report-gallery figure { margin: 0; }
.report-gallery img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--c-gray-50); transition: transform var(--ease); }
.report-gallery a { display: block; overflow: hidden; border-radius: var(--radius); }
.report-gallery a:hover img { transform: scale(1.03); }
.report-videos ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.report-videos a { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-3) var(--space-4); border: 1px solid var(--c-line); border-left: 6px solid var(--c-terra-800); border-radius: var(--radius-lg); color: var(--c-navy-900); font-weight: 650; text-decoration: none; }
.report-videos a:hover { background: var(--c-gray-50); }
.report-videos small { display: block; font-size: var(--fs-label); font-weight: 600; color: var(--c-terra-800); }
.video-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-terra-800); color: #fff; }
@media (prefers-reduced-motion: reduce) { .report-gallery img { transition: none; } .report-gallery a:hover img { transform: none; } }
.report-lead img, .report-gallery img { height: auto; }

/* ---------- Publications (/publikasi, /publikasi/{slug}) — data from app.publication_* ---------- */
.publication-themes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); }
.publication-themes a { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4); height: 100%; padding: var(--space-5); background: #fff; border: 1px solid var(--c-line); border-top: 4px solid var(--tone); border-radius: var(--radius-lg); color: inherit; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.publication-themes a:hover { box-shadow: 0 10px 24px rgba(11, 31, 58, .10); transform: translateY(-2px); }
.publication-themes a:hover h2 { text-decoration: underline; }
.publication-themes a:focus-visible { outline: 3px solid var(--c-cobalt-600); outline-offset: 3px; }
.publication-themes .document-symbol { width: 56px; height: 64px; border-radius: var(--radius); background: var(--tone); color: var(--tone-ink); }
.publication-themes h2 { margin: 0 0 var(--space-2); font-size: var(--fs-h3); line-height: var(--lh-heading); color: var(--c-navy-900); }
.publication-themes p { margin: 0 0 var(--space-2); color: var(--c-muted); font-size: .9375rem; }
.publication-theme-meta { font-size: var(--fs-label); font-weight: 600; color: var(--tone-text); }
.publication-themes .section-more { grid-column: 2; align-self: end; font-weight: 600; color: var(--c-cobalt-600); }

.publication-description { margin-bottom: var(--space-6); }
.pub-group { margin: 0 0 var(--space-7); scroll-margin-top: 6rem; }
.pub-group > h2 { font-size: 1.375rem; line-height: 1.3; margin: 0 0 var(--space-3); padding-bottom: var(--space-2); border-bottom: 3px solid var(--c-ochre-400, #f2b632); }
.pub-group-desc { color: var(--c-muted); margin: 0 0 var(--space-3); }
.pub-subgroup { font-size: 1rem; margin: var(--space-5) 0 var(--space-2); color: var(--c-navy-900); }
.pub-files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line); }
.pub-file { display: grid; grid-template-columns: 3.25rem 1fr; gap: var(--space-3); align-items: start; padding: var(--space-3) 0; border-bottom: 1px solid var(--c-line); scroll-margin-top: 6rem; }
.pub-file:target { background: var(--c-sky-50, #eff6ff); box-shadow: -8px 0 0 var(--c-sky-50, #eff6ff), 8px 0 0 var(--c-sky-50, #eff6ff); }
.pub-type { display: grid; place-items: center; min-height: 2.25rem; padding: 0 .25rem; border-radius: 6px; background: #e8efff; color: #1e3a8a; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; }
.pub-body { display: grid; gap: .2rem; min-width: 0; }
.pub-title { font-weight: 600; line-height: 1.45; color: var(--c-navy-900); overflow-wrap: anywhere; }
a.pub-title { color: var(--c-cobalt-700, #1e3a8a); text-decoration: underline; text-decoration-color: rgba(29, 78, 216, .35); text-underline-offset: 3px; }
a.pub-title:hover { text-decoration-color: currentColor; }
.pub-body p { margin: 0; font-size: .9375rem; color: var(--c-muted); }
.pub-meta { font-size: var(--fs-label); color: var(--c-muted); }
.pub-file.is-unavailable .pub-type { background: var(--c-gray-50, #f3f4f6); color: var(--c-muted); }
.pub-file.is-unavailable .pub-title { font-weight: 500; color: var(--c-muted); }
.pub-missing { margin-top: var(--space-3); }
.pub-missing summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--c-navy-900); }
.pub-missing summary:focus-visible { outline: 3px solid var(--c-cobalt-600); outline-offset: 2px; }
.search-context { color: var(--c-muted); font-size: var(--fs-small); }
.publication-page .aside-list li > span { font-size: var(--fs-label); color: var(--c-muted); }
.publication-page .aside-list a { text-decoration: none; }

/* ---------- Theme toggle (header): one icon button, light <-> dark; the default follows the OS ---------- */
.theme-toggle { order: 2; flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); border: 2px solid var(--c-line-strong); border-radius: var(--radius); background: #fff; color: var(--c-navy-900); text-decoration: none; }
.theme-toggle:hover { border-color: var(--c-cobalt-600); }
.theme-toggle:focus-visible { outline: 3px solid var(--c-cobalt-600); outline-offset: 2px; }
.theme-toggle .ti-to-light { display: none; }
:root[data-theme="dark"] .theme-toggle .ti-to-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .ti-to-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .theme-toggle .ti-to-dark { display: none; }
  :root[data-theme="system"] .theme-toggle .ti-to-light { display: block; }
}
@media (max-width: 959px) { .theme-toggle { margin-left: auto; } .theme-toggle + .header-search { margin-left: 0; } }
