/*
 Theme Name:   PSSI Sandbox
 Theme URI:    https://pssi.pt
 Description:  PSSI — Portuguese Sandbox for Social Impact. Standalone WordPress theme (v2.5.0+; previously a GeneratePress child theme — see README "What changed in v2.5.0" for why it no longer needs a parent theme).
 Author:       PSSI Team
 Author URI:   https://pssi.pt
 Version:      2.10.0
 Text Domain:  pssi-child
 License:      GPL-2.0-or-later
*/

/* ============================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Brand Colours */
    --ink:              #0e1a13;
    --ivory:            #f5f2eb;
    --sage:             #3d6b52;
    --sage-light:       #6a9b7e;
    --sage-pale:        #d4e8dc;
    --terracotta:       #c4622d;
    --terracotta-light: #d4896a;
    --gold:             #b8972a;
    --gold-light:       #d4b55a;
    --gold-pale:        #f0e8c8;
    --smoke:            #f0ede6;
    --mist:             #e8e4da;
    --white:            #ffffff;

    /* Icon accent palette — a fixed decorative set used only for CPT/blog
       category icon gradients (.si-*, .bci-*), kept distinct from the
       core brand palette on purpose so many categories stay visually
       distinguishable. Fully editable below like every other token. */
    --icon-accent-1:    #5a8a6e;
    --icon-accent-2:    #c8a740;
    --icon-accent-3:    #7aaa8e;
    --icon-accent-4:    #8faf9e;
    --icon-accent-5:    #afd0be;
    --icon-accent-6:    #2a3a2d;
    --icon-accent-7:    #4a7a60;

    /* Semantic tokens */
    --pssi-gray:        rgba(14,26,19,0.7);
    --pssi-accent:      var(--sage);
    --border:           rgba(14,26,19,0.12);
    --border-strong:    rgba(14,26,19,0.25);
    --text-muted:       rgba(14,26,19,0.6);
    --text-muted-light: rgba(255,255,255,0.55);

    /* Typography */
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans:  'DM Sans', system-ui, -apple-system, sans-serif;

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Transitions */
    --transition-fast:   0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow:   0.6s ease;

    /* Layout */
    --header-height:  80px;
    --container-max:  1280px;

    /* Type scale */
    --font-root:  1.125rem;
    --pssi-text-scale: 1;
    --font-base:  calc(1.125rem * var(--pssi-text-scale));
    --font-lead:  calc(1.35rem  * var(--pssi-text-scale));
    --font-small: calc(0.95rem  * var(--pssi-text-scale));
    --font-xs:    calc(0.82rem  * var(--pssi-text-scale));
    --pssi-heading-scale: 1;
    --font-h1:    calc(var(--pssi-heading-scale) * clamp(3.2rem, 6vw, 5.5rem));
    --font-h2:    calc(var(--pssi-heading-scale) * clamp(2.4rem, 4.5vw, 3.8rem));
    --font-h3:    calc(var(--pssi-heading-scale) * clamp(1.8rem, 3.2vw, 2.8rem));
    --font-h4:    calc(var(--pssi-heading-scale) * clamp(1.4rem, 2.2vw, 2rem));
}

/* ============================================
   2. GLOBAL RESETS & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-padding-top: 100px;
    font-size: var(--font-root);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scroll only when user has not requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.8;
    color: var(--ink);
    background-color: var(--ivory);
    overflow-x: hidden;
    font-size: var(--font-base);
}

::selection {
    background-color: var(--sage-pale);
    color: var(--ink);
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

/* FIXED: List reset scoped to UI components only — NOT global.
   This preserves native list markers in post content and plugin output. */
nav ul,
nav ol,
.nav-menu,
.footer-nav-list,
.footer-utility-links ul,
.breadcrumbs ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 4px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ink);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-size: var(--font-small);
    border-radius: 0 0 4px 0;
    font-family: var(--sans);
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink);
}

h1 { font-size: var(--font-h1); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); }
h4 { font-size: var(--font-h4); }

p {
    font-size: var(--font-base);
    line-height: 1.8;
    color: var(--pssi-gray);
}

em, i {
    font-style: italic;
    color: var(--sage);
}

strong, b {
    font-weight: 500;
    color: var(--ink);
}

/* Editable content areas — restore list styles */
.entry-content ul,
.entry-content ol,
.single-post-content ul,
.single-post-content ol {
    padding-left: 1.75rem;
    margin-bottom: 1.5rem;
}

.entry-content ul  { list-style: disc; }
.entry-content ol  { list-style: decimal; }
.entry-content li  { margin-bottom: 0.4rem; }

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-bottom: 1rem; margin-top: 2rem; }

.entry-content p { margin-bottom: 1.5rem; }

.section-title {
    font-size: var(--font-h2);
    line-height: 1.2;
}

.section-label {
    font-size: var(--font-xs);
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-label::before {
    content: '';
    display: block;
    width: 2rem;
    height: 1px;
    background: var(--sage);
    flex-shrink: 0;
}

/* ============================================
   4. LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 3.5rem;
}

.text-center { text-align: center; }

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* ============================================
   5. BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2.5rem;
    background: var(--ink);
    color: var(--white);
    font-family: var(--sans);
    font-size: var(--font-small);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    transition: background 0.25s, transform 0.2s;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--sage);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--sans);
    font-size: var(--font-small);
    font-weight: 400;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
}

.btn-secondary:hover {
    color: var(--sage);
    border-color: var(--sage);
}

/* ============================================
   6. ANIMATIONS & KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered animations — JS adds .is-visible */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    /* FIXED: removed will-change here — added dynamically via JS only during animation */
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }

/* ============================================
   7. HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 3rem;
    background: rgba(245,242,235,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 0.5px solid var(--border);
    transition: padding 0.3s;
}

.site-header.scrolled {
    padding: 0.85rem 3rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sage);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.site-title-wrap {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--ink);
    text-decoration: none;
}

.site-title-wrap small {
    display: block;
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--sage);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-menu li { margin: 0; }

.nav-menu a {
    text-decoration: none;
    color: var(--ink);
    font-size: var(--font-xs);
    font-weight: 400;
    letter-spacing: 0.04em;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    opacity: 1;
}

.nav-cta {
    padding: 0.6rem 1.5rem;
    background: var(--ink);
    color: var(--white) !important;
    border-radius: 2rem;
    opacity: 1 !important;
    font-size: var(--font-xs);
    transition: background 0.2s;
    text-decoration: none;
}

.nav-cta:hover {
    background: var(--sage);
}

.nav-cta-donate {
    background: var(--terracotta);
}

.nav-cta-donate:hover {
    background: var(--gold);
}

/* ADDED: "Get Involved" demoted to a plain text link now that Donate is
   the header's one solid CTA button — two competing filled buttons side
   by side diluted both; matches the existing .nav-menu link treatment
   so it reads as part of the nav rather than a second call to action. */
/* FIXED: this was originally plain text at 70% opacity with no border —
   on the semi-transparent, blurred header background that reads as too
   low-contrast to register as a clickable button. Now a proper outlined
   "ghost" button — the standard pairing for a solid primary CTA (Donate)
   next to a secondary one: same size/shape as .nav-cta, clearly
   clickable, but unmistakably secondary since it has no fill. */
.nav-link-secondary {
    padding: 0.6rem 1.5rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 2rem;
    font-size: var(--font-xs);
    letter-spacing: 0.04em;
    color: var(--ink);
    opacity: 1;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.nav-link-secondary:hover,
.nav-link-secondary:focus-visible {
    border-color: var(--sage);
    background: var(--sage-pale);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    transition: 0.3s;
    border-radius: 1px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Dropdown / sub-menu styling -----------------------------------
   ADDED: wp_nav_menu() is already called with depth => 2 in header.php,
   so any menu item given a child in Appearance → Menus was already
   rendering a nested <ul class="sub-menu"> — WordPress core adds that
   markup and the "menu-item-has-children" class automatically. There was
   simply no CSS for it anywhere, so those submenus were either invisible
   (no positioning) or dumped inline, unstyled, directly under the parent
   link. This makes them a proper dropdown on desktop and a clean indented
   accordion-style list on mobile. */
.nav-menu li.menu-item-has-children {
    position: relative;
}

/* Small caret after any top-level link that has children, so visitors
   know to expect a dropdown before they hover/focus it. */
.nav-menu li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 0.4em;
    margin-bottom: 0.15em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.6;
    vertical-align: middle;
}

.nav-menu .sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 8px);
    min-width: 220px;
    padding: 0.6rem;
    margin: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(14, 26, 19, 0.14);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 1100;
}

.nav-menu li.menu-item-has-children:hover > .sub-menu,
.nav-menu li.menu-item-has-children:focus-within > .sub-menu,
.nav-menu .sub-menu:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.nav-menu .sub-menu li {
    width: 100%;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 0.55rem 0.9rem;
    border-radius: 0.5rem;
    font-size: var(--font-xs);
    color: var(--ink);
    opacity: 0.85;
    white-space: nowrap;
    transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu a:focus-visible {
    background-color: var(--sage-pale);
    opacity: 1;
}

/* Nested (grandchild) submenus open to the side rather than stacking
   underneath, so a 3-level menu never runs off the bottom of the header. */
.nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    transform: translate(8px, 0);
}
.nav-menu .sub-menu li.menu-item-has-children:hover > .sub-menu,
.nav-menu .sub-menu li.menu-item-has-children:focus-within > .sub-menu {
    transform: translate(0, 0);
}

/* ============================================
   8. HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    background: var(--ivory);
    position: relative;
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero-particle-canvas {
        display: none;
    }
}

.hero-label {
    font-family: var(--sans);
    font-size: var(--font-xs);
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    animation: heroIn 0.8s ease 0.2s both;
}

.hero-label::before,
.hero-label::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 1px;
    background: var(--sage);
}

.hero-main-title {
    font-family: var(--serif);
    font-size: calc(var(--pssi-heading-scale) * clamp(3.2rem, 6vw, 5.2rem));
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    animation: heroIn 0.8s ease 0.3s both;
    color: var(--ink);
}

.hero-subtitle {
    font-family: var(--serif);
    font-size: calc(var(--pssi-heading-scale) * clamp(1.8rem, 3.5vw, 2.8rem));
    font-weight: 300;
    font-style: italic;
    color: var(--sage);
    margin-bottom: 1.5rem;
    animation: heroIn 0.8s ease 0.4s both;
}

.hero-description {
    font-size: var(--font-lead);
    font-weight: 300;
    color: var(--pssi-gray);
    max-width: 720px;
    margin: 0 auto 2.5rem;
    line-height: 1.9;
    animation: heroIn 0.8s ease 0.5s both;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    animation: heroIn 0.8s ease 0.65s both;
}

/* ============================================
   9. HERO MARQUEE
   ============================================ */
.hero-marquee {
    background: var(--ink);
    color: var(--white);
    padding: 1rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    gap: 0;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2.5rem;
    font-family: var(--serif);
    font-size: var(--font-lead);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--white);
}

.marquee-item::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sage-light);
    display: inline-block;
    flex-shrink: 0;
    margin-left: 2rem;
}

/* ============================================
   10. SECTION STYLES
   ============================================ */
.section {
    padding: var(--space-xl) 0;
    position: relative;
}

.section-header {
    margin-bottom: 1.5rem;
}

.divider {
    width: 3rem;
    height: 1px;
    background: var(--sage);
    margin: 2.5rem 0;
}

/* CTA strip button row */
.cta-strip-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================
   11. MISSION SECTION
   ============================================ */
.mission-section { background: var(--ivory); }

.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.mission-text {
    color: var(--pssi-gray);
    margin-bottom: 1.5rem;
    font-size: var(--font-lead);
    line-height: 1.9;
}

.mission-features {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mission-feature {
    padding: 2rem;
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: background 0.2s, box-shadow 0.2s;
}

.mission-feature:hover {
    background: var(--smoke);
    box-shadow: 0 12px 32px rgba(14, 26, 19, 0.08);
}

.mission-feature-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    background: var(--sage-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--sage);
    font-weight: 500;
    font-family: var(--serif);
}

.mission-feature-content h4 {
    font-weight: 500;
    font-size: var(--font-base);
    margin-bottom: 0.3rem;
    font-family: var(--sans);
}

.mission-feature-content p {
    font-size: var(--font-small);
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   12. SERVICES SECTION
   ============================================ */
.services-section {
    background: var(--ink);
    color: var(--white);
}

.services-section .section-label { color: var(--sage-light); }
.services-section .section-label::before { background: var(--sage-light); }
.services-section .section-title { color: var(--white); }

.services-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    border: 0.5px solid rgba(255,255,255,0.12);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    transition: border-color 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--sage);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.04);
}

.service-number {
    font-family: var(--serif);
    font-size: 3.5rem;
    font-weight: 300;
    color: rgba(255,255,255,0.1);
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

.service-title {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.service-description {
    font-size: var(--font-small);
    color: rgba(255,255,255,0.55);
    line-height: 1.8;
}

.service-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.4rem 1rem;
    border: 0.5px solid rgba(255,255,255,0.2);
    border-radius: 2rem;
    font-size: var(--font-xs);
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.06em;
}

/* ============================================
   13. METHODOLOGY SECTION
   ============================================ */
.methodology-section { background: var(--ivory); }

.methodology-intro {
    max-width: 860px;
    margin-bottom: 4rem;
}

.methodology-intro p {
    font-size: var(--font-lead);
    line-height: 1.9;
    color: var(--pssi-gray);
    margin-bottom: 1.5rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-bottom: 4rem;
}

.process-step {
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    position: relative;
    transition: background 0.2s;
}

.process-step:first-child { border-left: 1px solid var(--border); }
.process-step:hover { background: rgba(0,0,0,0.02); }

.process-step-number {
    font-family: var(--serif);
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--sage);
    margin-bottom: 1rem;
    line-height: 1;
    display: block;
}

.process-step-title {
    font-size: var(--font-base);
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--ink);
    font-family: var(--sans);
}

.process-step-description {
    font-size: var(--font-small);
    line-height: 1.7;
    color: var(--text-muted);
}

/* Approach Tabs */
.approach-feature {
    background: var(--smoke);
    border-radius: 1rem;
    overflow: hidden;
}

.af-tabs {
    display: flex;
    border-bottom: 0.5px solid var(--border);
    gap: 0;
}

.af-tab {
    padding: 1.25rem 2rem;
    font-size: var(--font-small);
    font-weight: 400;
    letter-spacing: 0.04em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
    color: var(--text-muted);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--sans);
}

.af-tab.active {
    border-bottom-color: var(--sage);
    color: var(--sage);
}

.af-panel {
    padding: 2.5rem;
    display: none;
}

.af-panel.active { display: block; }

.af-panel h3 {
    font-size: var(--font-h4);
    margin-bottom: 1rem;
    color: var(--ink);
}

.af-panel p {
    margin-bottom: 1.5rem;
    color: var(--pssi-gray);
}

.af-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.af-list li {
    font-size: var(--font-small);
    color: var(--text-muted);
    padding-left: 1.25rem;
    position: relative;
}

.af-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--sage);
    font-size: 0.75rem;
    top: 0.1em;
}

/* ============================================
   14. STATS SECTION
   ============================================ */
.stats-section { background: var(--smoke); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.stat-item {
    padding: 3rem 2rem;
    border-right: 0.5px solid var(--border);
    text-align: center;
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    color: var(--sage);
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: var(--font-xs);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================
   15. COHORTS SECTION
   ============================================ */
.cohorts-section { background: var(--ivory); }

.cohorts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.cohort-card {
    border-radius: 1rem;
    overflow: hidden;
    border: 0.5px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--white);
}

.cohort-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(14,26,19,0.1);
}

.cohort-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 2rem;
    font-style: italic;
    font-weight: 300;
    color: var(--white);
}

.si-1 { background: linear-gradient(135deg, var(--sage), var(--sage-light)); }
.si-2 { background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light)); }
.si-3 { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }

.cohort-body { padding: 1.75rem; }

.cohort-tag {
    display: inline-block;
    font-size: var(--font-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 0.75rem;
}

.cohort-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.cohort-subtitle {
    font-size: var(--font-xs);
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.cohort-description {
    font-size: var(--font-small);
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   16. TEAM SECTION
   ============================================ */
.team-section { background: var(--smoke); }

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.team-card {
    text-align: center;
    transition: transform 0.3s;
}

.team-card:hover { transform: translateY(-4px); }

.team-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
    background: var(--mist);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-avatar-placeholder {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 300;
    color: var(--sage-light);
}

.team-name {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.team-role {
    font-size: var(--font-xs);
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   17. PARTNERS SECTION
   ============================================ */
.partners-section { background: var(--ivory); }

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 3rem;
    align-items: center;
    margin-top: 3rem;
}

.partner-item {
    opacity: 0.5;
    transition: opacity 0.2s;
    max-height: 48px;
}

.partner-item:hover { opacity: 1; }

.partner-placeholder {
    font-family: var(--sans);
    font-size: var(--font-small);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 0.5px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 1rem;
}

/* ============================================
   18. TESTIMONIALS / BLOG CARDS
   ============================================ */
.testimonials-section { background: var(--ink); }

.testimonials-section .section-label { color: var(--sage-light); }
.testimonials-section .section-label::before { background: var(--sage-light); }
.testimonials-section .section-title { color: var(--white); }

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.testimonial-card {
    background: rgba(255,255,255,0.05);
    border: 0.5px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 2.5rem;
}

.testimonial-quote {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 300;
    font-style: italic;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sage);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--white);
    flex-shrink: 0;
}

.testimonial-author-name {
    font-size: var(--font-small);
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.testimonial-author-role {
    font-size: var(--font-xs);
    color: rgba(255,255,255,0.45);
}

/* ============================================
   19. BLOG CARDS
   ============================================ */
.blog-section { background: var(--ivory); }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.blog-card {
    border-radius: 1rem;
    overflow: hidden;
    border: 0.5px solid var(--border);
    background: var(--white);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(14,26,19,0.08);
}

.blog-card-link-wrap { text-decoration: none; display: block; }

.blog-card-img {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--white);
}

.blog-card-img.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img.has-image img { transform: scale(1.04); }

/* Background colour classes for blog cards without images */
.bci-1 { background: linear-gradient(135deg, var(--sage), var(--icon-accent-1)); }
.bci-2 { background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light)); }
.bci-3 { background: linear-gradient(135deg, var(--gold), var(--icon-accent-2)); }
.bci-4 { background: linear-gradient(135deg, var(--icon-accent-1), var(--icon-accent-3)); }
.bci-5 { background: linear-gradient(135deg, var(--icon-accent-4), var(--icon-accent-5)); }
.bci-6 { background: linear-gradient(135deg, var(--ink), var(--icon-accent-6)); }
.bci-7 { background: linear-gradient(135deg, var(--icon-accent-7), var(--sage-light)); }

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.blog-card-cat {
    font-size: var(--font-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-card-date,
.blog-card-read {
    font-size: var(--font-xs);
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.blog-card-title {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.blog-card:hover .blog-card-title { color: var(--sage); }

.blog-card-excerpt {
    font-size: var(--font-small);
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

/* ============================================
   20. PUBLICATIONS SECTION
   ============================================ */
.publications-section { background: var(--smoke); }

.publications-list {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.publication-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 1.75rem 0;
    border-bottom: 0.5px solid var(--border);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.publication-item:first-child { border-top: 0.5px solid var(--border); }
.publication-item:hover { background: rgba(14,26,19,0.02); }

/* FIXED: removed display:contents from anchor — use block-level approach */
.publication-item a {
    display: contents;
    text-decoration: none;
    color: inherit;
}

.publication-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 100px;
}

.publication-type {
    font-size: var(--font-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sage);
}

.publication-date {
    font-size: var(--font-xs);
    color: var(--text-muted);
    font-family: var(--sans);
}

.publication-title {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.3;
    transition: color 0.2s;
}

.publication-item:hover .publication-title { color: var(--sage); }

.publication-arrow {
    color: var(--sage);
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.publication-item:hover .publication-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ============================================
   21. CTA STRIP
   ============================================ */
.cta-strip {
    background: var(--sage);
    padding: 3rem 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
}

.cta-strip-title {
    font-family: var(--serif);
    font-size: calc(var(--pssi-heading-scale) * clamp(1.8rem, 3.5vw, 2.8rem));
    font-weight: 300;
    color: var(--white);
    line-height: 1.2;
}

.cta-strip-title em { color: var(--ivory); }

.cta-strip .btn-primary {
    background: var(--white);
    color: var(--sage);
    flex-shrink: 0;
}

.cta-strip .btn-primary:hover { background: var(--ivory); }

.cta-strip .btn-secondary {
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}

.cta-strip .btn-secondary:hover {
    color: var(--white);
    border-color: var(--white);
}

/* ============================================
   22. CONTACT / CTA SECTION
   ============================================ */
.cta-section { background: var(--ivory); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.contact-desc {
    color: var(--pssi-gray);
    font-size: var(--font-lead);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--sage-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--sage);
    flex-shrink: 0;
}

.contact-item-body label {
    display: block;
    font-size: var(--font-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.contact-item-body a,
.contact-item-body span {
    font-size: var(--font-small);
    color: var(--ink);
}

.contact-item-body a:hover { color: var(--sage); }

/* ============================================
   23. CONTACT FORM
   ============================================ */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: var(--font-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.85rem 1.25rem;
    border: 1px solid var(--border-strong);
    border-radius: 0.5rem;
    font-family: var(--sans);
    font-size: var(--font-base);
    font-weight: 300;
    color: var(--ink);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(61,107,82,0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--sage);
    color: var(--white);
    font-family: var(--sans);
    font-size: var(--font-base);
    font-weight: 400;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background 0.25s;
    align-self: flex-start;
}

.form-submit:hover { background: var(--sage-light); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-message {
    padding: 1.25rem;
    border-radius: 0.75rem;
    font-size: var(--font-small);
    line-height: 1.6;
    display: none;
}

.form-message.success {
    background: rgba(61,107,82,0.12);
    border: 1px solid var(--sage);
    color: var(--sage);
    display: block;
}

.form-message.error {
    background: rgba(196,98,45,0.1);
    border: 1px solid var(--terracotta);
    color: var(--terracotta);
    display: block;
}

/* ============================================
   24. FOOTER
   ============================================ */
.site-footer {
    background: var(--ink);
    padding: 0;
    border-top: 0.5px solid rgba(255,255,255,0.08);
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 4rem 3.5rem 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
}

.footer-brand { max-width: 320px; }

.footer-brand-name {
    font-family: var(--serif);
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-decoration: none;
    display: block;
}

.footer-desc {
    font-size: var(--font-small);
    color: rgba(255,255,255,0.4);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-social-links a {
    font-size: var(--font-xs);
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

.footer-social-links a:hover { color: var(--white); }

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
}

.footer-nav-title {
    font-family: var(--sans);
    font-size: var(--font-xs);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 1.25rem;
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav-list a {
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: var(--font-small);
    transition: color 0.2s;
}

.footer-nav-list a:hover { color: rgba(255,255,255,0.85); }

/* Footer Widget Area — generic styling so arbitrary widgets (text, menu,
   custom HTML, etc. added at Appearance → Widgets) match the footer's
   dark theme without needing their own custom CSS. */
.footer-widget-col { font-size: var(--font-small); }
.footer-widget-col p,
.footer-widget-col li { color: rgba(255,255,255,0.5); margin-bottom: 0.75rem; }
.footer-widget-col a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-widget-col a:hover { color: rgba(255,255,255,0.85); }
.footer-widget-col ul { list-style: none; margin: 0; padding: 0; }
.footer-widget-col img,
.footer-widget-col iframe,
.footer-widget-col embed,
.footer-widget-col object {
    max-width: 100%;
    height: auto;
}

/* Footer utility nav from wp_nav_menu */
.footer-utility-links { padding: 0; margin: 0; }
.footer-utility-links li { margin: 0 0 0.75rem; }
.footer-utility-links a {
    color: rgba(255,255,255,0.5);
    font-size: var(--font-small);
    transition: color 0.2s;
    text-decoration: none;
}
.footer-utility-links a:hover { color: rgba(255,255,255,0.85); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: var(--font-xs);
    color: rgba(255,255,255,0.25);
    line-height: 1.6;
}

.footer-copyright a {
    color: rgba(255,255,255,0.4);
    transition: color 0.2s;
}

.footer-copyright a:hover { color: rgba(255,255,255,0.7); }

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-legal a {
    font-size: var(--font-xs);
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover { color: rgba(255,255,255,0.6); }

/* ============================================
   25. SINGLE POST STYLES
   ============================================ */
.single-post-header {
    padding: 140px 0 4rem;
    background: var(--ivory);
    text-align: center;
}

.single-post-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.single-post-title {
    font-family: var(--serif);
    font-size: calc(var(--pssi-heading-scale) * clamp(2.2rem, 5vw, 4rem));
    font-weight: 300;
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.single-post-lead {
    font-size: var(--font-lead);
    color: var(--pssi-gray);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.single-post-featured-image {
    margin-top: 3rem;
    border-radius: 1rem;
    overflow: hidden;
    max-height: 500px;
}

.single-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-content {
    padding: 4rem 0 6rem;
    background: var(--white);
}

.single-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 0.5px solid var(--border);
    flex-wrap: wrap;
}

.single-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.single-post-tag {
    font-size: var(--font-xs);
    padding: 0.3rem 0.85rem;
    border: 0.5px solid var(--border-strong);
    border-radius: 2rem;
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s;
    text-decoration: none;
}

.single-post-tag:hover {
    border-color: var(--sage);
    color: var(--sage);
}

.single-post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    font-size: var(--font-xs);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.share-links {
    display: flex;
    gap: 0.75rem;
}

.share-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0.5px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s;
    text-decoration: none;
}

.share-link:hover {
    border-color: var(--sage);
    color: var(--sage);
}

.single-post-author {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--smoke);
    border-radius: 1rem;
    margin-top: 3rem;
}

.author-info .author-label {
    font-size: var(--font-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.author-info .author-name {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.author-info .author-bio {
    font-size: var(--font-small);
    color: var(--pssi-gray);
    line-height: 1.7;
}

.related-posts {
    padding: 5rem 0;
    background: var(--ivory);
    border-top: 0.5px solid var(--border);
}

/* ============================================
   26. PAGE TEMPLATE STYLES
   ============================================ */
.page-hero {
    padding: 140px 0 4rem;
    background: var(--ivory);
    text-align: center;
}

.page-content {
    padding: 4rem 0 6rem;
    background: var(--white);
}

.page-content-inner {
    max-width: 760px;
    margin: 0 auto;
}

.pssi-additional-page-content {
    border-top: 1px solid var(--mist);
}

/**
 * Wide / Full block alignment.
 *
 * .page-content-inner and .entry-content both have their own fixed
 * max-width (760px) for readable body-text line length — WordPress's
 * automatic block-layout system (enabled via theme.json's
 * settings.layout) doesn't know about that custom wrapper, so an
 * .alignwide or .alignfull block would otherwise just sit inside the
 * 760px column with no visible difference. These rules let those two
 * alignments intentionally break out of it, same as any standard
 * WordPress theme.
 */
.entry-content > .alignwide,
.page-content-inner > .alignwide {
    max-width: 1100px;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.entry-content > .alignfull,
.page-content-inner > .alignfull {
    max-width: 100vw;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* ============================================
   27. ARCHIVE STYLES
   ============================================ */
.archive-hero {
    padding: 140px 0 3rem;
    background: var(--ivory);
}

.archive-content {
    padding: 3rem 0 6rem;
    background: var(--white);
}

/* ============================================
   28. 404 PAGE
   ============================================ */
.error-404-wrap {
    padding: 160px 0 120px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-404-number {
    font-family: var(--serif);
    font-size: 8rem;
    font-weight: 300;
    color: var(--sage);
    line-height: 1;
    margin-bottom: 1rem;
}

/* ============================================
   29. WORDPRESS OVERRIDES
   ============================================ */
#page,
.site,
.site-content,
.inside-site-grid {
    max-width: none;
    padding: 0;
    margin: 0;
}

.front-page .entry-header,
.front-page .entry-meta,
.front-page .entry-footer,
.front-page .nav-links,
.front-page .comments-area,
.front-page .post-navigation,
.front-page .page-header {
    display: none !important;
}

.generate-sections-enabled .site-main,
.site-main {
    padding: 0;
    margin: 0;
}

.inside-article {
    padding: 0;
    margin: 0;
}

.entry-content {
    padding: 0;
}

/* Guarantees centering on templates where .page-content-inner and
   .entry-content are the same element (page.php, front-page.php,
   single-pssi_team.php) regardless of CSS source order. */
.page-content-inner.entry-content {
    margin: 0 auto;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--sage);
    transform: translateY(-2px);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--sage); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* ============================================
   30. STATUS SECTION
   ============================================ */
.status-section { background: var(--ivory); }

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 3rem;
}

.status-item {
    padding: 2.5rem 2rem;
    border-right: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
}

.status-item:nth-child(3) { border-right: none; }
.status-item:nth-child(n+4) { border-bottom: none; }

.status-tag {
    display: inline-block;
    font-size: var(--font-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.status-tag.active {
    background: rgba(61,107,82,0.1);
    color: var(--sage);
}

.status-tag.upcoming {
    background: rgba(184,151,42,0.1);
    color: var(--gold);
}

.status-tag.completed {
    background: rgba(14,26,19,0.06);
    color: var(--text-muted);
}

.status-title {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.status-meta {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

/* ============================================
   31. COOKIE CONSENT BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--ink);
    color: var(--white);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-top: 2px solid var(--sage);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-banner p {
    font-size: var(--font-small);
    color: rgba(255,255,255,0.8);
    margin: 0;
    flex: 1;
}

.cookie-banner a {
    color: var(--sage-light);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-accept {
    padding: 0.6rem 1.5rem;
    background: var(--sage);
    color: var(--white);
    border: none;
    border-radius: 2rem;
    font-family: var(--sans);
    font-size: var(--font-small);
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-accept:hover { background: var(--sage-light); }

.cookie-decline {
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2rem;
    font-family: var(--sans);
    font-size: var(--font-small);
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-decline:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
}

/* ============================================
   32. SEARCH FORM
   ============================================ */
.search-form {
    display: flex;
    gap: 0;
    width: 380px;
    max-width: 85vw;
}

.search-form-fields {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border-strong);
    border-radius: 2rem;
    overflow: hidden;
    flex: 1;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    font-family: var(--sans);
    font-size: var(--font-small);
    background: var(--white);
    color: var(--ink);
}

.search-form input[type="search"]:focus { outline: none; }

.search-form button {
    padding: 0.75rem 1.25rem;
    background: var(--sage);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-family: var(--sans);
    font-size: var(--font-small);
    transition: background 0.2s;
}

.search-form button:hover { background: var(--ink); }

/* Collapsible search — ADDED: the search form used to sit permanently
   inline in the header, competing for space with the nav links and both
   CTA buttons. It now collapses to a single icon; clicking it reveals
   the exact same form (still fully functional, autocomplete included)
   in a dropdown panel anchored beneath the icon. Behaviour in
   assets/js/main.js's initSearchToggle(). */
.pssi-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pssi-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.pssi-search-toggle:hover,
.pssi-search-toggle:focus-visible,
.pssi-search-toggle[aria-expanded="true"] {
    background: var(--sage-pale);
    border-color: var(--sage);
}

.pssi-search-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.75rem;
    z-index: 1100;
}

/* ============================================
   33. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .cohorts-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .status-grid { grid-template-columns: repeat(2, 1fr); }
    .partners-grid { gap: 2rem 3rem; }
    .footer-top { grid-template-columns: 1fr; gap: 3rem; }
    .footer-brand { max-width: 100%; }
    .mission-grid { grid-template-columns: 1fr; gap: 3rem; }
    .mission-features { grid-template-columns: 1fr; margin-top: 3rem; }
}

@media (max-width: 768px) {
    :root { --space-xl: 5rem; }

    .container { padding-inline: 1.5rem; }
    .section { padding: var(--space-xl) 0; }
    .menu-toggle { display: flex; }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--ivory);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 999;
        padding-top: 80px;
    }

    .admin-bar .main-navigation { padding-top: 112px; }
    .main-navigation.active { right: 0; }
    .nav-menu {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        width: 100%;
    }
    .nav-menu a { font-size: var(--font-base); opacity: 0.9; }

    /* On the full-screen mobile menu there's no room for a floating
       dropdown, so submenus render inline underneath their parent,
       indented and slightly smaller, instead of positioned absolutely. */
    .nav-menu .sub-menu {
        position: static;
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        min-width: 0;
        width: 100%;
        margin-top: 0.75rem;
        box-shadow: none;
        border-color: transparent;
        background: transparent;
        text-align: center;
        padding: 0;
    }
    .nav-menu .sub-menu a { font-size: var(--font-small); padding: 0.4rem 0.9rem; }
    .nav-menu .sub-menu .sub-menu { margin-top: 0.5rem; }
    .nav-menu li.menu-item-has-children > a::after { display: none; }
    .pssi-search-type { width: 8.5rem; font-size: var(--font-xs); }

    /* Inside the full-screen mobile menu, the search panel opens inline
       in the vertical stack rather than as a floating dropdown — there's
       no header row for it to anchor against once .main-navigation
       becomes a fixed full-screen overlay. The :not([hidden]) guard
       matters here: without it, this would override the [hidden]
       attribute's own display:none and make the panel permanently
       visible regardless of the toggle button's state. */
    .pssi-search-panel:not([hidden]) {
        position: static;
        margin-top: 1rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .search-form { width: 100%; max-width: 360px; }

    .hero-section { min-height: auto; padding: 100px 0 60px; }
    .hero-actions { flex-direction: column; align-items: center; gap: 1rem; }
    .services-grid { grid-template-columns: 1fr; gap: 1rem; margin-top: 2.5rem; }
    .service-card { padding: 1.5rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item { padding: 2rem 1rem; }
    .cohorts-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .process-steps { grid-template-columns: 1fr; gap: 2.5rem; }
    .process-step { padding: 1.5rem; }
    .status-grid { grid-template-columns: 1fr; }
    .partners-grid { gap: 2rem; }
    .publication-item { grid-template-columns: 1fr; gap: 0.5rem; }
    .publication-arrow { display: none; }
    .cta-strip { flex-direction: column; text-align: center; padding: 3rem 1.5rem; gap: 1.5rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .form-row { grid-template-columns: 1fr; }
    .footer-nav { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .af-tabs { flex-wrap: wrap; }
    .af-tab { padding: 0.75rem 1rem; font-size: var(--font-xs); }
    .footer-inner { padding: 3rem 1.5rem 0; }
    .single-post-footer { flex-direction: column; }
    .af-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .services-grid, .cohorts-grid, .blog-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .footer-nav { grid-template-columns: 1fr; gap: 1.5rem; }
    .btn-primary,
    .btn-secondary { width: 100%; justify-content: center; }
    .process-step, .status-item { padding: 1.5rem; }
    .single-post-meta-top { flex-direction: column; gap: 0.5rem; }
}

/* ============================================
   34. ACCESSIBILITY & REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html { scroll-behavior: auto !important; }
    .animate-on-scroll { opacity: 1 !important; transform: none !important; }
    .marquee-track { animation: none !important; }
}

@media (prefers-contrast: high) {
    :root {
        --border: rgba(14,26,19,0.3);
        --border-strong: rgba(14,26,19,0.5);
    }
    .service-card,
    .team-card,
    .cohort-card,
    .testimonial-card,
    .blog-card { border-width: 2px; }
}

/* ============================================
   35. PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .hero-marquee,
    .menu-toggle,
    .back-to-top,
    .cookie-banner { display: none !important; }

    body { background: white !important; color: black !important; }
    .section { padding: 2rem 0 !important; page-break-inside: avoid; }
    a { text-decoration: underline !important; color: black !important; }
    .services-section,
    .cta-section { background: white !important; color: black !important; }
}

/* ============================================
   36. TOPICS TAXONOMY (v2.2.0 addition)
   ============================================ */
.pssi-topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    justify-content: inherit;
}
.pssi-topic-pill {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
.pssi-topic-pill:hover,
.pssi-topic-pill:focus-visible {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

/* ============================================
   37. COOKIE PREFERENCES LINK (v2.2.0 addition)
   ============================================ */
.pssi-cookie-prefs-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    opacity: 0.8;
}
.pssi-cookie-prefs-link:hover,
.pssi-cookie-prefs-link:focus-visible {
    opacity: 1;
}

/* ============================================
   38. BLOCK STYLE VARIATIONS
   Registered in inc/block-styles.php. Each one appears as a one-click
   thumbnail in the block toolbar's "Styles" panel. Class names follow
   WordPress's own convention: is-style-{name}.
   ============================================ */

/* Group block — "PSSI Card" */
.wp-block-group.is-style-pssi-card {
    background: var(--ivory);
    border-radius: 0.75rem;
    padding: 2rem;
}

/* Group block — "PSSI Bordered" */
.wp-block-group.is-style-pssi-bordered {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
}

/* Button block — "PSSI Pill" */
.wp-block-button.is-style-pssi-pill .wp-block-button__link {
    border-radius: 999px;
    padding: 0.85rem 2.5rem;
}

/* Button block — "PSSI Outline" */
.wp-block-button.is-style-pssi-outline .wp-block-button__link {
    background: transparent;
    border: 1.5px solid currentColor;
    color: var(--ink);
}
.wp-block-button.is-style-pssi-outline .wp-block-button__link:hover {
    background: var(--ink);
    color: var(--white);
}

/* Separator block — "PSSI Wide Sage" */
hr.wp-block-separator.is-style-pssi-wide-sage {
    border: none;
    border-top: 3px solid var(--sage);
    max-width: 6rem;
    margin: 2rem auto;
    opacity: 1;
}

/* Image block — "PSSI Rounded" */
.wp-block-image.is-style-pssi-rounded img {
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px rgba(14, 26, 19, 0.12);
}

/* Quote block — "PSSI Large Centered" */
.wp-block-quote.is-style-pssi-large-centered {
    text-align: center;
    border: none;
    max-width: 620px;
    margin: 2rem auto;
    padding: 0;
}
.wp-block-quote.is-style-pssi-large-centered p {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    color: var(--ink);
}
.wp-block-quote.is-style-pssi-large-centered cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--sans);
    font-size: var(--font-small);
    font-style: normal;
    color: var(--text-muted);
}

/* ============================================
   39. POLISHED DEFAULTS FOR PLAIN BLOCKS
   These apply to a block straight out of the inserter, before an editor
   picks any style variation from section 38 — so content looks on-brand
   immediately rather than needing manual styling every time.
   ============================================ */

/* Default Quote block */
.entry-content .wp-block-quote:not(.is-style-pssi-large-centered) {
    border-left: 3px solid var(--sage);
    padding-left: 1.5rem;
    margin: 2rem 0;
}
.entry-content .wp-block-quote:not(.is-style-pssi-large-centered) p {
    font-style: italic;
    color: var(--ink);
}
.entry-content .wp-block-quote:not(.is-style-pssi-large-centered) cite {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-size: var(--font-small);
    color: var(--text-muted);
}

/* Default Separator block */
.entry-content hr.wp-block-separator:not(.is-style-pssi-wide-sage) {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

/* Default Details/Accordion block (FAQ pattern) */
.entry-content .wp-block-details {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.entry-content .wp-block-details summary {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    padding-right: 1.5rem;
}
.entry-content .wp-block-details summary:hover {
    color: var(--sage);
}
.entry-content .wp-block-details p:last-child {
    margin-bottom: 0;
}

/* Default List block spacing (bullets/numbers already handled above) */
.entry-content .wp-block-list {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

/* ============================================
   40. BREADCRUMBS
   Rendered by pssi_output_breadcrumbs() in inc/breadcrumbs.php, right
   after the opening <main> tag on every template except the front page.
   Padding-top clears the fixed .site-header; the adjacent-sibling rule
   below removes the *next* element's own top clearance so the gap isn't
   doubled when a hero header immediately follows the breadcrumb bar.
   ============================================ */
.breadcrumbs {
    padding: calc(var(--header-height) + 32px) 0 1rem;
    background: var(--ivory);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--font-xs);
    letter-spacing: 0.02em;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
    opacity: 1;
    color: var(--sage);
}

.breadcrumbs [aria-current="page"] {
    color: var(--ink);
    font-weight: 500;
}

.breadcrumbs .breadcrumb-sep {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumbs + .page-hero,
.breadcrumbs + .archive-hero,
.breadcrumbs + .single-post-header {
    padding-top: 2.5rem;
}

@media (max-width: 768px) {
    .breadcrumbs {
        padding-top: calc(var(--header-height) + 12px);
    }
    .breadcrumbs li:not(:last-child):not(:nth-last-child(2)) {
        display: none; /* keep only Home … › parent › current on narrow screens */
    }
}

/* ============================================
   41. RELATED CONTENT (non-blog CPT singles)
   Shared by template-parts/cpt/related-content.php, applied to Service,
   Publication, Cohort, Team, and Partner singles — the same "Continue
   Reading" pattern single.php already uses for blog posts, generalised.
   ============================================ */
.pssi-related-content {
    background: var(--ivory);
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border);
}

.pssi-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pssi-related-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pssi-related-card:hover,
.pssi-related-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(14, 26, 19, 0.1);
}

.pssi-related-card-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: var(--smoke);
}

.pssi-related-card-body {
    padding: 1.5rem;
}

.pssi-related-card-eyebrow {
    display: block;
    font-size: var(--font-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 0.5rem;
}

.pssi-related-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.pssi-related-card-excerpt {
    font-size: var(--font-small);
    color: var(--text-muted);
    margin: 0;
}

/* "Latest Publications" dynamic block (inc/blocks.php) — reuses the same
   .pssi-related-grid/.pssi-related-card styling as the related-content
   section above, just wrapped with its own heading spacing. */
.pssi-latest-publications-block {
    margin: 2rem 0;
}
.pssi-latest-publications-block .section-title {
    margin-bottom: 0.5rem;
}

/* ============================================
   42. TESTIMONIAL / QUOTE CAROUSEL
   Markup comes from the "PSSI Testimonial Carousel" block pattern
   (inc/block-patterns.php); behaviour from assets/js/testimonial-carousel.js.
   Works with JS disabled too — all slides simply stack vertically.
   ============================================ */
.pssi-testimonial-carousel {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}

.pssi-testimonial-track {
    display: flex;
    transition: transform var(--transition-slow);
}

.pssi-testimonial-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 1rem 3.5rem;
    text-align: center;
}

.pssi-testimonial-slide blockquote {
    border: none;
    margin: 0;
    padding: 0;
}

.pssi-testimonial-slide p {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2.6vw, 1.9rem);
    font-style: italic;
    line-height: 1.5;
    color: var(--ink);
}

.pssi-testimonial-slide cite {
    display: block;
    margin-top: 1.25rem;
    font-family: var(--sans);
    font-style: normal;
    font-size: var(--font-small);
    color: var(--text-muted);
}

.pssi-testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.pssi-testimonial-nav:hover,
.pssi-testimonial-nav:focus-visible { background: var(--sage-pale); border-color: var(--sage); }
.pssi-testimonial-prev { left: 0; }
.pssi-testimonial-next { right: 0; }

.pssi-testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.pssi-testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--border-strong);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.pssi-testimonial-dot.is-active {
    background: var(--sage);
    transform: scale(1.3);
}

@media (max-width: 600px) {
    .pssi-testimonial-slide { padding: 1rem 2.75rem; }
    .pssi-testimonial-nav { width: 34px; height: 34px; }
}

/* No-JS fallback: without .is-initialized (added by the carousel script
   once it wires up), every slide just stacks and reads fine top to bottom. */
.pssi-testimonial-carousel:not(.is-initialized) .pssi-testimonial-track {
    flex-direction: column;
}
.pssi-testimonial-carousel:not(.is-initialized) .pssi-testimonial-slide {
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}
.pssi-testimonial-carousel:not(.is-initialized) .pssi-testimonial-nav,
.pssi-testimonial-carousel:not(.is-initialized) .pssi-testimonial-dots {
    display: none;
}

/* ============================================
   43. SEARCH: TYPE FILTER + LIVE AUTOCOMPLETE
   Progressive enhancement over the plain <form role="search"> that
   already worked — see assets/js/search-autocomplete.js. Everything
   below is only ever shown once JS actually finds a search form.
   ============================================ */
.search-form {
    position: relative;
}

.pssi-search-type {
    border: none;
    border-left: 1px solid var(--border-strong);
    border-radius: 0;
    background: var(--white);
    font-size: var(--font-small);
    padding: 0.55rem 1.75rem 0.55rem 0.85rem;
    width: 10rem;
    flex-shrink: 0;
    height: 100%;
    color: var(--ink);
    cursor: pointer;
}

.pssi-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    min-width: 320px;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 24px 48px rgba(14, 26, 19, 0.16);
    z-index: 1100;
    display: none;
}

.pssi-search-results.is-open { display: block; }

.pssi-search-result {
    display: block;
    padding: 0.85rem 1.1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
}
.pssi-search-result:last-child { border-bottom: none; }
.pssi-search-result:hover,
.pssi-search-result:focus-visible,
.pssi-search-result.is-active-option {
    background: var(--sage-pale);
}

.pssi-search-result-type {
    display: block;
    font-size: var(--font-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sage);
    margin-bottom: 0.2rem;
}

.pssi-search-result-title {
    font-size: var(--font-small);
    color: var(--ink);
}

.pssi-search-empty,
.pssi-search-loading {
    padding: 1rem 1.1rem;
    font-size: var(--font-small);
    color: var(--text-muted);
}

/* ============================================
   44. DARK MODE
   Off by default (opt-in at Appearance → Customize → General → "Enable
   Dark Mode Toggle"). When enabled, a toggle button appears in the header
   (see header.php) and assets/js/main.js applies data-theme="dark" on
   <html>, remembering the visitor's choice. Every token below mirrors an
   existing light-mode variable 1:1, so anything already built with
   var(--ink)/var(--ivory)/var(--sage) etc. picks up dark mode for free —
   no per-component overrides needed anywhere else in this file.
   ============================================ */
html[data-theme="dark"] {
    color-scheme: dark;
}
html[data-theme="dark"] {
    --ink:              #f2efe8;
    --ivory:            #14201a;
    --sage:             #7db998;
    --sage-light:       #9cc9ac;
    --sage-pale:        #1e3128;
    --terracotta:       #e08a5c;
    --terracotta-light: #eab08d;
    --gold:             #d9bb5f;
    --gold-light:       #e6cd85;
    --gold-pale:        #2b2618;
    --smoke:            #1b2721;
    --mist:             #223029;
    --white:            #1a2620;
    --pssi-gray:        rgba(242,239,232,0.72);
    --border:           rgba(242,239,232,0.14);
    --border-strong:    rgba(242,239,232,0.28);
    --text-muted:       rgba(242,239,232,0.62);
    --text-muted-light: rgba(242,239,232,0.5);
}

html[data-theme="dark"] .site-header {
    background: rgba(20, 32, 26, 0.88);
}

html[data-theme="dark"] img:not(.avatar-img),
html[data-theme="dark"] .single-post-featured-image img {
    filter: brightness(0.92) contrast(1.02);
}

.pssi-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    margin-left: 0.5rem;
    flex-shrink: 0;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.pssi-theme-toggle:hover,
.pssi-theme-toggle:focus-visible {
    background: var(--sage-pale);
    border-color: var(--sage);
}
.pssi-theme-toggle .pssi-icon-moon { display: none; }
html[data-theme="dark"] .pssi-theme-toggle .pssi-icon-sun { display: none; }
html[data-theme="dark"] .pssi-theme-toggle .pssi-icon-moon { display: block; }

/* ============================================
   45. PUBLICATIONS STREAM FILTER CHIPS
   Rendered by pssi_output_publications_filter() (inc/publications-stream.php)
   on the /publications/ archive — plain links (?ptype=…), so filtering
   works with JavaScript disabled.
   ============================================ */
.pssi-pub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.pssi-pub-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    font-size: var(--font-xs);
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--white);
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.pssi-pub-filter:hover,
.pssi-pub-filter:focus-visible {
    border-color: var(--sage);
    color: var(--sage);
}

.pssi-pub-filter.is-active {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--white);
}

/* ============================================
   46. DONATION FORM
   Shared markup from template-parts/shortcode/donate-form.php, rendered
   by the [pssi_donate] shortcode and the homepage "Donate" section.
   Behaviour in assets/js/donation-form.js.
   ============================================ */
.pssi-donation-form {
    max-width: 560px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.pssi-donation-frequency {
    display: flex;
    background: var(--ivory);
    border-radius: 999px;
    padding: 0.3rem;
    margin-bottom: 1.5rem;
}

.pssi-donation-freq-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-size: var(--font-small);
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.pssi-donation-freq-btn.is-active {
    background: var(--sage);
    color: var(--white);
}

.pssi-donation-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pssi-donation-amount-btn {
    padding: 0.85rem 0.5rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 0.6rem;
    background: var(--white);
    font-size: var(--font-base);
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.pssi-donation-amount-btn:hover,
.pssi-donation-amount-btn:focus-visible {
    border-color: var(--sage);
}

.pssi-donation-amount-btn.is-active {
    border-color: var(--sage);
    background: var(--sage-pale);
    color: var(--sage);
}

.pssi-donation-amount-custom {
    grid-column: span 1;
}

.pssi-donation-custom-amount {
    margin-bottom: 1.25rem;
}

.pssi-donation-custom-amount label {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.pssi-donation-custom-amount input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 0.6rem;
    font-size: var(--font-base);
    background: var(--white);
    color: var(--ink);
}

.pssi-donation-donor-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pssi-donation-field label {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.pssi-donation-field .pssi-optional {
    font-weight: 400;
    opacity: 0.7;
}

.pssi-donation-field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 0.6rem;
    font-size: var(--font-small);
    background: var(--white);
    color: var(--ink);
}

.pssi-donation-paypal-note {
    font-size: var(--font-xs);
    color: var(--text-muted);
    background: var(--ivory);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.pssi-donation-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pssi-donation-stripe-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: var(--font-base);
}

.pssi-donation-paypal-buttons {
    min-height: 40px;
}

.pssi-donation-status {
    margin-top: 1rem;
    font-size: var(--font-small);
    color: var(--sage);
    text-align: center;
    min-height: 1.2em;
}

.pssi-donation-status.is-error {
    color: var(--terracotta);
}

.pssi-donation-thankyou {
    text-align: center;
    padding: 2rem 1rem;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--sage);
}

.donate-section {
    background: var(--ivory);
}

.pssi-donation-wise {
    margin-top: 1.25rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.pssi-donation-wise-toggle {
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: var(--sage);
    font-size: var(--font-small);
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pssi-donation-wise-toggle:hover,
.pssi-donation-wise-toggle:focus-visible {
    color: var(--ink);
}

.pssi-donation-wise-panel {
    margin-top: 1rem;
    text-align: center;
}

.pssi-donation-wise-note {
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pssi-donation-wise-link {
    display: inline-block;
    margin-bottom: 1rem;
}

.pssi-donation-wise-qr {
    margin: 0 auto 1rem;
    max-width: 200px;
}

.pssi-donation-wise-qr img {
    width: 100%;
    height: auto;
    border-radius: 0.6rem;
    border: 1px solid var(--border);
}

.pssi-donation-wise-qr p {
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.pssi-donation-wise-details {
    background: var(--ivory);
    border-radius: 0.6rem;
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: var(--font-small);
}

.pssi-donation-wise-details pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--sans);
    margin: 0.5rem 0 0;
    color: var(--ink);
}

/* ============================================
   47. CASE STUDIES
   Archive grid + homepage teaser share template-parts/cpt/case-study-card.php.
   Single-page sections (Challenge/Approach/Outcome) styled separately below.
   ============================================ */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.case-study-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.case-study-card:hover,
.case-study-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(14, 26, 19, 0.1);
}

.case-study-card-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: var(--smoke);
}

.case-study-card-body {
    padding: 1.75rem;
}

.case-study-card-partner {
    display: block;
    font-size: var(--font-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 0.5rem;
}

.case-study-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.case-study-card-metric {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--sage);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.case-study-card-excerpt {
    font-size: var(--font-small);
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.case-study-card-link {
    font-size: var(--font-xs);
    font-weight: 500;
    color: var(--sage);
}

/* Single case study page */
.case-study-hero-partner {
    font-size: var(--font-small);
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.case-study-metric-highlight {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--sage);
    font-weight: 500;
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    background: var(--sage-pale);
    border-radius: 0.85rem;
}

.case-study-section {
    margin-bottom: 2.5rem;
}

.case-study-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.case-study-section-body {
    color: var(--pssi-gray);
    line-height: 1.8;
    font-size: var(--font-base);
}

@media (max-width: 600px) {
    .case-studies-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .pssi-donation-form { padding: 1.5rem; }
    .pssi-donation-donor-fields { grid-template-columns: 1fr; }
    .pssi-donation-amounts { grid-template-columns: repeat(2, 1fr); }
}

@media print {
    .pssi-theme-toggle,
    .breadcrumbs,
    .pssi-search-results { display: none !important; }
}

/* ============================================
   34. CAREERS
   ============================================ */
.archive-hero-desc {
    color: var(--pssi-gray);
    font-size: var(--font-lead);
    line-height: 1.8;
    max-width: 640px;
    margin: 1rem auto 0;
}

.section-subtitle {
    font-family: var(--serif);
    font-size: var(--font-h3, 1.8rem);
    font-weight: 300;
    line-height: 1.3;
}

.pssi-job-application-form input[type="file"] {
    width: 100%;
    padding: 0.7rem 0;
    font-family: var(--sans);
    font-size: var(--font-small);
    color: var(--ink);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
}

.pssi-job-application-form input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    accent-color: var(--sage);
}

/* ============================================
   35. FOOTER SOCIAL ICONS
   ============================================ */
.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.7);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.footer-social-links a svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.footer-social-links a:hover,
.footer-social-links a:focus-visible {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--white);
    transform: translateY(-2px);
}
