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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f3f4f6;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.calculator-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 32px;
}

.logo {
    height: 64px;
    margin-bottom: 24px;
}

h1 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 32px;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
}

h3 {
    font-weight: 600;
    color: #374151;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #d1d5db;
    margin-bottom: 24px;
}

.intro-text {
    margin-bottom: 32px;
}

.intro-text p {
    color: #374151;
    margin-bottom: 12px;
}

.section {
    margin-bottom: 32px;
}

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

.grid-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

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

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

input, select {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.boiler-comparison {
    display: grid;
    gap: 32px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .boiler-comparison {
        grid-template-columns: 1fr 1fr;
    }
}

.boiler-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rebates-section {
    max-width: 600px;
    margin: 0 auto;
}

.rebates-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.rebates-section-break {
    display: none;
}

@media (max-width: 767px) {
    .rebates-section-break {
        display: block;
        width: 100%;
        height: 0;
    }
}

.rebates-flex > div {
    flex: 1;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #4b5563;
    color: white;
}

.btn-secondary:hover {
    background-color: #374151;
}

.btn-small {
    padding: 8px 16px;
    height: 42px;
}

.button-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
}

th, td {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
}

th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #374151;
    text-align: left;
}

td:last-child {
    text-align: right;
    font-weight: 500;
}

.table-row-alt {
    background-color: #f9fafb;
}

.table-row-green {
    background-color: #f0fdf4;
}

.table-row-green td:last-child {
    color: #15803d;
    font-weight: bold;
}

.table-row-blue {
    background-color: #eff6ff;
}

.table-row-blue td:last-child {
    color: #1e40af;
    font-weight: bold;
}

.disclaimer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.disclaimer p {
    font-size: 0.875rem;
    color: #4b5563;
    font-style: italic;
    margin-bottom: 8px;
}

.disclaimer button {
    font-size: 0.875rem;
    color: #2563eb;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.disclaimer button:hover {
    color: #1e40af;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 16px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 896px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: #4b5563;
}

.modal-body {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.7;
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .calculator-card {
        box-shadow: none;
    }

    .button-group,
    .disclaimer button {
        display: none !important;
    }
}
