/* --- Brand Colors (shared with MBA Calculator) --- */
:root {
    --primary: #1a365d;
    --primary-light: #2b6cb0;
    --accent: #e53e3e;
    --accent-gold: #C4A55A;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #ffffff;
    --bg-page: #edf2f7;
    --bg-surface: #f7fafc;
    --bg-card: #ffffff;
    --border-color: #cbd5e0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --accent-fha: #dd9933;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    margin: 0;
    padding: 24px;
}

/* --- Header --- */
.header-container {
    text-align: center;
    margin-bottom: 32px;
}

.brand-header {
    margin-bottom: 8px;
    position: relative;
}

.home-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    border-radius: var(--radius-sm);
    letter-spacing: 0.03em;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.home-btn:hover {
    background-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.brand-name {
    font-size: 1.6em;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-the, .brand-better {
    color: var(--primary);
}

.brand-veteran {
    color: var(--accent-gold);
}

h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.8em;
    letter-spacing: -0.02em;
}

h2 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 12px;
    margin-top: 0;
    font-size: 1.1em;
    letter-spacing: -0.01em;
}

/* --- Calculator Inputs --- */
#calculator-container {
    display: flex;
    justify-content: space-around;
    gap: 24px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

label {
    font-weight: 600;
    font-size: 0.8em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

select, input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1em;
    background-color: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

/* --- Stay Duration Slider --- */
.stay-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stay-slider-container input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 3px;
    outline: none;
    touch-action: manipulation;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 20.7%, #ddd 20.7%, #ddd 100%);
}

.stay-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.stay-slider-container input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.stay-slider-container input[type="range"]::-moz-range-progress {
    background: var(--primary);
    height: 6px;
    border-radius: 3px;
}

.stay-slider-value {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary);
    min-width: 70px;
    text-align: center;
}

/* --- State Info Note (amber) --- */
.state-note {
    font-size: 0.82em;
    padding: 10px 14px;
    background-color: rgba(196, 165, 90, 0.12);
    border: 1px solid rgba(196, 165, 90, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

.state-note strong {
    color: #8B6914;
}

.state-sources {
    margin-top: 8px;
    font-size: 0.9em;
}

.state-sources a {
    color: #8B6914;
    text-decoration: underline;
}

.state-sources a:hover {
    color: var(--primary-light);
}

/* --- Section Containers --- */
.section-container {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    text-align: center;
}

/* --- Comparison Cards (VA vs Conventional) --- */
#comparison-results {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.comparison-card {
    flex: 1;
    min-width: 240px;
    max-width: 360px;
    padding: 24px;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    border: 2px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.comparison-card.winner {
    border-color: rgba(56, 161, 105, 0.4);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(56, 161, 105, 0.1);
}

.comparison-card h3 {
    margin: 0 0 16px 0;
    font-size: 1.05em;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.comparison-card .comp-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.88em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.comparison-card .comp-line:last-child {
    border-bottom: none;
}

.comparison-card .comp-line span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-card .comp-total {
    margin-top: 12px;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm);
    text-align: center;
}

.comparison-card .comp-total h4 {
    margin: 0 0 4px 0;
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.comparison-card .comp-total p {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-light);
}

/* --- Badges --- */
.tax-free-badge, .no-pmi-badge, .exempt-badge {
    display: inline-block;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #276749;
    background-color: rgba(56, 161, 105, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.mip-badge {
    display: inline-block;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #b7791f;
    background-color: rgba(221, 153, 51, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.not-exempt-badge {
    display: inline-block;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c53030;
    background-color: rgba(229, 62, 62, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* --- Monthly Delta Indicator --- */
.comparison-delta {
    text-align: center;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9em;
    background-color: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.comparison-delta.positive { color: #276749; }
.comparison-delta.negative { color: #c53030; }

.estimates-note {
    margin: 12px auto 0;
    max-width: 600px;
    font-size: 0.75em;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
}

/* --- DTI Line --- */
.dti-line span:last-child {
    font-weight: 600;
}
.dti-green { color: #276749; }
.dti-amber { color: #8B6914; }
.dti-red { color: #c53030; }

/* --- Property Tax Savings --- */
.tax-savings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.tax-savings-card {
    padding: 20px;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
}

.tax-savings-card h4 {
    margin: 0 0 8px 0;
    font-size: 0.8em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.tax-savings-card .tax-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.tax-savings-card .tax-sub {
    font-size: 0.78em;
    color: var(--text-secondary);
    margin-top: 4px;
}

.tax-savings-card.highlight {
    background: linear-gradient(135deg, #276749 0%, #38a169 100%);
    border: none;
}

.tax-savings-card.highlight h4 {
    color: rgba(255, 255, 255, 0.8);
}

.tax-savings-card.highlight .tax-value {
    color: var(--text-light);
}

.tax-savings-card.highlight .tax-sub {
    color: rgba(255, 255, 255, 0.7);
}

#exemption-description {
    margin-top: 12px;
    font-size: 0.85em;
    color: var(--text-secondary);
    font-style: italic;
}

/* --- Cash Position Cards --- */
#cash-position-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.opp-cost-card {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    padding: 20px;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
}

.opp-cost-card h4 {
    margin: 0 0 8px 0;
    font-size: 0.8em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.opp-cost-card .opp-cost-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.opp-cost-card .opp-cost-sub {
    font-size: 0.78em;
    color: var(--text-secondary);
    margin-top: 4px;
}

.opp-cost-card.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
}

.opp-cost-card.highlight h4 {
    color: rgba(255, 255, 255, 0.8);
}

.opp-cost-card.highlight .opp-cost-value {
    color: var(--text-light);
}

.opp-cost-card.highlight .opp-cost-sub {
    color: rgba(255, 255, 255, 0.7);
}

/* --- Timeline Chart --- */
.timeline-chart-container {
    max-width: 900px;
    margin: 16px auto 0;
    position: relative;
    height: 400px;
}

@media (max-width: 600px) {
    .timeline-chart-container {
        height: 300px;
    }
}

/* --- Verdict Breakdown --- */
.verdict-breakdown {
    max-width: 560px;
    margin: 0 auto 20px;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
}

.verdict-breakdown h4 {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

.verdict-method {
    font-size: 0.78em;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.verdict-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.88em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.verdict-line:last-child {
    border-bottom: none;
}

.verdict-line span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.verdict-line.verdict-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--primary-light);
    border-bottom: none;
    font-weight: 700;
    color: var(--primary);
}

.verdict-line.verdict-total span:last-child {
    color: var(--primary);
    font-size: 1.1em;
}

.verdict-positive { color: #276749 !important; }
.verdict-negative { color: #c53030 !important; }

/* --- Verdict Card --- */
.verdict-card {
    padding: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-top: 16px;
}

.verdict-card .verdict-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px 0;
}

.verdict-card .verdict-amount {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}

.verdict-card .verdict-detail {
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.7);
    margin: 8px 0 0 0;
}

.verdict-summary {
    max-width: 600px;
    margin: 16px auto 0;
    font-size: 0.82em;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    text-align: center;
}

/* --- Email Results Form --- */
#email-results-container {
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(26, 54, 93, 0.15) 100%);
    border: 1px solid var(--primary);
    text-align: center;
}
.email-form-row {
    display: flex; gap: 10px; justify-content: center;
    max-width: 480px; margin: 0 auto;
}
.email-form-row input[type="email"] {
    flex: 1; padding: 12px 16px; border: 2px solid var(--border-color);
    border-radius: var(--radius-sm); background: var(--bg-card);
    color: var(--text-primary); font-size: 0.95em;
}
.email-form-row input[type="email"]:focus {
    outline: none; border-color: var(--primary-light);
}
.email-form-row button { white-space: nowrap; }
.email-status { margin-top: 10px; font-size: 0.9em; min-height: 1.4em; }
.email-status.email-success { color: #276749; font-weight: 600; }
.email-status.email-error { color: var(--accent); font-weight: 600; }
.action-btn {
    padding: 12px 24px; border: 2px solid var(--primary); background: var(--primary);
    color: var(--text-light); border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.88em; cursor: pointer; transition: all 0.2s ease;
}
.action-btn:hover { background: var(--primary-light); border-color: var(--primary-light); }
.action-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.action-btn-secondary { background: none; color: var(--primary); }
.action-btn-secondary:hover { background: rgba(26, 54, 93, 0.08); }
@media print {
    .no-print, .action-bar, #email-results-container, header, .more-tools, footer, .input-section { display: none !important; }
    body { background: #fff; }
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 0 20px;
    color: var(--text-secondary);
}

footer p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.78em;
    line-height: 1.7;
}

/* --- Responsive --- */
@media (max-width: 900px) and (min-width: 769px) {
    .comparison-card {
        min-width: 220px;
        max-width: 340px;
    }

    .opp-cost-card {
        min-width: 160px;
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    #calculator-container {
        padding: 20px;
    }

    .input-group {
        min-width: 100%;
    }

    .comparison-card {
        min-width: 100%;
        max-width: 100%;
    }

    .opp-cost-card {
        min-width: 100%;
        max-width: 100%;
    }

    .tax-savings-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.3em;
    }

    .home-btn {
        position: static;
        transform: none;
        display: block;
        text-align: center;
        margin-bottom: 12px;
    }

    .verdict-card .verdict-amount {
        font-size: 1.5em;
    }
    .email-form-row { flex-direction: column; }
    .email-form-row button { width: 100%; }
}

/* More Tools Cross-Links */
.more-tools {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.more-tools h3 {
    font-size: 1rem;
    color: #999;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.more-tools .tools-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.more-tools .tools-links a {
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.more-tools .tools-links a:hover {
    color: #e0c675;
    text-decoration: underline;
}

/* Phones: stack the Home button above the brand so it doesn't overlap the
   absolutely-positioned button (which collides with the centered name on narrow screens). */
@media (max-width: 560px) {
    .brand-header { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 0; }
    .home-btn { position: static; transform: none; align-self: flex-start; }
    .brand-name { font-size: 1.4em; }
}

/* Back-to-Toolbox button (added 2026-06-05) */
.home-btn--tools { left: auto; right: 0; }

/* Mobile header: put Home + All Tools side-by-side, brand name centered below */
@media (max-width: 600px) {
    .brand-header { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; min-height: 0; }
    .home-btn, .home-btn--tools { position: static; transform: none; left: auto; right: auto; align-self: auto; }
    .brand-name { flex-basis: 100%; width: 100%; text-align: center; margin-top: 2px; }
}

/* --- Second VA Loan tool additions --- */

#about-this-tool p {
    font-size: 1.02em;
    line-height: 1.65;
    color: #2d3748;
}

.section-subtitle {
    color: #4a5568;
    margin: 4px 0 14px;
    line-height: 1.55;
}

.input-hint {
    font-size: 0.82em;
    color: #718096;
    margin-top: 8px;
}

.input-hint a { color: #1a365d; }

.tax-savings-card h4 {
    margin: 0 0 6px;
    font-size: 0.85em;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.purchase-callout,
.path-warning {
    background: #fffaf0;
    border-left: 4px solid #b8860b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 14px;
    line-height: 1.55;
}

.hh-line {
    font-size: 1.08em;
    line-height: 1.6;
    margin: 8px 0;
}

.hh-free { color: #276749; font-weight: 700; }
.hh-cheap { color: #1a365d; font-weight: 700; }

.ladder-title { margin: 26px 0 4px; color: #1a365d; }

.rules-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.rules-list li {
    padding: 10px 0 10px 30px;
    position: relative;
    line-height: 1.55;
    border-bottom: 1px solid #edf2f7;
}

.rules-list li:last-child { border-bottom: none; }

.rules-list li::before {
    content: "\2713";
    position: absolute;
    left: 4px;
    color: #b8860b;
    font-weight: 700;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    background-color: var(--bg-surface);
    transition: background-color 0.15s ease;
    text-align: left;
}
.faq-item[open] {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.faq-item summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 1em;
    color: var(--primary);
    list-style: none;
    user-select: none;
    line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: '+';
    display: inline-block;
    width: 18px;
    margin-right: 6px;
    color: var(--accent-gold);
    font-weight: 700;
    transition: transform 0.2s ease;
}
.faq-item[open] summary::before { content: '\2212'; }
.faq-item p {
    margin: 0;
    padding: 0 18px 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95em;
}

#rent-field, #assume-fields, .loan-fields { margin: 0; }

@media print {
    #about-this-tool, #rules-of-the-road, #how-it-works, #faq,
    #email-results-container, .more-tools { display: none; }
}

/* Verdict cards used as prose panels (restoration, house-hack, assumption):
   base card is a navy gradient — force light, left-aligned text inside. */
.verdict-card { text-align: left; }
.verdict-card h3 { color: #ffffff; margin: 0 0 10px; }
.verdict-card p { color: rgba(255, 255, 255, 0.92); line-height: 1.6; }
.verdict-card .tax-sub { color: rgba(255, 255, 255, 0.72); font-size: 0.88em; }
.verdict-card a { color: #f6c453; text-decoration: underline; }
.verdict-card strong, .verdict-card em { color: #ffffff; }
.verdict-card .hh-free { color: #7ce3a1; }
.verdict-card .hh-cheap { color: #9fc5f8; }
.verdict-card .verdict-positive { color: #7ce3a1; }
.verdict-card .verdict-negative { color: #feb2b2; }
.verdict-card .path-warning { color: #2d3748; }
.verdict-card .path-warning strong, .verdict-card .path-warning em { color: #2d3748; }
.verdict-card .tax-savings-card h4,
.verdict-card .tax-savings-card .tax-value,
.verdict-card .tax-savings-card .tax-sub { color: initial; }
.verdict-card .tax-savings-card .tax-sub { color: #718096; }

/* Restore highlight-card colors inside verdict-card panels (overrides the
   generic verdict-card grid resets above). */
.verdict-card .tax-savings-card.highlight h4 { color: rgba(255, 255, 255, 0.85); }
.verdict-card .tax-savings-card.highlight .tax-value { color: #ffffff; }
.verdict-card .tax-savings-card.highlight .tax-sub { color: rgba(255, 255, 255, 0.8); }

/* Wide variant for long methodology footnotes (ladder section). */
.estimates-note--wide {
    max-width: none;
    text-align: left;
}

/* --- Mode pills --- */
#mode-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 20px;
}
.mode-label {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-right: 4px;
}
.mode-pill {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.92em;
    cursor: pointer;
    transition: all 0.15s ease;
}
.mode-pill:hover { border-color: var(--primary-light); }
.mode-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
}

/* --- Start here card + assumptions drawer --- */
#calculator-container { flex-direction: column; }
#start-here { max-width: 720px; margin: 0 auto; width: 100%; }
.start-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: #fff;
    font-size: 0.7em;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    vertical-align: middle;
    margin-right: 8px;
}
#start-title { font-size: 0.95em; font-weight: 600; color: var(--text-secondary); }
#assumptions-drawer { max-width: 720px; margin: 0 auto; width: 100%; }
#assumptions-drawer summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary);
    list-style: none;
    user-select: none;
}
#assumptions-drawer summary::-webkit-details-marker { display: none; }
#assumptions-drawer summary::before {
    content: '+';
    display: inline-block;
    width: 18px;
    color: var(--accent-gold);
    font-weight: 700;
}
#assumptions-drawer[open] summary::before { content: '\2212'; }
.drawer-hint { font-weight: 400; font-size: 0.85em; color: var(--text-secondary); margin-left: 6px; }
.drawer-body { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

/* --- Hero verdict --- */
#hero-verdict {
    margin: 0 0 24px;
    text-align: center;
    padding: 26px 32px;
}
#hero-verdict .hero-kicker {
    margin: 0 0 6px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
}
#hero-verdict .hero-line {
    margin: 0;
    font-size: 1.35em;
    line-height: 1.5;
    color: #ffffff;
}
#hero-verdict .hero-line strong { color: #f6c453; }
#hero-verdict .hero-sub { margin: 8px 0 0; font-size: 0.9em; color: rgba(255,255,255,0.8); }

/* --- Result accordions --- */
.result-acc summary {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    text-align: left;
}
.result-acc summary::-webkit-details-marker { display: none; }
.result-acc summary h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
}
.result-acc .teaser {
    flex: 1;
    text-align: right;
    font-size: 0.88em;
    color: var(--text-secondary);
    font-style: italic;
}
.result-acc .acc-chevron {
    flex: 0 0 auto;
    width: 10px; height: 10px;
    border-right: 2.5px solid var(--accent-gold);
    border-bottom: 2.5px solid var(--accent-gold);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
}
.result-acc[open] .acc-chevron { transform: rotate(225deg); margin-top: 4px; }
.result-acc[open] summary { margin-bottom: 8px; }
.result-acc[open] summary h2 { border-bottom: 2px solid var(--primary-light); padding-bottom: 12px; }
.result-acc .acc-body { margin-top: 10px; }

/* --- Tour --- */
#tour-restart {
    margin-top: 10px;
    background: none;
    border: 1.5px dashed var(--accent-gold);
    color: #8B6914;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
}
#tour-restart:hover { background: rgba(196, 165, 90, 0.12); }
#tour-backdrop { position: fixed; inset: 0; z-index: 900; }
#tour-spotlight {
    position: absolute;
    z-index: 901;
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.62);
    pointer-events: none;
    transition: all 0.25s ease;
}
#tour-tooltip {
    position: absolute;
    z-index: 902;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 20px 22px;
    max-width: 380px;
    width: calc(100vw - 48px);
    text-align: left;
}
#tour-step-label {
    margin: 0 0 4px;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    font-weight: 700;
}
#tour-tooltip h3 { margin: 0 0 8px; color: var(--primary); font-size: 1.1em; }
#tour-tooltip p { margin: 0; color: var(--text-secondary); line-height: 1.55; font-size: 0.95em; }
#tour-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
#tour-exit {
    background: none; border: none; color: var(--text-secondary);
    font-size: 0.85em; cursor: pointer; text-decoration: underline; padding: 6px 0;
}
#tour-nav { display: flex; gap: 8px; }
#tour-back, #tour-next {
    padding: 8px 18px; border-radius: var(--radius-sm); font-weight: 600;
    cursor: pointer; font-size: 0.9em;
}
#tour-back { background: var(--bg-surface); border: 1.5px solid var(--border-color); color: var(--text-secondary); }
#tour-next { background: var(--primary); border: 1.5px solid var(--primary); color: var(--text-light); }
#tour-next:hover { background: var(--primary-light); }

@media (max-width: 560px) {
    #tour-tooltip { position: fixed; left: 12px !important; right: 12px; bottom: 12px; top: auto !important; max-width: none; width: auto; }
    .result-acc .teaser { display: none; }
}

/* Print: browsers strip background colors by default — navy verdict cards
   would print white-on-white. Force dark-on-light for print. */
@media print {
    .verdict-card, #hero-verdict {
        background: #ffffff !important;
        border: 1.5px solid var(--border-color);
        box-shadow: none;
    }
    .verdict-card, .verdict-card p, .verdict-card h3, .verdict-card strong, .verdict-card em,
    .verdict-card .tax-sub, .verdict-card a,
    #hero-verdict .hero-kicker, #hero-verdict .hero-line, #hero-verdict .hero-line strong, #hero-verdict .hero-sub {
        color: #1a202c !important;
    }
    #mode-pills, #tour-restart, #tour-root { display: none !important; }
}
