:root {
    --primary: #0ea5e9;
    /* Sky 500 */
    --primary-dark: #0284c7;
    --bg: #f0f9ff;
    --card: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --nhs-blue: #005eb8;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 450px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 24px;
}

.nhs-alert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fee2e2;
    color: #991b1b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.app-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text);
}

.app-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Card */
.estimator-card {
    background: var(--card);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Toggle */
.toggle-container {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.segment-control {
    display: flex;
}

.seg-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: 0.2s;
}

.seg-btn.active {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Inputs */
.input-section {
    margin-bottom: 30px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

select,
input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: #f8fafc;
}

input[type=range] {
    width: 100%;
    accent-color: var(--primary);
    height: 6px;
    border-radius: 5px;
    cursor: pointer;
}

.range-val {
    text-align: right;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}

input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Result */
.result-display {
    text-align: center;
    background: #f0fdf4;
    /* Green tint bg for result */
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.price-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #166534;
    margin-bottom: 4px;
}

.price-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #15803d;
}

.price-per {
    font-size: 0.9rem;
    color: #166534;
    opacity: 0.8;
}

.tax-benefit {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tax-benefit .badge {
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-bottom: 4px;
    display: inline-block;
}

.tax-benefit p {
    font-size: 0.85rem;
    color: #1e3a8a;
    line-height: 1.4;
}

/* CTA */
.cta-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--nhs-blue);
    color: white;
    transition: 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 94, 184, 0.3);
}

.cta-btn:hover {
    background: #004d99;
    transform: translateY(-2px);
}

.sub-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Mini FAQ */
.mini-faq {
    margin-top: 30px;
}

.faq-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    align-items: center;
    border: 1px solid #e2e8f0;
}

.faq-row .icon {
    font-size: 1.5rem;
}

.faq-row .text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.faq-row strong {
    color: var(--text);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Main FAQ */
.faq-section {
    margin-top: 50px;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
}

.faq-section h3 {
    text-align: center;
    color: var(--text);
    margin-bottom: 24px;
    font-size: 1.4rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.faq-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.faq-item h4 {
    color: var(--nhs-blue);
    margin-bottom: 10px;
    font-size: 1rem;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.faq-item strong {
    color: var(--text);
}

@media(max-width: 600px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}


/* Modal */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 20px;
}

.modal {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.modal p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.form-field {
    margin-bottom: 12px;
}

.form-field input {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--nhs-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}