/* ── 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:         #167A5A;
    --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); }
/* Never wrap "Start Over" onto two lines (17 Nov site check: it did at 375px). */
.btn-start-over-header { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 420px) {
    .btn-start-over-header { padding: 6px 10px; gap: 5px; font-size: 12.5px; }
}

/* ── 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,
.question-item.q-error .checklist {
    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.75);
    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: #4ade80; }
.detail-value.ber-b { color: #a3e635; }
.detail-value.ber-c { color: #facc15; }
.detail-value.ber-d { color: #fdba74; }
.detail-value.ber-e { color: #fca5a5; }
.detail-value.ber-fg { color: #fecaca; }

.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;
}

/* Tick-lists (several Yes/No questions as checkboxes) */
.checklist {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.checklist legend.question-text { padding: 0; }
.tick-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.4;
}
.tick-row:hover { border-color: var(--navy); }
.tick-row:has(input:checked) { border-color: var(--navy); background: #f1f5f9; }
.tick-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    flex: 0 0 auto;
    accent-color: var(--navy);
}
.tick-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.tick-label { display: flex; flex-direction: column; gap: 2px; }
.tick-help { font-size: 12px; color: var(--text-secondary); }
.tick-none { margin-top: 10px; border-style: dashed; }
.res-skipped-note {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 16px;
}

/* Yes/No buttons */
.yesno-group {
    display: flex;
    gap: 10px;
}

.yesno-btn {
    flex: 1;
    padding: 10px;
    background: #ffffff;
    border: 1.5px solid #7d8fa5;
    border-radius: var(--radius-sm);
    color: var(--navy);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    text-align: center;
}

/* Unselected = white with a navy outline; selected = solid navy. (Was a faded navy fill, which failed text contrast.) */
.yesno-btn:hover { border-color: var(--navy); background: #f0f4f8; }
.yesno-btn.selected { background: var(--navy); border-color: var(--navy); color: #ffffff; }

/* Select options / ERA / BER pills */
.option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Same pattern as Yes/No: unselected = white with a navy outline, selected = solid navy.
   (Was a 45%-opacity navy fill: white text on it failed WCAG AA contrast, 2.5:1.) */
.option-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid var(--navy);
    border-radius: 20px;
    color: var(--navy);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.option-btn:hover { background: #f0f4f8; }
.option-btn.selected { background: var(--navy); color: #ffffff; }
.option-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ── 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: #ffffff;
    border: 1.5px solid #7d8fa5;
    border-radius: var(--radius-sm);
    color: var(--navy);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.btn-skip:hover,
.btn-prev:hover { border-color: var(--navy); background: #f0f4f8; }

/* ── 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;
}


/* ── 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, #card-lead-capture, #card-results-teaser, #card-results-follow { 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: #167A5A;
    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.75);
    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.75);
    margin-bottom: 6px;
    font-family: var(--font);
}

.res-sidebar-summary-value {
    font-size: 20px;
    font-weight: 600;
    color: #6fdcb0;
    margin-bottom: 4px;
    font-family: var(--font);
}

.res-sidebar-summary-count {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    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.75);
    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.75);
    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; }

/* Phones: badges can't shrink (nowrap), so side-by-side they crush the title into a
   30–75px column. Stack the title above the badges instead. */
@media (max-width: 600px) {
    .gc-header { flex-direction: column; gap: 6px; }
    .gc-header-badges { flex-shrink: 1; justify-content: flex-start; }
}
.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: #6b6a63;
    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: #66655f;
    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.6);
    text-decoration: none;
    font-size: 12px;
    transition: color var(--transition);
}

.footer-links a:hover { color: rgba(255,255,255,0.9); }

.footer-disclaimer {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    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.7);
    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.7);
    font-size: 11px;
    line-height: 1.3;
    font-family: var(--font);
}

.lp-hero-select-hint {
    font-size: 12px;
    color: #66707c;
    text-align: center;
    margin: 0;
    font-family: var(--font);
}

.lp-link-btn {
    background: none;
    border: none;
    color: #1d7f57;
    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;
    padding: 0;
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease, transform 0.15s ease;
}

.lp-hero-arrow:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(2px);
}

.lp-hero-arrow:focus-visible {
    outline: 2px solid #4ac994;
    outline-offset: 3px;
}

.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.7);
    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;
}

/* Target of the hero "browse all grants" link and arrow: keep its heading clear of the sticky header. */
#featured-grants { scroll-margin-top: 72px; }

.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: #1d7f57;
    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: #1d7f57;
    margin-bottom: 4px;
    font-family: var(--font);
}

.lp-grant-meta {
    font-size: 12px;
    color: #66707c;
    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 h3,
.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: #6fdcb0;
    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);
}

/* CTA boxes that come before the page's first h2 use an h2 (heading order, axe); same look as the h3 ones. */
.info-cta-box h2,
.info-content .info-cta-box h2 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    padding-left: 0;
    border-left: 0;
    font-family: var(--font);
}

.info-cta-box p {
    color: rgba(255,255,255,0.7);
    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: #66707c;
    margin-top: 8px;
    font-family: var(--font);
}

.gdc-right {
    text-align: right;
    flex-shrink: 0;
}

.gdc-amount {
    font-size: 17px;
    font-weight: 700;
    color: #1d7f57;
    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: #5f6b78;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 14px;
    font-family: var(--font);
}

/* Section headings on /Grants are h2s (page outline); keep the small label look. */
.info-content h2.grant-section-heading {
    font-size: 12px;
    color: #5f6b78;
    margin: 32px 0 14px;
    padding-left: 0;
    border-left: 0;
}

.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 {
    display: block;
    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 {
    width: 100%;
    max-width: 960px; /* line up with the property card and results */
    margin: 0 auto;
}

.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;
}

/* Results teaser — headline amount shown above the optional email card */
.results-teaser {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background: #e9f8f0;
    border: 1px solid #4ac994;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.results-teaser .rt-headline { font-size: 1.15rem; color: #12324f; }
.results-teaser .rt-headline strong { color: #0f7a4f; font-size: 1.3rem; }
.results-teaser .rt-sub { font-size: .9rem; color: #35506b; margin-top: .2rem; }
.results-teaser .rt-btn {
    background: #12324f;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .7rem 1.2rem;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.results-teaser .rt-btn:hover { background: #1a4670; }

/* Prominent "optional" banner across the top of the email card */
.lc-optional-banner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #f3f6fa;
    border: 1px dashed #9db3c9;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .95rem;
    color: #24405c;
}
@media (max-width: 600px) {
    .lc-optional-banner { flex-direction: column; align-items: flex-start; gap: .4rem; }
    .results-teaser .rt-btn { width: 100%; }
}

.lc-optional-tag {
    flex: 0 0 auto;
    background: #12324f;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: .25rem .6rem;
}

.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-loans {
    margin-top: .3rem;
    font-size: .95rem;
    font-weight: 600;
}

.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; }


/* Direct answer box at the top of grant pages (Phase 1 CTR work) */
.direct-answer {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    background: #f2fbf7;
    border-left: 4px solid #4ac994;
    border-radius: 8px;
}
.direct-answer p { margin: 0 0 .5rem; color: #1a3a5c; line-height: 1.6; }
.direct-answer p:last-child { margin-bottom: 0; }
.direct-answer a { color: #1a3a5c; font-weight: 600; }
.direct-answer .contact-list { margin: 0 0 .5rem; padding-left: 1.1rem; color: #1a3a5c; line-height: 1.7; }
.info-content .lp-faq-list { margin-bottom: 1.5rem; }
.county-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; margin: 0 0 1.75rem; }
.county-link-grid a { display: block; padding: .5rem .75rem; border: 1px solid #d6e2ec; border-radius: 8px; color: #1a3a5c; font-weight: 600; text-decoration: none; background: #fff; }
.county-link-grid a:hover, .county-link-grid a:focus { border-color: #4ac994; background: #f2fbf7; }

/* Heat pump deep page (Phase 2): tables, checklist, combine box, mini-finder */
.hp-table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .95rem; }
.hp-table th, .hp-table td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid #e3eaf0; vertical-align: top; color: #1a3a5c; }
.hp-table thead th { background: #f4f7fa; font-weight: 700; }
.hp-table tr.hp-total td { background: #f2fbf7; }
.hp-checklist { list-style: none; padding-left: 0; }
.hp-checklist li { position: relative; padding-left: 1.75rem; }
.hp-checklist li::before { content: '\2713'; position: absolute; left: .25rem; color: #2fa874; font-weight: 700; }
.hp-combine { margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid #d6e2ec; border-radius: 10px; background: #fafcfd; }
.hp-combine h2 { margin-top: 0; }
.hp-mini-finder { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; align-items: end; margin-top: .75rem; }
.hp-mini-finder label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
.hp-mini-finder select { padding: .55rem .6rem; border: 1px solid #c9d6e2; border-radius: 8px; font-size: 1rem; background: #fff; color: #1a3a5c; }
.hp-mini-finder button { padding: .65rem 1rem; border: 0; border-radius: 8px; background: #4ac994; color: #0f2a40; font-weight: 700; font-size: 1rem; cursor: pointer; }
.hp-mini-finder button:hover, .hp-mini-finder button:focus { background: #3bb784; }
.hp-sources { font-size: .85rem; color: #5b6b7a; }
@media (max-width: 600px) { .hp-table { font-size: .85rem; } .hp-table th, .hp-table td { padding: .45rem .5rem; } }
.info-cta-box .hp-mini-finder label { color: #ffffff; text-align: left; }
.hp-scroll { overflow-x: auto; margin: 0 0 1rem; } .hp-scroll .hp-table { margin: 0; min-width: 520px; }

/* Phase 2 — public grant change log ("What's changed", rendered by _LastVerified) */
.grant-changes {
    margin: -0.75rem 0 1.5rem;
    padding: .5rem .8rem;
    border: 1px solid var(--border, #e2e5ea);
    border-radius: var(--radius-sm, 8px);
    background: var(--surface, #fff);
    font-size: .9rem;
}
.grant-changes summary { cursor: pointer; font-weight: 600; color: var(--navy, #1a3a5c); }
.grant-changes ul { list-style: none; margin: .6rem 0 0; padding: 0; }
.grant-changes li { padding: .45rem 0; border-top: 1px solid var(--border, #e2e5ea); }
.grant-changes li:first-child { border-top: 0; }
.grant-changes time { display: block; font-weight: 600; font-size: .82rem; color: var(--text-muted, #5f6b7a); }
.grant-changes li a { margin-left: .3rem; white-space: nowrap; }
.grant-changes p { margin: .5rem 0 0; color: var(--text-muted, #5f6b7a); }
.grant-changes .grant-changes-note { font-size: .8rem; }

/* Phase 3 — generated scheme pages (/Schemes/{id}) and the A–Z list (/Schemes) */
.scheme-status {
    padding: .5rem .8rem;
    border-radius: var(--radius-sm, 8px);
    background: var(--warning-bg, #FAEEDA);
    color: var(--warning-text, #854F0B);
}
.scheme-facts th[scope="row"] { text-align: left; padding-right: 1rem; width: 35%; }
.scheme-facts th, .scheme-facts td { white-space: normal; overflow-wrap: anywhere; }
.scheme-az { list-style: none; padding: 0; margin: 0 0 1.5rem; columns: 2 18rem; column-gap: 2rem; }
.scheme-az li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px solid var(--border, #D3D1C7); }
.scheme-az span { color: var(--text-muted, #6b6a63); font-size: .9rem; }

/* Phase 3 — local figures on county pages */
.county-figures { max-width: 480px; }
.county-figures th[scope="row"] { font-weight: 600; width: 60%; }

/* Phase 3 — grant changes log (/Grants/Changes) */
.change-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.change-list li { padding: .7rem 0; border-bottom: 1px solid var(--border, #D3D1C7); }
.change-list time { display: block; font-size: .82rem; font-weight: 600; color: var(--text-muted, #6b6a63); }
.change-list .change-grant { display: block; font-weight: 700; margin: .1rem 0; }
.change-list span { display: block; margin-bottom: .2rem; }

/* Homepage — "Grants by situation" links under the featured grants */
.lp-topic-links { margin: 2rem auto 0; text-align: center; }
.lp-topic-links h3 { font-size: 1rem; margin: 0 0 .75rem; color: var(--navy, #1a3a5c); }
.lp-topic-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.lp-topic-links a { display: inline-block; padding: .4rem .85rem; border: 1px solid var(--border, #D3D1C7); border-radius: 999px; background: #fff; color: var(--navy, #1a3a5c); text-decoration: none; font-size: .9rem; }
.lp-topic-links a:hover, .lp-topic-links a:focus-visible { border-color: #4ac994; background: #f2fbf7; }
.county-agency-flag { color: var(--text-muted, #6b6a63); font-size: .82rem; }

/* ── Cookie banner (consent.js) ── */
.cookie-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
    max-width: 720px; margin: 0 auto; padding: 16px 18px;
    background: var(--navy); color: #fff; border-radius: 12px; border: 1px solid #4ac994;
    box-shadow: 0 8px 28px rgba(0,0,0,.25);
    display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center;
    font-size: .92rem; line-height: 1.45;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 320px; }
.cookie-banner a { color: #4ac994; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-btn {
    min-width: 96px; padding: 9px 16px; border-radius: 8px; cursor: pointer;
    font: inherit; font-weight: 600; border: 1px solid #fff;
    background: #fff; color: #1a3a5c;   /* Decline and Accept get equal weight (DPC cookie guidance) */
}
.cookie-btn-accept { background: #4ac994; border-color: #4ac994; color: #1a3a5c; }
.cookie-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ── Homepage "Coming up" (next dated grant changes) ── */
.lp-coming-up { max-width: 760px; margin: 1.75rem auto 0; padding: 1rem 1.25rem; background: #fff; border: 1px solid var(--border, #D3D1C7); border-left: 4px solid #4ac994; border-radius: 10px; text-align: left; }
.lp-coming-up h3 { font-size: 1rem; margin: 0 0 .5rem; color: var(--navy, #1a3a5c); }
.lp-coming-up ul { margin: 0; padding-left: 1.1rem; }
.lp-coming-up li { margin: .35rem 0; font-size: .92rem; line-height: 1.45; }
.lp-coming-up time { font-weight: 700; color: var(--navy, #1a3a5c); white-space: nowrap; }
.lp-coming-up p { margin: .6rem 0 0; font-size: .9rem; }

/* "Follow us on LinkedIn" line under the finder results */
.res-follow { max-width: 760px; margin: 8px auto 32px; padding: 0 16px; text-align: center; font-size: .9rem; color: #4a5568; }
.res-follow a { color: #1a3a5c; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   WIDE SCREENS (19 Nov 2026)
   Every container used to stop at 1200px (info pages 1100px) with no
   min-width breakpoints, so 1920px+ monitors were ~40–55% empty. The shell
   now widens in steps, and header, sections, info pages and footer share
   one width so their edges line up. Nothing changes below 1600px.
   ═══════════════════════════════════════════════════════════ */
:root { --container-max: 1200px; }
@media (min-width: 1600px) { :root { --container-max: 1440px; } }
@media (min-width: 2200px) { :root { --container-max: 1680px; } }

.header-inner,
.footer-inner,
.lp-grant-strip-inner,
.lp-section-wrap,
.lp-section,
.info-content {
    max-width: var(--container-max);
}

@media (min-width: 1600px) {
    /* .lp-grants-grid stays at 3 columns: it shows 6 cards, 4 would leave 2 orphans */
    .county-grants-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lp-hero-box { max-width: 960px; }
    .card { max-width: 900px; }
    .info-card,
    .wide-card,
    #card-results,
    .lead-capture,
    .results-teaser { max-width: 1080px; }
}

@media (min-width: 2200px) {
    body { font-size: 17px; }
    .lp-hero-box { max-width: 1040px; }
}

/* ═══════════════════════════════════════════════════════════
   PHONE MENU (19 Nov 2026)
   Below 600px the nav links were hidden with no way to reach them.
   A menu button (_Layout.cshtml) now opens them as a panel under the header.
   ═══════════════════════════════════════════════════════════ */
.header-menu-btn { display: none; }

@media (max-width: 600px) {
    .header-actions { gap: 10px; }
    .header-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        background: transparent;
        color: #ffffff;
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 8px;
        cursor: pointer;
        flex-shrink: 0;
    }
    .header-menu-btn:hover { border-color: rgba(255,255,255,0.6); }
    .header-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .header-menu-btn .icon-close { display: none; }
    .app-header.menu-open .header-menu-btn .icon-open { display: none; }
    .app-header.menu-open .header-menu-btn .icon-close { display: block; }

    .app-header.menu-open .header-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: calc(100% + 3px);
        left: 0;
        right: 0;
        background: var(--navy);
        border-bottom: 3px solid var(--accent);
        padding: 6px 16px 12px;
        box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    }
    .app-header.menu-open .header-nav-link {
        font-size: 16px;
        padding: 14px 8px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .app-header.menu-open .header-nav-link:last-child { border-bottom: none; }
    .app-header.menu-open .header-nav-link.active { color: var(--accent); }
}

/* Generated scheme pages: "Apply through your county council" list of the 26 county pages */
.info-content ul.scheme-counties { list-style: none; padding: 0; margin: 0.75rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.35rem 1rem; }
.info-content .scheme-counties li { margin: 0; }
.scheme-counties a { display: inline-block; padding: 0.3rem 0; }

/* Links inside the dark page hero (none today; the browser's default blue on navy fails contrast, 1.23:1, found 21 Nov 2026).
   White + underline is 11.6:1 on #1a3a5c. */
.info-hero a { color: #ffffff; text-decoration: underline; text-underline-offset: 2px; }
.info-hero a:hover { color: #6fdcb0; }
.info-hero a:focus-visible { outline: 2px solid #6fdcb0; outline-offset: 2px; }
