:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --ink: #12263a;
    --muted: #4f5d75;
    --primary: #0f4c81;
    --primary-strong: #0a365d;
    --accent: #1f8a70;
    --line: #d9e2ec;
    --danger: #b42318;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #081220;
    --surface: #0e1d2f;
    --ink: #e2ecf8;
    --muted: #a6b8ce;
    --primary: #79aef0;
    --primary-strong: #4c89d1;
    --accent: #58c3a6;
    --line: #2c425a;
    --danger: #ff8f8f;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(31, 138, 112, 0.09), transparent 32%),
        radial-gradient(circle at 90% 4%, rgba(15, 76, 129, 0.14), transparent 35%),
        linear-gradient(180deg, #eef4fb 0%, #f8fbff 42%, #f3f7fb 100%);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-x: clip;
}

html[data-theme="dark"] body {
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(88, 195, 166, 0.1), transparent 30%),
        radial-gradient(circle at 92% 6%, rgba(121, 174, 240, 0.14), transparent 34%),
        linear-gradient(180deg, #081220 0%, #0a1625 44%, #0c1b2d 100%);
}

body.welcome-banner-open {
    overflow: hidden;
}

.site-shell {
    min-height: 100vh;
    transition: filter 0.55s ease, transform 0.55s ease, opacity 0.55s ease;
}

.site-shell.is-welcome-banner-blurred {
    filter: blur(20px) saturate(0.86) brightness(0.98);
    transform: scale(0.986);
    pointer-events: none;
    user-select: none;
}

.site-shell.is-welcome-banner-revealing {
    animation: welcomeHomeReveal 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.welcome-banner-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(11, 36, 61, 0.32), rgba(16, 65, 102, 0.16) 46%, rgba(31, 138, 112, 0.14)),
        radial-gradient(circle at 14% 20%, rgba(15, 76, 129, 0.25), transparent 32%),
        radial-gradient(circle at 84% 18%, rgba(245, 158, 11, 0.18), transparent 24%),
        radial-gradient(circle at 72% 78%, rgba(31, 138, 112, 0.2), transparent 26%),
        rgba(7, 18, 30, 0.2);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.42s ease, visibility 0.42s ease;
    cursor: pointer;
}

.welcome-banner-overlay::before,
.welcome-banner-overlay::after,
.welcome-banner-dialog::before,
.welcome-banner-dialog::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.welcome-banner-overlay::before {
    width: clamp(240px, 34vw, 420px);
    height: clamp(240px, 34vw, 420px);
    top: 4%;
    left: -6%;
    border-radius: 38% 62% 60% 40% / 38% 35% 65% 62%;
    background:
        radial-gradient(circle at 30% 30%, rgba(129, 191, 255, 0.7), rgba(15, 76, 129, 0.28) 42%, transparent 76%);
    filter: blur(10px);
    opacity: 0.85;
    animation: welcomeOrbFloat 11s ease-in-out infinite alternate;
}

.welcome-banner-overlay::after {
    width: clamp(220px, 28vw, 340px);
    height: clamp(220px, 28vw, 340px);
    right: -5%;
    bottom: 6%;
    border-radius: 62% 38% 48% 52% / 54% 38% 62% 46%;
    background:
        radial-gradient(circle at 42% 42%, rgba(250, 204, 108, 0.58), rgba(245, 158, 11, 0.24) 44%, transparent 74%);
    filter: blur(8px);
    opacity: 0.8;
    animation: welcomeOrbFloat 13s ease-in-out infinite alternate-reverse;
}

.welcome-banner-overlay.is-visible,
.welcome-banner-overlay.is-leaving {
    visibility: visible;
}

.welcome-banner-overlay.is-visible {
    opacity: 1;
}

.welcome-banner-overlay.is-leaving {
    opacity: 0;
}

.welcome-banner-dialog {
    width: min(980px, calc(100vw - 2rem));
    position: relative;
    display: grid;
    justify-items: center;
    perspective: 2200px;
    transform-style: preserve-3d;
    isolation: isolate;
    opacity: 0;
    outline: none;
    will-change: transform, opacity;
}

.welcome-banner-dialog::before {
    width: clamp(140px, 24vw, 260px);
    height: clamp(140px, 24vw, 260px);
    top: -12%;
    right: 3%;
    z-index: 0;
    border-radius: 28px;
    border: 1px solid rgba(198, 226, 255, 0.34);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: rotate(18deg);
    backdrop-filter: blur(10px);
}

.welcome-banner-dialog::after {
    width: clamp(170px, 26vw, 300px);
    height: clamp(110px, 18vw, 180px);
    left: 1%;
    bottom: -16%;
    z-index: 0;
    border-radius: 999px;
    border: 1px dashed rgba(31, 138, 112, 0.42);
    background:
        radial-gradient(circle at 30% 50%, rgba(31, 138, 112, 0.18), transparent 66%);
    transform: rotate(-14deg);
}

.welcome-banner-overlay.is-visible .welcome-banner-dialog {
    opacity: 1;
    animation: welcomeBannerFlyIn 1.16s cubic-bezier(0.16, 0.9, 0.24, 1.08) both;
}

.welcome-banner-overlay.is-leaving .welcome-banner-dialog {
    opacity: 1;
    animation: welcomeBannerZoomIntoHome 0.78s cubic-bezier(0.24, 0.12, 0.18, 1) both;
}

.welcome-banner-card {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    border-radius: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 36px 100px rgba(7, 24, 43, 0.36),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04));
    transform-style: preserve-3d;
}

.welcome-banner-card::before,
.welcome-banner-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.welcome-banner-card::before {
    inset: 0;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%, transparent 78%, rgba(7, 24, 43, 0.09));
    mix-blend-mode: screen;
    opacity: 0.9;
}

.welcome-banner-card::after {
    inset: -18% auto -18% -34%;
    width: 34%;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 24%,
        rgba(255, 255, 255, 0.72) 49%,
        rgba(255, 255, 255, 0.14) 72%,
        rgba(255, 255, 255, 0) 100%
    );
    filter: blur(1px);
    mix-blend-mode: screen;
    opacity: 0;
    transform: translate3d(-165%, 0, 0) rotate(8deg);
}

.welcome-banner-overlay.is-visible .welcome-banner-card::after {
    animation: welcomeBannerSheen 1.2s cubic-bezier(0.22, 0.76, 0.22, 1) 1.02s both;
}

.welcome-banner-overlay.is-leaving .welcome-banner-card::after {
    animation: none;
    opacity: 0;
}

.welcome-banner-image {
    display: block;
    width: 100%;
    aspect-ratio: 10 / 2.5;
    object-fit: cover;
}

html[data-theme="dark"] .welcome-banner-overlay {
    background:
        linear-gradient(135deg, rgba(2, 9, 17, 0.68), rgba(8, 31, 53, 0.52) 44%, rgba(6, 44, 39, 0.42)),
        radial-gradient(circle at 16% 18%, rgba(121, 174, 240, 0.22), transparent 30%),
        radial-gradient(circle at 84% 18%, rgba(245, 158, 11, 0.16), transparent 22%),
        radial-gradient(circle at 68% 76%, rgba(88, 195, 166, 0.18), transparent 24%),
        rgba(3, 10, 18, 0.42);
}

html[data-theme="dark"] .welcome-banner-card {
    border-color: rgba(141, 177, 216, 0.3);
    background:
        linear-gradient(135deg, rgba(9, 22, 37, 0.34), rgba(9, 22, 37, 0.14));
    box-shadow:
        0 36px 100px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(190, 220, 255, 0.08) inset;
}

html[data-theme="dark"] .welcome-banner-card::before {
    background:
        radial-gradient(circle at 16% 18%, rgba(205, 227, 255, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(205, 227, 255, 0.05), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.18));
}

html[data-theme="dark"] .welcome-banner-card::after {
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(193, 225, 255, 0.08) 24%,
        rgba(215, 236, 255, 0.58) 49%,
        rgba(163, 220, 255, 0.12) 72%,
        rgba(255, 255, 255, 0) 100%
    );
}

html[data-theme="dark"] .welcome-banner-dialog::before {
    border-color: rgba(142, 178, 216, 0.26);
    background:
        linear-gradient(135deg, rgba(16, 40, 62, 0.4), rgba(16, 40, 62, 0.12));
    box-shadow: inset 0 0 0 1px rgba(194, 221, 255, 0.06);
}

html[data-theme="dark"] .welcome-banner-dialog::after {
    border-color: rgba(88, 195, 166, 0.32);
    background:
        radial-gradient(circle at 30% 50%, rgba(88, 195, 166, 0.16), transparent 66%);
}

@keyframes welcomeBannerFlyIn {
    0% {
        opacity: 0;
        transform: perspective(2200px) translate3d(0, -18vh, -820px) rotateX(78deg) rotateY(-22deg) rotateZ(8deg) scale(0.28);
    }
    38% {
        opacity: 1;
        transform: perspective(2200px) translate3d(0, 1.4vh, 140px) rotateX(-18deg) rotateY(12deg) rotateZ(-3deg) scale(1.06);
    }
    64% {
        transform: perspective(2200px) translate3d(0, -0.7vh, 42px) rotateX(7deg) rotateY(-5deg) rotateZ(1deg) scale(0.992);
    }
    82% {
        transform: perspective(2200px) translate3d(0, 0.14vh, 12px) rotateX(-2deg) rotateY(1deg) rotateZ(0) scale(1.008);
    }
    100% {
        opacity: 1;
        transform: perspective(2200px) translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0) scale(1);
    }
}

@keyframes welcomeBannerZoomIntoHome {
    0% {
        opacity: 1;
        transform: perspective(2200px) translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0) scale(1);
    }
    34% {
        opacity: 1;
        transform: perspective(2200px) translate3d(0, -0.2vh, 36px) rotateX(1deg) rotateY(-1deg) rotateZ(0) scale(1.04);
    }
    62% {
        opacity: 0.92;
        transform: perspective(2200px) translate3d(0, 0.6vh, 118px) rotateX(-6deg) rotateY(2deg) rotateZ(-0.4deg) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: perspective(2200px) translate3d(0, 1.6vh, 240px) rotateX(-11deg) rotateY(4deg) rotateZ(-0.8deg) scale(1.17);
    }
}

@keyframes welcomeBannerSheen {
    0% {
        opacity: 0;
        transform: translate3d(-165%, 0, 0) rotate(8deg);
    }
    12% {
        opacity: 0.92;
    }
    70% {
        opacity: 0.52;
    }
    100% {
        opacity: 0;
        transform: translate3d(430%, 0, 0) rotate(8deg);
    }
}

@keyframes welcomeHomeReveal {
    0% {
        filter: blur(13px) saturate(0.94) brightness(0.98);
        transform: scale(1.024);
    }
    56% {
        filter: blur(2.4px) saturate(1.01) brightness(1);
        transform: scale(1.007);
    }
    100% {
        filter: none;
        transform: scale(1);
    }
}

@keyframes welcomeOrbFloat {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(16px, -18px, 0) rotate(12deg);
    }
}

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

.container {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.15rem;
    padding: 0.95rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    transition: transform 0.18s ease;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand small {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
}

.brand-secret-active {
    transform: scale(0.98);
}

.brand-secret-active img {
    animation: brandPulse 0.22s ease;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #ccdae8;
    background: #fff;
    border-radius: 0.68rem;
    padding: 0.44rem 0.62rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
    background: #edf4fb;
    border-color: #b5cbe0;
}

.nav-toggle-lines {
    display: inline-flex;
    flex-direction: column;
    gap: 0.18rem;
}

.nav-toggle-text {
    line-height: 1;
}

.nav-toggle-lines span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle-lines span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-lines span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle-lines span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
}

.menu > li > a,
.menu > li > button {
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 0.93rem;
    color: var(--ink);
    cursor: pointer;
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    transition: background-color 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.menu > li > a:hover,
.menu > li > button:hover,
.menu > li > a.active,
.menu > li > button.active {
    background: #edf4fb;
    color: var(--primary);
}

.menu > li > a:hover,
.menu > li > button:hover {
    transform: translateY(-1px);
}

.has-dropdown {
    position: relative;
}

.menu > li.has-dropdown > button {
    position: relative;
    padding-right: 1.6rem;
}

.menu > li.has-dropdown > button::after {
    content: "";
    position: absolute;
    right: 0.62rem;
    top: 50%;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.2s ease;
}

.menu > li.has-dropdown.open > button::after,
.menu > li.has-dropdown > button[aria-expanded="true"]::after {
    transform: translateY(-35%) rotate(-135deg);
}

.dropdown {
    display: none;
    position: absolute;
    min-width: 230px;
    top: calc(100% + 0.35rem);
    left: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    box-shadow: 0 16px 32px rgba(18, 38, 58, 0.1);
    padding: 0.4rem;
}

.dropdown a {
    display: block;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.dropdown a:hover,
.dropdown a.active {
    background: #edf4fb;
    color: var(--primary);
}

.dropdown a:hover {
    transform: translateX(3px);
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid #c8d8e8;
    background: #ffffff;
    color: #1b4466;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: #9cbde0;
    background: #eef5ff;
}

.theme-toggle:focus-visible {
    outline: 2px solid #87afe0;
    outline-offset: 2px;
}

.theme-toggle-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.theme-toggle-icon svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle .sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle .moon {
    display: inline-flex;
}

.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 120;
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    background: linear-gradient(90deg, #0f4c81 0%, #1f8a70 100%);
    transition: transform 0.22s ease-out, opacity 0.2s ease-out;
}

.page-progress.is-active {
    opacity: 1;
}

.page-progress.is-complete {
    opacity: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

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

.btn.is-loading {
    pointer-events: none;
    opacity: 0.88;
}

.btn-spinner {
    width: 0.86rem;
    height: 0.86rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

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

.btn-outline {
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
}

.btn-copy-inline {
    padding: 0.34rem 0.58rem;
    font-size: 0.78rem;
    line-height: 1.1;
}

.copy-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 120;
    border-radius: 0.66rem;
    border: 1px solid #b7dfcc;
    background: #e9f8ef;
    color: #115731;
    padding: 0.55rem 0.7rem;
    font-size: 0.83rem;
    box-shadow: 0 10px 18px rgba(10, 41, 27, 0.14);
}

.result-card.loading {
    display: flex;
    align-items: center;
    gap: 0.48rem;
}

.result-card.loading::before {
    content: "";
    width: 0.88rem;
    height: 0.88rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin 0.7s linear infinite;
}

.btn-danger {
    background: #fef3f2;
    color: var(--danger);
    border-color: #fecdca;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.page {
    padding: 2rem 0 3rem;
    flex: 1;
    overflow-x: hidden;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes brandPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.hero {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: linear-gradient(135deg, #0f4c81 0%, #16699f 55%, #1f8a70 100%);
    color: #fff;
    padding: 2.1rem;
    margin-bottom: 1.5rem;
}

.hero h1 {
    margin: 0 0 0.6rem;
    font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.hero p {
    margin: 0;
    opacity: 0.92;
    max-width: 740px;
    line-height: 1.68;
}

.hero-premium {
    padding: clamp(1.9rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
}

.hero-branding {
    margin: 0 auto;
    max-width: 920px;
    padding: 0;
}

.hero-kicker {
    margin: 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: #d8ecff;
    font-weight: 600;
}

.hero-kicker::after {
    content: "";
    display: block;
    width: 84px;
    height: 2px;
    margin: 0.56rem auto 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(216, 236, 255, 0.08) 0%,
        rgba(216, 236, 255, 0.95) 50%,
        rgba(216, 236, 255, 0.08) 100%
    );
}

.hero-premium h1 {
    margin: 0.68rem 0 0;
    line-height: 1.02;
}

.hero-name {
    display: inline-block;
    font-size: clamp(2.1rem, 6vw, 4rem);
    letter-spacing: 0.09em;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 12px 26px rgba(2, 16, 34, 0.48);
}

.hero-lead {
    margin-top: 0.78rem !important;
    max-width: 780px;
    font-size: clamp(0.95rem, 1.8vw, 1.06rem);
    line-height: 1.74;
    color: #e4f1ff;
}

.hero-with-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(125deg, rgba(7, 34, 60, 0.9), rgba(13, 67, 108, 0.82));
}

.hero-with-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.34;
    transform: scale(1.08);
}

.hero-with-image > * {
    position: relative;
    z-index: 1;
}

.hero-centered {
    text-align: center;
}

.hero-centered p {
    margin-inline: auto;
}

.hero-meta {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-centered .hero-meta {
    justify-content: center;
}

.hero-meta span {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(9, 31, 51, 0.36);
}

.interactive-card {
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.interactive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(15, 76, 129, 0.1);
    border-color: #b4cde5;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.4rem 0 0.8rem;
    gap: 0.75rem;
}

.section-title h2 {
    margin: 0;
    font-size: 1.25rem;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.home-insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.4rem;
}

.home-insight-grid > *,
.summary-grid > *,
.chart-grid > *,
.service-layout > *,
.list > * {
    min-width: 0;
}

.insight-card {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: #fff;
    padding: 0.85rem;
}

.insight-card h3 {
    margin: 0 0 0.6rem;
    font-size: 0.98rem;
}

.insight-card canvas {
    width: 100% !important;
    max-height: 220px;
}

.service-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.3rem;
}

.service-action {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: #fff;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--primary);
    transition: background-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.service-action:hover {
    background: #edf4fb;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 76, 129, 0.08);
}

.service-tone-ocean {
    background: linear-gradient(145deg, #f8fbff 0%, #e6f1fb 100%);
    border-color: #c4d9ed;
}

.service-tone-teal {
    background: linear-gradient(145deg, #f4fcfb 0%, #ddf4ed 100%);
    border-color: #bbdecf;
}

.service-tone-amber {
    background: linear-gradient(145deg, #fffaf1 0%, #fcebd4 100%);
    border-color: #efd3a5;
}

.service-tone-ocean .service-icon {
    background: #e7f1fb;
}

.service-tone-teal .service-icon {
    background: #e3f5ef;
    color: #14604e;
}

.service-tone-amber .service-icon {
    background: #fff1dc;
    color: #7b520d;
}

.service-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4fb;
}

.service-icon svg {
    width: 20px;
    height: 20px;
}

.news-highlight {
    margin-top: 0.6rem;
}

.news-carousel {
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
    --news-visible: 3;
    position: relative;
    touch-action: pan-y;
}

.news-track {
    display: flex;
    gap: 0.8rem;
    padding: 0.85rem;
    transition: transform 0.55s ease;
    will-change: transform;
}

.news-nav {
    position: absolute;
    top: calc(50% - 22px);
    width: 36px;
    height: 36px;
    border: 1px solid #bdd2e5;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 8px 18px rgba(15, 76, 129, 0.18);
}

.news-nav svg {
    width: 18px;
    height: 18px;
}

.news-nav:hover {
    background: #edf4fb;
}

.news-nav-prev {
    left: 0.45rem;
}

.news-nav-next {
    right: 0.45rem;
}

.news-slide {
    flex: 0 0 calc((100% - (0.8rem * (var(--news-visible) - 1))) / var(--news-visible));
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    min-height: 210px;
}

.news-slide-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.65rem;
    object-fit: cover;
    margin-bottom: 0.62rem;
}

.news-slide-date {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.news-slide h3 {
    margin: 0 0 0.45rem;
}

.news-slide p {
    margin: 0 0 0.55rem;
    color: var(--muted);
}

.news-slide a {
    color: var(--primary);
    font-weight: 600;
    margin-top: auto;
}

.news-dots {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    padding: 0 0 0.8rem;
}

.news-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: #b9c7d6;
    cursor: pointer;
}

.news-dots button.active {
    width: 22px;
    background: var(--primary);
}

.list {
    display: grid;
    gap: 0.8rem;
}

.announcement-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.list-pagination {
    margin-top: 0.95rem;
    display: flex;
    justify-content: center;
}

.pager-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    background: #fff;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.4rem 0.68rem;
}

.pager-link:hover {
    background: #edf4fb;
    color: var(--primary);
}

.pager-link.is-disabled {
    opacity: 0.55;
    background: #f6f9fd;
    pointer-events: none;
}

.pager-meta {
    font-size: 0.84rem;
    color: var(--muted);
    padding: 0 0.24rem;
}

.list-item {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: var(--surface);
    padding: 1rem;
}

.list-item h3 {
    margin: 0 0 0.45rem;
    font-size: 1.04rem;
}

.list-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.announcement-list-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.announcement-thumb {
    width: 56px;
    height: 56px;
    border-radius: 0.8rem;
    object-fit: contain;
    padding: 0.52rem;
    border: 1px solid #d7e4f0;
    background: #f6faff;
    flex-shrink: 0;
}

.announcement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.62rem;
}

.announcement-readmore {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

.announcement-readmore.external {
    color: var(--accent);
}

.news-list-item {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 0.92rem;
    align-items: start;
}

.news-list-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.72rem;
    object-fit: cover;
}

.news-detail-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.9rem;
    margin-bottom: 0.9rem;
}

.reader-article {
    background: #fff;
    border: 1px solid #dde6f0;
    border-radius: 1rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 12px 28px rgba(15, 47, 77, 0.08);
}

.reader-header {
    margin-bottom: 0.8rem;
}

.reader-kicker {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.reader-header h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.45rem, 2.7vw, 2.05rem);
    line-height: 1.28;
}

.reader-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.reader-excerpt {
    margin: 0.65rem 0 0;
    color: #35536d;
    font-size: 1rem;
    line-height: 1.72;
    background: #f7fbff;
    border-left: 4px solid #c2d9ef;
    border-radius: 0.6rem;
    padding: 0.66rem 0.78rem;
}

.reader-share-panel {
    margin-top: 0.95rem;
}

.reader-share-shell {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
}

.reader-share-inline-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #3a5d79;
    font-size: 0.88rem;
    font-weight: 600;
}

.reader-share-inline-label i {
    font-size: 0.84rem;
    opacity: 0.88;
}

.reader-share-trigger {
    appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #cfe0ee;
    background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
    color: #214d73;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(16, 46, 75, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.reader-share-trigger i {
    font-size: 0.86rem;
    line-height: 1;
}

.reader-share-trigger:hover,
.reader-share-trigger.is-open {
    transform: translateY(-1px);
    border-color: #9fc0dd;
    background: #f6fbff;
    box-shadow: 0 14px 24px rgba(16, 46, 75, 0.1);
}

.reader-share-popover {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 12;
    width: min(310px, calc(100vw - 2rem));
    padding: 0.8rem;
    border: 1px solid #d9e7f3;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, rgba(247, 251, 255, 0.98), rgba(238, 246, 252, 0.95));
    box-shadow: 0 18px 42px rgba(16, 46, 75, 0.14);
}

.reader-share-popover[hidden] {
    display: none !important;
}

.reader-share-panel.is-open .reader-share-popover {
    animation: sharePopoverIn 0.2s ease both;
}

.reader-share-header {
    margin-bottom: 0.7rem;
}

.reader-share-kicker {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2c678f;
}

.reader-share-title {
    margin: 0;
    font-size: 0.96rem;
    color: #17324d;
}

.reader-share-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.48rem;
}

.reader-share-btn {
    appearance: none;
    border: 1px solid #cddfee;
    border-radius: 0.82rem;
    background: #fff;
    color: #17324d;
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    min-height: 64px;
    padding: 0.55rem 0.35rem;
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.reader-share-btn i {
    font-size: 1rem;
    line-height: 1;
}

.reader-share-btn:hover {
    transform: translateY(-1px);
    border-color: #9fc0dd;
    background: #f8fbff;
    box-shadow: 0 12px 22px rgba(16, 46, 75, 0.08);
}

.reader-share-btn.share-whatsapp {
    color: #18794e;
}

.reader-share-btn.share-facebook {
    color: #1a56b5;
}

.reader-share-btn.share-x {
    color: #0f1720;
}

.reader-share-btn.share-email {
    color: #8a5a10;
}

.reader-share-btn.share-copy {
    color: var(--primary);
}

@keyframes sharePopoverIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reader-content {
    margin-top: 1rem;
}

.reader-content p {
    margin: 0 0 1rem;
    line-height: 1.88;
    color: #183247;
    white-space: normal;
}

.reader-content p:last-child {
    margin-bottom: 0;
}

.announcement-detail-link {
    margin-top: 1.05rem;
}

.gallery-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.6rem;
}

.gallery-carousel {
    --gallery-visible: 3;
}

.gallery-carousel .news-slide {
    flex: 0 0 calc((100% - (0.8rem * (var(--gallery-visible) - 1))) / var(--gallery-visible));
    min-height: 242px;
}

.gallery-slide-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.gallery-slide-thumb {
    max-height: 150px;
}

.gallery-slide .news-slide-date {
    color: #2c668f;
}

.gallery-slide p {
    margin-bottom: 0.4rem;
}

.gallery-slide-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

.gallery-mini-item {
    border: 1px solid var(--line);
    border-radius: 0.78rem;
    overflow: hidden;
    background: var(--surface);
}

.gallery-mini-item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.gallery-mini-item .meta {
    padding: 0.52rem 0.65rem;
    font-size: 0.84rem;
}

.activity-mini-card {
    border-radius: 0.82rem;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.activity-mini-card img {
    aspect-ratio: 16 / 9;
    max-height: 132px;
}

.activity-mini-card .meta {
    padding: 0.58rem 0.7rem;
}

.activity-mini-card .meta strong {
    display: block;
    font-size: 0.87rem;
    line-height: 1.45;
    color: #20415f;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.gallery-item {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    overflow: hidden;
    background: var(--surface);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.gallery-item .meta {
    padding: 0.8rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
}

.news-card {
    border: 1px solid var(--line);
    border-radius: 0.82rem;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    padding: 0.8rem 0.85rem;
}

.news-card h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.news-card p {
    margin: 0 0 0.4rem;
    font-size: 0.86rem;
    color: var(--muted);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.summary-card {
    border: 1px solid var(--line);
    border-radius: 0.82rem;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    padding: 0.85rem;
}

.summary-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

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

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.chart-card {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: #fff;
    padding: 0.85rem;
}

.chart-card-wide {
    grid-column: 1 / -1;
}

.chart-card h3 {
    margin: 0 0 0.6rem;
    font-size: 0.98rem;
}

.chart-card canvas {
    width: 100% !important;
    max-height: 280px;
    display: block;
}

.chart-card canvas.chart-canvas-tall {
    max-height: 360px;
}

.summary-note-card {
    border: 1px solid var(--line);
    border-radius: 0.88rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    padding: 0.92rem 0.98rem;
}

.summary-note-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
}

.summary-note-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.68;
    font-size: 0.9rem;
}

html[data-theme="dark"] .site-header {
    background: rgba(8, 20, 34, 0.92);
    border-bottom-color: var(--line);
}

html[data-theme="dark"] .brand small {
    color: #9fb4ca;
}

html[data-theme="dark"] .nav-toggle {
    border-color: #355773;
    background: #102235;
    color: #c9dcf1;
}

html[data-theme="dark"] .nav-toggle:hover {
    background: #173149;
    border-color: #507495;
}

html[data-theme="dark"] .menu > li > a,
html[data-theme="dark"] .menu > li > button {
    color: #d7e7f8;
}

html[data-theme="dark"] .menu > li > a:hover,
html[data-theme="dark"] .menu > li > button:hover,
html[data-theme="dark"] .menu > li > a.active,
html[data-theme="dark"] .menu > li > button.active {
    background: #143049;
    color: #9dc6f3;
}

html[data-theme="dark"] .dropdown {
    background: #0f2134;
    border-color: #34526c;
    box-shadow: 0 16px 30px rgba(2, 8, 16, 0.48);
}

html[data-theme="dark"] .dropdown a {
    color: #b7cce3;
}

html[data-theme="dark"] .dropdown a:hover,
html[data-theme="dark"] .dropdown a.active {
    background: #16334c;
    color: #a4cbf5;
}

html[data-theme="dark"] .theme-toggle {
    border-color: #3a5d7a;
    background: #102439;
    color: #f8d58a;
}

html[data-theme="dark"] .theme-toggle:hover {
    background: #183651;
    border-color: #5980a4;
}

html[data-theme="dark"] .page-progress {
    background: linear-gradient(90deg, #79aef0 0%, #58c3a6 100%);
}

html[data-theme="dark"] .btn-primary {
    color: #081220;
}

html[data-theme="dark"] .btn-outline {
    border-color: #355673;
    background: #102338;
    color: #d7e8f8;
}

html[data-theme="dark"] .btn-outline:hover {
    background: #17344e;
    color: #e5f0fb;
}

html[data-theme="dark"] .copy-toast {
    border-color: #2f5f4f;
    background: #0d2f27;
    color: #bef4db;
    box-shadow: 0 12px 22px rgba(1, 14, 10, 0.45);
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .help {
    color: #a8bfd6;
}

html[data-theme="dark"] .insight-card,
html[data-theme="dark"] .list-item,
html[data-theme="dark"] .news-slide,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .chart-card,
html[data-theme="dark"] .service-info-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .gallery-item,
html[data-theme="dark"] .gallery-mini-item,
html[data-theme="dark"] .reader-article,
html[data-theme="dark"] .summary-note-card {
    border-color: #2e455d;
    background: linear-gradient(180deg, #102033 0%, #0f1d2f 100%);
    color: #dfeaf8;
}

html[data-theme="dark"] .reader-excerpt {
    background: #10263a;
    border-left-color: #3f6382;
    color: #c6d8eb;
}

html[data-theme="dark"] .reader-share-panel {
    border-color: transparent;
    background: transparent;
}

html[data-theme="dark"] .reader-share-kicker {
    color: #82badf;
}

html[data-theme="dark"] .reader-share-inline-label {
    color: #c2d6ea;
}

html[data-theme="dark"] .reader-share-title {
    color: #dce8f5;
}

html[data-theme="dark"] .reader-share-trigger {
    border-color: #33506c;
    background: #14273a;
    color: #d7e5f4;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .reader-share-trigger:hover,
html[data-theme="dark"] .reader-share-trigger.is-open {
    border-color: #4b7193;
    background: #183148;
}

html[data-theme="dark"] .reader-share-popover {
    border-color: #2d4762;
    background: linear-gradient(135deg, rgba(14, 32, 49, 0.98), rgba(12, 27, 42, 0.95));
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .reader-share-btn {
    border-color: #33506c;
    background: #14273a;
    color: #d7e5f4;
}

html[data-theme="dark"] .reader-share-btn:hover {
    border-color: #4b7193;
    background: #183148;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .reader-content p,
html[data-theme="dark"] .news-slide p,
html[data-theme="dark"] .list-item p,
html[data-theme="dark"] .activity-body p,
html[data-theme="dark"] .summary-note-card p {
    color: #b2c7dc;
}

html[data-theme="dark"] .service-action {
    background: #112439;
    border-color: #2f4962;
    color: #c8dbf1;
}

html[data-theme="dark"] .service-action:hover {
    background: #17354e;
    box-shadow: 0 12px 20px rgba(0, 10, 20, 0.35);
}

html[data-theme="dark"] .service-tone-ocean,
html[data-theme="dark"] .service-tone-teal,
html[data-theme="dark"] .service-tone-amber {
    background: #12263b;
    border-color: #34516d;
}

html[data-theme="dark"] .service-icon {
    background: #1b3853;
}

html[data-theme="dark"] .announcement-thumb {
    border-color: #395a78;
    background: #12273d;
}

html[data-theme="dark"] .news-carousel {
    background: #102135;
    border-color: #2f4a65;
}

html[data-theme="dark"] .news-nav {
    border-color: #3c5f7c;
    background: rgba(16, 34, 52, 0.96);
    color: #d4e6f8;
}

html[data-theme="dark"] .news-nav:hover {
    background: #1a3954;
}

html[data-theme="dark"] .news-dots button {
    background: #4f6580;
}

html[data-theme="dark"] .news-dots button.active {
    background: #82b7f3;
}

html[data-theme="dark"] .pager-link {
    border-color: #3c5f7d;
    background: #11243a;
    color: #d8e8f8;
}

html[data-theme="dark"] .pager-link:hover {
    background: #193851;
    color: #e7f2ff;
}

html[data-theme="dark"] .pager-link.is-disabled {
    background: #12253a;
    opacity: 0.5;
}

html[data-theme="dark"] .pager-meta {
    color: #afc3d8;
}

html[data-theme="dark"] .announcement-readmore {
    color: #98c6f8;
}

html[data-theme="dark"] table {
    border-color: #33506a;
    background: #102236;
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
    border-bottom-color: #2d475f;
}

html[data-theme="dark"] th {
    background: #132a40;
    color: #c8ddf3;
}

html[data-theme="dark"] tfoot td {
    background: #12263b;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background: #102338;
    border-color: #3a5b78;
    color: #e3edf8;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .form-control::placeholder {
    color: #9db4cb;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    border-color: #78a8de;
    box-shadow: 0 0 0 3px rgba(102, 153, 209, 0.24);
}

html[data-theme="dark"] .letter-hero,
html[data-theme="dark"] .service-hero {
    border-color: #2f4d68;
    background: radial-gradient(circle at 12% 10%, #1b3248 0%, #132a3f 48%, #102135 100%);
}

html[data-theme="dark"] .letter-lead,
html[data-theme="dark"] .service-lead,
html[data-theme="dark"] .panel-copy,
html[data-theme="dark"] .text-muted {
    color: #a9bfd6;
}

html[data-theme="dark"] .letter-flow span,
html[data-theme="dark"] .service-flow span {
    border-color: #446786;
    background: rgba(20, 44, 65, 0.8);
    color: #b8d3ec;
}

html[data-theme="dark"] .letter-panel,
html[data-theme="dark"] .service-panel,
html[data-theme="dark"] .step-box,
html[data-theme="dark"] .identity-item {
    border-color: #33516b;
    background: #0f2135;
    color: #dfeaf8;
    box-shadow: 0 10px 26px rgba(2, 10, 18, 0.36);
}

html[data-theme="dark"] .step-title,
html[data-theme="dark"] .identity-item strong,
html[data-theme="dark"] .form-label {
    color: #d8e8f9;
}

html[data-theme="dark"] .service-ticket-card {
    border-color: #4a6b89;
    background: #12283e;
}

html[data-theme="dark"] .service-ticket-card strong {
    color: #b9d9ff;
}

html[data-theme="dark"] .feedback-box .result-card,
html[data-theme="dark"] .result-card {
    border-color: #3e5f7c;
    background: #12283d;
    color: #d9e8f7;
}

html[data-theme="dark"] .feedback-box .result-card.success,
html[data-theme="dark"] .result-card.success {
    border-color: #3f7c63;
    background: #113328;
    color: #bff0d7;
}

html[data-theme="dark"] .feedback-box .result-card.error,
html[data-theme="dark"] .result-card.error,
html[data-theme="dark"] .service-alert-danger,
html[data-theme="dark"] .letter-alert {
    border-color: #7b4146;
    background: #3a1b22;
    color: #ffd9de;
}

html[data-theme="dark"] .service-alert-success {
    border-color: #3f7c63;
    background: #123529;
    color: #c7f3db;
}

html[data-theme="dark"] .site-footer {
    border-top-color: rgba(149, 177, 201, 0.22);
}

html[data-theme="dark"] .profile-subnav {
    border-color: #34526c;
    background: rgba(12, 28, 44, 0.95);
}

html[data-theme="dark"] .profile-subnav a {
    color: #b4cbe2;
}

html[data-theme="dark"] .profile-subnav a:hover {
    color: #cde4fb;
    border-color: #4b6882;
    background: #18344e;
}

html[data-theme="dark"] .profile-section {
    border-color: #2f4a63;
    background: linear-gradient(180deg, #102033 0%, #0f1d2f 100%);
}

html[data-theme="dark"] .profile-section h2,
html[data-theme="dark"] .profile-two-col h3,
html[data-theme="dark"] .staff-card h3 {
    color: #dceafb;
}

html[data-theme="dark"] .profile-section p,
html[data-theme="dark"] .profile-two-col ol,
html[data-theme="dark"] .staff-card p {
    color: #b3c7dc;
}

html[data-theme="dark"] .photo-cascade {
    border-color: #34526c;
    background: #102237;
}

html[data-theme="dark"] .org-chart-frame {
    border-color: #2f4a63;
    background: linear-gradient(180deg, #102033 0%, #0d1828 100%);
}

html[data-theme="dark"] .org-chart-svg {
    color: #deebf8;
}

html[data-theme="dark"] .org-row.with-connector::before,
html[data-theme="dark"] .org-row-multi.with-connector::after,
html[data-theme="dark"] .org-row-multi.with-connector .org-card::before {
    background: #496a88;
}

html[data-theme="dark"] .org-card {
    border-color: #3b5a78;
    background: linear-gradient(180deg, #143049 0%, #102439 100%);
}

html[data-theme="dark"] .org-card-head {
    border-color: #4d7396;
    background: linear-gradient(180deg, #1b3957 0%, #143049 100%);
}

html[data-theme="dark"] .org-card-core {
    border-color: #4c7a73;
    background: linear-gradient(180deg, #174239 0%, #12372f 100%);
}

html[data-theme="dark"] .org-card h3 {
    color: #d8eafc;
}

html[data-theme="dark"] .org-card p {
    color: #b7cade;
}

html[data-theme="dark"] .staff-card {
    border-color: #32506b;
    background: #102338;
}

html[data-theme="dark"] .village-head-card {
    border-color: #3a5e7f;
    background: linear-gradient(145deg, #14314b 0%, #11283d 100%);
}

html[data-theme="dark"] .village-head-card h3 {
    color: #dbeafb;
}

html[data-theme="dark"] .village-head-card p,
html[data-theme="dark"] .village-head-card small {
    color: #b8cde2;
}

html[data-theme="dark"] .boundary-image-wrap {
    border-color: #35526d;
    background: linear-gradient(180deg, #13273d 0%, #102338 100%);
}

html[data-theme="dark"] .profile-map {
    border-color: #35526d;
}

.activity-list {
    display: grid;
    gap: 0.8rem;
}

.service-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    gap: 0.9rem;
}

.service-info-card {
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: #fff;
    padding: 1rem;
}

.service-info-card h3 {
    margin: 0 0 0.55rem;
}

.service-info-card p {
    margin-top: 0.6rem;
}

.service-info-card ul,
.service-info-card ol {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.65;
}

.service-form-card {
    max-width: none;
}

.activity-item {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
}

.activity-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 100%;
}

.activity-body {
    padding: 0.8rem 0.9rem 0.9rem 0;
}

.activity-meta {
    margin: 0 0 0.35rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.activity-body h3 {
    margin: 0 0 0.38rem;
}

.activity-body p {
    margin: 0 0 0.55rem;
    color: var(--muted);
}

.activity-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    font-size: 0.84rem;
}

.activity-footer a {
    color: var(--primary);
    font-weight: 600;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    overflow: hidden;
    background: var(--surface);
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.7rem 0.65rem;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: #f8fafc;
    white-space: nowrap;
}

.form-card {
    max-width: 520px;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--surface);
    padding: 1.2rem;
}

label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #c4ced8;
    border-radius: 0.6rem;
    font-family: inherit;
    font-size: 0.92rem;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.8rem;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.help {
    color: var(--muted);
    font-size: 0.82rem;
}

.profile-hero-modern {
    border: 1px solid var(--line);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
    min-height: 260px;
}

.profile-hero-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--profile-hero-image);
    background-size: cover;
    background-position: center;
    filter: brightness(0.55);
}

.profile-hero-layer {
    position: relative;
    z-index: 1;
    padding: 1.8rem 1.4rem;
    color: #fff;
    text-align: center;
}

.profile-kicker {
    margin: 0 0 0.35rem;
    color: #d6ecff;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.profile-hero-layer h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.profile-hero-layer p {
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.72;
}

.profile-subnav {
    position: sticky;
    top: 76px;
    z-index: 20;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.95rem;
    padding: 0.56rem;
    border: 1px solid var(--line);
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.profile-subnav a {
    padding: 0.42rem 0.62rem;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--muted);
    border: 1px solid transparent;
    transition: all 0.24s ease;
}

.profile-subnav a:hover {
    color: var(--primary);
    border-color: #b7cde2;
    background: #eef5fd;
}

.profile-section {
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: #fff;
    padding: 1.1rem;
    margin-bottom: 0.95rem;
}

.profile-section h2 {
    margin: 0 0 0.55rem;
    font-size: 1.2rem;
}

.profile-section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
    text-align: justify;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.photo-cascade {
    margin-top: 0.8rem;
    overflow: hidden;
    border-radius: 0.82rem;
    border: 1px solid var(--line);
}

.photo-cascade-track {
    display: flex;
    gap: 0.6rem;
    padding: 0.65rem;
    transition: transform 0.5s ease;
}

.photo-cascade-item {
    min-width: 32%;
    transform: skewX(-2deg);
}

.photo-cascade-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0.62rem;
}

.profile-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.profile-two-col h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
}

.profile-two-col ol {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.7;
}

.org-chart-frame {
    margin-top: 0.95rem;
    border: 1px solid #d4e1eb;
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
}

.org-chart-scroll {
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.org-chart-image-wrap {
    margin: 0;
}

.org-chart-image {
    display: block;
    width: min(100%, 860px);
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.org-chart-svg {
    display: block;
    width: 100%;
    min-width: 900px;
    height: auto;
    color: #111827;
}

.org-line {
    stroke: currentColor;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.org-text {
    fill: currentColor;
    font-family: "Poppins", sans-serif;
    font-size: 21px;
    font-weight: 600;
}

.org-text-major {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 1px;
}

.org-text-support {
    font-size: 20px;
}

.org-board {
    display: grid;
    gap: 0.95rem;
    margin-top: 0.45rem;
}

.org-row {
    position: relative;
    display: grid;
    justify-content: center;
    gap: 0.75rem;
}

.org-row-single {
    grid-template-columns: minmax(260px, 380px);
}

.org-row-multi {
    --row-columns: 3;
    grid-template-columns: repeat(var(--row-columns), minmax(160px, 1fr));
    align-items: stretch;
}

.org-row.with-connector {
    padding-top: 1rem;
}

.org-row.with-connector::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 1rem;
    background: #a3c1dc;
}

.org-row-multi.with-connector::after {
    content: "";
    position: absolute;
    top: 0;
    left: calc(100% / (var(--row-columns) * 2));
    right: calc(100% / (var(--row-columns) * 2));
    height: 2px;
    background: #a3c1dc;
}

.org-row-multi.with-connector .org-card::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -1rem;
    transform: translateX(-50%);
    width: 2px;
    height: 1rem;
    background: #a3c1dc;
}

.org-card {
    position: relative;
    border: 1px solid #bfd3e6;
    border-radius: 0.82rem;
    padding: 0.75rem 0.68rem;
    background: linear-gradient(180deg, #f9fcff 0%, #eff6fe 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 92px;
}

.org-card-head {
    background: linear-gradient(180deg, #eaf4ff 0%, #dcecff 100%);
    border-color: #9ebedc;
}

.org-card-core {
    background: linear-gradient(180deg, #eff9f6 0%, #dff4ec 100%);
    border-color: #9ecfbe;
}

.org-card h3 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #12314f;
}

.org-card p {
    margin: 0.26rem 0 0;
    font-size: 0.77rem;
    line-height: 1.5;
    text-align: center;
    color: #4b637c;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.7rem;
}

.village-head-card {
    border: 1px solid #bcd2e8;
    border-radius: 0.95rem;
    background: linear-gradient(145deg, #f8fbff 0%, #ecf5ff 100%);
    padding: 0.78rem;
    margin-bottom: 0.78rem;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.78rem;
    align-items: center;
}

.village-head-card img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid #b9d0e6;
}

.village-head-card small {
    display: block;
    color: #36608c;
    font-size: 0.78rem;
    margin-bottom: 0.16rem;
    letter-spacing: 0.02em;
}

.village-head-card h3 {
    margin: 0 0 0.18rem;
    font-size: 1rem;
    color: #16314d;
}

.village-head-card p {
    margin: 0;
    text-align: left;
}

.staff-card {
    border: 1px solid var(--line);
    border-radius: 0.82rem;
    overflow: hidden;
    background: #fff;
    text-align: center;
}

.staff-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.staff-card h3 {
    margin: 0.58rem 0 0.2rem;
    font-size: 0.88rem;
}

.staff-card p {
    margin: 0 0 0.65rem;
    text-align: center;
    font-size: 0.8rem;
}

.profile-boundary {
    margin-top: 0.25rem;
}

.boundary-image-wrap {
    margin: 0;
    border: 1px solid #c2d7ea;
    border-radius: 0.9rem;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
    aspect-ratio: 16 / 9;
}

.boundary-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.profile-map {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    overflow: hidden;
}

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

.alert {
    padding: 0.7rem 0.85rem;
    border-radius: 0.6rem;
    margin-bottom: 0.9rem;
    font-size: 0.88rem;
}

.alert-success {
    background: #e8f7ef;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-error {
    background: #fdecec;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.site-footer {
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(140deg, #0a243c 0%, #11466f 55%, #12608d 100%);
    color: #d8e7f5;
    margin-top: auto;
}

.site-footer::before,
.site-footer::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(1px);
    pointer-events: none;
}

.site-footer::before {
    width: 440px;
    height: 440px;
    right: -130px;
    top: -200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
}

.site-footer::after {
    width: 320px;
    height: 320px;
    left: -140px;
    bottom: -170px;
    background: radial-gradient(circle, rgba(31, 138, 112, 0.34) 0%, rgba(31, 138, 112, 0) 72%);
}

.footer-shell {
    position: relative;
    z-index: 1;
    padding: 2rem 0 1.05rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1.2fr 1.1fr;
    gap: 0.85rem;
}

.footer-brand-block,
.footer-nav-block,
.footer-contact-block,
.footer-social-block {
    border: 1px solid rgba(199, 219, 236, 0.25);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    padding: 0.85rem;
}

.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.footer-brand-header img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 0.7rem;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.15);
}

.footer-brand-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.04rem;
}

.footer-brand-header p {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: #d2e5f9;
}

.footer-brand-desc {
    margin: 0 0 0.65rem;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #dceafb;
}

.footer-address-chip {
    margin: 0;
    border: 1px solid rgba(199, 219, 236, 0.35);
    border-radius: 0.68rem;
    padding: 0.5rem 0.56rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #edf5ff;
}

.footer-nav-block h4,
.footer-contact-block h4,
.footer-social-block h4 {
    margin: 0 0 0.58rem;
    color: #f3f9ff;
    font-size: 0.92rem;
}

.footer-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
}

.footer-link-grid a {
    border: 1px solid rgba(201, 220, 237, 0.28);
    border-radius: 0.62rem;
    padding: 0.42rem 0.52rem;
    font-size: 0.8rem;
    color: #e6f2ff;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-link-grid a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(231, 243, 255, 0.56);
    transform: translateX(2px);
}

.footer-contact-item,
.footer-social-link {
    border: 1px solid rgba(201, 220, 237, 0.28);
    border-radius: 0.68rem;
    padding: 0.48rem 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e6f2ff;
    margin-bottom: 0.45rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-contact-item:last-child,
.footer-social-link:last-child {
    margin-bottom: 0;
}

.footer-contact-item:hover,
.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(231, 243, 255, 0.56);
    transform: translateY(-1px);
}

.footer-contact-item span,
.footer-social-link span {
    display: block;
    min-width: 0;
}

.footer-contact-item small,
.footer-social-link small {
    display: block;
    font-size: 0.72rem;
    color: #c2dbf1;
    margin-bottom: 0.08rem;
}

.footer-contact-item strong,
.footer-social-link strong {
    display: block;
    font-size: 0.8rem;
    color: #f5fbff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.58rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.13);
    color: #eaf4ff;
}

.footer-icon svg {
    width: 18px;
    height: 18px;
}

.social-instagram .footer-icon {
    background: linear-gradient(145deg, rgba(225, 48, 108, 0.42), rgba(252, 175, 69, 0.35));
}

.social-facebook .footer-icon {
    background: linear-gradient(145deg, rgba(24, 119, 242, 0.46), rgba(84, 164, 255, 0.3));
}

.social-maps .footer-icon {
    background: linear-gradient(145deg, rgba(52, 168, 83, 0.42), rgba(66, 133, 244, 0.3));
}

.footer-bottom {
    margin-top: 0.82rem;
    padding-top: 0.72rem;
    border-top: 1px solid rgba(204, 222, 238, 0.24);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.78rem;
    color: #d4e5f7;
}

@media (prefers-reduced-motion: reduce) {
    .site-shell,
    .welcome-banner-overlay,
    .welcome-banner-dialog,
    .welcome-banner-overlay::before,
    .welcome-banner-overlay::after,
    .welcome-banner-card::after {
        transition: none;
        animation: none;
    }
}

@media (max-width: 1150px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .footer-shell {
        padding: 1.4rem 0 0.9rem;
    }

    .site-footer .container.footer-shell {
        width: 100%;
        max-width: none;
        padding-inline: 0.8rem;
    }

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

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

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    th {
        white-space: normal;
    }
}

@media (max-width: 1024px) {
    .home-insight-grid,
    .profile-two-col,
    .chart-grid,
    .activity-item,
    .service-layout {
        grid-template-columns: 1fr;
    }

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

    .activity-body {
        padding: 0.85rem;
    }

    .org-chart-frame {
        padding: 0.8rem;
    }

    .org-chart-image {
        width: 100%;
        max-width: 760px;
    }

    .org-chart-svg {
        min-width: 820px;
    }

    .org-row-single {
        grid-template-columns: minmax(220px, 340px);
    }

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

    .org-row-multi.with-connector::after {
        left: 25%;
        right: 25%;
    }
}

@media (max-width: 920px) {
    .nav-toggle {
        display: inline-flex;
        grid-area: toggle;
        justify-self: end;
    }

    .main-nav {
        grid-area: nav;
        display: none;
        width: 100%;
        padding-top: 0.15rem;
        justify-content: flex-start;
        text-align: left;
    }

    .main-nav.show {
        display: block;
    }

    .site-header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "brand actions toggle"
            "nav nav nav";
        align-items: center;
        gap: 0.52rem 0.56rem;
    }

    .brand {
        grid-area: brand;
        min-width: 0;
    }

    .menu {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.32rem;
    }

    .menu > li {
        width: 100%;
    }

    .menu > li > a,
    .menu > li > button {
        width: 100%;
        text-align: left;
    }

    .dropdown {
        position: static;
        border: 0;
        box-shadow: none;
        padding: 0 0 0.2rem 0.32rem;
        min-width: auto;
        width: 100%;
        background: transparent;
    }

    .dropdown a {
        margin: 0;
        border: 0;
        background: transparent;
        color: #2c4a66;
        text-align: left;
        padding: 0.5rem 0.8rem;
        border-radius: 0.6rem;
    }

    .dropdown a:hover,
    .dropdown a.active {
        background: #eaf3fc;
        color: #0f4c81;
    }

    .main-nav.show .has-dropdown.open > button,
    .main-nav.show .menu > li > a.active {
        background: #eaf3fc;
        color: #0f4c81;
    }

    html[data-theme="dark"] .main-nav.show .dropdown {
        background: transparent;
    }

    html[data-theme="dark"] .main-nav.show .dropdown a {
        color: #d3e5f8;
    }

    html[data-theme="dark"] .main-nav.show .dropdown a:hover,
    html[data-theme="dark"] .main-nav.show .dropdown a.active {
        background: #143049;
        color: #f1f8ff;
    }

    html[data-theme="dark"] .main-nav.show .has-dropdown.open > button,
    html[data-theme="dark"] .main-nav.show .menu > li > a.active {
        background: #143049;
        color: #c8e2ff;
    }

    .has-dropdown:hover > .dropdown {
        display: none;
    }

    .has-dropdown.open > .dropdown {
        display: block;
    }

    .header-actions {
        grid-area: actions;
        width: auto;
        min-width: 0;
        margin-left: 0;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .profile-subnav {
        top: 66px;
    }

    .boundary-image-wrap {
        aspect-ratio: auto;
        max-height: none;
    }

    .boundary-image-wrap img {
        height: auto;
        object-fit: contain;
    }

    .news-carousel {
        --news-visible: 2;
    }

    .gallery-carousel {
        --gallery-visible: 2;
    }

    .news-nav {
        width: 32px;
        height: 32px;
        top: calc(50% - 18px);
    }
}

@media (max-width: 640px) {
    .welcome-banner-overlay {
        padding: 1rem 0.85rem;
    }

    .welcome-banner-dialog {
        width: min(100%, calc(100vw - 1rem));
    }

    .welcome-banner-card {
        border-radius: 1.15rem;
    }

    .welcome-banner-overlay::before {
        width: 240px;
        height: 240px;
        top: 7%;
        left: -18%;
        opacity: 0.9;
    }

    .welcome-banner-overlay::after {
        width: 220px;
        height: 220px;
        right: -20%;
        bottom: 14%;
        opacity: 0.88;
    }

    .welcome-banner-dialog::before {
        width: 120px;
        height: 120px;
        top: -16%;
        right: 5%;
        border-radius: 22px;
    }

    .welcome-banner-dialog::after {
        width: 150px;
        height: 88px;
        left: -2%;
        bottom: -18%;
    }

    .nav-toggle-text {
        display: none;
    }

    .nav-toggle {
        padding: 0.42rem 0.5rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .org-chart-frame {
        padding: 0.72rem;
    }

    .org-chart-image {
        max-width: 100%;
    }

    .org-chart-svg {
        min-width: 760px;
    }

    .org-row-single,
    .org-row-multi {
        grid-template-columns: 1fr;
    }

    .org-row.with-connector {
        padding-top: 0.35rem;
    }

    .org-row.with-connector::before,
    .org-row-multi.with-connector::after,
    .org-row-multi.with-connector .org-card::before {
        display: none;
    }

    .village-head-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .village-head-card img {
        width: 110px;
        height: 110px;
        margin: 0 auto;
    }

    .village-head-card p {
        text-align: center;
    }

    .photo-cascade-item {
        min-width: 70%;
    }

    .announcement-home-grid {
        grid-template-columns: 1fr;
    }

    .service-action-grid {
        grid-template-columns: 1fr;
        gap: 0.62rem;
    }

    .service-action {
        justify-content: flex-start;
        padding: 0.72rem;
    }

    .gallery-mini-grid {
        grid-template-columns: 1fr;
    }

    .activity-mini-card img {
        max-height: 148px;
    }

    .news-list-item {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .announcement-list-item {
        flex-direction: column;
    }

    .announcement-thumb {
        width: 46px;
        height: 46px;
        border-radius: 0.66rem;
    }

    .announcement-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.24rem;
    }

    .reader-article {
        border-radius: 0.85rem;
        padding: 0.95rem;
    }

    .reader-share-actions {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .reader-share-popover {
        width: min(280px, calc(100vw - 1.4rem));
        right: 0;
        padding: 0.72rem;
    }

    .reader-share-btn {
        min-height: 60px;
        font-size: 0.63rem;
    }

    .reader-share-inline-label {
        font-size: 0.82rem;
    }

    .news-carousel {
        --news-visible: 1;
    }

    .gallery-carousel {
        --gallery-visible: 1;
    }

    .news-nav {
        width: 30px;
        height: 30px;
        top: calc(50% - 15px);
    }

    .news-nav-prev {
        left: 0.35rem;
    }

    .news-nav-next {
        right: 0.35rem;
    }

    .hero-branding {
        padding: 0;
    }

    .hero-kicker {
        letter-spacing: 0.16em;
        font-size: 0.72rem;
    }

    .hero-name {
        letter-spacing: 0.05em;
    }

    .hero-lead {
        font-size: 0.9rem;
    }

    .hero-kicker::after {
        width: 62px;
        margin-top: 0.42rem;
    }
}
