/* ========================================
   Personalism Dashboard — Personal Site Style
   Teal accent, Plus Jakarta Sans, animated mesh gradient
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-primary: #f9f9fb;
    --bg-secondary: #f1f2f5;
    --bg-card: #ffffff;

    --text-primary: #111118;
    --text-secondary: #4a4a5a;
    --text-muted: #6b6b7e;

    --accent: #0e7490;
    --accent-hover: #0a5e74;
    --green: #0e7490;
    --green-light: #22b8d4;
    --green-subtle: rgba(14, 116, 144, 0.10);

    --border: #e2e3e8;
    --border-light: #ebebef;
    --shadow: rgba(17, 17, 24, 0.06);
    --shadow-hover: rgba(17, 17, 24, 0.12);

    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;

    --nav-height: 56px;
    --max-width: 1200px;
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Dimension colors */
    --power-color: #0e7490;
    --power-bg: rgba(14, 116, 144, 0.10);
    --cult-color: #0a5e74;
    --cult-bg: rgba(10, 94, 116, 0.10);

    /* Score gradient */
    --score-low: #e2e3e8;
    --score-mid: #7dd3e5;
    --score-high: #0e7490;

    /* Chart colors */
    --bar-fill: #0e7490;
    --bar-hover: #0a5e74;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-primary);
    background: var(--bg-primary);
    position: relative;
    overflow-x: hidden;
}

/* Animated mesh gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 10% 15%, rgba(14, 116, 144, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 90% 10%, rgba(34, 184, 212, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 60% 70% at 55% 85%, rgba(14, 116, 144, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 30% 55%, rgba(34, 184, 212, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 45%, rgba(14, 116, 144, 0.06) 0%, transparent 55%),
        linear-gradient(135deg, #f9f9fb 0%, #eff0f4 25%, #edf0f4 50%, #eff0f4 75%, #f9f9fb 100%);
    background-size: 200% 200%;
    animation: meshGradient 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle 700px at 15% 75%, rgba(14, 116, 144, 0.06) 0%, transparent 65%),
        radial-gradient(circle 600px at 80% 25%, rgba(34, 184, 212, 0.08) 0%, transparent 65%),
        radial-gradient(circle 400px at 50% 50%, rgba(14, 116, 144, 0.04) 0%, transparent 50%);
    background-size: 150% 150%;
    animation: meshGradient2 28s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes meshGradient {
    0%, 100% { background-position: 0% 0%; }
    25%       { background-position: 40% 20%; }
    50%       { background-position: 100% 50%; }
    75%       { background-position: 20% 80%; }
}

@keyframes meshGradient2 {
    0%, 100% { background-position: 100% 0%; }
    33%      { background-position: 0% 60%; }
    66%      { background-position: 60% 100%; }
}

body > * { position: relative; z-index: 1; }

a { color: var(--accent-hover); text-decoration: none; transition: all var(--transition-fast); }
a:hover { color: var(--green); }

@keyframes fadeInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ========================================
   Header (glassmorphism nav bar)
   ======================================== */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    animation: fadeInDown 0.5s ease;
    display: flex;
    align-items: center;
    text-align: left;
    padding: 0 1.5rem;
}

.header-inner {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.70rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ========================================
   Tab navigation (pinned below header)
   ======================================== */
.tabs {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border-bottom: 1px solid var(--border);
    z-index: 900;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    animation: fadeInDown 0.5s ease 0.05s both;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.65rem 1.1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}
.tab:hover {
    color: var(--text-primary);
    background: var(--green-subtle);
}
.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ========================================
   Main content area
   ======================================== */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
    padding-top: calc(var(--nav-height) + 46px + 1.5rem);
}

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

/* ========================================
   Stat cards
   ======================================== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 1px 4px var(--shadow);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.stat-card:hover { box-shadow: 0 4px 14px var(--shadow-hover); transform: translateY(-1px); }
.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
}
.stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.15rem;
}

/* ========================================
   Chart containers
   ======================================== */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px var(--shadow);
    transition: box-shadow var(--transition-fast);
}
.chart-container:hover { box-shadow: 0 4px 14px var(--shadow-hover); }
.chart-container h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    position: relative;
    padding-bottom: 0.65rem;
}
.chart-container h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 36px; height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
.chart-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}
.chart { min-height: 300px; }

.missingness-note { border-left: 3px solid var(--accent); }
.missingness-note p { font-size: 0.88rem; line-height: 1.7; color: var(--text-secondary); }

/* ========================================
   CSS Bar chart
   ======================================== */
.bar-row { display: flex; align-items: center; margin-bottom: 4px; gap: 0.5rem; }
.bar-label {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    width: 180px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}
.bar-track {
    flex: 1;
    height: 22px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 4px; background: var(--bar-fill); transition: width 0.5s ease; }
.bar-value { font-size: 0.7rem; font-family: var(--font-mono); color: var(--text-muted); width: 40px; text-align: left; flex-shrink: 0; }

/* ========================================
   Scatter chart
   ======================================== */
.scatter-container {
    position: relative; width: 100%; height: 350px;
    border-left: 2px solid var(--border); border-bottom: 2px solid var(--border);
    margin-left: 2rem; margin-bottom: 2rem;
}
.scatter-point {
    position: absolute; width: 9px; height: 9px; border-radius: 50%;
    background: var(--bar-fill); transform: translate(-50%, 50%);
    cursor: pointer; transition: all var(--transition-fast);
    border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); opacity: 0.80;
}
.scatter-point:hover { width: 13px; height: 13px; opacity: 1; z-index: 10; }
.scatter-point .tooltip {
    display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: var(--text-primary); color: #fff; font-size: 0.7rem; font-family: var(--font-mono);
    padding: 3px 8px; border-radius: 5px; white-space: nowrap; margin-bottom: 6px;
}
.scatter-point:hover .tooltip { display: block; }
.axis-label { font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-muted); position: absolute; }
.axis-label-x { bottom: -1.8rem; left: 50%; transform: translateX(-50%); }
.axis-label-y { top: 50%; left: -2rem; transform: translateY(-50%) rotate(-90deg); white-space: nowrap; }

/* ========================================
   Country grid & cards
   ======================================== */
.country-controls { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-container { flex: 1; min-width: 200px; }
.search-container input, #table-search {
    width: 100%; padding: 0.6rem 1rem;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--font-sans); font-size: 0.875rem;
    background: var(--bg-card); color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-container input:focus, #table-search:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--green-subtle);
}
.filter-group { display: flex; align-items: center; gap: 0.5rem; }
.filter-group label { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }
.filter-group select {
    padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--font-sans); font-size: 0.85rem; background: var(--bg-card); color: var(--text-primary);
}

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.country-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.25rem; box-shadow: 0 1px 4px var(--shadow);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.country-card:hover { box-shadow: 0 6px 18px var(--shadow-hover); transform: translateY(-1px); }
.country-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.2rem; }
.country-iso { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-left: 0.5rem; }
.country-score {
    display: inline-block; font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600;
    padding: 0.15rem 0.5rem; border-radius: 5px; margin-bottom: 0.75rem;
}
.leader-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.4rem 0; border-top: 1px solid var(--border-light); font-size: 0.84rem;
}
.leader-row:first-child { border-top: none; }
.leader-name { font-weight: 500; color: var(--text-primary); }
.leader-years { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.leader-score { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--accent); }

.indicator-dots { display: flex; gap: 3px; margin-top: 0.5rem; flex-wrap: wrap; }
.indicator-dot {
    width: 18px; height: 18px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.55rem; font-family: var(--font-mono); cursor: default; position: relative;
}
.indicator-dot.present { background: var(--accent); color: #fff; }
.indicator-dot.absent  { background: var(--bg-secondary); color: var(--text-muted); }
.indicator-dot .dot-tooltip {
    display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: var(--text-primary); color: #fff; font-size: 0.65rem;
    padding: 2px 6px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; z-index: 10;
}
.indicator-dot:hover .dot-tooltip { display: block; }

/* ========================================
   Indicator grid & cards
   ======================================== */
.indicator-intro { margin-bottom: 1.5rem; font-size: 0.9rem; }
.dim-power { color: var(--power-color); font-weight: 600; }
.dim-cult  { color: var(--cult-color);  font-weight: 600; }

.indicator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.indicator-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.25rem; box-shadow: 0 1px 4px var(--shadow); transition: box-shadow var(--transition-fast);
}
.indicator-card:hover { box-shadow: 0 4px 14px var(--shadow-hover); }
.indicator-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.indicator-dimension {
    display: inline-block; font-size: 0.68rem; font-family: var(--font-mono);
    padding: 0.1rem 0.5rem; border-radius: 4px; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 0.5rem; font-weight: 500;
}
.indicator-dimension.power { background: var(--power-bg); color: var(--power-color); }
.indicator-dimension.cult  { background: var(--cult-bg);  color: var(--cult-color); }
.indicator-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.75rem; line-height: 1.65; }
.indicator-source { font-size: 0.68rem; font-family: var(--font-mono); color: var(--text-muted); margin-bottom: 0.75rem; }
.indicator-bar-track { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; margin-bottom: 0.25rem; }
.indicator-bar-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.5s ease; }
.indicator-prevalence { font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-muted); }

/* ========================================
   Data table
   ======================================== */
.table-controls { display: flex; gap: 1rem; margin-bottom: 1rem; align-items: center; }
#table-search { flex: 1; }
.btn-secondary {
    padding: 0.55rem 1rem; border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg-card); font-family: var(--font-sans); font-size: 0.85rem;
    cursor: pointer; color: var(--text-secondary); transition: all var(--transition-fast);
}
.btn-secondary:hover { background: var(--green-subtle); border-color: var(--accent); color: var(--accent); }
.table-wrapper { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
#data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
#data-table th {
    background: var(--bg-secondary); padding: 0.6rem 0.75rem; text-align: left;
    font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-secondary); border-bottom: 2px solid var(--border); white-space: nowrap;
}
#data-table td {
    padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-light);
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary);
}
#data-table tr:hover td { background: var(--green-subtle); }
.cell-1 {
    display: inline-block; width: 18px; height: 18px; background: var(--accent);
    color: #fff; text-align: center; line-height: 18px; border-radius: 4px; font-size: 0.65rem;
}
.cell-0 {
    display: inline-block; width: 18px; height: 18px; background: var(--bg-secondary);
    color: var(--text-muted); text-align: center; line-height: 18px; border-radius: 4px; font-size: 0.65rem;
}

/* ========================================
   Missingness / Coverage bars
   ======================================== */
.miss-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 6px; font-size: 0.8rem; }
.miss-row.miss-overall { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.miss-row.miss-pipeline { font-size: 0.78rem; }
.miss-row.miss-indicator { font-size: 0.78rem; }
.miss-label {
    width: 240px; flex-shrink: 0; font-family: var(--font-mono); font-size: 0.72rem;
    text-align: right; color: var(--text-secondary);
}
.miss-track { flex: 1; height: 12px; background: rgba(220, 38, 38, 0.10); border-radius: 3px; overflow: hidden; }
.miss-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.5s ease; }
.miss-stats {
    width: 280px; flex-shrink: 0; font-family: var(--font-mono); font-size: 0.7rem;
    color: var(--text-muted); display: flex; gap: 4px; align-items: baseline;
}
.miss-coded { font-weight: 600; color: var(--text-secondary); }
.miss-pct   { color: var(--text-muted); }
.miss-missing { color: #dc2626; font-size: 0.65rem; }

/* ========================================
   IRT Analysis
   ======================================== */
.irt-intro { margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.irt-fit-cards { margin-bottom: 1.5rem; }

.irt-model-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.irt-model-list li {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-light);
}
.irt-model-list li:last-child { border-bottom: none; }
.irt-model-list li::before {
    content: '·';
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1.4;
}
.irt-model-list strong { color: var(--text-primary); font-weight: 600; }
.irt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.irt-plot-container { min-height: 280px; }

.irt-svg { width: 100%; height: auto; font-family: var(--font-mono); }
.irt-svg .tick-label { font-size: 10px; fill: var(--text-muted); }
.irt-svg .axis-label-svg { font-size: 11px; fill: var(--text-secondary); font-weight: 500; }
.irt-svg .legend-label { font-size: 10px; fill: var(--text-secondary); }

.irt-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.irt-table th {
    background: var(--bg-secondary); padding: 0.55rem 0.75rem; text-align: left;
    font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-secondary); border-bottom: 2px solid var(--border); white-space: nowrap;
}
.irt-table td {
    padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--border-light);
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary);
}
.irt-table tr:hover td { background: var(--green-subtle); }
.irt-table td.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pattern-key { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-muted); }
.item-color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* ========================================
   Leader ranking
   ======================================== */
.ranking-controls { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.ranking-controls input {
    flex: 1; min-width: 200px; padding: 0.55rem 1rem;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--font-sans); font-size: 0.875rem;
    background: var(--bg-card); color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ranking-controls input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--green-subtle); }
.ranking-toggle { font-size: 0.82rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }

/* ========================================
   Codebook
   ======================================== */
.codebook-intro { margin-bottom: 2rem; }
.codebook-intro p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; line-height: 1.7; }
.codebook-section { margin-bottom: 2.5rem; }
.codebook-section h3 {
    font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); position: relative;
}
.codebook-section h3::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 36px; height: 2px; background: var(--accent);
}
.codebook-entry {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.25rem; margin-bottom: 1rem; box-shadow: 0 1px 4px var(--shadow);
    transition: box-shadow var(--transition-fast);
}
.codebook-entry:hover { box-shadow: 0 4px 14px var(--shadow-hover); }
.codebook-entry h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.2rem; color: var(--text-primary); }
.cb-source { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); margin-bottom: 0.6rem; }
.codebook-entry p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 0.5rem; }
.codebook-entry ul { padding-left: 1.5rem; margin-top: 0.5rem; }
.codebook-entry li { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
code {
    font-family: var(--font-mono); font-size: 0.8em;
    background: var(--green-subtle); color: var(--accent);
    padding: 0.1em 0.4em; border-radius: 3px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .irt-grid { grid-template-columns: 1fr; }
    header h1 { font-size: 0.95rem; }
    .subtitle { display: none; }
    main { padding: 1rem; padding-top: calc(var(--nav-height) + 46px + 1rem); }
}

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