/* ===== CSS Variables ===== */
:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-50: #eff6ff;
    --accent: #8b5cf6;
    --accent-light: #ede9fe;
    --emerald: #10b981;
    --emerald-light: #d1fae5;
    --amber: #f59e0b;
    --amber-light: #fef3c7;
    --rose: #f43f5e;
    --rose-light: #ffe4e6;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --bg: #f8fafc;
    --bg-warm: #fafaf9;
    --white: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --max-width: 1200px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Category colors */
    --cat-economy: #3b82f6;
    --cat-economy-bg: #eff6ff;
    --cat-demographics: #8b5cf6;
    --cat-demographics-bg: #f5f3ff;
    --cat-labor: #f59e0b;
    --cat-labor-bg: #fffbeb;
    --cat-trade: #10b981;
    --cat-trade-bg: #ecfdf5;
    --cat-fiscal: #ef4444;
    --cat-fiscal-bg: #fef2f2;
    --cat-social: #ec4899;
    --cat-social-bg: #fdf2f8;
    --cat-environment: #14b8a6;
    --cat-environment-bg: #f0fdfa;
    --cat-technology: #6366f1;
    --cat-technology-bg: #eef2ff;
    --cat-inequality: #f97316;
    --cat-inequality-bg: #fff7ed;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

::selection {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* ===== Header ===== */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    letter-spacing: -0.02em;
}
.site-logo:hover { color: var(--primary); }
.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: all var(--transition);
}
.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background var(--transition);
}
.nav-toggle:hover { background: var(--border-light); }
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
    border-radius: 1px;
    transition: 0.3s;
}

/* ===== Main ===== */
.main-content {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 3.5rem 1rem 3rem;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero stats bar */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}
.hero-stat {
    text-align: center;
}
.hero-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 1.5px solid transparent;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e3a8a);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(59,130,246,0.35);
    transform: translateY(-1px);
}
.btn-outline {
    background: var(--white);
    border-color: var(--border);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}
.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    border-radius: 7px;
}
.btn-csv {
    background: linear-gradient(135deg, var(--emerald), #059669);
    color: var(--white);
    border-color: transparent;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(16,185,129,0.25);
}
.btn-csv:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16,185,129,0.35);
}

/* ===== Page Title Row ===== */
.page-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.page-title-row .page-title { margin-bottom: 0; }

/* ===== Section ===== */
.section { margin-bottom: 3rem; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px;
}
.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.page-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    user-select: none;
}

/* ===== Cards & Grids ===== */
.indicator-grid { display: flex; flex-direction: column; gap: 2rem; }

.indicator-category { }
.category-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.category-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.indicator-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.indicator-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    color: var(--text);
    position: relative;
    overflow: hidden;
}
.indicator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}
.indicator-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    color: var(--text);
    transform: translateY(-2px);
}
.indicator-card:hover::before { opacity: 1; }
.indicator-name { font-weight: 600; font-size: 0.9rem; }
.indicator-links { display: flex; gap: 0.4rem; }
.link-chip {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-50);
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
}

/* Country grid */
.region-group { margin-bottom: 2rem; }
.region-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}
.country-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--transition);
    font-size: 0.875rem;
}
.country-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
    color: var(--text);
    transform: translateY(-1px);
}
.country-code {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-weight: 500;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
}

/* Count badge */
.count-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--border-light);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    vertical-align: middle;
}

/* Country meta */
.country-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.meta-chip {
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--primary-50);
    color: var(--primary-dark);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    border: 1px solid var(--primary-light);
}

/* ===== Charts ===== */
.chart-category { margin-bottom: 2.5rem; }
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}
.chart-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.chart-card:hover {
    box-shadow: var(--shadow-md);
}
.chart-card-large {
    margin-bottom: 1.5rem;
}
.chart-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.chart-container {
    width: 100%;
    height: 280px;
}
.chart-tall {
    height: 600px;
}
.chart-latest {
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
    font-variant-numeric: tabular-nums;
}

/* ===== Compare ===== */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.compare-card {
    padding: 1.1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.compare-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}
.compare-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    color: var(--primary);
    transform: translateY(-2px);
}
.compare-card:hover::after { opacity: 1; }

.compare-cta {
    margin-top: 2rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-light));
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--primary-light);
}
.compare-cta p { margin-bottom: 0.75rem; font-weight: 600; }
.compare-links { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

/* Compare charts */
.compare-indicator {
    margin-bottom: 1.5rem;
}
.compare-indicator h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* ===== Indicator list page ===== */
.indicator-group { margin-bottom: 2rem; }
.indicator-table { display: flex; flex-direction: column; gap: 0.5rem; }
.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    gap: 1rem;
    transition: all var(--transition);
}
.indicator-row:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}
.indicator-info { flex: 1; min-width: 0; }
.indicator-name-link {
    font-weight: 600;
    display: block;
    font-size: 0.9rem;
}
.indicator-en {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.indicator-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.indicator-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* ===== Ranking table ===== */
.ranking-table {
    margin-top: 1.5rem;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.ranking-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}
.ranking-table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ranking-table th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.ranking-table th:last-child { border-radius: 0 var(--radius-lg) 0 0; }
.ranking-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}
.ranking-table tbody tr {
    transition: background var(--transition);
}
.ranking-table tbody tr:hover { background: var(--primary-50); }
.ranking-table tbody tr:nth-child(2n) { background: var(--bg); }
.ranking-table tbody tr:nth-child(2n):hover { background: var(--primary-50); }
.rank-cell {
    font-weight: 700;
    color: var(--primary);
    width: 60px;
    font-variant-numeric: tabular-nums;
}
.rank-cell-1 { color: #d97706; }
.rank-cell-2 { color: #6b7280; }
.rank-cell-3 { color: #b45309; }
.value-cell {
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-weight: 500;
}

/* ===== Content Section ===== */
.content-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px 0 0 2px;
}
.content-section-compact { padding: 1.25rem 1.75rem; }
.content-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.content-body p {
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.85;
    color: var(--text-secondary);
}
.content-body p:last-child { margin-bottom: 0; }

/* ===== Related links ===== */
.related-links {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
}

/* ===== Source Badge ===== */
.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.source-worldbank { background: #e0f2fe; color: #0369a1; }
.source-imf { background: #fef3c7; color: #92400e; }
.source-fred { background: #d1fae5; color: #065f46; }

/* ===== Articles / News ===== */
.article-list { display: flex; flex-direction: column; gap: 0.75rem; }
.article-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 2px 0 0 2px;
    opacity: 0;
    transition: opacity var(--transition);
}
.article-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}
.article-card:hover::before { opacity: 1; }
.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.article-category {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    background: var(--primary-50);
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.article-category-analysis { background: var(--amber-light); color: #92400e; }
.article-category-data_update { background: var(--emerald-light); color: #065f46; }
.article-date { font-size: 0.78rem; color: var(--text-tertiary); }
.article-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--primary); }
.article-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-detail { max-width: 800px; }
.article-lead {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}
.article-body { margin-bottom: 2rem; }
.article-related {
    margin-top: 2rem;
    padding: 1.25rem;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}
.article-related h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
}
.related-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}
.pagination-info { font-size: 0.85rem; color: var(--text-tertiary); font-weight: 500; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: auto;
}
.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}
.footer-brand {
    max-width: 300px;
}
.footer-brand-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-brand-desc {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}
.footer-nav {
    display: flex;
    gap: 3rem;
}
.footer-nav-group h4 {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}
.footer-nav-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.footer-nav-group a {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    transition: color var(--transition);
}
.footer-nav-group a:hover { color: var(--primary); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-source {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}
.footer-source a { color: var(--text-secondary); }
.footer-source a:hover { color: var(--primary); }
.footer-copy {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Legacy footer compat */
.footer-links { display: none; }

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.4s ease-out; }

/* ===== Mobile ===== */
.sp-only { display: none; }

@media (max-width: 768px) {
    .sp-only { display: inline; }

    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.25rem;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.active { display: flex; }
    .nav-links a {
        padding: 0.6rem 1rem;
        border-radius: 8px;
    }

    .main-content { padding: 1.25rem 1rem; }

    .hero { padding: 2rem 0 1.5rem; }
    .hero h1 { font-size: 1.6rem; }
    .hero-sub { font-size: 0.9rem; }
    .hero-stats { gap: 1.25rem; flex-wrap: wrap; }
    .hero-stat-value { font-size: 1.35rem; }

    .page-title { font-size: 1.3rem; }
    .section-title { font-size: 1.1rem; }

    .chart-grid { grid-template-columns: 1fr; }
    .chart-container { height: 220px; }
    .chart-tall { height: 400px; }

    .indicator-cards { grid-template-columns: 1fr 1fr; }
    .country-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .compare-grid { grid-template-columns: 1fr 1fr; }

    .indicator-row { flex-direction: column; align-items: flex-start; }
    .indicator-actions { width: 100%; }

    .page-title-row { flex-wrap: wrap; }

    .footer-top { flex-direction: column; }
    .footer-nav { gap: 2rem; flex-wrap: wrap; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .content-section { padding: 1.25rem; }
    .content-section::before { width: 3px; }
}

@media (max-width: 480px) {
    .indicator-cards { grid-template-columns: 1fr; }
    .compare-grid { grid-template-columns: 1fr; }
}
