:root {
    --primary:        #1a365d;
    --accent:         #2b77e6;
    --accent-light:   #e8f0fe;
    --text-primary:   #1a202c;
    --text-secondary: #4a5568;
    --text-muted:     #718096;
    --border:         #e2e8f0;
    --bg:             #f7f8fc;
    --card-bg:        #ffffff;
    --shadow:         0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-hover:   0 4px 16px rgba(0,0,0,0.10);

    --color-us:               #2b77e6;
    --color-texas:            #d4500a;
    --color-dfw:              #0f9b6e;
    --color-lubbock:          #7c3aed;
    --color-target:           #a0aec0;
    --color-natural-lw:       #d97706;
    --color-natural-richmond: #0891b2;
    --color-ffr:              #e53e3e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
}

/* ── HEADER ─────────────────────────────────────────────────────────────── */
header {
    background: var(--primary);
    padding: 28px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 3px;
}

.header-meta {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* ── TAB NAV ─────────────────────────────────────────────────────────────── */
.tab-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 22px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
    background: var(--accent-light);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ── MAIN CONTENT ────────────────────────────────────────────────────────── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 28px 60px;
}

.tab-content        { display: none; }
.tab-content.active { display: block; }

/* ── SECTION HEADER ──────────────────────────────────────────────────────── */
.section-header {
    margin-bottom: 28px;
}

.section-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-desc {
    font-size: 0.915rem;
    color: var(--text-secondary);
    max-width: 840px;
    line-height: 1.75;
}

/* ── CHARTS GRID ─────────────────────────────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 24px 24px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}

.chart-card:hover {
    box-shadow: var(--shadow-hover);
}

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

.chart-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: -0.1px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* ── DATA SOURCE ─────────────────────────────────────────────────────────── */
.data-source {
    font-size: 0.775rem;
    color: var(--text-muted);
    padding: 14px 18px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border);
    line-height: 1.65;
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer {
    background: var(--primary);
    padding: 32px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

footer p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 6px;
}

footer a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

footer a:hover { color: #fff; }

.footer-disclaimer {
    font-size: 0.775rem;
    color: rgba(255,255,255,0.38);
    margin-top: 8px;
    margin-bottom: 0;
}

/* ── METHODOLOGY ─────────────────────────────────────────────────────────── */
.methodology-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.methodology-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 32px;
}

.methodology-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.methodology-item {
    margin-bottom: 24px;
}

.methodology-item:last-child {
    margin-bottom: 0;
}

.methodology-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.methodology-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 8px 0;
}

.methodology-item p:last-child {
    margin-bottom: 0;
}

.methodology-item strong {
    color: var(--text);
}

/* ── RESPONSIVE — iPad (portrait and landscape) ──────────────────────────── */
@media (max-width: 1024px) {
    main                  { padding: 28px 20px 52px; }
    .chart-wrapper        { height: 260px; }
    .methodology-section  { padding: 22px 24px; }
}

/* ── RESPONSIVE — tablets and large phones ───────────────────────────────── */
@media (max-width: 768px) {
    /* Header */
    header                { padding: 20px 0; }
    header h1             { font-size: 1.5rem; }
    .header-content       { flex-direction: column; align-items: flex-start; gap: 6px; }
    .header-meta          { font-size: 0.75rem; }

    /* Tab nav — scrollable row so buttons never wrap or overflow */
    .nav-container        {
        padding: 0 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;          /* Firefox */
    }
    .nav-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */
    .tab-btn              { padding: 13px 14px; font-size: 0.8rem; flex-shrink: 0; }

    /* Layout */
    main                  { padding: 20px 14px 44px; }
    .charts-grid          { grid-template-columns: 1fr; gap: 14px; }
    .chart-card.wide      { grid-column: 1; }
    .chart-card           { padding: 18px 16px 14px; }
    .chart-wrapper        { height: 240px; }

    /* Typography */
    .section-header h2    { font-size: 1.2rem; }
    .section-desc         { font-size: 0.875rem; }
    .chart-card h3        { font-size: 0.825rem; margin-bottom: 12px; }

    /* Methodology */
    .methodology-section  { padding: 18px 16px; }
    .methodology-item h4  { font-size: 0.85rem; }
    .methodology-item p   { font-size: 0.825rem; }

    /* Footer */
    footer                { padding: 24px 0; }
    footer p              { font-size: 0.8rem; }
}

/* ── RESPONSIVE — iPhone (small phones) ─────────────────────────────────── */
@media (max-width: 430px) {
    header h1             { font-size: 1.3rem; }
    .tab-btn              { padding: 12px 12px; font-size: 0.75rem; }
    main                  { padding: 16px 12px 40px; }
    .chart-wrapper        { height: 210px; }
    .section-desc         { font-size: 0.845rem; }
}
