/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   HEADER — updated branding
   ============================================ */
header {
    background: linear-gradient(135deg, #1a2e4a 0%, #2c3e50 100%);
    padding: 1.25rem 2rem;
    margin-bottom: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-brand h1 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.header-tag {
    background: #3498db;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 6px;
}

.header-tagline {
    color: #a0b4c8;
    font-size: 0.875rem;
    font-style: italic;
}

/* ============================================
   HERO — main landing section
   ============================================ */
.hero {
    background: linear-gradient(160deg, #f0f7ff 0%, #e8f4fd 100%);
    border-bottom: 2px solid #d0e8f7;
    padding: 3rem 2rem 2.5rem;
    text-align: center;
}

.hero-eyebrow {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 1rem;
    border: 1px solid #bbdefb;
}

.hero-headline {
    font-size: 2.1rem;
    font-weight: 800;
    color: #1a2e4a;
    line-height: 1.2;
    margin: 0 auto 1rem;
    max-width: 640px;
}

.hero-sub {
    font-size: 1.05rem;
    color: #4a6274;
    line-height: 1.65;
    max-width: 580px;
    margin: 0 auto 1.75rem;
}

.hero-proof {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c4a62;
}

.proof-icon {
    font-size: 1rem;
}

.results-hero {
    text-align: center;
    margin-bottom: 30px;
}

.results-hero h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.results-hero .subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.flash.error {
    background-color: #fee;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.flash.success {
    background-color: #efe;
    border-left: 4px solid #27ae60;
    color: #1e8449;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

/* Form Styles */
form h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #e8ecef;
    padding-bottom: 10px;
}

.help-text {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    margin-bottom: 30px;
}

label {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required {
    color: #e74c3c;
}

.optional {
    color: #95a5a6;
    font-weight: 400;
    font-size: 0.9rem;
}

.tooltip {
    cursor: help;
    color: #3498db;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
    padding: 12px 16px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

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

input::placeholder {
    color: #bdc3c7;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-suffix input {
    flex: 1;
}

.suffix {
    color: #7f8c8d;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Radio Groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

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

.radio-option span {
    flex: 1;
}

/* Buttons */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

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

/* Divider */
.divider {
    height: 1px;
    background-color: #e8ecef;
    margin: 30px 0;
}

/* Results Styles */
.results-card {
    padding: 50px 40px;
}

.metric-section {
    text-align: center;
    margin-bottom: 30px;
}

.metric-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.metric-value {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 10px 0;
}

.metric-value-small {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 10px 0;
}

.metric-help {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-top: 10px;
}

.primary-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 12px;
    color: white;
    margin: 30px 0;
}

.primary-result h3 {
    color: white;
}

.primary-result .metric-value {
    color: white;
}

.valuation-range {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.range-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.range-bar.midpoint {
    background: rgba(255, 255, 255, 0.25);
}

.range-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.range-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.highlight {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.comparison {
    font-size: 1.1rem;
    margin-top: 15px;
    font-weight: 500;
}

.comparison.positive {
    color: #2ecc71;
}

.comparison.negative {
    color: #e74c3c;
}

.comparison.neutral {
    color: white;
    opacity: 0.8;
}

/* Warnings */
.warnings {
    margin-bottom: 20px;
}

.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Adjustment Breakdown */
.adjustment-breakdown {
    margin-top: 30px;
}

.adjustment-breakdown h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.adjustment-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.adjustment-card {
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e8ecef;
    background-color: #f8f9fa;
}

.adjustment-card.positive {
    border-color: #2ecc71;
    background-color: #eafaf1;
}

.adjustment-card.negative {
    border-color: #e74c3c;
    background-color: #fadbd8;
}

.adjustment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.adjustment-header h4 {
    color: #2c3e50;
    font-size: 1rem;
}

.adjustment-badge {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background-color: white;
}

.adjustment-card.positive .adjustment-badge {
    color: #27ae60;
}

.adjustment-card.negative .adjustment-badge {
    color: #c0392b;
}

.adjustment-detail {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 8px;
}

.adjustment-impact {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Multiple Breakdown */
.multiple-breakdown {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.multiple-breakdown h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.multiple-calc {
    max-width: 400px;
    margin: 0 auto;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: #2c3e50;
}

.calc-row.adjustment-row {
    color: #7f8c8d;
    font-style: italic;
}

.calc-row.total-row {
    border-top: 2px solid #2c3e50;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 30px 0;
}

.cta-section h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

.cta-section .btn-primary {
    background-color: white;
    color: #667eea;
    font-size: 1.2rem;
}

.cta-section .btn-primary:hover {
    background-color: #f8f9fa;
    color: #764ba2;
}

.cta-benefits {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
}

.cta-benefits ul {
    list-style: none;
}

.cta-benefits li {
    padding: 8px 0;
    font-size: 1rem;
}

.cta-note {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 15px;
}

/* Action Buttons */
.action-buttons {
    text-align: center;
    margin: 30px 0;
}

/* Info Sections */
.info-section {
    margin: 40px 0;
}

.info-section h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.benefit {
    text-align: center;
    padding: 25px;
}

.benefit h4 {
    color: #3498db;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.benefit p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.info-box {
    background-color: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.info-box h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.info-box p {
    color: #555;
    margin-bottom: 10px;
}

.info-box ul {
    margin-left: 20px;
    color: #555;
}

.info-box li {
    margin-bottom: 5px;
}

.adjust-intro {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.adjust-intro p {
    color: #555;
    line-height: 1.7;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: #95a5a6;
    font-size: 0.9rem;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-headline {
        font-size: 1.55rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .hero-proof {
        gap: 0.75rem 1.25rem;
    }

    .results-hero h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 25px;
    }

    .results-card {
        padding: 30px 25px;
    }

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

    .benefits {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .adjustment-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .metric-value {
        font-size: 2rem;
    }

    .range-value {
        font-size: 1.2rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .cta-section {
        padding: 25px;
    }

    .cta-section h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .metric-value {
        font-size: 1.8rem;
    }

    .primary-result {
        padding: 25px;
    }

    .range-bar {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}
