/*
Theme Name: Caledonia Solar
Theme URI: https://caledoniasolar.co.uk
Description: Caledonia Solar — bespoke commercial solar PV site. Child of GeneratePress. V3 dark theme using Andy's exact mockup tokens (DM Sans + Space Mono, #0A0E14 base, amber #ED9822).
Author: Webly Studio
Version: 3.0.0
Template: generatepress
Text Domain: caledonia-solar
*/

/* =========================================================================
   1. TOKENS — Andy's exact mockup palette
   ========================================================================= */
:root {
    --amber:          #ED9822;
    --amber-muted:    #C47F1A;
    --amber-subtle:   rgba(237,152,34,0.10);
    --amber-overlay:  rgba(196,127,26,0.7);
    --dark:           #0A0E14;
    --dark-mid:       #111820;
    --dark-card:      #141B24;
    --slate:          #1B2432;
    --slate-light:    #2A3545;
    --text-primary:   #F2F0ED;
    --text-secondary: #9AA3B0;
    --text-muted:     #6B7685;

    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Space Mono', 'SF Mono', 'Monaco', monospace;

    --radius:         6px;
    --radius-sm:      4px;
    --section-y:      8rem;
}

/* =========================================================================
   2. RESET + BASE
   ========================================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body) !important;
    background: var(--dark) !important;
    color: var(--text-primary) !important;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; transition: color .25s; }
a:hover { color: var(--amber); }

h1, h2, h3, h4 {
    font-family: var(--font-body);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.2rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.05rem; font-weight: 600; }
p  { color: var(--text-secondary); line-height: 1.7; }

/* =========================================================================
   3. CONTAINER & PAGE WRAPPERS — defeat GeneratePress constraints
   ========================================================================= */
html, body { background: var(--dark) !important; }
.site, .grid-container, .grid-container.container,
#page, #content, .site-content, .content-area, .inside-article,
main, .cs-main, .site-header, .site-footer {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    float: none !important;
}
#secondary, .widget-area, .sidebar, .site-info, .footer-widgets, .footer-bar { display: none !important; }
.cs-container { max-width: 1200px; margin: 0 auto; padding: 0 3rem; }
@media (max-width: 1024px) { .cs-container { padding: 0 1.5rem; } }

/* =========================================================================
   4. NAVIGATION (sticky, blur on scroll)
   ========================================================================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,14,20,0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background .4s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.inside-header {
    padding: 1.25rem 3rem !important;
    display: flex !important; align-items: center; justify-content: space-between;
}
@media (max-width: 1024px) { .inside-header { padding: 1rem 1.5rem !important; } }
.site-logo .header-image,
.header-image.is-logo-image,
.cs-header-logo img { max-height: 192px !important; width: auto; display: block; }
.cs-footer-logo img { max-height: 132px !important; }
.main-title, .site-description { display: none !important; }
/* Header bar grows to contain the larger logo */
.site-header .inside-header { padding-top: 1rem !important; padding-bottom: 1rem !important; }
@media (max-width: 768px) {
    .site-logo .header-image, .header-image.is-logo-image,
    .cs-header-logo img { max-height: 80px !important; }
    .cs-footer-logo img { max-height: 70px !important; }
}

.main-navigation, .main-navigation .main-nav, .main-navigation .main-nav ul { background: transparent !important; }
.main-navigation .main-nav > ul > li > a {
    font-family: var(--font-body) !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding: 0.875rem 1.125rem !important;
    letter-spacing: 0.01em;
}
.main-navigation .main-nav > ul > li > a:hover { color: var(--text-primary) !important; }
.menu-toggle, .menu-toggle .gp-icon svg, .menu-toggle .gp-icon path {
    color: var(--amber) !important; fill: var(--amber) !important;
}

/* Dropdowns — fully opaque so list is readable */
.main-navigation .sub-menu,
.main-navigation ul ul,
.main-navigation .main-nav ul ul {
    background-color: #0E1626 !important;
    background: #0E1626 !important;
    border: 1px solid #2A3545 !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.65) !important;
    border-radius: var(--radius) !important;
    padding: 0.5rem 0 !important;
    min-width: 260px !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
}
.main-navigation .sub-menu li,
.main-navigation ul ul li {
    background: transparent !important;
    border: 0 !important;
}
.main-navigation .sub-menu a,
.main-navigation ul ul a,
.main-navigation .main-nav ul ul li a {
    color: #F2F0ED !important;
    background-color: transparent !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding: 0.75rem 1.25rem !important;
    line-height: 1.4;
    border: 0 !important;
}
.main-navigation .sub-menu a:hover,
.main-navigation ul ul a:hover,
.main-navigation .main-nav ul ul li a:hover {
    background-color: rgba(237,152,34,0.15) !important;
    color: var(--amber) !important;
}

/* =========================================================================
   5. BUTTONS — Andy's exact spec (uppercase mono-feel)
   ========================================================================= */
.cs-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1.5px solid transparent;
    transition: all .25s;
    cursor: pointer; text-decoration: none; line-height: 1;
    white-space: nowrap;
}
.cs-btn-primary {
    background: var(--amber); color: var(--dark) !important;
    border-color: var(--amber);
}
.cs-btn-primary:hover {
    background: #d4880e; border-color: #d4880e;
    color: var(--dark) !important;
    transform: translateY(-1px);
}
/* Ghost = amber outline. Always visible on any background. */
.cs-btn-ghost {
    background: transparent;
    color: var(--amber) !important;
    border-color: var(--amber) !important;
    border-width: 2px;
    font-weight: 700;
}
.cs-btn-ghost:hover {
    background: var(--amber);
    color: var(--dark) !important;
    border-color: var(--amber) !important;
    transform: translateY(-1px);
}
.cs-hero-cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* Text link */
.cs-link-amber, .btn-text {
    color: var(--amber);
    font-size: 0.85rem; font-weight: 600;
    letter-spacing: 0.03em;
    display: inline-flex; align-items: center; gap: 0.35rem;
    transition: gap .25s;
}
.cs-link-amber:hover, .btn-text:hover { gap: 0.6rem; color: var(--amber); }

/* =========================================================================
   6. EYEBROW (section-tag)
   ========================================================================= */
.cs-eyebrow, .section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.25rem;
}

/* =========================================================================
   7. SECTIONS
   ========================================================================= */
.cs-section { padding: var(--section-y) 0; position: relative; }
.cs-section-title { color: var(--text-primary); margin-bottom: 1.5rem; }
.cs-prose-intro { color: var(--text-secondary); line-height: 1.7; max-width: 720px; margin-bottom: 3rem; }
@media (max-width: 1024px) { :root { --section-y: 5rem; } }

/* Amber rule divider */
.amber-rule { height: 1px; background: var(--amber); opacity: 0.15; margin: 0 3rem; }

/* =========================================================================
   8. HOMEPAGE HERO — Layer 1: Dark Infrastructure
   ========================================================================= */
.cs-home-hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: flex-end;
    padding: 6rem 3rem;
    overflow: hidden;
    background: var(--dark);
    background-size: cover; background-position: center;
}
.cs-home-hero-video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
    filter: brightness(.40) saturate(.7);
}
.cs-home-hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg,
        rgba(10,14,20,0.60) 0%,
        rgba(10,14,20,0.10) 40%,
        rgba(10,14,20,0.05) 55%,
        rgba(196,127,26,0.08) 70%,
        rgba(237,152,34,0.12) 80%,
        rgba(10,14,20,0.70) 100%);
}
.cs-home-hero .cs-container { position: relative; z-index: 2; max-width: 1200px; padding: 0 3rem; }
.cs-hero-text { max-width: 720px; text-align: left !important; }
.cs-home-h1 {
    color: var(--text-primary);
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 700; line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    text-align: left !important;
}
.cs-home-sub {
    color: var(--text-secondary);
    font-size: 1.1rem; line-height: 1.65;
    max-width: 540px; margin-bottom: 1rem;
    text-align: left !important;
}
.cs-home-micro {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0.4rem 0;
}

/* =========================================================================
   9. TRUST STRIP (Section 2 — text brief specifies this exact section)
   ========================================================================= */
.cs-trust-strip {
    background: var(--dark-mid);
    padding: 2.5rem 0 !important;
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cs-trust-strapline {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.25rem;
}
.cs-trust-items {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 0.75rem 2rem;
    max-width: 1100px; margin: 0 auto;
}
.cs-trust-item {
    color: var(--text-secondary);
    font-size: 0.85rem;
    position: relative;
    padding-left: 1.125rem;
    line-height: 1.4;
}
.cs-trust-item::before {
    content: ""; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 5px;
    background: var(--amber);
    border-radius: 50%;
}
.cs-funder-row {
    margin-top: 1.5rem; padding-top: 1.25rem;
    border-top: 1px solid var(--slate-light);
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center; gap: 0.85rem;
}
.cs-funder-label {
    width: 100%; text-align: center;
    font-family: var(--font-mono);
    font-size: 0.65rem; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.cs-funder-name {
    color: var(--text-secondary); font-weight: 600; font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--slate-light);
    border-radius: 3px;
}
.cs-funder-logo { max-height: 24px; width: auto; opacity: 0.85; }

/* =========================================================================
   10. OPPORTUNITY 98% (Section 3) — typography-led
   ========================================================================= */
.cs-home-opportunity { background: var(--dark); text-align: center; }
.cs-opportunity-headline {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    color: var(--text-primary);
    font-weight: 700; line-height: 1.25;
    max-width: 1000px; margin: 0 auto 1.5rem;
}
.cs-opportunity-headline strong,
.cs-opportunity-headline em {
    color: var(--amber); font-style: normal;
}
.cs-home-opportunity .cs-prose {
    max-width: 820px; margin: 0 auto;
    color: var(--text-secondary); font-size: 1rem; line-height: 1.7;
}
.cs-home-opportunity .cs-prose p + p { margin-top: 1rem; }

/* =========================================================================
   11. VALUE PILLARS (Section 4) — 3 cards with icons
   ========================================================================= */
.cs-home-pillars { background: var(--dark-mid); }
.cs-home-pillars::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--amber-muted), transparent);
    opacity: 0.3;
}
.cs-pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 880px) { .cs-pillar-grid { grid-template-columns: 1fr; } }
.cs-pillar-card {
    background: var(--dark-card);
    border: 1px solid var(--slate-light);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color .3s, transform .25s;
}
.cs-pillar-card::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--amber);
    transform: scaleX(0); transform-origin: left;
    transition: transform .4s;
}
.cs-pillar-card:hover { border-color: var(--amber-muted); transform: translateY(-3px); }
.cs-pillar-card:hover::after { transform: scaleX(1); }
.cs-pillar-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--amber-subtle);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.cs-pillar-icon svg { width: 22px; height: 22px; stroke: var(--amber); fill: none; stroke-width: 1.5; }
.cs-pillar-title { color: var(--text-primary); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.cs-pillar-body  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; margin: 0; }

/* =========================================================================
   12. PROCESS STEPS (Section 5) — 4-step horizontal with connecting line
   ========================================================================= */
.cs-home-process { background: var(--dark-mid); }
.cs-home-process::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--amber-muted), transparent);
    opacity: 0.3;
}
.cs-process-steps {
    list-style: none; counter-reset: step;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}
.cs-process-steps::before {
    content: ""; position: absolute; top: 22px; left: 12.5%; right: 12.5%; height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--amber-muted) 15%, var(--amber) 50%, var(--amber-muted) 85%, transparent 100%);
    opacity: 0.35;
    z-index: 0;
}
@media (max-width: 880px) {
    .cs-process-steps { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .cs-process-steps::before { display: none; }
}
@media (max-width: 560px) { .cs-process-steps { grid-template-columns: 1fr; } }
.cs-process-steps > li {
    counter-increment: step;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cs-process-steps > li::before {
    content: counter(step);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--amber);
    line-height: 44px;
    margin: 0 auto 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border: 1px solid var(--amber-muted);
    border-radius: 50%;
    background: var(--dark-mid);
    position: relative;
    z-index: 1;
    text-align: center;
}
.cs-step-title {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.cs-step-body {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* =========================================================================
   13. SECTOR GRID (Section 6)
   ========================================================================= */
.cs-home-sectors { background: var(--dark); }
.cs-home-sectors::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--slate-light), transparent);
}
.cs-sector-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
}
@media (max-width: 960px) { .cs-sector-grid { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 560px) { .cs-sector-grid { grid-template-columns: 1fr !important; } }
.cs-sector-card {
    position: relative;
    background: var(--dark-card) !important;
    background-color: var(--dark-card) !important;
    background-size: cover; background-position: center;
    border: 1px solid var(--slate-light) !important;
    border-radius: var(--radius) !important;
    padding: 2rem;
    min-height: 200px;
    overflow: hidden;
    color: var(--text-primary) !important;
    text-decoration: none;
    display: flex; flex-direction: column; justify-content: flex-end;
    transition: border-color .3s, transform .25s;
}
.cs-sector-card::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--amber);
    transform: scaleX(0); transform-origin: left;
    transition: transform .4s;
    z-index: 2;
}
.cs-sector-card.has-image::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,14,20,0.30) 0%, rgba(10,14,20,0.92) 100%);
    z-index: 1;
}
.cs-sector-card:hover { border-color: var(--amber-muted) !important; transform: translateY(-3px); }
.cs-sector-card:hover::after { transform: scaleX(1); }
.cs-sector-card-title,
.cs-sector-card-blurb { position: relative; z-index: 2; }
.cs-sector-card-title {
    color: var(--text-primary) !important;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
}
.cs-sector-card-title::after {
    content: ""; margin: 0; padding: 0;
}
.cs-sector-card-blurb { color: var(--text-muted) !important; font-size: 0.85rem; line-height: 1.6; margin: 0; }

/* =========================================================================
   14. FUNDING CARDS (Section 7)
   ========================================================================= */
.cs-home-funding { background: var(--dark); }
.cs-funding-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
@media (max-width: 880px) { .cs-funding-grid { grid-template-columns: 1fr; } }
.cs-funding-card {
    background: var(--dark-card) !important;
    border: 1px solid var(--slate-light) !important;
    border-radius: var(--radius);
    padding: 2rem;
    display: flex; flex-direction: column;
}
.cs-funding-card-tagline {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--dark) !important;
    background: var(--amber);
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 1rem;
    font-weight: 600;
}
.cs-funding-card-title { color: var(--text-primary) !important; font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.cs-funding-card-body  { color: var(--text-muted) !important; font-size: 0.9rem; flex: 1; margin-bottom: 1rem; line-height: 1.65; }
.cs-funding-card-cta {
    color: var(--amber) !important;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.cs-funding-card-cta:hover { color: var(--amber); }

/* =========================================================================
   15. CTA BLOCK (Section 8) — Layer 1 return
   ========================================================================= */
.cs-cta-block {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-mid) 30%, var(--dark-mid) 70%, var(--dark) 100%) !important;
    text-align: center;
    padding: 8rem 0 !important;
    position: relative; overflow: hidden;
    min-height: 50vh; display: flex; align-items: center; justify-content: center;
}
.cs-cta-block::before {
    content: ""; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(237,152,34,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.cs-cta-block.has-image {
    background-size: cover !important; background-position: center !important;
}
.cs-cta-heading { color: var(--text-primary); margin-bottom: 1.25rem; }
.cs-cta-body { color: var(--text-secondary); font-size: 1.05rem; max-width: 640px; margin: 0 auto 2.5rem; }
.cs-cta-block .cs-hero-cta-row { justify-content: center; }

/* =========================================================================
   16. DUAL CONVERSION (Section 9)
   ========================================================================= */
.cs-home-final { background: var(--dark); }
.cs-final-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .cs-final-grid { grid-template-columns: 1fr; } }
.cs-final-card {
    padding: 2.5rem 2rem;
    background: var(--dark-card) !important;
    border: 1px solid var(--slate-light) !important;
    border-radius: var(--radius);
}
.cs-final-card:nth-child(2) {
    background: linear-gradient(135deg, var(--amber-subtle) 0%, var(--dark-card) 100%) !important;
    border-color: rgba(237,152,34,0.30) !important;
}
.cs-final-title { color: var(--text-primary); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.cs-final-body  { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.75rem; line-height: 1.65; }

/* =========================================================================
   17. INNER PAGE HEROS (sector/solution/geo singles) + breadcrumbs
   ========================================================================= */
.cs-sector-hero, .cs-sol-hero, .cs-geo-hero,
.cs-archive-hero {
    background: var(--dark);
    padding: 8rem 0 4rem;
    min-height: auto;
    position: relative;
}
.cs-sector-hero h1, .cs-sol-hero h1, .cs-geo-hero h1, .cs-geo-h1,
.cs-archive-hero h1 {
    color: var(--text-primary);
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    max-width: 800px;
}
.cs-sector-hero h1::after, .cs-sol-hero h1::after, .cs-geo-h1::after,
.cs-archive-hero h1::after { display: none; }
.cs-hero-lead, .cs-geo-mapline, .cs-geo-triggerline,
.cs-archive-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 780px;
    margin: 0 0 1rem;
}

/* GEO-statement card (per NfP mockup) */
.cs-geo-statement {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    padding: 1.5rem;
    background: var(--dark-card);
    border-left: 3px solid var(--amber);
    border-radius: 0 var(--radius) var(--radius) 0;
    max-width: 780px;
    margin-top: 1.5rem;
}
.cs-urgency-banner {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(237,152,34,0.06);
    border: 1px solid rgba(237,152,34,0.15);
    border-radius: var(--radius);
    margin: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.cs-urgency-banner strong { color: var(--amber); }

/* =========================================================================
   18. PROSE (CPT body content)
   ========================================================================= */
.cs-prose, .entry-content { color: var(--text-primary); font-size: 1rem; line-height: 1.7; max-width: 800px; }
.cs-prose h2, .entry-content h2 { color: var(--text-primary); margin-top: 2em; margin-bottom: 0.6em; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.cs-prose h3, .entry-content h3 { color: var(--text-primary); margin-top: 1.5em; margin-bottom: 0.5em; font-size: 1.15rem; }
.cs-prose p, .cs-prose li, .entry-content p, .entry-content li { color: var(--text-secondary); }
.cs-prose ul, .cs-prose ol, .entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 1em 0; }
.cs-prose li { margin: 0.4em 0; }
.cs-prose strong, .entry-content strong { color: var(--text-primary); }
.cs-prose a, .entry-content a { color: var(--amber); border-bottom: 1px solid currentColor; }
.cs-prose a:hover, .entry-content a:hover { color: var(--amber); }

/* Repurposed callout blocks for resource pages */
.cs-callout {
    padding: 1.25rem 1.5rem;
    background: rgba(237,152,34,0.06);
    border: 1px solid rgba(237,152,34,0.15);
    border-radius: var(--radius);
    margin: 2rem 0;
}
.cs-callout p { margin: 0; color: var(--text-secondary); }
.cs-callout-info {
    background: var(--dark-card);
    border-color: var(--slate-light);
}
.cs-callout-info h3 { color: var(--text-primary); margin-bottom: 0.5rem; font-size: 1rem; }

.cs-cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; }

/* Estates / process bullets / stats — adopt Andy's card tokens */
.cs-estate-grid, .cs-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.cs-estate-card, .cs-stat-card {
    background: var(--dark-card) !important;
    border: 1px solid var(--slate-light) !important;
    border-radius: var(--radius);
    padding: 1.25rem;
}
.cs-estate-name, .cs-stat-value { color: var(--text-primary); font-weight: 600; }
.cs-stat-value { font-size: 1.35rem; }
.cs-stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem; letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 0.5rem;
}
.cs-estate-descriptor { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }
.cs-stat-value-prose { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }

.cs-process-bullets { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
.cs-process-bullets li {
    padding: 1.25rem 1.5rem;
    background: var(--dark-card);
    border: 1px solid var(--slate-light);
    border-left: 3px solid var(--amber);
    border-radius: var(--radius);
}
.cs-bullet-title { display: block; color: var(--text-primary); font-size: 1rem; margin-bottom: 0.25rem; font-weight: 600; }
.cs-bullet-body  { color: var(--text-muted); font-size: 0.9rem; }

/* FAQ accordion (used on resource/sector singles, NOT homepage) */
.cs-faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 880px; }
.cs-faq-item {
    background: var(--dark-card) !important;
    border: 1px solid var(--slate-light) !important;
    border-radius: var(--radius);
}
.cs-faq-q {
    cursor: pointer; padding: 1.125rem 1.25rem; padding-right: 3rem;
    font-weight: 600; color: var(--text-primary);
    list-style: none; position: relative;
}
.cs-faq-q::-webkit-details-marker { display: none; }
.cs-faq-q::after {
    content: "+"; position: absolute; right: 1.25rem; top: 50%;
    transform: translateY(-50%);
    color: var(--amber); font-size: 1.4rem; line-height: 1;
}
.cs-faq-item[open] .cs-faq-q::after { content: "−"; }
.cs-faq-a { padding: 0 1.25rem 1.25rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* Inline illustrations */
figure.cs-illustration-block {
    margin: 0; padding: 3.5rem 0;
    background: var(--dark-mid);
    border-top: 1px solid var(--slate-light);
    border-bottom: 1px solid var(--slate-light);
}
figure.cs-illustration-block img {
    display: block; width: 92%; max-width: 1100px;
    margin: 0 auto; height: auto; border-radius: var(--radius);
}

/* =========================================================================
   19. ARCHIVES
   ========================================================================= */
.cs-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) { .cs-archive-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cs-archive-grid { grid-template-columns: 1fr; } }
.cs-archive-card {
    background: var(--dark-card) !important;
    background-size: cover; background-position: center;
    border: 1px solid var(--slate-light) !important;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 240px;
    color: var(--text-primary) !important;
    text-decoration: none;
    display: flex; flex-direction: column; justify-content: flex-end;
    position: relative;
    transition: border-color .3s, transform .25s;
}
.cs-archive-card.has-image::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,14,20,0.25) 0%, rgba(10,14,20,0.92) 100%);
}
.cs-archive-card:hover { border-color: var(--amber-muted) !important; transform: translateY(-3px); }
.cs-archive-card-body { position: relative; z-index: 2; padding: 1.75rem 1.5rem; }
.cs-archive-card-title { color: var(--text-primary); font-size: 1.05rem; font-weight: 600; margin: 0 0 0.5rem; }
.cs-archive-card-blurb { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; margin: 0 0 0.85rem; }
.cs-archive-card-cta {
    color: var(--amber); font-family: var(--font-mono);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cs-archive-pagination { margin-top: 3rem; }
.cs-archive-pagination .nav-links { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.cs-archive-pagination a, .cs-archive-pagination .current {
    padding: 0.6rem 1rem;
    border: 1px solid var(--slate-light);
    border-radius: var(--radius);
    color: var(--text-secondary);
    background: var(--dark-card);
    text-decoration: none;
    font-size: 0.85rem;
}
.cs-archive-pagination .current { background: var(--amber); color: var(--dark); border-color: var(--amber); }
.cs-archive-pagination a:hover { color: var(--amber); border-color: var(--amber); }

/* =========================================================================
   20. FOOTER
   ========================================================================= */
.cs-footer { background: var(--dark) !important; border-top: 1px solid var(--slate-light); padding: 4rem 0 2rem; }
.cs-footer-main { padding-bottom: 2rem; }
.cs-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.1fr 1.3fr 1.4fr;
    gap: 2.5rem;
}
@media (max-width: 1024px) { .cs-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 560px)  { .cs-footer-grid { grid-template-columns: 1fr; } }

.cs-footer-brand { padding-right: 1.5rem; }
.cs-footer-logo { display: inline-block; margin-bottom: 1.25rem; }
.cs-footer-logo img { max-height: 44px; }
.cs-footer-tagline { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; margin: 0; max-width: 320px; }

.cs-footer-h {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600; letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 1.25rem;
}
.cs-footer-list { list-style: none; padding: 0; margin: 0; }
.cs-footer-list li { margin: 0 0 0.45rem; line-height: 1.35; }
.cs-footer-list a { color: var(--text-secondary); font-size: 0.82rem; transition: color .2s; }
.cs-footer-list a:hover { color: var(--amber); }
.cs-footer-col .cs-footer-list li { break-inside: avoid; }
.cs-footer-list-accent {
    color: var(--amber) !important;
    font-weight: 600;
}
.cs-footer-list-accent:hover { color: var(--amber) !important; opacity: 0.85; }

.cs-footer-addr { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; margin: 0 0 0.75rem; }
.cs-footer-line { margin: 0 0 0.5rem; font-size: 0.85rem; }
.cs-footer-line a { color: var(--text-secondary); }
.cs-footer-line a:hover { color: var(--amber); }

.cs-footer-creds {
    margin: 1rem 0 1.25rem;
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.cs-footer-creds span {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--slate-light);
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    text-transform: uppercase;
}
.cs-footer-cta { margin-top: 0.5rem; }

.cs-footer-bottom {
    border-top: 1px solid var(--slate-light);
    padding-top: 2rem;
}
.cs-footer-bottom-row {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
}
.cs-footer-copyright { color: var(--text-muted); font-size: 0.75rem; }
.cs-footer-utility { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.cs-footer-utility li a { color: var(--text-muted); font-size: 0.75rem; }
.cs-footer-utility li a:hover { color: var(--text-secondary); }

/* =========================================================================
   20a. HARD-LOCK SECTION BACKGROUNDS — beat any specificity override
   ========================================================================= */
section.cs-section, .cs-section { background-color: var(--dark) !important; }
.cs-trust-strip       { background-color: var(--dark-mid) !important; }
.cs-home-opportunity  { background-color: var(--dark) !important; }
.cs-home-pillars      { background-color: var(--dark-mid) !important; }
.cs-home-process      { background-color: var(--dark-mid) !important; }
.cs-home-sectors      { background-color: var(--dark) !important; }
.cs-home-funding      { background-color: var(--dark) !important; }
.cs-home-decision     { background-color: var(--dark-mid) !important; }
.cs-home-regional     { background-color: var(--dark) !important; }
.cs-cta-block         { background: linear-gradient(180deg, var(--dark) 0%, var(--dark-mid) 30%, var(--dark-mid) 70%, var(--dark) 100%) !important; }
.cs-home-final        { background-color: var(--dark) !important; }
.cs-archive-hero      { background-color: var(--dark-mid) !important; }
.cs-archive-grid-section { background-color: var(--dark) !important; }
.cs-sector-hero, .cs-sol-hero, .cs-geo-hero { background-color: var(--dark) !important; }
section.cs-sec-overview, section.cs-sol-intro, section.cs-sol-section,
section.cs-geo-section-2, section.cs-geo-section-3, section.cs-geo-section-4,
section.cs-geo-section-5, section.cs-sol-faqs, section.cs-geo-faqs { background-color: var(--dark) !important; }

/* =========================================================================
   20b. GLOBAL CONTRAST GUARD — kill any white surfaces from GP / plugins
   ========================================================================= */
html, body, #page, #content, .site, .site-content, .content-area,
.inside-article, .entry-content, .entry-header, .entry-summary,
main, .cs-main, article, .post, .page {
    background-color: var(--dark) !important;
    background: var(--dark) !important;
    color: var(--text-primary) !important;
}
.entry-content,
.entry-content > *,
.entry-content p, .entry-content li, .entry-content td, .entry-content th,
.entry-content blockquote, .entry-content figure, .entry-content figcaption {
    background: transparent !important;
    color: var(--text-secondary) !important;
}
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4,
.entry-content h5, .entry-content h6,
.entry-content strong, .entry-content b { color: var(--text-primary) !important; }
.entry-content a { color: var(--amber) !important; border-bottom: 1px solid currentColor; }
.entry-content a:hover { color: #FFB23E !important; }
.entry-content pre, .entry-content code {
    background: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--slate-light);
    padding: 0.25rem 0.5rem; border-radius: 3px;
}
.entry-content table { background: var(--dark-card) !important; border-color: var(--slate-light) !important; }
.entry-content table th { color: var(--text-primary) !important; background: var(--slate) !important; }

/* WP comments / pingbacks containers if they ever render */
.comments-area, .comment-respond, .comment-list, #respond {
    background: var(--dark) !important;
    color: var(--text-primary) !important;
}

/* Form inputs — if any plugin renders forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="url"], input[type="search"], input[type="password"], textarea, select {
    background: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--slate-light) !important;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
}
input::placeholder, textarea::placeholder { color: var(--text-muted) !important; }
label { color: var(--text-secondary) !important; }
button:not(.cs-btn) {
    background: var(--amber);
    color: var(--dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
}

/* Plain WP page title fallback */
.page-title, .entry-title {
    color: var(--text-primary) !important;
    padding: 6rem 3rem 2rem;
    max-width: 1200px; margin: 0 auto;
    font-size: clamp(2rem, 4vw, 3rem);
}
.entry-content { padding: 0 3rem 4rem; max-width: 920px; margin: 0 auto; }
@media (max-width: 1024px) {
    .entry-content { padding: 0 1.5rem 3rem; }
    .page-title, .entry-title { padding: 4rem 1.5rem 1.5rem; }
}

/* "Awaiting solicitor draft" callout (legal pages) */
.cs-callout {
    padding: 1.25rem 1.5rem;
    background: rgba(237,152,34,0.08) !important;
    border: 1px solid rgba(237,152,34,0.30);
    border-radius: var(--radius);
    margin: 1.5rem 0 2.5rem;
}
.cs-callout p { color: var(--text-primary) !important; margin: 0; }
.cs-callout strong { color: var(--amber) !important; }

/* Cookie consent (Complianz plugin) — match dark theme */
#cmplz-cookiebanner-container,
.cmplz-cookiebanner,
.cmplz-cookiebanner-container,
[id^="cmplz"] {
    background: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--slate-light) !important;
}
.cmplz-cookiebanner button, .cmplz-cookiebanner a { color: var(--text-primary) !important; }

/* =========================================================================
   21. SECTION REVEAL ANIMATIONS
   ========================================================================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.cs-section { animation: fadeUp .6s ease-out both; }
.cs-home-hero { animation: none; }

/* =========================================================================
   22. CONTRAST FIXES — 2026-05-15 WCAG AA audit pass
   Audit: contrast_failures.json (26 fails → target 0)
   ========================================================================= */

/* 22.1 — Lift --text-muted to pass WCAG AA on dark surfaces.
   Was #6B7685 = 4.20:1 (fails AA 4.5). Now #A8B0BC = ~7.4:1 (passes AA). */
:root {
    --text-muted: #A8B0BC !important;
}

/* 22.2 — Primary buttons: bulletproof amber fill (was overridden to transparent). */
.cs-btn.cs-btn-primary,
a.cs-btn-primary,
button.cs-btn-primary,
.cs-btn-primary {
    background: var(--amber) !important;
    background-color: var(--amber) !important;
    color: var(--dark) !important;
    border-color: var(--amber) !important;
}
.cs-btn.cs-btn-primary:hover,
a.cs-btn-primary:hover,
.cs-btn-primary:hover {
    background: #d4880e !important;
    background-color: #d4880e !important;
    border-color: #d4880e !important;
    color: var(--dark) !important;
}

/* 22.3 — Pillar cards: explicit dark-card surface
   (.entry-content > * was forcing transparent in §20b). */
.cs-pillar-card {
    background: var(--dark-card) !important;
    background-color: var(--dark-card) !important;
}
.cs-pillar-title { color: var(--text-primary) !important; }
.cs-pillar-body  { color: var(--text-secondary) !important; }

/* 22.4 — Hide GP's default footer + site-title that bleed through with white bg. */
footer.site-info,
.site-info,
.copyright-bar,
p.main-title,
.site-description {
    display: none !important;
}

/* 22.5 — Hero alignment fixes:
   was align-items:flex-end on 100vh section → 275px dead space above H1.
   Now: vertically centred, tighter min-height, left-anchored block. */
.cs-home-hero {
    align-items: center !important;
    min-height: 78vh !important;
    padding: 5rem 3rem !important;
}
.cs-hero-text {
    text-align: left !important;
    margin-left: 0 !important;
    max-width: 720px;
}
.cs-home-h1 { text-align: left !important; }
.cs-home-hero .cs-hero-cta-row {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* 22.6 — Mobile menu toggle: dark glyph on amber bar (was amber-on-amber). */
.menu-toggle .mobile-menu,
.menu-toggle span { color: var(--dark) !important; }

/* 22.7 — Trust strip funder pills: dark surface + readable label colour
   (was cream pill bg + grey label = 2.38 ratio). */
.cs-trust-strip .cs-funder-row { background: transparent !important; }
.cs-trust-strip .cs-funder-name {
    background: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--slate-light);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
}
.cs-trust-strip .cs-funder-label { color: var(--text-secondary) !important; }
.cs-trust-strapline { color: var(--text-secondary) !important; }

/* 22.8 — Card-body text inside dark cards: lift from --text-muted to --text-secondary
   for the specific selectors flagged at 3.76 ratio. */
.cs-sector-card-blurb,
.cs-funding-card-body,
.cs-final-body { color: var(--text-secondary) !important; }

/* 22.9 — Final two failures from 2026-05-15 re-audit. */
.cs-prose-intro { color: var(--text-secondary) !important; }
.cs-footer-creds, .cs-footer-bottom, .cs-footer { background-color: var(--dark) !important; }
.cs-footer-creds span { color: var(--text-primary) !important; }

/* =========================================================================
   22.10 — CONTRAST FIXES round 2: sector / geo / calculator templates.
   See contrast_{sector_mfg,geo_ayrshire,calculator}.json (9 fails → 0).
   ========================================================================= */

/* Sector pain cards + geo process bullet cards: explicit dark-card surface.
   §20b's '.entry-content > *' rule was forcing transparent background. */
.cs-pain-card,
.cs-process-bullets > li,
.cs-estate-card {
    background: var(--dark-card) !important;
    background-color: var(--dark-card) !important;
}
.cs-pain-title,
.cs-bullet-title { color: var(--text-primary) !important; }
.cs-pain-body,
.cs-bullet-body { color: var(--text-secondary) !important; }

/* Section closing prose: hardcoded #44505C in cs-pages.css. */
.cs-section-closing { color: var(--text-secondary) !important; }

/* Estate descriptor on geo pages: too-muted. */
.cs-estate-descriptor { color: var(--text-secondary) !important; }

/* Calculator: form labels + disclaimer text. */
.cs-calc-form label,
.cs-calc-form label span,
.cs-calc-form-grid label,
.cs-calc-form-grid label span {
    color: var(--text-primary) !important;
}
.cs-disclaimer { color: var(--text-secondary) !important; }

/* =========================================================================
   22.11 — MOBILE FIXES (≤480px viewport): button overflow + tap targets.
   See contrast_mobile_calc.json + calc_overflow_diag.json.
   ========================================================================= */

/* 22.11a — Buttons overflow on mobile when text is long ('CALCULATE YOUR
   SOLAR SAVINGS →' = 370–427px wide due to white-space:nowrap from §6).
   Allow text wrap below 480px so buttons stay within viewport. */
@media (max-width: 480px) {
    .cs-btn {
        white-space: normal !important;
        max-width: 100%;
        text-align: center;
        line-height: 1.3;
        padding: 0.85rem 1.25rem;
    }
}

/* 22.11b — Footer menu tap targets: 17px → ~44px (Apple/Google guideline). */
.cs-footer-list li a,
.cs-footer-utility li a,
.cs-footer-bottom-row ul li a {
    display: inline-block;
    padding: 0.55rem 0;
    line-height: 1.4;
}

/* 22.11c — Inline amber prose links: bump tap height on mobile. */
@media (max-width: 480px) {
    .cs-link-amber {
        display: inline-block;
        padding: 0.35rem 0;
        line-height: 1.5;
    }
}

/* =========================================================================
   22.12 — MOBILE HAMBURGER: SVG fill inherits 'currentColor' from button,
   not from the span we targeted in §22.6. GP's '.main-navigation .menu-toggle
   { color: var(--contrast) = #222 }' rule won — dark-grey on dark header.
   Andy's 9 May letter §4.3a: hard pre-launch requirement.
   ========================================================================= */
.main-navigation .menu-toggle,
.main-navigation .menu-toggle:hover,
.main-navigation .menu-toggle:focus,
button.menu-toggle,
.menu-toggle {
    color: var(--amber) !important;
}
.menu-toggle svg,
.menu-toggle .gp-icon svg {
    fill: var(--amber) !important;
}
.menu-toggle .gp-icon { color: var(--amber) !important; }

/* =========================================================================
   22.13 — SVG LOGO SIZING. SVG attachment metadata is 0×0 (WP doesn't read
   intrinsic SVG dims), so the <img> tag carries width=0/height=0 attributes.
   Force explicit dimensions via CSS + bump 45 → 72px height (~+60%) to
   honour Andy's letter §4.5 'logo should be ~40-50% larger'.
   ========================================================================= */
.header-image[src$=".svg"],
.site-logo img[src$=".svg"],
.is-logo-image[src$=".svg"] {
    width: auto !important;
    height: 72px !important;
    max-height: none !important;
}
@media (max-width: 768px) {
    .header-image[src$=".svg"],
    .site-logo img[src$=".svg"] {
        height: 48px !important;
    }
}
.cs-footer-logo img[src$=".svg"],
.cs-footer-brand img[src$=".svg"] {
    width: auto !important;
    height: 56px !important;
}

/* =========================================================================
   22.14 — REAL-USER MOBILE BUGS reported 2026-05-15:
   (a) Homepage hero side padding 96px each (section + container) = 49%
       of mobile viewport, squeezing H1 to 194px.
   (b) Calculator form has white background (rgb(255,255,255)) so the
       warm-white labels rendered by §22.10 are invisible on mobile + desktop.
       I missed this in the original audit — apologies.
   ========================================================================= */
@media (max-width: 768px) {
    .cs-home-hero { padding: 3.5rem 1rem !important; }
    .cs-home-hero .cs-container { padding: 0 0.5rem !important; }
    .cs-hero-text { padding: 0 !important; }
}
.cs-calc-form,
form.cs-calc-form,
.cs-calc-tool .cs-calc-form,
.cs-calc-page .cs-calc-form {
    background: var(--dark-card) !important;
    background-color: var(--dark-card) !important;
    color: var(--text-primary) !important;
    padding: 1.5rem !important;
    border-radius: var(--radius);
    border: 1px solid var(--slate-light);
}
.cs-calc-form label,
.cs-calc-form label span,
.cs-calc-form-grid label,
.cs-calc-form-grid label > span:first-child {
    color: var(--text-primary) !important;
    font-weight: 600;
}
.cs-calc-form label small,
.cs-calc-form small,
.cs-calc-form .help,
.cs-calc-form-grid label small {
    color: var(--text-secondary) !important;
}
/* 22.14c — bump specificity for hero padding (cascade duplicate detected). */
@media (max-width: 768px) {
    body .cs-home-hero,
    body section.cs-home-hero,
    section.cs-home-hero.has-image {
        padding: 3.5rem 1rem !important;
    }
    body .cs-home-hero .cs-container,
    section.cs-home-hero .cs-container {
        padding: 0 0.5rem !important;
    }
}

/* =========================================================================
   22.15 — MOBILE CENTERED ALIGNMENT. User feedback 2026-05-15: 'on mobile
   view everything should be vertically centered'. On narrow viewports
   centre-aligning hero text, headings, CTA rows and inline-link rows reads
   more balanced than mixed left/center.
   ========================================================================= */
@media (max-width: 768px) {
    .cs-home-hero .cs-hero-text,
    .cs-home-hero .cs-home-h1,
    .cs-home-h1,
    .cs-hero-text,
    .cs-hero-text p,
    .cs-hero-text .cs-hero-meta,
    .cs-hero-text .cs-hero-strap {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .cs-hero-cta-row,
    .cs-cta-row,
    .cs-section .cs-cta-row,
    .cs-final-grid .cs-final-card,
    .cs-funding-card,
    .cs-pillar-card,
    .cs-pain-card {
        text-align: center !important;
        justify-content: center !important;
    }
    .cs-hero-cta-row a.cs-btn,
    .cs-cta-row a.cs-btn {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .cs-section h1,
    .cs-section h2,
    .cs-section h3,
    .cs-section .cs-prose-intro,
    .cs-section .cs-section-closing,
    .cs-trust-strapline,
    .cs-section-eyebrow {
        text-align: center !important;
    }
    .cs-pillar-icon,
    .cs-pain-icon,
    .cs-funding-card-icon {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .cs-hero-cta-row,
    .cs-cta-row,
    .cs-final-card .cs-cta-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    .cs-hero-cta-row a.cs-btn,
    .cs-cta-row a.cs-btn {
        width: 100%;
        max-width: 320px;
    }
}

/* =========================================================================
   22.16 — MOBILE CENTERING (expanded): cover interior template heroes
   (sector / geo / solution / archive) and generic <p> inside sections.
   FAQ answers stay left-aligned for legibility.
   ========================================================================= */
@media (max-width: 768px) {
    .cs-sector-hero,
    .cs-sol-hero,
    .cs-geo-hero,
    .cs-archive-hero,
    .cs-sector-hero .cs-container,
    .cs-sol-hero .cs-container,
    .cs-geo-hero .cs-container,
    .cs-archive-hero .cs-container,
    .cs-sector-hero .cs-hero-text,
    .cs-sol-hero .cs-hero-text,
    .cs-geo-hero .cs-hero-text,
    .cs-archive-hero .cs-hero-text,
    .cs-sector-hero h1, .cs-sector-hero h2, .cs-sector-hero p,
    .cs-sol-hero h1, .cs-sol-hero h2, .cs-sol-hero p,
    .cs-geo-hero h1, .cs-geo-hero h2, .cs-geo-hero p,
    .cs-archive-hero h1, .cs-archive-hero h2, .cs-archive-hero p {
        text-align: center !important;
    }
    .cs-sector-hero .cs-hero-text,
    .cs-sol-hero .cs-hero-text,
    .cs-geo-hero .cs-hero-text,
    .cs-archive-hero .cs-hero-text {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .cs-section > .cs-container > p,
    .cs-section .cs-prose-block p,
    .cs-section .cs-overview,
    .cs-section .cs-section-body,
    .cs-section .cs-answer-first {
        text-align: center !important;
    }
    .cs-pain-card p,
    .cs-pain-card .cs-pain-body,
    .cs-pillar-card p,
    .cs-pillar-card .cs-pillar-body,
    .cs-funding-card p,
    .cs-funding-card-body,
    .cs-final-card p,
    .cs-final-body,
    .cs-process-card p {
        text-align: center !important;
    }
    .cs-stat-block,
    .cs-stat-block *,
    .cs-typical-range,
    .cs-funder-row,
    .cs-trust-strip {
        text-align: center !important;
    }
    .cs-faq-item,
    .cs-faq-item *,
    .cs-faq-answer,
    .cs-faq-q,
    .cs-faq-a {
        text-align: left !important;
    }
}

/* =========================================================================
   22.17 — Catch .cs-prose / .cs-prose-block / .cs-section-body wrappers
   that nest <p> inside sections. FAQ answers + accordion bodies excluded.
   ========================================================================= */
@media (max-width: 768px) {
    .cs-section .cs-prose,
    .cs-section .cs-prose p,
    .cs-section .cs-prose ul,
    .cs-section .cs-prose ol,
    .cs-section .cs-prose-block,
    .cs-section .cs-prose-block p,
    .cs-section .cs-section-body,
    .cs-section .cs-section-body p,
    .cs-section .cs-answer-first,
    .cs-section .cs-overview-body,
    .cs-section .cs-stat-body,
    .cs-section .cs-funding-body {
        text-align: center !important;
    }
    .cs-section .cs-prose ul,
    .cs-section .cs-prose ol {
        list-style-position: inside;
        padding-left: 0 !important;
    }
    .cs-faq-item,
    .cs-faq-item *,
    .cs-faqs .cs-prose,
    .cs-faqs .cs-prose * {
        text-align: left !important;
    }
}

/* §23 — Grant cards (rendered by [cs_grants_list] shortcode) — V1.3 §9.3-§9.7 */
.cs-grants-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}
@media (min-width: 800px) {
    .cs-grants-list { grid-template-columns: 1fr 1fr; }
}
.cs-grant-card {
    background: #141B24;
    border: 1px solid #2A3545;
    border-radius: 6px;
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.cs-grant-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.cs-grant-card-title {
    color: #F2F0ED;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.cs-grant-badge {
    display: inline-block;
    font-family: "Space Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
}
.cs-grant-badge-active {
    background: rgba(237, 152, 34, 0.12);
    color: #ED9822;
    border: 1px solid rgba(237, 152, 34, 0.35);
}
.cs-grant-summary {
    color: #F2F0ED;
    margin: 0;
    line-height: 1.55;
}
.cs-grant-meta {
    margin: 0;
    padding: 0.75rem 0 0;
    border-top: 1px solid #2A3545;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
}
.cs-grant-meta dt {
    font-family: "Space Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9AA3B0;
    margin: 0;
}
.cs-grant-meta dd {
    color: #F2F0ED;
    margin: 0;
    font-size: 0.92rem;
}
.cs-grant-meta dd p:last-child { margin-bottom: 0; }
.cs-grant-disclaimer {
    font-size: 0.82rem;
    color: #9AA3B0;
    margin: 0;
    padding-top: 0.5rem;
    line-height: 1.5;
    font-style: italic;
}
.cs-grant-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid #2A3545;
}
.cs-btn-sm {
    padding: 0.55rem 1rem !important;
    font-size: 0.82rem !important;
}
.cs-grant-source {
    color: #9AA3B0;
    font-size: 0.82rem;
    margin-left: auto;
    text-decoration: none;
}
.cs-grant-source:hover { color: #ED9822; }
.cs-grant-card-cta {
    border: 1px solid #ED9822;
    background: linear-gradient(180deg, rgba(237, 152, 34, 0.05), rgba(237, 152, 34, 0.02));
}

/* §25 — Calculator aftermath section (page-calculator.php) */
.cs-calc-aftermath {
    text-align: center;
}
.cs-calc-aftermath .cs-section-title,
.cs-calc-aftermath .cs-prose {
    margin-left: auto;
    margin-right: auto;
}
.cs-calc-aftermath .cs-prose {
    max-width: 720px;
}
.cs-calc-aftermath .cs-hero-cta-row {
    justify-content: center;
}

/* §24 — 404 template — V1.3 §8.10 */
.cs-404-hero {
    padding: 4rem 0 3rem;
    text-align: center;
}
.cs-404-hero h1 {
    color: #F2F0ED;
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0.5rem 0 1rem;
}
.cs-404-lead {
    color: #9AA3B0;
    max-width: 640px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    line-height: 1.55;
}
.cs-404-hero .cs-hero-cta-row {
    justify-content: center;
}
.cs-404-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (min-width: 700px) {
    .cs-404-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
    .cs-404-grid { grid-template-columns: repeat(4, 1fr); }
}
.cs-404-card {
    display: block;
    background: #141B24;
    border: 1px solid #2A3545;
    border-radius: 6px;
    padding: 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}
.cs-404-card:hover {
    border-color: #ED9822;
    transform: translateY(-2px);
}
.cs-404-card h3 {
    color: #F2F0ED;
    font-size: 1rem;
    margin: 0 0 0.4rem;
}
.cs-404-card p {
    color: #9AA3B0;
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.5;
}
.cs-404-search .search-form {
    max-width: 560px;
    margin: 1rem auto 0;
    display: flex;
    gap: 0.5rem;
}
.cs-404-search .search-field {
    flex: 1;
    background: #0A0E14;
    border: 1px solid #2A3545;
    color: #F2F0ED;
    border-radius: 4px;
    padding: 0.75rem 1rem;
}
.cs-404-search .search-submit {
    background: #ED9822;
    color: #0A0E14;
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* §26 — Mobile: centre eyebrows, funding card pills, process step numbers.
   These are inline-block / flex elements that need explicit auto-margins
   because text-align:center on the parent only centres inline content. */
@media (max-width: 768px) {
    .cs-eyebrow,
    .section-tag,
    .cs-section-eyebrow,
    .cs-funding-card-tagline {
        display: block !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .cs-funding-card {
        text-align: center;
    }
    .cs-funding-card-cta {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .cs-process-steps > li::before {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

