/* ── Skip Navigation (accessibility) ───────────────────── */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 8px 16px;
    background: #1a3a5c;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.skip-nav:focus {
    top: 0;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:              #f0f4f8;
    --bg-card:         #ffffff;
    --bg-card-hover:   #f7f8fa;
    --bg-input:        #f7f8fa;
    --border:          #D3D1C7;
    --border-color:    0.5px solid #D3D1C7;
    --border-focus:    #1a3a5c;
    --text-primary:    #1a3a5c;
    --text-secondary:  #5c5b56;
    --text-muted:      #6b6a63;
    --navy:            #1a3a5c;
    --navy-sidebar:    #1e3f63;
    --hero-bg:         #0f2640;
    --accent:          #4ac994;
    --accent-hover:    #3ab884;
    --success:         #1D9E75;
    --success-bg:      #EAF3DE;
    --success-text:    #3B6D11;
    --warning:         #BA7517;
    --warning-bg:      #FAEEDA;
    --warning-text:    #854F0B;
    --warning-value:   #EF9F27;
    --grant-value:     #185FA5;
    --danger:          #ef4444;
    --radius:          12px;
    --radius-sm:       8px;
    --shadow:          0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
    --transition:      0.2s ease;
    --font:            'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── App Shell ──────────────────────────────────────────── */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    border-bottom: none;
    padding: 0 24px;
}

.header-inner {
    max-width: 1020px;
    margin: 0 auto;
    height: 84px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }

.logo { display: flex; align-items: center; }
.logo-link { display: inline-flex; align-items: center; text-decoration: none; outline-offset: 4px; }
.site-logo { display: block; max-width: 100%; height: 64px; }

.btn-ghost {
    background: none;
    border: 0.5px solid rgba(255,255,255,0.3);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}

.btn-ghost:hover { border-color: rgba(255,255,255,0.6); }

/* ── Start Over button (header) ─────────────────────────── */
.btn-start-over-header {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    background: var(--navy);
    color: #ffffff;
    border: 0.5px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color var(--transition);
}

.btn-start-over-header svg { color: var(--accent); }
.btn-start-over-header:hover { border-color: rgba(255,255,255,0.6); }
.btn-start-over-header:active { transform: scale(0.98); }

/* ── Hero (page 1 only) ─────────────────────────────────── */
.hero-section {
    background: var(--hero-bg);
    padding: 56px 24px 48px;
    text-align: center;
}

.hero-section h1,
.hero-section .card-title { color: #ffffff; }

.hero-section .card-subtitle,
.hero-section p { color: rgba(255,255,255,0.55); }

/* ── Main Content ───────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 24px;
}

/* ── Card ───────────────────────────────────────────────── */
.card {
    width: 100%;
    max-width: 820px;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fadeSlideIn 0.3s ease;
}

#card-address {
    position: relative;
    overflow: hidden;
}

#card-address::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 240px;
    height: 240px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='50,8 94,44 6,44' fill='%234ac994'/%3E%3Crect x='16' y='44' width='68' height='50' rx='3' fill='%234ac994'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.12;
    pointer-events: none;
}

/* Property info card and question card, and results card — all same width */
.info-card,
.wide-card,
#card-results {
    max-width: 960px;
}

/* Property info card — dark navy like the header */
.info-card {
    background: var(--navy);
    border-color: var(--navy);
}

.info-card .card-inner { padding: 24px 40px; }
.info-card .step-label   { color: #4ac994; }
.info-card .card-title   { color: #ffffff; }
.info-card .card-subtitle { color: rgba(255,255,255,0.65); }

/* ── Question validation errors ─────────────────────────── */
.question-item.q-error .yesno-group,
.question-item.q-error .option-grid {
    outline: 2px solid var(--danger);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.question-error-msg {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    display: none;
}

.question-item.q-error .question-error-msg {
    display: block;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-inner {
    padding: 36px 40px;
}

.info-card .step-label { color: #4ac994; }
.info-card .card-title  { color: #ffffff; }
.info-card .card-subtitle { color: rgba(255,255,255,0.65); }

.step-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grant-value);
    margin-bottom: 12px;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Form Elements ──────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(26,58,92,.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888780' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-select option { background: #ffffff; }

.currency-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-prefix {
    color: var(--text-secondary);
    font-size: 16px;
    flex-shrink: 0;
}

.currency-row .form-input { flex: 1; }

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--navy);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    margin-top: 8px;
}

.btn-primary svg { color: var(--accent); }
.btn-primary:hover { background: #15304e; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--navy);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
}

.btn-secondary svg { color: var(--accent); }
.btn-secondary:hover { background: #15304e; }

/* ── Spinner ────────────────────────────────────────────── */
.spin { animation: spin 0.8s linear infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Property Found Banner ──────────────────────────────── */
.property-found-label {
    color: #4ac994;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-found-label svg { color: #4ac994; }

.property-found-address {
    color: #ffffff;
    font-weight: 500;
}

/* ── Property Details ───────────────────────────────────── */
.property-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.property-detail-item {
    background: rgba(255,255,255,0.08);
    border: 0.5px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}

.detail-value {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
}

.detail-value.estimated { color: var(--warning-value); font-style: italic; }
.detail-value.ber-a { color: #22c55e; }
.detail-value.ber-b { color: #84cc16; }
.detail-value.ber-c { color: #eab308; }
.detail-value.ber-d { color: #f97316; }
.detail-value.ber-e { color: #ef4444; }
.detail-value.ber-fg { color: #dc2626; }

.property-urls { margin-top: 12px; }
.urls-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.property-urls ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.property-urls li a {
    font-size: 12px;
    color: var(--navy);
    text-decoration: none;
    border: 0.5px solid var(--border);
    padding: 4px 10px;
    border-radius: 20px;
    transition: border-color var(--transition);
}
.property-urls li a:hover { border-color: var(--navy); }

/* ── Question Groups ────────────────────────────────────── */
.question-group { margin-bottom: 24px; }
.question-item { margin-bottom: 18px; }

/* VacancyYears renders as a sub-question directly below IsVacant */
.question-item.sub-question {
    margin-left: 20px;
    padding-left: 16px;
    border-left: 2px solid var(--border);
    margin-top: -8px;
}

.question-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 6px;
}

.question-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Yes/No buttons */
.yesno-group {
    display: flex;
    gap: 10px;
}

.yesno-btn {
    flex: 1;
    padding: 10px;
    background: var(--navy);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition);
    text-align: center;
    opacity: 0.45;
}

.yesno-btn:hover { opacity: 0.75; }
.yesno-btn.selected { opacity: 1; }

/* Select options / ERA / BER pills */
.option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-btn {
    padding: 8px 16px;
    background: var(--navy);
    border: none;
    border-radius: 20px;
    color: #ffffff;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition);
    opacity: 0.45;
}

.option-btn:hover { opacity: 0.75; }
.option-btn.selected { opacity: 1; }

/* ── Results layout ─────────────────────────────────────── */
.results-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    align-items: start;
}

/* ── Sidebar ────────────────────────────────────────────── */
.results-sidebar {
    border-radius: var(--radius) 0 0 var(--radius);
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.sidebar-top {
    background: var(--navy);
    padding: 24px 20px 20px;
}

.sidebar-logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 16px;
}

.sidebar-summary-box {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.sidebar-summary-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.sidebar-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.sidebar-body {
    background: var(--navy-sidebar);
    padding: 16px 20px 24px;
}

.sidebar-detail-label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-detail-value {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    margin-bottom: 10px;
}

.sidebar-detail-value.estimated { color: var(--warning-value); }

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.btn-sidebar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--navy);
    color: #ffffff;
    border: 0.5px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition);
    width: 100%;
}

.btn-sidebar-action svg { color: var(--accent); }
.btn-sidebar-action:hover { border-color: rgba(255,255,255,0.5); }

/* ── Results summary (non-sidebar layout fallback) ──────── */
.results-summary {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.results-headline {
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}

.results-subline {
    font-size: 14px;
    color: var(--text-secondary);
}

.results-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

/* ── Section headings ───────────────────────────────────── */
.section-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 0;
    margin-bottom: 12px;
    border-bottom: 0.5px solid var(--border);
}

.section-heading.likely   { color: var(--text-secondary); border-color: var(--border); }
.section-heading.possible { color: var(--text-secondary); border-color: var(--border); }
.section-heading.more-info{ color: var(--text-secondary); border-color: var(--border); }

/* ── Grant Card ─────────────────────────────────────────── */
/* .grant-card base styles are defined in the results-page section below */

.grant-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.grant-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
}

.eligibility-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-likely    { background: var(--success-bg); color: var(--success-text); border: none; }
.badge-possible  { background: var(--warning-bg); color: var(--warning-text); border: none; }
.badge-more-info { background: #E8F0FB; color: var(--grant-value); border: none; }
.badge-not-eligible { background: #f0f0f0; color: var(--text-muted); border: none; }

.grant-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--grant-value);
    margin-bottom: 8px;
}

.grant-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.grant-reasons { margin-bottom: 12px; }

.reason-item {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 3px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.reason-item.positive::before  { content: '✓'; color: var(--success); flex-shrink: 0; }
.reason-item.negative::before  { content: '✕'; color: var(--danger);  flex-shrink: 0; }
.reason-item.outstanding::before { content: '?'; color: var(--grant-value); flex-shrink: 0; }

.grant-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 0.5px solid var(--border);
}

.administered-by {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.administered-by svg { color: var(--accent); }

/* More Info button */
.btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--navy);
    color: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition);
}

.btn-apply svg { color: var(--accent); }
.btn-apply:hover { background: #15304e; }

/* ── Not Eligible Section ───────────────────────────────── */
.not-eligible-section { margin-top: 24px; }
.not-eligible-summary {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 12px 0;
    list-style: none;
    user-select: none;
}

.not-eligible-summary::-webkit-details-marker { display: none; }
.not-eligible-summary::before { content: '▶ '; font-size: 10px; }
details[open] .not-eligible-summary::before { content: '▼ '; }

/* ── Error card ─────────────────────────────────────────── */
.error-card .card-inner { text-align: center; }
.error-icon { display: flex; justify-content: center; margin-bottom: 16px; color: var(--warning); }

/* ── Footer ─────────────────────────────────────────────── */
.app-footer {
    text-align: center;
    padding: 24px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 0.5px solid var(--border);
    line-height: 1.6;
}

.scan-date { margin-top: 4px; }

/* ── Utilities ──────────────────────────────────────────── */
.hidden { display: none !important; }

.grant-section { margin-bottom: 8px; }

/* ── Role Cards ─────────────────────────────────────────── */
.role-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 10px;
    background: var(--navy);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity var(--transition);
    font-family: var(--font);
    text-align: center;
    opacity: 0.55;
}

.role-card:hover { opacity: 0.8; }
.role-card.selected { opacity: 1; }

.role-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.role-label { font-size: 13px; font-weight: 600; color: #ffffff; }
.role-desc  { font-size: 11px; color: rgba(255,255,255,0.75); line-height: 1.3; }

.role-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

.required-star { color: var(--danger); margin-left: 2px; }

/* ── Grant Filter ───────────────────────────────────────── */
.grant-filter {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.filter-toggle input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
}

.grant-checklist {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.checklist-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.grant-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.grant-check-item input[type=checkbox] {
    width: 14px;
    height: 14px;
    accent-color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Progress Bar ───────────────────────────────────────── */
.question-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.progress-track {
    flex: 1;
    height: 3px;
    background: #E8E6DF;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--navy);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

/* ── Question Actions ───────────────────────────────────── */
.question-actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 12px;
}

.question-actions .btn-primary {
    flex: 1;
    margin-top: 0;
}

.btn-skip,
.btn-prev {
    padding: 14px 20px;
    background: var(--navy);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
    opacity: 0.55;
}

.btn-skip:hover,
.btn-prev:hover { opacity: 1; }

/* ── Grant card — extra sections ────────────────────────── */
.grant-checklist-section {
    margin-bottom: 10px;
}

.grant-checklist-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.grant-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.checklist-row {
    font-size: 12px;
    color: #5F5E5A;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.checklist-row::before { content: '•'; color: var(--text-muted); flex-shrink: 0; }

.grant-last-scanned {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Estimated build year ───────────────────────────────── */
.detail-value-estimated {
    color: var(--warning);
    font-style: italic;
    font-size: 0.85em;
}

.detail-value-unknown {
    color: #999;
}

.detail-unknown-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.78em;
    font-weight: 600;
    padding: 2px 8px;
    letter-spacing: 0.01em;
}

.question-hint-estimated {
    background: #fff8e1;
    border-left: 3px solid #f5a623;
    color: #7a4f00;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

/* ── Sub-grants (grouped card) ─────────────────────────── */
.sub-grants-details {
    margin: 14px 0 4px;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.sub-grants-summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
    list-style: none;
    user-select: none;
}
.sub-grants-summary::-webkit-details-marker { display: none; }
.sub-grants-summary:hover { color: var(--navy); }

.sub-grants-list {
    padding: 8px 0;
    border-top: 0.5px solid var(--border);
}

.sub-grant-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 14px;
    border-bottom: 0.5px solid var(--border);
    font-size: 0.85rem;
}
.sub-grant-item:last-child { border-bottom: none; }

.sub-grant-name  { font-weight: 500; color: #5F5E5A; flex: 1; }
.sub-grant-meta  { color: #2C2C2A; font-weight: 500; white-space: nowrap; font-size: 0.8rem; }

.sub-grant-likely   .sub-grant-name { color: var(--success-text); }
.sub-grant-possible .sub-grant-name { color: var(--warning-text); }
.sub-grant-not-eligible { opacity: 0.55; }
.sub-grant-not-eligible .sub-grant-name { text-decoration: line-through; }

/* ── More Info fallback text ────────────────────────────── */
.no-url-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    align-self: center;
}

/* ── All icons default to accent green ─────────────────── */
svg { color: inherit; }

/* ── Print ──────────────────────────────────────────────── */
@media print {
    .app-header, .results-actions, .app-footer,
    .not-eligible-section, #card-address, #card-questions, #card-property-info { display: none !important; }
    body { background: white; color: #111; }
    .card { background: white; border-color: #ddd; box-shadow: none; }
    .card-inner, .results-inner { padding: 20px; }
    .grant-card { break-inside: avoid; page-break-inside: avoid; border-color: #ddd !important; }
    .grant-card.not-eligible { display: none; }
    .grant-name, .card-title, .results-headline { color: #111; }
    .grant-description, .administered-by, .reason-item, .grant-last-scanned { color: #555; }
    .section-heading { color: #333; border-color: #ddd !important; }
    .results-summary { background: #f5f5f5; border-color: #ddd; }
    .eligibility-badge { border: 1px solid #ccc !important; color: #333 !important; background: #eee !important; }
    .btn-apply { display: none; }
    .grant-amount { color: #185FA5; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 540px) {
    .header-inner { height: 64px; }
    .site-logo { width: 280px; height: auto; }
}

@media (max-width: 860px) {
    .card-inner { padding: 24px 20px; }
    .results-inner { padding: 24px 20px; }
    .info-card .card-inner { padding: 20px; }
    .property-details { grid-template-columns: repeat(2, 1fr); }
    .grant-header { flex-direction: column; }
    .role-cards { grid-template-columns: 1fr; gap: 8px; }
    .role-card { flex-direction: row; text-align: left; padding: 14px 16px; gap: 12px; }
    .role-desc { display: none; }
    .results-layout { grid-template-columns: 1fr; }
    .results-sidebar { position: static; border-radius: var(--radius); }
}

/* ═══════════════════════════════════════════════════════════
   PAGE 3 — RESULTS LAYOUT
   ═══════════════════════════════════════════════════════════ */

/* The results page fills the full viewport width — no card wrapper */
.results-page {
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* ── Property-found banner ──────────────────────────────── */
.res-banner {
    background: #f7f8fa;
    border-bottom: 0.5px solid #D3D1C7;
    border-radius: 0;
    padding: 1rem 1.25rem;
    margin: 0;
}

.res-banner-found {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    text-transform: uppercase;
    color: #1D9E75;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.res-banner-found svg { color: #4ac994; flex-shrink: 0; }

.res-banner-address {
    font-size: 15px;
    font-weight: 500;
    color: #1a3a5c;
    margin-bottom: 12px;
}

.res-banner-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.res-tile {
    background: #f7f8fa;
    border-radius: 6px;
    padding: 0.6rem;
}

.res-tile-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #B4B2A9;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}

.res-tile-value {
    font-size: 12px;
    font-weight: 500;
    color: #2C2C2A;
}

.res-tile-value--est { color: #BA7517; }

/* ── Two-column layout ──────────────────────────────────── */
.res-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 0;
    align-items: start;
    flex: 1;
    min-width: 0;
}

/* ── Sidebar ────────────────────────────────────────────── */
.res-sidebar {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.res-sidebar-top {
    background: #1a3a5c;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.res-sidebar-logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ac994;
    flex-shrink: 0;
}

.res-sidebar-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    font-family: var(--font);
}

.res-sidebar-url {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-family: var(--font);
}

.res-sidebar-body {
    background: #1e3f63;
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.res-sidebar-summary {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.res-sidebar-summary-label {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 6px;
    font-family: var(--font);
}

.res-sidebar-summary-value {
    font-size: 20px;
    font-weight: 600;
    color: #4ac994;
    margin-bottom: 4px;
    font-family: var(--font);
}

.res-sidebar-summary-count {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    font-family: var(--font);
}

.res-sidebar-props {
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.875rem;
}

.res-sidebar-props-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.07em;
    margin-bottom: 10px;
    font-family: var(--font);
}

.res-sidebar-prop-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    font-size: 13px;
    font-family: var(--font);
}

.res-sidebar-prop-row:last-child { border-bottom: none; }

.res-sidebar-prop-label {
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

.res-sidebar-prop-value {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.res-sidebar-prop-value--est { color: #EF9F27; }

.res-sidebar-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.res-sidebar-btn {
    flex: 1;
    background: #1a3a5c;
    border: 0.5px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: var(--font);
    transition: background var(--transition);
}

.res-sidebar-btn svg { color: #4ac994; }
.res-sidebar-btn:hover { background: #0f2640; }

/* ── Grant column (right side) ──────────────────────────── */
.res-grants {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

/* Summary card */
.res-summary-card {
    background: #ffffff;
    border: 0.5px solid #D3D1C7;
    border-radius: 10px;
    padding: 0.875rem 1rem;
}

.res-summary-main {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    font-family: var(--font);
    line-height: 1.4;
}

.res-summary-sub {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: var(--font);
}

/* Section label */
.res-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 12px;
    margin-bottom: 4px;
    font-family: var(--font);
}

/* Grant cards */
.grant-card {
    background: #ffffff;
    border: 0.5px solid #D3D1C7;
    border-left: 3px solid #ccc;
    border-radius: 0 10px 10px 0;
    padding: 0.875rem;
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
}

.gc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.gc-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    flex: 1;
    font-family: var(--font);
    line-height: 1.3;
}

.gc-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font);
}

.badge-likely    { background: #EAF3DE; color: #3B6D11; }
.badge-possible  { background: #FAEEDA; color: #854F0B; }
.badge-more-info { background: #E8F0F8; color: #185FA5; }
.badge-not-eligible { background: #F3F0EC; color: #888780; }

.gc-header-badges { display: flex; gap: 6px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.gc-badge-loan { background: #FEF3C7; color: #92400E; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }

.gc-amount {
    font-size: 14px;
    color: var(--grant-value, #185FA5);
    font-weight: 500;
    margin-bottom: 6px;
    word-break: break-word;
    overflow-wrap: break-word;
    font-family: var(--font);
}

.gc-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    font-family: var(--font);
}

.gc-sub-divider {
    border: none;
    border-top: 0.5px solid #f0f0f0;
    margin: 8px 0;
}

.gc-sub-label {
    font-size: 10px;
    color: #B4B2A9;
    margin-bottom: 4px;
}

.gc-sub-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 6px;
}

.gc-sub-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 3px 0;
    border-bottom: 0.5px solid #f5f5f5;
}
.gc-sub-row:last-child { border-bottom: none; }

.gc-sub-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: var(--font);
}

.gc-sub-value {
    font-size: 13px;
    color: var(--text-primary, #2C2C2A);
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
    font-family: var(--font);
}

.gc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
}

.gc-source {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font);
}

.gc-source svg { color: #4ac994; flex-shrink: 0; }

.gc-more-btn {
    background: var(--navy);
    color: #4ac994;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: background var(--transition);
    font-family: var(--font);
}

.gc-more-btn svg { color: #4ac994; }
.gc-more-btn:hover { background: #0f2640; }

/* Not-eligible collapsible */
.res-not-eligible {
    border: 0.5px solid #D3D1C7;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4px;
}

.res-not-eligible-summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #888780;
    background: #f7f8fa;
    list-style: none;
    user-select: none;
}
.res-not-eligible-summary::-webkit-details-marker { display: none; }
.res-not-eligible > .grant-card {
    border-radius: 0;
    border-left-color: #ccc !important;
    opacity: 0.65;
}

/* ── Responsive: stack sidebar below on small screens ───── */
@media (max-width: 760px) {
    .res-layout {
        grid-template-columns: 1fr;
    }
    .res-sidebar {
        position: static;
        flex-direction: row;
        border-radius: 10px;
    }
    .res-sidebar-top { flex: 0 0 140px; }
    .res-sidebar-body { flex: 1; }
    .res-banner-tiles { grid-template-columns: repeat(2, 1fr); }
}


/* ═══════════════════════════════════════════════════════════
   SHARED HEADER UPDATES
   ═══════════════════════════════════════════════════════════ */

.app-header {
    border-bottom: 3px solid var(--accent);
}

.header-inner {
    max-width: 1200px;
    height: 76px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 0;
}

.header-nav-link {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    transition: color var(--transition), border-bottom-color var(--transition);
    white-space: nowrap;
    padding: 6px 14px;
    border-bottom: 2px solid transparent;
    border-radius: 4px 4px 0 0;
}

.header-nav-link:hover { color: #ffffff; border-bottom-color: rgba(255,255,255,0.3); }
.header-nav-link.active { color: #ffffff; border-bottom-color: #4ac994; }

/* Make Start Over an anchor but styled as the existing button */
a.btn-start-over-header {
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER UPDATES
   ═══════════════════════════════════════════════════════════ */

.app-footer {
    background: #0f2640;
    color: rgba(255,255,255,0.3);
    border-top: none;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 20px;
}

.footer-links a {
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    font-size: 12px;
    transition: color var(--transition);
}

.footer-links a:hover { color: rgba(255,255,255,0.7); }

.footer-disclaimer {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    line-height: 1.6;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.2);
    text-align: center;
    padding: 1rem 0 0;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE STYLES
   ═══════════════════════════════════════════════════════════ */

#landing-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ── Hero ────────────────────────────────────────────────── */
.lp-hero {
    background: #1a3a5c;
    padding: 36px 24px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lp-hero-badge {
    display: inline-block;
    background: #4ac994;
    color: #1a3a5c;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 30px;
    margin-bottom: 22px;
    font-family: var(--font);
    letter-spacing: 0.02em;
}

.lp-hero-h1 {
    color: #ffffff;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
    font-family: var(--font);
}

.lp-hero-tagline {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-bottom: 24px;
    font-family: var(--font);
    line-height: 1.6;
}

.lp-hero-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px 22px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

.lp-hero-role-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-align: center;
    margin-bottom: 16px;
    font-family: var(--font);
}

.lp-hero-role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.hero-role-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #1a3a5c;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 22px 10px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font);
    transition: border-color 0.2s ease, transform 0.1s ease;
}

.hero-role-btn:hover { border-color: rgba(74,201,148,0.4); }
.hero-role-btn.selected { border-color: #4ac994; }
.hero-role-btn:active { transform: scale(0.98); }

.hero-role-icon { color: #4ac994; display: flex; align-items: center; justify-content: center; }

.hero-role-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
}

.hero-role-sub {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    line-height: 1.3;
    font-family: var(--font);
}

.lp-hero-select-hint {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin: 0;
    font-family: var(--font);
}

.lp-link-btn {
    background: none;
    border: none;
    color: #4ac994;
    font-size: 12px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.lp-hero-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    margin: 22px auto 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-hero-trust {
    display: flex;
    gap: 28px;
    margin-top: 22px;
    flex-wrap: wrap;
    justify-content: center;
}

.lp-hero-trust span {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    font-family: var(--font);
}

/* ── Stats Bar ───────────────────────────────────────────── */
.lp-stats {
    background: #1a3a5c;
    border-top: 3px solid #4ac994;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.lp-stats-item {
    padding: 22px 20px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.07);
}

.lp-stats-item:last-child { border-right: none; }

.lp-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #4ac994;
    font-family: var(--font);
    line-height: 1.1;
}

.lp-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin-top: 4px;
    font-family: var(--font);
}

/* ── Grant Category Strip ────────────────────────────────── */
.lp-grant-strip {
    background: #ffffff;
    border-top: 1px solid #e8eaed;
    border-bottom: 1px solid #e8eaed;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lp-grant-strip-inner {
    display: flex;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.lp-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
    text-decoration: none;
    white-space: nowrap;
    border: 1.5px solid #d0d7e0;
    border-radius: 50px;
    background: #f7f9fc;
    font-family: var(--font);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}

.lp-strip-item:hover {
    background: #1a3a5c;
    color: #ffffff;
    border-color: #1a3a5c;
    transform: translateY(-1px);
}

.lp-strip-item:hover .lp-strip-icon {
    color: #4ac994;
}

.lp-strip-icon {
    display: flex;
    align-items: center;
    color: #4ac994;
    flex-shrink: 0;
}

/* ── Section Wrap (inner max-width container) ───────────── */
.lp-section-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 32px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Generic Section (legacy — keep for any remaining uses) */
.lp-section {
    padding: 44px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.lp-featured-grants {
    background: #ffffff;
    width: 100%;
}

.lp-how-it-works {
    background: #1a3a5c;
    width: 100%;
    text-align: center;
}

.lp-faq-section {
    background: #f5f7fa;
    width: 100%;
}

.lp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.lp-section-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a3a5c;
    border-left: 5px solid #4ac994;
    padding-left: 16px;
    margin: 0;
    font-family: var(--font);
    line-height: 1.2;
}

.lp-section-title--center {
    border-left: none;
    padding-left: 0;
    text-align: center;
    border-bottom: 3px solid #4ac994;
    padding-bottom: 14px;
    display: inline-block;
    margin: 0 auto 36px;
    width: auto;
    color: #ffffff;
}

.lp-see-all {
    font-size: 13px;
    color: #4ac994;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font);
    flex-shrink: 0;
}

.lp-see-all:hover { text-decoration: underline; }

/* ── Grant Cards Grid ────────────────────────────────────── */
.lp-grants-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.lp-grant-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e5e8ec;
    border-top: 4px solid #4ac994;
    display: flex;
    flex-direction: column;
    /* position + cursor make the whole card a click target (see the stretched
       link on `h3 a::after` below), so users don't have to find the heading. */
    position: relative;
    cursor: pointer;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.lp-grant-card:hover {
    box-shadow: 0 6px 22px rgba(26,58,92,.12);
    transform: translateY(-2px);
    border-color: #cfe9db;
    border-top-color: #4ac994;
}

.lp-grant-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-family: var(--font);
    letter-spacing: 0.02em;
}

.lp-tag-energy      { background: #e6f4ea; color: #1a5c2a; }
.lp-tag-vacant      { background: #e8f0fe; color: #1a3a7c; }
.lp-tag-first-home  { background: #fff4e0; color: #7a4f00; }
.lp-tag-disability  { background: #f3e8fd; color: #5a1a7c; }
.lp-tag-vacant-above { background: #fde8e8; color: #7c1a1a; }
.lp-tag-renovation  { background: #e0f5f2; color: #0a5a4a; }

.lp-grant-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 6px;
    line-height: 1.4;
    font-family: var(--font);
}

.lp-grant-card h3 a {
    color: inherit;
    text-decoration: none;
}

/* Stretch the heading link over the entire card so a click anywhere on the card
   follows it — a single, accessible link with the whole card as its hit area.
   The card is position:relative, so this overlay is sized to the card. */
.lp-grant-card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
}

/* Hovering anywhere on the card hovers the stretched link, so the heading
   highlights — reinforcing that the whole card is clickable. */
.lp-grant-card h3 a:hover { text-decoration: underline; color: #4ac994; }

.lp-grant-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
    font-family: var(--font);
}

.lp-grant-amount {
    font-size: 15px;
    font-weight: 700;
    color: #4ac994;
    margin-bottom: 4px;
    font-family: var(--font);
}

.lp-grant-meta {
    font-size: 12px;
    color: #bbb;
    font-family: var(--font);
}

.lp-grants-cta-row {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.btn-find-grants {
    background: #1a3a5c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.2s;
}

.btn-find-grants:hover { background: #0f2640; }

/* ── How It Works ────────────────────────────────────────── */
.lp-how-it-works { text-align: center; }

.lp-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.lp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lp-step-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4ac994;
    color: #1a3a5c;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-family: var(--font);
    flex-shrink: 0;
}

.lp-step h4 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    font-family: var(--font);
}

.lp-step p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    font-family: var(--font);
}

/* ── FAQ ─────────────────────────────────────────────────── */
.lp-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lp-faq-item {
    background: #ffffff;
    border: 1px solid #e5e8ec;
    border-radius: 10px;
    overflow: hidden;
}

.lp-faq-q {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
    cursor: pointer;
    list-style: none;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font);
}

.lp-faq-q::-webkit-details-marker { display: none; }

.lp-faq-q::after {
    content: '+';
    color: #4ac994;
    font-size: 20px;
    font-weight: 300;
    flex-shrink: 0;
    transition: transform 0.2s;
}

details[open] .lp-faq-q::after { content: '−'; }

.lp-faq-a {
    padding: 0 20px 18px;
    border-top: 1px solid #f0f0f0;
}

.lp-faq-a p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-top: 14px;
    font-family: var(--font);
}

.lp-faq-a strong { color: #1a3a5c; }

/* ── CTA Section ─────────────────────────────────────────── */
.lp-cta {
    background: linear-gradient(135deg, #0f2640 0%, #1a3a5c 100%);
    padding: 72px 24px;
    text-align: center;
}

.lp-cta h2 {
    color: #ffffff;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    font-family: var(--font);
}

.lp-cta p {
    color: rgba(255,255,255,0.55);
    font-size: 16px;
    margin-bottom: 32px;
    font-family: var(--font);
}

.lp-cta-btn {
    background: #4ac994;
    color: #1a3a5c;
    border: none;
    border-radius: 8px;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.2s, transform 0.1s;
}

.lp-cta-btn:hover { background: #3ab884; }
.lp-cta-btn:active { transform: scale(0.98); }

/* ── Informational pages ─────────────────────────────────── */
.info-page {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.info-hero {
    background: #1a3a5c;
    padding: 52px 24px 44px;
    text-align: center;
}

.info-hero-eyebrow {
    display: inline-block;
    background: rgba(74,201,148,0.15);
    color: #4ac994;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    font-family: var(--font);
}

.info-hero h1 {
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    font-family: var(--font);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.info-hero p {
    color: rgba(255,255,255,0.55);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.65;
    font-family: var(--font);
}

.info-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px;
    width: 100%;
    box-sizing: border-box;
}

.info-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 36px 0 12px;
    padding-left: 12px;
    border-left: 4px solid #4ac994;
    font-family: var(--font);
}

.info-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 24px 0 8px;
    font-family: var(--font);
}

.info-content p {
    font-size: 15px;
    color: #555;
    line-height: 1.75;
    margin-bottom: 14px;
    font-family: var(--font);
}

.info-content ul, .info-content ol {
    margin: 10px 0 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-content li {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    font-family: var(--font);
}

.info-content strong { color: #1a3a5c; }

.info-content a {
    color: #1a3a5c;
    font-weight: 600;
}

.info-cta-box {
    background: #1a3a5c;
    border-radius: 12px;
    padding: 32px 28px;
    text-align: center;
    margin: 40px 0 0;
}

.info-cta-box h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--font);
}

.info-cta-box p {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-bottom: 20px;
    font-family: var(--font);
}

.info-cta-box a {
    display: inline-block;
    background: #4ac994;
    color: #1a3a5c;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font);
    transition: background 0.2s;
}

.info-cta-box a:hover { background: #3ab884; }

/* Grant detail card on /grants page */
.grants-list { display: flex; flex-direction: column; gap: 16px; }

.grant-detail-card {
    background: #ffffff;
    border: 1px solid #e5e8ec;
    border-left: 4px solid #4ac994;
    border-radius: 10px;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    text-decoration: none;
    transition: box-shadow 0.2s;
}

.grant-detail-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.gdc-body { flex: 1; }

.gdc-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-family: var(--font);
}

.gdc-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 6px;
    font-family: var(--font);
}

.gdc-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    font-family: var(--font);
}

.gdc-meta {
    font-size: 11px;
    color: #aaa;
    margin-top: 8px;
    font-family: var(--font);
}

.gdc-right {
    text-align: right;
    flex-shrink: 0;
}

.gdc-amount {
    font-size: 17px;
    font-weight: 700;
    color: #4ac994;
    white-space: nowrap;
    font-family: var(--font);
}

.gdc-more {
    display: inline-block;
    margin-top: 10px;
    background: #1a3a5c;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-family: var(--font);
    white-space: nowrap;
}

/* `.info-content a` (used by these cards) sets a dark navy link colour, which is the SAME as
   the .gdc-more button background — so a .gdc-more that is a link (e.g. "Official info") rendered
   as dark-on-dark = invisible/"blank". Re-assert white with a higher-specificity selector. */
.info-content a.gdc-more { color: #ffffff; }

.grant-section-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 14px;
    font-family: var(--font);
}

.grant-section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e6ea;
}

/* County page grid */
.county-grants-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

/* ── Landing page: main-content when workflow active ─────── */
#main-content.workflow-ready {
    padding: 40px 24px;
}

/* ── Responsive: Landing page ────────────────────────────── */
@media (max-width: 860px) {
    .lp-hero-h1 { font-size: 26px; }
    .lp-hero-box { padding: 22px 18px 18px; }
    .lp-grants-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-steps-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-section-wrap { padding: 48px 20px; }
    .header-nav { gap: 4px; margin-left: 0; }
    .county-grants-grid { grid-template-columns: 1fr; }
    .lp-section-title { font-size: 22px; }
    .lp-cta h2 { font-size: 26px; }
}

@media (max-width: 600px) {
    .lp-hero-h1 { font-size: 22px; }
    .lp-hero-role-grid { grid-template-columns: 1fr; }
    .hero-role-btn { flex-direction: row; text-align: left; padding: 14px 16px; gap: 12px; }
    .hero-role-sub { display: none; }
    .lp-grants-grid { grid-template-columns: 1fr; }
    .lp-steps-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-stats { grid-template-columns: 1fr; }
    .lp-stats-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
    .header-nav { display: none; }
    .grant-detail-card { flex-direction: column; }
    .gdc-right { text-align: left; }
    .info-hero h1 { font-size: 22px; }
    .lp-section-wrap { padding: 36px 16px; }
    .lp-section-title { font-size: 20px; }
    .lp-cta h2 { font-size: 22px; }
    .lp-strip-item { font-size: 12px; padding: 8px 14px; }
}

/* ── Landing page address panel ─────────────────────────────────────────────── */
.lp-address-panel {
    margin-top: 20px;
    padding: 20px 22px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid rgba(74,201,148,0.4);
    text-align: left;
    animation: lpPanelIn 0.25s ease;
}

@keyframes lpPanelIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lp-ap-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
}

.lp-ap-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.lp-ap-error {
    font-size: 13px;
    color: var(--danger, #e53e3e);
    margin: 0 0 10px;
}

.lp-find-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lp-find-btn:hover { background: #3ab57e; }
.lp-find-btn:active { transform: scale(0.98); }
.lp-find-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.lp-find-btn-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

/* ── Workflow loading card ───────────────────────────────────────────────────── */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    gap: 20px;
    text-align: center;
}

.loading-spin-icon {
    color: var(--accent);
    opacity: 0.8;
}

.loading-msg {
    color: var(--muted, #64748b);
    font-size: 15px;
    margin: 0;
}

/* ── Lead capture (optional intent + email delivery) ───────────────────────── */
.lead-capture {
    max-width: 920px;
    margin: 1.5rem auto 0;
}

.lc-inner {
    background: var(--bg-card);
    border: var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.75rem;
    display: grid;
    gap: 1.5rem;
}

.lc-heading {
    margin: 0 0 .25rem;
    color: var(--text-primary);
    font-size: 1.15rem;
}

.lc-optional {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: .85rem;
}

.lc-question { margin-bottom: 1rem; }

.lc-q-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: .92rem;
    margin-bottom: .5rem;
}

.lc-options {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.lc-opt {
    background: var(--bg-input);
    border: var(--border-color);
    border-radius: var(--radius-sm);
    padding: .5rem .85rem;
    font: inherit;
    font-size: .875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.lc-opt:hover { background: var(--bg-card-hover); }

.lc-opt.selected {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.lc-email {
    border-top: var(--border-color);
    padding-top: 1.25rem;
}

.lc-email-copy {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: .95rem;
    margin-bottom: .6rem;
}

.lc-email-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.lc-email-input {
    flex: 1 1 240px;
    min-width: 0;
    background: var(--bg-input);
    border: var(--border-color);
    border-radius: var(--radius-sm);
    padding: .65rem .8rem;
    font: inherit;
    color: var(--text-primary);
}

.lc-email-input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.lc-email-btn {
    background: var(--accent);
    color: #06331f;
    border: none;
    border-radius: var(--radius-sm);
    padding: .65rem 1.1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.lc-email-btn:hover { background: var(--accent-hover); }
.lc-email-btn:disabled { opacity: .6; cursor: default; }

.lc-consent {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-top: .9rem;
    color: var(--text-secondary);
    font-size: .85rem;
    line-height: 1.4;
    cursor: pointer;
}

.lc-consent input[type="checkbox"] {
    margin-top: .15rem;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.lc-email-msg {
    margin-top: .75rem;
    padding: .55rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
}

.lc-email-msg.lc-ok {
    background: var(--success-bg);
    color: var(--success-text);
}

.lc-email-msg.lc-err {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.lc-privacy {
    margin: .85rem 0 0;
    color: var(--text-muted);
    font-size: .78rem;
}

@media (min-width: 720px) {
    .lc-inner {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    .lc-email {
        border-top: none;
        border-left: var(--border-color);
        padding-top: 0;
        padding-left: 1.75rem;
    }
}

/* ── Phase B: results upgrades ─────────────────────────────────────────────── */
/* Item 1 — prominent total headline */
.res-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--hero-bg) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.res-hero-value {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
}

.res-hero-figure {
    display: inline-block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.res-hero-count {
    margin-top: .35rem;
    font-size: .95rem;
    opacity: .92;
}

.res-hero-sub {
    margin-top: .6rem;
    font-size: .8rem;
    opacity: .72;
    line-height: 1.45;
}

.res-block-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .6rem;
}

/* Item 2 — "what to do first" strip */
.res-next-steps,
.res-combos {
    background: var(--bg-card);
    border: var(--border-color);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
}

.res-steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .7rem;
}

.res-step {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
}

.res-step-num {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.res-step-body { display: flex; flex-direction: column; }
.res-step-title { font-weight: 600; color: var(--text-primary); font-size: .9rem; }
.res-step-detail { color: var(--text-secondary); font-size: .82rem; line-height: 1.45; margin-top: .1rem; }

/* Item 3 — combinations callout */
.res-combo-line { font-size: .85rem; color: var(--text-secondary); line-height: 1.5; }
.res-combo-line + .res-combo-line { margin-top: .6rem; }
.res-combo-stack strong { color: var(--success); }
.res-combo-alts strong { color: var(--warning); }
.res-combo-alts ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.res-combo-alts li { margin-bottom: .3rem; }
.res-combo-why { color: var(--text-muted); }

/* Phase C — "Last verified" line on grant pages */
.last-verified {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: -0.5rem 0 1.5rem;
    padding: .4rem .7rem;
    background: var(--success-bg, #EAF3DE);
    color: var(--success-text, #3B6D11);
    border-radius: var(--radius-sm, 8px);
    font-size: .82rem;
}
.last-verified svg { flex: 0 0 auto; }
.last-verified a { color: inherit; text-decoration: underline; }

/* Item 4 — per-grant status flags */
.gc-status-open    { background: var(--success-bg); color: var(--success-text); }
.gc-status-closing { background: var(--warning-bg); color: var(--warning-text); }
.gc-status-changed { background: #e3edf9; color: #185FA5; }
.gc-status-closed  { background: #f1f1ee; color: #6b6a63; }

