/* State Benefits Stacker — Styles */

:root {
    --primary: #1a365d;
    --primary-light: #2b6cb0;
    --accent: #e53e3e;
    --accent-gold: #C4A55A;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #ffffff;
    --bg-page: #edf2f7;
    --bg-surface: #f7fafc;
    --bg-card: #ffffff;
    --border-color: #cbd5e0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --green: #276749;
    --green-light: #38a169;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    padding: 24px;
    margin: 0;
    line-height: 1.5;
}

/* ─── HEADER ───────────────────────────────────────────────── */

.header-container {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 24px;
    position: relative;
}

.brand-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    position: relative;
}

.home-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--text-light);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    font-weight: 600;
    transition: background 0.2s;
}

.home-btn:hover { background: var(--primary-light); }

.brand-name { font-size: 1.3em; font-weight: 700; }
.brand-the, .brand-better { color: var(--primary); }
.brand-veteran { color: var(--accent-gold); }

h1 {
    font-size: 1.6em;
    color: var(--primary);
    margin: 8px 0 4px;
    line-height: 1.2;
}

.tool-subtitle {
    color: var(--text-secondary);
    font-size: 1em;
    margin: 0;
}

/* ─── INPUT FORM ───────────────────────────────────────────── */

.inputs-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto 24px;
    align-items: start;
}

/* Right side: Lifestyle | [What Do You Value + Where Do You Live stacked] */
.inputs-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

/* Right-of-right: flex column so the two cards stack flush */
.inputs-right-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.input-group-header {
    padding: 16px 20px 0;
}

.input-group-header h2 {
    margin: 0;
    font-size: 1.1em;
    color: var(--primary);
}

.input-group {
    padding: 12px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-top: 4px;
}

select, input[type="text"], input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1em;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-with-prefix:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.input-prefix {
    padding: 10px 8px 10px 12px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
    border-right: 1px solid var(--border-color);
}

.input-with-prefix input {
    border: none;
    border-radius: 0;
    padding-left: 8px;
}

.input-with-prefix input:focus { box-shadow: none; }

.input-hint {
    font-size: 0.82em;
    color: var(--text-secondary);
    margin: -4px 0 0;
    line-height: 1.4;
}

/* ─── LIFESTYLE INPUTS ─────────────────────────────────────── */

.terrain-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    margin: 0;
}

.checkbox-pill:hover { border-color: var(--primary-light); }

.checkbox-pill:has(input:checked) {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.checkbox-pill input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--text-light);
}

.values-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.value-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    margin: 0;
}

.value-pill:hover { border-color: var(--primary-light); }

.value-pill:has(input:checked) {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.value-pill input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--text-light);
}

/* Lifestyle match indicator on state cards */
.lifestyle-match {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78em;
    color: var(--text-secondary);
    margin-top: 2px;
}

.lifestyle-match-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: 500;
}

.lifestyle-match-tag.good { background: #c6f6d5; color: var(--green); }
.lifestyle-match-tag.neutral { background: #fefcbf; color: #975a16; }
.lifestyle-match-tag.poor { background: #fed7d7; color: #c53030; }

.dimmed-card { opacity: 0.45; }
.dimmed-card:hover { opacity: 0.7; }

.hero-lifestyle {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.hero-why {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 0.78em;
    line-height: 1.5;
    text-align: left;
    color: rgba(255,255,255,0.9);
}
.hero-why-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85em;
    opacity: 0.75;
    display: block;
    margin-bottom: 3px;
}

/* COL-adjusted purchasing power — hero cards */
.hero-col-adjusted {
    font-size: 0.75em;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
    margin-bottom: 4px;
    cursor: help;
}

/* COL-adjusted purchasing power — state list cards */
.state-col-adjusted {
    font-size: 0.7em;
    color: var(--text-secondary);
    margin-top: 1px;
    cursor: help;
}

/* "vs. current state" delta — hero cards */
.hero-delta {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.hero-delta.delta-positive {
    background: rgba(72, 199, 142, 0.25);
    color: #d4f5e6;
    border: 1px solid rgba(72, 199, 142, 0.4);
}
.hero-delta.delta-negative {
    background: rgba(255, 100, 100, 0.2);
    color: #ffd6d6;
    border: 1px solid rgba(255, 100, 100, 0.35);
}
.hero-delta.delta-current {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* "vs. current state" delta — state list cards */
.state-delta {
    font-size: 0.72em;
    font-weight: 600;
    margin-top: 3px;
    white-space: nowrap;
}
.state-delta.delta-positive { color: #2e9e6b; }
.state-delta.delta-negative { color: #c0392b; }
.state-delta.delta-current  { color: #666; font-weight: 400; }

.current-state-note {
    text-align: center;
    font-size: 0.9em;
    color: var(--navy);
    font-weight: 500;
    margin: -4px 0 12px;
    padding: 8px 16px;
    background: rgba(42, 62, 99, 0.06);
    border-radius: 8px;
    border-left: 3px solid var(--green);
}

.lifestyle-filter-note {
    text-align: center;
    font-size: 0.85em;
    color: var(--green);
    font-weight: 500;
    margin: 0 0 12px;
}

/* ─── FEDERAL NOTE ────────────────────────────────────────── */

.federal-note {
    max-width: 1100px;
    margin: 0 auto 20px;
    padding: 12px 18px;
    font-size: 0.85em;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border-left: 3px solid var(--accent-gold);
    border-radius: var(--radius-sm);
}

/* ─── RESULTS ──────────────────────────────────────────────── */

.section-container {
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 28px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.section-container h2 {
    color: var(--primary);
    margin: 0 0 4px;
    font-size: 1.25em;
}

.section-subtitle {
    color: var(--text-secondary);
    margin: 0 0 20px;
    font-size: 0.9em;
}

/* Top 3 Hero Cards */
.top-states-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hero-card {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: var(--text-light);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    position: relative;
}

.hero-card.rank-1 { background: linear-gradient(135deg, var(--green), #2f855a); }
.hero-card.rank-2 { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.hero-card.rank-3 { background: linear-gradient(135deg, #4a5568, #718096); }

.hero-rank {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 4px;
}

.hero-state {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-savings {
    font-size: 2em;
    font-weight: 800;
    line-height: 1.1;
}

.hero-label {
    font-size: 0.75em;
    opacity: 0.8;
    margin-top: 4px;
}

/* Filter bar */
#filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.region-toggle {
    display: flex;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.region-btn {
    padding: 7px 14px;
    font-size: 0.85em;
    font-weight: 600;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid var(--border-color);
}

.region-btn:last-child { border-right: none; }
.region-btn:hover { background: var(--bg-surface); color: var(--text-primary); }

.region-btn.active {
    background: var(--primary);
    color: var(--text-light);
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-control label {
    margin: 0;
    white-space: nowrap;
}

.sort-control select {
    width: auto;
    min-width: 200px;
}

/* Remaining states collapse */
.remaining-states.collapsed {
    display: none;
}

.show-all-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.show-all-btn:hover {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

/* State Cards */
.state-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

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

.state-card-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    gap: 12px;
    background: var(--bg-surface);
    user-select: none;
}

.state-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
}

.state-rank.top-3 { background: var(--green); }

.state-name-col {
    flex: 1;
    min-width: 0;
}

.state-name-col h3 {
    margin: 0;
    font-size: 1em;
    color: var(--text-primary);
}

.state-name-col .state-abbr {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-left: 6px;
    font-weight: 400;
}

.state-savings-col {
    text-align: right;
    flex-shrink: 0;
}

.state-savings-amount {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--green);
}

.state-savings-label {
    font-size: 0.72em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.state-toggle {
    color: var(--text-secondary);
    font-size: 0.8em;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.state-card.expanded .state-toggle { transform: rotate(180deg); }

/* State card detail body */
.state-card-body {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--border-color);
}

.state-card.expanded .state-card-body { display: block; }

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.benefit-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
}

.benefit-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.benefit-category {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.benefit-value {
    font-weight: 700;
    font-size: 0.9em;
}

.benefit-value.dollar { color: var(--green); }
.benefit-value.cost { color: var(--accent); }
.benefit-value.available { color: var(--green-light); }
.benefit-value.unavailable { color: var(--text-secondary); opacity: 0.6; }

.benefit-detail {
    font-size: 0.82em;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 0;
}


/* ─── STATE DEEP DIVE ─────────────────────────────────────── */

.deep-dive-selects {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.deep-dive-selects select {
    flex: 1;
    max-width: 320px;
}

.compare-vs {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.deep-dive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.deep-dive-state-name {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
}

.deep-dive-state-name .abbr {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.7em;
    margin-left: 6px;
}

.deep-dive-savings {
    text-align: right;
}

.deep-dive-savings .amount {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--green);
}

.deep-dive-savings .label {
    font-size: 0.75em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.deep-dive-section {
    margin-bottom: 24px;
}

.deep-dive-section-title {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.deep-dive-program {
    padding: 12px 14px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.deep-dive-program-name {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.deep-dive-program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.deep-dive-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78em;
    font-weight: 500;
}

.deep-dive-tag.green { background: #c6f6d5; color: var(--green); }
.deep-dive-tag.blue { background: #bee3f8; color: #2b6cb0; }
.deep-dive-tag.gray { background: #e2e8f0; color: var(--text-secondary); }
.deep-dive-tag.gold { background: #fefcbf; color: #975a16; }

.deep-dive-program-detail {
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

/* Comparison summary blurb */
.compare-summary {
    background: rgba(42, 62, 99, 0.06);
    border-left: 3px solid var(--green);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.92em;
    line-height: 1.6;
    color: var(--navy);
    font-weight: 500;
}

/* Comparison layout */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.compare-column {
    min-width: 0;
}

.compare-column-header {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.compare-column-header.col-a {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: var(--text-light);
}

.compare-column-header.col-b {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-light);
}

.compare-column-header .compare-state-name {
    font-size: 1.3em;
    font-weight: 700;
}

.compare-column-header .compare-savings {
    font-size: 1.6em;
    font-weight: 800;
    margin-top: 4px;
}

.compare-column-header .compare-label {
    font-size: 0.72em;
    opacity: 0.8;
    margin-top: 2px;
}

.compare-row {
    display: contents;
}

.compare-cell {
    padding: 12px 14px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    position: relative;
}

.compare-cell.winner {
    border-left: 3px solid var(--green);
}

.compare-category-label {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin: 20px 0 6px;
    grid-column: 1 / -1;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.compare-category-label:first-of-type {
    margin-top: 0;
}

.compare-cell-value {
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 4px;
}

.compare-cell-value.positive { color: var(--green); }
.compare-cell-value.negative { color: var(--accent); }

.compare-cell-detail {
    font-size: 0.82em;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.deep-dive-note-box {
    padding: 12px 16px;
    margin-top: 10px;
    background: #fffbeb;
    border-left: 3px solid var(--accent-gold);
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    line-height: 1.5;
    color: var(--text-primary);
}

.deep-dive-note {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

/* VA Medical Center line */
.vamc-line {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85em;
    color: var(--text-secondary);
}

.vamc-line a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.vamc-line a:hover { text-decoration: underline; }

/* ─── EMAIL FORM ───────────────────────────────────────────── */

.email-results-form { margin-top: 12px; }

.email-form-row {
    display: flex;
    gap: 10px;
}

.email-form-row input { flex: 1; }

.email-status {
    font-size: 0.85em;
    margin-top: 8px;
}

.email-status.email-success { color: var(--green); }
.email-status.email-error { color: var(--accent); }

/* ─── BUTTONS ──────────────────────────────────────────────── */

.action-btn {
    background: var(--primary);
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.action-btn:hover { background: var(--primary-light); }
.action-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.action-btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.action-btn-secondary:hover {
    background: var(--primary);
    color: var(--text-light);
}

.action-bar {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto 24px;
}

/* ─── MORE TOOLS & FOOTER ──────────────────────────────────── */

.more-tools {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.more-tools h3 {
    font-size: 1rem;
    color: #999;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.tools-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.tools-links a {
    color: #C5A55A;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.tools-links a:hover {
    color: #e0c675;
    text-decoration: underline;
}

footer {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.8em;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-bottom: 32px;
}

footer a { color: var(--primary-light); }

.footer-sources {
    font-size: 0.9em;
    margin-top: 8px;
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */

@media (max-width: 768px) {
    body { padding: 12px; }

    h1 { font-size: 1.3em; }

    .home-btn {
        position: static;
        display: inline-block;
        margin-bottom: 8px;
    }

    .brand-header {
        flex-direction: column;
        gap: 4px;
    }

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

    .inputs-right {
        grid-template-columns: 1fr;
    }

    .top-states-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-savings { font-size: 1.6em; }

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

    .email-form-row {
        flex-direction: column;
    }

    .email-form-row button { width: 100%; }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-bar button { width: 100%; }

    #filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .region-toggle { justify-content: stretch; }
    .region-btn { flex: 1; text-align: center; }

    .sort-control { flex-direction: column; }
    .sort-control select { width: 100%; min-width: unset; }

    .deep-dive-selects { flex-direction: column; }
    .deep-dive-selects select { max-width: none; }
    .compare-vs { display: none; }

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

    .section-container { padding: 20px 16px; }
}

/* ─── PRINT ────────────────────────────────────────────────── */

@media print {
    body { padding: 0; background: white; }

    .no-print, .action-bar, #email-results-container, .inputs-grid,
    .more-tools, #filter-bar { display: none !important; }

    .section-container {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .hero-card {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .state-card-body { display: block !important; }
    .state-card { page-break-inside: avoid; }

    footer { page-break-before: always; }
}
