:root {
    --brand-primary: #106b4f;
    --brand-secondary: #2f80ed;
    --ink: #16211d;
    --muted: #5f6f68;
    --line: #dfe7e3;
    --soft: #f4f8f6;
}

body {
    color: var(--ink);
    background: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn-brand {
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #0c5941;
    --bs-btn-hover-border-color: #0c5941;
    min-width: 92px;
}

.site-nav {
    background: var(--header-bg);
    min-height: 72px;
}

.site-nav .container {
    gap: 22px;
}

.site-header .navbar-brand,
.site-nav .nav-link {
    color: var(--header-fg);
}

.site-header .navbar-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.site-nav .navbar-nav {
    gap: 8px;
}

.site-nav .nav-link {
    font-weight: 700;
}

.search-box {
    min-width: min(410px, 36vw);
}

.site-nav .nav-link:hover,
.site-header .navbar-brand:hover {
    color: var(--header-fg);
    opacity: .86;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 190px;
    height: 42px;
    object-fit: contain;
}

.site-nav .navbar-toggler {
    background: rgba(255, 255, 255, .72);
}

.hero-band,
.gov-hero {
    background: linear-gradient(180deg, #f7fbf9 0%, #ffffff 100%);
    padding: clamp(42px, 7vw, 88px) 0 36px;
    border-bottom: 1px solid var(--line);
}

.gov-hero {
    position: relative;
    overflow: hidden;
    background: color-mix(in srgb, var(--brand-primary) 9%, #ffffff);
    color: var(--ink);
    padding: clamp(42px, 6vw, 76px) 0;
}

.gov-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,.68), rgba(255,255,255,.84)),
        color-mix(in srgb, var(--brand-primary) 12%, #ffffff);
    pointer-events: none;
}

.gov-hero .container {
    position: relative;
    z-index: 1;
}

.hero-band h1,
.page-band h1,
.article-header h1 {
    max-width: 920px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: 0;
    margin-bottom: 18px;
}

.gov-hero h1 {
    max-width: 840px;
    color: #18221f;
    font-size: clamp(2.35rem, 4.6vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: 0;
    margin-bottom: 18px;
}

.lead,
.page-band p,
.article-header p {
    color: var(--muted);
    max-width: 760px;
}

.gov-hero .lead {
    color: #5b6761;
    max-width: 820px;
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
    line-height: 1.55;
}

.gov-hero .eyebrow {
    color: var(--brand-primary);
}

.gov-status-panel {
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    border: 1px solid #e0d8d2;
    border-left: 5px solid var(--brand-primary);
    box-shadow: 0 16px 34px rgba(43, 31, 24, .1);
    padding: 24px 26px;
}

.gov-notice {
    padding: 18px 0;
    background: color-mix(in srgb, var(--brand-primary) 7%, #ffffff);
    border-top: 1px solid var(--line);
}

.gov-notice p {
    margin: 0;
    color: #4f5d58;
    font-size: .95rem;
}

.gov-status-panel span {
    display: block;
    color: var(--brand-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .78rem;
    margin-bottom: 8px;
}

.gov-status-panel strong {
    display: block;
    font-size: 1.45rem;
    margin-bottom: 10px;
}

.gov-status-panel p {
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    color: var(--brand-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 760px;
    margin-top: 28px;
}

.hero-search .form-control {
    min-height: 56px;
    border-color: #d7cec7;
    font-size: 1.05rem;
}

.hero-search .btn {
    min-height: 56px;
    padding-inline: 24px;
}

.quick-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: #fff;
}

.quick-panel h2,
.section-heading h2 {
    font-size: 1.25rem;
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.category-grid a,
.popular-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 72px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.category-grid a:hover,
.popular-link:hover {
    border-color: var(--brand-primary);
    text-decoration: none;
}

.content-band {
    padding: 44px 0;
}

.gov-services {
    padding: 42px 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.section-heading p {
    color: var(--muted);
    margin: 8px 0 0;
    max-width: 820px;
}

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

.service-card {
    display: grid;
    gap: 10px;
    min-height: 168px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand-primary);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.service-card:hover {
    border-color: var(--brand-primary);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(16, 33, 29, .08);
}

.service-card span {
    color: var(--brand-primary);
    font-weight: 800;
    font-size: .9rem;
}

.service-card strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.service-card p {
    color: var(--muted);
    margin: 0;
}

.content-band.muted {
    background: var(--soft);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}

.section-heading span,
.popular-link span,
.article-row span,
.article-header span {
    color: var(--muted);
    font-size: .92rem;
}

.article-list {
    border-top: 1px solid var(--line);
}

.article-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.article-title {
    display: inline-block;
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.article-row p {
    color: var(--muted);
    margin: 0;
}

.page-band,
.article-page {
    padding: 42px 0;
}

.breadcrumb-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    margin-bottom: 18px;
    font-size: .92rem;
}

.breadcrumb-line > * + *::before {
    content: "/";
    margin-right: 8px;
    color: #9aa8a2;
}

.article-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 760px);
    gap: 42px;
    align-items: start;
}

.featured-article-image {
    max-width: 680px;
    margin: 0 0 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #f2f5f4;
}

.featured-article-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.toc {
    position: sticky;
    top: 90px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.toc ol {
    margin: 10px 0 0;
    padding-left: 18px;
}

.article-content {
    font-size: 1.06rem;
    line-height: 1.75;
}

.article-content h2 {
    margin-top: 34px;
    font-size: 1.7rem;
}

.article-content h3 {
    margin-top: 26px;
    font-size: 1.3rem;
}

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #fff;
}

.directory-shell {
    min-height: calc(100vh - 81px);
    padding: clamp(24px, 4vw, 54px) 0 clamp(42px, 6vw, 76px);
    background:
        linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.96)),
        #eef5f2;
}

.directory-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: clamp(22px, 4vw, 54px);
    align-items: end;
    padding-bottom: clamp(26px, 4vw, 48px);
    border-bottom: 1px solid #d8e4df;
}

.directory-brand {
    grid-column: 1 / -1;
    width: fit-content;
    display: inline-flex;
    align-items: baseline;
    color: #083d2f;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
}

.directory-brand strong {
    color: #9f2241;
}

.directory-brand:hover {
    color: #083d2f;
    text-decoration: none;
}

.directory-copy h1 {
    max-width: 900px;
    color: #12241f;
    font-size: clamp(2.2rem, 5vw, 5rem);
    line-height: 1.02;
    margin: 0 0 18px;
}

.directory-copy p:not(.eyebrow) {
    color: #53625d;
    font-size: clamp(1.05rem, 1.6vw, 1.32rem);
    margin: 0;
}

.directory-tools {
    display: grid;
    gap: 12px;
    align-self: stretch;
    align-content: end;
}

.country-search .form-control {
    min-height: 56px;
    border-color: #cbdad4;
    box-shadow: 0 8px 20px rgba(18, 36, 31, .06);
}

.country-detect-note {
    margin-top: 18px;
    color: #53625d;
    font-size: .95rem;
}

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

.directory-grid {
    margin-top: clamp(24px, 4vw, 46px);
}

.country-card {
    min-height: 196px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    border: 1px solid #d8e4df;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(18, 36, 31, .06);
    padding: 24px;
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.country-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
    border-color: #9f2241;
    box-shadow: 0 16px 34px rgba(18, 36, 31, .1);
}

.country-card strong {
    color: #083d2f;
    font-size: 1.45rem;
}

.country-card span:last-child {
    font-size: 1.05rem;
    color: #9f2241;
    font-weight: 700;
}

.country-flag {
    font-size: 3.8rem;
    line-height: 1;
}

.country-empty {
    margin: 26px 0 0;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 767px) {
    .hero-search,
    .article-row,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .gov-hero {
        background: color-mix(in srgb, var(--brand-primary) 9%, #ffffff);
    }

    .gov-hero::before {
        width: auto;
        height: auto;
        inset: 0;
    }

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

    .search-box {
        min-width: 0;
    }

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

    .toc {
        position: static;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

    .directory-hero {
        grid-template-columns: 1fr;
    }

    .directory-brand {
        font-size: 2.35rem;
    }
}

@media (min-width: 768px) and (max-width: 1100px) {
    .country-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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