/*
 * Motley CMS — Frontend Stylesheet
 * ─────────────────────────────────
 * This file controls the public-facing site appearance.
 * Replace this file to reskin the frontend for a new client.
 *
 * Colour palette (see :root block below for values):
 *   Primary:   --color-primary (orange)
 *   Secondary: --color-secondary (green)
 *   Dark:      --color-dark (nav/footer)
 *   Error:     --color-error (red)
 */

/* ── Design Tokens ─────────────────────────────── */
/* To reskin: change the values here. One variable = one design decision. */
:root {
    /* Primary brand colour — headings, links, buttons, active nav, CTAs, stats, form focus */
    --color-primary:         #f04e23;
    --color-primary-hover:   #d4431e;
    --color-primary-tint:    #fdf5f3;
    --color-primary-rgb:     240, 78, 35;

    /* Secondary accent — success states, badges, footer links, pricing checkmarks */
    --color-secondary:       #8cc14d;
    --color-secondary-hover: #7ab03e;

    /* Navigation bar and footer background */
    --color-dark:            #494040;
    --color-dark-border:     #5a5252;

    /* Error states, draft badges */
    --color-error:           #c14e48;

    /* Backgrounds */
    --color-bg-alt:          #f5f5f5;
    --color-bg-warm:         #f9f8f6;
    --color-bg-subtle:       #f9f9f9;

    /* Borders */
    --color-border:          #e5e7eb;

    /* Font — must be loaded via a @import or <link> in the layout if changing */
    --font-family:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

    /* Display font — same family as body; weight/letter-spacing carry the
       headline look. Designer-specified typeface: Inter. */
    --font-display:          'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

    /* Hero band background (the light-blue homepage hero) and near-black ink */
    --color-hero-bg:         #bfe0ef;
    --color-hero-bg-2:       #d8edf6;
    --color-ink:             #1c1c1c;

    /* The 2026 design artboard: 1440px page, 30px white frame inside it */
    --page-max:              1440px;
    --page-frame:            30px;

    /* Max width of all page content */
    --container-width:       1140px;

    /* Vertical space between page builder blocks */
    --block-gap:             2.5rem;

    /* Border radius — sm: buttons, md: cards/images, lg: modals/large cards */
    --radius-sm:             4px;
    --radius-md:             6px;
    --radius-lg:             8px;
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Reserve the scrollbar gutter always so the in-flow header (hamburger)
   and the fixed nav overlay (close X) measure the same width — keeps the
   X aligned to the hamburger and stops the open/close layout shift. */
html { font-size: 16px; scroll-behavior: smooth; scrollbar-gutter: stable; }

/* ── Base ──────────────────────────────────────── */
body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background: #fff;
    /* Stops the u-full-bleed layout helper's 100vw width triggering a
       horizontal scrollbar. `clip` (not `hidden`) so it never turns body into
       a scroll container and breaks position:sticky elements. */
    overflow-x: clip;
}
@supports not (overflow-x: clip) {
    body { overflow-x: hidden; }
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Container ─────────────────────────────────── */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.25rem; }

/* ── Preview Banner ────────────────────────────── */
.preview-banner {
    background: var(--color-error);
    color: #fff;
    text-align: center;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.draft-badge {
    display: inline-block;
    background: var(--color-error);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* ── Admin Bar ─────────────────────────────────── */
.admin-bar {
    background: #000;
    color: #fff;
    padding: 0.4rem 1.25rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}
.admin-bar a { color: #fff; }
.admin-bar a:hover { color: var(--color-secondary); text-decoration: none; }

/* ── Header ────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--color-primary);
    padding: 1rem 0;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-name { font-size: 1.5rem; font-weight: 700; color: #333; }
.site-name a { color: inherit; }
.site-name a:hover { text-decoration: none; }
.site-strapline { font-size: 0.85rem; color: #707070; font-weight: 400; }

/* ── Navigation ────────────────────────────────── */
.site-nav { background: var(--color-dark); }
.nav-main { list-style: none; display: flex; flex-wrap: wrap; gap: 0; }
.nav-item { position: relative; }
.nav-item > a {
    display: block;
    padding: 0.75rem 1.15rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 0.2s ease;
}
.nav-item > a:hover,
.nav-item.active > a { background: var(--color-primary); text-decoration: none; }
.nav-sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 100;
    list-style: none;
}
.nav-item:hover .nav-sub { display: block; }
.nav-sub a {
    display: block;
    padding: 0.6rem 1.15rem;
    color: #333;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}
.nav-sub a:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* Nav item icons (ICON-PICKER) */
.nav-icon-wrap { display: inline-flex; align-items: center; vertical-align: -0.125em; margin-right: 0.4rem; }
.nav-icon { width: 1.05em; height: 1.05em; }

/* Nav heading (dropdown parent only) */
.nav-heading .nav-label {
    display: block;
    padding: 0.75rem 1.15rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: default;
    transition: background 0.2s ease;
}
.nav-heading:hover .nav-label { background: var(--color-primary); }
.nav-heading:hover .nav-sub { display: block; }

/* Inactive nav items (admins only) */
.nav-item.inactive > a { opacity: 0.5; border-bottom: 2px dashed var(--color-error); }
.nav-item.inactive > a::after { content: ' [draft]'; font-size: 0.7rem; text-transform: uppercase; color: var(--color-error); }
.nav-sub .inactive a { opacity: 0.5; font-style: italic; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 700;
}

/* ── Typography ────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.75rem; line-height: 1.25; }
h2 { font-size: 1.45rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.6rem; line-height: 1.3; }
h3 { font-size: 1.2rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.5rem; line-height: 1.35; }
p { margin-bottom: 1rem; }

/* ── Page Content ──────────────────────────────── */
.page-hero { background: var(--color-bg-alt); padding: 2.5rem 0; margin-bottom: 2rem; border-bottom: 1px solid #e0e0e0; }
/* Hero heading — big bold display style (site-wide, all page heroes).
   Colour is intentionally NOT set here: static-hero.blade.php sets the
   container colour by tint (white over dark images, inherited otherwise),
   so a hardcoded colour here would break text on dark photo heroes. */
.page-hero h1, .page-hero-heading {
    margin: 0 0 0.5rem 0;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.05;
    letter-spacing: 0.005em;
}
.page-hero .excerpt { color: #555; font-size: 1.05rem; }

/* Homepage hero — constrain the text column (heading + caption) to a
   tighter measure. Scoped to the homepage only via the body.is-home class;
   covers both hero types (slideshow/video overlay and static image). */
.is-home .slideshow-overlay-heading,
.is-home .slideshow-overlay-content h2,
.is-home .slideshow-caption,
.is-home .page-hero-heading,
.is-home .static-hero__caption { max-width: 500px; }
.page-body-heading { padding: 1.5rem 0 0.5rem; }
.page-body-heading h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; }

.page-body { padding: 2rem 0 3rem; }

/* 2026 (install-local — see UPGRADE-DIVERGENCES.md): content & listing pages
   fill the framed page width, matching the homepage/SEO full-bleed blocks,
   instead of sitting in the narrow ~1120px .container column. We widen the
   page-level containers (heading band, breadcrumbs, body) so they all align at
   the same gutters. Both width and max-width are overridden because the critical
   inline CSS sets .container{width:min(1120px,92vw)} and frontend.css sets its
   max-width. The bespoke case-study detail (.cs-*) keeps its designed widths. */
.page-body > .container,
.page-body-heading > .container,
.container.breadcrumbs-wrap {
  width: auto;
  max-width: none;
}
.page-body .cms-content { font-size: 1rem; line-height: 1.7; }
.page-body .cms-content h1 { font-size: 1.6rem; }
.page-body .cms-content h2 { font-size: 1.35rem; }
.page-body .cms-content h3 { font-size: 1.15rem; }
.page-body .cms-content img { margin: 1rem 0; border-radius: 4px; }
.page-body .cms-content img.img-left { float: left; display: inline; margin: 0 1.25em 0.75em 0; }
.page-body .cms-content img.img-right { float: right; display: inline; margin: 0 0 0.75em 1.25em; }
.page-body .cms-content img.img-centre { display: block; margin-left: auto; margin-right: auto; }
/* Media-library images are wrapped in <picture> by ResponsiveImage's responsive
   rewrite, which copies the alignment class onto the wrapper. Float the wrapper
   (the layout box) and neutralise the inner <img> float so they don't double up.
   Bare <img> (no variants) still uses the rules above. */
.page-body .cms-content picture.img-left { float: left; margin: 0 1.25em 0.75em 0; }
.page-body .cms-content picture.img-right { float: right; margin: 0 0 0.75em 1.25em; }
.page-body .cms-content picture.img-centre { display: block; margin-left: auto; margin-right: auto; width: max-content; max-width: 100%; }
.page-body .cms-content picture.img-left > img,
.page-body .cms-content picture.img-right > img,
.page-body .cms-content picture.img-centre > img { float: none; margin: 0; }
/* The bespoke case-study detail layout renders body copy in .cs-text, not
   .page-body .cms-content, so the float helpers above never reach it. Mirror
   them onto .cs-text (bare <img> and <picture>-wrapped media-library images)
   so a floated inline image works inside a case-study text block too.
   Install-local — .cs-text is the Motley case-study layout. See UPGRADE-DIVERGENCES.md. */
.cs-text img.img-left { float: left; margin: 0 1.25em 0.75em 0; }
.cs-text img.img-right { float: right; margin: 0 0 0.75em 1.25em; }
.cs-text img.img-centre { display: block; margin-left: auto; margin-right: auto; }
.cs-text picture:has(> img.img-left) { float: left; margin: 0 1.25em 0.75em 0; }
.cs-text picture:has(> img.img-right) { float: right; margin: 0 0 0.75em 1.25em; }
.cs-text picture:has(> img.img-centre) { display: block; margin-left: auto; margin-right: auto; width: max-content; max-width: 100%; }
.cs-text picture > img.img-left,
.cs-text picture > img.img-right,
.cs-text picture > img.img-centre { float: none; margin: 0; }
.page-body .cms-content ul,
.page-body .cms-content ol { margin: 0.75rem 0 1rem 1.5rem; }
.page-body .cms-content li { margin-bottom: 0.3rem; }
.page-body .cms-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0;
    background: var(--color-primary-tint);
    color: #555;
}

/* ── Content Rows ──────────────────────────────── */
.content-row { margin-bottom: 2rem; padding: 1.5rem 0; border-bottom: 1px solid #eee; }
.content-row:last-child { border-bottom: none; }
.content-row h2 { font-size: 1.3rem; }
.content-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.content-row-grid.has-image { grid-template-columns: 1fr 300px; }

/* ── Cards (listings) ──────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card-image { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.card-body h3 a { color: var(--color-primary); }
.card-body p { font-size: 0.9rem; color: #555; margin-bottom: 0.75rem; }
.card-meta { font-size: 0.8rem; color: #989898; }

/* ── Blog category filter (install-local — see UPGRADE-DIVERGENCES.md) ─── */
.blog-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1.75rem; }
.blog-filter__label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-dark); margin-right: 0.15rem; }
.blog-filter__chip {
    display: inline-block; padding: 0.35rem 0.85rem; font-size: 0.85rem; line-height: 1;
    border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-dark);
    background: #fff; transition: background .15s, color .15s, border-color .15s;
}
.blog-filter__chip:hover { background: var(--color-primary-tint); border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.blog-filter__chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.blog-filter__chip.is-active:hover { color: #fff; }
.blog-filter__empty { color: #989898; font-style: italic; padding: 1rem 0; }
.post-category { font-size: 0.85rem; color: #989898; margin-top: 0.35rem; }
.post-category a { font-weight: 600; }

/* ── Article page: category pills below the date (install-local) ─────────── */
.post-categories { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.post-category-pill {
    display: inline-block; padding: 0.3rem 0.8rem; font-size: 0.75rem; line-height: 1;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    border: 1px solid var(--color-border); border-radius: 999px;
    color: var(--color-dark); background: #fff;
    transition: background .15s, color .15s, border-color .15s;
}
.post-category-pill:hover {
    background: var(--color-primary); border-color: var(--color-primary);
    color: #fff; text-decoration: none;
}

/* ── Blog listing: search box (install-local) ───────────────────────────── */
.blog-filters { margin: 0 0 1.75rem; }
.blog-search { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; margin: 0 0 1rem; }
.blog-search__input {
    flex: 0 1 280px; padding: 0.5rem 0.9rem; font-size: 0.9rem;
    border: 1px solid var(--color-border); border-radius: 999px;
    background: #fff; color: var(--color-dark);
}
.blog-search__input:focus { outline: none; border-color: var(--color-primary); }
.blog-search__btn {
    padding: 0.5rem 1.15rem; font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.03em; cursor: pointer;
    border: 1px solid var(--color-primary); border-radius: 999px;
    background: var(--color-primary); color: #fff;
    transition: background .15s, border-color .15s;
}
.blog-search__btn:hover { background: var(--color-dark); border-color: var(--color-dark); }
.blog-search__clear { font-size: 0.85rem; color: #989898; }
.blog-search__clear:hover { color: var(--color-primary); }
.blog-filters .blog-filter { margin-bottom: 0; }

/* ── Blog listing cards — legacy "articles" vein, compact (install-local) ─── */
.blog-feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 700px) { .blog-feed { grid-template-columns: 1fr; } }

.blog-post-card {
    display: flex; flex-direction: column;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 1.15rem 1.25rem 1rem;
    position: relative;          /* anchor for the whole-card stretched link */
    cursor: pointer;
}
.blog-post-card__title { margin: 0 0 0.85rem; }
.blog-post-card__title a {
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.25;
    letter-spacing: 0.005em;
}
.blog-post-card__title a:hover { color: var(--color-primary-hover); text-decoration: none; }

.blog-post-card__body { display: flex; gap: 0.9rem; align-items: flex-start; }

.blog-post-card__date {
    flex: 0 0 auto; width: 56px;
    background: var(--color-primary); color: #fff;
    text-align: center; padding: 0.45rem 0.25rem 0.4rem; border-radius: 0; line-height: 1;
}
.blog-post-card__date .m { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.blog-post-card__date .d { display: block; font-size: 1.45rem; font-weight: 700; margin: 0.12rem 0; }
.blog-post-card__date .y { display: block; font-size: 0.7rem; opacity: 0.85; }

.blog-post-card__summary {
    margin: 0; font-size: 0.9rem; line-height: 1.55; color: #555;
    display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.blog-post-card__foot { margin-top: auto; padding-top: 1rem; display: flex; justify-content: flex-end; }
.blog-post-card__more {
    display: inline-block; background: var(--color-secondary); color: #fff;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.5rem 1rem; border-radius: 0;
    position: relative; z-index: 2;   /* stays clickable above the card's stretched link */
}
.blog-post-card__more:hover { background: var(--color-secondary-hover); color: #fff; text-decoration: none; }

/* Whole-card link: the title link's ::after expands to cover the entire card, so
 * clicking anywhere on an Articles card follows through to the post. Read more is
 * lifted above it (z-index above) so it still works as its own target. */
.blog-post-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* TEMPORARY: hide the "Read more" button on Articles cards while previewing the
 * look without it. The whole card is a stretched link, so it stays clickable.
 * Remove this rule to bring the button back. */
.blog-post-card__foot { display: none; }

/* ── Pagination — connected square-box pager (« first · ‹ prev · numbers · ›
 * next · » last). Box geometry follows CMS-Dev's `pagination.motley`; the
 * COLOURS are this install's original scheme (neutral grey boxes, dark numbers,
 * orange current page) per site preference. Disabled arrows are hidden entirely
 * rather than greyed out (Square Club behaviour) — page 1 drops « ‹, the last
 * page drops › ». The pager is already hidden on single-page sets via the view's
 * hasPages() guard. */
.pagination-wrap { padding: 2rem 0; display: flex; justify-content: center; }
.pagination-wrap--top { padding-top: 0; }   /* pager mirrored above the feed: sit tight under the heading, keep the gap to the grid */
.cms-pagination { display: inline-flex; flex-wrap: wrap; justify-content: center; }
.cms-pagination__item {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 46px; height: 46px; padding: 0 0.6rem;
    margin-left: -1px;                        /* collapse adjacent borders → connected */
    font-size: 0.95rem; font-weight: 600; line-height: 1;
    border: 1px solid #ddd; border-radius: 0;
    color: #333; background: #fff; text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.cms-pagination__item:first-child { margin-left: 0; }
a.cms-pagination__item:hover {
    background: var(--color-bg-alt); border-color: #ddd;
    color: #333; text-decoration: none;       /* no underline on hover */
    position: relative; z-index: 1;
}
.cms-pagination__item.is-current {
    background: var(--color-primary); border-color: var(--color-primary);
    color: #fff; position: relative; z-index: 1;
}
.cms-pagination__item.is-gap { color: #c2c3d0; border-color: #dcdce5; cursor: default; }
.cms-pagination__item.is-disabled { display: none; }

/* ── Buttons ───────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.55rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--color-secondary); color: #fff; }
.btn-secondary:hover { background: var(--color-secondary-hover); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
/* Buttons with an icon (ICON-PICKER) */
.btn--has-icon { display: inline-flex; align-items: center; gap: 0.5rem; }
.btn__icon { width: 1.1em; height: 1.1em; flex: 0 0 auto; display: inline-block; }

/* ── Content Sections (feeds) ──────────────────── */
.content-section { padding: 2rem 0; border-top: 2px solid #f0f0f0; }
.content-section h2 { margin-bottom: 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-primary); display: inline-block; }

/* Feed display styles */
.feed-list .feed-item { padding: 0.75rem 0; border-bottom: 1px solid #eee; }
.feed-list .feed-item:last-child { border-bottom: none; }
.feed-list .feed-item h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.feed-list .feed-item p { font-size: 0.85rem; color: #555; margin: 0; }
.feed-list .feed-item .card-meta { font-size: 0.75rem; }

.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.feed-grid .feed-item img { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; }
.feed-grid .feed-item h3 { font-size: 0.9rem; margin-top: 0.4rem; }

.feed-compact .feed-item { display: flex; gap: 0.75rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid #f0f0f0; }
.feed-compact .feed-item:last-child { border-bottom: none; }
.feed-compact .feed-item h3 { font-size: 0.9rem; margin: 0; }
.feed-compact .feed-item .card-meta { font-size: 0.7rem; }
.feed-compact .feed-item p { display: none; }

/* Inline icon used in list / compact rows for downloads (↓) and links (↗) */
.feed-item .feed-icon,
.feed-compact .feed-item .feed-icon { display: inline-block; margin-right: 0.4rem; color: var(--color-primary); font-weight: 700; }

/* Card-mode row for downloads / links / videos that have no thumbnail.
   Keep card body padding and a subtle accent so they do not look empty. */
.card-grid .card .card-body > .card-meta { display: inline-block; margin-top: 0.35rem; color: #777; font-size: 0.8rem; }

/* Action button rendered at the end of card-mode rows for downloads. */
.card-grid .card .card-body .feed-action { display: inline-block; margin-top: 0.6rem; }

/* ── Testimonials ──────────────────────────────── */
.testimonial-card {
    background: var(--color-primary-tint);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0 6px 6px 0;
}
.testimonial-card .quote { font-style: italic; font-size: 1rem; margin-bottom: 0.75rem; color: #444; }
.testimonial-card .author { font-weight: 700; color: #333; }
.testimonial-card .role { font-size: 0.85rem; color: #777; }
.testimonial-card .rating { color: var(--color-primary); margin-bottom: 0.5rem; }

/* ── FAQ ────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid #e8e8e8; padding: 0; }
.faq-item > summary { font-weight: 700; font-size: 1.05rem; color: #333; cursor: pointer; padding: 1rem 1.5rem 1rem 0; position: relative; user-select: none; list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 300; color: var(--color-primary); }
.faq-item[open] > summary::after { content: '−'; }
.faq-item > summary:hover { color: var(--color-primary); }
.faq-answer { display: none; padding: 0.75rem 0 1rem 0; color: #555; line-height: 1.65; }
.faq-item[open] .faq-answer { display: block; }
.faq-category { font-size: 1.2rem; color: var(--color-primary); margin: 1.5rem 0 0.75rem; font-weight: 700; }

/* ── Staff Grid ────────────────────────────────── */
.staff-card { text-align: center; }
.staff-card img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 3px solid var(--color-primary); }
.staff-card h3 { color: #333; font-size: 1.05rem; margin-bottom: 0.2rem; }
.staff-card .job-title { color: var(--color-primary); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; }
.staff-card .bio { font-size: 0.85rem; color: #555; }

/* ── Gallery ───────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.gallery-grid img { width: 100%; height: 180px; object-fit: cover; border-radius: 4px; cursor: pointer; transition: opacity 0.2s; }
.gallery-grid img:hover { opacity: 0.85; }
.gallery-caption { display: block; font-size: 0.8rem; color: #777; margin-top: 0.3rem; text-align: center; }

/* ── Downloads / Links / Videos ────────────────── */
.list-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #eee; }
.list-item:last-child { border-bottom: none; }
.list-item h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.list-item p { font-size: 0.85rem; color: #555; margin-bottom: 0; }
.list-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* ── Event Meta ────────────────────────────────── */
.event-meta { font-size: 0.85rem; color: #777; margin-bottom: 0.5rem; }
.event-meta strong { color: #333; }
.event-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 3px; text-transform: uppercase; }
.event-badge.upcoming { background: var(--color-secondary); color: #fff; }
.event-badge.past { background: #b6b6b6; color: #fff; }

/* Pagination styling now lives in the `.cms-pagination` block above (single
 * source of truth, matching CMS-Dev's `pagination.motley` view). The old
 * `.pagination-wrap span/a` rules that styled Laravel's default pager were
 * removed — every listing now uses pagination.motley, and those rules were
 * overriding the new pager's flex centring (taller boxes, top-aligned numbers). */

/* ── Contact Form ─────────────────────────────── */
.contact-form-section { padding: 2.5rem 0 1rem; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* Form side */
.contact-form-wrap { background: var(--color-bg-warm); border-radius: 8px; padding: 2rem; }
.contact-form-wrap h2 { font-size: 1.2rem; color: var(--color-dark); margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.3rem; color: var(--color-dark); }
.form-group .required { color: var(--color-error); }
.form-group input,
.form-group textarea {
    width: 100%; padding: 0.65rem 0.85rem; border: 1px solid #ddd; border-radius: 5px;
    font-family: inherit; font-size: 0.9rem; background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1); }
.form-group textarea { resize: vertical; min-height: 140px; }
.form-error { display: block; color: var(--color-error); font-size: 0.78rem; margin-top: 0.25rem; }
.form-actions { margin-top: 0.5rem; }
.btn { display: inline-block; padding: 0.7rem 2rem; border: none; border-radius: 5px; font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.2s, transform 0.1s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; text-decoration: none; }

/* Alerts */
.form-alert { padding: 1rem 1.25rem; border-radius: 6px; margin-bottom: 1.5rem; font-size: 0.9rem; line-height: 1.5; }
.form-alert-success { background: #f0faf0; border-left: 4px solid var(--color-secondary); color: #2d5a2d; }
.form-alert-error { background: #fef2f2; border-left: 4px solid var(--color-error); color: #991b1b; }

/* Form builder rendered forms */
.cms-form-wrap { margin-top: 1.5rem; background: var(--color-bg-warm); border-radius: 8px; padding: 2rem; }
.form-group select {
    width: 100%; padding: 0.65rem 0.85rem; border: 1px solid #ddd; border-radius: 5px;
    font-family: inherit; font-size: 0.9rem; background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23666'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem; padding-right: 2.5rem;
}
.form-group select:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1); }
.form-group input[type="checkbox"] { width: auto; accent-color: var(--color-primary); }
.form-group input[type="radio"] { width: auto; accent-color: var(--color-primary); margin: 0; }
.form-group .form-radio-group { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.25rem 0; }
.form-group .form-radio-option { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; cursor: pointer; }
.form-group input[type="date"] { width: 100%; padding: 0.65rem 0.85rem; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; font-size: 0.9rem; }

/* Details side */
.contact-details-wrap { padding: 1rem 0; }
.contact-details-wrap h2 { font-size: 1.2rem; color: var(--color-dark); margin-bottom: 1.5rem; }
.contact-detail { margin-bottom: 1.25rem; padding-left: 1rem; border-left: 3px solid var(--color-primary); }
.contact-detail strong { display: block; font-size: 0.75rem; color: #999; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 0.2rem; font-weight: 600; }
.contact-detail a { color: #333; font-weight: 500; }
.contact-detail a:hover { color: var(--color-primary); }
.contact-detail span { color: #555; line-height: 1.7; }

/* ── Footer ────────────────────────────────────── */
.site-footer { background: var(--color-dark); color: #ccc; padding: 2.5rem 0 1.5rem; margin-top: 3rem; font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--color-primary); display: inline-block; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.35rem; }
.footer-col a { color: #ccc; }
.footer-col a:hover { color: var(--color-primary); }
.footer-bottom { border-top: 1px solid var(--color-dark-border); padding-top: 1rem; text-align: center; color: #999; font-size: 0.8rem; }
.footer-bottom a { color: var(--color-secondary); }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-main { display: none; flex-direction: column; }
    .nav-main.open { display: flex; }
    .nav-sub { position: static; box-shadow: none; }
    .nav-item:hover .nav-sub { display: none; }
    .nav-item.sub-open .nav-sub { display: block; }
    /* Dropdown affordance — chevron on any nav item that expands a sub-menu,
       so on mobile (tap-to-open) it's clear the item reveals more (P3-4).
       :has() keeps it markup-driven (no extra class needed); :not(.inactive)
       leaves the admin-only "[draft]" ::after marker alone. */
    .nav-item:has(> .nav-sub):not(.inactive) > a,
    .nav-heading:has(> .nav-sub) > .nav-label { position: relative; padding-right: 2.6rem; }
    .nav-item:has(> .nav-sub):not(.inactive) > a::after,
    .nav-heading:has(> .nav-sub) > .nav-label::after {
        content: "";
        position: absolute;
        right: 1.2rem;
        top: 50%;
        margin-top: -0.35rem;
        width: 0.5rem;
        height: 0.5rem;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
        pointer-events: none;
    }
    .nav-item.sub-open:has(> .nav-sub):not(.inactive) > a::after,
    .nav-heading.sub-open:has(> .nav-sub) > .nav-label::after { transform: rotate(225deg); margin-top: -0.15rem; }
    .content-row-grid,
    .content-row-grid.has-image { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .contact-details-wrap { order: -1; }
    .form-row { grid-template-columns: 1fr; }
    h1 { font-size: 1.5rem; }
    .builder-cta { padding: 2rem 1.5rem; }
}

/* ── Breadcrumbs ───────────────────────────────── */
/* Left-align to the page gutter (not centred). */
.breadcrumbs-wrap { padding-top: 0.9rem; padding-bottom: 0.2rem; margin-inline: 0; text-align: left; }
.breadcrumbs ol { justify-content: flex-start; }
.breadcrumbs { font-size: 0.85rem; margin: 0 0 0.5rem; color: #6b7280; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 0.4rem; color: #9ca3af; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumbs li[aria-current="page"] { color: #1f2937; font-weight: 500; }

/* ── Breadcrumbs sit BELOW the hero/banner ───────────────────────────────────
 * Breadcrumbs render in the layout above @yield('content'), but each page's hero
 * is the first element inside that yield — so by default the crumb strip lands
 * above the full-bleed banner. Reorder <main>'s direct children with flexbox so
 * the order becomes hero → breadcrumbs → body. Pages with no hero keep the crumbs
 * at the top of the content (the hero rule simply matches nothing). Scoped off the
 * homepage (which has no breadcrumbs) so its layout/spacing is untouched. */
body:not(.is-home) main { display: flex; flex-direction: column; }
body:not(.is-home) main > * { order: 3; }
body:not(.is-home) main > .page-hero,
body:not(.is-home) main > .static-hero,
body:not(.is-home) main > .section-hero,
body:not(.is-home) main > .slideshow-hero,
body:not(.is-home) main > .case-study-hero { order: 1; }
body:not(.is-home) main > .breadcrumbs-wrap { order: 2; }

/* ── Page Builder Blocks ───────────────────────── */
.builder-block { margin-bottom: var(--block-gap); }
.builder-block:last-child { margin-bottom: 0; }
.builder-block__heading { margin-top: 0; margin-bottom: 1rem; }

.builder-block__image img { width: 100%; height: auto; border-radius: 6px; display: block; }

/* Map blocks — full-width, map+text, map+image */
.builder-map { width: 100%; border-radius: 6px; overflow: hidden; }
.builder-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.builder-map__popup { font: 14px/1.5 'Inter', system-ui, sans-serif; max-width: 260px; }
.builder-map__popup strong { display: block; margin-bottom: 4px; }
.builder-map__popup a { color: var(--color-primary); text-decoration: none; }
.builder-map__popup a:hover { text-decoration: underline; }

/* Admin-preview-only warning shown inside empty/invalid blocks. Public visitors never see this. */
.builder-block__warning {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    color: #92400e;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Multi-column layouts (expert mode) */
.builder-grid { display: grid; gap: 2rem; align-items: start; }
.builder-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.builder-grid--4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.builder-grid--1-2 { grid-template-columns: 1fr 2fr; }
.builder-grid--2-1 { grid-template-columns: 2fr 1fr; }
/* Responsive — declared AFTER the base column rules so they win (equal specificity). */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet: 4-col → 2-col grid; 3-col stays as 3 but tighter */
    .builder-grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .builder-grid--3,
    .builder-grid--4,
    .builder-grid--1-2,
    .builder-grid--2-1 { grid-template-columns: 1fr; }
}

/* ── Block layout helpers (config: cms.block_utilities) ─────────────────────
   Discoverable design tweaks ticked on from a block's Design → Layout helpers
   picker and emitted onto the .builder-block wrapper. Core helpers use the `u-`
   prefix so they never collide with per-site custom classes.

   u-stack-reverse — reverse the column order ONLY when the block has stacked
   (≤768px). Works on any multi-column block: .content-row-grid (two_column /
   image_text / map_text / map_image / form_text + form_image in left-right mode)
   and .builder-grid (3/4-col + asymmetric). Switches the collapsed grid to flex
   column-reverse so it reverses whatever column count the block has. Desktop
   layout is untouched. (Graduated from the Square Club install's site-only
   sc-stack-reverse.) */
@media (max-width: 768px) {
    .u-stack-reverse .content-row-grid,
    .u-stack-reverse .builder-grid {
        display: flex;
        flex-direction: column-reverse;
    }
}

/* u-align-middle — vertically centre a multi-column block's columns (the grids
   default to top-aligned). Pairs well with Image + Text when the copy is
   shorter than the image. Targets the same grid containers as u-stack-reverse. */
.u-align-middle .content-row-grid,
.u-align-middle .builder-grid { align-items: center; }

/* u-full-bleed — break the block out of the centred page container so its
   background spans the full viewport width, edge to edge. Pairs with the Design
   tab's background colour / image. box-sizing keeps the inner gutter inside the
   100vw (no overflow); the gutter stops content hitting the screen edge and is
   overridden if the editor sets padding on the Design tab. The horizontal
   scrollbar this width could cause is absorbed by body { overflow-x: clip }. */
.u-full-bleed {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* u-elevate — soft drop shadow to lift a block off the page (card style).
   Combine with the Design tab's corner radius for a rounded card. */
.u-elevate { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10); }

/* u-hide-mobile / u-hide-desktop — breakpoint visibility. !important so they win
   over any block-type display rule. */
@media (max-width: 768px) { .u-hide-mobile { display: none !important; } }
@media (min-width: 769px) { .u-hide-desktop { display: none !important; } }

/* Stacked layout (form_text/form_image with above/below position) */
.builder-stack { display: flex; flex-direction: column; gap: 2rem; }

/* CTA */
.builder-cta { padding: 3.5rem 2rem; text-align: center; border-radius: 6px; }
.builder-cta--banner { background: var(--color-primary); color: #fff; }
.builder-cta--banner h2 { color: #fff; }
.builder-cta--card { background: var(--color-bg-subtle); border: 1px solid var(--color-border); max-width: 640px; margin: 0 auto; }
.builder-cta--minimal { text-align: left; padding: 1.5rem 0; }
.builder-cta__inner { max-width: 720px; margin: 0 auto; }
.builder-cta h2 { margin-bottom: 0.75rem; }
.builder-cta p { margin-bottom: 1.25rem; opacity: 0.9; }

/* Gallery — two layouts: grid (uniform squares) or masonry (staggered, natural shape) */
.builder-gallery { gap: 0.75rem; }

/* Grid: equal-sized square tiles, images cropped via object-fit */
.builder-gallery--grid { display: grid; }
.builder-gallery--grid.builder-gallery--2col { grid-template-columns: repeat(2, 1fr); }
.builder-gallery--grid.builder-gallery--3col { grid-template-columns: repeat(3, 1fr); }
.builder-gallery--grid.builder-gallery--4col { grid-template-columns: repeat(4, 1fr); }
.builder-gallery--grid .builder-gallery__item { aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.builder-gallery--grid .builder-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Masonry: CSS column-count for staggered, preserve-aspect-ratio layout */
.builder-gallery--masonry { column-gap: 0.75rem; }
.builder-gallery--masonry.builder-gallery--2col { column-count: 2; }
.builder-gallery--masonry.builder-gallery--3col { column-count: 3; }
.builder-gallery--masonry.builder-gallery--4col { column-count: 4; }
.builder-gallery--masonry .builder-gallery__item {
    break-inside: avoid;
    margin: 0 0 0.75rem;
    border-radius: 4px;
    overflow: hidden;
    display: block;
}
.builder-gallery--masonry .builder-gallery__item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Legacy fallback: any old gallery markup without --grid/--masonry class behaves
   like the previous grid implementation. */
.builder-gallery:not(.builder-gallery--grid):not(.builder-gallery--masonry) {
    display: grid;
}
.builder-gallery:not(.builder-gallery--grid):not(.builder-gallery--masonry).builder-gallery--2col { grid-template-columns: repeat(2, 1fr); }
.builder-gallery:not(.builder-gallery--grid):not(.builder-gallery--masonry).builder-gallery--3col { grid-template-columns: repeat(3, 1fr); }
.builder-gallery:not(.builder-gallery--grid):not(.builder-gallery--masonry).builder-gallery--4col { grid-template-columns: repeat(4, 1fr); }
.builder-gallery:not(.builder-gallery--grid):not(.builder-gallery--masonry) .builder-gallery__item { aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.builder-gallery:not(.builder-gallery--grid):not(.builder-gallery--masonry) .builder-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Responsive — declared AFTER the base column rules so they win (equal specificity). */
@media (max-width: 768px) {
    .builder-gallery--grid.builder-gallery--3col,
    .builder-gallery--grid.builder-gallery--4col { grid-template-columns: repeat(2, 1fr); }
    .builder-gallery--masonry.builder-gallery--3col,
    .builder-gallery--masonry.builder-gallery--4col { column-count: 2; }
}

/* Video */
.builder-video { margin: 0 auto; max-width: 900px; }
.builder-video__frame { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 6px; }
.builder-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.builder-video__caption { text-align: center; color: #666; font-size: 0.85rem; margin-top: 0.6rem; }

/* Accordion */
.builder-accordion { display: flex; flex-direction: column; gap: 0.5rem; }

/* Audio embed (Spotify, SoundCloud, Apple Podcasts) — fixed-height, not 16:9 */
.builder-video--audio { max-width: 900px; }
.builder-video--audio iframe { display: block; border-radius: 8px; }

/* Pull Quote */
.builder-quote { margin: 1.5rem 0; padding: 1.5rem; border-left: 4px solid var(--color-primary); }
.builder-quote--centred { text-align: center; border-left: 0; padding: 2rem 1rem; }
.builder-quote--card { border-left: 0; background: #f8f8f8; border-radius: 8px; padding: 2rem; position: relative; }
.builder-quote--card::before { content: '\201C'; position: absolute; top: -0.5rem; left: 1rem; font-size: 5rem; color: var(--color-primary); line-height: 1; opacity: 0.3; font-family: Georgia, serif; }
.builder-quote__text { font-size: 1.25rem; font-style: italic; line-height: 1.5; margin: 0 0 1rem; }
.builder-quote__cite { font-style: normal; font-size: 0.9rem; color: #555; }
.builder-quote__cite cite { font-style: normal; font-weight: 600; color: #222; }
.builder-quote__role { display: block; color: #888; font-size: 0.85rem; margin-top: 0.15rem; }

/* Buttons block */
.builder-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.builder-buttons--left { justify-content: flex-start; }
.builder-buttons--center { justify-content: center; }
.builder-buttons--right { justify-content: flex-end; }
.btn-secondary { background: #6c757d; color: #fff; padding: 0.6rem 1.2rem; border-radius: 4px; text-decoration: none; display: inline-block; }
.btn-secondary:hover { background: #5a6268; }
.btn-outline { background: transparent; color: var(--color-primary); padding: 0.55rem 1.2rem; border: 2px solid var(--color-primary); border-radius: 4px; text-decoration: none; display: inline-block; }
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* Case-study top "Back to portfolio" floats right in its own row (the bespoke
   .cs-* layout has no breadcrumb-action slot to share). The button is an
   inline-block, so right-aligning its block wrapper pushes it to the edge. */
.cs-back-top { text-align: right; }

/* Show pages (blog/news/events/gallery) put their top "Back" button on the SAME
   line as the breadcrumbs via @section('breadcrumb_action') — crumbs LEFT, button
   RIGHT on desktop. The wrap only gets .breadcrumbs-wrap--has-action when the slot
   is filled, so plain breadcrumb rows are untouched. Stacks below the crumbs on
   narrow screens. text-align:right on the action is a belt-and-braces fallback so
   the button stays right even if the flex row is ever not applied. */
.breadcrumbs-wrap--has-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.breadcrumbs-wrap--has-action .breadcrumbs { margin-bottom: 0; }
.breadcrumb-action { flex: none; margin-left: auto; text-align: right; }
@media (max-width: 768px) {
    .breadcrumbs-wrap--has-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .breadcrumb-action { margin-left: 0; text-align: left; }
}

/* Stats / Numbers */
.builder-stats { display: grid; gap: 1.5rem; margin: 1.5rem 0; text-align: center; }
.builder-stats--2col { grid-template-columns: repeat(2, 1fr); }
.builder-stats--3col { grid-template-columns: repeat(3, 1fr); }
.builder-stats--4col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .builder-stats--3col, .builder-stats--4col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .builder-stats { grid-template-columns: 1fr !important; } }
.builder-stat__value { font-size: 2.5rem; font-weight: 700; color: var(--color-primary); line-height: 1.1; }
.builder-stat__label { font-size: 1rem; color: #222; margin-top: 0.3rem; }
.builder-stat__subtext { font-size: 0.85rem; color: #666; margin-top: 0.25rem; }

/* Logo Strip */
.builder-logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem; margin: 1.5rem 0; }
.builder-logo-strip__item { display: inline-flex; align-items: center; }
.builder-logo-strip__item img { max-height: 60px; max-width: 160px; width: auto; height: auto; object-fit: contain; }
.builder-logo-strip--grayscale img { filter: grayscale(100%); opacity: 0.7; transition: filter 0.2s, opacity 0.2s; }
.builder-logo-strip--grayscale .builder-logo-strip__item:hover img { filter: grayscale(0%); opacity: 1; }

/* Tabs */
.builder-tabs { margin: 1.5rem 0; }
.builder-tabs__nav { display: flex; flex-wrap: wrap; border-bottom: 2px solid #eee; margin-bottom: 1rem; }
.builder-tabs__tab { background: none; border: 0; padding: 0.75rem 1.25rem; font: inherit; color: #555; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.builder-tabs__tab:hover { color: var(--color-primary); }
.builder-tabs__tab.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.builder-tabs__panel { display: none; }
.builder-tabs__panel.is-active { display: block; }

/* Icon + Text Grid (Features) */
.builder-icon-grid { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.builder-icon-grid--2col { grid-template-columns: repeat(2, 1fr); }
.builder-icon-grid--3col { grid-template-columns: repeat(3, 1fr); }
.builder-icon-grid--4col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .builder-icon-grid--3col, .builder-icon-grid--4col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .builder-icon-grid { grid-template-columns: 1fr !important; } }
.builder-icon-grid__icon img { width: 48px; height: 48px; object-fit: contain; }
.builder-icon-grid__icon--svg { color: var(--color-primary); line-height: 0; }
.builder-icon-grid__svg { width: 48px; height: 48px; display: inline-block; vertical-align: middle; }
.builder-icon-grid__title { margin: 0.6rem 0 0.4rem; font-size: 1.1rem; }
.builder-icon-grid__desc { margin: 0; color: #555; font-size: 0.95rem; line-height: 1.5; }

/* Pricing */
.builder-pricing { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.builder-pricing--2col { grid-template-columns: repeat(2, 1fr); }
.builder-pricing--3col { grid-template-columns: repeat(3, 1fr); }
.builder-pricing--4col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .builder-pricing--3col, .builder-pricing--4col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .builder-pricing { grid-template-columns: 1fr !important; } }
.builder-pricing__plan { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 2rem 1.5rem; text-align: center; display: flex; flex-direction: column; position: relative; }
.builder-pricing__plan.is-featured { border-color: var(--color-primary); border-width: 2px; transform: scale(1.02); box-shadow: 0 4px 20px rgba(var(--color-primary-rgb), 0.15); }
.builder-pricing__badge { position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: #fff; padding: 0.25rem 0.9rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.builder-pricing__name { font-size: 1.1rem; font-weight: 600; color: #222; margin-bottom: 0.5rem; }
.builder-pricing__price { margin: 0.5rem 0 1rem; }
.builder-pricing__amount { font-size: 2.5rem; font-weight: 700; color: var(--color-primary); }
.builder-pricing__period { font-size: 1rem; color: #666; margin-left: 0.25rem; }
.builder-pricing__desc { color: #666; font-size: 0.9rem; margin: 0 0 1rem; }
.builder-pricing__features { list-style: none; padding: 0; margin: 1rem 0; text-align: left; flex-grow: 1; }
.builder-pricing__features li { padding: 0.4rem 0; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; }
.builder-pricing__features li:last-child { border-bottom: 0; }
.builder-pricing__features li::before { content: '\2713'; color: var(--color-secondary); font-weight: 700; margin-right: 0.5rem; }
.builder-pricing__plan .btn { margin-top: auto; }

/* Block-picker tile alignment for new types */
.block-picker-modal .filament-forms-toggle-buttons-component label { min-height: 86px; }

/* Countdown */
.builder-countdown { text-align: center; padding: 1rem 0; }
.builder-countdown__units { display: flex; justify-content: center; align-items: flex-start; gap: 0.25rem; flex-wrap: wrap; }
.builder-countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.builder-countdown__value { font-size: 3rem; font-weight: 700; color: var(--color-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.builder-countdown__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: #888; margin-top: 0.3rem; }
.builder-countdown__sep { font-size: 2.5rem; font-weight: 700; color: var(--color-primary); line-height: 1; padding-top: 0.1rem; }
.builder-countdown__sublabel { margin-top: 1.25rem; color: #444; font-size: 1rem; }
.builder-countdown__expired { font-size: 1.5rem; font-weight: 600; color: var(--color-primary); }
@media (max-width: 480px) { .builder-countdown__value { font-size: 2rem; } .builder-countdown__unit { min-width: 52px; } }

/* Flip Box */
.builder-flip-grid { display: grid; gap: 1.5rem; margin: 1.5rem 0; width: 100%; }
.builder-flip-grid--2col { grid-template-columns: repeat(2, 1fr); }
.builder-flip-grid--3col { grid-template-columns: repeat(3, 1fr); }
.builder-flip-grid--4col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .builder-flip-grid--3col, .builder-flip-grid--4col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .builder-flip-grid { grid-template-columns: 1fr !important; } }
.builder-flip-box { perspective: 1000px; height: 260px; cursor: pointer; }
.builder-flip-box__inner { position: relative; width: 100%; height: 100%; transition: transform 0.55s cubic-bezier(.4,0,.2,1); transform-style: preserve-3d; }
.builder-flip-box__front,
.builder-flip-box__back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; padding: 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.builder-flip-box__front { background: var(--color-bg-subtle); border: 1px solid var(--color-border); }
.builder-flip-box__back { background: var(--color-primary); color: #fff; transform: rotateY(180deg); }
.builder-flip-box__back .builder-flip-box__heading { color: #fff; }
.builder-flip-box__back .builder-flip-box__text { color: rgba(255,255,255,0.88); }
.builder-flip-box__image { margin-bottom: 0.75rem; }
.builder-flip-box__image img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.builder-flip-box__heading { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 600; }
.builder-flip-box__text { margin: 0; font-size: 0.88rem; line-height: 1.55; color: #555; }
.builder-flip-box__hint { margin-top: 0.9rem; font-size: 0.72rem; color: #bbb; letter-spacing: 0.03em; }
.builder-flip-box__back .btn { margin-top: 1rem; border-color: rgba(255,255,255,0.7); color: #fff; }
.builder-flip-box__back .btn:hover { background: rgba(255,255,255,0.15); }
@media (hover: hover) { .builder-flip-box:hover .builder-flip-box__inner { transform: rotateY(180deg); } .builder-flip-box__hint { display: none; } }
.builder-flip-box.is-flipped .builder-flip-box__inner { transform: rotateY(180deg); }

/* Share / Follow Buttons */
.builder-share { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.builder-share--center { justify-content: center; }
.builder-share--right { justify-content: flex-end; }
.builder-share__btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem; border-radius: 6px; text-decoration: none; border: none; background: none; cursor: pointer; transition: opacity 0.15s, transform 0.15s; line-height: 1; }
.builder-share__btn:hover { opacity: 0.75; transform: translateY(-1px); text-decoration: none; }
.builder-share--icons_labels .builder-share__btn { padding: 0.4rem 0.8rem; border-radius: 6px; border: 1px solid currentColor; }
.builder-share--pills .builder-share__btn { padding: 0.4rem 1rem; border-radius: 999px; color: #fff !important; }
.builder-share__icon { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.builder-share__icon svg { width: 100%; height: 100%; display: block; }
.builder-share__label { font-size: 0.85rem; font-weight: 500; white-space: nowrap; }

/* Flip box: contain hover-flip within block wrapper on desktop.
   width:100% stops flow-root shrink-wrapping the wrapper to the cards'
   content width, which collapsed the grid's 1fr columns at wide breakpoints. */
@media (hover: hover) { .builder-block--flip_box { display: flow-root; width: 100%; } }

/* TOC: contain its float within the builder-block wrapper */
.builder-block--table_of_contents { display: flow-root; }

/* Table of Contents */
.builder-toc { background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.1rem 1.4rem; }
.builder-toc--float_right { float: right; margin: 0 0 1.5rem 2rem; max-width: 270px; width: 100%; }
.builder-toc--float_left { float: left; margin: 0 2rem 1.5rem 0; max-width: 270px; width: 100%; }
.builder-toc__heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #888; margin: 0 0 0.7rem; }
.builder-toc ul { margin: 0; padding: 0; list-style: none; }
.builder-toc__item { margin: 0; padding: 0; }
.builder-toc__item a { display: block; padding: 0.22rem 0; color: var(--color-primary); text-decoration: none; font-size: 0.88rem; line-height: 1.4; }
.builder-toc__item a:hover { text-decoration: underline; }
.builder-toc__item--h3 { padding-left: 1rem; }
.builder-toc__item--h4 { padding-left: 2rem; }
.builder-toc__item--h3 a, .builder-toc__item--h4 a { font-size: 0.82rem; color: #666; }
.builder-toc__item--h3 a:hover, .builder-toc__item--h4 a:hover { color: var(--color-primary); }
@media (max-width: 600px) { .builder-toc--float_right, .builder-toc--float_left { float: none; max-width: 100%; margin: 0 0 1.5rem; } }

/* ════════════════════════════════════════════════════════════════════
 * Motley 2026 — Homepage & Navigation reskin
 * Design: Figma "motley-website-2026". Additive / overriding so the
 * reskin is easy to find and revert. Colours/fonts come from the tokens
 * in :root — change values there, layout here.
 * ════════════════════════════════════════════════════════════════════ */

/* ── Page frame ───────────────────────────────────
 * A constant white gutter around the whole page. Full-bleed coloured
 * sections stop at this frame; the fullscreen nav overlay (position:fixed)
 * deliberately covers it, matching the design's edge-to-edge menu. */
/* Clip horizontal overflow at the viewport edge: stops any stray full-bleed
   element from creating a horizontal scrollbar, which (in Chrome's responsive
   mode especially) widens the position:fixed nav overlay to the layout
   viewport and pushes its right-aligned close X off screen. Applied to <html>
   not <body> so the viewport-wide overlay itself is never clipped. */
html { background: #fff; overflow-x: clip; }
body { max-width: var(--page-max); margin-inline: auto; padding: var(--page-frame); background: #fff; }
@media (max-width: 768px) {
    :root { --page-frame: 14px; }
}
/* The framed page is the positioning context for the overlaid header. */
body { position: relative; }

/* ── Brand mark (logo tab + hover flyout) ──────────────
 * Orange square holding the real Motley mark; on hover an orange panel
 * the same height slides out to the right showing the wordmark. Box size
 * follows the design (≈150px at the 1440 page); inner pages use a small
 * version so they aren't dominated by a giant tab. */
.brand-mark { --logo-size: 150px; position: relative; display: inline-flex; align-items: stretch; text-decoration: none; }
.brand-mark:hover { text-decoration: none; }
.brand-mark__box {
    display: grid; place-items: center; flex: none;
    width: var(--logo-size); height: var(--logo-size);
    background: var(--color-primary);
}
.brand-mark__img { width: 52%; height: auto; display: block; }
.brand-mark__flyout {
    overflow: hidden; max-width: 0;
    background: var(--color-primary); display: flex; align-items: center;
    transition: max-width 0.32s ease;
}
.brand-mark__flyout > span {
    padding: 0 1.5rem 0 0.1rem; white-space: nowrap;
    /* Flyout wordmark uses Outfit (Google Font); rest of the site keeps
       --font-display (Inter). */
    font-family: 'Outfit', var(--font-display); font-weight: 800; color: #fff;
    font-size: calc(var(--logo-size) * 0.32); letter-spacing: 0.06em;
}
.brand-mark:hover .brand-mark__flyout,
.brand-mark:focus-visible .brand-mark__flyout { max-width: 360px; }

/* ── Header ─────────────────────────────────────────── */
/* Reset the original base .site-header (white bg + 3px orange border-bottom
   + padding) — the 2026 header is a transparent corner-tab layout. */
.site-header { z-index: 60; background: transparent; border: 0; padding: 0; }
.site-header__actions { display: flex; align-items: center; gap: 1.25rem; }
.site-header__social { display: flex; align-items: center; gap: 0.7rem; }
.site-header__social a { display: grid; place-items: center; width: 22px; height: 22px; color: #fff; transition: opacity 0.15s ease; }
.site-header__social a:hover { color: #fff; opacity: 0.72; }
.site-header__social svg { width: 18px; height: 18px; fill: currentColor; }
/* The white social icons are for the dark homepage hero. On inner pages the tabs
   now overlay light bands / lighter heroes, where white disappears — colour them
   the Motley green so they stay visible beside the hamburger (hover keeps the
   colour, just dims). */
body:not(.is-home) .site-header__social a,
body:not(.is-home) .site-header__social a:hover { color: var(--color-secondary); }
/* LinkedIn on inner pages: keep the green square, but make the cut-out "in" read
   white by sitting a small white backing behind the icon (the square covers the
   rest; only the letter holes reveal it). Homepage + footer are untouched. */
body:not(.is-home) .site-header__social a[aria-label="Linkedin"] { position: relative; }
body:not(.is-home) .site-header__social a[aria-label="Linkedin"]::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 15px;
    height: 15px;
    border-radius: 3px;
    background: #fff;
    z-index: 0;
}
body:not(.is-home) .site-header__social a[aria-label="Linkedin"] svg { position: relative; z-index: 1; }
.nav-trigger {
    display: grid; align-content: center; gap: 6px; flex: none;
    width: 84px; height: 84px; padding: 0 22px;
    background: var(--color-primary); border: 0; cursor: pointer;
    transition: background 0.15s ease;
}
.nav-trigger:hover { background: var(--color-primary-hover); }
.nav-trigger span { display: block; height: 3px; background: #fff; border-radius: 2px; }

/* Inner pages — header is a normal flow bar with a restrained logo. */
.site-header:not(.site-header--overlay) {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.5rem;
}
.site-header:not(.site-header--overlay) .brand-mark { --logo-size: 60px; }
.site-header:not(.site-header--overlay) .nav-trigger { width: 60px; height: 60px; padding: 0 16px; gap: 5px; }

/* Inner pages — overlay the header into the page corners (homepage effect),
 * KEEPING the restrained inner logo/hamburger sizes (set above). The 60px
 * hamburger sits flush at the top of a 60px-tall actions row, so no upward pull
 * is needed (unlike the homepage's larger tab).
 *
 * position:fixed (not absolute) so the logo + hamburger stay pinned while you
 * scroll — the hamburger is the only entry point to navigation, so it must stay
 * reachable on long pages. Centred to the page max-width (mirroring the body
 * frame) so the tabs hug the content corners, not the screen edges, on wide
 * monitors. */
body:not(.is-home) .site-header {
    position: fixed; top: 0;
    left: 50%; transform: translateX(-50%);
    width: 100%; max-width: var(--page-max);
    margin-bottom: 0;
    pointer-events: none;
}
body:not(.is-home) .site-header .brand-mark,
body:not(.is-home) .site-header .site-header__actions { pointer-events: auto; }
body:not(.is-home) .site-header .site-header__actions { align-self: stretch; align-items: flex-end; }
body:not(.is-home) .site-header .nav-trigger { margin-top: 0; }

/* Hero-less inner pages have no banner, so promote the heading band into a light
 * "hero" band that the floating corner tabs sit over (instead of white space):
 * give it the page-alt background, lift it to the top of <main> (order:1, taking
 * the hero slot), and pad the top so the title clears the 60px tabs. Breadcrumbs
 * fall just below it — same hero → breadcrumbs → content order as hero pages. */
body:not(.is-home):not(:has(main > .page-hero)):not(:has(main > .slideshow-hero)) main > .page-body-heading {
    order: 1;
    background: var(--color-bg-alt);
    padding-top: 4rem;        /* clears the 60px corner tabs */
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
}

/* Homepage — header overlays the hero; tabs pinned to the page corners
 * (inside the white frame, matching the design). */
.site-header--overlay {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; align-items: flex-start; justify-content: space-between;
    pointer-events: none;
}
.site-header--overlay .brand-mark,
.site-header--overlay .site-header__actions { pointer-events: auto; }
.site-header--overlay .site-header__actions { align-self: stretch; }
/* Pull the hamburger flush with the very top of the page (out of the 30px
   white frame), level with the page edge — mirrored by .nav-overlay__close. */
.site-header--overlay .nav-trigger { margin-top: -64px; }
@media (max-width: 768px) {
    .brand-mark { --logo-size: 76px; }
    .nav-trigger { width: 60px; height: 60px; padding: 0 16px; gap: 5px; }
    .site-header--overlay .nav-trigger { margin-top: -22px; }
    .nav-overlay__close { width: 60px; height: 60px; }
    .nav-overlay__close svg { width: 30px; height: 30px; }
}

/* Footer brand — small mark + wordmark, no flyout. */
.brand-mark--footer { --logo-size: 44px; align-items: center; gap: 0.85rem; }
.brand-mark--footer .brand-mark__word {
    font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
    letter-spacing: 0.05em; color: var(--color-ink);
}

/* ── Fullscreen overlay navigation ────────────────── */
.nav-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: var(--color-primary);
    opacity: 0; visibility: hidden; transform: translateY(-1.5rem);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    overflow-y: auto;
}
.nav-overlay.open { opacity: 1; visibility: visible; transform: none; }
.nav-overlay__inner {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem;
    padding-top: 7rem; padding-bottom: 4rem; min-height: 100%;
}
/* The overlay header is position:absolute on <body>, so the hamburger sits
   at the body BOX edge (the page corner) — NOT inset by the page frame.
   So this bar is a centred max-width:var(--page-max) box with NO inline
   padding; the right-aligned X lands exactly on the hamburger box. */
.nav-overlay__topbar {
    /* fixed (not absolute) so the close button stays pinned to the viewport
       top while the open overlay scrolls. The overlay sets transform:none when
       open, so fixed resolves against the viewport. */
    position: fixed; top: 0; left: 50%;
    transform: translateX(-50%);
    width: min(100%, var(--page-max));
    display: flex; justify-content: space-between; align-items: flex-start;
    pointer-events: none;
    z-index: 2;
}
.nav-overlay__close {
    pointer-events: auto;
    display: grid; place-items: center;
    width: 84px; height: 84px; background: none; border: 0; cursor: pointer; color: #fff;
}
.nav-overlay__close svg { width: 38px; height: 38px; fill: currentColor; }
/* Brand mark inside the open overlay — mirrors the inner-page logo (60px,
   pinned top-left of the page-max box) but recoloured for the orange overlay:
   white box + black wordmark. The flyout reveals MOTLEY on hover/focus, same
   as the header/inner-page logo (the shared .brand-mark:hover rule handles it);
   here we only recolour the panel white with black text.
   The mark is the SAME file as the header logo (motley-logo.svg, a white mark)
   recoloured to brand orange via an alpha mask — the mask uses the shape, not
   the fill, so it stays in sync with the header logo and needs no extra asset. */
.nav-overlay__topbar .brand-mark--nav { --logo-size: 60px; pointer-events: auto; }
.nav-overlay__topbar .brand-mark--nav .brand-mark__box { background: #fff; }
.nav-overlay__topbar .brand-mark--nav .brand-mark__img {
    width: 52%; aspect-ratio: 85 / 79; height: auto;
    background: var(--color-primary);
    -webkit-mask: url('../images/motley-logo.svg') center / contain no-repeat;
            mask: url('../images/motley-logo.svg') center / contain no-repeat;
}
.nav-overlay__topbar .brand-mark--nav .brand-mark__flyout { background: #fff; }
.nav-overlay__topbar .brand-mark--nav .brand-mark__flyout > span { color: var(--color-ink, #1c1c1c); }
.nav-overlay__menu { display: flex; flex-direction: column; gap: 2.5rem; }
.nav-group__label {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: rgba(255,255,255,0.7); margin: 0 0 0.6rem;
}
/* Heading-only group with no children (e.g. "MOTLEY"): cancel the 2.5rem
   inter-group gap so its label sits tight above the next item, matching how a
   heading-with-children label sits above its links. The following groups keep
   their normal spacing between each other. */
.nav-group:has(.nav-group__label):not(:has(.nav-group__links a)) { margin-bottom: -1.9rem; }
.nav-group__links { list-style: none; margin: 0; padding: 0; }
.nav-group__links li { margin: 0; }
.nav-group__links a {
    display: inline-block; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.18; text-transform: uppercase;
    color: #fff; letter-spacing: 0.005em; text-decoration: none;
    transition: opacity 0.15s ease, padding-left 0.15s ease;
}
.nav-group__links a:hover { opacity: 0.72; text-decoration: none; padding-left: 0.4rem; }
.nav-overlay .inactive > a, .nav-overlay .inactive a { opacity: 0.45; }
.nav-overlay__contact { display: flex; flex-direction: column; gap: 1.75rem; padding-top: 0.25rem; }
.nav-contact-block__label { font-size: 0.85rem; font-weight: 700; color: #fff; margin: 0 0 0.35rem; }
.nav-contact-block a, .nav-contact-block span { color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.6; }
.nav-contact-block a:hover { color: #fff; text-decoration: underline; }
.nav-overlay__social { display: flex; gap: 0.6rem; margin-top: 0.15rem; }
.nav-overlay__social a { display: grid; place-items: center; width: 34px; height: 34px; background: rgba(255,255,255,0.15); border-radius: 3px; color: #fff; }
.nav-overlay__social a:hover { background: rgba(255,255,255,0.28); }
.nav-overlay__social svg { width: 17px; height: 17px; fill: currentColor; }

/* ── Footer (light) ───────────────────────────────── */
.site-footer { background: #fff; color: var(--color-ink); border-top: 1px solid #ececec; margin-top: 0; padding: 3rem 0 2.25rem; font-size: 0.9rem; }
/* Footer inner is full-bleed to the page frame, matching the homepage bands
   above (hero / feature / green-hosting / services all share the same edges).
   .site-footer__cols uses display:contents so the 4 .footer-col children
   become direct grid items here (5 even tracks) instead of a cramped sub-grid. */
.site-footer__inner { max-width: none; width: 100%; padding-inline: 0; display: grid; grid-template-columns: minmax(160px, 1.2fr) repeat(4, 1fr); gap: 2.5rem; align-items: start; }
.site-footer__brand { display: flex; flex-direction: column; gap: 0.9rem; }
.site-footer__copy { color: #8a8a8a; font-size: 0.8rem; margin: 0; }
.site-footer__cols { display: contents; }
.site-footer .footer-col h4 {
    font-size: 0.85rem; font-weight: 700; color: var(--color-ink);
    margin: 0 0 0.5rem; padding: 0; border: 0; text-transform: none;
}
.site-footer .footer-col a, .site-footer .footer-col span { color: #6b6b6b; line-height: 1.7; display: inline-block; }
.site-footer .footer-col a:hover { color: var(--color-primary); }
.site-footer__social { display: flex; gap: 0.55rem; }
.site-footer__social a { display: grid; place-items: center; width: 30px; height: 30px; color: #5c5c5c; }
.site-footer__social a:hover { color: var(--color-primary); }
.site-footer__social svg { width: 17px; height: 17px; fill: currentColor; }
.site-footer__links { grid-column: 1 / -1; list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid #ececec; }
.site-footer__links a { color: #6b6b6b; font-size: 0.85rem; }
.site-footer__links a:hover { color: var(--color-primary); }

/* ── Homepage: full-bleed block flow ──────────────── */
.home-blocks .builder-block { margin: 0; }
/* The generic per-block "Page heading" (public_heading) renders on the homepage
   for ordinary content blocks (Text, Image, etc.); only the bespoke design bands
   suppress it, since they carry their own heading systems and a generic <h2> on
   top would disrupt their layout. (Was a blanket `.home-blocks
   .builder-block__heading{display:none}` that silently swallowed editor-set
   headings on plain blocks added to the homepage — see UPGRADE-DIVERGENCES.md.) */
.home-blocks .builder-block--split_panel  .builder-block__heading,
.home-blocks .builder-block--services_grid .builder-block__heading,
.home-blocks .builder-block--feature_band  .builder-block__heading,
.home-blocks .builder-block--project_cards .builder-block__heading { display: none; }

/* Homepage document H1 band (below the banner): large uppercase, flush to the
   page-frame edge to align with the full-bleed bands (not indented by .container). */
.page-body-heading--home > .container { max-width: none; width: 100%; padding-left: 0; padding-right: 0; }
.page-body-heading--home h1 { font-size: 2.75rem; line-height: 1.1; text-transform: uppercase; }
@media (max-width: 768px) { .page-body-heading--home h1 { font-size: 1.75rem; } }
.mhome-section { position: relative; }
.home-blocks .builder-block--split_panel + .builder-block--project_cards { margin-top: 30px; }
/* Homepage content feed (e.g. the articles teaser): homepage blocks sit flush
   (margin:0) and the bespoke design bands carry their own padding, but a
   content-feed has none of its own up top — the search/filter row used to give
   it the gap from the band above, and that row is now suppressed on
   non-paginated feeds (see builder-blocks.blade.php). Space the feed itself so
   it doesn't collide with the block above. (install-local — UPGRADE-DIVERGENCES.md) */
.home-blocks .builder-block--content_feed { margin-top: 2.5rem; }

/* ── Service detail pages: full-bleed block flow ──────
   INSTALL-LOCAL DIVERGENCE (motley 2026 design — see UPGRADE-DIVERGENCES.md).
   Service pages render builder blocks in `.page-blocks` (full width). The
   homepage-style sections break out edge-to-edge (they manage their own inner
   container); ordinary blocks (text, image+text, cta, etc.) stay in a readable
   column matching `.container`, so a service page can mix the Figma sections
   with normal prose. */
.page-blocks { width: 100%; }
.page-blocks .builder-block { margin-bottom: 0; }
.page-blocks > .builder-block:not(.builder-block--services_grid):not(.builder-block--project_cards):not(.builder-block--split_panel):not(.builder-block--feature_band) {
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: 1.25rem;
    margin-block: 2.5rem;
}
.page-blocks > .builder-block--services_grid,
.page-blocks > .builder-block--project_cards,
.page-blocks > .builder-block--split_panel,
.page-blocks > .builder-block--feature_band { max-width: none; padding-inline: 0; }
.page-blocks .builder-block--split_panel + .builder-block--project_cards { margin-top: 30px; }
.mhome-h {
    font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
    line-height: 1.02; letter-spacing: 0.005em; margin: 0; color: var(--color-ink);
}
.mhome-eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 0.75rem; }
.mhome-link { display: inline-block; font-weight: 700; font-size: 0.85rem; color: inherit; border-bottom: 2px solid currentColor; padding-bottom: 2px; margin-top: 1rem; }
.mhome-link:hover { text-decoration: none; opacity: 0.7; }


/* split_panel — colour pane + image pane */
.mhome-split { display: grid; grid-template-columns: 2fr 3fr; min-height: 360px; }
.mhome-split--right { grid-template-columns: 3fr 2fr; }
.mhome-split--right .mhome-split__pane { order: 2; }
.mhome-split--right .mhome-split__media { order: 1; }
.mhome-split__pane { background: var(--color-primary); color: #fff; padding: 3.5rem clamp(1.5rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.mhome-split__pane h2 { color: #fff; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.02; margin: 0; }
.mhome-split__tags { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.mhome-split__tags li { font-weight: 700; font-size: 1.05rem; padding: 0.15rem 0; }
.mhome-split__media { background: #d8d8d8 center/cover no-repeat; min-height: 320px; }
.mhome-split .btn-outline-light { align-self: flex-start; margin-top: 1.75rem; display: inline-block; padding: 0.75rem 1.75rem; border: 2px solid #fff; color: #fff; font-weight: 700; font-size: 0.85rem; border-radius: 3px; transition: background 0.15s ease, color 0.15s ease; }
.mhome-split .btn-outline-light:hover { background: #fff; color: var(--color-primary); text-decoration: none; }

/* project_cards — tagged image cards */
.mhome-cards__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.mhome-card { position: relative; aspect-ratio: 4 / 3.4; overflow: hidden; display: block; background: #2a2a2a; color: #fff; }
.mhome-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.mhome-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.15) 55%, transparent 100%); }
.mhome-card:hover img { transform: scale(1.05); }
.mhome-card__body { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 1.5rem; }
.mhome-card__tag { display: inline-block; background: var(--color-primary); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 0.6rem; border-radius: 2px; }
.mhome-card__title { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin: 0.75rem 0 0; color: #fff; }
.mhome-card__placeholder { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #3a3a3a, #3a3a3a 14px, #333 14px, #333 28px); }

/* services_grid — oversized title + pale intro slab + overlapping orange panel */
.mhome-services { padding: 3.5rem 0 2.5rem; overflow: visible; }
.mhome-services__grid.container { max-width: none; width: 100%; padding-inline: 0; }
.mhome-services__grid {
    position: relative;
    display: grid;
    grid-template-columns: 46% 54%;
    gap: 0;
    align-items: center;
}
.mhome-services__intro {
    position: relative;
    min-height: 560px;
    background: #eef2f3;
    padding: 16.5rem 9rem 5rem 5.4rem;
}
.mhome-services__title {
    position: absolute;
    top: 3.1rem;
    left: 0;
    width: 4.05ch;
    color: #000;
    font-size: 100px;
    line-height: 0.9;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
/* How We Work page (slug how-we-work) — tighter services title at the largest
   breakpoint only. Guarded with min-width:1411px so it never overrides the
   max-width:1410px stack rule (which sets position:static + width:auto); an
   unguarded 2-class selector would otherwise win on specificity and constrain
   the stacked mobile heading. */
@media (min-width: 1411px) {
    .page-how-we-work .mhome-services__title { top: 0rem; width: 6.05ch; }
    /* AI & Automation service page (slug ai-automation) — same tighter title.
       Service detail pages emit a `service-{slug}` body class (set in
       frontend/services/show.blade.php). Same min-width guard as above. */
    .service-ai-automation .mhome-services__title { top: 0rem; width: 6.05ch; }
}
.mhome-services__card { max-width: 560px; background: transparent; padding: 0; margin: 0; }
.mhome-services__card h3 {
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0 0 1.7rem;
}
.mhome-services__card p { color: #111; margin: 0; font-size: 1.13rem; line-height: 1.72; }
.mhome-services__panel {
    position: relative;
    z-index: 1;
    min-height: 520px;
    margin-left: -5.5rem;
    margin-right: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 4.2rem 4.4rem 3.8rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 5rem;
    row-gap: 4.5rem;
}
.mhome-svc h4 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.55rem;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #fff;
    margin: 0 0 1.35rem;
}
.mhome-svc ul { list-style: none; margin: 0 0 1.55rem; padding: 0; }
.mhome-svc li { color: #fff; font-size: 1.2rem; line-height: 1.58; padding: 0; }
.mhome-svc .mhome-link { color: #fff; font-size: 0.98rem; font-weight: 500; margin-top: 0; }

/* feature_band — two image cards */
.mhome-feature { padding: 2.8rem 0 2.8rem; }
.mhome-feature__grid.container { max-width: none; width: 100%; padding-inline: 0; }
.mhome-feature__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.mhome-feature__card { min-width: 0; background: #eef2f3; }
.mhome-feature__media { width: 100%; height: clamp(280px, 32vw, 500px); overflow: hidden; background: #eef2f3; }
.mhome-feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mhome-feature__body {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    gap: 2.25rem;
    align-items: start;
    min-height: 240px;
    padding: 0 2.6rem 3.2rem;
    background: #eef2f3;
}
.mhome-feature__body h2 {
    width: 4.1ch;
    margin: -0.62em 0 0;
    color: var(--color-primary);
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(4rem, 6vw, 6.2rem);
    line-height: 0.86;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.mhome-feature__copy { max-width: 390px; padding-top: 2.2rem; }
.mhome-feature__copy p { color: #111; font-size: 1.03rem; line-height: 1.65; margin: 0 0 1.8rem; }
.mhome-feature__copy .mhome-link { color: var(--color-ink); font-size: 0.95rem; font-weight: 500; margin-top: 0; }

/* ── Homepage responsive ───────────────────────────────
   Staged breakpoints, widest-first. The Services band collapses earliest
   because its overlapping desktop layout needs the most room; the feature
   cards next; generic two-up sections (splits/cards) last. */

/* Services band: now full-bleed (100% of the page frame), so the old +4rem
   grid shift and the -7rem title hang are gone (they were what forced a
   horizontal scrollbar). The orange panel still overlaps the pale intro by
   -5.5rem — that pulls INWARD, so it can't overflow the right edge. Above
   ~1410px it's the two-up overlap; below it we still drop the overlap and
   stack the pale intro above the orange panel. */
@media (max-width: 1410px) {
    .mhome-services__grid { grid-template-columns: 1fr; transform: none; }
    .mhome-services__grid.container { width: 100%; }
    .mhome-services__intro { min-height: auto; padding: 3rem clamp(1.5rem, 4vw, 4rem); }
    .mhome-services__title {
        position: static;
        width: auto;
        margin: 0 0 2rem;
        font-size: clamp(3.25rem, 9vw, 6rem);
        overflow-wrap: anywhere;
    }
    .mhome-services__panel {
        min-height: auto;
        margin-left: 0;
        padding: 3rem clamp(1.5rem, 4vw, 4rem);
        column-gap: clamp(1.5rem, 4vw, 5rem);
        row-gap: 2.5rem;
    }
}

/* Feature band: two side-by-side cards, each an image + offset display title
   + copy. The inner body needs ~520px per card, which two-up can't give
   below ~1130px — so stack to one card per row from 1080px down. */
@media (max-width: 1080px) {
    .mhome-feature__grid { grid-template-columns: 1fr; }
    .mhome-feature__grid.container { width: 100%; }
    .mhome-feature__body { grid-template-columns: 1fr; min-height: auto; padding: 0 1.5rem 2.5rem; min-width: 0; }
    .mhome-feature__body h2 {
        width: auto;
        margin: -0.45em 0 0;
        /* Fluid title across the whole range below the breakpoint: scales
           smoothly from ~88px at the top down to a 40px floor on small
           phones, no per-breakpoint steps. overflow-wrap:anywhere +
           min-width:0 let a long single word break inside the single-column
           grid track instead of blowing the panel past the viewport. */
        font-size: clamp(2.5rem, 9.5vw, 5.5rem);
        overflow-wrap: anywhere;
        word-break: break-word;
        min-width: 0;
        max-width: 100%;
    }
    .mhome-feature__copy { padding-top: 0; }
}

/* Generic two-up sections + the nav overlay collapse on tablet. */
@media (max-width: 900px) {
    .nav-overlay__inner { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 6rem; }
    .mhome-split,
    .mhome-split--right,
    .mhome-cards__grid { grid-template-columns: 1fr; }
    .mhome-split--right .mhome-split__pane,
    .mhome-split--right .mhome-split__media { order: 0; }
    .site-footer__inner { grid-template-columns: repeat(2, 1fr); }
}

/* Phones: stack the Services list and footer to a single column. */
@media (max-width: 700px) {
    .mhome-services__panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .site-footer__inner { grid-template-columns: 1fr; }
    .nav-group__links a { font-size: 1.5rem; }
    .brand-mark__word { display: none; }
}
/* Homepage: halve content h2 size on small screens (< 768px).
   Base h2 is 1.45rem; 50% → 0.725rem. Scoped to the homepage body
   class and its builder content so other pages are unaffected. */
@media (max-width: 767.98px) {
    .is-home .home-blocks .cms-content h2 { font-size: 0.725rem; }
}


/* split / feature media — cover images inside their panes */
.mhome-split__media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; }
.mhome-feature .mhome-feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mhome-feature .mhome-feature__media { padding: 0; }

/* Back-to-top — brand orange square, fixed bottom-right. Hidden by the
   `hidden` attr until JS removes it, then faded in via `.is-visible` on scroll.
   z-index sits below the cookie banner (9990) so the banner stays on top. */
.back-to-top {
    position: fixed;
    /* --btt-lift is set by JS to clear the cookie banner while it's visible
       (the banner is z-index 9990 and sits over this corner). 0 otherwise. */
    bottom: calc(1.5rem + var(--btt-lift, 0px));
    right: 1.5rem;
    z-index: 70;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    padding: 0;
    background: #f04e23;
    border: 0;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s, bottom .3s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #d8401a; }
.back-to-top svg { width: 24px; height: 24px; fill: #fff; }
/* While the nav overlay is open: lift above it (overlay is z-index 1000) and
   flip to white-on-orange so it reads against the orange overlay background. */
.back-to-top.is-over-nav { z-index: 1001; background: #fff; }
.back-to-top.is-over-nav:hover { background: #f3f3f3; }
.back-to-top.is-over-nav svg { fill: #f04e23; }
@media (max-width: 768px) {
    .back-to-top { width: 46px; height: 46px; bottom: calc(1rem + var(--btt-lift, 0px)); right: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: opacity .2s ease, visibility .2s; transform: none; }
}

/* ==========================================================================
 * Portfolio (case studies) redesign — 2026 Figma
 * Install-local divergence (see UPGRADE-DIVERGENCES.md). Listing = overlay
 * card grid; detail = big black uppercase title + Figma-styled builder blocks.
 * ========================================================================== */

/* Screen-reader-only utility (visually hidden, still in the a11y/SEO tree). */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Listing: overlay card grid -------------------------------------------- */
/* Top spacing comes from the .page-body-heading band (section-hero), same as the
   blog/articles listing — no extra padding-top needed here. */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}
.portfolio-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 0;
    background: #d9d9d9;
    text-decoration: none;
    grid-column: span 2;            /* default = third / square */
    aspect-ratio: 1 / 1;
}
.portfolio-card:hover { text-decoration: none; }

/* Editorial rhythm, repeating every 6 cards: 1 full banner, 2 halves, 3 thirds */
.portfolio-grid .portfolio-card:nth-child(6n+1) { grid-column: span 6; aspect-ratio: 1370 / 460; }
.portfolio-grid .portfolio-card:nth-child(6n+2),
.portfolio-grid .portfolio-card:nth-child(6n+3) { grid-column: span 3; aspect-ratio: 3 / 2; }

.portfolio-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.portfolio-card:hover .portfolio-card__img { transform: scale(1.04); }

.portfolio-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 38%, rgba(0,0,0,0.78) 100%);
}
.portfolio-card__title {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.25rem, 1.6vw, 2rem);
    line-height: 1.1;
    margin: 0 0 0.9rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}
.portfolio-card__title .draft-badge { vertical-align: middle; margin-left: 0.4rem; }
.portfolio-card__view {
    align-self: flex-start;
    display: inline-block;
    border: 2px solid #fff;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 1.4rem;
    border-radius: 0;
    box-shadow: 0 4px 4px rgba(0,0,0,0.25);
    transition: background .2s, color .2s;
}
.portfolio-card:hover .portfolio-card__view { background: #fff; color: var(--color-primary); }

@media (max-width: 900px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .portfolio-grid .portfolio-card { grid-column: span 1; aspect-ratio: 1 / 1; }
    .portfolio-grid .portfolio-card:nth-child(6n+1) { grid-column: span 2; aspect-ratio: 16 / 9; }
    .portfolio-grid .portfolio-card:nth-child(6n+2),
    .portfolio-grid .portfolio-card:nth-child(6n+3) { grid-column: span 1; aspect-ratio: 1 / 1; }
}
@media (max-width: 560px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-grid .portfolio-card,
    .portfolio-grid .portfolio-card:nth-child(6n+1),
    .portfolio-grid .portfolio-card:nth-child(6n+2),
    .portfolio-grid .portfolio-card:nth-child(6n+3) { grid-column: span 1; aspect-ratio: 4 / 3; }
}

/* ==========================================================================
 * Case-study DETAIL — bespoke Figma layout (node 12:313)
 * --color-cs-orange matches the Figma panel (#e95620); --color-cs-bg the light
 * intro wash (#f0f4f5). Sections are full-bleed bands; content sits in .container.
 * ========================================================================== */
.cs-intro, .cs-outcomes, .cs-actions { --color-cs-orange: #e95620; --color-cs-bg: #f0f4f5; }

/* Hero is image-only — the title lives in the intro band, so hide any overlay
   heading/caption/CTA the shared hero partials would render. */
.case-study-hero .page-hero-heading,
.case-study-hero .static-hero__heading,
.case-study-hero .static-hero__caption,
.case-study-hero .static-hero__cta-wrap,
.case-study-hero .slideshow-hero__heading,
.case-study-hero .slideshow-hero__caption { display: none !important; }
.case-study-hero .page-hero,
.case-study-hero .static-hero { min-height: 460px; }

/* Optional editor-set overlay heading/caption ON the banner (install-local,
   re-added 2026-06-10). Rendered by show.blade.php only when the hero "Overlay
   heading"/"Overlay caption" fields are filled. A gentle scrim keeps the white
   text legible even when the study's hero tint is 'none'. */
.case-study-hero { position: relative; }
.cs-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.45) 100%);
}
.cs-hero-overlay .container { width: 100%; }
.cs-hero-overlay--left   { text-align: left; }
.cs-hero-overlay--center { text-align: center; }
.cs-hero-overlay--right  { text-align: right; }
.cs-hero-overlay__heading {
    margin: 0;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.05;
    font-size: clamp(1.8rem, 4vw, 3.25rem);
    text-shadow: 0 2px 12px rgba(0,0,0,0.55);
}
.cs-hero-overlay__caption {
    margin: 0.6rem 0 0;
    color: #fff;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

/* Shared text + heading styling inside the detail regions. */
.cs-heading {
    color: var(--color-cs-orange);
    font-weight: 800;
    font-size: 1.6rem;
    text-transform: none;
    margin: 1.75rem 0 0.85rem;
    line-height: 1.2;
}
.cs-text { font-size: 1rem; line-height: 1.8; color: #222; }
.cs-text p { margin-bottom: 1rem; }
.cs-text p:last-child { margin-bottom: 0; }
/* Lists + blockquotes inside case-study prose: the bespoke .cs-text wrapper
   isn't covered by the standard `.page-body .cms-content` rules, so without
   these, bulleted lists and pull-quotes render flush-left instead of indented.
   Mirrors the .cms-content treatment (see ~line 282) so case-study body copy
   matches every other content page. Install-local — UPGRADE-DIVERGENCES.md. */
.cs-text ul,
.cs-text ol { margin: 0.75rem 0 1rem 1.5rem; padding-left: 1.25rem; }
.cs-text li { margin-bottom: 0.4rem; }
.cs-text blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0;
    background: var(--color-primary-tint);
    color: #555;
}

/* --- Intro band: title + overview (left) | orange Sectors/Services (right) --- */
.cs-intro { background: linear-gradient(to bottom, #fff 0, #fff 90px, var(--color-cs-bg) 90px); padding: 2.5rem 0 3rem; }
.cs-intro__grid { display: block; }
/* Panel variant: orange box floats top-right; the title + body text wrap down
   its left side, then reclaim the full width once they pass its bottom edge
   (magazine wrap). flow-root contains the float inside the intro band. */
.cs-intro__grid--panel { display: flow-root; }
.cs-title {
    color: #111;
    text-transform: uppercase;
    font-weight: 900;
    /* When the title is too wide for the column beside the floated orange panel,
       WRAP it onto the next line within that column — never drop the whole h1
       below the box. `overflow-wrap: anywhere` is what makes this work (not
       break-word): it shrinks the title's min-content width so even a long
       single word like "TRAVELSYNC" breaks across lines in place, exactly like
       the homepage display headings. word-break:break-word is a belt-and-braces
       fallback for older engines. */
    font-size: clamp(2.5rem, 6.5vw, 5.25rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    margin: 0 0 1.75rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: none;
}
.cs-title .draft-badge { -webkit-text-fill-color: initial; vertical-align: middle; font-size: 1rem; }
/* With the orange panel floated right, constrain the title to the column to its
   LEFT so a long word (e.g. GROUNDWORKS) breaks in place under the line above
   instead of being pushed below the panel (the float would otherwise shift a
   too-wide first-word-of-a-line down past the box). overflow-wrap:anywhere then
   handles the intra-word break. Reset on mobile where the panel stacks (no float). */
.cs-intro__grid--panel .cs-title { max-width: calc(100% - min(40%, 440px) - 4.25rem); }

.cs-panel {
    float: right;
    width: 40%;
    max-width: 440px;
    margin: 0 0 1.75rem 2.75rem;
    box-sizing: border-box;
    background: var(--color-cs-orange);
    color: #fff;
    padding: 2.5rem 2.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
}
.cs-panel__col h3 {
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    margin: 0 0 1.1rem;
}
.cs-panel__col ul { list-style: none; margin: 0; padding: 0; }
.cs-panel__col li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 1.05rem;
    line-height: 1.45;
    margin-bottom: 0.9rem;
}
.cs-panel__col li:last-child { margin-bottom: 0; }
.cs-panel__col li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.55em;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
}

/* Inline quotes in the case-study main column render via the standard builder
   partial (.builder-quote — honours the editor's Simple / Centred / Card style).
   They sit in the .cs-intro main column, so give them a little breathing room. */
.cs-intro__main .builder-block--quote { margin: 1.75rem 0; }

/* --- Outcomes: screenshots (left) | heading & text (right) --- */
.cs-outcomes { padding: 1rem 0 3.5rem; }
.cs-outcomes__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 2.5rem; align-items: center; }
.cs-outcomes__imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 1rem; }
.cs-outcomes__imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-outcomes__text .cs-heading { margin-top: 0; }
/* Standalone project-gallery band: shows "Project gallery" images that the testimonial/
   Outcomes regions don't (install-local 2026-06-13, see UPGRADE-DIVERGENCES.md). Images
   grow to fill but cap at the testimonial-image scale so small sources don't over-upscale. */
.cs-project-gallery { padding: 0 0 3rem; }
.cs-project-gallery__grid { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; }
.cs-project-gallery__grid img { flex: 1 1 320px; max-width: 560px; width: 100%; height: auto; display: block; border-radius: 6px; }

/* --- Actions: visit-website CTA + back --- */
.cs-actions { padding: 0 0 4rem; }
.cs-actions .container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
/* Optional CTA-block heading + supporting text above the action button. Spans
   the full row so the button + back link wrap onto the line beneath it. */
.cs-actions__lead { flex: 1 0 100%; max-width: 720px; }
.cs-actions__lead .cs-heading { margin-top: 0; }
.cs-actions__lead p { font-size: 1rem; line-height: 1.7; color: #444; margin: 0; }
.cs-cta {
    display: inline-block;
    background: var(--color-cs-orange);
    color: #fff;
    font-weight: 700;
    padding: 0.8rem 2rem;
    text-decoration: none;
    transition: background .2s;
}
.cs-cta:hover { background: #cf471a; color: #fff; text-decoration: none; }
.cs-back { margin-left: auto; }

@media (max-width: 860px) {
    .cs-intro { background: var(--color-cs-bg); }
    /* Stack: drop the float and flex-order the panel back below the content
       (it sits first in source for the desktop wrap). */
    .cs-intro__grid--panel { display: flex; flex-direction: column; }
    .cs-intro__grid--panel .cs-intro__main { order: 1; }
    .cs-intro__grid--panel .cs-title { max-width: none; }
    .cs-intro__grid--panel .cs-panel {
        order: 2;
        float: none;
        width: auto;
        max-width: none;
        margin: 2rem 0 0;
    }
    .cs-outcomes__grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .cs-outcomes__imgs { order: 2; }
    .cs-back { margin-left: 0; }
}

/* ===== Site announcements (banner / popup modal / full-screen takeover) =====
   Colours come in as inline --ann-bg / --ann-fg custom properties (sanitised to
   hex server-side). The root element ships hidden (inline display:none); the
   partial's JS reveals it, so layout is handed back to these classes. */
.cms-announcement, .cms-announcement *, .cms-announcement *::before, .cms-announcement *::after { box-sizing: border-box; }

/* --- Top banner --- */
.cms-announcement--banner { display: block; position: relative; background: var(--ann-bg, #1f2937); color: var(--ann-fg, #fff); z-index: 9970; }
.cms-announcement--banner .cms-announcement__inner { max-width: 1120px; margin: 0 auto; padding: 0.7rem 3rem 0.7rem 1.25rem; }
.cms-announcement--banner-full .cms-announcement__inner { max-width: none; }
.cms-announcement--banner .cms-announcement__content { font-size: 0.95rem; line-height: 1.5; }
.cms-announcement--banner .cms-announcement__content p { margin: 0; display: inline; }
.cms-announcement--banner .cms-announcement__title { margin-right: 0.45rem; }
.cms-announcement--banner .cms-announcement__content a { color: inherit; text-decoration: underline; }
/* A banner is a thin bar — images would break it, so they're not shown in this
   style (kept in the content, so they reappear if switched to popup/full-screen).
   !important so it always beats the img-left/right/centre alignment rules, which
   have equal specificity and are declared later in this file. */
.cms-announcement--banner .cms-announcement__content img { display: none !important; }
.cms-announcement--banner .cms-announcement__close { position: absolute; top: 50%; right: 0.6rem; transform: translateY(-50%); }

/* Banner overflow: scroll (ticker). Wrap is the default and needs no extra rules. */
.cms-announcement--overflow-scroll .cms-announcement__inner { overflow: hidden; }
.cms-announcement--overflow-scroll .cms-announcement__content { display: inline-block; white-space: nowrap; padding-left: 100%; animation: cms-ann-marquee var(--ann-scroll, 18s) linear infinite; }
.cms-announcement--overflow-scroll .cms-announcement__content p { display: inline; }
.cms-announcement--overflow-scroll .cms-announcement__inner:hover .cms-announcement__content { animation-play-state: paused; }
@keyframes cms-ann-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .cms-announcement--overflow-scroll .cms-announcement__content { animation: none; padding-left: 0; white-space: normal; display: block; } .cms-announcement--overflow-scroll .cms-announcement__content p { display: inline; } }

/* --- Shared overlay (modal + full-screen) --- */
.cms-announcement--modal, .cms-announcement--fullscreen { position: fixed; inset: 0; z-index: 9980; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.cms-announcement--modal { background: rgba(0, 0, 0, 0.55); }
.cms-announcement--fullscreen { background: var(--ann-bg, #1f2937); color: var(--ann-fg, #fff); }
.cms-announcement__box { position: relative; max-width: 560px; width: 100%; border-radius: 10px; padding: 2rem 2.2rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.cms-announcement--modal .cms-announcement__box { background: var(--ann-bg, #1f2937); color: var(--ann-fg, #fff); }
.cms-announcement--fullscreen .cms-announcement__box { background: transparent; box-shadow: none; max-width: 720px; text-align: center; padding: 1rem; }
.cms-announcement--modal .cms-announcement__title, .cms-announcement--fullscreen .cms-announcement__title { margin: 0 0 0.8rem; font-size: 1.6rem; line-height: 1.2; }
.cms-announcement--fullscreen .cms-announcement__title { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.cms-announcement__content a { color: inherit; text-decoration: underline; }
.cms-announcement__content p { margin: 0 0 0.6rem; }
.cms-announcement__content p:last-child { margin-bottom: 0; }
/* Title + all body text use the chosen text colour. Override the global heading
   and link colours (h2 etc. default to the brand colour) so the whole
   announcement reads as one colour on its background. */
.cms-announcement__title, .cms-announcement__content,
.cms-announcement__content :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, strong, em, span, a, blockquote) { color: inherit; }
/* Rich-text image alignment (TinyMCE "Class" dropdown: img-left / img-right /
   img-centre). The page-body equivalents are scoped to .page-body .cms-content,
   which the announcement isn't inside, so mirror them here. */
.cms-announcement__content img { margin: 0.6rem 0; border-radius: 4px; }
.cms-announcement__content img.img-left { float: left; margin: 0 1.25em 0.75em 0; }
.cms-announcement__content img.img-right { float: right; margin: 0 0 0.75em 1.25em; }
.cms-announcement__content img.img-centre { display: block; margin-left: auto; margin-right: auto; }
.cms-announcement__content::after { content: ''; display: table; clear: both; }
.cms-announcement--modal .cms-announcement__close { position: absolute; top: 0.5rem; right: 0.6rem; }
.cms-announcement--fullscreen .cms-announcement__close { position: fixed; top: 1rem; right: 1.2rem; }

/* --- Close button (shared) --- */
.cms-announcement__close { appearance: none; background: transparent; border: 0; cursor: pointer; color: inherit; opacity: 0.8; font-size: 1.6rem; line-height: 1; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; }
.cms-announcement__close:hover { opacity: 1; background: rgba(127, 127, 127, 0.22); }

@media (max-width: 600px) { .cms-announcement--banner .cms-announcement__content { font-size: 0.9rem; } .cms-announcement__box { padding: 1.5rem 1.4rem; } }

/* ============================================================
   Shop (SHOP P3) — storefront catalogue
   Token-first: cards/buttons inherit the existing Theme Studio
   kit (--card-*, buttons); shop-specific hooks carry their own
   --shop-* custom properties with hard-coded fallbacks so an
   un-themed install renders exactly these values.
   ============================================================ */

.shop-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin: 0 0 2rem;
}
.shop-category-card { text-decoration: none; display: flex; flex-direction: column; overflow: hidden; }
.shop-category-card__image img { width: 100%; height: 140px; object-fit: cover; display: block; }
.shop-category-card__name { display: block; font-weight: 700; color: var(--card-title, #333); }
.shop-category-card__count { display: block; font-size: 0.85rem; color: var(--card-meta, #777); margin-top: 0.25rem; }

.shop-product-grid { margin-top: 1rem; }
.shop-product-card { display: flex; flex-direction: column; overflow: hidden; }
.shop-product-card__image { display: block; }
.shop-product-card__image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.shop-product-card__title a { color: var(--card-title, #333); text-decoration: none; }
.shop-product-card__meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.35rem 0 0.6rem; }
.shop-product-card__excerpt { font-size: 0.92rem; color: var(--card-text, #555); }

.shop-price { font-weight: 700; color: var(--shop-price-color, var(--card-title, #333)); }
.shop-price__was { color: var(--card-meta, #888); font-weight: 400; margin-right: 0.4rem; }
.shop-price__now { color: var(--shop-sale-color, #c0392b); }
.shop-price--poa { font-weight: 600; font-style: italic; }

.shop-stock-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--shop-stock-out-bg, #fdecea);
    color: var(--shop-stock-out-color, #c0392b);
}
.shop-stock-badge--backorder {
    background: var(--shop-stock-backorder-bg, #fef5e7);
    color: var(--shop-stock-backorder-color, #9a6a12);
}

.shop-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    margin-bottom: 2rem;
}
.shop-product-gallery__main img { width: 100%; border-radius: var(--card-radius, 8px); display: block; }
.shop-product-gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 0.75rem; }
.shop-product-gallery__thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--card-radius, 6px); display: block; }

.shop-product-info__price { font-size: 1.5rem; margin-bottom: 0.75rem; }
.shop-product-info__summary { margin-bottom: 1.25rem; }
.shop-product-info__meta { list-style: none; padding: 0; margin: 1.25rem 0 0; font-size: 0.92rem; color: var(--card-meta, #666); }
.shop-product-info__meta li { margin-bottom: 0.35rem; }

.shop-variant-label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.shop-variant-select {
    width: 100%;
    max-width: 420px;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--card-border, #ddd);
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}
.shop-variant-select option:disabled { color: #aaa; }

.shop-category-intro { max-width: 60ch; margin-bottom: 1.5rem; }

@media (max-width: 900px) {
    .shop-category-grid { grid-template-columns: repeat(2, 1fr); }
    .shop-product-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Shop basket (SHOP P4a) ── */
.shop-basket-bar { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.shop-add-to-basket { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0; }
.shop-add-to-basket .shop-cart-qty { width: 5rem; }
.shop-add-feedback a { font-weight: 700; }
.shop-cart-flash { background: var(--shop-flash-bg, #eef7ea); border: 1px solid var(--shop-flash-border, #cfe6c6); padding: 0.6rem 1rem; border-radius: 6px; }
.shop-cart-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.shop-cart-table th { text-align: left; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--card-meta, #777); padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--card-border, #ddd); }
.shop-cart-table td { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--card-border, #e5e5e5); vertical-align: middle; }
.shop-cart-item { display: flex; align-items: center; gap: 0.9rem; }
.shop-cart-item__image img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block; }
.shop-cart-item__variant { font-size: 0.85rem; color: var(--card-meta, #777); }
.shop-cart-qty { width: 4.5rem; padding: 0.4rem 0.5rem; border: 1px solid var(--card-border, #ccc); border-radius: 6px; }
.shop-cart-remove { background: none; border: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--card-meta, #999); }
.shop-cart-remove:hover { color: #c0392b; }
.shop-cart-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.shop-cart-totals { max-width: 380px; margin-left: auto; background: var(--card-bg, #fafafa); border: 1px solid var(--card-border, #e5e5e5); border-radius: var(--card-radius, 8px); padding: 1.25rem; }
.shop-cart-totals > div { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.shop-cart-totals__grand { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--card-border, #e5e5e5); padding-top: 0.6rem; }
.shop-cart-totals__note { font-size: 0.82rem; color: var(--card-meta, #888); }
.shop-cart-totals .btn { width: 100%; margin-top: 0.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
    .shop-cart-table thead { display: none; }
    .shop-cart-table td { display: block; border: none; padding: 0.25rem 0; }
    .shop-cart-table tr { display: block; border-bottom: 1px solid var(--card-border, #e5e5e5); padding: 0.75rem 0; }
}

/* ── Shop checkout (SHOP P4b) ── */
.shop-checkout-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.shop-checkout-form h2 { font-size: 1.15rem; margin: 1.75rem 0 0.75rem; }
.shop-checkout-form h2:first-child { margin-top: 0; }
.shop-checkout-note { font-size: 0.85rem; color: var(--card-meta, #777); margin: 0.35rem 0 0.75rem; }
.shop-checkout-errors { margin-bottom: 1.5rem; }
.form-group--checkbox label { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400; }
.form-group--checkbox input { margin-top: 0.25rem; }
.shop-billing-details { margin: 0.5rem 0 1rem; }
.shop-billing-details summary { cursor: pointer; font-weight: 600; margin-bottom: 0.5rem; }
.shop-payment-method { border: 1px solid var(--card-border, #ddd); border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 1rem; }
.shop-age-gate { background: rgba(240, 173, 78, 0.12); border: 1px solid rgba(240, 173, 78, 0.5); border-radius: 8px; padding: 0.9rem 1rem; }
.shop-place-order { width: 100%; margin-top: 1rem; }
.shop-checkout-summary { background: var(--card-bg, #fafafa); border: 1px solid var(--card-border, #e5e5e5); border-radius: var(--card-radius, 8px); padding: 1.25rem; }
.shop-checkout-summary h2 { margin-top: 0; font-size: 1.1rem; }
.shop-summary-lines { list-style: none; margin: 0 0 1rem; padding: 0; }
.shop-summary-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; border-bottom: 1px solid var(--card-border, #eee); font-size: 0.92rem; }
.shop-checkout-summary .shop-cart-totals { max-width: none; margin: 0; padding: 0; border: none; background: transparent; }
@media (max-width: 900px) {
    .shop-checkout-layout { grid-template-columns: 1fr; }
    .shop-checkout-summary { order: -1; }
}

/* ── Shop coupons (SHOP P6B) ── */
.shop-cart-coupon { margin: 0 0 1rem; }
.shop-cart-coupon form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.shop-cart-coupon input[type="text"] { padding: 0.5rem 0.75rem; border: 1px solid var(--card-border, #ccc); border-radius: 6px; max-width: 220px; }

/* ── Quantity discounts (SHOP P6F) ── */
.shop-tier-list { list-style: none; margin: 0 0 1rem; padding: 0.5rem 0.9rem; background: var(--card-bg, #fafafa); border: 1px dashed var(--card-border, #ddd); border-radius: 8px; font-size: 0.9rem; }
.shop-tier-list li { padding: 0.15rem 0; }

/* ── Shop quick wins: quick add, related strip, checkout policy links ── */
.shop-product-card__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.shop-quick-add { white-space: nowrap; }
.shop-related { margin-top: 2.5rem; }
.shop-related h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.shop-checkout-policies { margin-top: 0.75rem; font-size: 0.85rem; text-align: center; color: var(--card-meta, #777); }

/* ── Shop customer accounts (SHOP P4A) ── */
.shop-account-narrow { max-width: 480px; }
.shop-account-form .form-group { margin-bottom: 1rem; }
.shop-account-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.shop-account-form input { width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--card-border, #ccc); border-radius: 6px; }
.shop-account-hint { font-weight: 400; font-size: 0.82rem; color: var(--card-meta, #777); }
.shop-account-links { margin-top: 1.25rem; font-size: 0.9rem; }
.shop-account-flash { background: var(--card-bg, #eef7ea); border: 1px solid var(--card-border, #cfe6c6); border-radius: 8px; padding: 0.75rem 1rem; }
.shop-account-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; font-size: 0.9rem; color: var(--card-meta, #777); }
.shop-account-shipment { background: var(--card-bg, #fafafa); border: 1px solid var(--card-border, #e5e5e5); border-radius: 8px; padding: 0.7rem 1rem; margin-bottom: 0.75rem; font-size: 0.92rem; }

/* ── Shop account self-serve (v14.6): sub-nav, address book, order actions ── */
.shop-account-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.shop-account-nav a { text-decoration: none; font-weight: 600; color: var(--link, #2a6e2a); padding-bottom: 0.2rem; border-bottom: 2px solid transparent; }
.shop-account-nav a.is-active { border-bottom-color: currentColor; }
.shop-account-check { font-weight: 400 !important; display: flex; align-items: center; gap: 0.5rem; }
.shop-account-check input[type="checkbox"] { width: auto !important; }
.shop-order-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.75rem 0 1.5rem; }
.shop-address-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.shop-address-card { border: 1px solid var(--card-border, #e5e5e5); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; gap: 0.75rem; background: var(--card-bg, #fff); }
.shop-address-card__body { font-size: 0.92rem; line-height: 1.45; }
.shop-address-card__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-start; }
.shop-address-card__actions form { margin: 0; }
.shop-address-default { display: inline-block; background: var(--card-accent, #8cc14d); color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.1rem 0.45rem; border-radius: 4px; margin-bottom: 0.4rem; }
.shop-address-card__actions details { width: 100%; }
.shop-address-card__actions summary { display: inline-block; list-style: none; cursor: pointer; }
.shop-address-card__actions summary::-webkit-details-marker { display: none; }
.shop-address-form { margin-top: 0.75rem; }
.btn-small { padding: 0.3rem 0.6rem !important; font-size: 0.82rem !important; }

/* ── Shop ops essentials (v14.1): holiday banner, free-delivery nudge, dispatch time ── */
.shop-holiday-banner { background: rgba(240, 173, 78, 0.14); border: 1px solid rgba(240, 173, 78, 0.55); border-radius: 8px; padding: 0.8rem 1.1rem; margin-bottom: 1.25rem; font-size: 0.95rem; }
.shop-free-delivery-nudge { background: var(--card-bg, #eef7ea); border: 1px dashed var(--card-border, #8cc14d); border-radius: 8px; padding: 0.6rem 0.9rem; font-size: 0.92rem; max-width: 380px; margin-left: auto; }
.shop-dispatch-time { font-size: 0.88rem; color: var(--card-meta, #777); margin-top: 0.5rem; }

/* ── Shop growth batch (v14.2): back-in-stock, cross-sell strips ── */
.shop-stock-alert { margin-top: 1rem; padding: 0.9rem 1rem; background: var(--card-bg, #fafafa); border: 1px solid var(--card-border, #e5e5e5); border-radius: 8px; max-width: 420px; }
.shop-stock-alert__row { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.shop-stock-alert__row input { flex: 1; min-width: 180px; padding: 0.5rem 0.75rem; border: 1px solid var(--card-border, #ccc); border-radius: 6px; }
.shop-stock-alert__feedback { display: block; margin-top: 0.4rem; font-size: 0.85rem; color: var(--card-meta, #777); }
.shop-cross-sell { margin-top: 2rem; }
.shop-cross-sell h2 { font-size: 1.2rem; margin-bottom: 0.9rem; }
.shop-recent-strip { display: flex; gap: 1rem; flex-wrap: wrap; }
.shop-recent-item { display: flex; flex-direction: column; gap: 0.35rem; width: 130px; text-decoration: none; font-size: 0.85rem; }
.shop-recent-item img { width: 130px; height: 130px; object-fit: cover; border-radius: 8px; border: 1px solid var(--card-border, #e5e5e5); }

/* ── Shop search + facets (SHOP-SEARCH, v14.3) ── */
.shop-filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; padding: 0.9rem 1rem; background: var(--card-bg, #fafafa); border: 1px solid var(--card-border, #e5e5e5); border-radius: 8px; }
.shop-filter-bar input[type="search"] { flex: 2; min-width: 170px; }
.shop-filter-bar input, .shop-filter-bar select { padding: 0.45rem 0.6rem; border: 1px solid var(--card-border, #ccc); border-radius: 6px; }
.shop-filter-bar input[type="number"] { width: 90px; }
.shop-filter-bar__stock { display: flex; gap: 0.35rem; align-items: center; font-size: 0.9rem; white-space: nowrap; }

/* ── Native reviews (SHOP-REVIEWS, v14.3) ── */
.shop-reviews { margin-top: 2.5rem; }
.shop-reviews h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.shop-review { border-bottom: 1px solid var(--card-border, #eee); padding: 0.9rem 0; }
.shop-review__head { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; font-size: 0.92rem; }
.shop-review__stars { color: #e8a33d; letter-spacing: 2px; }
.shop-review__verified { color: #15803d; font-size: 0.82rem; font-weight: 700; }
.shop-review__date { color: var(--card-meta, #999); font-size: 0.82rem; }
.shop-review__title { font-weight: 700; margin: 0.35rem 0 0.15rem; }
.shop-review__body { margin: 0.25rem 0 0; }
.shop-review-form-wrap { margin-top: 1.25rem; }
.shop-review-form-wrap summary { display: inline-block; cursor: pointer; list-style: none; }
.shop-review-form { margin-top: 1rem; max-width: 480px; }
.shop-review-form .form-group { margin-bottom: 0.9rem; }
.shop-review-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.shop-review-form input, .shop-review-form select, .shop-review-form textarea { width: 100%; padding: 0.5rem 0.7rem; border: 1px solid var(--card-border, #ccc); border-radius: 6px; }
.shop-review-feedback { display: block; margin-top: 0.5rem; font-size: 0.88rem; color: var(--card-meta, #777); }

/* ── Homepage video hero: white pre-paint fill (install-local — see UPGRADE-DIVERGENCES.md) ──
   The homepage banner is a video with no poster. The core slideshow-hero partial
   fills .slideshow-hero--video with #000, so the area paints black for the split
   second before the video's first frame decodes. Repaint it white to match the
   page background. Two-class specificity (and .is-home scope) beats the partial's
   inline `.slideshow-hero--video{background:#000}`, which sits later in the <body>. */
.is-home .slideshow-hero.slideshow-hero--video { background: #fff; }
