/* ==========================================================================
   CipitNexus
   1.  Tokens (+ CustomCIPIT aliases used by the CIPIT plugins)
   2.  Base
   3.  Layout & sections
   4.  Buttons, badges, chips
   5.  Top bar, header & navigation
   6.  Page hero, breadcrumbs, search bar
   7.  Cards & grids
   8.  Filters, tabs, pagination, notices
   9.  Content typography (prose) & legacy content classes
   10. Home
   11. Podcast, article, profile, contact, 404
   12. Plugin output (Content Views, dashboard grid, tabs panels)
   13. Newsletter, footer, cookie notice, dialog
   14. Motion & print
   ========================================================================== */

/* 1. Tokens ================================================================ */

:root {
    --c-brand: #c02126;
    --c-brand-dark: #97171b;
    --c-brand-tint: #fcf1f1;
    --c-ink: #1b1d22;
    --c-body: #373a41;
    --c-muted: #62666e;
    --c-line: #e6e4e0;
    --c-soft: #fffbfb;
    --c-paper: #ffffff;
    --c-night: #16171b;
    --c-charcoal: #2a2c32;     /* softer dark */
    --c-surface-dark: var(--c-charcoal);  /* top bar, page headers, footer; see "Colour options" */
    --c-contrast: #000;        /* strongest text/fill against the page, e.g. button hover fills */

    /* Text and icons on the brand red, dark surfaces and photos. Translucent
       shades of it are written as color-mix(in srgb, var(--c-on-dark) N%, transparent). */
    --c-on-dark: #fff;
    --c-on-dark-strong: #e4e5e8;
    --c-on-dark-body: #d6d7db;
    --c-on-dark-soft: #c9cbd1;
    --c-on-dark-dim: #b9bbc2;
    --c-on-dark-intro: #b4b7be;
    --c-on-dark-muted: #a9acb3;
    --c-on-dark-faint: #8d9098;
    --c-brand-on-dark: #ff8a8d;

    /* Status colours: notices, "live" markers. */
    --c-success: #17613a;
    --c-success-bg: #e8f5ed;
    --c-info: #1d4f8f;
    --c-info-bg: #eaf1fb;
    --c-warning: #8a5300;
    --c-warning-bg: #fdf3e2;
    --c-error: #9b1c1f;
    --c-error-bg: #fdecec;
    --c-live: #1e9e5a;

    /* Raw colour values are left only in shadows, scrims over photos, dark shades on
       fixed dark or red surfaces, masks and video letterboxes; everything else uses a token. */

    /* One typeface site-wide. --font-serif is kept as a name so headings need no
       changes, but it is Arial too. */
    --font-sans: Arial, sans-serif;
    --font-serif: var(--font-sans);

    /* Golden ratio. Headings step by √φ (≈1.272) from a 16px base, so sizes stay
       restrained: 16 → 20.4 → 25.9 → 33 → 42px. Spacing steps by φ. */
    --phi: 1.618;
    --lh-body: 1.618;               /* φ */
    --lh-heading: 1.236;            /* 2/φ */

    --fs-2xs: .75rem;
    --fs-xs: .8125rem;
    --fs-sm: .875rem;
    --fs-md: .9375rem;
    --fs-base: 1rem;
    --fs-lead: 1.0625rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.272rem;                                      /* √φ  */
    --fs-2xl: clamp(1.414rem, 1.3rem + .5vw, 1.618rem);     /* φ   */
    --fs-3xl: clamp(1.75rem, 1.55rem + .9vw, 2.058rem);     /* φ√φ */
    --fs-4xl: clamp(2.058rem, 1.75rem + 1.4vw, 2.618rem);   /* φ²  */

    --space-1: .382rem;   /* 1/φ² */
    --space-2: .618rem;   /* 1/φ  */
    --space-3: 1rem;
    --space-4: 1.618rem;  /* φ    */
    --space-5: 2.618rem;  /* φ²   */
    --space-6: 4.236rem;  /* φ³   */

    /* Column splits: content to media φ:1, main to sidebar φ²:1. */
    --split-golden: minmax(0, 1.618fr) minmax(0, 1fr);
    --split-golden-rev: minmax(0, 1fr) minmax(0, 1.618fr);
    --split-sidebar: minmax(0, 2.618fr) minmax(0, 1fr);
    --split-sidebar-rev: minmax(0, 1fr) minmax(0, 2.618fr);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    /* Flat design: no drop shadows. Surfaces are separated by hairlines. The tokens
       stay (as none) because the CIPIT plugins read them. */
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --c-line-strong: #cfccc6;  /* hover/active hairline */

    --container: 1200px;
    --container-narrow: 740px;  /* (17px × φ)² ≈ 756px: the golden measure for 17px text */
    --gutter: clamp(16px, 4vw, 32px);
    --section: clamp(var(--space-5), 1.9rem + 3vw, var(--space-6));
    --header-h: 76px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* CustomCIPIT names. The CIPIT plugins read these, so keep them. */
    --primary-color: var(--c-brand);
    --primary-hover: var(--c-brand-dark);
    --primary-dark: var(--c-brand-dark);
    --secondary-color: var(--c-charcoal);
    --dark-gray: var(--c-charcoal);
    --light-gray: var(--c-soft);
    --border-radius: var(--radius);
    --button-radius: var(--radius-pill);
    --theme-btn-radius: var(--radius-pill);
    --card-shadow: var(--shadow-sm);
    --card-hover-shadow: var(--shadow-md);
    --shadow-float: var(--shadow-md);
    --card-transition: all .25s var(--ease);
    --section-padding: var(--section);
    --section-padding-small: calc(var(--section) / 1.618);
    --gr: 1.618;
    --golden-ratio: 1.618;
    --font-family: var(--font-sans);
    --base-font-size: 1rem;
    --h1-font-size: var(--fs-3xl);
    --h2-font-size: var(--fs-2xl);
    --h3-font-size: var(--fs-xl);
    --h4-font-size: var(--fs-lg);
    --h5-font-size: var(--fs-lead);
    --h6-font-size: var(--fs-base);
}

/* 2. Base ================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--c-paper);
    color: var(--c-body);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    color: var(--c-ink);
    font-weight: 700;
    line-height: var(--lh-heading);
    text-wrap: balance;
}

:where(h1) { font-size: var(--h1-font-size); letter-spacing: -.01em; }
:where(h2) { font-size: var(--h2-font-size); letter-spacing: -.005em; }
:where(h3) { font-size: var(--h3-font-size); }
:where(h4) { font-size: var(--h4-font-size); }
:where(h5) { font-size: var(--h5-font-size); }
:where(h6) { font-size: var(--h6-font-size); }

p, ul, ol, dl, figure, blockquote, address {
    margin: 0 0 1rem;
}

address {
    font-style: normal;
}

img, svg, video, iframe {
    max-width: 100%;
}

img {
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--c-brand);
    text-underline-offset: .18em;
}

a:hover {
    color: var(--c-brand-dark);
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

code, pre, kbd, samp, tt {
    font-family: var(--font-sans);
}

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

::selection {
    background: var(--c-brand);
    color: var(--c-on-dark);
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed !important;
    top: 12px;
    left: 12px;
    z-index: 1000;
    width: auto;
    height: auto;
    margin: 0;
    padding: .75rem 1rem;
    clip: auto;
    background: var(--c-ink);
    color: var(--c-on-dark);
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.hidden,
[hidden] {
    display: none !important;
}

.muted {
    color: var(--c-muted);
}

.site-main:focus {
    outline: none;
}

/* 3. Layout & sections ===================================================== */

.wrap,
.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.wrap .wrap,
.wrap .container,
.container .container {
    max-width: none;
    padding-inline: 0;
}

.wrap--narrow {
    max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
    padding-block: var(--section);
}

.section--tight {
    padding-block: clamp(var(--space-4), 1.2rem + 2vw, var(--space-5)) var(--section);
}

.section--flush-bottom {
    padding-bottom: 0;
    margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.wrap.section--flush-bottom {
    margin-top: 0;
    padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.section--muted {
    background: var(--c-soft);
}

/* Two plain sections in a row share one gap instead of stacking both paddings. */
.section:not(.section--muted) + .section:not(.section--muted) {
    padding-top: 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-2) var(--space-4);
    margin-bottom: var(--space-4);
}

.section-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-title,
.afri-section-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: var(--fs-2xl);
    color: var(--c-ink);
}

.section-title--sm {
    margin: 3rem 0 1.25rem;
    font-size: var(--fs-xl);
}

.section-lead {
    max-width: 62ch;
    margin: .5rem 0 0;
    color: var(--c-muted);
    font-size: var(--fs-lead);
}

.section-more {
    margin: 2rem 0 0;
    text-align: center;
}

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .5rem;
    color: var(--c-brand);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.empty-note {
    padding: 2.5rem 1rem;
    color: var(--c-muted);
    text-align: center;
    grid-column: 1 / -1;
}

.empty-state {
    max-width: 560px;
    margin: 1rem auto;
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--c-line);
    border-radius: var(--radius);
    text-align: center;
    color: var(--c-muted);
}

.empty-state > i {
    font-size: 1.75rem;
    color: var(--c-brand);
    margin-bottom: .75rem;
}

.empty-state__links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin: 0;
    font-weight: 600;
}

/* 4. Buttons, badges, chips =============================================== */

.btn,
.read-more-btn,
.read-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .65rem 1.25rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius-pill);
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}

.btn--primary,
.read-more-btn,
.read-more-button {
    background: var(--c-brand);
    color: var(--c-on-dark);
}

.btn--primary:hover,
.read-more-btn:hover,
.read-more-button:hover {
    background: var(--c-brand-dark);
    color: var(--c-on-dark);
}

.btn--ghost {
    background: transparent;
    border-color: var(--c-line);
    color: var(--c-ink);
}

.btn--ghost:hover {
    border-color: var(--c-ink);
    color: var(--c-ink);
}

.btn--sm {
    min-height: 36px;
    padding: .45rem 1rem;
    font-size: var(--fs-sm);
}

.btn--lg {
    min-height: 52px;
    padding: .85rem 1.6rem;
    font-size: var(--fs-base);
}

.btn:active {
    transform: translateY(1px);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--c-brand);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
}

.link-arrow i {
    font-size: .8em;
    transition: transform .2s var(--ease);
}

a.link-arrow:hover i,
:hover > .link-arrow i {
    transform: translateX(3px);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--c-ink);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color .2s;
}

.icon-btn:hover {
    background: var(--c-soft);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-2xs);
    font-weight: 700;
    line-height: 1.4;
}

.badge--brand {
    background: var(--c-brand);
    color: var(--c-on-dark);
}

/* 5. Top bar, header & navigation ========================================= */

.topbar {
    background: var(--c-surface-dark);
    color: var(--c-on-dark-body);
    font-size: var(--fs-xs);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 1rem;
}

.topbar__promo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--c-on-dark);
    font-weight: 500;
    text-decoration: none;
}

.topbar__icon {
    width: 15px;
    height: 15px;
    opacity: .8;
}

.topbar__promo:hover {
    color: var(--c-on-dark);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid color-mix(in srgb, var(--c-on-dark) 18%, transparent);
    border-radius: 50%;
    color: var(--c-on-dark);
    text-decoration: none;
    transition: background-color .2s, border-color .2s;
}

.social-links a:hover {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: var(--c-on-dark);
}

.social-links--small {
    gap: .15rem;
}

.social-links--small a {
    width: 30px;
    height: 30px;
    border: 0;
    color: var(--c-on-dark-soft);
    font-size: .8rem;
}

.social-links--small a:hover {
    background: color-mix(in srgb, var(--c-on-dark) 10%, transparent);
    color: var(--c-on-dark);
}

.social-links--light a {
    border-color: var(--c-line);
    color: var(--c-ink);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-brand);
    border-bottom: 1px solid var(--c-brand-dark);
}

.site-header__actions .icon-btn {
    color: var(--c-on-dark);
}

.site-header__actions .icon-btn:hover {
    background: color-mix(in srgb, var(--c-on-dark) 14%, transparent);
}

.admin-bar .site-header {
    top: var(--wp-admin--admin-bar--height, 32px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    flex-shrink: 0;
    margin-right: auto;
}

.brand__logo {
    width: auto;
    max-width: 210px;
    max-height: 52px;
    object-fit: contain;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: .25rem;
}

/* Desktop navigation */
.primary-nav .menu {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-nav .menu > li {
    position: relative;
}

.primary-nav .menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem .8rem;
    border-radius: var(--radius-sm);
    color: var(--c-ink);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}

.primary-nav .menu > li > a:hover,
.primary-nav .has-mega.is-open > a {
    background: var(--c-soft);
    color: var(--c-ink);
}

.primary-nav .menu > li.current-menu-item > a,
.primary-nav .menu > li.current-menu-ancestor > a,
.primary-nav .menu > li.is-current > a {
    color: var(--c-brand);
}

.primary-nav .has-mega > a::after {
    content: "";
    width: .45em;
    height: .45em;
    margin-top: -.2em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s var(--ease);
    opacity: .6;
}

.primary-nav .has-mega.is-open > a::after {
    transform: rotate(-135deg);
    margin-top: .2em;
}

.mega-menu {
    display: grid;
    grid-template-columns: repeat(var(--mega-cols, 1), minmax(250px, 300px));
    gap: 1rem 0;
}

.mega-menu .column {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    padding-inline: 1.25rem;
}

.mega-menu .column + .column {
    border-left: 1px solid var(--c-line);
}

.mega-menu .menu-title {
    margin: 0 0 .5rem;
    padding: 0 .625rem;
    color: var(--c-brand);
    font-family: var(--font-sans);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.mega-menu .column > a {
    display: block;
    padding: .45rem .625rem;
    border-radius: 6px;
    color: var(--c-ink);
    font-size: var(--fs-sm);
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

.mega-menu .column > a:hover,
.mega-menu .column > a:focus-visible {
    background: var(--c-brand-tint);
    color: var(--c-contrast);
    font-weight: 700;
}

.mega-menu .column > a[aria-current="page"] {
    color: var(--c-brand);
    font-weight: 600;
}

.primary-nav__head {
    display: none;
}

@media (min-width: 1080px) {
    .nav-toggle {
        display: none;
    }

    .primary-nav .menu > li > a {
        color: var(--c-on-dark);
    }

    .primary-nav .menu > li > a:hover,
    .primary-nav .has-mega.is-open > a {
        background: color-mix(in srgb, var(--c-on-dark) 14%, transparent);
        color: var(--c-on-dark);
    }

    .primary-nav .menu > li.current-menu-item > a,
    .primary-nav .menu > li.current-menu-ancestor > a,
    .primary-nav .menu > li.is-current > a {
        background: rgb(0 0 0 / .18);
        color: var(--c-on-dark);
    }

    .mega-menu {
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        z-index: 10;
        padding: 1.25rem .25rem 1rem;
        background: var(--c-paper);
        border: 1px solid var(--c-line);
        border-radius: var(--radius);
        box-shadow: 0 12px 32px -8px rgb(22 23 27 / .14), 0 2px 6px rgb(22 23 27 / .05);
        opacity: 0;
        visibility: hidden;
        transform: translate(calc(-50% + var(--mega-shift, 0px)), 6px);
        transition: opacity .18s, transform .18s var(--ease), visibility 0s .18s;
    }

    /* Bridge the gap so the pointer can travel from link to panel. */
    .mega-menu::before {
        content: "";
        position: absolute;
        inset: -14px 0 auto;
        height: 14px;
    }

    .has-mega:hover > .mega-menu,
    .has-mega.is-open > .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translate(calc(-50% + var(--mega-shift, 0px)), 0);
        transition: opacity .18s, transform .18s var(--ease), visibility 0s;
    }
}

/* Mobile drawer. Closed, it is display: none rather than translated off screen,
   and it is revealed with clip-path rather than transform: any fixed box that
   pokes past the right edge widens the layout viewport on phones, so the page
   pans sideways / opens zoomed out. Browsers without discrete display
   transitions just open and close it without animating. */
@media (max-width: 1079.98px) {
    .primary-nav {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 200;
        display: none;
        flex-direction: column;
        width: min(380px, 88vw);
        background: var(--c-paper);
        border-left: 1px solid var(--c-line);
        clip-path: inset(0 0 0 100%);
        transition: clip-path .3s var(--ease), display .3s allow-discrete;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .nav-open .primary-nav {
        display: flex;
        clip-path: inset(0);
    }

    @starting-style {
        .nav-open .primary-nav {
            clip-path: inset(0 0 0 100%);
        }
    }

    .nav-open {
        overflow: hidden;
    }

    /* The header's backdrop-filter makes it the containing block of the fixed
       drawer (squashing it to header height), and its z-index would put the
       drawer under .nav-backdrop. */
    .nav-open .site-header {
        z-index: 160;
        backdrop-filter: none;
    }

    .primary-nav__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .75rem .75rem .75rem 1.25rem;
        border-bottom: 1px solid var(--c-line);
    }

    .primary-nav__title {
        font-weight: 600;
        color: var(--c-ink);
    }

    .primary-nav .menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem .75rem 2rem;
    }

    .primary-nav .menu > li {
        border-bottom: 1px solid var(--c-line);
    }

    .primary-nav .menu > li > a {
        justify-content: space-between;
        width: 100%;
        padding: .9rem .5rem;
        font-size: var(--fs-base);
    }

    .mega-menu {
        display: none;
        grid-template-columns: 1fr;
        padding: 0 0 .75rem;
    }

    .has-mega.is-open > .mega-menu {
        display: grid;
    }

    .mega-menu .column {
        padding-inline: 0;
    }

    .mega-menu .column + .column {
        border-left: 0;
    }

    .mega-menu .menu-title {
        margin-top: .5rem;
        padding: 0 .5rem;
    }

    .mega-menu .column > a {
        padding: .55rem .5rem;
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 150;
        background: rgb(22 23 27 / .45);
    }
}

/* Header search: opening it swaps the menu and buttons for the field. */
.header-search {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.header-search[hidden],
.site-header.is-searching .primary-nav,
.site-header.is-searching .site-header__actions {
    display: none;
}

@media (prefers-reduced-motion: no-preference) {
    .header-search {
        animation: header-search-in .2s var(--ease);
    }
}

@keyframes header-search-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
}

.header-search__icon {
    position: absolute;
    left: .9rem;
    color: var(--c-on-dark);
    pointer-events: none;
}

.header-search__input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 1rem 0 2.85rem;
    border: 1px solid color-mix(in srgb, var(--c-on-dark) 28%, transparent);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--c-on-dark) 12%, transparent);
    color: var(--c-on-dark);
    font: inherit;
    font-size: var(--fs-base);
    outline: none;
    transition: background-color .15s, border-color .15s;
}

.header-search__input::placeholder {
    color: color-mix(in srgb, var(--c-on-dark) 75%, transparent);
}

.header-search__input:focus {
    background: color-mix(in srgb, var(--c-on-dark) 18%, transparent);
    border-color: color-mix(in srgb, var(--c-on-dark) 75%, transparent);
}

.header-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.header-search__close {
    flex-shrink: 0;
    color: var(--c-on-dark);
}

.header-search__close:hover {
    background: color-mix(in srgb, var(--c-on-dark) 14%, transparent);
}

.search-bar__icon.icon {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    :root {
        --header-h: 64px;
    }

    .topbar__promo span,
    .topbar .social-links {
        display: none;
    }

    .brand__logo {
        max-height: 42px;
        max-width: 160px;
    }

    /* Phones: the field gets the whole bar. */
    .site-header.is-searching .brand {
        display: none;
    }
}

/* 6. Page hero, breadcrumbs, search bar =================================== */

.page-hero {
    position: relative;
    background:
        radial-gradient(900px 300px at 100% 0%, color-mix(in srgb, var(--c-brand) 7%, transparent), transparent 70%),
        var(--c-soft);
    border-bottom: 1px solid var(--c-line);
    overflow: hidden;
}

/* Standard page and publication headers: soft charcoal rather than near-black. */
.page-hero--ruled,
.pub-hero {
    background:
        radial-gradient(900px 300px at 100% 0%, color-mix(in srgb, var(--c-brand) 18%, transparent), transparent 70%),
        var(--c-surface-dark);
    border-bottom: 1px solid color-mix(in srgb, var(--c-on-dark) 6%, transparent);
    color: var(--c-on-dark-soft);
    --rule-margin: color-mix(in srgb, var(--c-brand-on-dark) 40%, transparent);
    --rule-line: color-mix(in srgb, var(--c-on-dark) 9%, transparent);
}

.page-hero--ruled .page-hero__title {
    color: var(--c-on-dark);
}

.page-hero--ruled .page-hero__intro {
    color: var(--c-on-dark-intro);
}

.page-hero--ruled .eyebrow,
.pub-hero .eyebrow {
    color: var(--c-brand-on-dark);
}

.page-hero--ruled .breadcrumb ol,
.pub-hero .breadcrumb ol,
.pub-hero .post-meta {
    color: var(--c-on-dark-muted);
}

.page-hero--ruled .breadcrumb a:hover,
.pub-hero .breadcrumb a:hover {
    color: var(--c-on-dark);
}

.page-hero--ruled .breadcrumb [aria-current],
.pub-hero .breadcrumb [aria-current] {
    color: var(--c-on-dark-strong);
}

.page-hero__inner {
    padding-block: clamp(var(--space-4), 1.2rem + 2.5vw, var(--space-5)) clamp(var(--space-4), 1.4rem + 3vw, calc(var(--space-5) * 1.236));
}

.page-hero__title,
.article-head__title {
    max-width: 26ch;
    margin: 0;
    font-family: var(--font-serif);
    font-size: var(--fs-3xl);
    line-height: var(--lh-heading);
}

.page-hero__intro {
    max-width: 62ch;
    margin: var(--space-3) 0 0;
    color: var(--c-muted);
    font-size: var(--fs-lead);
}

.page-hero__intro p:last-child {
    margin-bottom: 0;
}

.page-hero__search {
    max-width: 640px;
    margin-top: 1.75rem;
}

/* Hero with cover art (podcast): artwork left, text right; stacks on phones. */
.page-hero__inner--media {
    display: grid;
    grid-template-columns: clamp(180px, 18vw, 240px) minmax(0, 1fr);
    gap: clamp(1.5rem, 1rem + 3vw, 3rem);
    align-items: center;
}

.page-hero--media .page-hero__search {
    max-width: 580px;
}

.page-hero__media {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

@media (max-width: 720px) {
    .page-hero__inner--media {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .page-hero__media {
        max-width: 140px;
    }
}

/* Legal-page motif on wide screens: the right of the hero is ruled like
   pleading paper (numbered lines, hairline margin). */
@media (min-width: 1080px) {
    .page-hero--ruled .page-hero__inner {
        position: relative;
        z-index: 1;
    }

    .page-hero--ruled::before {
        content: "";
        position: absolute;
        inset: 0 0 0 max(60%, 700px);
        opacity: .35;
        pointer-events: none;
        background:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='672'%3E%3Cg font-family='Arial,sans-serif' font-size='10' fill='%238d9098'%3E%3Ctext x='22' y='19' text-anchor='end'%3E1%3C/text%3E%3Ctext x='22' y='47' text-anchor='end'%3E2%3C/text%3E%3Ctext x='22' y='75' text-anchor='end'%3E3%3C/text%3E%3Ctext x='22' y='103' text-anchor='end'%3E4%3C/text%3E%3Ctext x='22' y='131' text-anchor='end'%3E5%3C/text%3E%3Ctext x='22' y='159' text-anchor='end'%3E6%3C/text%3E%3Ctext x='22' y='187' text-anchor='end'%3E7%3C/text%3E%3Ctext x='22' y='215' text-anchor='end'%3E8%3C/text%3E%3Ctext x='22' y='243' text-anchor='end'%3E9%3C/text%3E%3Ctext x='22' y='271' text-anchor='end'%3E10%3C/text%3E%3Ctext x='22' y='299' text-anchor='end'%3E11%3C/text%3E%3Ctext x='22' y='327' text-anchor='end'%3E12%3C/text%3E%3Ctext x='22' y='355' text-anchor='end'%3E13%3C/text%3E%3Ctext x='22' y='383' text-anchor='end'%3E14%3C/text%3E%3Ctext x='22' y='411' text-anchor='end'%3E15%3C/text%3E%3Ctext x='22' y='439' text-anchor='end'%3E16%3C/text%3E%3Ctext x='22' y='467' text-anchor='end'%3E17%3C/text%3E%3Ctext x='22' y='495' text-anchor='end'%3E18%3C/text%3E%3Ctext x='22' y='523' text-anchor='end'%3E19%3C/text%3E%3Ctext x='22' y='551' text-anchor='end'%3E20%3C/text%3E%3Ctext x='22' y='579' text-anchor='end'%3E21%3C/text%3E%3Ctext x='22' y='607' text-anchor='end'%3E22%3C/text%3E%3Ctext x='22' y='635' text-anchor='end'%3E23%3C/text%3E%3Ctext x='22' y='663' text-anchor='end'%3E24%3C/text%3E%3C/g%3E%3C/svg%3E") left top / 28px 672px no-repeat,
            linear-gradient(var(--rule-margin), var(--rule-margin)) 36px 0 / 1px 100% no-repeat,
            linear-gradient(var(--rule-margin), var(--rule-margin)) 40px 0 / 1px 100% no-repeat,
            repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule-line) 27px 28px) 40px 0 / 100% 100% no-repeat;
        -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
        mask-image: linear-gradient(to bottom, #000 55%, transparent);
    }

    /* The cover art pushes the text right, so start the ruled margin further out. */
    .page-hero--media::before {
        left: max(72%, 1000px);
    }
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    color: var(--c-muted);
    font-size: var(--fs-sm);
}

.breadcrumb li + li::before {
    content: "/";
    margin-right: .25rem;
    opacity: .5;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--c-brand);
    text-decoration: underline;
}

.breadcrumb [aria-current] {
    color: var(--c-ink);
    font-weight: 500;
}

.crumb-bar {
    padding-top: 1.5rem;
}

.crumb-bar .breadcrumb ol {
    margin: 0;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .35rem .35rem 2.75rem;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    transition: border-color .2s;
}

.search-bar:focus-within {
    border-color: var(--c-ink);
}

.search-bar__icon {
    position: absolute;
    left: 1.1rem;
    color: var(--c-muted);
}

.search-bar input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--c-ink);
    font: inherit;
    font-size: var(--fs-base);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

/* Clear button: the browser's blue cross replaced by a muted one that follows the text colour. */
.search-bar input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin: 0 .35rem 0 .5rem;
    background: currentColor;
    opacity: .45;
    cursor: pointer;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.search-bar input[type="search"]::-webkit-search-cancel-button:hover {
    opacity: .8;
}

/* Browser autofill paints a pale-blue slab with black text over the field; keep every field's own look. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: currentColor;
    caret-color: currentColor;
    transition: background-color 600000s 0s, color 600000s 0s;
}

.search-bar .btn {
    min-height: 40px;
    padding-inline: 1.1rem;
}

/* 7. Cards & grids ========================================================= */

.card-grid,
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
}

/* Fixed column counts: listings page by 8 and hubs show 4, so rows always fill. */
.pub-grid,
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.25rem clamp(1rem, .5rem + 1.5vw, 2rem);
}

@media (max-width: 960px) {
    .pub-grid,
    .books-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .pub-grid,
    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem 1rem;
    }
}

.cover-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--c-brand) 8%, transparent), transparent 60%),
        var(--c-soft);
    color: color-mix(in srgb, var(--c-brand) 45%, transparent);
    font-size: 2rem;
}

/* Article card (also used by the dashboard-grid plugin) */
.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .25s;
}

.blog-card:hover {
    border-color: var(--c-line-strong);
}

.blog-card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--c-soft);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

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

.blog-card-image .badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
}

.blog-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.1rem;
}

.blog-card__title,
.blog-card-content h3 {
    margin: 0 0 .6rem;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1.3;
}

.blog-card__title a,
.blog-card-content h3 a {
    color: var(--c-ink);
    text-decoration: none;
}

.blog-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.blog-card:hover .blog-card__title a {
    color: var(--c-brand);
}

.blog-card__excerpt,
.blog-card-content p {
    color: var(--c-muted);
    font-size: var(--fs-md);
}

.blog-card .post-meta {
    margin-top: auto;
}

.blog-card-content .eyebrow {
    color: var(--c-brand);
    font-size: var(--fs-2xs);
}

.blog-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .5rem;
}

.blog-card__top .eyebrow {
    margin: 0;
}

.blog-card__date {
    flex-shrink: 0;
    margin-left: auto;
    color: var(--c-muted);
    font-size: var(--fs-2xs);
    white-space: nowrap;
}

.blog-card .read-more-btn {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin-top: auto;
}

/* Podcast episode card: icon tile header, meta icons, "Listen" footer */
.podcast-card__top {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.podcast-card__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--c-soft);
    color: var(--c-brand);
    font-size: 1.1rem;
    transition: background-color .25s, color .25s;
}

.podcast-card:hover .podcast-card__icon {
    background: var(--c-brand);
    color: var(--c-on-dark);
}

.podcast-card__label {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}

.podcast-card__label .eyebrow {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podcast-card__label .blog-card__date {
    margin-left: 0;
}

.podcast-card__label .blog-card__date i,
.podcast-card__host i {
    margin-right: .2em;
    opacity: .7;
}

.podcast-card__top .badge {
    align-self: flex-start;
}

.podcast-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px solid var(--c-line);
    font-size: var(--fs-sm);
}

.podcast-card__host {
    min-width: 0;
    overflow: hidden;
    color: var(--c-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podcast-card__listen {
    margin-left: auto;
    color: var(--c-brand);
    font-weight: 600;
    white-space: nowrap;
}

.podcast-card__listen i {
    margin-right: .3em;
}

.blog-card--featured {
    display: grid;
    grid-template-columns: var(--split-golden);
    margin-bottom: var(--space-4);
}

.blog-card--featured .blog-card-image {
    aspect-ratio: auto;
    min-height: 320px;
}

.blog-card--featured .blog-card-content {
    justify-content: center;
    padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.blog-card--featured .blog-card__title {
    font-size: var(--fs-2xl);
}

@media (max-width: 800px) {
    .blog-card--featured {
        grid-template-columns: 1fr;
    }

    .blog-card--featured .blog-card-image {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .75rem;
    margin: 0;
    color: var(--c-muted);
    font-size: var(--fs-sm);
}

.post-meta i {
    margin-right: .3em;
    font-size: .9em;
    opacity: .7;
}

.post-meta--lg {
    margin-top: 1.25rem;
    font-size: var(--fs-md);
}

/* Publication card: portrait cover */
.book-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.book-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--c-soft);
    border: 1px solid var(--c-line);
    transition: border-color .25s;
}

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

.book-cover .badge {
    position: absolute;
    top: .6rem;
    left: .6rem;
}

.book-card:hover .book-cover {
    border-color: var(--c-line-strong);
}

.book-card__title,
.book-content h3,
.book-content h5 {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: 1.4;
}

.book-card__title a,
.book-content h3 a,
.book-content h5 a {
    color: var(--c-ink);
    text-decoration: none;
}

.book-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.book-card:hover .book-card__title a {
    color: var(--c-brand);
}

.book-card__label {
    margin: .25rem 0 0;
    color: var(--c-muted);
    font-size: var(--fs-xs);
}

/* Featured publication(s) */
.featured-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: clamp(1.25rem, 1rem + 2vw, 2.5rem);
    align-items: center;
    padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
    background: var(--c-soft);
    border-radius: var(--radius-lg);
}

.feature-card__cover {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--c-line);
}

.feature-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-card__title {
    margin: .25rem 0 .75rem;
    font-family: var(--font-serif);
    font-size: var(--fs-2xl);
}

.feature-card__title a {
    color: var(--c-ink);
    text-decoration: none;
}

.feature-card__title a:hover {
    color: var(--c-brand);
}

.feature-card__body > p:not(.eyebrow):not(.post-meta) {
    max-width: 62ch;
    color: var(--c-muted);
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .feature-card {
        grid-template-columns: 1fr;
    }

    .feature-card__cover {
        max-width: 200px;
    }
}

/* Search result rows */
.result-list {
    display: grid;
    max-width: 880px;
}

.result {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--c-line);
}

.result:first-child {
    padding-top: 0;
}

.result__thumb {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--c-soft);
}

.result__thumb .cover-placeholder {
    min-height: 0;
    font-size: 1.5rem;
}

@media (max-width: 520px) {
    .result__thumb {
        width: 64px;
        height: 64px;
    }
}

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

.result__title {
    margin: 0 0 .4rem;
    font-family: var(--font-serif);
    font-size: 1.2rem;
}

.result__title a {
    color: var(--c-ink);
    text-decoration: none;
}

.result__title a:hover {
    color: var(--c-brand);
    text-decoration: underline;
}

.result__excerpt {
    margin-bottom: .5rem;
    color: var(--c-muted);
    font-size: var(--fs-md);
}

/* Focus / resource cards */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 1.25rem;
}

.focus-card {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1.5rem;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    color: var(--c-body);
    text-align: left;
    text-decoration: none;
    transition: border-color .25s;
}

a.focus-card:hover {
    color: var(--c-body);
    border-color: var(--c-line-strong);
}

.focus-card > i {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: .75rem;
    border-radius: 12px;
    background: var(--c-brand-tint);
    color: var(--c-brand);
    font-size: 1.25rem;
}

.focus-card h3,
.focus-card h4 {
    margin: 0 0 .35rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--c-ink);
}

a.focus-card:hover h3,
a.focus-card:hover h4 {
    color: var(--c-brand);
}

.focus-card p {
    margin: 0;
    color: var(--c-muted);
    font-size: var(--fs-md);
}

.resource-card .link-arrow {
    margin-top: auto;
    padding-top: 1rem;
}

/* People */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 1.5rem;
}

@media (max-width: 560px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

    .team-card-content {
        padding: .75rem .8rem .85rem;
    }

    .team-card__name {
        font-size: var(--fs-md);
    }

    .team-position {
        font-size: var(--fs-xs);
    }

    .photo-placeholder {
        font-size: 2rem;
    }
}

.team-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .25s;
}

.team-card:hover {
    color: inherit;
}

.team-photo-container {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--c-soft);
}

.team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    transition: transform .5s var(--ease);
}

.team-card:hover .team-photo {
    transform: scale(1.04);
}

.photo-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--c-brand-tint), var(--c-soft));
    color: var(--c-brand);
    font-family: var(--font-serif);
    font-size: 2.75rem;
    font-weight: 700;
}

.team-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .2rem;
    padding: 1rem 1.1rem 1.1rem;
}

.team-card__name {
    color: var(--c-ink);
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.team-position {
    color: var(--c-muted);
    font-size: var(--fs-sm);
    line-height: 1.45;
}

.team-card__more {
    margin-top: auto;
    padding-top: .6rem;
    color: var(--c-brand);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.team-card__more i {
    font-size: .85em;
}

/* 8. Filters, tabs, pagination, notices =================================== */

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 0 0 2rem;
}

[data-tabs] .blog-tags,
.research-outputs-container .blog-tags,
.section-head--center + .blog-tags {
    justify-content: center;
}

.tag-btn,
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 38px;
    padding: .4rem 1rem;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    color: var(--c-ink);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}

.tag-btn:hover,
.filter-btn:hover {
    border-color: var(--c-ink);
    color: var(--c-ink);
}

.tag-btn.active,
.filter-btn.active {
    background: var(--c-ink);
    border-color: var(--c-ink);
    color: var(--c-on-dark);
}

.tag-btn--sm {
    min-height: 32px;
    padding: .25rem .8rem;
    font-size: var(--fs-xs);
}

.tag-btn__count {
    color: var(--c-muted);
    font-size: var(--fs-xs);
}

.tag-btn.active .tag-btn__count {
    color: color-mix(in srgb, var(--c-on-dark) 70%, transparent);
}

/* Content tabs (role="tablist"): line tabs on a hairline, not filter chips,
   matching the Custom Tabs plugin. */
.blog-tags[role="tablist"] {
    gap: 0 .25rem;
    border-bottom: 1px solid var(--c-line);
}

.research-outputs-container .blog-tags[role="tablist"] {
    justify-content: flex-start;
}

.blog-tags[role="tablist"] .tag-btn {
    min-height: 0;
    margin-bottom: -1px;
    padding: .6rem .9rem;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--c-body);
    font-size: var(--fs-md);
    transition: border-color .2s, color .2s;
}

body:not(.home) .blog-tags[role="tablist"] .tag-btn:first-child {
    padding-left: 0;
}

.blog-tags[role="tablist"] .tag-btn:hover {
    border-color: var(--c-line);
    color: var(--c-ink);
}

.blog-tags[role="tablist"] .tag-btn.active {
    background: none;
    border-color: var(--c-brand);
    color: var(--c-brand);
    font-weight: 600;
}

@media (max-width: 640px) {
    .blog-tags[role="tablist"] {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .blog-tags[role="tablist"]::-webkit-scrollbar {
        display: none;
    }

    .blog-tags[role="tablist"] .tag-btn {
        flex-shrink: 0;
    }
}

.topic-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 0 0 2rem;
}

.topic-filter .blog-tags {
    margin: 0;
}

/* Wider screens: chips and the dropdown wrap as one row. Phones: chips scroll sideways
   and the dropdown sits below, outside the scroller so its list is not clipped. */
@media (min-width: 641px) {
    .topic-filter .blog-tags {
        display: contents;
    }
}

/* "More topics" picker: a chip that opens a plain panel with a search field and a list. */
.topic-picker {
    position: relative;
}

.topic-picker__toggle {
    list-style: none;
    user-select: none;
}

.topic-picker__toggle::-webkit-details-marker {
    display: none;
}

.topic-picker__chevron {
    flex-shrink: 0;
    transition: transform .2s;
}

.topic-picker[open] .topic-picker__toggle {
    border-color: var(--c-ink);
}

.topic-picker[open] .topic-picker__chevron {
    transform: rotate(180deg);
}

.topic-picker__panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + .4rem);
    left: 0;
    width: 18rem;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgb(0 0 0 / .08);
    overflow: hidden;
}

.topic-picker.is-flipped .topic-picker__panel {
    left: auto;
    right: 0;
}

.topic-picker__search {
    display: block;
    width: 100%;
    padding: .7rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--c-line);
    border-radius: 0;
    background: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
    font-size: var(--fs-sm);
}

.topic-picker__search::-webkit-search-cancel-button {
    appearance: none;
}

.topic-picker__search:focus {
    outline: none;
    border-bottom-color: var(--c-ink);
}

.topic-picker__list {
    max-height: 18rem;
    margin: 0;
    padding: .35rem 0;
    overflow-y: auto;
    list-style: none;
}

.topic-picker__list li {
    margin: 0;
}

.topic-picker__option {
    display: block;
    padding: .5rem 1rem;
    color: var(--c-ink);
    font-size: var(--fs-sm);
    line-height: 1.4;
    text-decoration: none;
}

.topic-picker__option:hover,
.topic-picker__option:focus-visible {
    background: var(--c-brand-tint);
    color: var(--c-brand);
    outline: none;
}

.topic-picker__option[aria-current] {
    color: var(--c-brand);
    font-weight: 600;
}

.topic-picker__empty {
    margin: 0;
    padding: .75rem 1rem;
    color: var(--c-muted);
    font-size: var(--fs-sm);
}

@media (max-width: 640px) {
    .topic-picker {
        flex: 1 1 100%;
    }

    .topic-picker__toggle {
        width: 100%;
        justify-content: space-between;
    }

    .topic-picker__panel {
        right: 0;
        width: auto;
    }
}

.select-wrap select {
    min-height: 38px;
    padding: .4rem 2.25rem .4rem 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231b1d22' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 1rem center,
        var(--c-paper);
    font-size: var(--fs-sm);
    appearance: none;
    cursor: pointer;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
    margin-top: 3rem;
}

.pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .75rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    color: var(--c-ink);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
    transition: border-color .2s, background-color .2s;
}

.pagination a.page-numbers:hover {
    border-color: var(--c-ink);
}

.pagination .page-numbers.current {
    background: var(--c-ink);
    border-color: var(--c-ink);
    color: var(--c-on-dark);
}

.pagination .page-numbers.dots {
    border-color: transparent;
}

.notice {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.notice--success { background: var(--c-success-bg); color: var(--c-success); }
.notice--info { background: var(--c-info-bg); color: var(--c-info); }
.notice--warning { background: var(--c-warning-bg); color: var(--c-warning); }
.notice--error { background: var(--c-error-bg); color: var(--c-error); }

/* 9. Content typography ==================================================== */

.prose {
    color: var(--c-body);
    font-size: var(--fs-lead);
    line-height: 1.7;  /* φ, opened slightly for 17px justified text */
}

.prose :where(p, ul, ol, dl, blockquote, figure, table) {
    margin-bottom: var(--space-3);
}

.prose :where(h2, h3, h4) {
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
    font-family: var(--font-serif);
    line-height: var(--lh-heading);
}

/* Justified paragraphs (CIPIT house style). Hyphenation keeps word gaps even;
   phones fall back to ragged-right, where a narrow column would open rivers. */
.prose p,
.prose li,
.prose > div:not([class]) {  /* pasted paragraphs often arrive as bare <div>s */
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 7 3 3;
}

@media (max-width: 480px) {
    .prose p,
    .prose li,
    .prose > div:not([class]) {
        text-align: left;
        -webkit-hyphens: manual;
        hyphens: manual;
    }
}

.prose :where(h2, h3, h4):first-child {
    margin-top: 0;
}

/* Most posts were pasted from Word: <p align="justify"><span style="font-family: Arial; font-size: medium">.
   Let the theme's typography win so every article reads the same (justified, see above). */
.prose p[align],
.prose [style*="text-align: justify"],
.prose [style*="text-align: left"] {
    text-align: justify !important;
}

@media (max-width: 480px) {
    .prose p[align],
    .prose [style*="text-align: justify"],
    .prose [style*="text-align: left"] {
        text-align: left !important;
    }
}

.prose :where(span, font, p, li, strong, b, em, i, u)[style*="font-family"],
.prose font[face] {
    font-family: inherit !important;
}

.prose :where(span, font, p, li)[style*="font-size"],
.prose font[size] {
    font-size: inherit !important;
}

.prose :where(span, p, li)[style*="line-height"] {
    line-height: inherit !important;
}

/* Pasted black text becomes body text. Not `inherit`: Word often nests it inside a
   coloured span (<span style="color: #e00"><span style="color: #000">), and
   inheriting would turn the whole paragraph red. Headings keep their own colour. */
.prose :where(span, font, p)[style*="color: #000"],
.prose :where(span, font, p)[style*="color: black"],
.prose :where(span, font, p)[style*="color: rgb(0, 0, 0)"],
.prose font[color="#000000"] {
    color: var(--c-body) !important;
}

.prose :where(h1, h2, h3, h4, h5, h6) :where(span, font)[style*="color: #000"],
.prose :where(h1, h2, h3, h4, h5, h6) :where(span, font)[style*="color: black"],
.prose :where(h1, h2, h3, h4, h5, h6) :where(span, font)[style*="color: rgb(0, 0, 0)"],
.prose :where(h1, h2, h3, h4, h5, h6) font[color="#000000"] {
    color: inherit !important;
}

/* Section headings typed as bold/underlined paragraphs. */
.prose p > :where(b, strong):only-child,
.prose p > span:only-child > span:only-child > :where(i, b, u):only-child {
    color: var(--c-ink);
}

.prose :where(p, li) {
    text-wrap: pretty;
}

/* Links (often bare URLs) break at slashes, never with an inserted hyphen. */
.prose a {
    -webkit-hyphens: manual;
    hyphens: manual;
    overflow-wrap: anywhere;
}

/* Headings pasted from Word carry align="justify"; a few lines of large type
   justified open wide word gaps, so headings stay left-aligned. */
.prose :where(h1, h2, h3, h4, h5, h6) {
    text-align: left;
    -webkit-hyphens: manual;
    hyphens: manual;
}

/* Whole-bold paragraphs are headings (marked by theme.js): never justify them. */
.prose p.is-bold-heading {
    text-align: left !important;
    -webkit-hyphens: manual;
    hyphens: manual;
}

/* Centred or right-aligned paragraphs keep the author's alignment. */
.prose p[align="center"],
.prose p[style*="text-align: center"] {
    text-align: center !important;
}

.prose p[align="right"],
.prose p[style*="text-align: right"] {
    text-align: right !important;
}

.prose :where(h2) { font-size: var(--fs-2xl); }
.prose :where(h3) { font-size: var(--fs-xl); }
.prose :where(h4) { font-size: var(--fs-lg); }
.prose :where(h5, h6) { font-size: var(--fs-base); }

.prose > :first-child,
.prose > :first-child > :first-child {
    margin-top: 0;
}

.prose :where(ul, ol) {
    padding-left: 1.4em;
}

.prose li + li {
    margin-top: .4em;
}

.prose li > ul,
.prose li > ol {
    margin-top: .4em;
}

.prose blockquote {
    margin: 2rem 0;
    padding: .25rem 0 .25rem 1.5rem;
    border-left: 3px solid var(--c-brand);
    color: var(--c-ink);
    font-family: var(--font-serif);
    font-size: 1.25rem;
}

.prose img,
.prose .wp-caption {
    border-radius: var(--radius-sm);
}

.prose figure,
.prose .wp-caption {
    max-width: 100%;
    margin: 2rem 0;
}

.prose figcaption,
.prose .wp-caption-text {
    margin-top: .5rem;
    color: var(--c-muted);
    font-size: var(--fs-sm);
}

.prose table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    font-size: var(--fs-md);
}

.prose th,
.prose td {
    padding: .65rem .75rem;
    border-bottom: 1px solid var(--c-line);
    text-align: left;
    vertical-align: top;
}

.prose hr {
    margin: 3rem 0;
    border: 0;
    border-top: 1px solid var(--c-line);
}

.prose iframe {
    display: block;
    margin-bottom: var(--space-3);  /* e.g. Buzzsprout player above the episode notes */
    border: 0;
    border-radius: var(--radius-sm);
}

.prose .alignleft { float: left; margin: .25rem 1.5rem 1rem 0; }
.prose .alignright { float: right; margin: .25rem 0 1rem 1.5rem; }
.prose .aligncenter { display: block; margin-inline: auto; }

/* Responsive embeds from oEmbed / page content */
.wp-embed-responsive .wp-has-aspect-ratio iframe,
.prose iframe[src*="youtube"],
.prose iframe[src*="vimeo"] {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Classes used inside existing page content (About, Our Work, dashboards) */
.about-section {
    margin-bottom: var(--section);
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section > h3 {
    margin-top: 0;
    font-family: var(--font-serif);
    font-size: var(--fs-2xl);
}

/* "Who We Are": heading beside a lead paragraph, split φ : 1, so the copy uses
   the full width instead of leaving the right half of the page empty. */
.about-content {
    max-width: 72ch;
}

.prose .about-content p {
    margin-bottom: 0;
    color: var(--c-ink);
    font-size: var(--fs-lg);
    line-height: 1.75;
}

@media (min-width: 900px) {
    .about-section:has(> .about-content) {
        display: grid;
        grid-template-columns: 1fr 2.618fr;
        gap: var(--space-5);
        align-items: start;
        padding-bottom: var(--section);
        border-bottom: 1px solid var(--c-line);
    }

    .about-section:has(> .about-content):last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .about-content {
        max-width: none;
    }
}

.mission-vision {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: var(--space-4);
    max-width: none !important;
}

.mission-vision .card {
    padding: var(--space-4);
    background: var(--c-soft);
    border-radius: var(--radius);
    font-size: var(--fs-md);
    line-height: 1.7;
}

/* Short copy in narrow cards: justifying it opens wide gaps between words. */
.prose .mission-vision .card p {
    margin-bottom: 0;
    text-align: left;
    -webkit-hyphens: manual;
    hyphens: manual;
}

.mission-vision .card h4 {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 var(--space-3);
    font-family: var(--font-serif);
    font-size: var(--fs-xl);
}

.mission-vision .card h4 i {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--c-paper);
    color: var(--c-brand);
    font-size: 1rem;
}

.work-header {
    margin-bottom: 2rem;
}

/* 10. Home ================================================================= */

/* From the blog: an image-led lead story beside a list of four, split φ : 1.
   The lead takes the list's height, so both columns share top and bottom edges. */
.blog-digest {
    display: grid;
    grid-template-columns: var(--split-golden);
    gap: var(--space-5);
    align-items: stretch;
}

.digest-lead {
    position: relative;
    display: flex;
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-night);
    isolation: isolate;
}

.digest-lead__media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.digest-lead__media img,
.digest-lead__media .cover-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.digest-lead:hover .digest-lead__media img {
    transform: scale(1.03);
}

/* Fade to night over the lower 61.8% so the type always sits on dark. */
.digest-lead__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(22 23 27 / 0) 38.2%, rgb(22 23 27 / .55) 61.8%, rgb(22 23 27 / .92) 100%);
}

.digest-lead__body {
    align-self: flex-end;
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-3);
    color: color-mix(in srgb, var(--c-on-dark) 82%, transparent);
}

.digest-lead__topic {
    display: inline-block;
    margin: 0 0 var(--space-2);
    padding: .3rem .85rem;
    border-radius: var(--radius-pill);
    background: var(--c-brand);
    color: var(--c-on-dark);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.digest-lead__title {
    max-width: 22ch;
    margin: 0 0 var(--space-3);
    font-size: clamp(1.4rem, 1rem + 1.2vw, 1.85rem);
    line-height: 1.15;
}

.digest-lead__title a {
    color: var(--c-on-dark);
    text-decoration: none;
}

/* Whole card is clickable. */
.digest-lead__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.digest-lead:hover .digest-lead__title a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
}

.digest-lead__excerpt {
    display: -webkit-box;
    max-width: 58ch;
    margin: 0 0 var(--space-3);
    overflow: hidden;
    font-size: var(--fs-md);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.digest-lead__cta {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: var(--space-3);
    color: var(--c-on-dark);
    font-weight: 600;
}

.digest-arrow {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--c-line);
    border-radius: 50%;
    background: var(--c-paper);
    color: var(--c-ink);
    font-size: .75rem;
    transition: background-color .2s, color .2s, border-color .2s;
}

.digest-lead__cta .digest-arrow {
    width: 44px;
    height: 44px;
    border-color: var(--c-on-dark);
    font-size: 1rem;
}

.digest-lead .post-meta {
    padding-top: var(--space-3);
    border-top: 1px solid color-mix(in srgb, var(--c-on-dark) 20%, transparent);
    color: color-mix(in srgb, var(--c-on-dark) 80%, transparent);
    font-size: var(--fs-sm);
}

/* The list: four compact rows on hairlines, spread to the lead's height. */
.blog-digest__list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-digest__list > li {
    display: flex;
    flex: 1;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-paper);
    transition: border-color .2s;
}

.blog-digest__list > li:hover {
    border-color: var(--c-ink);
}

.digest-item {
    position: relative;
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: stretch;
    width: 100%;
    padding: .5rem;
}

.digest-item__body {
    align-self: center;
    min-width: 0;
    padding-block: .25rem;
}

.digest-item > .digest-arrow {
    align-self: center;
    margin-right: .5rem;
}

.digest-item:hover .digest-arrow {
    border-color: var(--c-ink);
    background: var(--c-ink);
    color: var(--c-on-dark);
}

.digest-lead:hover .digest-lead__cta .digest-arrow {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: var(--c-on-dark);
}

.digest-item__thumb {
    position: relative;
    display: block;
    min-height: 5.5rem;
    /* Concentric with the card: outer radius minus the .5rem inset. */
    border-radius: calc(var(--radius) - .5rem);
    overflow: hidden;
    background: var(--c-soft);
}

/* The image fills the thumb, and the thumb fills the card's height, so the
   inset is the same .5rem on every side however tall the text runs. */
.digest-item__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.digest-item:hover .digest-item__thumb img {
    transform: scale(1.05);
}

.digest-item__thumb .cover-placeholder {
    position: absolute;
    inset: 0;
    min-height: 0;
    font-size: 1.1rem;
}

.digest-item .eyebrow {
    margin-bottom: .25rem;
    font-size: var(--fs-xs);
    letter-spacing: 0;
    text-transform: none;
}

.digest-item__title {
    display: -webkit-box;
    margin: 0 0 .3rem;
    overflow: hidden;
    font-size: var(--fs-md);
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.digest-item__title a {
    color: var(--c-ink);
    text-decoration: none;
}

.digest-item__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.digest-item:hover .digest-item__title a {
    color: var(--c-brand);
}

.digest-item .post-meta {
    flex-wrap: nowrap;
    gap: .75rem;
    font-size: var(--fs-xs);
    white-space: nowrap;
}

@media (max-width: 900px) {
    .blog-digest {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .digest-lead {
        min-height: 0;
        aspect-ratio: 1.618 / 1;
    }
}

@media (max-width: 560px) {
    .digest-lead {
        aspect-ratio: auto;
        min-height: 360px;
    }

    .digest-lead__body {
        padding: var(--space-4) var(--space-3) var(--space-3);
    }

    .digest-lead__title {
        font-size: var(--fs-xl);
    }

    .digest-item {
        grid-template-columns: 5.5rem minmax(0, 1fr);
    }

    .digest-item > .digest-arrow {
        display: none;
    }

    .digest-lead__body {
        padding: var(--space-4) var(--space-3) var(--space-3);
    }
}

.hero-slider {
    position: relative;
    min-height: clamp(460px, 68vh, 640px);
    background: var(--c-night);
    color: var(--c-on-dark);
    overflow: hidden;
    isolation: isolate;
}

.hero-slider__track {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s var(--ease), visibility 0s .9s;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity .9s var(--ease), visibility 0s;
}

.hero-slide__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s linear;
}

.hero-slide.is-active .hero-slide__bg {
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(0deg, rgb(15 16 20 / .85) 0%, rgb(15 16 20 / .35) 55%, rgb(15 16 20 / .15) 100%),
        linear-gradient(90deg, rgb(15 16 20 / .55) 0%, transparent 70%);
}

.hero-slide__content {
    padding-bottom: clamp(5.5rem, 4rem + 4vw, 7rem);
}

.hero-slide__title {
    max-width: 18ch;
    margin: 0 0 .75rem;
    color: var(--c-on-dark);
    font-family: var(--font-serif);
    font-size: var(--fs-4xl);
    line-height: 1.146;  /* √φ × 0.9 keeps big serif lines tight */
}

.hero-slide__text {
    max-width: 56ch;
    margin-bottom: 1.5rem;
    color: color-mix(in srgb, var(--c-on-dark) 88%, transparent);
    font-size: var(--fs-lead);
}

.hero-slide__text p:last-child {
    margin-bottom: 0;
}

.hero-slider__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    margin-inline: auto;
}

.hero-slider__dots {
    display: flex;
    gap: .25rem;
    margin-inline: .5rem;
}

.hero-slider__dot {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.hero-slider__dot::before {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--c-on-dark) 40%, transparent);
    transition: background-color .2s;
}

.hero-slider__dot.is-active::before {
    background: var(--c-on-dark);
}

.hero-slider__arrow {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--c-on-dark) 35%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--c-on-dark) 6%, transparent);
    color: var(--c-on-dark);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background-color .2s;
}

.hero-slider__arrow:hover {
    background: color-mix(in srgb, var(--c-on-dark) 20%, transparent);
}

.intro__grid {
    display: grid;
    grid-template-columns: var(--split-golden-rev);
    gap: clamp(var(--space-4), 1rem + 3vw, var(--space-6));
    align-items: center;
}

.intro__title {
    font-family: var(--font-serif);
    font-size: var(--fs-3xl);
    line-height: var(--lh-heading);
    margin-bottom: var(--space-3);
}

.intro__text > p:not(.eyebrow) {
    color: var(--c-muted);
    font-size: var(--fs-lead);
}

.intro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.75rem;
}

.focus-grid--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

@media (max-width: 520px) {
    .focus-grid--home {
        grid-template-columns: 1fr;
    }
}

.afri-tab-content,
.re-output-content .re-tab-content {
    display: none;
}

.afri-tab-content.active,
.re-output-content .re-tab-content.active {
    display: block;
    animation: fade-up .35s var(--ease);
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* 11. Article, profile, contact, 404 ============================= */

/* Search field on dark: a quiet translucent field instead of a white slab. */
.page-hero--ruled .search-bar {
    background: color-mix(in srgb, var(--c-on-dark) 6%, transparent);
    border-color: color-mix(in srgb, var(--c-on-dark) 16%, transparent);
}

.page-hero--ruled .search-bar:focus-within {
    background: color-mix(in srgb, var(--c-on-dark) 9%, transparent);
    border-color: color-mix(in srgb, var(--c-on-dark) 45%, transparent);
}

.page-hero--ruled .search-bar__icon {
    color: var(--c-on-dark-faint);
}

.page-hero--ruled .search-bar input[type="search"] {
    color: var(--c-on-dark);
}

.page-hero--ruled .search-bar input[type="search"]::placeholder {
    color: var(--c-on-dark-faint);
}

.article-head {
    padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.article-head__title {
    max-width: none;
    font-size: var(--fs-3xl);
}

.single-post .entry-content {
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-line);
}

.article-thumb {
    margin: 0 0 2rem;
}

.article-thumb img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius);
}

.article-thumb figcaption {
    margin-top: .5rem;
    color: var(--c-muted);
    font-size: var(--fs-sm, .875rem);
}

.article-foot {
    display: grid;
    gap: 1.5rem;
    margin: 3rem 0 var(--section);
    padding-top: 2rem;
    border-top: 1px solid var(--c-line);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}

.share__label {
    margin-right: .5rem;
    color: var(--c-muted);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.share a,
.share button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--c-line);
    border-radius: 50%;
    background: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
    font-size: var(--fs-sm);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}

.share a:hover,
.share button:hover {
    border-color: var(--c-brand);
    color: var(--c-brand);
}

.share__copy {
    position: relative;
}

.share__copied {
    position: absolute;
}

.share__copied:not(:empty) {
    bottom: calc(100% + 6px);
    left: 50%;
    padding: .2rem .5rem;
    transform: translateX(-50%);
    border-radius: 4px;
    background: var(--c-ink);
    color: var(--c-on-dark);
    font-size: var(--fs-2xs);
    white-space: nowrap;
}

.author-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--c-soft);
    border-radius: var(--radius);
}

.author-box__avatar {
    flex-shrink: 0;
    border-radius: 50%;
}

.author-box .eyebrow {
    margin-bottom: .1rem;
}

.author-box__name {
    margin: 0 0 .35rem;
    color: var(--c-ink);
    font-family: var(--font-serif);
    font-size: var(--fs-lg);
    font-weight: 700;
}

.author-box p:last-child {
    margin-bottom: 0;
    font-size: var(--fs-md);
}

/* Publication detail (reports, policy briefs, journal articles, ...) */
.pub-hero {
    padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(var(--space-4), 1.4rem + 3vw, var(--space-6));
}

.pub-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: clamp(var(--space-4), 1rem + 3vw, var(--space-6));
    align-items: center;
    margin-top: var(--space-4);
}

.pub-hero__cover {
    aspect-ratio: 3 / 4;
    border: 1px solid color-mix(in srgb, var(--c-on-dark) 12%, transparent);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--c-paper);
}

.pub-hero__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-hero__body .article-head__title {
    max-width: 30ch;
    color: var(--c-on-dark);
    text-wrap: balance;
}

.pub-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: var(--space-4);
}

.pub-hero__actions .btn--ghost {
    border-color: color-mix(in srgb, var(--c-on-dark) 30%, transparent);
    color: var(--c-on-dark);
}

.pub-hero__actions .btn--ghost:hover {
    border-color: var(--c-on-dark);
    color: var(--c-on-dark);
}

.pub-layout {
    display: grid;
    grid-template-columns: var(--split-sidebar);
    gap: clamp(var(--space-4), 1rem + 3vw, var(--space-6));
    align-items: start;
    padding-block: var(--section);
}

.pub-section + .pub-section {
    margin-top: var(--space-5);
}

.pub-section__title {
    margin: 0 0 var(--space-3);
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--c-line);
    color: var(--c-ink);
    font-family: var(--font-serif);
    font-size: var(--fs-xl);
    line-height: var(--lh-heading);
}

.publication .entry-content {
    padding-top: 0;
    border-top: 0;
}

.publication .prose > :last-child {
    margin-bottom: 0;
}

/* Several PDFs embedded in the body (one per heading). */
.publication .prose iframe[src*=".pdf"] {
    width: 100%;
    height: min(85vh, 1000px);
    border: 1px solid var(--c-line);
}

.pub-reader__frame {
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-soft);
}

.pub-reader__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--c-line);
    background: var(--c-paper);
    font-size: var(--fs-sm);
}

.pub-reader__file {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--c-muted);
}

.pub-reader__file i {
    color: var(--c-brand);
    font-size: 1.1rem;
}

.pub-reader__tools {
    display: flex;
    gap: 1.25rem;
}

.pub-reader__tools a,
.pub-reader__toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--c-ink);
    font-weight: 600;
    text-decoration: none;
}

.pub-reader__tools a:hover,
.pub-reader__toggle:hover {
    color: var(--c-brand);
}

.pub-reader__toggle {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Collapsed reader: just the bar. */
.pub-reader__frame.is-closed .pub-reader__body {
    display: none;
}

.pub-reader__frame.is-closed .pub-reader__bar {
    border-bottom-width: 0;
}

.pub-reader__tools i {
    font-size: .85em;
}

.pub-reader__doc {
    display: block;
    width: 100%;
    height: min(85vh, 1000px);
    border: 0;
}

.pub-reader__fallback {
    display: none;
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--c-muted);
}

.pub-reader__fallback > i {
    color: var(--c-brand);
    font-size: 2rem;
}

.pub-reader__fallback p {
    margin: .75rem 0 1.25rem;
}

.pub-aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    display: grid;
    gap: 1.25rem;
}

.pub-card {
    padding: 1.25rem 1.5rem 1.5rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-paper);
}

.pub-card__title {
    margin: 0 0 .5rem;
    color: var(--c-ink);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
}

.pub-facts {
    display: grid;
    gap: 1rem;
    margin: .75rem 0 0;
    font-size: var(--fs-sm);
    line-height: 1.45;
}

.pub-facts dt {
    margin-bottom: .15rem;
    color: var(--c-muted);
    font-size: .8125rem;
}

.pub-facts dd {
    margin: 0;
    color: var(--c-ink);
}

.pub-facts dd a {
    color: inherit;
    text-decoration: none;
}

.pub-facts dd a:hover {
    color: var(--c-brand);
    text-decoration: underline;
}

.pub-facts .pub-facts__wide dt {
    margin-bottom: .5rem;
}

.pub-facts .tag-list a {
    font-weight: 500;
}

.pub-files {
    display: grid;
    gap: .5rem;
    margin: .25rem 0 0;
    padding: 0;
    list-style: none;
}

.pub-files a {
    display: flex;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    color: var(--c-ink);
    text-decoration: none;
    transition: border-color .2s;
}

.pub-files a:hover {
    border-color: var(--c-brand);
}

.pub-files i {
    margin-top: .15rem;
    color: var(--c-brand);
    font-size: 1.1rem;
}

.pub-files__name {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.35;
}

.pub-files__meta {
    display: block;
    margin-top: .2rem;
    color: var(--c-muted);
    font-size: var(--fs-xs);
}

.pub-cite {
    margin: 0 0 1rem;
    color: var(--c-body);
    font-size: var(--fs-sm);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.pub-cite a {
    color: inherit;
}

.pub-card .share__copy {
    position: relative;
}

@media (max-width: 960px) {
    .pub-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pub-aside {
        position: static;
    }
}

@media (max-width: 640px) {
    .pub-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-4);
    }

    .pub-hero__cover {
        width: 150px;
    }

    .pub-hero__actions .btn {
        flex: 1 1 auto;
    }

    /* Phone browsers show only the first page of an embedded PDF. */
    .pub-reader__doc {
        display: none;
    }

    .pub-reader__fallback {
        display: block;
    }

    .pub-reader__tools {
        display: none;
    }

    /* No inline reader on phones, so show the "Open PDF" fallback without a toggle. */
    .pub-reader__frame.is-closed .pub-reader__body {
        display: block;
    }

    .pub-reader__frame.is-closed .pub-reader__bar {
        border-bottom-width: 1px;
    }
}

.profile {
    display: grid;
    grid-template-columns: var(--split-sidebar-rev);
    gap: clamp(var(--space-4), 1rem + 3vw, var(--space-6));
    align-items: start;
}

.profile__aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
}

.profile__photo {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-soft);
}

.profile__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

.profile__links {
    display: grid;
    gap: .5rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.profile__links a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .85rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    color: var(--c-ink);
    font-size: var(--fs-sm);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile__links a:hover {
    border-color: var(--c-brand);
    color: var(--c-brand);
}

.profile__name {
    margin: 0;
    font-family: var(--font-serif);
    font-size: var(--fs-3xl);
}

.profile__position {
    margin: .5rem 0 2rem;
    color: var(--c-brand);
    font-size: var(--fs-lead);
    font-weight: 500;
}

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

    .profile__aside {
        position: static;
        max-width: 320px;
    }
}

.contact {
    display: grid;
    grid-template-columns: var(--split-golden-rev);
    gap: var(--space-4);
    align-items: stretch;
}

.contact__details {
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    background: var(--c-soft);
    border-radius: var(--radius-lg);
}

.contact__heading {
    margin: 1.75rem 0 .5rem;
    color: var(--c-muted);
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.contact__heading:first-child {
    margin-top: 0;
}

.contact__details i {
    width: 1.25em;
    color: var(--c-brand);
}

/* Contact lines with a leading icon (footer, contact page). */
.icon-list p {
    display: flex;
    gap: .6rem;
    margin: 0 0 .5rem;
}

.icon-list i {
    flex: none;
    width: 1.1em;
    margin-top: .3em;
    font-size: .9em;
    text-align: center;
}

.site-footer .icon-list i {
    opacity: .7;
}

.contact__details .social-links i {
    width: auto;
    color: inherit;
}

.contact__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    border-radius: var(--radius-lg);
}

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

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.quick-links a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    color: var(--c-ink);
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s;
}

.quick-links a:hover {
    border-color: var(--c-line-strong);
    color: var(--c-brand);
}

.quick-links i {
    color: var(--c-brand);
}

/* 12. Plugin output ======================================================== */

.page-blocks > p:empty {
    display: none;
}

/* Research outputs tabs ([reserch_outputs_tab_*]) */
.research-outputs-container {
    margin-top: 2.5rem;
}

.re-output-section-title {
    margin-bottom: 1.25rem;
    font-family: var(--font-serif);
    font-size: var(--fs-xl);
}

.re-output-content {
    position: relative;
    min-height: 200px;
}

/* Content Views grids ([pt_view]) — same treatment as CustomCIPIT */
.pt-cv-taxoterm.above_title,
.pt-cv-content {
    display: none !important;
}

.pt-cv-view.pt-cv-grid .pt-cv-title {
    min-height: 2.8em !important;
    margin: .6rem 0 .25rem !important;
    padding: 0 .25rem !important;
    font-size: var(--fs-sm) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    word-break: break-word;
}

.pt-cv-view.pt-cv-grid .pt-cv-title a {
    color: var(--c-ink) !important;
    text-decoration: none !important;
}

.pt-cv-view.pt-cv-grid .pt-cv-title a:hover {
    color: var(--c-brand) !important;
}

.pt-cv-ifield img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 640 / 830;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-line);
    transition: border-color .25s;
}

.research-articles .pt-cv-ifield img {
    aspect-ratio: 720 / 480;
}

.pt-cv-ifield img:hover {
    border-color: var(--c-brand);
}

/* [dashboard-grid] and the IP databases card */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
}

/* Old WPBakery content still in some posts */
.wpb_wrapper iframe,
.vc_tta-panel-body iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: var(--radius);
    background: #000;
}

/* Notices board ([cipit_notices]). The plugin prints its <style> after this file,
   so rules are prefixed with `body` to win on specificity. Cards follow .focus-card. */
body .latest-news-section {
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding: var(--section) var(--gutter) 0;
    text-align: center;
}

/* After the home intro, whose bottom padding already gives the gap (the plugin's
   <style> tag sits between them, hence ~ rather than +). */
body .intro ~ .latest-news-section {
    padding-top: 0;
}

body .latest-news-section > h2 {
    display: block;
    margin: 0 0 var(--space-2);
    padding: 0;
    border: 0;
    color: var(--c-ink);
    font-size: var(--fs-2xl);
}

body .latest-news-section .section-description {
    max-width: 58ch;
    margin: 0 auto var(--space-5);
    color: var(--c-muted);
    font-size: var(--fs-lead);
    line-height: var(--lh-body);
}

body .latest-news-section .news-list {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--space-4);
    max-width: none;
    text-align: left;
}

body .latest-news-section .news-card {
    position: relative;
    height: auto;
    padding: var(--space-4);
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    transition: border-color .25s;
}

body .latest-news-section .news-card:hover {
    border-color: var(--c-line-strong);
}

body .latest-news-section .news-header-row {
    margin-bottom: var(--space-3);
}

body .latest-news-section .news-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--c-brand-tint);
    color: var(--c-brand);
    font-size: 1.125rem;
    opacity: 1;
}

body .latest-news-section .news-category {
    padding: .2rem .65rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    background: var(--c-paper);
    color: var(--c-muted);
    font-size: var(--fs-xs);
    font-weight: 500;
}

body .latest-news-section .news-content {
    gap: var(--space-2);
}

body .latest-news-section .news-card h3 {
    color: var(--c-ink);
    font-size: var(--fs-lg);
    line-height: var(--lh-heading);
    transition: color .2s;
}

body .latest-news-section .news-card:hover h3 {
    color: var(--c-brand);
}

body .latest-news-section .news-card .notice-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--c-muted);
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    text-align: left;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* The button becomes a text link, and its hit area covers the whole card. */
body .latest-news-section .news-card .read-more {
    gap: .4rem;
    margin-top: var(--space-3);
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--c-brand);
    font-size: var(--fs-sm);
    font-weight: 600;
}

body .latest-news-section .news-card .read-more::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

body .latest-news-section .news-card .read-more::after {
    content: "\f061";
    font-family: "Font Awesome 6 Free";
    font-size: .8em;
    font-weight: 900;
    transition: transform .2s var(--ease);
}

body .latest-news-section .news-card .read-more:hover {
    background: none;
    color: var(--c-brand-dark);
}

body .latest-news-section .news-card:hover .read-more::after {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    body .latest-news-section .news-card {
        padding: var(--space-4) var(--space-3);
    }

    body .latest-news-section .news-card .read-more {
        width: auto;
        justify-content: flex-start;
    }
}

/* Showcase slider ([showcase]). The plugin prints its <style> after this file,
   so rules are prefixed with `body` to win. The title is an h3, which the base
   heading rule turns dark; on the dark banner it must stay white, and the text
   that sits over the photo needs a scrim to stay readable. */
body .showcase-container {
    font-family: var(--font-sans);
}

body .showcase-container .slide-media-area::after {
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--theme-bg) 92%, transparent) 0%,
        color-mix(in srgb, var(--theme-bg) 75%, transparent) 30%,
        color-mix(in srgb, var(--theme-bg) 20%, transparent) 50%,
        transparent 60%);
}

/* The orbit decoration sits behind the excerpt; keep it faint. */
body .showcase-container .slide-decoration {
    opacity: .35;
}

body .showcase-container .slide-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}

body .showcase-container .slide-tag {
    margin: 0;
    padding: .3rem .7rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    letter-spacing: .04em;
}

body .showcase-container .slide-title {
    margin: 0;
    color: var(--c-on-dark);
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    line-height: 1.15;
}

body .showcase-container .slide-action-group {
    gap: var(--space-4);
}

body .showcase-container .slide-excerpt {
    max-width: 52ch;
    margin: 0;
    color: color-mix(in srgb, var(--c-on-dark) 85%, transparent);
    font-size: var(--fs-md);
    line-height: var(--lh-body);
}

body .showcase-container .slide-btn {
    padding: .8rem 1.6rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 700;
}

body .showcase-container .slide-btn:hover {
    background: var(--c-brand-dark);
    color: var(--c-on-dark);
}

/* A single slide has nothing to page through. */
body .showcase-container .showcase-indicators:has(.dot:only-child),
body .showcase-slider-wrapper:has(.showcase-indicators .dot:only-child) .nav-arrow {
    display: none;
}

@media (max-width: 992px) {
    /* The photo fills the whole banner here, so darken all of it. */
    body .showcase-container .slide-media-area::after {
        background: linear-gradient(0deg,
            color-mix(in srgb, var(--theme-bg) 92%, transparent) 0%,
            color-mix(in srgb, var(--theme-bg) 70%, transparent) 100%);
    }

    body .showcase-container .slide-details {
        padding: var(--space-5);
    }
}

/* CIPIT plugins print their own styles. Keep their output flat and in sentence
   case like the rest of the site: no drop or glow shadows, no all-caps, no hover lifts.
   !important because several plugins mark their rules !important. */
:is(.showcase-container, .latest-news-section, .cipit-pub-container, .custom-accordion,
    .cipit-ro, .video-grid-layout, .cipit-modal-content, .dashboard-grid, .pt-cv-wrapper),
:is(.showcase-container, .latest-news-section, .cipit-pub-container, .custom-accordion,
    .cipit-ro, .video-grid-layout, .cipit-modal-content, .dashboard-grid, .pt-cv-wrapper) * {
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
}

:is(.showcase-container, .latest-news-section, .cipit-pub-container, .custom-accordion,
    .cipit-ro, .video-grid-layout, .dashboard-grid, .pt-cv-wrapper)
    :is(a, button, [class*="card"], [class*="btn"], [class*="item"]):hover {
    transform: none !important;
}

/* OneTap parks its closed panel at right: -580px. A fixed box past the right edge
   widens the layout viewport on phones and tablets (the page pans sideways / opens
   zoomed out), so keep the closed panel on screen but hidden; it fades in instead. */
nav.onetap-accessibility.onetap-plugin-onetap:not(.onetap-toggle-open) {
    right: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 13. Newsletter, footer, cookie notice, dialog =========================== */

.newsletter {
    background: var(--c-brand);
    color: var(--c-on-dark);
}

.newsletter__inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-5);
    align-items: center;
    justify-content: space-between;
    padding-block: clamp(2rem, 1.6rem + 1.5vw, 3rem);
}

.newsletter__text {
    flex: 1 1 22rem;
    max-width: 36rem;
}

.newsletter__form-wrap {
    flex: 0 1 28rem;
}

.newsletter h2 {
    margin: 0 0 .25rem;
    color: var(--c-on-dark);
    font-family: var(--font-serif);
    font-size: var(--fs-2xl);
}

.newsletter p {
    margin: 0;
    color: color-mix(in srgb, var(--c-on-dark) 85%, transparent);
}

.newsletter__form {
    display: flex;
    gap: .5rem;
}

.newsletter__form input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0 1.1rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--c-paper);
    color: var(--c-ink);
}

.newsletter__form input:focus-visible {
    outline: 2px solid var(--c-on-dark);
    outline-offset: 2px;
}

.newsletter__form .btn--primary {
    background: var(--c-ink);
    border-color: var(--c-ink);
}

.newsletter__form .btn--primary:hover {
    background: var(--c-contrast);
    border-color: var(--c-contrast);
}

.newsletter .notice {
    background: var(--c-paper);
}

@media (max-width: 480px) {
    .newsletter__form {
        flex-direction: column;
    }
}

.site-footer {
    background: var(--c-surface-dark);
    color: var(--c-on-dark-dim);
    font-size: var(--fs-md);
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--c-on-dark);
    text-decoration: underline;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.618fr 1fr 1fr 1fr;
    gap: var(--space-5);
    padding-block: clamp(3rem, 2rem + 3vw, 4.5rem);
}

.site-footer__logo {
    width: auto;
    max-width: 200px;
    max-height: 56px;
    margin-bottom: 1.25rem;
}

.site-footer__about p {
    max-width: 40ch;
}

.site-footer__heading {
    margin: 0 0 1rem;
    color: var(--c-on-dark);
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.site-footer__links {
    display: grid;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .social-links {
    gap: .4rem;
}

.site-footer .social-links a {
    width: 36px;
    color: var(--c-on-dark);
    height: 36px;
    font-size: .85rem;
    text-decoration: none;
}

.site-footer__bottom {
    padding-block: 1.25rem;
    border-top: 1px solid color-mix(in srgb, var(--c-on-dark) 10%, transparent);
    color: var(--c-on-dark-muted);
    font-size: var(--fs-xs);
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__bottom a {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}

.cookie-banner {
    position: fixed;
    right: 5.5rem; /* clear of the accessibility button */
    bottom: 1rem;
    left: 1rem;
    z-index: 300;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    max-width: 640px;
    padding: 1.1rem 1.25rem;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
}

.cookie-banner p {
    flex: 1 1 280px;
    margin: 0;
}

.cookie-banner__actions {
    display: flex;
    gap: .5rem;
}

@media (max-width: 640px) {
    .cookie-banner {
        right: .5rem;
        bottom: .5rem;
        left: .5rem;
        gap: .6rem;
        padding: .75rem .9rem;
        max-width: calc(100% - 4.75rem); /* leave the accessibility button clear */
        font-size: var(--fs-xs);
        line-height: 1.45;
    }

    .cookie-banner p {
        flex-basis: 100%;
    }

    .cookie-banner .btn--sm {
        min-height: 34px;
        padding: .35rem .85rem;
    }
}

.team-dialog {
    width: min(720px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    color: var(--c-body);
}

.team-dialog::backdrop {
    background: rgb(22 23 27 / .6);
    backdrop-filter: blur(3px);
}

.team-dialog[open] {
    animation: fade-up .25s var(--ease);
}

.team-dialog__close {
    position: absolute;
    top: .75rem;
    right: .75rem;
}

.team-dialog__head {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.team-dialog__photo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
}

.team-dialog__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

.team-dialog__photo .photo-placeholder {
    font-size: 2.25rem;
}

.team-dialog__name {
    margin: 0 0 .25rem;
    font-family: var(--font-serif);
    font-size: var(--fs-2xl);
}

.team-dialog__position {
    margin: 0 0 .75rem;
    color: var(--c-brand);
    font-weight: 500;
}

.team-dialog__links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-dialog__links a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    color: var(--c-ink);
    font-size: var(--fs-sm);
    text-decoration: none;
}

.team-dialog__links a:hover {
    border-color: var(--c-brand);
    color: var(--c-brand);
}

/* Team bios read like the articles: justified, hyphenated. */
.team-dialog__bio {
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

@media (max-width: 520px) {
    .team-dialog__head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Colour options =========================================================
   Appearance > Customize > Site Style (inc/appearance.php) adds a body class
   for each non-default choice. The rules above are the defaults (red navbar,
   dark page headers, charcoal); these put back the original look. */

/* Page header pattern: flowing line waves (assets/images/hero-waves.svg, used
   as a mask so the lines take --wave-line) or no pattern, instead of ruled paper.
   The waves also run behind the publication detail header. */
.page-hero--ruled,
.pub-hero {
    --wave-line: color-mix(in srgb, var(--c-on-dark) 28%, transparent);
}

.page-header-light .page-hero--ruled,
.page-header-light .pub-hero {
    --wave-line: color-mix(in srgb, var(--c-ink) 20%, transparent);
}

.page-hero-plain .page-hero--ruled::before {
    content: none;
}

@media (min-width: 720px) {
    .page-hero-waves .pub-hero {
        position: relative;
        overflow: hidden;
    }

    .page-hero-waves .page-hero--ruled .page-hero__inner,
    .page-hero-waves .pub-hero > .wrap {
        position: relative;
        z-index: 1;
    }

    .page-hero-waves .page-hero--ruled::before,
    .page-hero-waves .pub-hero::before {
        content: "";
        position: absolute;
        inset: 0 0 0 38%;
        opacity: 1;
        pointer-events: none;
        background: var(--wave-line);
        -webkit-mask: url("../images/hero-waves.svg") center / cover no-repeat, linear-gradient(to right, transparent, #000 35%);
        -webkit-mask-composite: source-in;
        mask: url("../images/hero-waves.svg") center / cover no-repeat, linear-gradient(to right, transparent, #000 35%);
        mask-composite: intersect;
    }
}

/* Top bar, footer and dark page headers: near-black instead of charcoal. */
.tone-black {
    --c-surface-dark: var(--c-night);
}

/* White navbar. */
.navbar-white .site-header {
    background: var(--c-paper);
    border-bottom-color: var(--c-line);
}

.navbar-white .site-header__actions .icon-btn {
    color: var(--c-ink);
}

.navbar-white .site-header__actions .icon-btn:hover {
    background: var(--c-soft);
}

.navbar-white .header-search__icon,
.navbar-white .header-search__close {
    color: var(--c-ink);
}

.navbar-white .header-search__close:hover {
    background: var(--c-soft);
}

.navbar-white .header-search__input {
    background: var(--c-soft);
    border-color: var(--c-line);
    color: var(--c-ink);
}

.navbar-white .header-search__input::placeholder {
    color: var(--c-muted);
}

.navbar-white .header-search__input:focus {
    background: var(--c-paper);
    border-color: var(--c-line-strong);
}

@media (min-width: 1080px) {
    .navbar-white .primary-nav .menu > li > a {
        color: var(--c-ink);
    }

    .navbar-white .primary-nav .menu > li > a:hover,
    .navbar-white .primary-nav .has-mega.is-open > a {
        background: var(--c-soft);
        color: var(--c-ink);
    }

    .navbar-white .primary-nav .menu > li.current-menu-item > a,
    .navbar-white .primary-nav .menu > li.current-menu-ancestor > a,
    .navbar-white .primary-nav .menu > li.is-current > a {
        background: transparent;
        color: var(--c-brand);
    }
}

/* Floating navbar: container width, rounded, with a gap around it. The bar
   colour moves from the full-width header onto the inner row, and the header
   takes no space: the page's opening slider or header runs up underneath it. */
.navbar-floating {
    --float-offset: calc(var(--header-h) + 1.25rem);  /* header padding + bar */
}

.navbar-floating .site-header {
    margin-bottom: calc(var(--float-offset) * -1);
    padding-block: .75rem .5rem;
    background: transparent;
    border-bottom: 0;
}

/* Pages that open without a slider or header band: keep content clear of the bar. */
.navbar-floating .site-main {
    padding-top: var(--float-offset);
}

/* Opening slider or header band: pull it up under the bar. */
.navbar-floating .site-main > :is(.hero-slider, .page-hero, .podcast-hero):first-child,
.navbar-floating .site-main > :first-child > :is(.page-hero, .pub-hero):first-child {
    margin-top: calc(var(--float-offset) * -1);
}

.navbar-floating .site-main > :is(.page-hero, .podcast-hero):first-child,
.navbar-floating .site-main > :first-child > .page-hero:first-child {
    padding-top: var(--float-offset);
}

.navbar-floating .site-main > :first-child > .pub-hero:first-child {
    padding-top: calc(var(--float-offset) + clamp(1.5rem, 1rem + 2vw, 2.5rem));
}

.navbar-floating .site-main > .hero-slider:first-child {
    min-height: calc(clamp(460px, 68vh, 640px) + var(--float-offset));
}

.navbar-floating .site-header__inner {
    width: calc(100% - var(--gutter) * 2);
    max-width: var(--container);
    padding-inline: clamp(.75rem, .5rem + 1vw, 1.25rem);
    background: var(--c-brand);
    border-radius: var(--radius);
}

.navbar-white.navbar-floating .site-header__inner {
    background: var(--c-paper);
    border: 1px solid var(--c-line);
}

/* Sticky sidebars: clear the floating bar, not just the header height. */
.navbar-floating :is(.pub-aside, .profile__aside) {
    top: calc(var(--float-offset) + 1.5rem);
}

html:has(.navbar-floating) {
    scroll-padding-top: calc(var(--header-h) + 36px);
}

/* Light page headers. */
.page-header-light .page-hero--ruled,
.page-header-light .pub-hero {
    background:
        radial-gradient(900px 300px at 100% 0%, color-mix(in srgb, var(--c-brand) 7%, transparent), transparent 70%),
        var(--c-soft);
    border-bottom-color: var(--c-line);
    color: inherit;
    --rule-margin: color-mix(in srgb, var(--c-brand) 22%, transparent);
    --rule-line: color-mix(in srgb, var(--c-ink) 7%, transparent);
}

.page-header-light .page-hero--ruled .page-hero__title,
.page-header-light .pub-hero__body .article-head__title {
    color: var(--c-ink);
}

.page-header-light .page-hero--ruled .page-hero__intro,
.page-header-light .page-hero--ruled .breadcrumb ol,
.page-header-light .pub-hero .breadcrumb ol,
.page-header-light .pub-hero .post-meta {
    color: var(--c-muted);
}

.page-header-light .page-hero--ruled .eyebrow,
.page-header-light .pub-hero .eyebrow {
    color: var(--c-brand);
}

.page-header-light .page-hero--ruled .breadcrumb a:hover,
.page-header-light .pub-hero .breadcrumb a:hover {
    color: var(--c-brand);
}

.page-header-light .page-hero--ruled .breadcrumb [aria-current],
.page-header-light .pub-hero .breadcrumb [aria-current] {
    color: var(--c-ink);
}

.page-header-light .pub-hero__cover {
    border-color: var(--c-line-strong);
}

.page-header-light .pub-hero__actions .btn--ghost {
    background: var(--c-paper);
    border-color: var(--c-line);
    color: var(--c-ink);
}

.page-header-light .pub-hero__actions .btn--ghost:hover {
    border-color: var(--c-ink);
}

.page-header-light .page-hero--ruled .search-bar {
    background: var(--c-paper);
    border-color: var(--c-line);
}

.page-header-light .page-hero--ruled .search-bar:focus-within {
    border-color: var(--c-ink);
}

.page-header-light .page-hero--ruled .search-bar__icon {
    color: var(--c-muted);
}

.page-header-light .page-hero--ruled .search-bar input[type="search"] {
    color: inherit;
}

.page-header-light .page-hero--ruled .search-bar input[type="search"]::placeholder {
    color: var(--c-muted);
}

/* 14. Motion & print ======================================================= */

/* One easing and a short scale of durations keep every movement in step:
   hover .3s, small UI .25s, entrances .7s. Distances stay under 16px. */
:root {
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --dur-hover: .3s;
    --dur-enter: .7s;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    /* Page-to-page: a short cross-fade (Chromium, Safari 18+); others load as normal.
       The header keeps its own name so it stays put while the page beneath fades. */
    @view-transition {
        navigation: auto;
    }

    .site-header {
        view-transition-name: site-header;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: .28s;
        animation-timing-function: var(--ease);
    }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Page headers settle in on load, line by line. */
.page-hero .breadcrumb,
.page-hero .eyebrow,
.page-hero__title,
.page-hero__intro,
.page-hero__search,
.page-hero__media {
    animation: rise var(--dur-enter) var(--ease-out) both;
}

.page-hero .eyebrow { animation-delay: .05s; }
.page-hero__title { animation-delay: .1s; }
.page-hero__intro { animation-delay: .18s; }
.page-hero__search { animation-delay: .26s; }
.page-hero__media { animation-delay: .12s; }

/* Hero slider: the active slide's text follows its image in. */
.hero-slide__content > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.hero-slide.is-active .hero-slide__content > * {
    opacity: 1;
    transform: none;
    transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
}

.hero-slide.is-active .hero-slide__title { transition-delay: .25s; }
.hero-slide.is-active .hero-slide__text { transition-delay: .35s; }
.hero-slide.is-active .hero-slide__content > .btn {
    transition:
        opacity .8s var(--ease-out) .45s,
        transform .9s var(--ease-out) .45s,
        background-color .2s, border-color .2s, color .2s;
}

/* Cards lift slightly on hover, together with the hairline change they already have. */
.blog-card,
.team-card,
.focus-card,
.book-cover {
    transition: border-color var(--dur-hover), transform var(--dur-hover) var(--ease-out);
}

body .latest-news-section .news-card {
    transition: border-color var(--dur-hover), transform var(--dur-hover) var(--ease-out);
}

.blog-card:hover,
.ev-card:hover,
.team-card:hover,
a.focus-card:hover,
.book-card:hover .book-cover,
body .latest-news-section .news-card:hover {
    transform: translateY(-3px);
}

.team-card:hover {
    border-color: var(--c-line-strong);
}

.blog-card:active,
.ev-card:active,
.team-card:active,
a.focus-card:active {
    transform: translateY(-1px);
    transition-duration: .1s;
}

/* Title links pick up the brand colour smoothly instead of snapping. */
.blog-card-content h3 a,
.book-card__title a,
.focus-card h3,
.focus-card h4,
.ev-card__title,
.ev-card__title a,
.team-card-content h3 {
    transition: color .2s;
}

.btn:hover i.fa-arrow-right,
.read-more-btn:hover i.fa-arrow-right {
    transform: translateX(3px);
}

.btn i.fa-arrow-right,
.read-more-btn i.fa-arrow-right {
    transition: transform .2s var(--ease);
}

/* Focus rings ease in rather than blink. */
:focus-visible {
    transition: outline-offset .15s var(--ease);
}

/* Scroll reveal. theme.js adds .reveal only to content that starts below the fold,
   so nothing already on screen flickers and pages without JS show everything. The
   !important beats component transitions for the few hundred ms it is present. */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal,
.reveal.is-revealed {
    transition:
        opacity var(--dur-enter) var(--ease-out) var(--reveal-delay, 0s),
        transform var(--dur-enter) var(--ease-out) var(--reveal-delay, 0s) !important;
}

.reveal.is-revealed {
    opacity: 1;
    transform: none;
}

/* Overlays */
.team-dialog[open]::backdrop {
    animation: fade-in .25s var(--ease);
}

.team-dialog[open] {
    animation: rise .35s var(--ease-out);
}

.nav-backdrop:not([hidden]) {
    animation: fade-in .3s var(--ease);
}

.cookie-banner:not([hidden]) {
    animation: rise .6s var(--ease-out) .8s both;
}

.ev-dropdown[open] .ev-dropdown__menu {
    animation: rise .2s var(--ease-out);
}

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

@media print {
    .topbar,
    .site-header,
    .newsletter,
    .site-footer,
    .cookie-banner,
    .share,
    .related,
    .page-hero__search,
    .pub-hero__actions,
    .pub-reader {
        display: none !important;
    }

    .prose {
        font-size: 11pt;
    }

    /* Keep the dark header background so its white text still prints. */
    .page-hero--ruled,
    .pub-hero {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Phones: filter chip bars (topic/search filters, not content tabs) scroll sideways
   instead of stacking several rows above the results. */
@media (max-width: 640px) {
    nav.blog-tags {
        position: relative;
        flex-wrap: nowrap;
        margin-inline: calc(var(--gutter) * -1);
        padding: 0 2rem 2px var(--gutter);
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
        mask-image: linear-gradient(90deg, #000 85%, transparent);
    }

    nav.blog-tags::-webkit-scrollbar {
        display: none;
    }

    nav.blog-tags > * {
        flex-shrink: 0;
    }
}
