/* =========================================================================
   Vero Pediatric Therapy Services — Design System
   Calm & clinical-modern: soft blues, sage green, cream
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
    /* Brand palette */
    --color-primary:        #4A90B8;   /* trust blue */
    --color-primary-dark:   #2E6B8F;
    --color-primary-light:  #E3F0F7;
    --color-secondary:      #88A99B;   /* sage green */
    --color-secondary-dark: #5F8473;
    --color-accent:         #E8945C;   /* warm coral — for CTAs */
    --color-accent-dark:    #C77645;

    /* Surfaces */
    --color-cream:          #F8F5EF;
    --color-white:          #FFFFFF;
    --color-surface-alt:    #F1ECE1;

    /* Text */
    --color-text:           #2C3E4A;
    --color-text-muted:     #6B7D89;
    --color-text-inverse:   #FFFFFF;

    /* Borders & shadow */
    --color-border:         #E5E0D5;
    --color-border-soft:    #EFEBE2;
    --shadow-sm:  0 2px 4px rgba(44, 62, 74, 0.04);
    --shadow-md:  0 8px 24px rgba(44, 62, 74, 0.08);
    --shadow-lg:  0 20px 48px rgba(44, 62, 74, 0.12);

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --fs-xs:    0.8125rem;  /* 13 */
    --fs-sm:    0.9375rem;  /* 15 */
    --fs-base:  1.0625rem;  /* 17 */
    --fs-md:    1.1875rem;  /* 19 */
    --fs-lg:    1.5rem;     /* 24 */
    --fs-xl:    2rem;       /* 32 */
    --fs-2xl:   2.75rem;    /* 44 */
    --fs-3xl:   3.5rem;     /* 56 */

    /* Spacing */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.5rem;
    --space-6:  2rem;
    --space-7:  3rem;
    --space-8:  4rem;
    --space-9:  6rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 880px;
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-primary-dark);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}
a:hover { color: var(--color-accent-dark); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-text);
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: 0 0 var(--space-4) 0;
    font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 4.5vw, var(--fs-3xl)); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--fs-2xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--space-4) 0; }
.lead {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    line-height: 1.6;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-secondary-dark);
    margin-bottom: var(--space-3);
}

/* ---------- Layout primitives ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
}
.container--narrow { max-width: var(--container-narrow); }

.section {
    padding: var(--space-9) 0;
}
.section--tight { padding: var(--space-8) 0; }
.section--cream { background: var(--color-cream); }
.section--white { background: var(--color-white); }
.section--alt   { background: var(--color-surface-alt); }
.section--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-text-inverse);
}
.section--primary h2,
.section--primary h3,
.section--primary p { color: var(--color-text-inverse); }

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-7) auto;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.95rem 1.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    white-space: nowrap;
}
.btn--primary {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn--secondary {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--secondary:hover {
    background: var(--color-white);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}
.btn--ghost {
    background: transparent;
    color: var(--color-text-inverse);
    border-color: rgba(255,255,255,0.4);
}
.btn--ghost:hover {
    background: rgba(255,255,255,0.12);
    color: var(--color-text-inverse);
    border-color: var(--color-text-inverse);
}
.btn--lg { padding: 1.1rem 2.25rem; font-size: var(--fs-base); }

/* ---------- Header / Navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-border-soft);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--space-4) 0;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-md);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--color-primary-dark); }
.brand__mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}
.brand__name { line-height: 1.1; }
.brand__name small {
    display: block;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.primary-nav a {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: var(--fs-sm);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.primary-nav a:hover,
.primary-nav a.is-active {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}
.primary-nav .btn {
    margin-left: var(--space-3);
    padding: 0.65rem 1.2rem;
}
/* The .primary-nav a rule above sets dark text on every nav link; re-assert
   white text + coral background on the CTA so it doesn't read as muddy grey. */
.primary-nav .btn--primary {
    color: var(--color-text-inverse);
    background: var(--color-accent);
    border-color: var(--color-accent);
}
.primary-nav .btn--primary:hover,
.primary-nav .btn--primary.is-active {
    color: var(--color-text-inverse);
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] span                  { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before          { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after           { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: var(--space-9) 0 var(--space-8);
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-cream) 100%);
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    right: -120px; top: -120px;
    width: 360px; height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(136,169,155,0.25), transparent 70%);
    pointer-events: none;
}
.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-8);
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero__copy h1 { margin-bottom: var(--space-5); }
.hero__copy .lead { margin-bottom: var(--space-6); }
.hero__ctas {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}
.hero__trustline {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}
.hero__trustline::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--color-secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(136,169,155,0.25);
}
.hero__media {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 5;
    background: var(--color-surface-alt);
}
.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero__media-badge {
    position: absolute;
    left: var(--space-5);
    bottom: var(--space-5);
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 75%;
}
.hero__media-badge strong {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    color: var(--color-text);
    display: block;
}
.hero__media-badge span {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* ---------- Trust strip ---------- */
.trust-strip {
    background: var(--color-white);
    border-top: 1px solid var(--color-border-soft);
    border-bottom: 1px solid var(--color-border-soft);
    padding: var(--space-5) 0;
}
.trust-strip__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    align-items: center;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
}
.trust-item__icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
}
.trust-item__icon svg { width: 18px; height: 18px; }

/* ---------- Service cards ---------- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}
.service-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-soft);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.service-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-surface-alt);
}
.service-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.service-card:hover .service-card__media img { transform: scale(1.04); }
.service-card__body {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
}
.service-card__tag {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-xs);
    letter-spacing: 0.05em;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    margin-bottom: var(--space-4);
}
.service-card h3 { margin-bottom: var(--space-3); }
.service-card p { color: var(--color-text-muted); flex: 1; }
.service-card__cta {
    margin-top: var(--space-4);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
}
.service-card__cta svg {
    width: 18px; height: 18px;
    transition: transform 0.2s var(--ease);
}
.service-card__cta:hover svg { transform: translateX(3px); }

/* ---------- Why-us / feature grid ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
}
.feature {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    text-align: left;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.feature:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
}
.feature__icon {
    width: 48px; height: 48px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h4 { margin-bottom: var(--space-2); font-size: var(--fs-md); }
.feature p { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; }

/* ---------- About preview ---------- */
.about-preview {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-8);
    align-items: center;
}
.about-preview__media {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 5;
    background: var(--color-surface-alt);
}
.about-preview__media img { width: 100%; height: 100%; object-fit: cover; }
.about-preview ul {
    list-style: none;
    padding: 0;
    margin: var(--space-5) 0 var(--space-6) 0;
}
.about-preview li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--color-text);
}
.about-preview li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.5em;
    width: 18px; height: 18px;
    background: var(--color-secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(136,169,155,0.18);
}

/* ---------- Service area ---------- */
.area-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}
.area-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.area-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.area-card h4 {
    color: var(--color-primary-dark);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-2);
}
.area-card p { color: var(--color-text-muted); font-size: var(--fs-sm); margin: 0; }
.area-card__pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    margin-bottom: var(--space-4);
}
.area-card__pin > svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex: 0 0 20px !important;
    display: block !important;
}

/* ---------- Testimonial / Quote ---------- */
.quote-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}
.quote-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft);
    padding: var(--space-6);
    position: relative;
}
.quote-card::before {
    content: '\201C';
    position: absolute;
    top: -16px; left: var(--space-5);
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--color-primary);
    line-height: 1;
    background: transparent;
    padding: 0 var(--space-2);
}
.quote-card p { color: var(--color-text); font-style: italic; }
.quote-card cite {
    display: block;
    margin-top: var(--space-4);
    font-style: normal;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
}
.quote-card cite small {
    display: block;
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    margin-top: 2px;
}

/* ---------- Final CTA ---------- */
.cta-banner {
    text-align: center;
    padding: var(--space-9) var(--space-5);
}
.cta-banner h2 { color: var(--color-text-inverse); margin-bottom: var(--space-4); }
.cta-banner p { color: rgba(255,255,255,0.88); font-size: var(--fs-md); max-width: 620px; margin: 0 auto var(--space-6) auto; }
.cta-banner .btn--primary {
    background: var(--color-white);
    color: var(--color-primary-dark);
    border-color: var(--color-white);
}
.cta-banner .btn--primary:hover {
    background: var(--color-cream);
    border-color: var(--color-cream);
    color: var(--color-primary-dark);
}

/* ---------- Footer ---------- */
.site-footer {
    background: #1F2D36;
    color: rgba(255,255,255,0.75);
    padding: var(--space-8) 0 var(--space-5);
    font-size: var(--fs-sm);
}
.site-footer a {
    color: rgba(255,255,255,0.75);
}
.site-footer a:hover { color: var(--color-text-inverse); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-7);
    margin-bottom: var(--space-7);
}
.footer-col h5 {
    font-family: var(--font-heading);
    color: var(--color-text-inverse);
    font-size: var(--fs-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 var(--space-4) 0;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-brand .brand { color: var(--color-text-inverse); }
.footer-brand .brand__name small { color: rgba(255,255,255,0.55); }
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: var(--space-4); }
.footer-legal {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    color: rgba(255,255,255,0.55);
    font-size: var(--fs-xs);
}

/* ---------- Utility ---------- */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero__grid,
    .about-preview { grid-template-columns: 1fr; gap: var(--space-6); }
    .hero__media { aspect-ratio: 5 / 4; }
    .service-grid,
    .area-grid,
    .quote-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-strip__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
    .section { padding: var(--space-8) 0; }
}

@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; align-items: center; }
    .primary-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border-soft);
        padding: var(--space-3);
        gap: var(--space-1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
    }
    .primary-nav.is-open {
        max-height: 70vh;
        padding: var(--space-3);
    }
    .primary-nav a { padding: 0.85rem 1rem; }
    .primary-nav .btn { margin: var(--space-2) 0 0 0; }
    .feature-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-5); }
    .footer-legal { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
    .trust-strip__grid { grid-template-columns: 1fr; }
    .hero__media-badge { max-width: calc(100% - var(--space-7)); }
    .brand__name small { display: none; }
}

/* =========================================================================
   Subpage / blog templates
   ========================================================================= */

.page-hero {
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-cream) 100%);
    padding-top: var(--space-8);
}
.page-hero--noimage { padding-bottom: var(--space-8); }
.page-hero__inner { text-align: center; max-width: 820px; margin: 0 auto; padding-bottom: var(--space-7); }
.page-hero__inner h1 { margin-bottom: var(--space-3); }
.page-hero .post-meta {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    margin: var(--space-2) 0 0 0;
}
.page-hero__media {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
}
.page-hero__media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.page-content { font-size: var(--fs-base); }
.page-content h2 {
    margin-top: var(--space-7);
    margin-bottom: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-soft);
}
.page-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.page-content h3 { margin-top: var(--space-5); }
.page-content ul, .page-content ol { padding-left: 1.25rem; margin-bottom: var(--space-5); }
.page-content li { margin-bottom: var(--space-2); }
.page-content a {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.page-content .btn { text-decoration: none; }
/* The generic .page-content a rule above sets dark-blue text on every link
   inside CMS body content; re-assert each button variant's own text color
   so CTAs (like "Book a Free Consultation") read correctly. */
.page-content .btn--primary,
.page-content .btn--primary:hover  { color: var(--color-text-inverse); }
.page-content .btn--secondary      { color: var(--color-text); }
.page-content .btn--secondary:hover{ color: var(--color-primary-dark); }
.page-content .btn--ghost,
.page-content .btn--ghost:hover    { color: var(--color-text-inverse); }

/* =========================================================================
   Blog index (insights)
   ========================================================================= */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}
.post-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-surface-alt); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }
.post-card__meta {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-2);
}
.post-card h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-2);
    line-height: 1.3;
}
.post-card h3 a { color: var(--color-text); text-decoration: none; }
.post-card h3 a:hover { color: var(--color-primary-dark); }
.post-card p { color: var(--color-text-muted); font-size: var(--fs-sm); flex: 1; }
.post-card__cta {
    margin-top: var(--space-4);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
}

@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   Forms (contact, application)
   ========================================================================= */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}
.form-row { display: flex; flex-direction: column; }
.form-row--full { grid-column: 1 / -1; }

.form-row label,
.form-row legend {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
    margin-bottom: var(--space-2);
}
.form-row label .req { color: var(--color-accent-dark); margin-left: 2px; }

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row input[type="password"],
.form-row input[type="file"],
.form-row select,
.form-row textarea {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    width: 100%;
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--fs-sm);
}
.checkbox-row input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--color-primary);
}

.form-grid--areas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.form-grid--areas label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    background: var(--color-white);
}
.form-grid--areas input[type="checkbox"] { accent-color: var(--color-primary); }

.form-actions {
    margin-top: var(--space-6);
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--space-3);
}

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    border: 1px solid;
    font-size: var(--fs-sm);
}
.alert--success { background: #EEF7F0; border-color: #BBDDC6; color: #2B5A3D; }
.alert--error   { background: #FBEEEC; border-color: #F0BFB7; color: #8C2E1F; }

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Modern contact section (page-contact)
   ========================================================================= */

.contact-shell {
    position: relative;
    padding: var(--space-9) 0 var(--space-9);
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-cream) 70%);
    overflow: hidden;
}
.contact-shell::before {
    content: '';
    position: absolute;
    top: -180px; right: -220px;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(136,169,155,0.22), transparent 70%);
    pointer-events: none;
}
.contact-shell::after {
    content: '';
    position: absolute;
    bottom: -200px; left: -180px;
    width: 460px; height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,148,92,0.16), transparent 70%);
    pointer-events: none;
}

.contact-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-8);
    align-items: start;
    z-index: 1;
}
.contact-info h1 { margin-bottom: var(--space-4); }
.contact-info .lead { margin-bottom: var(--space-5); }
.contact-info dl {
    margin: var(--space-5) 0 0 0;
    padding: 0;
    list-style: none;
}
.contact-info__row {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-soft);
    align-items: center;
}
.contact-info__row:last-child { border-bottom: 0; }
.contact-info__icon {
    width: 34px; height: 34px; flex: 0 0 34px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.contact-info__icon > svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex: 0 0 16px !important;
    display: block !important;
}
.contact-info__body { flex: 1; }
.contact-info__body strong {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--fs-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.contact-info__body span,
.contact-info__body a {
    color: var(--color-text);
    font-size: var(--fs-md);
    font-weight: 500;
}
.contact-info__body small {
    display: block;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    margin-top: 2px;
}

.contact-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    box-shadow: 0 30px 80px rgba(44,62,74,0.10),
                0 2px 4px rgba(44,62,74,0.04);
    border: 1px solid rgba(255,255,255,0.6);
}
.contact-card__head { margin-bottom: var(--space-6); }
.contact-card__head h2 { font-size: var(--fs-xl); margin-bottom: var(--space-2); }
.contact-card__head .lead {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* Floating-label field */
.field {
    position: relative;
    margin-bottom: var(--space-5);
}
.field input,
.field textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: var(--fs-md);
    line-height: 1.4;
    color: var(--color-text);
    background: var(--color-cream);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    padding: 1.85rem 1.1rem 0.85rem 1.1rem;
    min-height: 68px;
    transition: background 0.15s var(--ease),
                border-color 0.15s var(--ease),
                box-shadow 0.15s var(--ease);
}
.field textarea {
    min-height: 160px;
    resize: vertical;
    padding-top: 1.95rem;
}
.field__label {
    position: absolute;
    top: 1.3rem;
    left: 1.1rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    pointer-events: none;
    transform-origin: top left;
    transition: transform 0.15s var(--ease), color 0.15s var(--ease);
}
.field__label .req { color: var(--color-accent-dark); margin-left: 2px; }

.field input:focus,
.field textarea:focus {
    outline: none;
    background: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}
.field input:focus ~ .field__label,
.field input:not(:placeholder-shown) ~ .field__label,
.field textarea:focus ~ .field__label,
.field textarea:not(:placeholder-shown) ~ .field__label {
    transform: translateY(-0.7rem) scale(0.78);
    color: var(--color-primary-dark);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* Pill-style radio group */
.pill-group {
    margin: var(--space-3) 0 var(--space-5) 0;
}
.pill-group__legend {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
    margin-bottom: var(--space-3);
}
.pill-group__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.pill-radio { position: relative; }
.pill-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pill-radio__face {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    border: 1.5px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    user-select: none;
}
.pill-radio:hover .pill-radio__face { border-color: var(--color-primary); }
.pill-radio input:checked + .pill-radio__face {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(74,144,184,0.30);
}
.pill-radio input:focus-visible + .pill-radio__face {
    box-shadow: 0 0 0 4px rgba(74,144,184,0.25);
}

.contact-card .btn--primary {
    width: 100%;
    padding: 1.15rem;
    font-size: var(--fs-md);
    margin-top: var(--space-3);
}
.contact-card__fineprint {
    margin: var(--space-4) 0 0 0;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-align: center;
}

@media (max-width: 960px) {
    .contact-grid { grid-template-columns: 1fr; gap: var(--space-7); }
    .contact-info { text-align: left; }
}
@media (max-width: 600px) {
    .contact-card { padding: var(--space-5); }
    .field-row { grid-template-columns: 1fr; }
}

/* =========================================================================
   Dashboard
   ========================================================================= */

.dash {
    background: var(--color-cream);
    min-height: 100vh;
    padding: var(--space-7) 0;
}
.dash h1 { margin-bottom: var(--space-3); }
.dash .container { max-width: 1200px; }

.dash__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}
.dash__top-main {
    flex: 1 1 auto;
    min-width: 0;
}
.dash__top .userbar {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    padding-top: 6px;
}

/* Header stat badges — quick at-a-glance counts that jump to the relevant panel */
.dash__stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-4);
}
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1rem;
    background: var(--color-white);
    border: 1.5px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: transform 0.15s var(--ease),
                border-color 0.15s var(--ease),
                background 0.15s var(--ease),
                box-shadow 0.15s var(--ease);
    min-width: 0;
}
.stat-badge:hover {
    transform: translateY(-1px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
}
.stat-badge__num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: var(--fs-xl);
    line-height: 1;
    color: var(--color-text-muted);
    min-width: 1.4ch;
    text-align: right;
}
.stat-badge__label {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    line-height: 1.15;
    color: inherit;
}
.stat-badge__label small {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Alert state — when count > 0, the badge lights up */
.stat-badge--alert {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}
.stat-badge--alert:hover {
    background: var(--color-white);
    border-color: var(--color-primary-dark);
    color: var(--color-primary-dark);
}
.stat-badge--alert .stat-badge__num,
.stat-badge--alert .stat-badge__label { color: var(--color-primary-dark); }
.stat-badge--alert .stat-badge__label small { color: var(--color-primary-dark); opacity: 0.75; }

@media (max-width: 640px) {
    .dash__stats { width: 100%; }
    .stat-badge  { flex: 1 1 calc(50% - var(--space-3) / 2); justify-content: flex-start; }
}
@media (max-width: 420px) {
    .stat-badge { flex: 1 1 100%; }
}
.dash__panel {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    min-width: 0; /* allow shrinking inside grid/flex parents */
    overflow: hidden; /* contain any rogue child width */
}

/* Articles table — scroll inside the panel, never push the page wider */
.dash__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* extend wrap to panel edges so the scrollbar sits flush */
    margin: 0 calc(-1 * var(--space-6));
    padding: 0 var(--space-6);
    scrollbar-width: thin;
}
.dash__table-wrap::-webkit-scrollbar       { height: 6px; }
.dash__table-wrap::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
.dash__table.dash__table { /* extra specificity to win cascade */
    min-width: 100%;
}
.col-title strong { display: block; line-height: 1.3; word-break: break-word; }
.col-title__sub {
    display: none;
    margin-top: 4px;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    word-break: break-word;
}
.col-url a { word-break: break-all; }
.btn--xs { padding: 0.35rem 0.7rem; font-size: var(--fs-xs); }
.dash__panel h2 {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-4);
}
.dash table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.dash table th,
.dash table td {
    text-align: left;
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--color-border-soft);
    vertical-align: middle;
}
.dash table th {
    font-family: var(--font-heading);
    font-weight: 600;
    background: var(--color-cream);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}
.dash table tr:hover td { background: #FBF8F1; }
.dash .status-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
}
.status-pill--pub { background: #E4F1E7; color: #2B5A3D; }
.status-pill--draft { background: #FBEEEC; color: #8C2E1F; }
.dash table img.thumb {
    width: 56px; height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--color-border-soft);
}

/* Hide non-essential columns on smaller screens */
@media (max-width: 900px) {
    .dash__table .hide-md { display: none; }
}
@media (max-width: 640px) {
    .dash__table .hide-sm { display: none; }
    .dash__table .hide-md-up { display: block; }  /* show inline category+slug under the title */
    .dash__table img.thumb { width: 44px; height: 32px; }
    .dash__table th, .dash__table td { padding: 0.55rem 0.45rem; }

    /* Dashboard form action buttons — smaller + tighter on mobile so they don't get clipped */
    .dash__panel .form-actions .btn--lg {
        padding: 0.7rem 1.1rem;
        font-size: var(--fs-sm);
    }
    .dash__panel .form-actions { gap: var(--space-2); }
}
@media (min-width: 641px) {
    .dash__table .hide-md-up { display: none; }
    /* Helper inverse: only show on sm screens (used as a fallback line under a name in tables) */
    .crm-table__sub.hide-sm-up { display: none; }
}
@media (max-width: 640px) {
    .crm-table__sub.hide-sm-up {
        display: block;
        margin-top: 2px;
        color: var(--color-text-muted);
        font-size: var(--fs-xs);
    }
}

/* =========================================================================
   CRM tables (Leads / Intakes / Applications / Invitations)
   ========================================================================= */
.crm-table .status-pill {
    white-space: nowrap;
}
.crm-table__row {
    border-left: 3px solid transparent;
}
.crm-table__row--new            { border-left-color: var(--status-blue); }
.crm-table__row--followed_up    { border-left-color: var(--status-amber); }
.crm-table__row--onboarding     { border-left-color: var(--status-teal); }
.crm-table__row--on_schedule    { border-left-color: var(--status-green); }
.crm-table__row--not_a_fit      { border-left-color: var(--status-gray); }
.crm-table__row--archived       { border-left-color: var(--status-muted); }
.crm-table__row--interested     { border-left-color: var(--status-green); }
.crm-table__row--not_interested { border-left-color: var(--status-red); }
.crm-table__row--in_review      { border-left-color: var(--status-amber); }
.crm-table__row--accepted       { border-left-color: var(--status-green); }
.crm-table__row--on_hold        { border-left-color: var(--status-amber); }
.crm-table__row--declined       { border-left-color: var(--status-red); }
.crm-table__row--client-new       { border-left-color: var(--status-blue); }
.crm-table__row--client-active    { border-left-color: var(--status-green); }
.crm-table__row--client-waitlist  { border-left-color: var(--status-amber); }
.crm-table__row--client-inactive  { border-left-color: var(--status-gray); }
.crm-table__row--client-archived  { border-left-color: var(--status-muted); }

.crm-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    white-space: nowrap;
}
.crm-table__actions select {
    font-size: var(--fs-xs);
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
}
.crm-table__toggle {
    width: 26px; height: 26px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    border-radius: 6px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.crm-table__toggle:hover { background: var(--color-cream); }
.crm-table__toggle[aria-expanded="true"] {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.crm-table__detail td {
    background: #FBF8F1;
    padding: 1rem 1.25rem;
}
.crm-table__detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem 1.4rem;
    margin: 0;
}
.crm-table__detail-grid > div { display: flex; flex-direction: column; gap: 2px; }
.crm-table__detail-grid dt {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.crm-table__detail-grid dd {
    margin: 0;
    color: var(--color-text);
    word-break: break-word;
}
.crm-table__detail-grid__full {
    grid-column: 1 / -1;
}
.crm-table__detail-grid__full dd {
    white-space: pre-wrap;
}

/* =========================================================================
   Dashboard pagination bar
   ========================================================================= */
.dash-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-5);
    margin-top: var(--space-4);
    padding: var(--space-3) 0 0 0;
    border-top: 1px solid var(--color-border-soft);
    font-size: var(--fs-sm);
}
.dash-pagination__info {
    color: var(--color-text-muted);
    flex: 1 1 auto;
}
.dash-pagination__info strong { color: var(--color-text); }
.dash-pagination__perpage {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-text-muted);
}
.dash-pagination__perpage select {
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    font-size: var(--fs-sm);
}
.dash-pagination__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.dash-pagination__nav a,
.dash-pagination__nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-primary-dark);
    text-decoration: none;
    font-size: var(--fs-sm);
    line-height: 1;
}
.dash-pagination__nav a:hover { background: var(--color-cream); }
.dash-pagination__nav span.is-disabled {
    color: var(--color-text-muted);
    opacity: 0.45;
    cursor: not-allowed;
}
.dash-pagination__page {
    border: 0 !important;
    background: transparent !important;
    color: var(--color-text-muted) !important;
    padding: 0 0.5rem !important;
}

@media (max-width: 640px) {
    .dash-pagination { flex-direction: column; align-items: stretch; gap: var(--space-2); }
    .dash-pagination__nav { justify-content: center; }
    .dash-pagination__perpage { justify-content: flex-start; }
}

/* =========================================================================
   CRM panels (Leads + Applications inside the dashboard)
   ========================================================================= */

/* Status color tokens (kept local to CRM section) */
:root {
    --status-blue:   #4A90B8;   --status-blue-bg:   #E3F0F7;
    --status-amber:  #B47A1F;   --status-amber-bg:  #FBEFD9;
    --status-teal:   #2E8A88;   --status-teal-bg:   #D9F0EF;
    --status-green:  #2E7D4A;   --status-green-bg:  #DBEEDF;
    --status-red:    #B23A2A;   --status-red-bg:    #F8D9D3;
    --status-gray:   #6B7D89;   --status-gray-bg:   #ECEEEF;
    --status-muted:  #909AA0;   --status-muted-bg:  #F1F1F0;
}

.crm__head {
    display: flex; align-items: baseline; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.crm__head h2 { margin: 0; }
.crm__sub {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    letter-spacing: normal;
    text-transform: none;
}
.crm__empty {
    margin: 0;
    padding: var(--space-6);
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-cream);
    border-radius: var(--radius-md);
    border: 1px dashed var(--color-border);
}

/* ----- Status tabs ----- */
.status-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px 2px;
    margin: 0 -4px var(--space-5) -4px;
    border-bottom: 1px solid var(--color-border-soft);
    scrollbar-width: thin;
}
.status-tabs::-webkit-scrollbar { height: 6px; }
.status-tabs::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }

.status-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1.5px solid var(--color-border-soft);
    background: var(--color-white);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s var(--ease);
}
.status-tab:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.status-tab.is-active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
    box-shadow: 0 3px 10px rgba(74,144,184,0.25);
}
.status-tab__count {
    display: inline-block;
    min-width: 22px;
    padding: 0 6px;
    text-align: center;
    background: var(--color-cream);
    color: var(--color-text-muted);
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 700;
}
.status-tab.is-active .status-tab__count {
    background: rgba(255,255,255,0.25);
    color: var(--color-text-inverse);
}

/* ----- Card grid ----- */
.crm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
}
.crm-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left: 4px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.crm-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Color the left border by status */
.crm-card--new            { border-left-color: var(--status-blue); }
.crm-card--followed_up    { border-left-color: var(--status-amber); }
.crm-card--onboarding     { border-left-color: var(--status-teal); }
.crm-card--on_schedule    { border-left-color: var(--status-green); }
.crm-card--not_a_fit      { border-left-color: var(--status-gray); }
.crm-card--archived       { border-left-color: var(--status-muted); }
.crm-card--interested     { border-left-color: var(--status-green); }
.crm-card--not_interested { border-left-color: var(--status-red); }

.crm-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}
.crm-card__head h3 {
    margin: 0 0 2px 0;
    font-size: var(--fs-md);
    line-height: 1.25;
}
.crm-card__head time {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
}

/* Status pill (top-right of card + used elsewhere) */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-xs);
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex: 0 0 auto;
}
.status-pill--new            { background: var(--status-blue-bg);  color: var(--status-blue); }
.status-pill--followed_up    { background: var(--status-amber-bg); color: var(--status-amber); }
.status-pill--onboarding     { background: var(--status-teal-bg);  color: var(--status-teal); }
.status-pill--on_schedule    { background: var(--status-green-bg); color: var(--status-green); }
.status-pill--not_a_fit      { background: var(--status-gray-bg);  color: var(--status-gray); }
.status-pill--archived       { background: var(--status-muted-bg); color: var(--status-muted); }
.status-pill--interested     { background: var(--status-green-bg); color: var(--status-green); }
.status-pill--not_interested { background: var(--status-red-bg);   color: var(--status-red); }

/* Definition list of details */
.crm-card__details {
    margin: 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: var(--space-4);
    row-gap: 6px;
    font-size: var(--fs-sm);
}
.crm-card__details > div {
    display: contents;
}
.crm-card__details dt {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 4px;
}
.crm-card__details dd {
    margin: 0;
    color: var(--color-text);
    word-break: break-word;
}
.crm-card__details a { color: var(--color-primary-dark); }

/* Collapsible message / cover letter */
.crm-card__msg {
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    padding: 0;
    overflow: hidden;
}
.crm-card__msg summary {
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-xs);
    color: var(--color-primary-dark);
    list-style: none;
    user-select: none;
}
.crm-card__msg summary::-webkit-details-marker { display: none; }
.crm-card__msg summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.15s var(--ease);
}
.crm-card__msg[open] summary::before { transform: rotate(90deg); }
.crm-card__msg p {
    margin: 0;
    padding: 0 0.8rem 0.7rem 0.8rem;
    font-size: var(--fs-sm);
    color: var(--color-text);
    white-space: pre-wrap;
}

.crm-card__source {
    margin: 0;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-style: italic;
}

.crm-card__footer {
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}
.crm-card__updated {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* The status-change form (just a styled select) */
.status-form select {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
    background: var(--color-cream);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 2rem 0.5rem 0.8rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232C3E4A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 14px;
    cursor: pointer;
    max-width: 100%;
}
.status-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}

@media (max-width: 900px) {
    .crm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .crm-card__details { grid-template-columns: 1fr; row-gap: 2px; }
    .crm-card__details dt { padding-top: 8px; }
    .crm-card__head { flex-wrap: wrap; }
    .status-pill { order: -1; margin-bottom: 4px; }
    .crm-card__footer { flex-direction: column; align-items: stretch; }
    .status-form select { width: 100%; }
}

/* =========================================================================
   Public intake form (page-intake) + admin intake editor
   ========================================================================= */

.intake-shell {
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-cream) 35%);
    padding: var(--space-8) 0 var(--space-9);
    min-height: 80vh;
}
.intake-header { text-align: center; max-width: 720px; margin: 0 auto var(--space-6); }
.intake-header h1 { margin-bottom: var(--space-3); }
.intake-note {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-top: var(--space-5);
    text-align: left;
    font-size: var(--fs-sm);
}

.intake-form { background: transparent; }

/* ----- Wizard step indicator (only visible when JS upgrades the form) ----- */
.intake-steps { display: none; }
.intake-form.is-wizard .intake-steps {
    display: block;
    margin-bottom: var(--space-6);
}

.intake-steps ol {
    display: none; /* hidden on mobile — see media query */
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
}
.intake-steps li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    text-align: center;
}
.intake-steps li::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}
.intake-steps li:last-child::after { display: none; }
.intake-steps li span {
    position: relative;
    z-index: 1;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.intake-steps li em {
    font-style: normal;
    font-weight: 600;
    font-size: var(--fs-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.intake-steps li.is-active span {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-inverse);
    box-shadow: 0 0 0 6px rgba(74,144,184,0.15);
}
.intake-steps li.is-active em {
    color: var(--color-primary-dark);
}
.intake-steps li.is-complete span {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-text-inverse);
}
.intake-steps li.is-complete::after {
    background: var(--color-secondary);
}
.intake-steps li.is-complete em {
    color: var(--color-text);
}

/* Mobile-only: text + progress bar */
.intake-steps__mobile {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    color: var(--color-text);
    margin-bottom: 8px;
}
.intake-steps__mobile strong { color: var(--color-primary-dark); margin-right: 6px; }
.intake-steps__bar {
    height: 6px;
    background: var(--color-border-soft);
    border-radius: 999px;
    overflow: hidden;
}
.intake-steps__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 999px;
    transition: width 0.35s var(--ease);
}

@media (min-width: 720px) {
    .intake-steps ol { display: flex; gap: 0; }
    .intake-steps__mobile,
    .intake-steps__bar { display: none; }
}

/* ----- Step visibility (only one section shown at a time in wizard mode) ----- */
.intake-form.is-wizard .intake-section {
    display: none;
}
.intake-form.is-wizard .intake-section.is-active {
    display: block;
    animation: intake-step-in 0.25s var(--ease);
}
@keyframes intake-step-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- Wizard navigation buttons ----- */
.intake-nav {
    display: flex;
    gap: var(--space-3);
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-5);
    flex-wrap: wrap;
}
.intake-nav [data-step-prev] {
    margin-right: auto;
}
.intake-nav [data-step-next],
.intake-nav [data-step-submit] {
    margin-left: auto;
}
.intake-nav [hidden] { display: none !important; }

/* When NOT in wizard mode (no JS), submit stays at the bottom, centered like before */
.intake-form:not(.is-wizard) .intake-nav { justify-content: center; }
.intake-form:not(.is-wizard) .intake-nav [data-step-submit] { margin-left: 0; margin-right: 0; }

@media (max-width: 480px) {
    .intake-nav { flex-direction: column-reverse; gap: var(--space-2); }
    .intake-nav button { width: 100%; margin: 0 !important; }
}

.intake-section {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}
.intake-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--fs-xl);
    margin: 0 0 var(--space-5) 0;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
}
.intake-section h2 span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: var(--fs-base);
    flex: 0 0 36px;
}
.intake-section h3 {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    margin: var(--space-5) 0 var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.intake-section h3:first-of-type { margin-top: 0; }

/* The intake form uses standard label-on-top inputs, not floating labels */
.intake-form .form-row label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
    margin-bottom: 6px;
}
.intake-form .req { color: var(--color-accent-dark); }

.intake-form input[type="text"],
.intake-form input[type="email"],
.intake-form input[type="tel"],
.intake-form input[type="number"],
.intake-form input[type="date"],
.intake-form select,
.intake-form textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background: var(--color-cream);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    margin-top: 4px;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.intake-form textarea { min-height: 100px; resize: vertical; }
.intake-form input:focus,
.intake-form select:focus,
.intake-form textarea:focus {
    outline: none;
    background: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}

/* Consent checkboxes */
.consent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.consent-list label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-cream);
    border: 1.5px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.consent-list label:hover { border-color: var(--color-primary); }
.consent-list input[type="checkbox"] {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    cursor: pointer;
}
.consent-list input[type="checkbox"]:checked + span { color: var(--color-text); }
.consent-list label:has(input:checked) {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

/* Intake status pages (success / token error) */
.intake-status {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.intake-status--success { border-top: 6px solid var(--status-green); }
.intake-status--error   { border-top: 6px solid var(--status-red); }
.intake-status h1       { margin-bottom: var(--space-3); }

/* =========================================================================
   Admin intake editor (inside dashboard)
   ========================================================================= */

.intake-editor__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border-soft);
    flex-wrap: wrap;
}
.intake-editor__group {
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin: 0 0 var(--space-5) 0;
}
.intake-editor__group legend {
    padding: 0 0.6rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-md);
    color: var(--color-text);
}
.intake-editor__group--admin {
    background: var(--status-amber-bg);
    border-color: var(--status-amber);
}
.intake-editor__group--admin legend { color: var(--status-amber); }
.intake-editor__group h4 {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin: var(--space-5) 0 var(--space-3);
}
.intake-editor__group h4:first-of-type { margin-top: 0; }

/* Apply same input look as intake form */
.intake-editor input[type="text"],
.intake-editor input[type="email"],
.intake-editor input[type="tel"],
.intake-editor input[type="number"],
.intake-editor input[type="date"],
.intake-editor select,
.intake-editor textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background: var(--color-cream);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    margin-top: 4px;
}
.intake-editor textarea { min-height: 80px; resize: vertical; }
.intake-editor input:focus, .intake-editor select:focus, .intake-editor textarea:focus {
    outline: none;
    background: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}
.intake-editor .form-row label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
}

/* =========================================================================
   Invitations panel — quick-generate UI + success block
   ========================================================================= */

.invite-quick {
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.invite-quick__label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
    margin-bottom: 6px;
}
.invite-quick__label small {
    font-weight: 400;
    color: var(--color-text-muted);
}
.invite-quick__row {
    display: flex;
    gap: var(--space-3);
    align-items: stretch;
}
.invite-quick__row input[type="text"] {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
}
.invite-quick__row input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}
.invite-quick__row .btn { white-space: nowrap; }

/* Advanced disclosure inside the quick form */
.invite-advanced {
    margin-top: var(--space-4);
    border-top: 1px dashed var(--color-border);
    padding-top: var(--space-3);
}
.invite-advanced summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-primary-dark);
    list-style: none;
    user-select: none;
    padding: 0.3rem 0;
}
.invite-advanced summary::-webkit-details-marker { display: none; }
.invite-advanced summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.15s var(--ease);
}
.invite-advanced[open] summary::before { transform: rotate(90deg); }
.invite-advanced__grid {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
}
.invite-advanced input[type="text"],
.invite-advanced input[type="email"],
.invite-advanced input[type="number"],
.invite-advanced select,
.invite-advanced textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    margin-top: 4px;
}
.invite-advanced label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
}

/* Success block — appears after invitation is generated */
.invite-result {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-white) 100%);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}
.invite-result > strong {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    color: var(--color-primary-dark);
}

.invite-url-row {
    display: flex;
    gap: var(--space-2);
    align-items: stretch;
    margin-bottom: var(--space-4);
}
.invite-url-row input {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.85rem;
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: Menlo, Consolas, monospace;
    font-size: var(--fs-sm);
    color: var(--color-text);
    cursor: text;
}
.invite-url-row .btn { white-space: nowrap; }

.invite-email {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}
.invite-email label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
    margin-bottom: 6px;
}
.invite-email__row {
    display: flex;
    gap: var(--space-2);
    align-items: stretch;
}
.invite-email__row input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.85rem;
    background: var(--color-cream);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--fs-base);
}
.invite-email__row input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}
.invite-email__row .btn { white-space: nowrap; }
.invite-email__hint {
    margin: var(--space-2) 0 0 0;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}
.invite-email__hint code {
    background: var(--color-cream);
    padding: 1px 5px;
    border-radius: 3px;
}

@media (max-width: 520px) {
    .invite-quick__row,
    .invite-url-row,
    .invite-email__row { flex-direction: column; }
    .invite-quick__row .btn,
    .invite-url-row .btn,
    .invite-email__row .btn { width: 100%; }
}

@media (max-width: 640px) {
    .intake-section { padding: var(--space-5); }
    .intake-section h2 { font-size: var(--fs-lg); }
    .intake-editor__group { padding: var(--space-4); }
}

/* =========================================================================
   Clients panel — status colors (reuse the CRM color tokens)
   ========================================================================= */

.crm-card--client-new       { border-left-color: var(--status-blue); }
.crm-card--client-active    { border-left-color: var(--status-green); }
.crm-card--client-waitlist  { border-left-color: var(--status-amber); }
.crm-card--client-inactive  { border-left-color: var(--status-gray); }
.crm-card--client-archived  { border-left-color: var(--status-muted); }

.status-pill--client-new       { background: var(--status-blue-bg);  color: var(--status-blue); }
.status-pill--client-active    { background: var(--status-green-bg); color: var(--status-green); }
.status-pill--client-waitlist  { background: var(--status-amber-bg); color: var(--status-amber); }
.status-pill--client-inactive  { background: var(--status-gray-bg);  color: var(--status-gray); }
.status-pill--client-archived  { background: var(--status-muted-bg); color: var(--status-muted); }

/* =========================================================================
   Client detail page (admin view of a single client)
   ========================================================================= */

.client-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding-bottom: var(--space-5);
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border-soft);
    flex-wrap: wrap;
}

/* Quick reference card */
.client-detail__quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    font-size: var(--fs-sm);
}
.client-detail__quick strong {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}
@media (max-width: 720px) {
    .client-detail__quick { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .client-detail__quick { grid-template-columns: 1fr; }
}

/* Assignment row */
.client-detail__assignment {
    margin-bottom: var(--space-5);
}
.client-detail__assignment label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
    margin-bottom: 6px;
}
.client-detail__assignment-row {
    display: flex;
    gap: var(--space-3);
}
.client-detail__assignment-row input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    background: var(--color-cream);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
}
.client-detail__assignment-row input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}
@media (max-width: 480px) {
    .client-detail__assignment-row { flex-direction: column; }
}

/* Intake summary section */
.client-detail__intake {
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
}
.client-detail__intake h3 { margin: 0 0 var(--space-2); }
.client-detail__intake details { margin-top: var(--space-4); }
.client-detail__intake summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
    padding: 0.3rem 0;
}
.client-detail__intake-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: var(--space-5);
    row-gap: var(--space-3);
    margin: var(--space-4) 0 0;
    font-size: var(--fs-sm);
}
.client-detail__intake-grid > div { display: contents; }
.client-detail__intake-grid dt {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}
.client-detail__intake-grid dd { margin: 0; color: var(--color-text); }
@media (max-width: 600px) {
    .client-detail__intake-grid { grid-template-columns: 1fr; row-gap: 4px; }
    .client-detail__intake-grid dt { margin-top: var(--space-3); }
}

/* Notes section */
.client-detail__notes h3 {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border-soft);
}

.note-add-form {
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}
.note-add-form textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    resize: vertical;
}
.note-add-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74,144,184,0.15);
}

.note-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.note {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}
.note__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}
.note__author {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    font-size: var(--fs-sm);
}
.note__role {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.note__time {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
}
.note__time small { font-style: italic; }
.note__body {
    color: var(--color-text);
    font-size: var(--fs-sm);
    line-height: 1.55;
    white-space: pre-wrap;
}
.note__actions {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--color-border-soft);
    display: flex;
    gap: var(--space-3);
}
.note__btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
}
.note__btn:hover { color: var(--color-primary-dark); text-decoration: underline; }
.note__btn--danger:hover { color: var(--status-red); }

.note__edit-form textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    background: var(--color-cream);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    resize: vertical;
}

/* =========================================================================
   Login
   ========================================================================= */
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-cream));
    padding: var(--space-6);
}
.login-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
}
.login-card h1 { font-size: var(--fs-xl); margin-bottom: var(--space-2); }
.login-card .lead { font-size: var(--fs-sm); margin-bottom: var(--space-5); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================================
   Phase 2A — Therapist accounts
   ========================================================================= */

/* --- Set-password page (token-gated, no nav) --- */
.setpw-shell { padding: var(--space-7) 0; background: var(--color-cream-soft, #FBF8F1); min-height: 60vh; }
.setpw-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-6);
    border: 1px solid var(--color-border-soft);
    max-width: 560px;
    margin: 0 auto;
}
.setpw-card h1 { font-size: var(--fs-2xl); margin: var(--space-2) 0 var(--space-3); }
.setpw-card .lead { color: var(--color-text); margin-bottom: var(--space-4); }
.setpw-card .field { position: relative; }
.setpw-card .field input {
    width: 100%;
    padding: 1rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    background: var(--color-white);
}
.setpw-card .field__label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-text);
}
.setpw-card .field .req { color: var(--color-accent-dark); }

/* --- Admin: Therapists panel — quick add row --- */
.therapist-add {
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-top: var(--space-3);
}
.therapist-add__row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--space-3);
}
.therapist-add__row input {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-sm);
}
.therapist-add__row .btn { white-space: nowrap; }
.therapist-add__hint {
    display: block;
    margin-top: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
}
@media (max-width: 720px) {
    .therapist-add__row { grid-template-columns: 1fr; }
}

/* --- Therapist self-view: profile form --- */
.therapist-profile__banner {
    background: var(--status-amber-bg, #FFF6E5);
    border-left: 4px solid var(--status-amber, #D69E2E);
    color: var(--color-text);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-5);
    line-height: 1.5;
}
.therapist-profile__banner strong { color: var(--color-primary-dark); display: block; margin-bottom: 4px; }

/* --- Checkbox grid (areas/services pickers) --- */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.4rem 0.8rem;
    margin-top: 0.3rem;
}
.checkbox-grid .checkbox-row {
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.checkbox-grid .checkbox-row:hover { background: #F2EDE2; }
.checkbox-grid .checkbox-row input { accent-color: var(--color-primary); margin-right: 6px; }
.checkbox-grid .checkbox-row input:checked + span { color: var(--color-primary-dark); font-weight: 600; }

/* --- Therapist home (post-onboarding stub) --- */
.therapist-home__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}
.therapist-home__credentials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3) var(--space-5);
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}
.therapist-home__credentials > div { display: flex; flex-direction: column; gap: 2px; }
.therapist-home__credentials dt {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.therapist-home__credentials dd { margin: 0; color: var(--color-text); }
.therapist-home__coming-soon {
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}
.therapist-home__coming-soon h3 { margin: 0 0 var(--space-3); color: var(--color-primary-dark); }
.therapist-home__coming-soon ul { margin: 0; padding-left: 1.25rem; }
.therapist-home__coming-soon li { margin-bottom: var(--space-2); }

/* --- Status pill amber variant (used for "Pending Setup" / "Profile Incomplete") --- */
.status-pill--amber {
    background: var(--status-amber-bg);
    color: var(--status-amber);
}

/* =========================================================================
   Phase 2B — Therapist↔client assignments
   ========================================================================= */

/* --- Admin assignment widget on _client_detail.php --- */
.client-detail__assignments {
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
}
.client-detail__assignments-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--space-3);
}
.ct__empty {
    color: var(--color-text-muted);
    font-style: italic;
    margin: 0;
    padding: var(--space-3) 0;
}
.ct__list {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ct__row {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left: 3px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}
.ct__row--lead { border-left-color: var(--color-accent); }
.ct__row-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: var(--fs-sm);
}
.ct__cred {
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}
.ct__lead-badge {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
}
.ct__track {
    display: inline-block;
    background: var(--status-blue-bg);
    color: var(--status-blue);
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}
.ct__row-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
}
.ct__remove {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: var(--fs-xs);
    cursor: pointer;
}
.ct__remove:hover {
    background: var(--status-red-bg);
    color: var(--status-red);
    border-color: var(--status-red);
}

.ct__add-form {
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
}
.ct__add-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr auto auto;
    gap: 0.5rem;
    align-items: center;
}
.ct__add-row select {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-sm);
}
.ct__add-row .btn { white-space: nowrap; }
.ct__lead-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
}
.ct__lead-toggle input { accent-color: var(--color-accent); }
@media (max-width: 720px) {
    .ct__add-row { grid-template-columns: 1fr; }
}
.ct__legacy {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--color-border-soft);
}
.ct__legacy summary {
    cursor: pointer;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Therapist's "My Clients" list --- */
.therapist-clients {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.therapist-clients__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-3);
}
.therapist-clients__head h3 { color: var(--color-primary-dark); }
.therapist-clients__empty {
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    text-align: center;
}
.therapist-clients__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-3);
}
.therapist-clients__item { margin: 0; }
.therapist-clients__card {
    display: block;
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.therapist-clients__card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-left-color: var(--color-accent);
}
.therapist-clients__card-name {
    font-size: var(--fs-md);
    color: var(--color-primary-dark);
    margin-bottom: 6px;
}
.therapist-clients__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 6px;
}
.therapist-clients__card-parent {
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
}

/* --- Therapist client view shares most styling with admin client view --- */
.therapist-client-view .client-detail__head h2 {
    color: var(--color-primary-dark);
}

/* --- Therapist self-view "My Earnings" card on home --- */
.therapist-earnings {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.therapist-earnings__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
    gap: var(--space-2);
}
.therapist-earnings__head h3 { color: var(--color-primary-dark); }
.therapist-earnings__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}
.therapist-earnings__card {
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
}
.therapist-earnings__card--owed { border-left-color: var(--status-amber); }
.therapist-earnings__card--paid { border-left-color: var(--status-green); }
.therapist-earnings__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.therapist-earnings__num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    color: var(--color-primary-dark);
    line-height: 1.1;
    margin: 2px 0;
}
.therapist-earnings__sub {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}
@media (max-width: 640px) {
    .therapist-earnings__grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Phase 2C — Sessions
   ========================================================================= */

/* --- Sessions list (used on admin & therapist client views) --- */
.sessions-block {
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
}
.sessions-block__head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--space-3);
}
.sessions-block__add {
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}
.sessions-block__add summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
    user-select: none;
}
.sessions-block__add[open] summary { margin-bottom: var(--space-3); }

/* --- Sessions table — status-colored left border per row --- */
.sessions-table .sessions-table__row { border-left: 3px solid transparent; }
.sessions-table__row--scheduled { border-left-color: var(--status-blue); }
.sessions-table__row--completed { border-left-color: var(--status-green); }
.sessions-table__row--cancelled { border-left-color: var(--status-gray); }
.sessions-table__row--no_show   { border-left-color: var(--status-red); }

/* --- Session status pill variants --- */
.session-pill {
    white-space: nowrap;
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
}
.session-pill--scheduled { background: var(--status-blue-bg);  color: var(--status-blue); }
.session-pill--completed { background: var(--status-green-bg); color: var(--status-green); }
.session-pill--cancelled { background: var(--status-gray-bg);  color: var(--status-gray); }
.session-pill--no_show   { background: var(--status-red-bg);   color: var(--status-red); }

/* --- Session form (shared with create + edit) --- */
.session-form .form-row label { font-weight: 600; }
.session-form input[type="text"],
.session-form input[type="number"],
.session-form input[type="datetime-local"],
.session-form select,
.session-form textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-sm);
}

/* --- Session detail page --- */
.session-detail__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}
.session-detail__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3) var(--space-5);
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}
.session-detail__facts > div { display: flex; flex-direction: column; gap: 2px; }
.session-detail__facts dt {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.session-detail__facts dd { margin: 0; color: var(--color-text); }

.session-detail__statuses { margin-bottom: var(--space-4); }
.session-detail__status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.session-detail__status-btn {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.session-detail__status-btn:hover { background: var(--color-cream); }
.session-detail__status-btn.is-current {
    cursor: default;
    opacity: 0.55;
}
.session-detail__status-btn--completed.is-current { background: var(--status-green-bg); color: var(--status-green); border-color: var(--status-green); }
.session-detail__status-btn--scheduled.is-current { background: var(--status-blue-bg);  color: var(--status-blue);  border-color: var(--status-blue); }
.session-detail__status-btn--cancelled.is-current { background: var(--status-gray-bg);  color: var(--status-gray);  border-color: var(--status-gray); }
.session-detail__status-btn--no_show.is-current   { background: var(--status-red-bg);   color: var(--status-red);   border-color: var(--status-red); }

.session-detail__notes-form {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}
.session-detail__notes-form label { display: block; margin-bottom: 0.4rem; }
.session-detail__notes-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-family: inherit;
    font-size: var(--fs-sm);
    line-height: 1.55;
    resize: vertical;
}
.session-detail__notes-readonly {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}
.session-detail__notes-body {
    margin-top: var(--space-2);
    white-space: pre-wrap;
    line-height: 1.55;
}
.session-detail__edit-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-soft);
}

/* --- Therapist home: Upcoming Sessions card --- */
.therapist-upcoming {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.therapist-upcoming__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-3);
}
.therapist-upcoming__head h3 { color: var(--color-primary-dark); }
.therapist-upcoming__empty {
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin: 0;
    color: var(--color-text-muted);
    font-style: italic;
}
.therapist-upcoming__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.therapist-upcoming__row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: var(--space-3);
    align-items: center;
    padding: 0.6rem 0.9rem;
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left: 3px solid var(--status-blue);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.therapist-upcoming__row:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.therapist-upcoming__when { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.therapist-upcoming__when strong { color: var(--color-primary-dark); font-size: var(--fs-md); }
.therapist-upcoming__when small { color: var(--color-text-muted); font-size: var(--fs-xs); }
.therapist-upcoming__who { display: flex; flex-direction: column; gap: 2px; }
.therapist-upcoming__who strong { color: var(--color-text); }
.therapist-upcoming__who small  { color: var(--color-text-muted); font-size: var(--fs-xs); }
@media (max-width: 480px) {
    .therapist-upcoming__row { grid-template-columns: 70px 1fr; padding: 0.5rem 0.6rem; }
}

/* --- Recurring session form (Phase 2C.5) --- */
.session-form__repeat {
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-top: var(--space-3);
}
.session-form__repeat summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
    user-select: none;
}
.session-form__end-conds {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.session-form__end-conds .checkbox-row {
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    cursor: pointer;
}
.session-form__end-conds .checkbox-row input[type="radio"] { accent-color: var(--color-primary); margin: 0; }
.session-form__end-conds .checkbox-row input[type="number"],
.session-form__end-conds .checkbox-row input[type="date"],
.session-form__end-conds .checkbox-row select {
    width: auto;
    margin: 0;
}

/* =========================================================================
   Phase 2D — Admin Billing
   ========================================================================= */

/* --- Status pill variants for billing --- */
.status-pill--paid   { background: var(--status-green-bg); color: var(--status-green); }
.status-pill--unpaid { background: var(--status-amber-bg); color: var(--status-amber); }

/* --- Tiny C/T payment dots on sessions list (admin-only) --- */
.billing-badges {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.billing-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: help;
}
.billing-dot--paid   { background: var(--status-green-bg); color: var(--status-green); }
.billing-dot--unpaid { background: var(--status-amber-bg); color: var(--status-amber); }

/* --- Billing block on session detail page --- */
.billing-block {
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
}
.billing-block__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border-soft);
}
.billing-block__head h3 { color: var(--color-primary-dark); }

.billing-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left: 4px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}
.billing-card:last-child { margin-bottom: 0; }
.billing-card--paid   { border-left-color: var(--status-green); }
.billing-card--unpaid { border-left-color: var(--status-amber); }
.billing-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    flex-wrap: wrap;
}
.billing-card__head strong { color: var(--color-text); font-size: var(--fs-md); }
.billing-card__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-2) var(--space-4);
    margin: 0;
}
.billing-card__facts > div { display: flex; flex-direction: column; gap: 1px; }
.billing-card__facts dt {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.billing-card__facts dd {
    margin: 0;
    color: var(--color-text);
    font-weight: 600;
}

.billing-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-2) var(--space-3);
}
.billing-form__row label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text);
}
.billing-form__row input,
.billing-form__row select {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-sm);
    font-weight: 400;
}

/* --- Admin Billing dashboard panel: totals card row --- */
.billing-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    margin: var(--space-3) 0;
}
.billing-totals__card {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-left-width: 4px;
}
.billing-totals__card--unpaid-client { border-left-color: var(--status-amber); }
.billing-totals__card--unpaid-payout { border-left-color: var(--status-amber); }
.billing-totals__card--collected     { border-left-color: var(--status-green); }
.billing-totals__card--paidout       { border-left-color: var(--status-blue); }
.billing-totals__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.billing-totals__num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    color: var(--color-primary-dark);
    line-height: 1.1;
    margin: 2px 0;
}
.billing-totals__sub {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* --- Compensation card on therapist detail --- */
.atv-section--compensation { border-left: 4px solid var(--color-accent); }
.compensation-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr;
    gap: var(--space-4);
    align-items: center;
}
.compensation-grid > div { display: flex; flex-direction: column; gap: 4px; }
.compensation-grid dt {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.compensation-grid__value {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    color: var(--color-primary-dark);
}
.compensation-form {
    display: flex;
    gap: var(--space-2);
    align-items: end;
    flex-wrap: wrap;
}
.compensation-form label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text);
    flex: 1;
    min-width: 140px;
}
.compensation-form input {
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-sm);
    font-weight: 400;
}
@media (max-width: 720px) {
    .compensation-grid { grid-template-columns: 1fr; }
}

/* --- Payout drill-down on therapist detail --- */
.atv-section--payouts { border-left: 4px solid var(--color-primary); }
.payout-filter {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
    margin: var(--space-3) 0 var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border-soft);
}
.payout-filter__tab {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text);
    font-size: var(--fs-sm);
    text-decoration: none;
    transition: all 0.15s;
}
.payout-filter__tab:hover { background: var(--color-cream); }
.payout-filter__tab.is-active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}
.payout-filter__custom {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}
.payout-filter__custom input {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-xs);
}

.payout-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.payout-summary__card {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
}
.payout-summary__card--owed { border-left-color: var(--status-amber); }
.payout-summary__card--paid { border-left-color: var(--status-green); }
.payout-summary__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.payout-summary__num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--color-primary-dark);
    line-height: 1.1;
    margin: 2px 0;
}
.payout-summary__sub {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}
@media (max-width: 720px) {
    .payout-summary { grid-template-columns: 1fr; }
}

/* --- Billing filter (therapist dropdown) --- */
.billing-filter {
    margin: var(--space-3) 0 var(--space-2);
    font-size: var(--fs-sm);
}
.billing-filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
}
.billing-filter select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-sm);
}

/* --- Admin: therapist setup-link (copy for SMS) --- */
.atv-section--setup { border-color: var(--status-amber); }
.setup-link-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.setup-link-row input {
    flex: 1;
    min-width: 240px;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-cream);
    font-family: Menlo, Consolas, monospace;
    font-size: var(--fs-xs);
    color: var(--color-text);
}
.setup-link-row .btn { white-space: nowrap; }
.setup-link-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

/* --- Admin: Therapist detail view (sections + grid) --- */
.atv-section {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-top: var(--space-4);
}
.atv-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border-soft);
}
.atv-section__head h3 { color: var(--color-primary-dark); }
.atv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3) var(--space-5);
    margin: 0;
}
.atv-grid > div { display: flex; flex-direction: column; gap: 2px; }
.atv-grid dt {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.atv-grid dd {
    margin: 0;
    color: var(--color-text);
    word-break: break-word;
}

/* --- Therapist photo upload field --- */
.therapist-photo-field {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}
.therapist-photo-field__current {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.therapist-photo-field__current img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-soft);
}
.therapist-photo-field__current small { color: var(--color-text-muted); font-size: var(--fs-xs); }
.therapist-photo-field__input { flex: 1; min-width: 220px; }
.therapist-photo-field__input input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--fs-sm);
}

/* --- Contractor agreement signing --- */
.therapist-agreement__banner {
    background: var(--status-amber-bg, #FFF6E5);
    border-left: 4px solid var(--status-amber, #D69E2E);
    color: var(--color-text);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-5);
    line-height: 1.5;
}
.therapist-agreement__banner strong { color: var(--color-primary-dark); display: block; margin-bottom: 4px; }
.agreement-box {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
}
.agreement-box h3 {
    color: var(--color-primary-dark);
    font-size: var(--fs-md);
    margin: var(--space-4) 0 var(--space-2);
}
.agreement-box h3:first-child { margin-top: 0; }
.agreement-box p, .agreement-box li { line-height: 1.55; color: var(--color-text); }
.agreement-box ul { padding-left: 1.3rem; margin: var(--space-2) 0; }
.agreement-box .agreement__intro { font-size: var(--fs-md); }
.agreement-box .agreement__ack {
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-top: var(--space-4);
}
.agreement-sign-form .agreement-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--color-cream);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.agreement-sign-form .agreement-consent input { accent-color: var(--color-primary); margin-top: 3px; }

/* --- Series badge on session detail page --- */
.session-detail__series {
    background: var(--color-cream);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-bottom: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    flex-wrap: wrap;
}
.session-detail__series strong { color: var(--color-primary-dark); }

/* =========================================================================
   Parent Coaching — homepage band + dedicated page + cross-links
   ========================================================================= */

/* --- Homepage band (sits between trust strip and services) --- */
.pc-band {
    background: linear-gradient(135deg, #2E6B8F 0%, #4A90B8 100%);
    color: var(--color-white);
    padding: var(--space-7) 0;
    position: relative;
    overflow: hidden;
}
.pc-band::before {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 60%; height: 180%;
    background: radial-gradient(circle, rgba(232,148,92,0.12) 0%, rgba(232,148,92,0) 65%);
    pointer-events: none;
}
.pc-band__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-7);
    align-items: center;
    position: relative;
    z-index: 1;
}
.pc-band__copy .eyebrow { color: rgba(255,255,255,0.85); }
.pc-band__copy h2 {
    color: var(--color-white);
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    line-height: 1.15;
    margin-bottom: var(--space-3);
}
.pc-band__copy h2 em {
    color: var(--color-accent);
    font-style: normal;
    font-weight: 800;
}
.pc-band__copy .lead { color: rgba(255,255,255,0.92); }
.pc-band__pillars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}
.pc-band__pillars li {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: rgba(255,255,255,0.95);
    font-size: var(--fs-sm);
}
.pc-band__pillars li strong { color: var(--color-white); }
@media (max-width: 900px) {
    .pc-band__inner { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* --- Parent Coaching page: hero --- */
.pc-hero {
    background: linear-gradient(180deg, #F8F5EF 0%, #FBF8F1 100%);
    padding: var(--space-8) 0 var(--space-7);
    position: relative;
    overflow: hidden;
}
.pc-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border-soft), transparent);
}
.pc-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-7);
    align-items: center;
}
.pc-hero__copy h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin: var(--space-3) 0 var(--space-4);
    color: var(--color-text);
}
.pc-hero__copy h1 em {
    color: var(--color-primary-dark);
    font-style: normal;
    font-weight: 800;
    border-bottom: 4px solid var(--color-accent);
    padding-bottom: 2px;
}
.pc-hero__copy .lead {
    color: var(--color-text);
    margin: 0 0 var(--space-5);
}
.pc-hero__ctas {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}
.pc-hero__trustline {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    margin: 0;
}
.pc-hero__media {
    position: relative;
}
.pc-hero__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px -12px rgba(46, 107, 143, 0.28),
                0 6px 16px rgba(46, 107, 143, 0.10);
    display: block;
}
@media (max-width: 900px) {
    .pc-hero { padding: var(--space-7) 0 var(--space-6); }
    .pc-hero__grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
    /* On mobile, show the image FIRST (above the headline) — visual hook
       reads stronger on small screens for landing pages */
    .pc-hero__media { order: -1; }
    .pc-hero__copy { text-align: center; }
    .pc-hero__copy h1 { margin-left: auto; margin-right: auto; }
    .pc-hero__ctas { justify-content: center; }
}
@media (max-width: 640px) {
    .pc-hero__media img { aspect-ratio: 5 / 4; }
}

/* --- Page: gap section --- */
.pc-gap h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    margin-bottom: var(--space-3);
}

/* --- Page: 6-month arc steps --- */
.pc-arc__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    counter-reset: arcstep;
}
.pc-arc__step {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.pc-arc__step:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.pc-arc__badge {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-sm);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-3);
}
.pc-arc__step h3 {
    font-size: var(--fs-lg);
    margin: 0 0 var(--space-2);
    color: var(--color-primary-dark);
}
.pc-arc__step p { color: var(--color-text); margin: 0; }
@media (max-width: 900px) {
    .pc-arc__steps { grid-template-columns: 1fr; }
}

/* --- Page: three tracks --- */
.pc-track-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}
.pc-track-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft);
    border-top: 4px solid var(--color-primary);
    padding: var(--space-5);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.pc-track-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.pc-track-card:nth-child(2) { border-top-color: var(--color-accent); }
.pc-track-card:nth-child(3) { border-top-color: var(--color-secondary); }
.pc-track-card__tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}
.pc-track-card h3 {
    font-size: var(--fs-lg);
    margin: 0 0 var(--space-3);
    color: var(--color-primary-dark);
}
.pc-track-card p { color: var(--color-text); }
.pc-track-card ul {
    margin: var(--space-3) 0 0;
    padding-left: 1.2rem;
    color: var(--color-text);
    font-size: var(--fs-sm);
}
.pc-track-card ul li { margin-bottom: 4px; }
@media (max-width: 900px) {
    .pc-track-grid { grid-template-columns: 1fr; }
}

/* --- Page: comparison (3 columns) --- */
.pc-compare__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}
.pc-compare__col {
    background: var(--color-cream);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    position: relative;
}
.pc-compare__col--best {
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    box-shadow: 0 6px 24px rgba(74,144,184,0.12);
}
.pc-compare__badge {
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-xs);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.pc-compare__col h3 {
    font-size: var(--fs-md);
    margin: 0 0 var(--space-2);
    color: var(--color-primary-dark);
}
.pc-compare__sub {
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: var(--space-3);
    font-size: var(--fs-sm);
}
.pc-compare__col ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--color-text);
    font-size: var(--fs-sm);
}
.pc-compare__col li { margin-bottom: 6px; }
@media (max-width: 900px) {
    .pc-compare__grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* --- Page: who it's for --- */
.pc-who__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}
.pc-who__col {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border-left: 4px solid var(--color-border);
}
.pc-who__col--yes { border-left-color: #4CAF50; }
.pc-who__col--no  { border-left-color: var(--color-text-muted); }
.pc-who__col h3 {
    font-size: var(--fs-lg);
    margin: 0 0 var(--space-3);
    color: var(--color-primary-dark);
}
.pc-who__col ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--color-text);
}
.pc-who__col li { margin-bottom: var(--space-2); }
@media (max-width: 768px) {
    .pc-who__grid { grid-template-columns: 1fr; }
}

/* --- Page: delivery --- */
.pc-delivery__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}
.pc-delivery__card {
    background: var(--color-cream);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
}
.pc-delivery__card h3 {
    font-size: var(--fs-lg);
    margin: 0 0 var(--space-3);
    color: var(--color-primary-dark);
}
.pc-delivery__detail {
    margin-top: var(--space-3);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}
@media (max-width: 768px) {
    .pc-delivery__grid { grid-template-columns: 1fr; }
}

/* --- Per-section CTA on the parent-coaching page --- */
.pc-section-cta {
    margin: var(--space-6) auto 0;
    text-align: center;
}

/* --- Page: testimonial band (blue background section variant) --- */
.section--blue {
    background: linear-gradient(135deg, #2E6B8F 0%, #4A90B8 100%);
    color: var(--color-white);
}

/* --- Page: testimonial card --- */
.pc-testimonial__card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    padding: var(--space-6) var(--space-5);
    margin: var(--space-4) auto 0;
    max-width: 720px;
    position: relative;
}
.pc-testimonial__card::before {
    content: '\201C';
    position: absolute;
    top: -28px; left: var(--space-5);
    font-family: Georgia, serif;
    font-size: 5rem;
    line-height: 1;
    color: var(--color-accent);
    opacity: 0.9;
}
.pc-testimonial__card blockquote {
    margin: 0;
    padding: 0;
    border: 0;
}
.pc-testimonial__card blockquote p {
    color: rgba(255,255,255,0.96);
    font-size: var(--fs-lg);
    line-height: 1.55;
    font-style: italic;
    margin: 0 0 var(--space-3);
}
.pc-testimonial__card blockquote p:last-of-type { margin-bottom: 0; }
.pc-testimonial__card figcaption {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.92);
}
.pc-testimonial__card figcaption strong {
    display: block;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-md);
}
.pc-testimonial__card figcaption span {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.78);
}
@media (max-width: 640px) {
    .pc-testimonial__card { padding: var(--space-5) var(--space-4); }
    .pc-testimonial__card blockquote p { font-size: var(--fs-md); }
}

/* --- Page: FAQ accordion --- */
.pc-faq__list {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-5);
}
.pc-faq__item {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    transition: box-shadow 0.15s ease;
}
.pc-faq__item[open] { box-shadow: var(--shadow-sm); }
.pc-faq__item summary {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
    cursor: pointer;
    list-style: none;
    padding-right: 2rem;
    position: relative;
    font-size: var(--fs-md);
}
.pc-faq__item summary::-webkit-details-marker { display: none; }
.pc-faq__item summary::after {
    content: '+';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 300;
    transition: transform 0.2s ease;
}
.pc-faq__item[open] summary::after { content: '−'; }
.pc-faq__answer {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-soft);
    color: var(--color-text);
    line-height: 1.6;
}

/* --- Page: apply mini-form --- */
.pc-form__card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-6);
    border: 1px solid var(--color-border-soft);
}
.pc-form__head { text-align: center; margin-bottom: var(--space-5); }
.pc-form__head h2 { margin: var(--space-2) auto var(--space-3); }
.pc-form__fineprint {
    margin-top: var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    text-align: center;
}
@media (max-width: 640px) {
    .pc-form__card { padding: var(--space-4); }
}

/* --- OT / ABA cross-link callout (inside subpages.php) --- */
.pc-crosslink {
    background: linear-gradient(135deg, #F8F5EF 0%, #FBF8F1 100%);
    border-top: 1px solid var(--color-border-soft);
    border-bottom: 1px solid var(--color-border-soft);
    padding: var(--space-6) 0;
}
.pc-crosslink__inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-5);
    align-items: center;
}
.pc-crosslink h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    margin: var(--space-2) 0 var(--space-3);
    color: var(--color-primary-dark);
}
.pc-crosslink .lead { margin: 0; color: var(--color-text); }
.pc-crosslink__cta {
    margin: 0;
    text-align: right;
}
@media (max-width: 768px) {
    .pc-crosslink__inner { grid-template-columns: 1fr; }
    .pc-crosslink__cta { text-align: left; }
}

