/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}
* {
    transition: background-color var(--transition-base),
                color var(--transition-base),
                border-color var(--transition-base),
                transform var(--transition-fast);
}



html {
    height: 100%;
    font-size: calc(16px * var(--font-size-multiplier));
    scroll-behavior: smooth;
}

@media (max-width: 1000px) {
    html { font-size: calc(15px * var(--font-size-multiplier)); }
}
@media (max-width: 800px) {
    html { font-size: calc(14.5px * var(--font-size-multiplier)); }
}
@media (max-width: 600px) {
    html { font-size: calc(14px * var(--font-size-multiplier)); }
}

body {
    background-color: var(--background-body);
    color: var(--text-main);
    line-height: var(--leading-relaxed);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



/* Typography */
body, * {
    font-family: "MainFont", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-optical-sizing: auto;
}

strong, b {
    font-family: "MainFontBold", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-optical-sizing: auto;
    font-weight: var(--font-bold);
    color: var(--text-main);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "TitleFont", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-optical-sizing: auto;
    color: var(--text-main);
    line-height: var(--leading-tight);
    margin-top: 0;
    font-weight: normal;
    letter-spacing: var(--tracking-normal);
}

h1 {
    font-size: var(--font-5xl);
    margin-bottom: 0;/*var(--space-xl);*/
    line-height: var(--leading-tight);
}

h2 {
    font-size: var(--font-3xl);
    margin-bottom: 0; /*var(--space-lg);*/
    margin-top: 0;/* var(--space-3xl);*/
}

h3 {
    font-size: var(--font-2xl);
    margin-bottom: var(--space-md);
    margin-top: var(--space-2xl);
}

h4 {
    font-size: var(--font-xl);
    margin-bottom: var(--space-md);
    margin-top: var(--space-xl);
}

h5 {
    font-size: var(--font-lg);
    margin-bottom: var(--space-sm);
    margin-top: var(--space-lg);
}

h6 {
    font-size: var(--font-base);
    margin-bottom: var(--space-sm);
    margin-top: var(--space-lg);
}

p {
    margin-top:0;
    margin-bottom: var(--space-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

p:last-child {
    margin-bottom: 0;
    margin-top: 0;
}

a {
    color: var(--links);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--links-hover);
}

/* Body copy links (rich-text widget content) share the surrounding
   body-copy colour so they read as part of the prose, but stay
   underlined to remain identifiable as links. */
p a,
p a:hover {
    color: inherit;
    text-decoration: underline;
}

/* Pipe characters in CMS text (headers, buttons, wayfinders, captions,
   splash text) act as line breaks. They are emitted as this span (see
   yocto_pipe_breaks in /templates/components/_process_component.php).
   On desktop the ::after newline makes the span behave exactly like the
   <br> it replaces - including a blank line for doubled trailing pipes.
   On mobile the newline is dropped, leaving only the single space the
   span contains - EXCEPT for trailing pipes (.pipe-break-end), which keep
   their newline so text that ends in pipes still breaks onto new lines. */
.pipe-break::after {
    content: "\A";
    white-space: pre;
    /* Inherited letter-spacing would be applied to the newline character
       itself, nudging the line height by a pixel or two vs a real <br>. */
    letter-spacing: normal;
}

@media (max-width: 768px) {
    .pipe-break::after {
        content: " ";
        white-space: normal;
    }
    /* Trailing pipes stay as line breaks on mobile. This rule comes after
       the one above so it wins (matching specificity, later source). */
    .pipe-break-end::after {
        content: "\A";
        white-space: pre;
    }
}

ul, ol{
    padding-left: 2em;
}
li{
    margin-bottom: 0.5em;
}

/* Masthead */





/* Full-width <main> so its opaque background covers any preceding
   image-splash (which is z-index: 0, position: relative with a sticky
   image inside) as the user scrolls.  Inner content is constrained to
   --max-width-xl via the .main-inner wrapper inside <main>. */
body > main {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    background-color: var(--background-body);
    overflow: hidden;
}

body > main > .main-inner {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    box-sizing: border-box;
}

@media (max-width: 1240px) {
    body > main > .main-inner {
        padding: 0 var(--space-lg);
    }
}

@media (max-width: 768px) {
    body > main > .main-inner {
        padding: 0 var(--space-md);
    }
}



/* ========================================
   FOOTER
   ======================================== */

/* Footer module (per-site drag-and-drop footer, wrapped in #siteFooter
   by body.php). Links match the surrounding footer text rather than the
   global link colour, and only reveal an underline on hover. The id
   selector keeps these rules ahead of the body-copy "p a" underline. */
#siteFooter a:not(.button) {
    color: inherit;
    text-decoration: none;
}

#siteFooter a:not(.button):hover {
    color: inherit;
    text-decoration: underline;
}

body > #footerWrapper {
    background-color: var(--background-muted);
    border-top: 3px solid var(--primary);
    margin-top: var(--space-4xl);
}

body > #footerWrapper > footer {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    position: relative;
    z-index: var(--z-base);
    text-align: center;
    font-size: var(--font-sm);
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
    color: var(--text-secondary);
}

body > #footerWrapper > footer h2 {
    font-size: var(--font-lg);
    margin-bottom: var(--space-md);
    margin-top: 0;
}


body > #footerWrapper > footer img {
    width: 32px;
    height: 32px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

body > #footerWrapper > footer img{
filter: brightness(0) saturate(100%);
width:32px;
opacity:0.9;
}


body > #footerWrapper > footer img:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

body > #footerWrapper > footer ul {
    list-style: none;
    padding: 0;
    margin: var(--space-sm) 0;
}

body > #footerWrapper > footer ul li {
    margin-bottom: var(--space-xs);
}




@media (max-width: 1204px) {
body > main > .main-inner{
	padding: 0 1rem;

}
}


#adminBar {
	font-size:0.8rem;
    height: 1.5rem;
    line-height: 1.4rem;
    width: calc(100% - 20px);
    padding: 0 10px;
    z-index: 99999;
	background: linear-gradient(to bottom, #446, #003);
    color:white;
    border-bottom: 1px solid #000;
    display: flex;
    justify-content: space-between;
}

#adminBar .admin-left {
    display: flex;
    gap: 15px;
}

#adminBar .admin-right {
    display: flex;
    gap: 15px;
}

#adminBar a {
    text-decoration: none;
    color: white;
}

#adminBar a:hover {
    text-decoration: underline;
}



/* CSS */
nav #marketingButtons{
	position: absolute;
  bottom:-4rem;
  padding:0rem 2rem 0rem 0;
  height:4rem;
  width:calc(100% - 2rem);
  text-align:right;
  x-background: linear-gradient(to bottom,  rgba(200,150,150,0.5) 0%,rgba(0,0,0,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
}

nav #marketingButtons>a {
  align-items: center;
  appearance: none;
  background-color: var(--primary);
  color:#fff;
  border: 0;
  border-radius: 0.5rem;
  display: inline-flex;
  height: 3rem;
  line-height: 1;
  text-align: left;
  text-decoration: none;
  transition: box-shadow .15s,transform .15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  will-change: box-shadow,transform;
  font-size: 3rem;
  font-weight: bold;

  --c: #fff;
  border: none;
  transform: perspective(500px) rotateY(calc(15deg*var(--_i,0)));
  outline-offset: .1em;
  transition: 0.3s;
    font-weight: bold;
  font-size: 1.5rem;
  margin: 1rem 0 0 1rem;
  cursor: pointer;
  padding: .1em 1em;
}

nav #marketingButtons>a:hover,
nav #marketingButtons>a:focus-visible {
  --_p: 0%;
  --_i: 1;
}

nav #marketingButtons>a:active {
  text-shadow: none;
  color: var(--c);
  box-shadow: inset 0 0 9e9q #0005;
  transition: 0s;
}

nav #marketingButtons #socials{
  display:inline-block;
}

nav #marketingButtons #socials a{
  display: inline-block;
  border:2px solid var(--primary);
  border-radius:50%;
  background-color:#fff;
  width:calc(2.5rem);
  height:calc(2.5rem);
  overflow:hidden;
  top:0.75rem;
  position:relative;
}
nav #marketingButtons #socials a img{
  width:2rem;
  margin:0.25rem 0.25rem 0 0;
}


#breadcrumbs {
    font-size: var(--font-sm);
    color: var(--text-muted);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color-light);
}

#breadcrumbs a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

#breadcrumbs a:hover {
    color: var(--primary);
}

/* ============================================================
   PAGE FRAME
   ------------------------------------------------------------
   Caps the whole site at a maximum width and centres it, with
   the area to either side shown in --page-frame-gutter (white).

   Controlled by the `page-framed` class on <html>, which is set
   by the $pageFrame toggle in /templates/head.php. To turn the
   frame off, set $pageFrame = false there. To change the width
   or gutter colour, edit the two custom properties below.
   ============================================================ */
html.page-framed {
    --page-frame-max: 1920px;
    --page-frame-gutter: #fff;
    background: var(--page-frame-gutter);
}

html.page-framed body {
    max-width: var(--page-frame-max);
    margin-left: auto;
    margin-right: auto;
}

/* The fixed header and pinned image-splash are positioned against the
   viewport, so on screens wider than the frame they would spill into the
   gutters. Pull them back in line with the centred page. (The sub-menu bar
   is a normal-flow child of the centred <body>, so it already lines up.) */
@media (min-width: 1920px) {
    html.page-framed body > header {
        left: calc((100% - var(--page-frame-max)) / 2);
    }

    /* Centre via auto margins, NOT transform: the global `* { transition:
       transform }` rule would otherwise animate the translate when the
       image pins, producing a sideways "flick". */
    html.page-framed .image-splash-pinned .image-splash-imagewrapper {
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        max-width: var(--page-frame-max);
    }
}
/* ========================================
   HEADER + HAMBURGER MENU
   ======================================== */
body > header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-sticky);
    background: transparent;
    pointer-events: none;
}

body > header > * {
    pointer-events: auto;
}

body > header #menu-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

body > header .menu-open {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 3.25rem;
    cursor: pointer;
    font-size: 1.7rem;
    line-height: 1;
    color: #fff;
    user-select: none;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    transition: color var(--transition-base), text-shadow var(--transition-base);
}

body > header .menu-open .hamburger-icon {
    font-size: 2.6rem;
    line-height: 1;
    font-weight:bold;
    margin-right:0.2em;
}

body > header .menu-open:hover {
    opacity: 0.85;
}

/* Fade the "Menu" word out once the page is scrolled past 30px (class
   toggled by the inline scroll handler in head.php). It fades back in
   when the user scrolls back to the top. */
body > header .menu-word {
    transition: opacity var(--transition-base);
}

body > header.menu-word-hidden .menu-word {
    opacity: 0;
    pointer-events: none;
}

/* On mobile, never show the "Menu" word - the hamburger icon stands
   alone, even when the page is scrolled fully to the top. The icon is
   also pulled in and shrunk: at the desktop padding (2rem 3.25rem) plus
   the 51px SVG it reached ~150px into the viewport and sat on top of
   the centred "Cheshire Residential Homes Trust" band text. */
@media (max-width: 768px) {
    body > header .menu-word {
        display: none;
    }

    body > header .menu-open {
        padding: 1rem 1.25rem;
    }

    /* The SVG carries width/height attributes (51x42); override here. */
    body > header .menu-open .hamburger-icon svg {
        width: 38px;
        height: auto;
    }
}

/* When the JS detects the header is no longer over an image (or the
   page has no image-splash at all) flip the colour to the body text
   colour so it stays legible against the page background. */
body > header.header-over-content .menu-open, body > header.header-over-content #burger-svg rect{
    fill: var(--text-main);
    color: var(--text-main);
    text-shadow: none;
}



/* ========================================
   MENU OVERLAY (slides in from the left)
   ======================================== */
body > header .menu-overlay {
    position: fixed;
    /* Use inset rather than width: 100vw / height: 100vh — 100vw
       includes the vertical scrollbar so it overflows the visible
       viewport by a few pixels and triggers a horizontal scrollbar. */
    inset: 0;
    background: var(--background-body);
    transform: translateX(-100%);
    visibility: hidden;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    will-change: transform;
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* The items block centres itself with auto margins (see
       .menu-overlay-items) rather than justify-content:center. When the
       list is taller than the viewport — e.g. a short laptop screen —
       justify-content:center would push the first/last items off-screen
       with no way to reach them. Auto margins collapse under overflow, so
       the overlay can scroll instead of clipping. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Closing: ease-in-expo so the panel exits with conviction. */
    transition: transform 600ms cubic-bezier(0.7, 0, 0.84, 0),
                backdrop-filter 500ms ease,
                -webkit-backdrop-filter 500ms ease,
                box-shadow 600ms ease,
                visibility 0s linear 600ms;
}

body > header #menu-toggle:checked ~ .menu-overlay {
    transform: translateX(0);
    visibility: visible;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 24px 0 80px rgba(0, 0, 0, 0.35);
    /* Opening: long, silky ease-out-expo for a luxurious settle. */
    transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
                backdrop-filter 700ms ease,
                -webkit-backdrop-filter 700ms ease,
                box-shadow 900ms ease,
                visibility 0s linear 0s;
}

body > header .menu-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    color: var(--text-main);
    user-select: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

body > header .menu-close:hover {
    opacity: 0.7;
    transform: rotate(90deg);
}

/* Header image at the top of the overlay, centred, with a full-width
   1px primary-coloured rule beneath it. flex-shrink:0 keeps it at its
   natural height; the image itself is capped relative to the viewport
   height so the nav items below always fit without scrolling. */
body > header .menu-overlay-header {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
    padding-bottom:1em;
    border-bottom: 1px solid var(--primary);
}

body > header .menu-overlay-image {
    display: inline-block;
    max-width: 100%;
    height: auto;
    max-height: clamp(60px, 14vh, 140px);
    object-fit: contain;
    vertical-align: bottom;
}

body > header .menu-overlay-items {
    list-style: none;
    /* Auto vertical margins centre the list when there's room, and
       collapse to 0 when the list is taller than the overlay so every
       item stays scrollable. The header image now provides the top
       spacing (and clears the close button), so the vertical padding is
       kept compact and viewport-scaled to help every item fit without
       scrolling. */
    margin: auto 0;
    padding-block: clamp(1rem, 3vh, 2rem);
    padding-top:1em;
    padding-inline: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Compact the spacing only when the viewport is short: scales with
       height but never larger than the original 1.25rem. */
    gap: clamp(0.4rem, 1.8vh, 0.9rem);
}

/* Stagger the menu items in once the overlay is open. */
body > header .menu-overlay-items li {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
    transition: opacity 700ms cubic-bezier(0.19, 1, 0.22, 1),
                transform 700ms cubic-bezier(0.19, 1, 0.22, 1),
                filter 700ms ease;
}

body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(1) { transition-delay: 200ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(2) { transition-delay: 250ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(3) { transition-delay: 300ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(4) { transition-delay: 350ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(5) { transition-delay: 400ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(6) { transition-delay: 450ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(7) { transition-delay: 500ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(8) { transition-delay: 550ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(9) { transition-delay: 600ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(10) { transition-delay: 650ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(11) { transition-delay: 700ms; }
body > header #menu-toggle:checked ~ .menu-overlay .menu-overlay-items li:nth-child(12) { transition-delay: 750ms; }

body > header .menu-overlay-items a {
    display: inline-block;
    position: relative;
    font-family: "TitleFont", -apple-system, system-ui, sans-serif;
    /* Shrinks on short viewports (laptops) but stays at the original 2em
       on taller screens. */
    font-size: clamp(1.4rem, 3.8vh, 2em);
    color: var(--text-main);
    text-decoration: none;
    padding: 0.2rem 2rem;
    letter-spacing: 0.05em;

}

body > header .menu-overlay-items a:hover{
    background-color: var(--primary-dark);
}


/* ========================================
   BUTTONS
   ======================================== */
.button {
    background-color: #000;
    color: var(--button-text);
    font-weight: var(--font-bold);
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-xl);
    margin-top: 0;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    font-size: var(--font-base);
    line-height: var(--leading-tight);
    white-space:nowrap;
}

.button:hover {
    background-color: var(--primary-high);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--button-text);
}

.button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.button-small {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-sm);
}

.button-medium {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-base);
}

.button-large {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-lg);
}

/* Button wrapper and alignment classes */
.button-wrapper {
    margin: 1rem 0;
}

.button-align-left {
    text-align: left;
}

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

.button-align-right {
    text-align: right;
}

/* Text widget: optional "Force all content to be center aligned on mobile"
   toggle. On narrow viewports this centres the text block and every element
   nested inside it, overriding any per-element alignment set in the editor
   (which lands as inline text-align styles, hence !important). */
@media (max-width: 768px) {
    .text-center-mobile,
    .text-center-mobile * {
        text-align: center !important;
    }
}




/* ========================================
   WAYFINDER
   ======================================== */
.wayfinder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0;
    background-color: var(--background-body);
    border-radius: var(--radius-lg);
}

.wayfinder-text {
    flex: 1 1 auto;
    color: var(--text-main);
    font-size: var(--font-base);
    line-height: var(--leading-snug);
}

/* The standalone "Button" element (always wrapped in .button-wrapper)
   is styled identically to the wayfinder button: black, fixed minimum
   width, white right-aligned arrow, with the same hover and dark-mode
   treatment. */
.wayfinder-button.button,
.button-wrapper .button {
    flex: 0 0 auto;
    margin: 0;
    /* 98px content + horizontal padding (~2rem each side) ≈ 160px total. */
    min-width: 98px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    text-align: left;
    background-color: #000;
    color: #fff;
    padding:0.8em 1.2em;
    border-radius: 5px;
    /* Transparent border so toggling the inverted variant (which adds a
       1px solid border) does not shift the layout. */
    border: 1px solid transparent;
}

/* White arrow, pushed to the right edge of the button. Drawn with a
   masked SVG so it follows `color` (and therefore inverts in dark mode). */
.wayfinder-button.button::after,
.button-wrapper .button::after {
    content: "";
    flex: 0 0 auto;
    margin-left: auto;
    width: 1.25em;
    height: 1.25em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15'/%3E%3Cpath d='M13 5l7 7-7 7'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15'/%3E%3Cpath d='M13 5l7 7-7 7'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Hide the arrow when the editor unchecks "Include arrow". The gap
   between the (now absent) arrow and the label is also dropped so the
   label centres within its min-width box. */
.wayfinder-button.button.button-no-arrow,
.button-wrapper .button.button-no-arrow {
    gap: 0;
}
.wayfinder-button.button.button-no-arrow::after,
.button-wrapper .button.button-no-arrow::after {
    display: none;
}

.wayfinder-button.button:hover,
.wayfinder-button.button:focus,
.button-wrapper .button:hover,
.button-wrapper .button:focus {
    background-color: #2b2b2b;
    color: #fff;
}

/* Inverted variant: white background, black text, 1px black border.
   Mirrors the normal variant so a button group with one of each reads
   as a primary / secondary pair. */
.wayfinder-button.button.button-inverted,
.button-wrapper .button.button-inverted {
    background-color: #fff;
    color: #000;
    border-color: #000;
}

.wayfinder-button.button.button-inverted:hover,
.wayfinder-button.button.button-inverted:focus,
.button-wrapper .button.button-inverted:hover,
.button-wrapper .button.button-inverted:focus {
    background-color: #ececec;
    color: #000;
}

/* Dark mode (accessibility widget): invert so the button stays legible
   against the near-black page background. */
html.dark-mode .wayfinder-button.button,
html.dark-mode .button-wrapper .button {
    background-color: #fff;
    color: #000;
}

html.dark-mode .wayfinder-button.button:hover,
html.dark-mode .wayfinder-button.button:focus,
html.dark-mode .button-wrapper .button:hover,
html.dark-mode .button-wrapper .button:focus {
    background-color: #d9d9d9;
    color: #000;
}

/* Dark-mode inverted: mirror again so the inverted button remains the
   "other one" against the dark page - black fill with a white border. */
html.dark-mode .wayfinder-button.button.button-inverted,
html.dark-mode .button-wrapper .button.button-inverted {
    background-color: #000;
    color: #fff;
    border-color: #fff;
}

html.dark-mode .wayfinder-button.button.button-inverted:hover,
html.dark-mode .wayfinder-button.button.button-inverted:focus,
html.dark-mode .button-wrapper .button.button-inverted:hover,
html.dark-mode .button-wrapper .button.button-inverted:focus {
    background-color: #2b2b2b;
    color: #fff;
}

/* Stacked wayfinder (small screens): centre the text and the button
   rather than leaving the text left-aligned with the button pushed to
   the right edge. */
@media (max-width: 600px) {
    .wayfinder {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
        text-align: center;
    }
    .wayfinder-button.button {
        align-self: center;
    }
}

/* Mobile: centre the label inside arrow-less buttons. They share the
   arrow variant's min-width, so short labels otherwise sit against the
   left edge of the button (e.g. the "Get in touch" button). */
@media (max-width: 768px) {
    .wayfinder-button.button.button-no-arrow,
    .button-wrapper .button.button-no-arrow {
        justify-content: center;
    }
}


/* Header alignment classes */
.header-align-left {
    text-align: left;
}

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

.header-align-right {
    text-align: right;
}


/* ========================================
   FORMS
   ======================================== */
form {
    max-width: 600px;
    margin: var(--space-xl) 0;
}

form label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-main);
    font-weight: var(--font-semibold);
    font-size: var(--font-sm);
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form select,
form textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    margin-bottom: var(--space-lg);
    box-sizing: border-box;
    transition: all var(--transition-fast);
    background-color: var(--background-body);
    color: var(--text-main);
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="tel"]:focus,
form input[type="password"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-50);
}

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

form input[type="submit"] {
    background-color: var(--primary);
    /* Dark text, not --button-text (white): the themes' pale pastel
       primaries left white text unreadable on the login / password-reset
       submit buttons. Follows --text-main so dark mode stays correct. */
    color: var(--text-main);
    border: none;
    padding: var(--space-md) var(--space-2xl);
    border-radius: var(--radius-lg);
    font-size: var(--font-base);
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

form input[type="submit"]:hover {
    background-color: var(--primary-high);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

form input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* ========================================
   IMAGES
   ======================================== */
img.img {
    max-width: 100%;
    position: relative;
    height: auto;
    display: block;
}

.trbl_round {
    border-radius: 0 var(--radius-2xl);
}

.tlbr_round {
    border-radius: var(--radius-2xl) 0;
}

img.maxwidth {
    max-width: var(--max-width-xl);
}

figure {
    position: relative;
    xmargin: 0 0 var(--space-xl) 0;
}

figure img {
    width: 100%;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base);
}

figure:hover img {
    xtransform: scale(1.01);
}

figure::before {
    content: "";
    line-height: 0;
    position: absolute;
    top: -6px;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-2xl);
    z-index: -1;
    transition: all var(--transition-base);
}

figure:hover::before {
}

/* ========================================
   CUSTOM RADIO & CHECKBOX (Toaster)
   ======================================== */
.toaster input[type="checkbox"],
.toaster input[type="radio"] {
    opacity: 0;
    position: absolute;
    left: -50px;
    pointer-events: none;
}

.toaster label {
    background-color: var(--accent);
    color: var(--button-text);
    padding: var(--space-sm) var(--space-xl);
    line-height: 2.5rem;
    display: inline-block;
    border-radius: var(--radius-full);
    font-size: var(--font-lg);
    margin-right: var(--space-sm);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.toaster label:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.toaster input[type="checkbox"]:checked + label,
.toaster input[type="radio"]:checked + label {
    font-weight: var(--font-bold);
    background-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.subToaster label {
    margin: 0 var(--space-lg) var(--space-xl) var(--space-md);
    font-size: var(--font-lg);
    line-height: var(--leading-relaxed);
    display: inline-block;
    vertical-align: baseline;
}

.subToaster input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 2rem;
    height: 2rem;
    position: relative;
    top: 0.5rem;
    border-radius: var(--radius-full);
    background: var(--background-body);
    border: 4px solid var(--background-body);
    box-shadow: 0 0 0 2px var(--primary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.subToaster input[type="radio"]:checked {
    background: var(--primary);
}

.subToaster input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    position: relative;
    top: 0.25rem;
    background: var(--background-body);
    border: 4px solid var(--background-body);
    box-shadow: 0 0 0 2px var(--primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.subToaster input[type="checkbox"]:checked {
    background: var(--primary);
}

/* ========================================
   VIDEO EMBEDS
   ======================================== */
.vimeoContainerContainer,
.youtubeContainerContainer {
    max-width: 800px;
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.vimeoContainer,
.youtubeContainer {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    height: auto;
}

.vimeoContainer iframe,
.youtubeContainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   SLIDESHOW (film strip + lightbox)
   ======================================== */
:root {
    --filmstrip-gap: var(--space-sm);
}

.filmstrip {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    width: 100%;
    position: relative;
}

.filmstrip-track {
    display: flex;
    gap: var(--filmstrip-gap);
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-sm);
    /* Slim, branded scrollbar (the "progress strip" under the images). */
    scrollbar-color: var(--primary) var(--background-muted);
    scrollbar-width: thin;
}

.filmstrip-track::-webkit-scrollbar {
    height: 6px;
}

.filmstrip-track::-webkit-scrollbar-track {
    background: var(--background-muted);
    border-radius: var(--radius-full);
}

.filmstrip-track::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Exactly 3 thumbnails across the visible area; the rest scroll. */
.filmstrip-item {
    flex: 0 0 calc((100% - 2 * var(--filmstrip-gap)) / 3);
    max-width: calc((100% - 2 * var(--filmstrip-gap)) / 3);
    scroll-snap-align: start;
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.filmstrip-item:hover,
.filmstrip-item:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Crop every thumbnail to the same size regardless of source ratio. */
.filmstrip-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.filmstrip-nav {
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: var(--font-xl);
    line-height: 1;
    padding: var(--space-sm) var(--space-xs);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition-base);
}

.filmstrip-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

@media screen and (max-width: 600px) {
    /* Two across on small screens so thumbnails stay tappable. */
    .filmstrip-item {
        flex-basis: calc((100% - var(--filmstrip-gap)) / 2);
        max-width: calc((100% - var(--filmstrip-gap)) / 2);
    }
}

/* ---- Lightbox ---- */
body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.lightbox.open {
    display: flex;
}

.lightbox-figure {
    margin: 0;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2xl);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
}

.lightbox-close {
    top: var(--space-lg);
    right: var(--space-lg);
    font-size: var(--font-3xl);
    line-height: 1;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-3xl);
    padding: var(--space-md);
    border-radius: var(--radius-md);
}

.lightbox-prev { left: var(--space-lg); }
.lightbox-next { right: var(--space-lg); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ========================================
   COUNTER
   ======================================== */
.counter {
    display: inline-block;
    border: 3px solid var(--primary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    text-align: center;
    line-height: 36px;
    position: relative;
    top: -2px;
    margin-right: var(--space-md);
    font-size: var(--font-xl);
    font-weight: var(--font-bold);
    color: var(--primary);
}

/* ========================================
   WRAPPER COMPONENT
   ======================================== */
.content-wrapper {
    padding: var(--space-xl);
    margin: var(--space-lg) 0;
    border-radius: var(--radius-lg);
    position: relative;
    clear: both;
}

.content-wrapper:not([style*="background-color"]) {
    border: 1px dashed var(--border-color);
}

/* ========================================
   IMAGE SPLASH COMPONENT
   ======================================== */
.image-splash {
    position: relative;
    width: 100%;
    /* One viewport tall.  The image wrapper inside starts position:
       absolute (anchored at splash top) so it scrolls naturally as
       part of the body, and is swapped to position: fixed (top: 0)
       by JS once the splash has reached the top of the viewport — at
       which point it stays pinned forever (position: sticky would
       release when the splash container scrolled past, which we
       don't want).  The next <main> sibling is full-width with an
       opaque background and rises up over the pinned image. */
    height: 100vh;
    z-index: 0;
}

/* Height options (desktop only). "Full" is the default 100vh defined
   above; "Two thirds" and "Half" shrink how much of the viewport the
   splash (container, pinned image and overlay) takes up. Scoped to
   desktop so mobile — which lays the splash out in normal flow below —
   is always full regardless of the chosen option. */
@media (min-width: 769px) {
    .image-splash-height-twothirds,
    .image-splash-height-twothirds .image-splash-imagewrapper,
    .image-splash-height-twothirds.image-splash-pinned .image-splash-imagewrapper,
    .image-splash-height-twothirds .image-splash-text-block-overlay {
        height: 66.66vh;
    }

    .image-splash-height-half,
    .image-splash-height-half .image-splash-imagewrapper,
    .image-splash-height-half.image-splash-pinned .image-splash-imagewrapper,
    .image-splash-height-half .image-splash-text-block-overlay {
        height: 50vh;
    }
}

/* Imagewrapper starts absolute inside the splash, so it scrolls with
   the body until it reaches the top of the viewport.  JS then adds
   .image-splash-pinned to the parent .image-splash, which swaps the
   imagewrapper to position: fixed so it stays pinned at top: 0. */
.image-splash-imagewrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    /* No animated transitions: this element is repositioned (absolute ->
       fixed) the instant it pins, and the global `* { transition }` rule
       would otherwise animate that as a visible flick. */
    transition: none;
}

.image-splash-pinned .image-splash-imagewrapper {
    position: fixed;
    top: 0;
}

.image-splash-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 0;
}

/* Subtle dark overlay used only on the masthead layout - sits above
   the image but below the text so the text reads cleanly without the
   image getting visibly muddy. */
.image-splash-masthead-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.4));
    pointer-events: none;
    z-index: 1;
}

/* Desktop overlay text container - a sibling of the (absolute/fixed)
   image wrapper.  Stays in normal flow at the top of the splash so it
   scrolls naturally past the image as the user scrolls.  The image
   wrapper is out of flow (absolute, then fixed once pinned) so the
   text block sits at splash y=0 with no margin compensation needed. */
.image-splash-text-block-overlay {
    position: relative;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
}

.image-splash-text-block-overlay a,
.image-splash-text-block-overlay .image-splash-iconlink {
    pointer-events: auto;
}

/* Mobile text block - appears after the image. Background is the theme
   --primary so the colour behind the quote matches the splash (the bgcolor
   option was removed; the splash always uses --primary). */
.image-splash-text-block-mobile {
    display: none;
    padding: var(--space-lg) var(--space-md);
    background: var(--primary);
    color: var(--text-main);
}

/* ---- Masthead layout ----
   The text-block-overlay has a ::before gradient that's position:
   absolute and therefore paints above in-flow siblings; we sidestep
   that by giving the text spans their own position:absolute (so they
   share the same paint context as the gradient and respect z-index)
   and pinning them to the top / bottom of the splash explicitly. */
.image-splash-masthead .image-splash-text-block-overlay {
    display: block;
}

.image-splash-masthead .image-splash-text-top,
.image-splash-masthead .image-splash-text-bottom {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: #fff;
    text-align: center;
    padding: 0rem 0rem;
    font-size: 1em;
    line-height: 1.625;
    width: 100%;
    box-sizing: border-box;
    xtext-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.image-splash-masthead .image-splash-text-top {
    top: 3em;
}

.image-splash-masthead .image-splash-text-bottom {
    font-family: TitleFont;
    bottom: calc(4 * var(--space-lg));
    font-size: 3.2rem;
    letter-spacing: 0.1rem;
    line-height: 4.5rem;
}

/* ---- Quote layouts shared ---- */
.image-splash-quote-left .image-splash-text-block-overlay,
.image-splash-quote-right .image-splash-text-block-overlay {
    display: block;
}

.image-splash-masthead .image-splash-text-block-overlay::before,
.image-splash-quote-left .image-splash-text-block-overlay::before,
.image-splash-quote-right .image-splash-text-block-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.0), rgba(0,0,0,0.45));
    pointer-events: none;
}

.image-splash-quote-left .image-splash-text-block-overlay > *,
.image-splash-quote-right .image-splash-text-block-overlay > * {
    position: relative;
    z-index: 1;
    color: #fff;
}

.image-splash-quote-left .image-splash-text1,
.image-splash-quote-right .image-splash-text1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.image-splash-quote-left .image-splash-text1 strong,
.image-splash-quote-right .image-splash-text1 strong {
    color: #fff;
    font-weight: var(--font-bold);
}

.image-splash-quote-left .image-splash-text2,
.image-splash-quote-right .image-splash-text2 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: var(--space-md);
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.image-splash-quotes {
    display: block;
    width: 57px;
    height: auto;
    margin-bottom: var(--space-sm);
}

.image-splash-icon {
    max-width: 80px;
    height: auto;
    display: block;
}

.image-splash-iconlink {
    display: inline-block;
}

/* Position the text block per layout.
   The overlay is a positioned container; children flow naturally inside
   it as a column so dynamic content lengths can't overlap. */
.image-splash-quote-left .image-splash-text-block-overlay,
.image-splash-quote-right .image-splash-text-block-overlay {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.image-splash-quote-left .image-splash-text1,
.image-splash-quote-left .image-splash-text2,
.image-splash-quote-right .image-splash-text1,
.image-splash-quote-right .image-splash-text2 {
    min-width: 300px;
    max-width: 80%;
    text-align: left;
}


.image-splash-quote-left .image-splash-text1,
.image-splash-quote-left .image-splash-text2 {
    width: 35%;
}




.image-splash-quote-left .image-splash-text-block-overlay {
    padding-left: 10%;
}

.image-splash-quote-right .image-splash-text-block-overlay {
    padding-left: 55%;
}

/* Mobile: hide overlay text, show mobile-only block after image */
@media (max-width: 768px) {
    .image-splash {
        position: static;
        min-height: 0;
        height: auto;
        overflow: visible;
    }
    .image-splash-imagewrapper,
    .image-splash-pinned .image-splash-imagewrapper {
        height: auto;
        position: relative;
        top: auto;
    }
    .image-splash-image {
        height: auto;
        max-height: 70vh;
    }
    /* The layout-specific display rules (.image-splash-masthead /
       .image-splash-quote-* .image-splash-text-block-overlay) are more
       specific than the bare class, so without these compound selectors
       the overlay stays visible on mobile: the quote text rendered twice
       (once unreadable white-on-white below the image) and the quote
       layouts' 55% padding pushed the page wider than the viewport. */
    .image-splash-text-block-overlay,
    .image-splash-masthead .image-splash-text-block-overlay,
    .image-splash-quote-left .image-splash-text-block-overlay,
    .image-splash-quote-right .image-splash-text-block-overlay {
        display: none;
        height: auto;
    }
    .image-splash-text-block-mobile {
        display: block;
    }
    .image-splash-text-block-mobile .image-splash-text {
        font-size: 1.5rem;
        text-align: center;
        margin: var(--space-sm) 0;
    }
    .image-splash-text-block-mobile .image-splash-text1 {
        font-weight: var(--font-bold);
        font-size: 1.5rem;
        margin-bottom: var(--space-xs);
    }
    .image-splash-text-block-mobile .image-splash-text2 {
        font-size: 1.1rem;
        margin-bottom: var(--space-sm);
    }

    /* The desktop masthead text rules are scoped to the splash root, so
       they also hit the copies inside the mobile block: absolute
       positioning (which threw the white title over the image and out of
       the top of the page) and forced white text. Restore normal flow
       and theme-aware colours (dark-mode safe via the CSS vars). */
    .image-splash-masthead .image-splash-text-block-mobile .image-splash-text-top,
    .image-splash-masthead .image-splash-text-block-mobile .image-splash-text-bottom {
        position: static;
        left: auto;
        transform: none;
        width: auto;
        color: var(--text-main);
        text-shadow: none;
        padding: 0 var(--space-md);
    }
    .image-splash-masthead .image-splash-text-block-mobile .image-splash-text-top {
        font-size: 1rem;
    }
    .image-splash-masthead .image-splash-text-block-mobile .image-splash-text-bottom {
        font-size: 1.75rem;
        line-height: var(--leading-tight);
        letter-spacing: normal;
    }

    /* Same leak for the quote layouts: the 35% column width, 300px
       minimum width (horizontal overflow at small widths), white <strong>
       text and heavy text-shadow are all desktop-overlay styling. */
    .image-splash-quote-left .image-splash-text-block-mobile .image-splash-text1,
    .image-splash-quote-right .image-splash-text-block-mobile .image-splash-text1,
    .image-splash-quote-left .image-splash-text-block-mobile .image-splash-text2,
    .image-splash-quote-right .image-splash-text-block-mobile .image-splash-text2 {
        width: auto;
        min-width: 0;
        max-width: 100%;
        color: var(--text-main);
        text-shadow: none;
    }
    .image-splash-quote-left .image-splash-text-block-mobile .image-splash-text1 strong,
    .image-splash-quote-right .image-splash-text-block-mobile .image-splash-text1 strong {
        color: var(--text-main);
    }

    /* /img/quotes.svg is white-filled (drawn for the photo overlay), so
       flip it dark on the light mobile block. Dark mode keeps the white
       glyph, which already reads on the dark background. */
    .image-splash-text-block-mobile .image-splash-quotes {
        filter: invert(1);
    }
    html.dark-mode .image-splash-text-block-mobile .image-splash-quotes {
        filter: none;
    }
}


/* ========================================
   MASTHEAD WIDGET
   ========================================
   The Masthead widget reuses the .image-splash* markup/CSS above, with these
   rules layered on via the .masthead-widget marker class so the Image Splash
   component is unaffected. Adds: an optional separate mobile image, Text 1
   hidden on mobile (inherited - the shared overlay is display:none on mobile),
   Text 2 shown over the image centre-bottom on mobile, and a Back button. */

/* Keep the root positioned in every state so the absolutely-positioned Back
   button anchors to it (the shared mobile rule sets the root to static). */
.image-splash.masthead-widget {
    position: relative;
}

/* The alternate mobile image and the over-image caption are desktop-hidden;
   the mobile media query below swaps them in. */
.masthead-widget .masthead-image-mobile,
.masthead-widget .masthead-mobile-caption {
    display: none;
}

/* Back button: top-right, white in normal mode (mirrors the button widget's
   inverted variant); inverts to black fill / white text in dark mode. */
.masthead-back-button {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.6em 1.1em;
    border-radius: 5px;
    font-weight: var(--font-bold);
    text-decoration: none;
    white-space: nowrap;
    background-color: #fff;
    color: #000;
    border: none;
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
}

.masthead-back-button:hover,
.masthead-back-button:focus {
    background-color: #ececec;
    color: #000;
}

html.dark-mode .masthead-back-button {
    background-color: #000;
    color: #fff;
}

html.dark-mode .masthead-back-button:hover,
html.dark-mode .masthead-back-button:focus {
    background-color: #2b2b2b;
    color: #fff;
}

@media (max-width: 768px) {
    /* The Masthead fills the full screen height on mobile (the shared rule
       otherwise lays the splash out in normal flow with a max 70vh image).
       Scoped to .masthead-widget so the Image Splash component is unaffected. */
    .image-splash.masthead-widget {
        height: 100vh;
    }
    .masthead-widget .image-splash-imagewrapper,
    .masthead-widget.image-splash-pinned .image-splash-imagewrapper {
        height: 100%;
    }
    .masthead-widget .masthead-image-desktop,
    .masthead-widget .masthead-image-mobile {
        height: 100%;
        max-height: none;
    }

    /* When a mobile image is supplied, show it instead of the desktop one. */
    .masthead-widget.masthead-has-mobile-image .masthead-image-desktop {
        display: none;
    }
    .masthead-widget .masthead-image-mobile {
        display: block;
    }

    /* Text 1 is already hidden on mobile (the shared .image-splash-text-block-
       overlay is display:none). Text 2 is shown over the image, centre-bottom. */
    .masthead-widget .masthead-mobile-caption {
        display: block;
        position: absolute;
        left: 50%;
        bottom: 7rem;
        transform: translateX(-50%);
        width: 100%;
        box-sizing: border-box;
        padding: 0 var(--space-md);
        z-index: 2;
        color: #fff;
        text-align: center;
        font-family: TitleFont;
        font-size: 3.5rem;
        line-height: var(--leading-tight);
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
        pointer-events: none;
    }

    /* Trim the button slightly on small screens. */
    .masthead-back-button {
        top: var(--space-md);
        right: var(--space-md);
        padding: 0.5em 0.9em;
    }
}


/* ========================================
   IMAGE SIZE & ALIGNMENT CLASSES
   ======================================== */
.image-size-small .image-element {
    max-width: 300px;
    width: 100%;
}

.image-size-medium .image-element {
    max-width: 600px;
    width: 100%;
}

.image-size-large .image-element {
    max-width: 900px;
    width: 100%;
}

.image-size-full .image-element {
    max-width: 100%;
    width: 100%;
}

/* Cover: stretch to fill the parent cell/container and crop to fit */
.image-size-cover {
    height: 100%;
}

.image-size-cover .image-figure {
    height: 100%;
    margin: 0;
}

.image-size-cover .image-element {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
}

/* Headshot: full container width, fixed 3:2 aspect ratio, centred and
   cropped to fill the frame */
.image-size-headshot .image-element {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Rounded corners (toggle, on by default) */
.image-rounded .image-element {
    border-radius: var(--radius-lg);
}

/* The global `figure img` rule rounds all figure images, so explicitly
   square the corners when the rounded-corners toggle is switched off. */
.image-wrapper:not(.image-rounded) .image-element {
    border-radius: 0;
}

.image-align-left {
    text-align: left;
}

.image-align-left .image-figure {
    margin-right: auto;
}

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

.image-align-center .image-figure {
    margin-left: auto;
    margin-right: auto;
}

.image-align-right {
    text-align: right;
}

.image-align-right .image-figure {
    margin-left: auto;
}

.image-caption {
    margin-top: var(--space-sm);
    font-size: var(--font-sm);
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* The image widget should sit flush with whatever follows it. Drop the
   global figure bottom margin and the inline-image baseline gap so there's
   no trailing whitespace after the image. */
.image-figure {
    margin: 0;
}

.image-element {
    vertical-align: middle;
}

/* ========================================
   VIDEO SIZE & ALIGNMENT
   ======================================== */
.video-size-medium {
    max-width: 800px;
}

.video-size-fullwidth {
    max-width: 100%;
}

.video-align-left {
    margin-right: auto;
}

.video-align-center {
    margin-left: auto;
    margin-right: auto;
}

.video-align-right {
    margin-left: auto;
}


/* ========================================
   EXPANDER
   ======================================== */

.expander {
    /* Colour of the dividing/bounding lines used when expanders are
       grouped (see below). Kept visible in dark mode. */
    --expander-line: #000;
    margin: 0;
}

html.dark-mode .expander {
    --expander-line: var(--border-color-dark);
}

/* When expanders sit directly next to each other they read as one list:
   a divider between each, plus a line above the first and below the last
   of the run. A lone expander stays borderless. */
.expander + .expander {
    border-top: 1px solid var(--expander-line);
}

.expander:has(+ .expander):not(.expander + .expander) {
    border-top: 1px solid var(--expander-line);
}

.expander + .expander:not(:has(+ .expander)) {
    border-bottom: 1px solid var(--expander-line);
}

.expander-summary {
    padding: 1rem;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    font-weight:bold;
    gap: 1rem;
}


.expander-summary::-webkit-details-marker {
    display: none;
}

/* Right-aligned chevron. Masked SVG so it follows the text colour and
   inverts cleanly in dark mode. */
.expander-summary::after {
    content: "";
    flex: 0 0 auto;
    margin-left: auto;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    transition: transform 0.2s;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.expander[open] .expander-summary::after {
    transform: rotate(180deg);
}

.expander-summary p {
    display: inline;
    margin: 0;
    font-weight: inherit;
}

.expander-content {
    padding: 0 1rem 1rem 1rem;
    animation: expanderOpen 0.2s ease-out;
}

@keyframes expanderOpen {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expander-content p:first-child {
    margin-top: 0.5rem;
}

.expander-content p:last-child {
    margin-bottom: 0;
}

/* Nested lists in expander content */
.expander-content ul,
.expander-content ol {
    margin: 0.5rem 0;
    padding-left: 2rem;
}

.expander-content li {
    margin: 0.25rem 0;
}

/* Print styles - show all content when printing */
@media print {
    .expander {
        border: 1px solid #000;
    }
    
    .expander-summary::after {
        display: none;
    }

    .expander-content {
        display: block !important;
    }
}


/* ========================================
   PAGE MENU / SUBMENU BAR COMPONENT
   ======================================== */
.page-menu {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--primary);
    border-top: 1px solid var(--border-color);
}

.page-menu-bar {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.page-menu-buttons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    width: 100%;
}

.page-menu-buttons li{
margin-bottom:0.5em;
margin-top:0.5em;
}

.page-menu-button {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: var(--primary-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 6px);
    color: var(--text-main);
    text-decoration: none;
    font-weight: var(--font-bold);
    font-size: var(--font-base);
    line-height: 1.2;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.page-menu-button:hover,
.page-menu-button:focus {
    background: var(--primary-light);
    color: var(--text-main);
    border-color: var(--primary);
}

.page-menu-button.is-active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--text-main);
}

.page-menu-select {
    display: none;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-base);
    background: var(--background-body, #fff);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 6px);
    color: var(--text-main);
}

@media (max-width: 768px) {
    .page-menu-buttons {
        display: none;
    }
    .page-menu-select {
        display: block;
    }
    .page-menu-bar {
        padding: var(--space-md) var(--space-md);
        transition: padding-left var(--transition-base);
    }
    /* While the bar is stuck to the top of the viewport it shares that
       edge with the fixed hamburger button, which would otherwise sit on
       top of the select. Indent the bar clear of the burger (38px icon
       plus its padding) only while stuck (.page-menu-stuck is toggled by
       the scroll handler in /templates/head.php). */
    .page-menu.page-menu-stuck .page-menu-bar {
        padding-left: calc(38px + 2.75rem);
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .image-size-small .image-element {
        max-width: 70%;
    }

    .image-size-medium .image-element {
        max-width: 100%;
    }

    .image-size-large .image-element {
        max-width: 100%;
    }
    
    .splash-text {
        font-size: var(--font-2xl);
        padding: var(--space-md) var(--space-lg);
    }
    
}

/* Dark mode support */
html.dark-mode .page-menu {
    background: var(--primary);
    border-top-color: var(--border-color);
    border-bottom-color: var(--border-color);
}

html.dark-mode .page-menu-button {
    background: var(--primary-dark);
    color: var(--text-main);
    border-color: var(--border-color);
}

html.dark-mode .page-menu-button.is-active,
html.dark-mode .page-menu-button:hover,
html.dark-mode .page-menu-button:focus {
    background: var(--primary-light);
    color: var(--text-inverse);
    border-color: var(--primary);
}

/* ========================================
   LOGIN INCLUDE (pages/login.php fragment)
   ======================================== */
.login-include {
    max-width: 480px;
}

.login-error {
    color: var(--error, #c0392b);
    font-size: var(--font-sm);
    margin: 0 0 var(--space-md);
}

.login-forgot {
    margin-top: var(--space-xl);
}

.login-forgot summary {
    cursor: pointer;
    font-weight: var(--font-semibold);
    color: var(--text-main);
    margin-bottom: var(--space-md);
}

.login-forgot-confirmation {
    background: var(--background-muted);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

/* ========================================
   FOOTER SOCIALS POP-OUT
   One-off pattern used via an HTML widget in the footer editor
   (/admin/footer). Square social-icon buttons inside a native <details>;
   opening it pops a small content panel above the icons. No JS needed.

   Expected markup (inside a .wayfinder so it matches the other cards):

   <div class="wayfinder">
       <div class="wayfinder-text">See what we've been up to</div>
       <details class="socials-popout">
           <summary aria-label="See our social media">
               <span class="socials-popout-btn"><img class="no-hide" src="/img/social-media/instagram.svg" alt="Instagram"></span>
               <span class="socials-popout-btn"><img class="no-hide" src="/img/social-media/facebook.svg" alt="Facebook"></span>
           </summary>
           <div class="socials-popout-panel"> ...any content... </div>
       </details>
   </div>
   ======================================== */
.socials-popout {
    position: relative;
    flex: 0 0 auto;
}

.socials-popout summary {
    list-style: none;
    display: inline-flex;
    gap: var(--space-sm);
    cursor: pointer;
}

.socials-popout summary::-webkit-details-marker {
    display: none;
}

/* Square dark buttons with white glyphs, mirroring the article share
   buttons (.news-article-share-link). The glyph filter lives on the img
   inside the span: a filter on the square itself would invert its
   background too. */
.socials-popout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-black);
    border-radius: var(--radius-md);
    transition: opacity var(--transition-fast);
}

.socials-popout-btn img {
    width: 24px;
    height: 24px;
    /* Flatten the brand-coloured SVGs to white. */
    filter: brightness(0) invert(1);
}

.socials-popout summary:hover .socials-popout-btn,
.socials-popout summary:focus-visible .socials-popout-btn,
.socials-popout[open] summary .socials-popout-btn {
    opacity: 0.8;
}

/* In dark mode the squares (--text-main) become light, so flip the
   glyphs back to dark for contrast. */
html.dark-mode .socials-popout-btn img {
    filter: brightness(0);
}

/* The pop-out panel sits just above the icons (the widget lives in the
   footer, so it opens upward) and is kept on-screen on narrow widths. */
.socials-popout-panel {
    position: absolute;
    bottom: calc(100% + var(--space-sm));
    right: 0;
    min-width: 260px;
    max-width: min(20rem, calc(100vw - 2rem));
    background: var(--background-body);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-md);
    z-index: var(--z-popover);
    text-align: left;
}

/* When the wayfinder stacks and centres on small screens, anchor the
   panel to the centre of the icons instead of their right edge so it
   cannot run off the left of the viewport. */
@media (max-width: 600px) {
    .socials-popout-panel {
        right: 50%;
        transform: translateX(50%);
    }
}

/* Subtle full-page shade behind the open panel (still no JS, no markup
   change). The shade is the summary's ::after pseudo-element, so a click
   anywhere on it counts as a click on the <summary> and fires its native
   toggle, closing the <details>. The panel is a sibling carrying the higher
   --z-popover, so it sits above the shade and stays clickable - only clicks
   that land on the shade dismiss the pop-out.

   The shade is fixed to the viewport, but it is painted inside the footer's
   full-bleed container, whose own stacking context (position: relative +
   z-index: 1) sits no higher than the page content. So while the pop-out is
   open we lift the whole footer module (#siteFooter, the body-level wrapper
   that always contains this widget) above the rest of the page via :has().
   The shade then covers everything beneath it, while the panel - higher
   still within that lifted context - floats on top of the shade. */
.socials-popout[open] > summary::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: var(--z-modal-backdrop);
}

#siteFooter:has(.socials-popout[open]) {
    position: relative;
    z-index: var(--z-tooltip);
}

/* ========================================
   TICK BADGE
   Tick characters (✓ ✔ ✅) found in page text are swapped for this
   green-circle tick by /js/tick-icons.js.
   ======================================== */
.tick-badge {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.18em;
    margin: 0 0.15em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232ea44f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12.5l2.5 2.5 5-5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ========================================
   MAP WIDGET
   ======================================== */
/* Full-bleed: break out of the constrained content column so the map
   spans the whole viewport width, at roughly half the screen height. */
.map-widget {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 50vh;
    min-height: 320px;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
    background: #e9eef2;
}

.map-widget img {
    max-width: none;
}

.map-widget-missing-key {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ========================================
   DIVIDER (HR) WIDGET
   ======================================== */
/* Full-width 2px horizontal line. Colour comes from the
   hr-widget-color-* class; margin is applied inline by the component. */
.hr-widget {
    border: 0;
    width: 100%;
    height: 2px;
    margin: 1.5em 0;
    background-color: var(--border-color, #d8d8d8);
}

/* Full-width divider band. body.php breaks dividers out of <main> so
   they span the viewport; this wrapper paints the opaque body
   background across the whole band (z-index/background mirror <main>)
   so a pinned/sticky image-splash behind cannot show through the
   divider's transparent vertical margins. display:flow-root keeps the
   .hr-widget margins inside the band so they are covered too. */
.hr-full-bleed {
    width: 100%;
    display: flow-root;
    position: relative;
    z-index: 1;
    background-color: var(--background-body);
}

.hr-widget-color-default { background-color: var(--border-color, #d8d8d8); }
.hr-widget-color-primary { background-color: var(--primary); }
.hr-widget-color-primary-light { background-color: var(--primary-light); }
.hr-widget-color-primary-dark { background-color: var(--primary-dark); }
.hr-widget-color-green-primary { background-color: var(--theme-green-primary); }
.hr-widget-color-green-primary-light { background-color: var(--theme-green-primary-light); }
.hr-widget-color-green-primary-dark { background-color: var(--theme-green-primary-dark); }
.hr-widget-color-blue-primary { background-color: var(--theme-blue-primary); }
.hr-widget-color-blue-primary-light { background-color: var(--theme-blue-primary-light); }
.hr-widget-color-blue-primary-dark { background-color: var(--theme-blue-primary-dark); }
.hr-widget-color-pink-primary { background-color: var(--theme-pink-primary); }
.hr-widget-color-pink-primary-light { background-color: var(--theme-pink-primary-light); }
.hr-widget-color-pink-primary-dark { background-color: var(--theme-pink-primary-dark); }
/* ========================================
   YOCTO GRID SYSTEM - Enhanced Version
   12 column responsive grid with design tokens
   ======================================== */

.yoctoRow {
    position: relative;
    width: 100%;
    max-width: var(--max-width-xl);
    margin: 0 auto var(--space-2xl) auto;
    padding: 0;
    box-sizing: border-box;
    clear: both;
    display: flex;
    text-align: left;
    gap: var(--space-xl);
}

.yoctoRow > div {
    width: 100%;
    float: left;
    box-sizing: border-box;
    position: relative;
    display: table-cell;
    text-align: left;
}

/* ========================================
   MAIN COLUMNS (2rem gap)
   ======================================== */
.yoctoRow > .col1 { 
    width: calc(((100% + var(--space-xl)) / 12) * 1 - var(--space-xl));
}
.yoctoRow > .col2 { 
    width: calc(((100% + var(--space-xl)) / 12) * 2 - var(--space-xl));
}
.yoctoRow > .col3 { 
    width: calc(((100% + var(--space-xl)) / 12) * 3 - var(--space-xl));
}
.yoctoRow > .col4 { 
    width: calc(((100% + var(--space-xl)) / 12) * 4 - var(--space-xl));
}
.yoctoRow > .col5 { 
    width: calc(((100% + var(--space-xl)) / 12) * 5 - var(--space-xl));
}
.yoctoRow > .col6 { 
    width: calc(((100% + var(--space-xl)) / 12) * 6 - var(--space-xl));
}
.yoctoRow > .col7 { 
    width: calc(((100% + var(--space-xl)) / 12) * 7 - var(--space-xl));
}
.yoctoRow > .col8 { 
    width: calc(((100% + var(--space-xl)) / 12) * 8 - var(--space-xl));
}
.yoctoRow > .col9 { 
    width: calc(((100% + var(--space-xl)) / 12) * 9 - var(--space-xl));
}
.yoctoRow > .col10 { 
    width: calc(((100% + var(--space-xl)) / 12) * 10 - var(--space-xl));
}
.yoctoRow > .col11 { 
    width: calc(((100% + var(--space-xl)) / 12) * 11 - var(--space-xl));
}
.yoctoRow > .col12 { 
    width: 100%;
}

/* ========================================
   NESTED COLUMNS (1rem gap)
   ======================================== */
.yoctoRow .yoctoRow {
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.yoctoRow .yoctoRow > div {
    margin-right: 0;
}

.yoctoRow .yoctoRow > .col1 { 
    width: calc(((100% + var(--space-md)) / 12) * 1 - var(--space-md));
}
.yoctoRow .yoctoRow > .col2 { 
    width: calc(((100% + var(--space-md)) / 12) * 2 - var(--space-md));
}
.yoctoRow .yoctoRow > .col3 { 
    width: calc(((100% + var(--space-md)) / 12) * 3 - var(--space-md));
}
.yoctoRow .yoctoRow > .col4 { 
    width: calc(((100% + var(--space-md)) / 12) * 4 - var(--space-md));
}
.yoctoRow .yoctoRow > .col5 { 
    width: calc(((100% + var(--space-md)) / 12) * 5 - var(--space-md));
}
.yoctoRow .yoctoRow > .col6 { 
    width: calc(((100% + var(--space-md)) / 12) * 6 - var(--space-md));
}
.yoctoRow .yoctoRow > .col7 { 
    width: calc(((100% + var(--space-md)) / 12) * 7 - var(--space-md));
}
.yoctoRow .yoctoRow > .col8 { 
    width: calc(((100% + var(--space-md)) / 12) * 8 - var(--space-md));
}
.yoctoRow .yoctoRow > .col9 { 
    width: calc(((100% + var(--space-md)) / 12) * 9 - var(--space-md));
}
.yoctoRow .yoctoRow > .col10 { 
    width: calc(((100% + var(--space-md)) / 12) * 10 - var(--space-md));
}
.yoctoRow .yoctoRow > .col11 { 
    width: calc(((100% + var(--space-md)) / 12) * 11 - var(--space-md));
}
.yoctoRow .yoctoRow > .col12 { 
    width: 100%;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet - Nested grids collapse */
@media (max-width: 1200px) {
    .yoctoRow .yoctoRow {
        display: block;
        gap: var(--space-lg);
    }
    
    .yoctoRow .yoctoRow > div {
        width: 100% !important;
        display: block !important;
        margin-bottom: var(--space-lg);
    }
    
    .yoctoRow .yoctoRow > div:last-child {
        margin-bottom: 0;
    }
}

/* Mobile - All grids collapse */
@media (max-width: 768px) {
    .yoctoRow {
        display: block;
        gap: var(--space-lg);
        padding: 0 var(--space-md);
    }
    
    .yoctoRow > div {
        width: 100% !important;
        display: block !important;
        margin-bottom: var(--space-lg);
    }
    
    .yoctoRow > div:last-child {
        margin-bottom: 0;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Self-clearing */
.yoctoCol:after,
.yoctoRow:after {
    line-height: 0;
    content: "";
    display: table;
    clear: both;
}

/* Optional: Add spacing variants */
.yoctoRow.spacing-sm {
    gap: var(--space-sm);
}

.yoctoRow.spacing-md {
    gap: var(--space-md);
}

.yoctoRow.spacing-lg {
    gap: var(--space-lg);
}

.yoctoRow.spacing-xl {
    gap: var(--space-xl);
}

.yoctoRow.spacing-none {
    gap: 0;
}

/* Optional: Alignment utilities */
.yoctoRow.align-center {
    align-items: center;
}

.yoctoRow.align-start {
    align-items: flex-start;
}

.yoctoRow.align-end {
    align-items: flex-end;
}

.yoctoRow.justify-center {
    justify-content: center;
}

.yoctoRow.justify-between {
    justify-content: space-between;
}

.yoctoRow.justify-around {
    justify-content: space-around;
}

/* Optional: No bottom margin */
.yoctoRow.no-margin {
    margin-bottom: 0;
}/* /css/columns.css - Column Layout Styles */

/* Base columns container */
.columns-container {
    display: flex;
    gap: 2rem;
    margin: 0rem 0;
    width: 100%;
    /* Include any inline padding within the 100% width so padded
       containers don't overflow the viewport. */
    box-sizing: border-box;
}

/* 1 Column Layout */
.columns-layout-1-column {
    display: flex;
}

.columns-layout-1-column .column {
    flex: 1;
}

/* 2 Column Equal Layout */
.columns-layout-2-equal {
    display: flex;
}

.columns-layout-2-equal .column {
    flex: 1;
}

/* 2 Column Small/Large Layout */
.columns-layout-2-small-large {
    display: flex;
}

.columns-layout-2-small-large .column-0 {
    flex: 1;
}

.columns-layout-2-small-large .column-1 {
    flex: 2;
}

/* 2 Column Large/Small Layout */
.columns-layout-2-large-small {
    display: flex;
}

.columns-layout-2-large-small .column-0 {
    flex: 2;
}

.columns-layout-2-large-small .column-1 {
    flex: 1;
}

/* 2 Column 3:2 Layout */
.columns-layout-2-3-2 {
    display: flex;
}

.columns-layout-2-3-2 .column-0 {
    flex: 3;
}

.columns-layout-2-3-2 .column-1 {
    flex: 2;
}

/* 2 Column 2:3 Layout */
.columns-layout-2-2-3 {
    display: flex;
}

.columns-layout-2-2-3 .column-0 {
    flex: 2;
}

.columns-layout-2-2-3 .column-1 {
    flex: 3;
}

/* 3 Column Equal Layout */
.columns-layout-3-equal {
    display: flex;
}

.columns-layout-3-equal .column {
    flex: 1;
}

/* 4 Column Equal Layout */
.columns-layout-4-equal {
    display: flex;
}

.columns-layout-4-equal .column {
    flex: 1;
}

/* Individual column styling */
.column {
    min-width: 0; /* Prevent flex items from overflowing */
}

/* Mobile responsive - collapse to single column */
@media (max-width: 768px) {
    .columns-container.columns-mobile-collapse {
        flex-direction: column;
    }

    /* Reverse the stacking order so the last column (e.g. the
       right-hand one) appears at the top when collapsed on mobile. */
    .columns-container.columns-mobile-collapse.columns-mobile-reverse {
        flex-direction: column-reverse;
    }

    .columns-container.columns-mobile-collapse .column {
        flex: 1 1 100% !important;
        width: 100%;
    }
}

/* Tablet responsive - for 3 and 4 column layouts */
@media (max-width: 1024px) and (min-width: 769px) {
    .columns-layout-3-equal,
    .columns-layout-4-equal {
        flex-wrap: wrap;
    }

    .columns-layout-3-equal .column,
    .columns-layout-4-equal .column {
        flex: 1 1 45%;
        min-width: 45%;
    }
}

/* ===========================================================
   Full-bleed background wrapper
   When a container widget has a backgroundColor set, body.php
   breaks out of <main> and renders the container inside this
   wrapper so the colour stretches edge-to-edge while the
   content itself stays constrained to --max-width-xl.

   Columns widgets do NOT break out: a columns backgroundColor
   is applied directly to .columns-container (which stays inside
   <main>), so the colour is bounded by the content column.
   =========================================================== */
.columns-full-bleed {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    /* Inline padding must stay within the 100% width (no overflow). */
    box-sizing: border-box;
}

.columns-full-bleed > .columns-full-bleed-inner {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    box-sizing: border-box;
}

@media (max-width: 1240px) {
    .columns-full-bleed > .columns-full-bleed-inner {
        padding: 0 var(--space-lg);
    }
}

@media (max-width: 768px) {
    .columns-full-bleed > .columns-full-bleed-inner {
        padding: 0 var(--space-md);
    }
}

/* ===========================================================
   Container widget
   A single-column block sharing the columns full-bleed wrapper
   and background palette.  Any widget can be nested inside.
   =========================================================== */
.container-block {
    width: 100%;
    /* Include any inline padding within the 100% width (no overflow). */
    box-sizing: border-box;
}

/* Background colour palette - tied to the CSS variables defined in
   /css/vars-lightmode.css and the theme overrides under
   /css/themes/<theme>/. */
/* A subtle highlight of the default page background (adapts to dark mode). */
.columns-bg-default-highlight { background-color: var(--background-muted); }
.columns-bg-primary { background-color: var(--primary); }
.columns-bg-primary-light { background-color: var(--primary-light); }
.columns-bg-primary-dark { background-color: var(--primary-dark); }

.columns-bg-green-primary { background-color: var(--theme-green-primary); }
.columns-bg-green-primary-light { background-color: var(--theme-green-primary-light); }
.columns-bg-green-primary-dark { background-color: var(--theme-green-primary-dark); }

.columns-bg-blue-primary { background-color: var(--theme-blue-primary); }
.columns-bg-blue-primary-light { background-color: var(--theme-blue-primary-light); }
.columns-bg-blue-primary-dark { background-color: var(--theme-blue-primary-dark); }

.columns-bg-pink-primary { background-color: var(--theme-pink-primary); }
.columns-bg-pink-primary-light { background-color: var(--theme-pink-primary-light); }
.columns-bg-pink-primary-dark { background-color: var(--theme-pink-primary-dark); }
/* ========================================
   NEWS LISTING STYLES
   ======================================== */
.news-listing {
    max-width: var(--max-width-xl);
    margin: 0 auto;
}

/* Category filter */
.news-filter {
    max-width: var(--max-width-xl);
    margin: 0 auto var(--space-2xl);
    padding: var(--space-md) var(--space-lg);
    border: 0px solid var(--border-color-light);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-lg);
}

.news-filter-label {
    font-weight: var(--font-semibold);
}

.news-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    flex: 1 1 auto;
    padding-top:0.8em;
}

.news-filter-option {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.news-filter-option input {
    width: auto;
    margin: 0;
}

/* ========================================
   NEWS CARD (drag & drop "News Item" widget)
   ======================================== */
.news-card {
    display: flex;
    flex-direction: column;
}

/* Listing grid: vertical spacing between the rows of columns produced
   for the news listing.  The column markup itself (flex / mobile
   collapse) is shared with the drag-and-drop columns widget. */
.news-listing .columns-container {
    margin-bottom: var(--space-3xl);
}

.news-card-image {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    background: var(--background-muted);
    aspect-ratio: 1 / 1;
}

.news-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.news-card-image:hover img,
.news-card-image:focus img {
    transform: scale(1.03);
}

.news-card-title {
    text-decoration: none;
}

.news-card-title h3 {
    margin: var(--space-md) 0 var(--space-sm);
    color: var(--text-main);
    transition: color var(--transition-fast);
}

.news-card-title:hover h3,
.news-card-title:focus h3 {
    color: var(--primary);
}

.news-card-summary {
    margin: var(--space-sm) 0;
    color: var(--text-main);
    font-size: var(--font-sm);
    line-height: var(--leading-snug);
}

.news-card-more {
    text-decoration: none;
    font-weight: var(--font-bold);
    color: var(--text-main);
    transition: color var(--transition-fast);
}

.news-card-more:hover,
.news-card-more:focus {
    color: var(--primary);
}

/* Compact metadata line on a listing card (e.g. job location / closing
   date). Sits between the title and the summary. */
.news-card-meta {
    margin: 0 0 var(--space-sm);
    font-size: var(--font-sm);
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-md);
}

/* Detail block beneath an article title (e.g. job location / salary /
   closing date). */
.news-article-meta {
    list-style: none;
    margin: 0 0 var(--space-xl);
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-2xl);
}

.news-article-meta li {
    font-size: var(--font-base);
    color: var(--text-secondary);
}

.news-article-meta strong {
    color: var(--text-main);
    font-weight: var(--font-semibold);
}

.news-item {
    margin-bottom: var(--space-3xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--border-color-light);
    display: flex;
    gap: var(--space-2xl);
    transition: all var(--transition-base);
}

.news-item:hover {
    transform: translateX(4px);
}

.news-item:last-of-type {
    border-bottom: none;
}

.news-item-image {
    flex-shrink: 0;
    width: 280px;
    position: relative;
}

.news-item-image::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    z-index: -1;
    transition: all var(--transition-base);
}

.news-item:hover .news-item-image::after {
    top: 12px;
    left: 12px;
}

.news-item-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    display: block;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-item:hover .news-item-image img {
    box-shadow: var(--shadow-lg);
    transform: scale(1.02);
}

.news-item-content {
    flex: 1;
}

.news-item-date {
    display: inline-block;
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--background-subtle);
    border-radius: var(--radius-full);
    letter-spacing: var(--tracking-wide);
}

.news-item-title {
    margin: 0 0 var(--space-md) 0;
    font-size: var(--font-3xl);
    line-height: var(--leading-tight);
}

.news-item-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.news-item-title a:hover {
    color: var(--primary);
}

.news-item-excerpt {
    margin-bottom: var(--space-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    font-size: var(--font-base);
}

/* ========================================
   NEWS ARTICLE STYLES
   ======================================== */
.news-article {
    max-width: var(--max-width-xl);
    margin: 0 auto;
}

/* Two-column article layout: the feature image sits in a left-hand
   column while the title, body content, optional extra image, second
   content area and footer all flow down the right-hand column. */
.news-article-top {
    display: flex;
    gap: var(--space-3xl);
    align-items: flex-start;
}

.news-article-media {
    flex: 0 0 38%;
    max-width: 38%;
}

.news-article-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.news-article-body {
    flex: 1 1 auto;
    min-width: 0;
}

.news-article h1 {
    margin: 0 0 var(--space-xl);
    line-height: var(--leading-tight);
    color: var(--text-main);
}

/* Optional second image, shown between the two content areas. */
.news-article-extra-image {
    margin: var(--space-2xl) 0;
}

.news-article-extra-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.news-article-content {
    line-height: var(--leading-loose);
}

.news-article-content p {
    margin-bottom: var(--space-xl);
    color: var(--text-secondary);
}

.news-article-content h2 {
    margin-top: var(--space-4xl);
    margin-bottom: var(--space-lg);
    font-size: var(--font-3xl);
}

.news-article-content h3 {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-md);
    font-size: var(--font-2xl);
}

.news-article-content h4 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.news-article-content ul,
.news-article-content ol {
    margin-bottom: var(--space-xl);
    padding-left: var(--space-2xl);
}

.news-article-content li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.news-article-content blockquote {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl) var(--space-2xl);
    border-left: 4px solid var(--primary);
    background: var(--background-subtle);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.news-article-footer {
    margin-top: 0;
    padding-top: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.news-article-back {
    text-decoration: none;
    font-weight: var(--font-bold);
    color: var(--text-main);
    transition: color var(--transition-fast);
}

.news-article-back:hover,
.news-article-back:focus {
    color: var(--primary);
}

/* Share controls: a label pill followed by square social buttons,
   matching the article design. */
.news-article-share {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.news-article-share-label {
    padding: var(--space-sm) var(--space-lg);
    background: var(--background-subtle);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    color: var(--text-main);
}

.news-article-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--text-main);
    border-radius: var(--radius-md);
    transition: opacity var(--transition-fast);
}

.news-article-share-link:hover,
.news-article-share-link:focus {
    opacity: 0.8;
}

.news-article-share-link img {
    width: 20px;
    height: 20px;
    /* Render the brand-coloured SVGs as solid white glyphs so they read
       clearly on the dark square buttons. */
    filter: brightness(0) invert(1);
}

/* ========================================
   PAGINATION STYLES
   ======================================== */
.pagination {
    margin-top: var(--space-4xl);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Page numbers use the main text colour, not --primary: the themes'
   primaries are pale pastels, which made the numbers (and white text on
   the current-page chip) unreadable. The pastel fill is kept for the
   current/hovered chip with dark text on top. */
.pagination a {
    padding: var(--space-sm) var(--space-lg);
    text-decoration: none;
    border: 2px solid var(--border-color-dark);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    color: var(--text-main);
    font-weight: var(--font-medium);
    min-width: 44px;
    text-align: center;
}

.pagination a:hover {
    background-color: var(--primary);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .current-page {
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--primary);
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-weight: var(--font-bold);
    min-width: 44px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        gap: var(--space-lg);
        margin-bottom: var(--space-2xl);
        padding-bottom: var(--space-xl);
    }
    
    .news-item:hover {
        transform: none;
    }
    
    .news-item-image {
        width: 100%;
    }
    
    .news-item-image::after {
        top: 6px;
        left: 6px;
    }
    
    .news-item:hover .news-item-image::after {
        top: 8px;
        left: 8px;
    }
    
    .news-item-title {
        font-size: var(--font-2xl);
    }
    
    .news-article-top {
        flex-direction: column;
        gap: var(--space-2xl);
    }

    .news-article-media {
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
    }

    .news-article-content {
        font-size: var(--font-base);
    }
    
    .news-article-content h2 {
        margin-top: var(--space-3xl);
        font-size: var(--font-2xl);
    }
    
    .news-article-content h3 {
        margin-top: var(--space-2xl);
        font-size: var(--font-xl);
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
html.dark-mode .news-item {
    border-bottom-color: var(--border-color);
}

html.dark-mode .news-item-date,
html.dark-mode .news-article-date {
    color: var(--text-muted);
    background: var(--background-subtle);
}

html.dark-mode .news-item-title a {
    color: var(--text-main);
}

html.dark-mode .news-item-title a:hover {
    color: var(--primary);
}

html.dark-mode .news-item-excerpt {
    color: var(--text-secondary);
}

html.dark-mode .news-article-content p,
html.dark-mode .news-article-content li {
    color: var(--text-secondary);
}

html.dark-mode .news-article-content blockquote {
    background: var(--background-subtle);
    border-left-color: var(--primary);
}

/* In dark mode the share button background (--text-main) becomes light,
   so flip the glyphs back to dark for contrast. */
html.dark-mode .news-article-share-link img {
    filter: brightness(0);
}

html.dark-mode .pagination a {
    border-color: var(--border-color-dark);
    color: var(--text-main);
}

html.dark-mode .pagination a:hover {
    background-color: var(--primary);
    color: var(--text-main);
}/* ========================================
   CAREERS LISTING
   ========================================
   Job vacancies rendered into a CMS page via an "include" widget. Each
   vacancy is a full-width white card with the title and a "Read more"
   button on the top row, and a metadata row (location / job type /
   closing date) beneath. */
.careers-listing {
    max-width: var(--max-width-xl);
    margin: 0 auto;
}

.careers-card {
    background: var(--background-body);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-lg);
}

.careers-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.careers-card-title {
    margin: 0;
    font-size: var(--font-xl);
    line-height: var(--leading-tight);
}

.careers-card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.careers-card-title a:hover,
.careers-card-title a:focus {
    color: var(--primary);
}

.careers-card-more {
    flex-shrink: 0;
}

/* Metadata row: label + value pairs. The closing date is pushed to the
   far right of the card. */
.careers-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-sm) var(--space-2xl);
    margin-top: var(--space-md);
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

.careers-meta-item strong {
    color: var(--text-main);
    font-weight: var(--font-semibold);
}

.careers-meta-label {
    color: var(--text-muted);
}

.careers-meta-closing {
    margin-left: auto;
}

/* Empty state: a single centred card. */
.careers-empty {
    background: var(--background-body);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
}

.careers-empty p {
    margin: 0;
    color: var(--text-main);
    font-weight: var(--font-semibold);
}

/* ========================================
   CAREERS DETAIL
   ========================================
   Two-column job page: details + description on the left, application
   form on the right. */
.careers-detail {
    max-width: var(--max-width-xl);
    margin: 0 auto;
}

.careers-detail-top {
    display: flex;
    gap: var(--space-3xl);
    align-items: flex-start;
}

.careers-detail-main {
    flex: 1 1 0;
    min-width: 0;
}

.careers-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.careers-detail-head h1 {
    margin: 0;
    line-height: var(--leading-tight);
    color: var(--text-main);
}

.careers-detail-closing {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: var(--font-sm);
    color: var(--text-muted);
    padding-top: var(--space-xs);
}

.careers-detail-closing strong {
    color: var(--text-main);
    font-weight: var(--font-semibold);
}

/* Detail meta: label / value grid. Labels are normal weight, values are
   bold in the body text colour (not the link colour). */
.careers-detail-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-sm) var(--space-xl);
    margin: 0 0 var(--space-2xl);
}

.careers-detail-meta dt {
    color: var(--text-main);
    font-weight: var(--font-normal);
}

.careers-detail-meta dd {
    margin: 0;
    color: var(--text-main);
    font-weight: var(--font-bold);
}

/* Application form panel. Equal-width column alongside the content. */
.careers-detail-aside {
    flex: 1 1 0;
    min-width: 0;
}

.careers-apply {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.careers-apply-form {
    max-width: none;
    margin: 0;
}

.careers-field {
    margin-bottom: var(--space-md);
}

.careers-field label {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-main);
    font-weight: var(--font-semibold);
    font-size: var(--font-sm);
}

.careers-field input[type="text"],
.careers-field input[type="tel"],
.careers-field input[type="email"],
.careers-field textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    box-sizing: border-box;
    background: var(--background-body);
    color: var(--text-main);
    margin-bottom: 0;
}

.careers-field textarea {
    min-height: 120px;
    resize: vertical;
}

.careers-field-error {
    display: block;
    margin-top: var(--space-xs);
    color: var(--error, #c0392b);
    font-size: var(--font-xs);
}

/* Phone + email side by side. */
.careers-apply-row {
    display: flex;
    gap: var(--space-md);
}

.careers-apply-row .careers-field {
    flex: 1;
    min-width: 0;
}

/* Upload CV / Apply now action row. Both controls share the same height so
   they line up: each uses a 1px border (transparent on the submit button)
   and centres its contents. */
.careers-apply-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.careers-upload,
.careers-apply-submit {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    border: 1px solid transparent;
    line-height: var(--leading-tight);
}

/* A class selector's `display` would otherwise beat the [hidden] default,
   keeping the Upload CV button / selected-file row (and its bin icon)
   visible when JS toggles `hidden`. Re-assert hidden so the bin only shows
   once a file has been selected. */
.careers-upload[hidden],
.careers-file[hidden] {
    display: none;
}

.careers-upload {
    background: var(--background-body);
    color: var(--text-main);
    border-color: var(--text-main);
    cursor: pointer;
    /* The upload control is a <label>, so the global "form label" rule
       gives it a bottom margin that nudged it 4px above the Apply now
       button on the same row. */
    margin-bottom: 0;
}

.careers-upload:hover,
.careers-upload:focus {
    background: var(--background-muted);
    color: var(--text-main);
}

.careers-upload-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.careers-upload-text {
    max-width: 12ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.careers-apply-arrow {
    flex: 0 0 auto;
}

/* Selected-file state: a small square "discard" button (trash icon) next
   to the chosen filename, replacing the Upload CV button. The wrap is a
   flex box (not a plain block) so the inline-flex Upload CV label inside
   it doesn't sit on the text baseline - that baseline gap left the label
   floating a few pixels above the Apply now button. */
.careers-upload-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
}

.careers-file {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    max-width: 100%;
}

.careers-file-remove {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75em;
    height: 2.75em;
    padding: 0;
    background: var(--background-body);
    color: var(--text-main);
    border: 1px solid var(--text-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.careers-file-remove:hover,
.careers-file-remove:focus {
    background: var(--background-muted);
}

.careers-file-name {
    color: var(--text-main);
    font-size: var(--font-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.careers-upload-error,
.careers-apply-senderror {
    display: block;
    margin-top: var(--space-sm);
}

.careers-apply-success h2 {
    margin: 0 0 var(--space-sm);
}

.careers-apply-success p {
    margin: 0;
    color: var(--text-main);
}

/* Back to All / Share lives beneath the description on desktop, but needs to
   fall after the application form once the columns stack on mobile. The block
   is rendered in both positions; show only the appropriate one per viewport. */
.news-article-footer--mobile {
    display: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .careers-card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .careers-meta-closing {
        margin-left: 0;
    }

    .careers-detail-top {
        flex-direction: column;
        gap: var(--space-2xl);
    }

    .careers-detail-main,
    .careers-detail-aside {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .careers-detail-head {
        flex-direction: column;
        gap: var(--space-sm);
    }

    /* Swap to the copy that sits after the application form. */
    .news-article-footer--desktop {
        display: none;
    }

    .news-article-footer--mobile {
        display: flex;
    }
}

/* Small phones: the Upload CV / Apply now pair no longer fits on one row
   (especially once a selected filename replaces the upload button), so
   stack the controls full width instead of letting them collide. */
@media (max-width: 480px) {
    .careers-apply-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .careers-upload-wrap {
        width: 100%;
    }

    .careers-upload,
    .careers-apply-submit {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .careers-file {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .careers-upload-text {
        max-width: 100%;
    }
}

/* ========================================
   DARK MODE
   ======================================== */
html.dark-mode .careers-card,
html.dark-mode .careers-empty {
    background: var(--background-subtle);
}

html.dark-mode .careers-detail-meta dd {
    color: var(--text-main);
}

html.dark-mode .careers-field input,
html.dark-mode .careers-field textarea {
    background: var(--background-body);
    color: var(--text-main);
}
/* ========================================
   CONTACT / ENQUIRY FORM
   ========================================
   A drop-in enquiry form rendered into a CMS page via an "include"
   widget. A two-column grid of fields, a full-width optional message,
   then a reCAPTCHA checkbox and Send button on one row. */
.contact-enquiry {
    max-width: var(--max-width-xl);
    width: 100%;
    margin: var(--space-xl) auto;
}

.contact-enquiry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg) var(--space-2xl);
    margin-bottom: var(--space-lg);
}

.contact-enquiry .contact-field {
    margin: 0;
}

.contact-enquiry .contact-field-message {
    margin-bottom: var(--space-lg);
}

.contact-field label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-weight: var(--font-normal);
    font-size: var(--font-sm);
}

.contact-field input[type="text"],
.contact-field input[type="tel"],
.contact-field input[type="email"],
.contact-field select,
.contact-field textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-base);
    box-sizing: border-box;
    background: var(--background-body);
    color: var(--text-main);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Safari (and to a lesser extent other browsers) applies native
   -webkit-appearance styling to <select>, which ignores the vertical
   padding above and renders the control at its own intrinsic height -
   leaving it visibly shorter than the text inputs. Reset the appearance
   so the select honours the shared padding/font-size box model, then
   re-add a custom dropdown arrow to replace the native one we removed. */
.contact-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Leave room on the right for the custom arrow. */
    padding-right: calc(var(--space-md) + 1.25rem);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    background-size: 12px 8px;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.contact-field textarea {
    min-height: 130px;
    resize: vertical;
}

/* reCAPTCHA on the left, Send button on the right. */
.contact-enquiry-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.contact-enquiry-submit {
    margin-left: auto;
}

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

    .contact-enquiry-foot {
        gap: var(--space-md);
    }

    .contact-enquiry-submit {
        margin-left: 0;
    }
}

/* ========================================
   DARK MODE
   ======================================== */
html.dark-mode .contact-field input,
html.dark-mode .contact-field select,
html.dark-mode .contact-field textarea {
    /* Use background-color (not the background shorthand) so the custom
       dropdown-arrow background-image on the select isn't reset here. */
    background-color: var(--background-body);
    color: var(--text-main);
}
