/* ==========================================================================
   US Tax & Paycheck Suite - Modern, High-Performance Stylesheet
   Designed for Hostinger LiteSpeed/Apache Shared Hosting (< 20KB, 0 dependencies)
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --purple: #8b5cf6;
    
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--slate-50);
    color: var(--slate-800);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.max-w-800 { max-width: 800px; }
.max-w-900 { max-width: 900px; }

/* HEADER */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    color: var(--slate-900);
    font-weight: 700;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
}

.logo-badge {
    font-size: 0.75rem;
    background: var(--success);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--slate-600);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

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

.btn-outline-secondary {
    border-color: var(--slate-300);
    color: var(--slate-700);
    background: var(--white);
}

.btn-outline-secondary:hover {
    background-color: var(--slate-100);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    padding: 60px 0 80px;
    text-align: center;
}

.hero-container {
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.3);
    color: #93c5fd;
    border: 1px solid rgba(147, 197, 253, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--slate-300);
    margin-bottom: 36px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* CARDS */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--slate-900);
}

.card-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 8px;
}

.card-body {
    padding: 20px;
}

/* QUICK CALC CARD (HERO) */
.quick-calc-card {
    color: var(--slate-800);
    text-align: left;
    margin-top: 20px;
    box-shadow: var(--shadow-lg);
    border: none;
}

.quick-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px;
    align-items: flex-end;
}

.quick-result-box {
    background: var(--slate-50);
    border-top: 1px solid var(--slate-200);
    padding: 20px 24px;
}

.result-highlight-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.result-metric .metric-label {
    font-size: 0.85rem;
    color: var(--slate-500);
    font-weight: 600;
    text-transform: uppercase;
}

.result-metric .metric-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 4px 0;
}

.result-metric .metric-sub {
    font-size: 0.85rem;
    color: var(--slate-600);
}

/* FORMS */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--slate-800);
    background-color: var(--white);
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-prefix-wrapper, .input-suffix-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 12px;
    color: var(--slate-500);
    font-weight: 600;
    pointer-events: none;
}

.input-prefix-wrapper .form-control {
    padding-left: 28px;
}

.input-suffix {
    position: absolute;
    right: 12px;
    color: var(--slate-500);
    font-weight: 600;
    pointer-events: none;
}

.input-suffix-wrapper .form-control {
    padding-right: 28px;
}

.font-bold { font-weight: 700; }
.form-hint {
    font-size: 0.75rem;
    color: var(--slate-500);
    margin-top: 4px;
    display: block;
}

/* SLIDERS */
.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--slate-200);
    outline: none;
    cursor: pointer;
}

/* BUTTON TOGGLE GROUP */
.button-group {
    display: flex;
    background: var(--slate-100);
    padding: 4px;
    border-radius: var(--radius-sm);
    gap: 4px;
}

.btn-toggle {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-600);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-toggle.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ACCORDIONS */
.accordion-item {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--slate-50);
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-700);
    cursor: pointer;
    text-align: left;
}

.accordion-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

.accordion-content {
    padding: 14px;
    background: var(--white);
    border-top: 1px solid var(--slate-200);
}

/* RADIO ROW */
.radio-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--slate-700);
    cursor: pointer;
}

/* CALCULATOR PAGE LAYOUT */
.calculator-page-header {
    background: var(--slate-900);
    color: var(--white);
    padding: 30px 0;
}

.breadcrumb-nav {
    font-size: 0.85rem;
    color: var(--slate-400);
    margin-bottom: 8px;
}

.breadcrumb-nav a {
    color: var(--slate-300);
}

.breadcrumb-nav a:hover {
    color: var(--white);
}

.page-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--slate-300);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

/* RESULT CARD */
.result-card {
    padding: 24px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--slate-200);
}

.result-subtitle {
    font-size: 0.9rem;
    color: var(--slate-500);
    font-weight: 600;
}

.result-main-amount {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 4px;
}

.frequency-tabs {
    display: flex;
    background: var(--slate-100);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    gap: 4px;
}

.freq-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-600);
    border-radius: 4px;
    cursor: pointer;
}

.freq-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.freq-display-box {
    margin-top: 14px;
    background: var(--slate-50);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.freq-title {
    font-weight: 600;
    color: var(--slate-600);
}

.freq-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--success-dark);
}

/* DISTRIBUTION BAR */
.distribution-bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-600);
    margin-bottom: 6px;
}

.distribution-bar {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: var(--slate-200);
}

.bar-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.bar-takehome { background-color: var(--success); }
.bar-federal { background-color: var(--primary); }
.bar-state { background-color: var(--purple); }
.bar-fica { background-color: var(--danger); }

.distribution-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--slate-600);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.bg-green { background-color: var(--success); }
.bg-blue { background-color: var(--primary); }
.bg-purple { background-color: var(--purple); }
.bg-red { background-color: var(--danger); }
.bg-light { background-color: #f1f5f9; }

/* TABLES */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table th, .table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--slate-200);
}

.table th {
    background: var(--slate-50);
    font-weight: 600;
    color: var(--slate-700);
    text-align: left;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.table-row-tax td {
    background-color: #fdfdfd;
}

.table-row-total td {
    background-color: var(--slate-50);
    border-top: 2px solid var(--slate-300);
    border-bottom: 2px solid var(--slate-300);
}

.table-row-net td {
    background-color: rgba(16, 185, 129, 0.08);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.font-lg { font-size: 1.15rem; }

/* BRACKET TABLE */
.bracket-table th, .bracket-table td {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* BADGES */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1;
}

.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-lg { padding: 6px 12px; font-size: 0.85rem; }

.text-success { color: var(--success-dark); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--slate-500); }

/* QUICK GRID STATES */
.states-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.state-pill-item {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: all 0.15s ease;
}

.state-pill-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.state-pill-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 8px;
    color: var(--slate-800);
}

.state-abbr {
    font-weight: 800;
    color: var(--primary);
    width: 26px;
}

.state-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.state-tax-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.tag-none { background: #dcfce7; color: #166534; }
.tag-flat { background: #e0f2fe; color: #075985; }
.tag-prog { background: #f1f5f9; color: #475569; }

/* SECTIONS */
.section {
    padding: 60px 0;
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.section-desc {
    color: var(--slate-600);
    font-size: 1.05rem;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.feature-card {
    padding: 28px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 16px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-text {
    color: var(--slate-600);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.feature-link {
    font-weight: 600;
    font-size: 0.9rem;
}

/* FAQ ACCORDION */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    font-weight: 700;
    color: var(--slate-900);
    cursor: pointer;
    background: var(--white);
}

.faq-answer {
    padding: 0 20px 16px;
    color: var(--slate-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-answer ul {
    margin-left: 20px;
    margin-top: 8px;
}

/* SEO ARTICLES */
.tax-guide-article h2 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--slate-900);
}

.tax-guide-article h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--slate-800);
}

.tax-guide-article p {
    margin-bottom: 14px;
    color: var(--slate-700);
}

.tax-guide-article ul {
    margin-left: 24px;
    margin-bottom: 16px;
    color: var(--slate-700);
}

/* FOOTER */
.site-footer {
    background: var(--slate-900);
    color: var(--slate-300);
    padding: 60px 0 30px;
    font-size: 0.9rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.footer-logo {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.footer-desc {
    color: var(--slate-400);
    font-size: 0.85rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

.footer-heading {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--slate-400);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-disclaimer {
    border-top: 1px solid var(--slate-800);
    padding-top: 24px;
    margin-bottom: 24px;
    font-size: 0.8rem;
    color: var(--slate-500);
    line-height: 1.5;
}

.footer-bottom {
    border-top: 1px solid var(--slate-800);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--slate-500);
}

/* UTILS */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 32px; padding-bottom: 32px; }
.p-3 { padding: 12px; }
.mb-4 { margin-bottom: 16px; }
.ml-2 { margin-left: 8px; }
.icon-inline { vertical-align: middle; margin-right: 4px; }

/* MOBILE RESPONSIVE ENHANCEMENTS */
@media (max-width: 576px) {
    .header-container {
        flex-wrap: wrap;
        gap: 12px;
    }
    .site-nav {
        gap: 12px;
    }
    .nav-link {
        font-size: 0.85rem;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .button-group {
        flex-wrap: wrap;
    }
    .btn-toggle {
        min-width: 45%;
        text-align: center;
    }
    .frequency-tabs {
        flex-wrap: wrap;
    }
    .freq-tab {
        min-width: 30%;
    }
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .result-main-amount {
        font-size: 2rem;
    }
}
