/* --- Brand tokens (shared across all TBV tools) --- */
: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;
    --green: #276749;
    --green-light: #38a169;
    --warning-bg: #fffaf0;
    --warning-border: #ed8936;
}

*, *::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;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 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; }
.tool-subtitle { font-size: 1em; color: var(--text-secondary); margin: 0; }
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; }

/* --- Section containers --- */
.section-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.intro-section p { font-size: 1em; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* --- Quiz form --- */
.quiz-question { margin-bottom: 28px; }
.quiz-question:last-of-type { margin-bottom: 16px; }

.option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.option-grid.two-col { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) {
    .option-grid { grid-template-columns: 1fr 1fr; }
    .option-grid.two-col { grid-template-columns: 1fr; }
}

.option-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    background-color: var(--bg-surface);
    font-weight: 500;
    font-size: 0.95em;
    color: var(--text-primary);
    transition: all 0.15s ease;
    min-height: 56px;
}
.option-card:hover { border-color: var(--primary-light); background-color: #fff; }
.option-card input[type="radio"] { display: none; }
.option-card.selected {
    border-color: var(--primary);
    background-color: var(--primary);
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
}
.option-card span { display: block; }

.submit-row { text-align: center; margin-top: 8px; }
.action-btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.action-btn:hover { background-color: var(--primary-light); box-shadow: var(--shadow-md); }
.action-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.action-btn-secondary { background-color: var(--accent-gold); color: var(--text-primary); }
.action-btn-secondary:hover { background-color: #b8983e; }

.form-error { color: var(--accent); margin-top: 12px; font-size: 0.95em; min-height: 1.2em; }

.optional-tag {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85em;
    margin-left: 6px;
}
.question-hint {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.state-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    font-family: inherit;
    background-color: var(--bg-surface);
    color: var(--text-primary);
}
.state-select:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: #fff;
}

/* --- Total value card --- */
.total-value-card {
    background: linear-gradient(135deg, var(--primary) 0%, #234572 100%);
    color: var(--text-light);
    border-radius: var(--radius-lg);
    padding: 28px 28px 20px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.total-value-label {
    font-size: 0.95em;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}
.total-value-amount {
    font-size: 2.4em;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 8px;
}
.total-value-horizon {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
}
.methodology-details {
    text-align: left;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: 0;
    margin-top: 4px;
}
.methodology-details summary {
    cursor: pointer;
    padding: 12px 16px;
    font-size: 0.9em;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    list-style: none;
    user-select: none;
}
.methodology-details summary::-webkit-details-marker { display: none; }
.methodology-details summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
    color: var(--accent-gold);
}
.methodology-details[open] summary::before { transform: rotate(90deg); }
.methodology-body {
    padding: 0 16px 16px;
    font-size: 0.9em;
    color: rgba(255,255,255,0.92);
    line-height: 1.55;
}
.methodology-body p { margin: 0 0 12px 0; }
.methodology-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9em;
}
.methodology-table th, .methodology-table td {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.methodology-table th {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.methodology-value { text-align: right; font-weight: 600; color: #fff; white-space: nowrap; }
.methodology-note {
    font-size: 0.82em;
    color: rgba(255,255,255,0.7);
    font-style: italic;
    margin-top: 8px !important;
}

/* --- State callout --- */
.state-callout {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.state-callout-header {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.05em;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.state-callout-row {
    color: var(--text-primary);
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 6px;
}
.state-callout-row strong { color: var(--primary); }
.state-callout .benefit-link { margin-top: 10px; }

/* --- Action plan --- */
.action-plan {
    background-color: #f0f9f4;
    border-left: 4px solid var(--green);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 28px;
}
.action-plan h3 {
    color: var(--green);
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.15em;
    letter-spacing: -0.01em;
}
#action-plan-list {
    margin: 0;
    padding-left: 20px;
}
.action-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}
.action-item:last-child { margin-bottom: 0; }
.action-item::marker { color: var(--green); font-weight: 700; }
.action-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.02em;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.action-why {
    color: var(--text-secondary);
    font-size: 0.93em;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

/* --- Results --- */
.results-header { margin-bottom: 24px; }
.results-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.results-title-row h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}
.retake-btn {
    background-color: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    font-family: inherit;
}
.retake-btn:hover {
    background-color: var(--primary);
    color: var(--text-light);
}
.results-summary {
    font-size: 1.05em;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
    line-height: 1.5;
}

.missing-section {
    background-color: var(--warning-bg);
    border-left: 4px solid var(--warning-border);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 28px;
}
.missing-section h3 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.15em;
    letter-spacing: -0.01em;
}

.missing-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}
.missing-card:last-child { margin-bottom: 0; }
.missing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.missing-card-header h4 {
    color: var(--primary);
    margin: 0;
    font-size: 1.05em;
    letter-spacing: -0.01em;
}
.missing-card-note {
    color: var(--text-primary);
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.5;
    font-size: 0.95em;
}

.category-section { margin-bottom: 28px; }
.category-section:last-child { margin-bottom: 0; }
.category-heading {
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 16px;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.benefit-list { display: flex; flex-direction: column; gap: 12px; }
.benefit-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid var(--border-color);
}
.benefit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.benefit-card-header h4 {
    color: var(--primary);
    margin: 0;
    font-size: 1em;
    letter-spacing: -0.01em;
}
.benefit-value {
    color: var(--green);
    font-weight: 600;
    font-size: 0.9em;
    text-align: right;
}
.benefit-description {
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    line-height: 1.5;
    font-size: 0.95em;
}
.benefit-link {
    display: inline-block;
    margin-top: 4px;
    padding: 8px 16px;
    background-color: var(--primary);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: var(--shadow-sm);
}
.benefit-link:hover {
    background-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.benefit-link:active {
    transform: translateY(0);
}

.coming-soon-badge {
    display: inline-block;
    background-color: var(--accent-gold);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
    margin-left: 6px;
}

/* --- Email + Action bar --- */
.section-subtitle {
    color: var(--text-secondary);
    margin-top: -8px;
    margin-bottom: 16px;
    font-size: 0.95em;
}

.email-results-form { margin-top: 8px; }
.email-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.email-form-row input[type="email"] {
    flex: 1;
    min-width: 240px;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    font-family: inherit;
}
.email-form-row input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-light);
}
.email-status { margin-top: 12px; font-size: 0.95em; min-height: 1.2em; }
.email-success { color: var(--green); }
.email-error { color: var(--accent); }
.input-hint { color: var(--text-secondary); font-size: 0.85em; margin-top: 8px; }

.action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}

/* --- How it works --- */
.how-it-works p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 14px 0;
    font-size: 0.95em;
}
.how-it-works p:last-child { margin-bottom: 0; }

/* --- FAQ section (visible companion to FAQPage JSON-LD) --- */
.faq-section h2 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 12px;
    font-size: 1.1em;
    letter-spacing: -0.01em;
}
.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;
}
.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: '−'; }
.faq-item p {
    margin: 0;
    padding: 0 18px 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95em;
}
.faq-item p strong { color: var(--text-primary); }
.faq-item p a { color: var(--primary-light); font-weight: 600; }
.faq-item p a:hover { text-decoration: underline; }

/* --- More tools --- */
.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-top: 0; 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: #C5A55A;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.more-tools .tools-links a:hover {
    color: #e0c675;
    text-decoration: underline;
}

/* --- Footer --- */
footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85em;
    line-height: 1.5;
    padding: 16px 0;
    max-width: 700px;
    margin: 0 auto;
}
footer p { margin: 0 0 8px 0; }
footer .footer-sources { font-size: 0.8em; opacity: 0.85; }

/* --- Print --- */
@media print {
    body { background: #fff; padding: 0; }
    .no-print, .header-container, #quiz-form, #email-results-container, .more-tools, footer, .home-btn { display: none !important; }
    .section-container { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
    .missing-card, .benefit-card { page-break-inside: avoid; }
    .benefit-link {
        background-color: transparent !important;
        color: var(--primary) !important;
        text-decoration: underline;
        padding: 0;
        box-shadow: none;
    }
    .total-value-card {
        background: #fff !important;
        color: var(--text-primary) !important;
        border: 2px solid var(--primary);
    }
    .total-value-label, .total-value-horizon { color: var(--text-secondary) !important; }
    .total-value-amount { color: var(--primary) !important; }
    .methodology-details { display: none; }
    .action-item, .missing-card, .benefit-card, .state-callout { page-break-inside: avoid; }
}
