/* ============================================================
   PaycheckWiz.com — Stylesheet
   Mobile-first, no external dependencies, Core Web Vitals optimized
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    --brand-primary: #0d9488;
    /* teal-600  */
    --brand-dark: #0f766e;
    /* teal-700  */
    --brand-light: #ccfbf1;
    /* teal-100  */
    --brand-accent: #f59e0b;
    /* amber-400 */
    --brand-accent-dk: #d97706;
    /* amber-500 */

    --green-pos: #10b981;
    --red-neg: #ef4444;

    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --bg-result: #f0fdfa;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border: #e2e8f0;
    --border-focus: #0d9488;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Roboto Mono', 'Courier New', monospace;

    --transition: 180ms ease;
    --max-w: 1120px;
    --header-h: 60px;
}

/* Dark mode */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --bg-result: #134e4a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .4);
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
    transition: background var(--transition), color var(--transition);
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: 16px;
    box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.logo-text span {
    color: var(--brand-primary);
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}

.site-nav a:hover {
    background: var(--bg-input);
    color: var(--text-primary);
    text-decoration: none;
}

.btn-theme {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.btn-theme:hover {
    background: var(--border);
}

/* ── Dropdown Nav ──────────────────────────────────────────── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>.nav-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: background var(--transition), color var(--transition);
}

.nav-dropdown>.nav-trigger:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.nav-trigger .chevron {
    font-size: .6rem;
    transition: transform var(--transition);
    opacity: .6;
}

.nav-dropdown.open .nav-trigger .chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 200;
    margin-top: 4px;
}

.nav-dropdown.open .dropdown-menu {
    display: block;
    animation: dropFade .15s ease;
}

@keyframes dropFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--bg-input);
    color: var(--brand-primary);
    text-decoration: none;
}

.dropdown-menu .dd-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-menu .dd-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* ── Hero / Page Header ─────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    color: var(--text-inverse);
    padding: 40px 0 32px;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.page-hero p {
    font-size: clamp(.95rem, 2vw, 1.1rem);
    opacity: .9;
    max-width: 600px;
    margin-inline: auto;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
}

/* ── Ad Slots ───────────────────────────────────────────────── */
.ad-slot {
    width: 100%;
    background: var(--bg-input);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ad-slot--banner {
    height: 90px;
    margin: 16px 0;
}

.ad-slot--sidebar {
    height: 250px;
}

.ad-slot--in-content {
    height: 120px;
    margin: 24px 0;
}

/* ── Main Layout ────────────────────────────────────────────── */
.page-body {
    padding: 24px 0 48px;
}

.layout--with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
    min-width: 0;
}

.layout--with-sidebar>* {
    min-width: 0;
}

.layout--full {
    max-width: 780px;
    margin-inline: auto;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    max-width: 100%;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-icon {
    width: 32px;
    height: 32px;
    background: var(--brand-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.card-body {
    padding: 20px;
    min-width: 0;
    overflow-x: auto;
}

/* ── Calculator Form ────────────────────────────────────────── */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row--full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.input-wrap {
    position: relative;
}

.input-wrap .prefix,
.input-wrap .suffix {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .9rem;
    pointer-events: none;
    font-family: var(--font-mono);
}

.input-wrap .prefix {
    left: 12px;
}

.input-wrap .suffix {
    right: 12px;
}

.input-wrap input,
.input-wrap select {
    padding-left: 32px;
}

.input-wrap.no-prefix input,
.input-wrap.no-prefix select {
    padding-left: 12px;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: var(--font-sans);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* Frequency tabs */
.freq-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.freq-tab {
    padding: 8px 4px;
    border: none;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
    text-align: center;
}

.freq-tab.active {
    background: var(--bg-card);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

/* ── Results Panel ──────────────────────────────────────────── */
.results-panel {
    background: var(--bg-result);
    border: 1.5px solid var(--brand-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 20px;
}

.results-panel.hidden {
    display: none;
}

.result-headline {
    text-align: center;
    margin-bottom: 16px;
}

.result-headline .label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}

.result-headline .amount {
    font-size: clamp(2rem, 6vw, 2.8rem);
    font-weight: 800;
    color: var(--brand-primary);
    font-family: var(--font-mono);
    line-height: 1.1;
}

.result-headline .period {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Breakdown bar */
.breakdown-bar {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    margin: 16px 0 12px;
    background: var(--border);
}

.breakdown-bar .seg {
    height: 100%;
    transition: width .4s ease;
}

.seg--net {
    background: var(--brand-primary);
}

.seg--fed {
    background: #f59e0b;
}

.seg--state {
    background: #8b5cf6;
}

.seg--fica {
    background: #06b6d4;
}

.breakdown-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.result-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row .r-label {
    color: var(--text-secondary);
}

.result-row .r-value {
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.result-row.r-total .r-label {
    font-weight: 700;
    color: var(--text-primary);
}

.result-row.r-total .r-value {
    color: var(--brand-primary);
    font-size: 1rem;
}

.result-row.r-deduction .r-value {
    color: var(--red-neg);
}

.result-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 20px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 600;
    border: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn:active {
    transform: scale(.98);
}

.btn--primary {
    background: var(--brand-primary);
    color: #fff;
    width: 100%;
    height: 48px;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(13, 148, 136, .3);
}

.btn--primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 6px 16px rgba(13, 148, 136, .4);
}

.btn--secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    flex: 1;
    font-size: .82rem;
}

.btn--secondary:hover {
    background: var(--border);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-widget {}

.sidebar-widget h3 {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}

.sidebar-links a:hover {
    background: var(--bg-input);
    color: var(--brand-primary);
    text-decoration: none;
}

.sidebar-links a .link-icon {
    font-size: 14px;
}

.sidebar-links a .link-vol {
    margin-left: auto;
    font-size: .72rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 1px 6px;
    border-radius: 999px;
}

/* ── Content Sections ───────────────────────────────────────── */
.content-section {
    margin-top: 32px;
}

.content-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-light);
}

.content-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
}

.content-section ul {
    list-style: disc;
    padding-left: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-section ul li {
    margin-bottom: 4px;
}

/* Info box */
.info-box {
    background: var(--brand-light);
    border-left: 4px solid var(--brand-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: .9rem;
    color: var(--text-primary);
}

[data-theme="dark"] .info-box {
    background: rgba(13, 148, 136, .15);
}

/* Warning box */
.warn-box {
    background: #fef3c7;
    border-left: 4px solid var(--brand-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: .9rem;
    color: #78350f;
}

[data-theme="dark"] .warn-box {
    background: rgba(245, 158, 11, .1);
    color: #fcd34d;
}

/* ── Data Table ─────────────────────────────────────────────── */
.data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    max-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.data-table th {
    background: var(--bg-input);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-input);
}

.data-table .highlight {
    font-weight: 600;
    color: var(--text-primary);
}

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: none;
    text-align: left;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background var(--transition);
}

.faq-question:hover {
    background: var(--bg-input);
}

.faq-question .faq-icon {
    font-size: 18px;
    color: var(--brand-primary);
    flex-shrink: 0;
    transition: transform var(--transition);
    font-style: normal;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 16px 14px;
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    background: var(--bg-card);
}

.faq-item.open .faq-answer {
    display: block;
}

/* ── State Grid (homepage) ──────────────────────────────────── */
.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
    text-decoration: none;
}

.state-card:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.state-card .state-abbr {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-primary);
}

/* ── Feature Cards (homepage) ───────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.feature-card .fc-icon {
    width: 40px;
    height: 40px;
    background: var(--brand-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.feature-card .fc-text .fc-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-card .fc-text .fc-desc {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 24px 0;
}

.stat-item {
    background: var(--bg-card);
    padding: 16px;
    text-align: center;
}

.stat-item .stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-primary);
    font-family: var(--font-mono);
}

.stat-item .stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 32px 0 24px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-brand p {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-col a {
    font-size: .85rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--brand-primary);
    text-decoration: none;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom p {
    font-size: .8rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--brand-primary);
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: rgba(255, 255, 255, .8);
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb .sep {
    opacity: .5;
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-4 {
    margin-top: 4px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-32 {
    margin-top: 32px;
}

.mb-16 {
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    .container,
    .card,
    .card-body,
    .results-panel {
        max-width: 100%;
        overflow-x: auto;
    }

    .data-table {
        font-size: .75rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 8px;
        white-space: nowrap;
    }

    :root {
        --header-h: 56px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
        box-shadow: var(--shadow-md);
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 2px;
    }

    .site-nav a {
        display: block;
        padding: 10px 12px;
    }

    .nav-dropdown>.nav-trigger {
        width: 100%;
        padding: 10px 12px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        margin-top: 0;
        padding: 0 0 0 12px;
        min-width: auto;
        background: transparent;
    }

    .nav-dropdown.open .dropdown-menu {
        animation: none;
    }

    .layout--with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 1;
    }

    .ad-slot--sidebar {
        height: 90px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .freq-tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }

    .state-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .breakdown-legend {
        grid-template-columns: 1fr 1fr;
    }

    .page-hero {
        padding: 28px 0 20px;
    }
}

@media (max-width: 480px) {
    .result-actions {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .freq-tabs {
        grid-template-columns: repeat(4, 1fr);
    }

    .freq-tab {
        font-size: .7rem;
        padding: 6px 2px;
    }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {

    .site-header,
    .site-footer,
    .ad-slot,
    .sidebar,
    .btn,
    .faq-question {
        display: none !important;
    }

    .layout--with-sidebar {
        grid-template-columns: 1fr;
    }

    body {
        background: #fff;
        color: #000;
    }
}