@font-face {
    font-family: Roboto;
    src: url('../fonts/roboto/roboto-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

:root {
    color: #142b46;
    background: #eef4fa;
    font-family: var(--portal-font);
    --portal-font: Roboto, Arial, Helvetica, sans-serif;
    --weight-label: 500;
    --weight-bold: 700;
    --weight-heading: 750;
    --weight-section: 750;
    --weight-card: 800;
    --portal-width: 640px;
    --blue: #0860e8;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
h1, h2 { font-weight: var(--weight-heading); }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; padding: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.portal {
    container-type: inline-size;
    width: min(100%, var(--portal-width));
    margin-inline: auto;
    min-height: 100svh;
    background: #fcfdff;
    box-shadow: 0 12px 48px #1837660a;
    --u: calc(100cqw / 852);
    --type-page-title: clamp(1.125rem, calc(46.5 * var(--u)), 2.25rem);
    --type-detail-title: clamp(1.0625rem, 4.2cqw, 1.875rem);
    --type-section: clamp(.875rem, calc(36 * var(--u)), 1.6875rem);
    --type-card: clamp(.9375rem, 3.65cqw, 1.5rem);
    --type-teaser: clamp(.75rem, calc(28 * var(--u)), 1.3125rem);
    --type-tile: clamp(.625rem, 2.92cqw, 1.1875rem);
    --type-tile-small: clamp(.5625rem, 2.55cqw, 1rem);
    --type-body: clamp(.8125rem, 3.1cqw, 1.125rem);
    --type-label: clamp(.6875rem, calc(24 * var(--u)), 1.125rem);
    --type-hero-copy: var(--type-label);
    --type-action: clamp(.6875rem, calc(25 * var(--u)), 1.1875rem);
    --type-meta: clamp(.6875rem, calc(22 * var(--u)), 1rem);
    --type-caption: clamp(.625rem, 2.5cqw, .875rem);
    --type-input: max(.875rem, calc(29 * var(--u)));
    --type-control: max(1rem, var(--type-body));
    --tracking-page: -.005em;
    --tracking-heading: -.02em;
}

main { padding-bottom: calc(244 * var(--u) + env(safe-area-inset-bottom)); }
.icon { display: block; width: 1em; height: 1em; flex-shrink: 0; }

.home-hero {
    position: relative;
    isolation: isolate;
    height: calc(442 * var(--u));
    overflow: hidden;
    border-radius: 0 0 calc(50 * var(--u)) calc(50 * var(--u));
    background:
        radial-gradient(ellipse at 2% 61%, #f1f7fb 0%, #edf5fbce 24%, transparent 60%),
        linear-gradient(151deg, #d7ebfc 4%, #9bcff7 65%, #2db1f3);
}

.hero-photo, .hero-sea, .hero-wave {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.hero-photo {
    inset: calc(8 * var(--u)) 0 auto auto;
    width: 53.29%;
    mask-image: linear-gradient(to right, transparent, #000 14%), linear-gradient(to bottom, transparent, #000 4%);
    mask-composite: intersect;
}

.hero-sea {
    right: 0;
    top: calc(328 * var(--u));
    width: 87.68%;
    mask-image: linear-gradient(to right, transparent 3%, #000 39%), linear-gradient(to bottom, transparent, #000 67%);
    mask-composite: intersect;
}

.hero-wave {
    inset: auto 0 0;
    width: 100%;
    height: calc(195 * var(--u));
}

.home-brand {
    width: calc(209 * var(--u));
    margin-left: calc(64 * var(--u));
    padding-top: calc(22 * var(--u));
}

.brand-logo { width: 100%; aspect-ratio: 886 / 464; }

.home-hero h1 {
    margin: calc(43 * var(--u)) 0 0 calc(64 * var(--u));
    font-size: calc(38.5 * var(--u));
    font-weight: var(--weight-bold);
    line-height: 1.08;
    letter-spacing: var(--tracking-page);
}

.search {
    position: relative;
    display: flex;
    align-items: center;
    gap: calc(32 * var(--u));
    min-height: calc(101 * var(--u));
    margin: calc(-44 * var(--u)) calc(34 * var(--u)) 0;
    padding: 0 calc(38 * var(--u));
    border-radius: 999px;
    color: #2f4770;
    border: 1px solid #fff;
    background: linear-gradient(165deg, #fff 8%, #f4f8fe 100%);
    box-shadow: 0 4px 14px #234b7c0b, inset 0 1px 0 #fff;
    cursor: text;
}

.search .icon { font-size: calc(44 * var(--u)); }
.search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: var(--type-input);
}

.search input::placeholder { color: inherit; opacity: 1; }
.search:focus-within { outline: 2px solid #0860e850; }
.empty-state { margin: 16px 0; text-align: center; font-size: var(--type-body); }

.home-services { margin: calc(52 * var(--u)) calc(32 * var(--u)) 0; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(39 * var(--u)) calc(10 * var(--u)); }

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(6 * var(--u));
    text-align: center;
    font-size: var(--type-label);
    font-weight: var(--weight-label);
    line-height: 1.22;
    letter-spacing: -.012em;
    border-radius: calc(20 * var(--u));
}

.service-icon { width: calc(113 * var(--u)); aspect-ratio: 113 / 111; border-radius: 50%; }
.highlights { margin: calc(56 * var(--u)) calc(33 * var(--u)) 0; }
[data-carousel-swipe] [data-slide] { touch-action: pan-y pinch-zoom; user-select: none; }

.tourism-banner {
    position: relative;
    isolation: isolate;
    min-height: calc(264 * var(--u));
    overflow: hidden;
    border-radius: calc(31 * var(--u));
    background: linear-gradient(145deg, #d7e9fc, #d2e8fb 38%, #56c8f4 72%, #65d2d0);
    box-shadow: inset 0 0 0 1px #fff9, 0 4px 14px #22558208;
}

.tourism-photo, .alternate-photo {
    position: absolute;
    inset: 0 0 0 auto;
    height: 100%;
    width: auto;
    z-index: -1;
    mask-image: linear-gradient(to right, transparent, #000 16%);
}

.banner-copy { padding: calc(21 * var(--u)) 0 calc(22 * var(--u)) calc(46 * var(--u)); }
.banner-copy h2 { font-size: var(--type-section); font-weight: var(--weight-section); line-height: 1.03; letter-spacing: var(--tracking-heading); }
.banner-copy h2 strong { font-size: calc(45 * var(--u)); font-weight: var(--weight-card); }
.banner-copy p { margin: calc(10 * var(--u)) 0 calc(16 * var(--u)); font-size: var(--type-hero-copy); line-height: 1.2; }

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: calc(9 * var(--u));
    padding: calc(13 * var(--u)) calc(26 * var(--u)) calc(13 * var(--u)) calc(31 * var(--u));
    border-radius: 999px;
    color: var(--blue);
    background: #fff;
    font-size: var(--type-action);
    font-weight: var(--weight-bold);
    letter-spacing: -.026em;
}

.pill-link .icon, .text-link .icon { stroke-width: 2.6; }
.alternate-banner { background: linear-gradient(115deg, #dcefff 34%, #99dafa); }
.alternate-banner:last-of-type { background: linear-gradient(113deg, #dcefff, #bfeaf5 60%, #e3f6bb); }
.alternate-photo { object-fit: cover; max-width: 47%; }
.custom-slide-photo {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 61%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to right, transparent, #000 44%);
}
.banner-copy { max-width: 74%; overflow-wrap: anywhere; }
.banner-copy h2 + .pill-link { margin-top: calc(14 * var(--u)); }
.carousel-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(4 * var(--u)); margin-top: calc(13 * var(--u)); }
.carousel-dots button { display: grid; place-items: center; min-width: 16px; height: max(18px, calc(37 * var(--u))); border-radius: 99px; }
.carousel-dots button::after { content: ''; display: block; width: calc(14 * var(--u)); height: calc(14 * var(--u)); border-radius: 99px; background: #cbd4e0; }
.carousel-dots button[aria-pressed="true"]::after { width: calc(30 * var(--u)); background: #0872df; }

.news { margin: calc(25 * var(--u)) calc(41 * var(--u)) 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: calc(12 * var(--u)); margin-bottom: calc(29 * var(--u)); }
.section-heading h2 { font-size: var(--type-section); font-weight: var(--weight-section); letter-spacing: var(--tracking-heading); }
.text-link { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); color: var(--blue); font-size: var(--type-action); font-weight: var(--weight-bold); }

.news-card {
    display: grid;
    grid-template-columns: 37.3% minmax(0, 1fr);
    gap: calc(27 * var(--u));
    align-items: start;
    width: 100%;
    padding-inline: calc(3 * var(--u));
    text-align: left;
}

.news-photo { width: 100%; border-radius: calc(15 * var(--u)); }
.news-card .news-photo { aspect-ratio: 288 / 149; object-fit: cover; }
.news-card.no-image { grid-template-columns: minmax(0, 1fr); }
.news-list-item + .news-list-item { margin-top: 14px; }
.news-page-content { padding-inline: clamp(16px, 4.8cqw, 30px); padding-top: 22px; }
.news-page-content h1 { font-size: var(--type-page-title); line-height: 1.16; letter-spacing: var(--tracking-page); overflow-wrap: anywhere; }
.news-page-list { margin-top: 20px; }
.article-date { margin: 10px 0 16px; color: #535966; font-size: var(--type-meta); }
.article-photo { width: 100%; max-height: 480px; object-fit: contain; border-radius: 12px; }
.article-body { margin-top: 18px; font-size: var(--type-control); line-height: 1.65; overflow-wrap: anywhere; }
.article-body > * + * { margin-top: .85em; }
.article-body :is(h2, h3, h4) { line-height: 1.25; }
.article-body h2 { font-size: 1.4em; }
.article-body h3 { font-size: 1.2em; }
.article-body h4 { font-size: 1.05em; }
.article-body blockquote { margin-inline: 0; padding: .4em 1em; border-inline-start: 3px solid #83b7fa; background: #eef6ff; }
.article-body a { color: #064bbd; text-decoration: underline; }
.news-pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; color: var(--blue); font-size: var(--type-action); font-weight: var(--weight-bold); }
.service-api-data { padding: 16px; border-radius: 14px; background: #edf5fc; font-size: var(--type-body); line-height: 1.55; overflow-wrap: anywhere; }
.service-api-data :is(dl, ol) { margin: 0; }
.service-api-data :is(dd, ol) { padding-inline-start: 16px; }
.service-api-data dd { margin: 0 0 .7em; }
.service-api-data dt { font-weight: var(--weight-heading); }
.service-api-data li + li { margin-top: .6em; }
.news-card strong { display: block; font-size: var(--type-teaser); font-weight: var(--weight-section); line-height: 1.2; letter-spacing: var(--tracking-heading); overflow-wrap: anywhere; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: calc(10 * var(--u)) calc(42 * var(--u)); margin-top: calc(13 * var(--u)); color: #535966; font-size: var(--type-meta); }
.news-meta > span { display: flex; align-items: center; gap: calc(14 * var(--u)); }
.news-meta .icon { font-size: calc(31 * var(--u)); color: #7a8088; }

.page-header {
    display: flex;
    align-items: center;
    gap: calc(24 * var(--u));
    height: calc(123 * var(--u));
    padding: 0 calc(33 * var(--u));
    background: radial-gradient(ellipse at 13% 110%, #f9fcfe 16%, #f5fbffd4 36%, transparent 75%),
        linear-gradient(125deg, #f0f7fd, #84c8fa 70%, #dcefff);
}

.back-link {
    display: grid;
    place-items: center;
    width: calc(78 * var(--u));
    height: calc(73 * var(--u));
    border-radius: calc(21 * var(--u));
    background: #fff;
    box-shadow: 0 calc(6 * var(--u)) calc(13 * var(--u)) #2346842a;
    font-size: calc(42 * var(--u));
}

.header-brand { width: calc(166 * var(--u)); }
.notification { display: grid; place-items: center; width: calc(73 * var(--u)); height: calc(73 * var(--u)); margin-left: auto; font-size: calc(47 * var(--u)); }

.category-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    overflow: hidden;
    min-height: max(170px, calc(308 * var(--u)));
    border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u));
    background: linear-gradient(132deg, #0740a2 3%, #005dcc 36%, #008fe8 73%);
    color: #fff;
}

.category-hero-content {
    display: grid;
    grid-template-columns: 13.6cqw minmax(0, 1fr);
    align-items: center;
    gap: 2.3cqw;
    width: 58%;
    padding: clamp(17px, 4.5cqw, 30px) 0 clamp(29px, 6.2cqw, 43px) 3.9cqw;
}

.category-hero-copy h1 {
    margin: .06em 0 .22em;
    font-size: var(--type-page-title);
    line-height: 1.03;
    letter-spacing: var(--tracking-page);
}

.category-hero-copy p { font-size: var(--type-hero-copy); line-height: 1.25; }
.category-hero-copy p:first-child { font-weight: var(--weight-label); }

.portal .category-hero + .search {
    min-height: clamp(50px, 9.5cqw, 62px);
    margin: clamp(-38px, -6.1cqw, -24px) 3.6cqw 0;
    padding-inline: clamp(16px, 4cqw, 27px);
    gap: clamp(10px, 3cqw, 19px);
    box-shadow: 0 5px 11px #1260a530;
}

.portal .category-hero + .search .icon { font-size: clamp(21px, 4.5cqw, 29px); }

.population-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: calc(308 * var(--u));
    border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u));
    color: #fff;
    background: linear-gradient(132deg, #0740a2 3%, #005dcc 36%, #008fe8 73%);
}

.document-illustration, .population-wave { position: absolute; right: 0; z-index: -1; }
.document-illustration { top: 0; width: 48.83%; mask-image: linear-gradient(to right, transparent, #000 3%); }
.population-wave { bottom: 0; width: 100%; height: calc(100 * var(--u)); }
.population-hero-copy { padding: calc(36 * var(--u)) 0 0 calc(51 * var(--u)); max-width: 51%; }
.population-hero h1 { font-size: var(--type-page-title); line-height: 1.03; letter-spacing: var(--tracking-page); }
.population-hero p { margin-top: calc(13 * var(--u)); font-size: var(--type-hero-copy); line-height: 1.25; }
.population-page .search { min-height: calc(81 * var(--u)); margin: calc(-52 * var(--u)) calc(31 * var(--u)) 0; gap: calc(34 * var(--u)); }
.population-page .search .icon { color: #0b184c; }

.document-services { margin: calc(32 * var(--u)) calc(26 * var(--u)) 0; }
.document-services h2 { margin: 0 0 calc(23 * var(--u)) calc(5 * var(--u)); font-size: var(--type-section); font-weight: var(--weight-section); letter-spacing: var(--tracking-heading); }

.document-services .directory-row { min-height: 72px; }

.population-page { --duk: calc(100cqw / 720); }
.dukcapil-administration { margin-top: calc(22 * var(--duk)); }

.dukcapil-section { padding-inline: calc(12 * var(--duk)); color: #0d1046; }

.dukcapil-heading {
    display: flex;
    align-items: center;
    gap: calc(12 * var(--duk));
    min-height: calc(64 * var(--duk));
}

.dukcapil-heading-icon { width: calc(56 * var(--duk)); flex-shrink: 0; }
.dukcapil-heading :is(h1, h2) { font-size: var(--type-section); font-weight: var(--weight-section); letter-spacing: var(--tracking-heading); }
.dukcapil-grid { display: grid; gap: calc(12 * var(--duk)); }
.dukcapil-administration .dukcapil-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.dukcapil-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: calc(130 * var(--duk));
    gap: calc(4 * var(--duk));
    padding: calc(12 * var(--duk)) calc(4 * var(--duk)) calc(10 * var(--duk));
    border: 1px solid #ffffff70;
    border-color: var(--dukcapil-edge, #bbd9f9);
    border-radius: calc(23 * var(--duk));
    background: linear-gradient(145deg, #ffffff70, transparent 68%), var(--dukcapil-fill, #dcecfb);
    box-shadow: 0 calc(3 * var(--duk)) calc(4 * var(--duk)) #274f7b0c;
    text-align: center;
    line-height: 1.06;
}

.dukcapil-card strong { font-size: var(--type-tile); font-weight: var(--weight-card); }
.dukcapil-card-icon { width: calc(74 * var(--duk)); height: calc(55 * var(--duk)); object-fit: contain; }
.dukcapil-card.blue { --dukcapil-fill: #d2e8fa; }
.dukcapil-card.ice { --dukcapil-fill: #dceefa; }
.dukcapil-card.pink { --dukcapil-fill: #f4e3f9; --dukcapil-edge: #f2d8f4; }
.dukcapil-card.purple { --dukcapil-fill: #ede5fa; --dukcapil-edge: #dfd3f5; }
.dukcapil-card.gold { --dukcapil-fill: #fbf0d7; --dukcapil-edge: #f7e6bc; }
.dukcapil-card.mint { --dukcapil-fill: #dcf7ec; --dukcapil-edge: #c1eddf; }
.dukcapil-card.sky { --dukcapil-fill: #dde9fb; }
.dukcapil-card.aqua { --dukcapil-fill: #dcf4f2; --dukcapil-edge: #d1eee7; }

.dukcapil-innovations {
    margin-top: calc(21 * var(--duk));
    padding-bottom: calc(18 * var(--duk));
    border-block: 1px solid #e5eef7;
    border-radius: calc(30 * var(--duk));
    background: #f8fbfd;
}

.dukcapil-poster-nav { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; }
.dukcapil-poster-nav button,
.dukcapil-poster-dialog button {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid #cde0f4;
    border-radius: 10px;
    background: #f0f7ff;
    color: #0546a9;
}

.dukcapil-poster-nav [data-poster-prev] .icon { rotate: 180deg; }
.dukcapil-poster-nav button:disabled,
.dukcapil-poster-dialog button:disabled { opacity: .44; cursor: default; }

.dukcapil-poster-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(126px, 43%, 194px);
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    scrollbar-width: thin;
    scrollbar-color: #9cb9d9 transparent;
    margin: 4px 0 0;
    padding: 4px 4px 9px;
    list-style: none;
}

.dukcapil-poster-track > li { min-width: 0; scroll-snap-align: start; }
.dukcapil-poster-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #c6ddf3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 5px #21467612;
}

.dukcapil-poster-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; background: #dceefc; }
.dukcapil-poster-card span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 6px;
    padding: 9px 10px;
    font-size: var(--type-tile);
    line-height: 1.2;
}
.dukcapil-poster-card .icon { color: #0064db; }

.dukcapil-poster-dialog {
    width: min(calc(100% - 20px), 1010px);
    max-width: none;
    max-height: calc(100dvh - 20px);
    padding: 12px;
    overflow: auto;
    border: 1px solid #dce8f6;
    border-radius: 18px;
    background: #fcfdff;
    color: #091745;
    box-shadow: 0 16px 50px #061c4a40;
    overscroll-behavior: contain;
}

.dukcapil-poster-dialog::backdrop { background: #071634b8; }
body:has(.dukcapil-poster-dialog[open]) { overflow: hidden; }
.dukcapil-poster-dialog-header,
.dukcapil-poster-controls { display: flex; align-items: center; gap: 8px; }
.dukcapil-poster-dialog-header { justify-content: space-between; margin-bottom: 8px; }
.dukcapil-poster-dialog-header h2 { font-size: var(--type-detail-title); letter-spacing: var(--tracking-heading); }
.dukcapil-poster-stage {
    height: min(57dvh, 600px);
    overflow: auto;
    border-radius: 10px;
    background: #e7f1fc;
    overscroll-behavior: contain;
}

.dukcapil-poster-stage > div {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100%;
    min-height: 100%;
    width: max-content;
}

.dukcapil-poster-stage img { width: var(--poster-width, 0px); max-width: none; height: auto; }
.dukcapil-poster-stage[data-zoomed] { cursor: grab; }
.dukcapil-poster-stage[data-dragging] { cursor: grabbing; }
.dukcapil-poster-controls { justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.dukcapil-poster-controls output { min-width: 3.25em; text-align: center; font-variant-numeric: tabular-nums; font-size: var(--type-body); }
.dukcapil-poster-controls button[data-poster-zoom-reset] { padding-inline: 9px; font-size: var(--type-action); }
.dukcapil-poster-caption { margin-top: 9px; font-size: var(--type-body); line-height: 1.35; }

@media (prefers-reduced-motion: no-preference) {
    .dukcapil-poster-track { scroll-behavior: smooth; }
}


.dukcapil-help {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: calc(184 * var(--duk));
    margin: calc(31 * var(--duk)) calc(9 * var(--duk)) 0;
    border: 1px solid #bedffd;
    border-radius: calc(28 * var(--duk));
    background: linear-gradient(120deg, #c8e7fd, #e8f4fc 72%, #c0e3fb);
}

.dukcapil-help-illustration {
    position: absolute;
    z-index: -1;
    left: 0;
    bottom: 0;
    width: 35%;
    height: 100%;
    object-fit: cover;
    object-position: left bottom;
    mask-image: linear-gradient(to right, #000 93%, transparent);
}

.dukcapil-help-copy { margin-left: 37.5%; padding: calc(11 * var(--duk)) calc(28 * var(--duk)) calc(14 * var(--duk)) 0; }
.dukcapil-help h2 { color: #111889; font-size: var(--type-section); font-weight: var(--weight-section); letter-spacing: var(--tracking-heading); }
.dukcapil-help p { margin-top: calc(3 * var(--duk)); font-size: var(--type-label); line-height: 1.2; }
.dukcapil-help-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(7 * var(--duk));
    min-height: calc(52 * var(--duk));
    margin-top: calc(14 * var(--duk));
    padding: calc(3 * var(--duk)) calc(22 * var(--duk));
    border: 1px solid #fff;
    border-radius: 999px;
    background: linear-gradient(#30c707, #098b1b);
    color: #fff;
    font-size: var(--type-action);
    font-weight: var(--weight-bold);
}
.dukcapil-help-button .icon:first-child { width: 1.55em; height: 1.55em; }

.dukcapil-detail-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(177px, 42cqw, 260px);
    padding: clamp(16px, 4.5cqw, 32px) 5%;
    border-radius: 0 0 clamp(23px, 5cqw, 36px) clamp(23px, 5cqw, 36px);
    background: linear-gradient(135deg, #0752b9, #0085da 72%, #00b5ed);
    color: #fff;
}

.dukcapil-detail-hero-illustration {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 75%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    mask-image: linear-gradient(90deg, transparent, #000 32%);
}

.dukcapil-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: .35em;
    margin-bottom: clamp(14px, 4cqw, 28px);
    font-size: var(--type-body);
}

.dukcapil-detail-breadcrumb [aria-current] { font-weight: var(--weight-heading); }
.dukcapil-detail-hero :focus-visible { outline-color: #fff; }
.dukcapil-detail-hero-copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: clamp(9px, 2.8cqw, 20px);
    max-width: 70%;
}

.dukcapil-detail-hero-icon {
    display: grid;
    place-items: center;
    width: clamp(43px, 12.5cqw, 89px);
    aspect-ratio: 1;
    border: 1px solid #fff;
    border-radius: 23%;
    background: linear-gradient(#fff, #e2f4ff);
    box-shadow: 0 5px 10px #002a8536;
}

.dukcapil-detail-hero-icon img { width: 80%; }
.dukcapil-detail-hero h1 {
    font-size: var(--type-detail-title);
    line-height: 1.12;
    letter-spacing: var(--tracking-heading);
}

.dukcapil-detail-hero p {
    margin-top: .55em;
    max-width: 28ch;
    font-size: var(--type-body);
    line-height: 1.23;
}

.dukcapil-detail-panel {
    margin: clamp(13px, 3.4cqw, 23px) 2.75% 0;
    padding: clamp(12px, 3cqw, 22px);
    border: 1px solid #dbeafa;
    border-radius: clamp(19px, 4.6cqw, 34px);
    background: linear-gradient(145deg, #fff, #f1f7ff);
    box-shadow: 0 5px 15px #235ba018;
}

.dukcapil-detail-panel-heading {
    display: flex;
    align-items: flex-start;
    gap: clamp(9px, 2.7cqw, 18px);
    margin-bottom: clamp(10px, 2.3cqw, 17px);
}

.dukcapil-detail-panel-heading > .icon {
    width: clamp(26px, 6.3cqw, 46px);
    height: auto;
    color: #0084ff;
    stroke-width: 2;
}

.dukcapil-detail-panel-heading h2 {
    font-size: var(--type-detail-title);
    letter-spacing: var(--tracking-heading);
    line-height: 1.12;
    font-weight: var(--weight-heading);
}

.dukcapil-detail-panel p {
    margin-top: .3em;
    color: #324a6e;
    font-size: var(--type-body);
    line-height: 1.3;
}

.dukcapil-detail-steps {
    display: grid;
    gap: clamp(5px, 1.2cqw, 8px);
    padding: 0;
    margin: 0;
    list-style: none;
    counter-reset: detail-item;
}

.dukcapil-detail-steps li {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 2.9cqw, 20px);
    padding: clamp(7px, 1.7cqw, 12px) clamp(9px, 2.8cqw, 19px);
    border-radius: clamp(11px, 2.8cqw, 21px);
    background: linear-gradient(105deg, #eaf5fa, #eaf1fc);
    counter-increment: detail-item;
}

.dukcapil-detail-steps strong {
    display: block;
    font-size: var(--type-card);
    line-height: 1.13;
    font-weight: var(--weight-card);
}

.dukcapil-detail-step-number {
    display: grid;
    place-items: center;
    width: clamp(21px, 5.1cqw, 36px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #008b6b;
    color: white;
    font-size: var(--type-label);
    font-weight: var(--weight-heading);
}

.dukcapil-detail-step-number::before { content: counter(detail-item); }
.dukcapil-detail-step-icon {
    display: grid;
    place-items: center;
    width: clamp(36px, 10cqw, 65px);
    aspect-ratio: 1;
    border-radius: 25%;
    font-size: clamp(22px, 6cqw, 40px);
}

.dukcapil-detail-step-icon--mint { background: #c7f0e7; color: #00836a; }
.dukcapil-detail-step-icon--blue { background: #c3e5ff; color: #0075e8; }
.dukcapil-detail-step-icon--violet { background: #e9dafa; color: #7439bb; }
.dukcapil-detail-step-icon--gold { background: #fff0cc; color: #ac6600; }

.dukcapil-detail-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: clamp(9px, 2.3cqw, 16px);
    margin-top: clamp(10px, 2.45cqw, 17px);
    padding: clamp(10px, 2.35cqw, 17px);
    border-radius: clamp(12px, 3cqw, 21px);
    background: linear-gradient(135deg, #def1ff, #d5ebfc);
}

.dukcapil-detail-notice h3 { margin: 0; font-size: var(--type-card); font-weight: var(--weight-card); color: #101878; }
.dukcapil-detail-notice-icon {
    display: grid;
    place-items: center;
    width: clamp(22px, 5.4cqw, 37px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #007de5;
    color: #fff;
    font-size: clamp(14px, 3.6cqw, 22px);
}

.dukcapil-detail-notice a { color: #0059b9; font-weight: var(--weight-bold); text-decoration: underline; }
.dukcapil-detail .dukcapil-help { margin-inline: 2.75%; margin-top: clamp(13px, 3.4cqw, 23px); }

.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-hero {
    background: linear-gradient(135deg, #502a85, #683daf 65%, #8a62d3);
}

.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-hero-illustration {
    width: 57%;
    filter: hue-rotate(35deg);
    mask-image: linear-gradient(90deg, transparent 42%, #000 87%);
}

.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-panel {
    border-color: #ded4fa;
    background: linear-gradient(145deg, #fdfcff, #f2edff);
}

.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-panel-heading > .icon { color: #773cb4; }
.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-steps li { background: linear-gradient(105deg, #f0e9fd, #eee9fa); }
.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-step-number { background: #6b3ba6; }
.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-notice { background: #eae1fa; }
.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-notice h3 { color: #512884; }
.dukcapil-detail[data-service="kartu-keluarga"] .dukcapil-detail-notice-icon { background: #713db0; }

.dukcapil-detail:is([data-service="kia"], [data-service="konsolidasi-nik"]) .dukcapil-detail-hero {
    min-height: auto;
    background:
        radial-gradient(ellipse at 95% 5%, #e86079 0%, transparent 52%),
        linear-gradient(120deg, #9d234d, #bc3259);
}

.dukcapil-detail:is([data-service="kia"], [data-service="konsolidasi-nik"]) .dukcapil-detail-hero-copy { max-width: 100%; }

.dukcapil-detail[data-service="akta-kelahiran"] .dukcapil-detail-hero {
    min-height: auto;
    background:
        radial-gradient(ellipse at 95% 5%, #159ee6 0%, transparent 56%),
        linear-gradient(125deg, #07529b, #057ac5);
}

.dukcapil-detail[data-service="akta-kelahiran"] .dukcapil-detail-hero-copy { max-width: 100%; }
.dukcapil-detail[data-service="akta-kelahiran"] .dukcapil-detail-step-number { background: #0772b8; }
.dukcapil-detail[data-service="akta-kelahiran"] .dukcapil-detail-notice { background: #fff2c2; }

.dukcapil-detail[data-service="akta-kematian"] .dukcapil-detail-hero {
    min-height: auto;
    background:
        radial-gradient(ellipse at 95% 5%, #0f9b99 0%, transparent 56%),
        linear-gradient(125deg, #07575f, #08777c);
}

.dukcapil-detail[data-service="akta-kematian"] .dukcapil-detail-hero-copy { max-width: 100%; }
.dukcapil-detail[data-service="akta-kematian"] .dukcapil-detail-step-number { background: #08716d; }
.dukcapil-detail[data-service="akta-kematian"] .dukcapil-detail-notice { background: #fff2c2; }

.dukcapil-detail[data-service="pindah-datang"] .dukcapil-detail-hero {
    min-height: auto;
    background:
        radial-gradient(ellipse at 95% 5%, #16a9a0 0%, transparent 56%),
        linear-gradient(125deg, #065761, #087c81);
}

.dukcapil-detail[data-service="pindah-datang"] .dukcapil-detail-hero-copy { max-width: 100%; }
.dukcapil-detail[data-service="pindah-datang"] .dukcapil-detail-step-number { background: #08716d; }

.dukcapil-detail[data-service="aktivasi-ikd"] .dukcapil-detail-hero {
    min-height: auto;
    background:
        radial-gradient(ellipse at 95% 5%, #18a7ad 0%, transparent 60%),
        linear-gradient(125deg, #07596a, #037e82);
}

.dukcapil-detail[data-service="aktivasi-ikd"] .dukcapil-detail-hero-copy { max-width: 100%; }
.dukcapil-detail[data-service="aktivasi-ikd"] .dukcapil-detail-step-number { background: #08716d; }
.dukcapil-innovation-detail { border-color: #b8dfed; background: linear-gradient(150deg, #fff, #eaf7fd); }

.dukcapil-guide-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 2cqw, 14px);
    margin-bottom: clamp(10px, 2.6cqw, 16px);
}

.dukcapil-guide-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    min-height: 44px;
    padding: .55em .45em;
    border: 1px solid #b5def4;
    border-radius: clamp(10px, 2.6cqw, 17px);
    background: #e2f3ff;
    color: #045390;
    font-size: var(--type-body);
    font-weight: var(--weight-bold);
}

.dukcapil-innovation-flow {
    display: grid;
    gap: clamp(8px, 2cqw, 14px);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: innovation-step;
}

.dukcapil-innovation-flow li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: .7em;
    padding: clamp(10px, 2.7cqw, 17px);
    border: 1px solid #d4eafb;
    border-radius: clamp(10px, 2.7cqw, 17px);
    background: #f5fbff;
    counter-increment: innovation-step;
}

.dukcapil-innovation-flow li::before {
    display: grid;
    place-items: center;
    width: clamp(22px, 5.6cqw, 34px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #0567aa;
    color: #fff;
    font-weight: var(--weight-heading);
    content: counter(innovation-step);
}

.dukcapil-innovation-flow strong { font-size: var(--type-card); font-weight: var(--weight-card); }

.dukcapil-innovation-poster {
    display: block;
    overflow: hidden;
    margin-top: clamp(12px, 3.3cqw, 20px);
    border: 1px solid #c9e3f5;
    border-radius: clamp(10px, 3cqw, 18px);
    background: #fff;
    color: #03549a;
}

.dukcapil-innovation-poster img { width: 100%; height: auto; }
.dukcapil-innovation-poster span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65em;
    min-height: 44px;
    padding: .65em 1em;
    font-size: var(--type-body);
    font-weight: var(--weight-bold);
}

.dukcapil-detail-note-list {
    margin: .4em 0 .55em;
    padding-inline-start: 1.1em;
    color: #324a6e;
    font-size: var(--type-body);
    line-height: 1.35;
}

.dukcapil-detail-note-list li + li { margin-top: .35em; }

.online-service {
    display: grid;
    justify-items: center;
    gap: clamp(10px, 2.6cqw, 16px);
    padding-bottom: clamp(16px, 4.2cqw, 28px);
    border-color: var(--online-service-border, #f4dce4);
    background: linear-gradient(150deg, #fff, var(--online-service-surface, #fff4f6));
    text-align: center;
}

.online-service-art {
    position: relative;
    width: min(100%, 390px);
    height: clamp(142px, 43cqw, 205px);
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 50%, var(--online-service-halo, #ffe7ec), transparent 68%);
}

.online-service-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(210px, 62cqw, 300px);
    height: auto;
    translate: -50% -46%;
}

.online-service h2 {
    font-size: var(--type-detail-title);
    line-height: 1.15;
    letter-spacing: var(--tracking-heading);
}

.online-service-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .65em;
    width: min(100%, 330px);
    min-height: clamp(44px, 11cqw, 60px);
    padding: .55em 1.25em;
    border-radius: 999px;
    background: var(--online-service-button, linear-gradient(#cc385a, #aa2049));
    box-shadow: 0 4px 10px var(--online-service-shadow, #a3224933);
    color: #fff;
    font-size: var(--type-card);
    font-weight: var(--weight-bold);
}

.dukcapil-detail[data-service="spmb"] {
    --online-service-border: #d6e8fb;
    --online-service-surface: #f1f8ff;
    --online-service-halo: #e1f2fe;
    --online-service-button: linear-gradient(#117cf4, #0051d7);
    --online-service-shadow: #1256a742;
}

.dukcapil-detail[data-service="spmb"] .dukcapil-detail-hero { min-height: auto; }
.dukcapil-detail[data-service="spmb"] .dukcapil-detail-hero-copy { max-width: 100%; }
.dukcapil-detail[data-service="spmb"] .dukcapil-detail-hero-icon .icon { width: 80%; height: 80%; color: #0069e5; }
.dukcapil-detail[data-service="spmb"] .online-service-logo { width: min(88%, 330px); translate: -50% -50%; }

@media (hover: hover) {
    .dukcapil-card:hover, .dukcapil-help-button:hover, .online-service-link:hover { filter: brightness(.97); }
}

.blue { --card-bg: #ebf5fc; --card-edge: #e0effb; }
.pink { --card-bg: #faedf6; --card-edge: #f9e1f0; }
.amber { --card-bg: #fbf5e9; --card-edge: #fbefd9; }
.mint { --card-bg: #e3f7f2; --card-edge: #d5f4ed; }
.lavender { --card-bg: #f5ecfd; --card-edge: #f4e9fd; }
.violet { --card-bg: #eeedfc; --card-edge: #e8e7fb; }
.sky { --card-bg: #e4f3fd; --card-edge: #d9edfc; }
.green { --card-bg: #e3f6ee; --card-edge: #d9f2e8; }
.rose { --card-bg: #faedf4; --card-edge: #f9e0ed; }

.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(17 * var(--u)); margin: calc(24 * var(--u)) calc(29 * var(--u)) 0; }
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(138 * var(--u));
    gap: calc(2 * var(--u));
    padding: calc(8 * var(--u)) calc(3 * var(--u));
    border-radius: calc(21 * var(--u));
    background: #f9fbfd;
    box-shadow: 0 calc(5 * var(--u)) calc(12 * var(--u)) #224b8c22;
    font-size: var(--type-tile);
    line-height: 1.06;
    letter-spacing: -.025em;
}

.quick-icon { width: calc(77 * var(--u)); border-radius: 50%; }
.population-page main { padding-bottom: calc(186 * var(--u) + env(safe-area-inset-bottom)); }

.category-badge {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: #0750cd;
    background: var(--card-bg, #eaf3ff);
}

.category-badge img { width: 100%; height: 100%; object-fit: cover; }
.category-badge .icon { width: 61%; height: 61%; }
.category-badge.blue { color: #087cf4; }
.category-badge.indigo { color: #0874f6; }
.category-badge.amber { color: #ac6509; }
.category-badge.mint { color: #42a914; }
.category-badge.green { color: #2cae16; }
.category-badge.violet { color: #743ab3; }
.category-badge.rose, .category-badge.red { color: #f6374c; }
.category-badge.sky { color: #365f85; }

.category-badge:is(.service-icon, .category-card-icon) {
    position: relative;
    border: 1px solid #fff;
    background: linear-gradient(150deg, #fff9, #fff0 70%), var(--card-bg, #eaf3ff);
    box-shadow: inset 0 1px 0 #fff, 0 3px 9px #284a7007;
}
.category-badge:is(.service-icon, .category-card-icon)::after {
    content: '';
    position: absolute;
    inset: 1px 4px 48%;
    border-radius: 50%;
    background: linear-gradient(#ffffff5c, #ffffff00);
    pointer-events: none;
}
.indigo { --card-bg: #e7effc; --card-edge: #dce8fa; }
.red { --card-bg: #fae9eb; --card-edge: #f7dfe3; }

.directory-page main { padding-bottom: calc(186 * var(--u) + 24px + env(safe-area-inset-bottom)); }

.directory-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    min-height: calc(280 * var(--u));
    padding: clamp(22px, 5.9cqw, 38px) clamp(16px, 6cqw, 38px) clamp(38px, 8cqw, 55px);
    border-radius: 0 0 calc(26 * var(--u)) calc(26 * var(--u));
    background: linear-gradient(120deg, #0741a5, #0066cd 56%, #0089db);
    color: #fff;
}

.directory-hero::after {
    position: absolute;
    z-index: -1;
    right: -10%;
    bottom: -49%;
    width: 56%;
    aspect-ratio: 1;
    border: 1px solid #ffffff36;
    border-radius: 50%;
    box-shadow: 0 0 0 18px #ffffff17, 0 0 0 38px #ffffff12;
    content: '';
}

.directory-hero-copy { min-width: 0; }
.directory-eyebrow { margin-bottom: 6px; color: #d4edff; font-size: var(--type-label); font-weight: var(--weight-label); }
.directory-hero h1 { font-size: var(--type-page-title); line-height: 1.03; letter-spacing: var(--tracking-page); }
.directory-hero h1 + p { max-width: 34ch; margin-top: 8px; font-size: var(--type-hero-copy); line-height: 1.25; }
.directory-hero-icon { width: clamp(53px, 17cqw, 112px); aspect-ratio: 1; box-shadow: 0 0 0 5px #ffffff26; }

.directory-page .search { margin: -24px clamp(12px, 4cqw, 26px) 0; min-height: clamp(46px, 9.7cqw, 62px); }
.directory-page .search .icon { font-size: clamp(22px, 5cqw, 31px); }
.directory-section { margin: clamp(20px, 5.3cqw, 32px) clamp(12px, 4cqw, 26px) 0; }
.directory-section h2 { margin-bottom: 12px; font-size: var(--type-section); font-weight: var(--weight-section); letter-spacing: var(--tracking-heading); }
.directory-hint { margin: -5px 0 15px; color: #475675; font-size: var(--type-body); line-height: 1.45; }
.directory-list {
    --directory-icon-size: min(60px, calc(113 * var(--u)));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}
.directory-entry { border: 1px solid var(--card-edge, #dbeaf8); border-radius: 16px; background: linear-gradient(145deg, #ffffff80, #ffffff00 85%), var(--card-bg, #eef6fd); box-shadow: inset 0 1px 0 #fff; }

.directory-row {
    display: grid;
    grid-template-columns: var(--directory-icon-size) minmax(0, 1fr) 16px;
    align-items: center;
    gap: 10px;
    min-height: 55px;
    padding: 9px 11px;
    cursor: pointer;
    font-size: var(--type-card);
    text-align: left;
}

summary.directory-row {
    min-height: 63px;
    list-style: none;
    line-height: 1.2;
}
.directory-row strong { font-weight: var(--weight-heading); }
summary.directory-row::-webkit-details-marker { display: none; }
.directory-row > .icon { color: #34547c; }
.directory-entry[open] summary > .icon { transform: rotate(90deg); }

.directory-marker {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    color: #0a4fab;
    background: #fff9;
}

.directory-marker .icon { width: 24px; height: 24px; }
.directory-row .service-icon { width: 100%; }
.directory-card-copy { display: grid; gap: 4px; }
.directory-card-copy > span { color: #475675; font-size: var(--type-body); line-height: 1.28; }
.directory-detail { padding: 0 15px 14px calc(var(--directory-icon-size) + 21px); font-size: var(--type-body); line-height: 1.5; }
.directory-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; color: #064bbd; font-size: var(--type-action); font-weight: var(--weight-bold); text-decoration: underline; }

.directory-list.directory-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.category-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(10px, 3cqw, 16px);
    min-height: 124px;
    border: 1px solid #e1ebf480;
    border-radius: 18px;
    overflow-wrap: anywhere;
}

.category-card-icon { width: clamp(42px, 11cqw, 56px); aspect-ratio: 1; }

.category-card .directory-card-copy { gap: 8px; }
.category-card strong { font-size: var(--type-card); line-height: 1.2; font-weight: var(--weight-heading); }
.category-card .directory-card-copy > span { line-height: 1.35; }

@media (hover: hover) {
    .category-card:hover { filter: brightness(.97); }
}

.bottom-nav {
    position: fixed;
    z-index: 2;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(100%, var(--portal-width));
    min-height: calc(131 * var(--u) + env(safe-area-inset-bottom));
    padding: calc(18 * var(--u)) calc(9 * var(--u)) env(safe-area-inset-bottom);
    border-radius: calc(25 * var(--u)) calc(25 * var(--u)) 0 0;
    border: 1px solid #fff;
    background: linear-gradient(170deg, #fffffffa, #f4f8fef7);
    box-shadow: 0 -3px 18px #21448008, inset 0 1px 0 #fff;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(9 * var(--u));
    height: fit-content;
    color: #2e4777;
    font-size: var(--type-label);
    font-weight: var(--weight-label);
    line-height: 1.1;
}

.nav-item .icon { font-size: calc(49 * var(--u)); }
.nav-item.active { color: var(--blue); font-weight: var(--weight-bold); }
.nav-item.active::after { content: ''; width: calc(75 * var(--u)); height: calc(7 * var(--u)); margin-top: calc(7 * var(--u)); border-radius: 99px; background: var(--blue); }
.nav-item.report .nav-icon {
    position: absolute;
    top: calc(-48 * var(--u));
    display: grid;
    place-items: center;
    width: calc(106 * var(--u));
    height: calc(106 * var(--u));
    border-radius: 50%;
    color: #fff;
    border: 2px solid #fff;
    background: linear-gradient(155deg, #54a0ff 0%, #1765ef 44%, #0650d9 100%);
    box-shadow: 0 4px 10px #0b61df26, inset 0 1px 1px #ffffff90;
}

.nav-item.report { padding-top: calc(58 * var(--u)); }
.nav-item.report .icon { font-size: calc(52 * var(--u)); transform: rotate(-7deg); }
.population-page .nav-item:not(.active) { color: #101c52; }

@media (max-width: 599px) {
    html { scrollbar-width: none; }

    /* Keep the familiar four-column layout with readable type and lighter surfaces. */
    .portal {
        box-shadow: none;
        --weight-section: 650;
        --weight-card: 650;
        --type-page-title: clamp(1.25rem, 5.3cqw, 1.7rem);
        --type-section: clamp(1.125rem, calc(36 * var(--u)), 1.5625rem);
        --type-teaser: clamp(.9375rem, 3.65cqw, 1.25rem);
        --type-tile: clamp(.75rem, 2.92cqw, 1.1875rem);
        --type-label: max(.75rem, calc(24 * var(--u)));
        --type-hero-copy: .8125rem;
        --type-action: max(.8125rem, calc(25 * var(--u)));
        --type-meta: max(.75rem, calc(22 * var(--u)));
        --type-input: 1rem;
    }
    main, .population-page main, .directory-page main {
        padding-bottom: calc(112px + env(safe-area-inset-bottom));
    }
    .home-hero { border-radius: 0 0 26px 26px; }
    .home-hero h1 { font-size: clamp(1rem, 4.55cqw, 1.7rem); }
    .search, .population-page .search, .directory-page .search {
        min-height: 50px;
        padding-inline: 18px;
        gap: 12px;
    }
    .search .icon, .directory-page .search .icon { font-size: 21px; }
    .search input, .population-page .search input {
        min-height: 48px;
        letter-spacing: -.015em;
    }
    .search input::placeholder { color: #53677f; }
    .home-services { margin: 22px 12px 0; }
    .service-grid { gap: 18px 6px; }
    .service-item { gap: 7px; }
    .service-item > span:last-child { max-width: 100%; overflow-wrap: anywhere; }
    .service-icon { width: clamp(44px, 12.8cqw, 64px); }
    .highlights { margin: 24px 15px 0; }
    .tourism-banner { border-radius: 20px; min-height: 145px; }
    .tourism-banner::after {
        content: '';
        position: absolute;
        z-index: -1;
        inset: 0;
        background: linear-gradient(90deg, #e4f0ff 4%, #e4f0ffed 35%, #e4f0ff00 76%);
        pointer-events: none;
    }
    .tourism-photo { width: 72%; object-fit: cover; object-position: right; }
    .banner-copy { max-width: 72%; padding: 15px 0 15px 18px; }
    .banner-copy h2 { line-height: 1.1; }
    .banner-copy h2 strong { font-size: 1.375rem; font-weight: var(--weight-heading); }
    .banner-copy p { margin: 8px 0 10px; line-height: 1.3; }
    .pill-link {
        min-height: 36px;
        padding: 8px 14px;
        border: 1px solid #fff;
        background: linear-gradient(#fff, #f5faff);
        box-shadow: 0 2px 6px #124d9409;
    }
    .carousel-dots { margin-top: 6px; gap: 0; }
    .carousel-dots button { min-width: 28px; height: 28px; }
    .carousel-dots button::after { width: 6px; height: 6px; }
    .carousel-dots button[aria-pressed="true"]::after { width: 18px; }
    .news { margin: 18px 18px 0; }
    .section-heading { margin-bottom: 16px; }
    .text-link { min-height: 36px; white-space: nowrap; }
    .news .empty-state {
        margin: 0;
        padding: 22px 12px;
        border: 1px dashed #dde7f0;
        border-radius: 16px;
        background: #f7faff;
        color: #60748b;
        line-height: 1.5;
    }
    .news-card strong { line-height: 1.35; }
    .news-meta { line-height: 1.4; }
    .page-header { min-height: 66px; gap: 14px; padding: 10px 16px; }
    .back-link { width: 40px; height: 40px; font-size: 22px; border-radius: 14px; box-shadow: 0 2px 8px #2346840c; }
    .header-brand { width: 88px; }
    .notification { width: 44px; height: 44px; font-size: 25px; }
    .population-hero { min-height: 170px; }
    .population-hero-copy { max-width: 57%; padding: 18px 0 36px 18px; }
    .population-hero p { margin-top: 8px; }
    .population-page .search { margin-top: -24px; }
    .dukcapil-section { padding-inline: 12px; }
    .dukcapil-heading { min-height: 54px; gap: 7px; flex-wrap: wrap; padding-block: 8px; }
    .dukcapil-heading-icon { width: 28px; }
    .dukcapil-heading :is(h1, h2) { flex: 1; min-width: 160px; }
    .dukcapil-card { gap: 6px; min-height: 84px; padding: 10px 4px; border-radius: 15px; line-height: 1.2; }
    .dukcapil-card strong { overflow-wrap: anywhere; }
    .dukcapil-card-icon { width: 44px; height: 34px; }
    .dukcapil-innovations { margin-top: 20px; padding-block: 0 14px; border-radius: 22px; }
    .dukcapil-outreach .dukcapil-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .dukcapil-outreach .dukcapil-card { min-height: 90px; padding-top: 10px; }
    .dukcapil-outreach .dukcapil-card-icon { width: 48px; height: 32px; }
    .requirements { min-height: 150px; margin: 18px 12px 0; border-radius: 18px; }
    .requirements-icon { top: 16px; left: 12px; width: 32px; }
    .requirements-copy { max-width: 66%; padding: 15px 0 15px 50px; }
    .requirements h2 { font-size: .9375rem; line-height: 1.2; }
    .requirements p { margin-top: 6px; font-size: .75rem; line-height: 1.4; }
    .requirements .pill-link { margin-top: 10px; padding: 7px 10px; font-size: .75rem; }
    .quick-links { margin: 16px 12px 0; gap: 8px; }
    .quick-link { min-height: 84px; padding: 12px 5px; gap: 7px; border: 1px solid #e7eef6; border-radius: 16px; box-shadow: inset 0 1px 0 #fff; line-height: 1.3; }
    .quick-icon { width: 34px; }
    .dukcapil-help { margin: 20px 12px 0; border-radius: 18px; }
    .dukcapil-help-copy { padding: 14px 12px 14px 0; }
    .dukcapil-help p { margin-top: 6px; line-height: 1.4; }
    .dukcapil-help-button { min-height: 40px; margin-top: 12px; padding: 6px 10px; }
    .directory-hero { border-radius: 0 0 22px 22px; }
    .category-card { border-radius: 18px; padding: 14px; }
    .directory-card-copy > span { line-height: 1.45; }
    .directory-detail { line-height: 1.55; }
    .bottom-nav {
        bottom: calc(8px + env(safe-area-inset-bottom));
        width: min(calc(100% - 20px), 620px);
        min-height: 70px;
        padding: 8px 4px;
        border-radius: 23px;
        box-shadow: 0 4px 20px #234b7c12, inset 0 1px 0 #fff;
    }
    .nav-item { min-height: 46px; gap: 5px; color: #516780; }
    .nav-item .icon { font-size: 23px; }
    .nav-item.active::after { position: absolute; bottom: -5px; width: 22px; height: 3px; margin: 0; }
    .nav-item.report { padding-top: 28px; }
    .nav-item.report .nav-icon { top: -19px; width: 52px; height: 52px; }
    .nav-item.report .icon { font-size: 25px; }
    .population-page .nav-item:not(.active) { color: #516780; }
}

@media (max-width: 359px) {
    .home-services { margin-inline: 8px; }
    .service-grid { column-gap: 0; }
    .dukcapil-card { padding-inline: 3px; }
    .portal { --type-tile: .6875rem; }
}

.portal-dialog {
    width: min(90vw, 410px);
    padding: 24px;
    border: 0;
    border-radius: 20px;
    color: #0c194c;
    background: #fff;
    box-shadow: 0 12px 48px #001c6140;
}

.portal-dialog::backdrop { background: #0d204c70; }
.portal-dialog h2 { margin-right: 25px; font-size: var(--type-detail-title); letter-spacing: var(--tracking-heading); }
.portal-dialog p { margin-top: 12px; font-size: var(--type-body); line-height: 1.5; }
.portal-dialog .dialog-note { color: #546281; font-size: var(--type-meta); }
.dialog-close { position: absolute; top: 11px; right: 11px; padding: 8px; font-size: 1.25rem; }

@media (hover: hover) {
    .service-item:hover, .quick-link:hover, .directory-row:hover { filter: brightness(.97); }
    .text-link:hover, .nav-item:hover, .news-card:hover strong { color: #0044d9; }
    .pill-link:hover { background: #f1f7ff; }
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    :is(.service-item, .quick-link, .directory-row, .category-card, .news-card, .nav-item, .pill-link, .back-link, .notification) {
        transition: scale 130ms ease-out, color 150ms ease-out, background-color 150ms ease-out;
    }

    :is(.service-item, .quick-link, .directory-row, .category-card, .news-card, .nav-item, .pill-link, .back-link, .notification):active {
        scale: .97;
    }

    .search { transition: box-shadow 160ms ease-out; }
    .search:focus-within { box-shadow: 0 0 0 3px #0e65ec19, 0 5px 15px #1039771c; }
    .carousel-dots button::after { transition: width 170ms ease-out, background-color 170ms ease-out; }
    [data-carousel-used] [data-slide]:not([hidden]) { animation: slide-enter 220ms ease-out; }
    [data-carousel-used="previous"] { --slide-entry-offset: -8px; }
    .directory-row > .icon { transition: transform 160ms ease-out; }
    .directory-entry[open] .directory-detail { animation: portal-enter 160ms ease-out; }
    .portal-dialog[open] { animation: portal-enter 160ms ease-out; }

    @supports (transition-behavior: allow-discrete) and (overlay: auto) {
        .portal-dialog {
            opacity: 0;
            translate: 0 8px;
            transition: opacity 170ms ease-out, translate 170ms ease-out, display 170ms allow-discrete, overlay 170ms allow-discrete;
        }

        .portal-dialog[open] {
            opacity: 1;
            translate: 0 0;
            animation: none;
        }

        .portal-dialog::backdrop {
            background-color: transparent;
            transition: background-color 170ms ease-out, display 170ms allow-discrete, overlay 170ms allow-discrete;
        }

        .portal-dialog[open]::backdrop { background-color: #0d204c70; }

        @starting-style {
            .portal-dialog[open] { opacity: 0; translate: 0 8px; }
            .portal-dialog[open]::backdrop { background-color: transparent; }
        }
    }
}

@keyframes portal-enter {
    from { opacity: .88; translate: 0 5px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes slide-enter {
    from { opacity: .72; translate: var(--slide-entry-offset, 8px) 0; }
    to { opacity: 1; translate: 0 0; }
}

.navigation-loader {
    width: min(220px, calc(100vw - 48px));
    margin: auto;
    padding: 20px;
    border: 0;
    color: #526b84;
    background: transparent;
    box-shadow: none;
    text-align: center;
    cursor: progress;
}
.navigation-loader:focus-visible { outline: none; }
.navigation-loader::backdrop { background: #f6faffad; cursor: progress; }
.navigation-loader p { font-size: .875rem; font-weight: 450; line-height: 1.5; letter-spacing: .01em; }
.navigation-spinner {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 auto 14px;
    border: 2.5px solid #0860e814;
    border-top-color: #0860e8b3;
    border-right-color: #0860e84d;
    border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
    .navigation-spinner { animation: navigation-spin 1s linear infinite; }
}
@keyframes navigation-spin { to { transform: rotate(360deg); } }
