/* =============================================================
   AreaCodeCheck - Design System v1
   Light + dark themes via [data-theme] on <html>
   ============================================================= */
:root {
    /* Accent - emerald/teal */
    --accent:        #6d28d9;
    --accent-hover:  #5b21b6;
    --accent-soft:   #f5f3ff;
    --accent-text:   #6d28d9;
    --accent-grad:   linear-gradient(135deg, #8b5cf6, #d946ef);

    /* Semantic */
    --green:         #16a34a;
    --green-soft:    #ecfdf3;
    --green-border:  #c7ecd4;
    --green-text:    #15803d;
    --red:           #dc2626;
    --red-soft:      #fef2f2;
    --red-border:    #fbd5d5;
    --red-text:      #b91c1c;
    --amber:         #d97706;
    --amber-soft:    #fffbeb;
    --amber-text:    #b45309;

    /* Neutral */
    --text-primary:   #14121c;
    --text-secondary: #4e4a5e;
    --text-tertiary:  #8b87a0;
    --surface:        #ffffff;
    --surface-raised: #ffffff;
    --background:     #f8f7fb;
    --border:         #e2dfec;
    --divider:        #eae8f2;
    --code-bg:        #f1eff8;

    /* Hero */
    --hero-bg: radial-gradient(1000px 460px at 50% -180px, rgba(139,92,246,.10), transparent 65%),
               radial-gradient(700px 380px at 85% -120px, rgba(217,70,239,.08), transparent 60%),
               var(--surface);

    /* Elevation */
    --shadow-1: 0 1px 2px rgba(20,18,28,.06), 0 2px 8px rgba(20,18,28,.06);
    --shadow-2: 0 2px 4px rgba(20,18,28,.06), 0 8px 24px rgba(20,18,28,.10);
    --shadow-3: 0 4px 8px rgba(20,18,28,.08), 0 16px 40px rgba(20,18,28,.14);

    /* Radii */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  14px;
    --radius-xl:  20px;
    --radius-full: 9999px;

    /* Fonts */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Sizing */
    --container: 1120px;
    --nav-height: 64px;

    /* Transition */
    --ease: 180ms cubic-bezier(.4,0,.2,1);

    color-scheme: light;
}

[data-theme="dark"] {
    --accent:        #8b5cf6;
    --accent-hover:  #a78bfa;
    --accent-soft:   rgba(167,139,250,.13);
    --accent-text:   #c4b5fd;

    --green:         #34d399;
    --green-soft:    rgba(52,211,153,.10);
    --green-border:  rgba(52,211,153,.28);
    --green-text:    #6ee7b7;
    --red:           #f87171;
    --red-soft:      rgba(248,113,113,.10);
    --red-border:    rgba(248,113,113,.30);
    --red-text:      #fca5a5;
    --amber:         #fbbf24;
    --amber-soft:    rgba(251,191,36,.10);
    --amber-text:    #fcd34d;

    --text-primary:   #edeaf6;
    --text-secondary: #a9a4bd;
    --text-tertiary:  #6f6a85;
    --surface:        #16131f;
    --surface-raised: #1c1828;
    --background:     #100e18;
    --border:         #2f2a42;
    --divider:        #262238;
    --code-bg:        #211c31;

    --hero-bg: radial-gradient(1000px 460px at 50% -180px, rgba(139,92,246,.14), transparent 65%),
               radial-gradient(700px 380px at 85% -120px, rgba(217,70,239,.10), transparent 60%),
               var(--surface);

    --shadow-1: 0 1px 2px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.30);
    --shadow-2: 0 2px 4px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.40);
    --shadow-3: 0 4px 8px rgba(0,0,0,.40), 0 16px 40px rgba(0,0,0,.50);

    color-scheme: dark;
}


/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 16px); }
body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--ease), color var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
kbd {
    display: inline-block;
    padding: 2px 7px;
    font-size: .85em;
    font-family: var(--font-mono);
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: var(--radius-sm);
}
code {
    font-family: var(--font-mono);
    font-size: .85em;
    background: var(--code-bg);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
}
::selection { background: var(--accent); color: #fff; }

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 600;
}
.skip-link:focus { top: 12px; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.text-center { text-align: center; }


/* =============================================
   Navbar
   ============================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--divider);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .navbar { background: var(--surface); }
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: nowrap;
}
.logo em, .footer-logo em { font-style: normal; color: var(--accent-text); }
.logo:hover { text-decoration: none; }
.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--accent-grad);
    color: #fff;
    box-shadow: var(--shadow-1);
}

.nav-links { display: flex; gap: 4px; }
.nav-links li a {
    display: block;
    padding: 8px 13px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: background var(--ease), color var(--ease);
}
.nav-links li a:hover { background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 4px; }
.theme-toggle, .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: background var(--ease), color var(--ease);
}
.theme-toggle:hover, .mobile-menu-btn:hover { background: var(--accent-soft); color: var(--accent-text); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
.mobile-menu-btn { display: none; }


/* =============================================
   Hero
   ============================================= */
.hero {
    background: var(--hero-bg);
    padding: 76px 0 68px;
    text-align: center;
    border-bottom: 1px solid var(--divider);
}
.hero h1 {
    font-size: 2.9rem;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
}
.hero-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-text);
    background: var(--accent-soft);
    border-radius: var(--radius-full);
}


/* =============================================
   Search / Checker Widget
   ============================================= */
.search-box { max-width: 620px; margin: 0 auto; }
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-raised);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 6px 6px 20px;
    box-shadow: var(--shadow-1);
    transition: border-color var(--ease), box-shadow var(--ease);
}
.search-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-1);
}
.search-icon { flex-shrink: 0; color: var(--text-tertiary); stroke: currentColor; }
.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    padding: 11px 0;
    min-width: 0;
}
.search-input-wrapper input::placeholder {
    color: var(--text-tertiary);
    font-family: var(--font);
    letter-spacing: 0;
    font-weight: 400;
    text-transform: none;
}
.search-input-wrapper button {
    flex-shrink: 0;
    padding: 13px 30px;
    background: var(--accent);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
    white-space: nowrap;
}
.search-input-wrapper button:hover { background: var(--accent-hover); box-shadow: var(--shadow-1); }
.search-input-wrapper button:active { transform: scale(.98); }
.search-input-wrapper button:disabled { opacity: .6; cursor: not-allowed; }

.search-hint { margin-top: 14px; font-size: .85rem; color: var(--text-tertiary); }
.search-hint strong { color: var(--text-secondary); font-weight: 600; }

.quick-examples {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.quick-label { font-size: .82rem; color: var(--text-tertiary); font-weight: 600; }
.quick-code {
    padding: 6px 14px;
    font-size: .82rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent-text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--ease), border-color var(--ease);
}
.quick-code:hover { background: var(--accent-soft); border-color: var(--accent); }

.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 26px;
}
.trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.trust-badges svg { stroke: var(--green); }


/* =============================================
   Loading / Error
   ============================================= */
.loading { text-align: center; padding: 44px 0 20px; }
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--divider);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { font-size: .95rem; color: var(--text-secondary); }

.error-card {
    max-width: 620px;
    margin: 28px auto 0;
    background: var(--red-soft);
    color: var(--red-text);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--red-border);
    font-size: .95rem;
    text-align: center;
}


/* =============================================
   Result Card
   ============================================= */
.result-card {
    max-width: 760px;
    margin: 40px auto 0;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    text-align: left;
    animation: fadeSlideUp .35s var(--ease);
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 24px;
    background: var(--green-soft);
    border-bottom: 1px solid var(--green-border);
}
.result-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-text);
    margin: 0;
    font-family: var(--font-mono);
    letter-spacing: .04em;
}
.result-header h2 svg { flex-shrink: 0; }
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: .85rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--accent-text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--ease), border-color var(--ease);
    white-space: nowrap;
}
.btn-outline:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--divider);
}
.result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px;
    background: var(--surface-raised);
}
.result-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-tertiary);
}
.result-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}
.result-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--divider);
    background: var(--surface-raised);
    font-size: .9rem;
    font-weight: 600;
}

/* Code structure breakdown (AAAA BB CC DDD) */
.code-breakdown {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 18px 24px;
    border-top: 1px solid var(--divider);
    background: var(--surface-raised);
}
.code-breakdown:empty { display: none; }
.code-part {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 16px;
    background: var(--code-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    min-width: 76px;
}
.code-part-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .08em;
    color: var(--accent-text);
}
.code-part-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-tertiary);
}


/* =============================================
   Sections (shared)
   ============================================= */
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 580px;
    margin: -8px auto 44px;
    font-size: 1.05rem;
}
.features-section h2, .how-section h2, .faq-section h2,
.related-section h2, .section-light h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.025em;
    margin-bottom: 16px;
}

.features-section { background: var(--background); padding: 84px 0; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
    background: var(--surface);
    padding: 30px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--divider);
    text-align: center;
    transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.feature-card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: var(--border); }
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
}
.icon-blue   { background: var(--accent-soft); color: var(--accent-text); }
.icon-green  { background: var(--green-soft);  color: var(--green); }
.icon-red    { background: var(--red-soft);    color: var(--red); }
.icon-yellow { background: var(--amber-soft);  color: var(--amber); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: .9rem; color: var(--text-secondary); }

.how-section {
    background: var(--surface);
    padding: 84px 0;
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
}
.steps-grid { display: flex; align-items: flex-start; justify-content: center; }
.step-card { text-align: center; padding: 24px; flex: 1; max-width: 290px; }
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--accent-grad);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 18px;
    box-shadow: var(--shadow-1);
}
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: .9rem; color: var(--text-secondary); }
.step-connector { display: flex; align-items: center; padding-top: 36px; color: var(--border); }
.step-connector svg { stroke: currentColor; }

.faq-section { background: var(--surface); padding: 84px 0; border-top: 1px solid var(--divider); }
.faq-list { max-width: 740px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--divider); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    transition: color var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: var(--accent-text); }
.faq-answer { padding: 0 0 20px; }
.faq-answer p { font-size: .95rem; color: var(--text-secondary); line-height: 1.75; }


/* =============================================
   Page Hero / Section Light / Content
   ============================================= */
.page-hero {
    background: var(--hero-bg);
    padding: 60px 0 52px;
    text-align: center;
    border-bottom: 1px solid var(--divider);
}
.page-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.2;
    margin-bottom: 16px;
    overflow-wrap: anywhere;
}
.page-hero .hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 680px; margin: 0 auto; }

.section-light { background: var(--background); padding: 60px 0; text-align: center; }
.section-light h2 { font-size: 1.7rem; margin-bottom: 8px; }

.content-section { padding: 64px 0; }
.article-body {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    padding: 48px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--divider);
}
.article-body h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 40px 0 16px; padding-top: 8px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 28px 0 10px; }
.article-body p { font-size: .95rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 12px 0 20px 28px; list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { font-size: .95rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 6px; }
.article-body a { font-weight: 500; }
.article-body strong { color: var(--text-primary); }

.info-table-wrapper {
    overflow-x: auto;
    margin: 20px 0 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--divider);
}
.info-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.info-table th, .info-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--divider); }
.info-table th {
    background: var(--background);
    font-weight: 700;
    color: var(--text-primary);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.info-table td { color: var(--text-secondary); }
.info-table td strong { color: var(--text-primary); }
.info-table tr:last-child td { border-bottom: none; }
.info-table tr:hover td { background: var(--code-bg); }


/* =============================================
   Detail card / Chips / Related
   ============================================= */
.code-mono { font-family: var(--font-mono); letter-spacing: .04em; }
.detail-card {
    max-width: 800px;
    margin: 0 auto 40px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2);
}
.detail-article { margin-top: 0; }

.related-section { background: var(--background); padding: 64px 0; }
.related-section h2 { margin-bottom: 32px; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 920px;
    margin: 0 auto;
}
.related-card {
    background: var(--surface);
    padding: 26px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--divider);
    transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.related-card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: var(--border); text-decoration: none; }
.related-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--accent-text); margin-bottom: 8px; }
.related-card p { font-size: .9rem; color: var(--text-secondary); }

.chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    max-width: 1000px;
    margin: 0 auto;
}
.chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
    min-width: 0;
}
.chip:hover { box-shadow: var(--shadow-1); transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.chip-number {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .05em;
    color: var(--accent-text);
    overflow-wrap: anywhere;
}
.chip-meta {
    font-size: .78rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chip-more { border-style: dashed; }

/* Country list table */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}
.country-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    font-size: .9rem;
    font-weight: 500;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.country-link:hover { border-color: var(--accent); box-shadow: var(--shadow-1); text-decoration: none; }
.country-link .count {
    font-size: .78rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    flex-shrink: 0;
}


/* =============================================
   Breadcrumbs
   ============================================= */
.breadcrumb-bar { background: var(--surface); border-bottom: 1px solid var(--divider); padding: 10px 0; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: .85rem; flex-wrap: wrap; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li::after { content: '›'; color: var(--text-tertiary); }
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs li[aria-current] { color: var(--text-secondary); }


/* =============================================
   Footer
   ============================================= */
footer {
    background: #0e0c15;
    color: #a9a4bd;
    padding: 60px 0 40px;
    border-top: 1px solid #262238;
}
[data-theme="dark"] footer { background: #0b0912; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.footer-logo:hover { text-decoration: none; color: #fff; }
.footer-logo .logo-mark { width: 28px; height: 28px; }
.footer-brand p { font-size: .875rem; line-height: 1.7; color: #7d7893; max-width: 360px; }
.footer-links h4 {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #d8d5e4;
    margin-bottom: 16px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .875rem; color: #8d88a2; transition: color var(--ease); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #262238; padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: .8rem; color: #7d7893; margin-bottom: 4px; }
.footer-bottom a { color: inherit; }


/* =============================================
   Responsive
   ============================================= */
@media (max-width: 960px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-brand { grid-column: 1 / -1; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: inline-flex; }
    .nav-links.active {
        display: flex;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 8px 16px 16px;
        border-bottom: 1px solid var(--divider);
        box-shadow: var(--shadow-2);
        gap: 2px;
    }
    .nav-links.active li a { padding: 12px 16px; font-size: .95rem; border-radius: var(--radius-md); }
}

@media (max-width: 768px) {
    :root { --nav-height: 56px; }

    .hero { padding: 48px 0 44px; }
    .hero h1 { font-size: 2.05rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 32px; }

    .search-input-wrapper { flex-direction: column; border-radius: var(--radius-xl); padding: 12px; gap: 10px; }
    .search-icon { display: none; }
    .search-input-wrapper input { width: 100%; text-align: center; padding: 8px 12px; }
    .search-input-wrapper button { width: 100%; padding: 14px; }

    .trust-badges { gap: 14px; }
    .result-grid { grid-template-columns: 1fr; }
    .result-header { flex-direction: column; gap: 12px; align-items: flex-start; }

    .features-section, .how-section, .faq-section { padding: 56px 0; }
    .features-section h2, .how-section h2, .faq-section h2,
    .related-section h2, .section-light h2 { font-size: 1.55rem; }
    .features-grid { grid-template-columns: 1fr; }

    .steps-grid { flex-direction: column; align-items: center; }
    .step-connector { transform: rotate(90deg); padding: 0; }
    .step-card { max-width: 100%; }

    .article-body { padding: 24px; }
    .related-grid { grid-template-columns: 1fr; }
    .content-section, .related-section { padding: 40px 0; }

    .page-hero { padding: 40px 0 34px; }
    .page-hero h1 { font-size: 1.8rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-brand { grid-column: 1; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 1.7rem; }
    .page-hero h1 { font-size: 1.4rem; }
    .trust-badges { flex-direction: column; align-items: center; gap: 10px; }
    .chip-grid { grid-template-columns: 1fr; }
    .country-grid { grid-template-columns: 1fr; }
}


/* =============================================
   Print
   ============================================= */
@media print {
    .navbar, .search-box, .quick-examples, .trust-badges,
    .features-section, .how-section, .faq-section, footer, .theme-toggle { display: none; }
    .hero { padding: 20px 0; }
    .result-card, .detail-card { box-shadow: none; border: 1px solid #ccc; }
}
