/* Dependents Education Tool — TBV house style (shared brand tokens) */

/* --- 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;
    --content-w: min(1800px, 96vw);
}

*, *::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;
    line-height: 1.55;
}
main { max-width: var(--content-w); margin: 0 auto; }
a { color: var(--primary-light); }

/* --- Header (house standard) --- */
.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;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    font-weight: 600;
}
.home-btn:hover { background-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.home-btn--tools { left: auto; right: 0; background-color: var(--primary); color: var(--text-light); border: none; }
.home-btn--tools: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: 0 0 8px; font-size: 1.9em; letter-spacing: -0.02em; }
.tool-subtitle { font-size: 1em; color: var(--text-secondary); margin: 0 auto; max-width: 720px; line-height: 1.5; }
#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: #faf6ec; }

h2 { color: var(--primary); border-bottom: 2px solid var(--primary-light); padding-bottom: 12px; margin-top: 0; font-size: 1.15em; letter-spacing: -0.01em; }
h3 { color: var(--primary); margin-top: 0; font-size: 1.05em; 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);
}
#about-this-tool {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}
#about-this-tool p { margin: 0; }

/* --- Mode pills --- */
#mode-pills { margin-bottom: 20px; }
.mp-label { font-weight: 800; color: var(--primary); margin: 0 0 8px; }
.mp-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-pill {
    border: 1.5px solid var(--border-color); background: var(--bg-card);
    border-radius: 999px; padding: 9px 15px; font-size: 0.88rem; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; transition: 0.15s;
}
.mode-pill:hover { border-color: var(--accent-gold); }
.mode-pill.active { background: var(--primary); border-color: var(--primary); color: var(--text-light); }
.mode-briefing { margin: 10px 0 0; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 14px; font-size: 0.9rem; color: var(--primary); }

/* --- Inputs --- */
.start-here-badge {
    display: inline-block; background: var(--accent-gold); color: var(--primary);
    font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
    border-radius: 999px; padding: 5px 13px; margin-bottom: 16px;
}
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.input-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; }
.fg-field { margin-bottom: 12px; }
.fg-field label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 5px; }
.fg-field input, .fg-field select {
    width: 100%; padding: 9px 10px; border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 0.92rem; background: var(--bg-card); color: var(--text-primary);
}
.fg-field input:focus, .fg-field select:focus { outline: none; border-color: var(--accent-gold); }
.field-hint { font-size: 0.78rem; color: var(--text-secondary); margin: 4px 0 0; }
.field-hint strong { color: var(--green); }

#live-strip {
    margin: 16px 0 4px; background: #faf6ec; border: 1px solid var(--accent-gold);
    border-radius: var(--radius-md); padding: 12px 16px; font-size: 0.95rem; color: var(--primary); min-height: 44px;
}
.compare-btn {
    display: block; width: 100%; margin-top: 14px; background: var(--primary); color: var(--text-light);
    font-size: 1.08rem; font-weight: 800; border: none; border-radius: var(--radius-md);
    padding: 15px; cursor: pointer; transition: 0.15s;
}
.compare-btn:hover { background: var(--primary-light); }

/* --- Hero verdict --- */
.verdict-card { background: var(--primary); color: var(--text-light); border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 14px; box-shadow: var(--shadow-lg); }
.v-kicker { color: var(--accent-gold); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.v-line { font-size: 1.22rem; line-height: 1.45; margin: 0; }
.v-line strong { color: var(--accent-gold); }
.v-sub { margin: 10px 0 0; font-size: 0.93rem; color: #d3dce8; }
.v-warning { color: #ffd9d9; }

/* The punchline band — what the family actually pays */
@keyframes cost-glow {
    from { box-shadow: 0 0 0 0 rgba(196, 165, 90, 0.6); }
    to   { box-shadow: 0 0 0 16px rgba(196, 165, 90, 0); }
}
.v-cost {
    background: linear-gradient(135deg, #C4A55A, #dcc07a);
    color: var(--primary);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin: 14px 0 4px;
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.5;
    animation: cost-glow 2.2s ease-out infinite;
}
.v-cost strong { font-size: 1.22em; color: #12283f; }
.vc-label { display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6b5518; margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .v-cost { animation: none; } }

/* Matching highlight on the table's bottom-line row */
.cmp-table tr.punchline-row td { background: #faf6ec; font-weight: 600; border-top: 2px solid var(--accent-gold); }

/* --- Hero capture --- */
#hero-capture { background: #faf6ec; border: 1.5px solid var(--accent-gold); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.hc-line { font-size: 0.98rem; color: var(--primary); margin: 0 0 10px; }
.hc-form { display: flex; gap: 8px; flex-wrap: wrap; }
.hc-form input, #email-results-form input {
    flex: 1; min-width: 220px; padding: 11px 12px; border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 0.95rem;
}
.action-btn { background: var(--primary); color: var(--text-light); font-weight: 800; border: none; border-radius: var(--radius-sm); padding: 11px 18px; cursor: pointer; font-size: 0.92rem; }
.action-btn:hover { background: var(--primary-light); }
.action-btn.secondary { background: var(--bg-card); color: var(--primary); border: 1.5px solid var(--primary); }
.action-btn[disabled] { opacity: 0.6; cursor: wait; }
.hc-hint { font-size: 0.76rem; color: var(--text-secondary); margin: 8px 0 0; }
.email-status { font-size: 0.85rem; margin: 6px 0 0; min-height: 1.1em; }
.email-status.success { color: var(--green-light); }
.email-status.error { color: var(--accent); }

/* --- Results --- */
.results-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.results-title-row h2 { border: none; padding-bottom: 0; margin: 0; font-size: 1.3em; }
.retake-btn { background: none; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 7px 12px; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-bottom: 8px; }
.cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-color); text-align: left; }
.cmp-table th { color: var(--primary); font-size: 0.85rem; }
.cmp-table th.best-col { color: #8B6914; }
.best-tag { display: inline-block; margin-left: 7px; background: var(--accent-gold); color: var(--primary); font-size: 0.68rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.cmp-table td.num, .cmp-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-note { font-size: 0.82rem; color: var(--text-secondary); margin: 8px 0 4px; }

.callout { border-radius: var(--radius-md); padding: 16px 18px; margin: 16px 0; }
.callout h3 { margin-bottom: 8px; }
.callout p { font-size: 0.92rem; margin: 0 0 6px; }
.callout-gold { background: #faf6ec; border: 1.5px solid var(--accent-gold); }
.callout-gold h3 { color: #8B6914; }
.callout-red { background: var(--warning-bg); border: 1.5px solid var(--warning-border); }
.callout-red h3 { color: var(--accent); }
.callout-note { background: var(--bg-surface); border: 1px solid var(--border-color); }
.callout-note h3 { color: var(--text-secondary); }

/* Comparison table: ineligible benefit columns explain themselves */
.cmp-table th.na-col { color: var(--text-secondary); font-weight: 600; }
.na-cell { color: var(--text-secondary); font-size: 0.88rem; vertical-align: top; background: var(--bg-surface); border-left: 1px solid var(--border-color); max-width: 240px; }
.cell-muted { color: #a0aec0; font-size: 0.85rem; }

#family-plan { margin: 16px 0; }
.state-prog { border-left: 3px solid var(--accent-gold); padding: 6px 0 6px 14px; margin-bottom: 10px; }
.state-prog p { font-size: 0.9rem; color: var(--text-secondary); margin: 4px 0 0; }
.prog-scope { font-weight: 600; color: var(--primary) !important; font-size: 0.84rem !important; }
.state-mismatch { margin-bottom: 14px; }

#email-results-container { border: 2px solid var(--accent-gold); border-radius: var(--radius-md); margin-top: 20px; padding: 16px 18px; }
#email-results-form { display: flex; gap: 8px; flex-wrap: wrap; }
#action-bar { display: flex; gap: 12px; justify-content: center; margin-top: 20px; margin-bottom: 4px; flex-wrap: wrap; }
#action-bar .action-btn { flex: 0 1 auto; min-width: 130px; }

/* Gold attention pulse on both email captures (house pattern) */
@keyframes hc-glow {
    from { box-shadow: 0 0 0 0 rgba(196, 165, 90, 0.45), var(--shadow-md); }
    to   { box-shadow: 0 0 0 14px rgba(196, 165, 90, 0), var(--shadow-md); }
}
#hero-capture, #email-results-container { animation: hc-glow 2.2s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { #hero-capture, #email-results-container { animation: none; } }

/* --- FAQ (house standard — gold +/− toggles, no native markers) --- */
.faq-section h2 { margin-bottom: 16px; }
.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;
    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;
}
.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;
}

/* --- More tools (house standard) --- */
.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: 0 0 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.55;
    padding: 16px 8px 8px;
    max-width: var(--content-w);
    margin: 0 auto;
}
footer a { color: var(--primary-light); }

/* --- Tour --- */
#tour-root[hidden] { display: none; }
/* Backdrop is a transparent layer — ALL dimming comes from the spotlight's
   9999px box-shadow, so the spotlighted section itself stays bright. */
#tour-backdrop { position: fixed; inset: 0; pointer-events: none; z-index: 900; }
#tour-spotlight { position: absolute; border-radius: var(--radius-md); box-shadow: 0 0 0 9999px rgba(10, 20, 35, 0.55); background: transparent; pointer-events: none; z-index: 901; 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: 16px 18px; max-width: 380px; }
#tour-step-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8B6914; margin: 0 0 4px; }
#tour-title { color: var(--primary); font-size: 1.02rem; margin: 0 0 6px; }
#tour-text { font-size: 0.88rem; color: var(--text-secondary); margin: 0 0 12px; }
#tour-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#tour-exit { background: none; border: none; color: var(--text-secondary); font-size: 0.82rem; cursor: pointer; text-decoration: underline; }
#tour-nav { display: flex; gap: 8px; }
#tour-back, #tour-next { border-radius: var(--radius-sm); padding: 8px 14px; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
#tour-back { background: var(--bg-card); border: 1.5px solid var(--border-color); color: var(--text-secondary); }
#tour-next { background: var(--primary); border: none; color: var(--text-light); }

/* --- Mobile --- */
@media (max-width: 860px) {
    .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    body { padding: 14px; }
    h1 { font-size: 1.35rem; }
    .brand-header { padding-top: 44px; }
    .home-btn { top: 0; transform: none; }
    .home-btn--tools { top: 0; transform: none; right: 0; }
    #tour-tooltip { position: fixed !important; left: 12px !important; right: 12px; bottom: 12px; top: auto !important; max-width: none; width: auto; border-radius: 16px 16px 0 0; }
    .mp-row { flex-direction: column; }
    .mode-pill { text-align: left; }
}

/* --- Print --- */
@media print {
    #hero-capture, #email-results-container { animation: none; }
    .no-print, .home-btn, #mode-pills, #live-strip, .faq-section, .more-tools, #action-bar, #email-results-container, #tour-root, #tour-restart { display: none !important; }
    body { padding: 0; max-width: 100%; background: #fff; }
    .section-container { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
    .verdict-card { background: none; color: var(--text-primary); box-shadow: none; border: 1px solid #ddd; }
    .v-line strong, .v-kicker { color: var(--primary); }
    .v-sub { color: var(--text-secondary); }
}

/* Cash-flow footnote inside the punchline band */
.vc-note { display: block; font-size: 0.78rem; font-weight: 500; color: #5c4a15; margin-top: 6px; }
