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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    color: #000;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #000;
}

.custom-logo {
    max-height: 80px;
    max-width: 200px;
    margin-bottom: 20px;
    object-fit: contain;
}

.logo-text {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 8px;
    color: #000;
    margin-bottom: 10px;
}

.logo-subtext {
    font-size: 24px;
    letter-spacing: 12px;
    color: #000;
}

.tagline {
    margin-top: 15px;
    font-style: italic;
    color: #666;
    font-size: 1.1em;
}

.contact-info {
    margin-top: 20px;
    font-size: 1.2em;
    color: #000;
    font-weight: 500;
}

.contact-info a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.2s ease;
}

.contact-info a:hover {
    border-bottom: 2px solid #000;
}

.contact-info i {
    margin-right: 8px;
}

h1 {
    color: #000;
    margin-bottom: 10px;
    font-size: 2.5em;
    text-align: center;
    font-weight: 400;
    letter-spacing: 1px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.highlight-box {
    background: #000;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.highlight-box h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 400;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.benefit-item {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    border-color: #000;
    transform: translateY(-2px);
}

.benefit-number {
    font-size: 2em;
    font-weight: bold;
    color: #000;
}

.benefit-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.section {
    margin-bottom: 30px;
    padding: 25px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.section h2 {
    color: #000;
    margin-bottom: 20px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
}

.icon {
    width: 30px;
    height: 30px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #000;
    font-weight: 500;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #fff;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #000;
}

/* Special styling for currency inputs */
input[placeholder*="$"] {
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 10%);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.radio-option:hover {
    border-color: #000;
    background: #f0f0f0;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

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

.btn {
    background: #000;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    display: block;
    margin: 40px auto 0;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.results {
    display: none;
    margin-top: 40px;
    padding: 30px;
    background: #f0f0f0;
    border-radius: 5px;
    border: 2px solid #000;
}

.results h2 {
    color: #000;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8em;
    font-weight: 400;
    letter-spacing: 2px;
}

.year-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.year-column {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.year-column h3 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
    font-size: 1.3em;
}

.old-law {
    opacity: 0.7;
}

.new-law {
    border: 2px solid #000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #000;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.result-value {
    font-size: 1.1em;
    color: #333;
}

.positive {
    color: #008000;
}

.negative {
    color: #cc0000;
}

.highlight-new {
    background: #fffacd;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}

.tax-summary {
    background: #000;
    color: #fff;
    padding: 25px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

.tax-summary h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: 1px;
}

.total-impact {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
}

.big-bill-savings {
    background: #ffeb3b;
    color: #000;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    border: 2px solid #000;
}

.big-bill-savings h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.savings-amount {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.disclaimer {
    margin-top: 30px;
    padding: 20px;
    background: #f0f0f0;
    border: 1px solid #999;
    border-radius: 5px;
    color: #333;
    font-size: 0.9em;
}

.help-text {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.contact-box {
    background: #000;
    color: #fff;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    text-align: center;
}

.contact-box h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.contact-box p {
    font-size: 1.2em;
    margin: 10px 0;
}

.contact-box a {
    color: #ffeb3b;
    text-decoration: none;
    font-weight: bold;
}

.profit-breakdown {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    border: 1px solid #28a745;
}

.profit-breakdown h4 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.profit-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #c3e6c3;
}

.profit-item:last-child {
    border-bottom: none;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #28a745;
}

.benefits-breakdown {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    border: 1px solid #2196f3;
}

.benefits-breakdown h4 {
    color: #1565c0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.benefit-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #bbdefb;
}

.benefit-detail:last-child {
    border-bottom: none;
}

.benefit-name {
    font-weight: 600;
    color: #1565c0;
}

.benefit-value {
    font-weight: bold;
    color: #2e7d32;
}

.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.error-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
}

@media (max-width: 768px) {
    body {
        padding: 5px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .container {
        padding: 15px;
        border-radius: 5px;
        margin: 0;
    }
    
    .logo-text {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .logo-subtext {
        font-size: 14px;
        letter-spacing: 2px;
    }
    
    .tagline {
        font-size: 0.9em;
    }
    
    .contact-info {
        font-size: 1em;
    }
    
    h1 {
        font-size: 1.4em;
        line-height: 1.3;
        text-align: center;
    }
    
    .subtitle {
        font-size: 0.95em;
        text-align: center;
    }
    
    .section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .section h2 {
        font-size: 1.1em;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 1em;
        margin-bottom: 8px;
        display: block;
    }
    
    .form-control {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        border-radius: 8px;
    }
    
    .form-select {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        padding: 15px 20px;
        font-size: 16px;
        min-height: 44px; /* Touch target size */
        border-radius: 8px;
    }
    
    .year-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .year-column {
        padding: 15px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .radio-option {
        padding: 15px;
        min-height: 44px; /* Touch target size */
        display: flex;
        align-items: center;
    }
    
    .benefit-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .benefit-item {
        padding: 15px;
        text-align: center;
    }
    
    .benefit-number {
        font-size: 1.5em;
    }
    
    .benefit-label {
        font-size: 0.85em;
    }
    
    /* Entity comparison table mobile optimization */
    .entity-comparison {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .entity-header, .entity-row {
        min-width: 600px; /* Ensure table doesn't get too cramped */
        font-size: 0.9em;
    }
    
    .entity-col {
        padding: 8px 4px;
        text-align: center;
    }
    
    /* Results section mobile improvements */
    .results {
        margin-top: 20px;
    }
    
    .result-item {
        padding: 12px;
        margin: 8px 0;
        flex-direction: column;
        text-align: center;
    }
    
    .result-label {
        margin-bottom: 5px;
        font-size: 0.9em;
    }
    
    .result-value {
        font-size: 1.1em;
    }
    
    /* Big bill savings mobile styling */
    .big-bill-savings {
        text-align: center;
        padding: 20px 15px;
    }
    
    .savings-amount {
        font-size: 2em;
        margin: 15px 0;
    }
    
    /* Benefits breakdown mobile */
    .benefits-breakdown, .profit-breakdown {
        padding: 15px;
        margin: 15px 0;
    }
    
    .benefit-detail, .profit-item {
        flex-direction: column;
        text-align: center;
        padding: 10px 0;
    }
    
    .benefit-name, .benefit-value {
        margin: 2px 0;
    }
    
    /* Contact box mobile */
    .contact-box {
        padding: 20px 15px;
        margin: 20px 0;
        text-align: center;
    }
    
    .contact-box h3 {
        font-size: 1.3em;
    }
    
    .contact-box p {
        font-size: 1em;
        margin: 8px 0;
    }
    
    /* Disclaimer mobile */
    .disclaimer {
        padding: 15px;
        font-size: 0.85em;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .logo-subtext {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .container {
        padding: 10px;
    }
    
    .section {
        padding: 10px;
    }
    
    .benefit-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .entity-header, .entity-row {
        min-width: 500px;
        font-size: 0.8em;
    }
    
    .savings-amount {
        font-size: 1.5em;
    }
}

/* Interactive tooltips */
.clickable-benefit {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-benefit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip styles handled via JavaScript for proper dynamic positioning */

/* Benefit grid hover effects */
.benefit-item.clickable-benefit {
    transition: all 0.3s ease;
}

.benefit-item.clickable-benefit:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-color: #007bff;
}

/* Benefit detail hover effects */
.benefit-detail.clickable-benefit:hover {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    margin: 5px -10px;
}

/* Next steps CTA responsive */
@media (max-width: 768px) {
    .next-steps-cta {
        padding: 20px 15px !important;
        margin: 20px 0 !important;
    }
    
    .next-steps-cta h3 {
        font-size: 1.2em !important;
    }
    
    .next-steps-cta div {
        flex-direction: column !important;
        align-items: center;
    }
    
    .next-steps-cta a {
        padding: 15px 25px !important;
        width: 200px;
        justify-content: center;
    }
}
    
    input[type="number"],
    input[type="text"],
    select {
        font-size: 16px;
    }
    
    .entity-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .entity-col:first-child {
        text-align: center;
        font-size: 16px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
}

/* Entity comparison table */
.entity-comparison {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.entity-table {
    margin-top: 20px;
}

.entity-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
}

.entity-header {
    background: #007bff;
    color: white;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.entity-row:nth-child(even) {
    background: rgba(0, 123, 255, 0.05);
}

.entity-col {
    text-align: center;
    font-weight: 500;
}

.entity-col:first-child {
    text-align: left;
    font-weight: 600;
}

.entity-recommendation {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 10px;
    text-align: center;
}

.entity-recommendation h4 {
    margin-bottom: 10px;
    font-size: 18px;
}

#recommended-entity {
    font-size: 16px;
    font-weight: 600;
}

/* Highlight selected entity */
.entity-row.selected {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
    font-weight: 600;
}

.entity-row.best-option {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
}

/* Disclaimer Modal Styles */
.disclaimer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.disclaimer-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.disclaimer-content h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    text-align: center;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 15px;
}

.warning-section {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.warning-section h4 {
    margin: 0;
    color: #856404;
    font-size: 18px;
}

.disclaimer-section {
    margin: 20px 0;
}

.disclaimer-section h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fdd-icon {
    font-size: 18px;
}

.disclaimer-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.disclaimer-section li {
    margin: 5px 0;
    line-height: 1.4;
}

.disclaimer-section p {
    margin: 10px 0;
    line-height: 1.5;
    color: #555;
}

.disclaimer-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.disclaimer-actions .btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.disclaimer-actions .btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Mobile responsiveness for disclaimer */
@media (max-width: 768px) {
    .disclaimer-content {
        padding: 20px;
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .disclaimer-content h3 {
        font-size: 20px;
    }
    
    .warning-section {
        flex-direction: column;
        text-align: center;
    }
    
    .warning-section h4 {
        font-size: 16px;
    }
}
