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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

.calculator-section {
    padding: 3rem 0;
}

.calculator-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.calculator-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-label span {
    font-weight: 500;
}

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

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

input[type="number"],
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    padding-left: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

select {
    padding-left: 0.75rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.deduction-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.deduction-row label {
    margin-bottom: 0;
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    width: 100%;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #475569;
}

.results-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.results-section h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.result-card.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
}

.result-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.result-card.primary h4 {
    opacity: 1;
}

.result-card .amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.result-card .frequency {
    font-size: 0.875rem;
    opacity: 0.9;
}

.chart-container {
    margin: 2rem 0;
}

.chart-container h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.bar-chart {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-label {
    width: 160px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.chart-bar-container {
    flex: 1;
    height: 32px;
    background: #e5e7eb;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    transition: width 0.5s ease;
}

.chart-bar-fill.take-home {
    background: var(--success-color);
}

.chart-bar-fill.federal-tax {
    background: #ef4444;
}

.chart-bar-fill.state-tax {
    background: #f59e0b;
}

.chart-bar-fill.fica {
    background: #8b5cf6;
}

.chart-bar-fill.deductions {
    background: #06b6d4;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.breakdown-table tr {
    border-bottom: 1px solid var(--border-color);
}

.breakdown-table td {
    padding: 0.75rem;
}

.breakdown-table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.breakdown-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.annual-summary {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.annual-summary h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 6px;
}

.summary-item span {
    color: var(--text-light);
}

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

.content-section {
    background: var(--white);
    padding: 3rem 0;
}

.main-content {
    max-width: 800px;
    margin: 0 auto;
}

.main-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.main-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.main-content p {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.8;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h3 {
    color: var(--white);
    margin-top: 0;
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--white);
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.cta-box .btn-primary {
    background: var(--white);
    color: var(--primary-color);
    width: auto;
    display: inline-block;
}

.cta-box .btn-primary:hover {
    background: var(--bg-light);
}

.related-articles {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
}

.related-articles h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.related-articles ul {
    list-style: none;
}

.related-articles li {
    margin-bottom: 0.75rem;
}

.related-articles a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.related-articles a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.hidden {
    display: none !important;
}

@media print {
    header,
    footer,
    .calculator-card,
    .btn-secondary {
        display: none;
    }
    
    .results-section {
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .calculator-card,
    .results-section {
        padding: 1.5rem;
    }
    
    .deduction-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .result-card .amount {
        font-size: 1.5rem;
    }
    
    .chart-label {
        width: 100px;
        font-size: 0.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
}