/*
 * Peanut Media site styles. Tokens live in tokens.css (the only place for
 * colors, type sizes, spacing, radii). Layers are declared in tokens.css:
 * reset, tokens, base, layout, components, blocks, templates, utilities.
 *
 * Shared hooks for block and form styles (blocks.css, forms.css):
 *
 *   .section                padded page section (96px desktop, 64px mobile)
 *   .section--paper         paper background (default page background)
 *   .section--white         white
 *   .section--mint          mint background, ink text (never mint text on white)
 *   .section--ink           ink background, white text, white focus ring
 *   .section--butter        butter (soft warm fill; yellow is retired)
 *   .section--peach         peach
 *   .section--gradient      the mint to peach to butter wash (--gradient-wash); the gold gradient on gold-accent pages
 *   .section--accent        the page accent's pale tint (--accent-pale)
 *   .section--flush         no vertical padding (full-bleed media sections)
 *   .section__title         centered section heading (h2 size)
 *   .container              1200px max, side gutters
 *   .measure                680px text column, centered
 *   .grid .grid--2 .grid--3 .grid--4   responsive card grids
 *   .prose                  rich text typography (writer fields, core blocks)
 *   .lead                   the lead under a page's H1 (heading face, 20px); section intros stay body size
 *   .eyebrow                13px caps label, body face 700, caps tracking
 *   .caps-label             13px caps label, body face 500
 *   .caps-list              inline list of caps links
 *   .card                   bordered card (.card__media .card__body .card__title .card__meta)
 *   .button-group           row of shared buttons (wraps)
 *   .faq .faq__item         native details/summary accordion
 *   .testimonial            blockquote with caps attribution
 *   .checklist              list with check marks
 *   .visually-hidden        screen-reader-only text
 */

/* ---------------------------------------------------------------- reset */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
  }

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

  body {
    min-height: 100vh;
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
  }

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

  img {
    height: auto;
  }

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

  /* Form fields, their labels and buttons keep 16px when body text is 14px
     on phones (iOS zooms into fields under 16px); their own classes may set
     a size */
  input,
  button,
  textarea,
  select,
  label {
    font-size: var(--step-0);
  }

  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  ul[class],
  ol[class] {
    list-style: none;
    padding: 0;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }
}

/* ----------------------------------------------------------------- base */
@layer base {
  html {
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 100%;
    font-synthesis-weight: none;
    scroll-padding-top: calc(var(--header-height) + var(--space-2));
  }

  /* Every transition and animation lives in motion.css (smooth scrolling included) */

  /* Paragraph body text: 14px on phones, 16px from 48rem (tokens.css) */
  body {
    background: var(--color-paper);
    color: var(--color-ink);
    font-size: var(--text-body);
    display: flex;
    flex-direction: column;
  }

  main {
    flex: 1 0 auto;
  }

  /* The home hero keeps its body size as built (tokens.css, the home hero scope) */
  .template-home .block-hero {
    font-size: var(--text-body);
  }

  /* Paragraphs (type and spacing item 1, 2026-11-30): ink soft on white and
     paper sections only; mint, coral, butter, gradient and ink sections keep
     their colors. The color is lifted from the paragraph's own (inherited)
     color: ink becomes ink soft (each channel at least --ink-soft-channel,
     #3d3d3d), while light text on a dark panel inside the section stays as
     it is. Labels, eyebrows, titles and names keep ink. No specificity, so a
     component that colors its paragraphs wins. Browsers without relative
     colors keep ink. Demos keep ink (their own dimmed states are measured
     against ink: the childcare checklist and the doula phone demo fell
     under 4.5:1 on ink soft, axe 2026-11-30). */
  :where(.section--white, .section--paper) :where(p:not(.eyebrow, .caps-label, [class*="label"], [class*="eyebrow"], [class*="title"], [class*="name"], [data-nosnippet] *, [class*="demo"] *)) {
    color: rgb(from currentColor max(r, var(--ink-soft-channel)) max(g, var(--ink-soft-channel)) max(b, var(--ink-soft-channel)) / alpha);
  }

  main:focus {
    outline: none;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    line-height: var(--leading-heading);
    letter-spacing: normal;
    /* no one-word last line (type and spacing, 2026-11-30: the 1040px
       container left short last lines); components that balance keep it */
    text-wrap: pretty;
  }

  h1 {
    font-size: var(--step-5);
    font-weight: var(--weight-display);
    line-height: var(--leading-tight);
  }

  h2 {
    font-size: var(--step-4);
    font-weight: var(--weight-display);
    line-height: var(--leading-tight);
  }

  h3 {
    font-size: var(--step-3);
  }

  h4 {
    font-size: var(--step-2);
  }

  h5,
  h6 {
    font-size: var(--step-title);
    font-weight: var(--weight-heading-sm);
  }

  /* Italic accent: one emphasized word or phrase in a display heading is set
     in Trirong Thin Italic. Only the Thin weight has an italic, so the accent
     is limited to the headings that use it (never whole paragraphs). */
  h1 em,
  h2 em,
  .hero__title em,
  .cta__title em,
  .cta-band__title em,
  .section__title em {
    font-style: italic;
    font-weight: inherit;
  }

  /* Type and spacing item 8 (2026-11-30): the italic word in h1, h2, a section
     title and the closing band's title is underlined, 1px, 0.14em below. The
     accent pages' highlighter stays where it is (blocks.css, .has-accent
     .hero__title em) and the home hero keeps no underline: both open
     questions for Christina */
  :is(h1, h2, .section__title, .cta-band__title, .cta__title) em {
    text-decoration-line: underline;
    text-decoration-thickness: var(--em-underline);
    text-underline-offset: var(--em-underline-offset);
  }

  .has-accent .hero__title em,
  .template-home .block-hero em {
    text-decoration-line: none;
  }

  a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  a:hover {
    text-decoration-thickness: 2px;
  }

  :focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
  }

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

  hr {
    border: 0;
    border-top: var(--border);
    margin-block: var(--space-4);
  }

  /* Item 10: nothing heavier than 600 (th is bold by default) */
  strong,
  b,
  th {
    font-weight: var(--weight-strong);
  }

  /* Trirong is loaded at 100 only (and 100 italic): bold inside a heading stays
     100, and the browser never fakes a bolder Trirong anywhere (design system:
     emphasis in a heading is the italic, never bold) */
  :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
    font-weight: inherit;
  }

  em,
  i {
    font-style: normal;
    font-weight: 500;
  }

  small {
    font-size: var(--step--1);
  }

  code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--color-white);
    border: var(--border);
    padding: 0.1em 0.35em;
  }

  /* Caps labels: 13px, 0.2em tracking, uppercase */
  .eyebrow,
  .caps-label,
  .caps-list {
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: var(--weight-strong);
    letter-spacing: var(--tracking-caps);
    line-height: 1.4;
    text-transform: uppercase;
  }

  /* Eyebrows above a heading (design system H5, owner decision 2026-10-24):
     11px, weight 600, 0.18em tracking; 25px to the heading (utilities) */
  .eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
  }

  /* Item 9: caps labels and lists at the label size, weight and tracking */
  .caps-label,
  .caps-list {
    font-size: var(--label-size);
    font-weight: var(--label-weight);
    letter-spacing: var(--label-tracking);
  }

  .caps-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
  }

  .caps-list a {
    text-decoration: none;
    text-underline-offset: 0.35em;
  }

  .caps-list a:hover {
    text-decoration: underline;
  }

  .lead {
    font-family: var(--font-heading);
    font-size: var(--text-lead);
    font-weight: var(--weight-heading-sm);
    line-height: var(--leading-lead);
  }

  .lead p + p {
    margin-top: var(--space-2);
  }

  /* Rich text: writer fields and runs of core blocks */
  .prose > * + * {
    margin-top: var(--space-3);
  }

  /* Item 11: paragraph after paragraph closer on landing pages; blog posts
     and guides keep --space-3 (.template-article, .template-guide, below) */
  .prose > p + p {
    margin-top: var(--space-para);
  }

  :is(.template-article, .template-guide) .prose > p + p {
    margin-top: var(--space-3);
  }

  /* Item 1: the prose of blog posts and guides keeps 16px from 48rem */
  :is(.template-article, .template-guide) .prose {
    font-size: var(--text-article);
  }

  .prose > h2,
  .prose > h3,
  .prose > h4 {
    margin-top: var(--space-5);
  }

  .prose > h2 + *,
  .prose > h3 + *,
  .prose > h4 + * {
    margin-top: var(--space-2);
  }

  .prose ul,
  .prose ol {
    padding-left: 1.25em;
  }

  .prose li + li {
    margin-top: var(--space-1);
  }

  .prose ul {
    list-style: square;
  }

  .prose blockquote {
    font-family: var(--font-heading);
    font-size: var(--step-1);
    font-weight: var(--weight-heading-sm);
    line-height: 1.4;
    padding-left: var(--space-3);
    border-left: 2px solid var(--color-ink);
  }

  .prose figure > figcaption,
  .prose .caption {
    font-size: var(--step--1);
    color: var(--color-muted);
    margin-top: var(--space-1);
  }

  .prose img {
    width: 100%;
  }
}

/* --------------------------------------------------------------- layout */
@layer layout {
  .container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
  }

  .measure {
    max-width: var(--measure);
    margin-inline: auto;
  }

  .container.measure {
    width: min(100% - 2 * var(--gutter), var(--measure));
  }

  /* Wide blocks (type and spacing item 5, 2026-11-30): text sections and
     ordinary card rows use --container (1040px); these were designed wide and
     keep --container-wide (1200px): the header with its mega menu and the
     footer (the page frame), the services hub's hero map, the case study
     page's hero and screens, the case study showcases on every page, the
     comparison tables, the care plan price table, the owner table, the
     content calculator, the location map, About's team row (four flip
     cards across: at 1040px "More about Xiomara" wrapped) and every hero
     (text beside a photo: at 1040px the tier pages' H1s ran to five lines
     and split "multi-location"). The home hero
     keeps its own (tokens.css, the home hero scope). */
  .site-header,
  .site-footer,
  .template-services .block-hero,
  .cs-hero,
  .cs-gallery,
  .section:has(.study-showcase, .cs-showcase),
  .block-compare,
  .block-careplans,
  .block-ownertable,
  .block-contentcalc,
  .block-locationmap,
  .block-team,
  .block-hero {
    --container: var(--container-wide);
  }

  /* Heroes keep the gutter they were designed with, as the home hero does
     (tokens.css): with item 5's wider gutter the text column lost 32px and
     "One multi-location" no longer fit a line. */
  .block-hero {
    --gutter: var(--gutter-hero);
  }

  .section {
    padding-block: var(--section-pad-top) var(--section-pad-bottom);
    background: var(--color-paper);
  }

  /* flow-root: a framed band's bottom margin stays on the section's own background */
  .section--flush {
    display: flow-root;
    padding-block: 0;
  }

  /* A full-width line opens every section. Not the first, under the header or
     the breadcrumb bar (each has its own), not between two dark sections, not
     after the case study bar, and not where a photo does the separating: a
     photo band (.section--flush, framed or full-bleed) and the section right
     after it. Stylesheets can sit between sections, so "after" is ~ and the
     band's neighbor may have one tag between them. */
  main > :not(link, style, script, nav) ~ .section:not(.section--ink + .section--ink, .casestudy-nav + .section, .section--flush, .section--flush + .section, .section--flush + :not(.section) + .section) {
    border-block-start: var(--border);
  }

  /* Home only (its long page held Lighthouse mobile under 93): sections from
     the third on skip rendering until they near the viewport, so their paint
     work and font files wait until after the first view. "auto" remembers
     each section's real height once it has rendered. Home's sections are
     tall, so the 40rem estimate stays close; pages with short sections would
     reserve too much space. */
  @media screen {
    .template-home main > .section:nth-child(n + 3) {
      content-visibility: auto;
      contain-intrinsic-size: auto 40rem;
    }
  }

  .section--paper {
    background: var(--color-paper);
  }

  .section--white {
    background: var(--color-white);
  }

  .section--mint {
    background: var(--color-brand);
    color: var(--color-ink);
  }

  .section--ink {
    --focus-ring: var(--color-white);
    /* Boxed buttons hover to white here: the default ink hover would vanish into the band */
    --btn-hover-bg: var(--color-white);
    --btn-hover-fg: var(--color-ink);
    background: var(--color-ink);
    color: var(--color-white);
  }

  .section--butter {
    background: var(--color-butter);
    color: var(--color-ink);
  }

  .section--peach {
    background: var(--color-accent-2);
    color: var(--color-ink);
  }

  .section--gradient {
    background: var(--gradient-wash);
    color: var(--color-ink);
  }

  /* Home page: the soft wash on the closing band too (design system,
     2026-10-25; design review #55). Every other closing band keeps the brand
     gradient. The heroes: "Hero rule" in the templates layer below */
  .template-home .cta-band.section--gradient {
    background: var(--gradient-home-wash);
  }

  /* The page accent's pale tint (tokens.css, --accent-pale): pale mint on a
     page without an accent. Ink on it is 13.4:1 or better. */
  .section--accent {
    background: var(--accent-pale);
    color: var(--color-ink);
  }

  .section__title {
    text-align: center;
    margin-bottom: var(--space-head);
  }

  .section__intro {
    text-align: center;
    max-width: var(--measure);
    margin: calc(var(--space-intro) - var(--space-head)) auto var(--space-head);
  }

  .grid {
    display: grid;
    gap: var(--grid-gap);
    grid-template-columns: minmax(0, 1fr);
  }

  @media (min-width: 48rem) {
    .grid--2,
    .grid--3,
    .grid--4 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (min-width: 64rem) {
    .grid--3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

  }

  .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .button-group:has(.btn--block) {
    flex-direction: column;
  }
}

/* ----------------------------------------------------------- components */
@layer components {
  /* Skip link */
  .skip-link {
    position: absolute;
    top: var(--space-1);
    left: var(--space-1);
    z-index: 100;
    padding: var(--space-1) var(--space-2);
    background: var(--color-ink);
    color: var(--color-white);
    font-size: var(--step--1);
    font-weight: var(--weight-strong);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
    transform: translateY(-200%);
  }

  .skip-link:focus {
    transform: none;
    outline-color: var(--color-white);
    outline-offset: -4px;
  }


  /* Header */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: var(--color-white);
    border-bottom: var(--border);
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    height: 100%;
  }

  .site-header__logo {
    display: block;
    flex: none;
  }

  .site-header__logo img {
    width: 114px;
    height: 55px;
  }

  .nav-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-right: calc(-1 * var(--space-1));
    color: var(--color-ink);
  }

  .nav-toggle__icon,
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    display: block;
    width: 32px;
    height: 3px;
    background: currentColor;
  }

  .nav-toggle__icon {
    position: relative;
  }

  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle__icon::before {
    top: -9px;
  }

  .nav-toggle__icon::after {
    top: 9px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon {
    background: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
    transform: translateY(9px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Mobile drawer: a full-height panel under the header */
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: var(--space-4) var(--gutter) var(--space-6);
    background: var(--color-white);
    border-top: var(--border);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list {
    display: flex;
    flex-direction: column;
    border-top: var(--border);
  }

  .site-nav__item {
    border-bottom: var(--border);
  }

  .site-nav__link {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
  }

  .site-nav__link[aria-current] {
    font-weight: var(--weight-strong);
  }

  .site-nav__link:hover {
    text-decoration: underline;
    text-underline-offset: 0.35em;
  }

  /* Items with sub-items: a nested list in the drawer, a dropdown on desktop */
  .site-nav__parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-nav__parent .site-nav__link {
    flex: 1 1 auto;
  }

  .site-nav__toggle {
    display: none;
  }

  .site-nav__sub {
    padding: 0 0 var(--space-2) var(--space-3);
  }

  .site-nav__sublink {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: var(--space-1) 0;
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
  }

  .site-nav__sublink:hover {
    text-decoration: underline;
    text-underline-offset: 0.35em;
  }

  .site-nav__sublink[aria-current] {
    font-weight: var(--weight-strong);
  }

  /* Links beneath a sub-item, in a plain dropdown */
  .site-nav__leaves {
    margin: 0;
    padding: 0 0 0 var(--space-3);
    list-style: none;
  }

  .site-nav__sublink--leaf {
    min-height: 40px;
    font-weight: 400;
    letter-spacing: 0.02em;
  }

  .site-nav__cta {
    margin-top: var(--space-3);
  }

  .site-nav__cta .btn {
    width: 100%;
  }

  html.nav-open {
    overflow: hidden;
  }

  html.nav-open body {
    padding-right: var(--scrollbar-gap, 0);
  }

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

    .site-nav,
    .site-nav.is-open {
      display: flex;
      position: static;
      align-items: center;
      gap: var(--space-4);
      overflow: visible;
      padding: 0;
      background: none;
      border: 0;
    }

    .site-nav__list {
      flex-direction: row;
      gap: var(--space-4);
      border: 0;
    }

    /* Every item centres its link: plain links (About) line up with the
       taller items that carry a submenu toggle */
    .site-nav__item {
      display: flex;
      align-items: center;
      border: 0;
    }

    .site-nav__link {
      padding: var(--space-1) 0;
      text-underline-offset: 0.5em;
    }

    .site-nav__link[aria-current] {
      font-weight: 500;
      text-decoration: underline;
      text-decoration-thickness: 2px;
    }

    .site-nav__cta {
      margin: 0;
    }

    .site-nav__cta .btn {
      width: auto;
    }

    /* Dropdown: absolutely positioned, so opening it never shifts the layout */
    .site-nav__item--parent {
      position: relative;
    }

    .site-nav__parent {
      gap: 0.125rem;
    }

    .site-nav__toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2rem;
      height: 2.75rem;
      margin-right: -0.5rem;
      color: var(--color-ink);
      border-radius: var(--radius-pill);
    }

    .site-nav__item.is-open .site-nav__chevron {
      transform: rotate(180deg);
    }

    /* As wide as its content needs (max-content), never wider than the
       viewport; site.js aligns it to the right edge of its trigger when it
       would run off the right side (.site-nav__sub--end) */
    .site-nav__sub {
      display: none;
      position: absolute;
      top: calc(100% + 0.5rem);
      left: calc(-1 * var(--space-2));
      z-index: 60;
      width: max-content;
      min-width: 15rem;
      max-width: calc(100vw - 2 * var(--gutter));
      padding: var(--space-1) 0;
      background: var(--color-white);
      border: var(--border);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow-hard);
    }

    /* invisible bridge between the item and the panel, so the pointer can cross the gap */
    .site-nav__sub::before {
      content: "";
      position: absolute;
      top: -0.75rem;
      right: 0;
      left: 0;
      height: 0.75rem;
    }

    .site-nav__item.is-open > .site-nav__sub {
      display: block;
    }

    .site-nav__sub--end {
      right: calc(-1 * var(--space-2));
      left: auto;
    }

    /* Links beneath a sub-item: plain links under it, at its own indent */
    .site-nav__leaves {
      padding-left: 0;
    }

    .site-nav__sublink--leaf {
      padding-block: 0.4375rem;
    }

    /* Below 80rem a long item wraps onto a second line with a hanging indent */
    .site-nav__sublink {
      display: block;
      min-height: 0;
      padding: 0.625rem var(--space-3) 0.625rem calc(var(--space-3) + 0.75em);
      line-height: 1.35;
      text-indent: -0.75em;
    }

    .site-nav__sublink[aria-current] {
      font-weight: 500;
      text-decoration: underline;
      text-decoration-thickness: 2px;
      text-underline-offset: 0.35em;
    }
  }

  /* 80rem (1280px) and up: every dropdown item on one line (the services
     panel has its own rules: menu.css) */
  @media (min-width: 80rem) {
    .site-nav__sub .site-nav__sublink {
      white-space: nowrap;
    }
  }

  /* Page header */
  .page-header {
    padding-block: var(--space-6) var(--space-5);
    text-align: center;
  }

  .page-header__inner > * + * {
    margin-top: var(--space-2);
  }

  .page-header__title {
    max-width: 20ch;
    margin-inline: auto;
  }

  .page-header__intro {
    max-width: var(--measure);
    margin-inline: auto;
  }

  /* With a band (page-header.php, $band): the band carries the top padding
     and the hero gradient behind the eyebrow and title; the intro and the
     filters follow on the header's own background */
  .page-header--band {
    padding-block-start: 0;
  }

  .page-header__band {
    padding-block: var(--space-6) var(--space-5);
  }

  .page-header__rest {
    padding-block-start: var(--space-5);
  }

  @media (min-width: 48rem) {
    .page-header {
      padding-block: var(--space-7) var(--space-6);
    }

    .page-header--band {
      padding-block-start: 0;
    }

    .page-header__band {
      padding-block: var(--space-7) var(--space-6);
    }
  }

  /* Closing call to action band: a rule marks where it starts, on every page */
  .cta-band {
    border-top: var(--border);
  }

  .cta-band__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .cta-band__title {
    font-size: var(--step-6);
    line-height: var(--leading-tight);
    max-width: 20ch;
  }

  /* The text runs as wide as the title above it: the copy is one column sized
     by the title (20ch), and the text's own width does not count toward it */
  .cta-band__copy {
    display: grid;
    grid-template-columns: minmax(0, max-content);
  }

  .cta-band__text {
    margin-top: var(--space-2);
    contain: inline-size;
  }

  @media (min-width: 48rem) {
    .cta-band__inner {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }

    .cta-band__copy {
      flex: 1 1 24rem;
    }

    /* The actions may shrink (and their labels wrap) rather than push the copy off the band */
    .cta-band__actions {
      flex: 0 1 auto;
      min-width: 0;
      justify-content: flex-end;
    }

    /* Real buttons (site v3): the heading gets the wider column */
    .cta-band--buttons .cta-band__copy {
      flex: 2 1 34rem;
    }

    .cta-band__aside {
      flex: 0 1 28rem;
      align-items: flex-end;
      text-align: right;
    }
  }

  .cta-band--buttons .cta-band__title {
    max-width: 22ch;
  }

  /* The buttons with a line under them (the Site Insight sentence) */
  .cta-band__aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
  }

  .cta-band__note {
    max-width: 40ch;
    margin: 0;
    font-size: var(--step--1);
    line-height: var(--leading-body);
  }

  /* Footer */
  .site-footer {
    background: var(--color-paper);
    border-top: var(--border);
    font-size: var(--step--1);
  }

  .site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5) var(--gutter);
    border-bottom: var(--border);
  }

  /* The link has a definite box before the lazy logo loads: sized from the
     image's percentage width alone, it was 0 wide until the file arrived
     and the footer shifted (CLS up to 0.113 at 390 px) */
  .site-footer__brand a {
    display: block;
    width: min(100%, 260px);
    aspect-ratio: 308 / 166;
  }

  .site-footer__brand img {
    display: block;
    width: 100%;
    height: auto;
  }

  .site-footer__content {
    padding: var(--space-5) var(--gutter);
  }

  .site-footer__content > * + * {
    margin-top: var(--space-4);
  }

  .site-footer__buttons .button-group {
    display: grid;
    gap: var(--space-2);
  }

  .site-footer__buttons .btn {
    justify-content: flex-start;
    text-align: left;
  }

  .site-footer__social {
    justify-content: flex-start;
  }

  /* Instagram and Facebook: a target at least 24 by 24 CSS px (final home pass
     5, 2026-11-30). The padding grows the target (the 11px label's 15.4px line
     plus 10px) and the equal negative margin gives the space back, so the row
     keeps its height and nothing moves. */
  .site-footer__social a {
    display: inline-block;
    min-width: 1.5rem;
    min-height: 1.5rem;
    margin-block: -0.3125rem;
    padding-block: 0.3125rem;
  }

  /* Link columns above the legal row: one column on phones, more as space allows */
  .site-footer__nav {
    display: grid;
    gap: var(--space-3) var(--space-4);
    grid-template-columns: minmax(0, 1fr);
    padding-top: var(--space-4);
    border-top: var(--border);
  }

  .site-footer__column-title {
    margin-bottom: var(--space-1);
    font-size: var(--step--1);
  }

  .site-footer__column-links {
    display: flex;
    flex-direction: column;
  }

  .site-footer__column-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: var(--space-1);
    font-size: var(--step-0);
    text-decoration: none;
  }

  .site-footer__column-links a:hover {
    text-decoration: underline;
  }

  .site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    align-items: baseline;
    justify-content: space-between;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-4);
  }

  .site-footer__links a {
    text-decoration: none;
  }

  .site-footer__links a:hover,
  .site-footer__cookies:hover {
    text-decoration: underline;
  }

  .site-footer__cookies {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
  }

  .site-footer__copyright {
    color: var(--color-muted);
  }

  /* The company line under the copyright: legal name (when the copyright does
     not already name it), phone and email from Site settings */
  .site-footer__contact {
    margin-top: var(--space-1);
    color: var(--color-muted);
  }

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

  .site-footer__contact a:hover {
    text-decoration: underline;
  }

  /* Sticky call button on phones (site/snippets/stickycall.php): printed after
     the footer, outside <main>, on pages whose model has showsStickyCall()
     (home, industry pages). Fixed, so it shifts nothing; it hides while the
     closing band or the footer is in view (stickycall.js), so it never
     covers the end of the page. */
  .stickycall {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    padding: 0.5rem var(--gutter) calc(0.5rem + env(safe-area-inset-bottom));
    background: var(--color-white);
    border-block-start: var(--border);
  }

  .stickycall[hidden] {
    display: none;
  }

  .stickycall__link {
    display: block;
    padding: var(--btn-pad-y, 0.875rem) var(--space-2);
    background: var(--color-ink);
    color: var(--color-white);
    border-radius: var(--btn-radius, 0);
    font-size: var(--btn-size, 0.75rem);
    font-weight: 500;
    letter-spacing: var(--btn-tracking, 0.18em);
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
  }

  .stickycall__link:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }

  @media (min-width: 48rem) {
    .stickycall {
      display: none;
    }
  }

  @media (min-width: 48rem) {
    .site-footer__buttons .button-group {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__social {
      justify-content: flex-end;
    }

    .site-footer__nav {
      grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    }
  }

  /* Tighter footer rows only where there is no touch screen */
  @media (hover: hover) and (pointer: fine) {
    .site-footer__column-links a {
      min-height: 0;
      padding-block: 0.25rem;
    }
  }

  @media (min-width: 64rem) {
    .site-footer__inner {
      grid-template-columns: 35fr 65fr;
    }

    .site-footer__brand {
      padding: var(--space-7) var(--space-5);
      border-bottom: 0;
      border-right: var(--border);
    }

    .site-footer__content {
      padding: var(--space-6) var(--space-5);
    }
  }

  /* Cards */
  .card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: var(--border);
  }

  .card__media {
    display: block;
    border-bottom: var(--border);
  }

  .card__media img {
    width: 100%;
  }

  .card__body {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    gap: var(--space-2);
    padding: var(--pad-card);
  }

  .card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: var(--border);
  }

  .card__title {
    font-size: var(--step-2);
  }

  .card__title a {
    text-decoration: none;
  }

  .card__title a:hover {
    text-decoration: underline;
  }

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

  .card__body .btn--link {
    margin-top: auto;
    align-self: flex-start;
  }

  /* Filter links */
  .filter__link {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    border: var(--border);
    border-radius: var(--radius-pill);
    background: var(--color-white);
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
  }

  .filter__link:hover {
    background: var(--color-ink);
    color: var(--color-white);
  }

  .filter__link[aria-current] {
    background: var(--color-brand);
    color: var(--color-ink);
  }

  /* FAQ (native details) */
  .faq {
    border-top: var(--border);
  }

  .faq__item {
    border-bottom: var(--border);
  }

  .faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    font-family: var(--font-heading);
    font-size: var(--step-title);
    font-weight: var(--weight-heading-sm);
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
  }

  .faq__question::-webkit-details-marker {
    display: none;
  }

  .faq__question::after {
    content: "+";
    flex: none;
    font-size: var(--step-2);
    line-height: 1;
  }

  .faq__item[open] .faq__question::after {
    transform: rotate(45deg);
  }

  .faq__answer {
    padding-bottom: var(--space-3);
  }

  /* Testimonial */
  .testimonial {
    text-align: center;
  }

  .testimonial__quote {
    font-family: var(--font-heading);
    font-size: var(--step-3);
    font-weight: var(--weight-heading);
    line-height: 1.3;
  }

  .testimonial__quote p + p {
    margin-top: var(--space-2);
  }

  /* Checklist */
  .checklist {
    display: grid;
    gap: var(--space-1);
  }

  .checklist li {
    position: relative;
    padding-left: 1.75em;
  }

  .checklist li::before {
    content: "";
    position: absolute;
    top: 0.45em;
    left: 0;
    width: 0.9em;
    height: 0.5em;
    border-left: 2px solid var(--color-ink);
    border-bottom: 2px solid var(--color-ink);
    transform: rotate(-45deg);
  }
}

/* ------------------------------------------------------------ templates */
@layer templates {
  /* Hero rule (Christina, 2026-10-26): every page's top section takes the
     home hero's soft wash (--gradient-hero), whatever the page accent: the
     hero block (home, hubs, About, the SEO, Partnership and Site Insight
     pages), the case study archive and hub heads (the band behind their
     eyebrow and title), the blog, guides, article, legal, contact, booking,
     thank-you, capture and error heads. Two exceptions keep their own
     gradient: the tier pages (their accent wash) and the guide hero
     (.c-guide-hero, not listed). Case study heroes are solid ink
     (casestudy.css). In this layer, so it wins over the accent washes
     (blocks.css) and the template heads (uplift-c.css); the gold grain stays
     off a hero that is no longer gold. */
  body:not(.template-tier) :is(
    .block-hero.section--gradient,
    .page-header__band,
    .c-blog-head,
    .c-guides-head,
    .c-article__header,
    .section--gradient:is(.d-head, .c-contact, .c-book, .c-thanks, .c-capture, .d-404)
  ) {
    background: var(--gradient-hero);
  }

  body:not(.template-tier) .block-hero.section--gradient::before {
    content: none;
  }

  /* Archives */
  .archive__empty {
    text-align: center;
    color: var(--color-muted);
  }

  /* Simple centered pages: thank-you, links, error */
  .simple__inner {
    text-align: center;
  }

  .simple__inner > * + * {
    margin-top: var(--space-3);
  }

  .simple__actions {
    justify-content: center;
    margin-top: var(--space-4);
  }

  .simple__text {
    max-width: var(--measure);
    margin-inline: auto;
  }

  /* Article */
  .article__header {
    padding-block: var(--space-5) var(--space-4);
    text-align: center;
  }

  .article__header > .measure > * + * {
    margin-top: var(--space-2);
  }

  /* the back link stays centred under the centred header (the button is a
     flex box, so text-align no longer places it) */
  .article__back {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-3);
  }

  .article__byline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-1) var(--space-3);
    margin-top: var(--space-3);
  }

  .article__byline a {
    text-decoration-thickness: 1px;
  }

  .article__cover {
    margin-bottom: var(--space-5);
  }

  .article__cover img {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .article__body {
    padding-bottom: var(--section-pad);
  }

  .article__body > * + * {
    margin-top: var(--space-4);
  }

  .article__intro {
    padding-bottom: var(--space-3);
    border-bottom: var(--border);
  }

  /* Back link: arrow on the left (the hover nudge is in motion.css) */
  .btn--back {
    flex-direction: row-reverse;
  }

  .btn--back .btn__arrow {
    transform: scaleX(-1);
  }

  /* Blocks rendered inside a narrow column: no extra section padding or container */
  .article__body .section,
  .legal__body .section {
    padding-block: 0;
    background: none;
  }

  .article__body .section > .container,
  .legal__body .section > .container {
    width: 100%;
  }

  /* Legal */
  .legal__body {
    padding-bottom: var(--section-pad);
  }

  .casestudy-hero__outcome {
    max-width: 44ch;
  }

  .gallery {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: minmax(0, 1fr);
  }

  @media (min-width: 48rem) {
    .gallery {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  }

  .gallery__item {
    margin: 0;
  }

  .gallery__item img {
    display: block;
    width: 100%;
    height: auto;
    border: var(--border);
    border-radius: var(--radius-sm);
    background: var(--color-paper);
  }

  /* Section nav: sticks under the site header; one row on desktop, a
     horizontally scrolling chip row on phones (the list scrolls, never
     the page). site.js marks the section in view, centers its chip and sets
     data-more for the edge fades. */
  .casestudy-nav {
    position: sticky;
    top: var(--header-height);
    z-index: 40;
    background: var(--color-white);
    border-bottom: var(--border);
    /* soft but clearly there, so the bar reads as over the page (design review #77) */
    box-shadow: var(--shadow-sticky);
  }

  .casestudy-nav__list {
    display: flex;
    gap: var(--space-1);
    margin: 0;
    padding: var(--space-1) 0;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .casestudy-nav__list::-webkit-scrollbar {
    display: none;
  }

  .casestudy-nav__item {
    flex: none;
  }

  .casestudy-nav__link {
    display: inline-block;
    min-height: 44px;
    padding: 0.7em 0.9em;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
  }

  .casestudy-nav__link:hover,
  .casestudy-nav__link:focus-visible {
    border-color: var(--color-ink);
  }

  .casestudy-nav__link[aria-current="true"] {
    background: var(--color-brand);
    border-color: var(--color-ink);
  }

  /* Phones and tablets: the row runs edge to edge with 16px at each end (a
     margin on the last chip, since browsers differ on end padding in a scroller),
     and a soft fade shows on the side with more to scroll */
  @media (max-width: 63.9375rem) {
    .casestudy-nav__list {
      margin-inline: calc(-1 * var(--gutter));
      padding-inline-start: 1rem;
      scroll-padding-inline: 1rem;
    }

    .casestudy-nav__item:last-child {
      margin-inline-end: 1rem;
    }

    .casestudy-nav::before,
    .casestudy-nav::after {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      z-index: 1;
      width: 2.5rem;
      opacity: 0;
      pointer-events: none;
      transition: opacity var(--duration) ease;
    }

    .casestudy-nav::before {
      left: 0;
      background: linear-gradient(to right, var(--color-white), transparent);
    }

    .casestudy-nav::after {
      right: 0;
      background: linear-gradient(to left, var(--color-white), transparent);
    }

    .casestudy-nav[data-more~="start"]::before,
    .casestudy-nav[data-more~="end"]::after {
      opacity: 1;
    }
  }

  /* Anchor targets land below the sticky header and nav */
  .casestudy-faq[id] {
    scroll-margin-top: calc(var(--header-height) + 3.75rem);
  }

  @media print {
    .casestudy-nav {
      position: static;
      box-shadow: none;
    }

    .casestudy-nav__list {
      flex-wrap: wrap;
      margin-inline: 0;
      padding-inline: 0;
      overflow: visible;
    }

    .casestudy-nav::before,
    .casestudy-nav::after {
      display: none;
    }
  }

}

/* ------------------------------------------------------------ utilities */
@layer utilities {
  /* Text rhythm on every page (design review 2026-10-22): 25px between a caps
     label and the heading under it, 12px between a caps label and the body
     text under it (#13, 2026-10-24), 40px between an H1 and its lead. In the
     last layer, so block and template rules that zero heading margins (hero,
     section heads, page heads) cannot undo it. */
  .eyebrow + :is(h1, h2, h3) {
    margin-block-start: var(--space-label);
  }

  :is(.eyebrow, .caps-label) + p:not(.eyebrow, .caps-label) {
    margin-block-start: var(--space-label-text);
  }

  h1 + .lead {
    margin-block-start: var(--space-lead);
  }

  /* The hidden attribute always wins (last layer): controls that a script
     reveals, such as the team card and carousel buttons, are .btn elements
     whose display would otherwise override it */
  [hidden] {
    display: none;
  }

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

}

/* Breadcrumb (visible, matches the BreadcrumbList JSON-LD) */
@layer components {
  .breadcrumb {
    padding-block: var(--space-2);
    border-bottom: var(--border);
    background: var(--color-white);
    font-size: var(--step--1);
  }

  /* One line at every width: a wrapping breadcrumb re-wrapped when the web font
     replaced its fallback and moved the hero (layout shift 0.18 at 390,
     2026-11-19). The links stay whole; the current page's name (the H1 just
     below) ends in an ellipsis when it does not fit. */
  .breadcrumb__list {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-1);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .breadcrumb__item {
    flex: none;
    white-space: nowrap;
  }

  .breadcrumb__item + .breadcrumb__item::before {
    content: "/";
    margin-inline-end: var(--space-1);
    color: var(--color-muted);
  }

  .breadcrumb__item a {
    display: inline-block;
    min-height: 44px;
    padding-block: 12px;
    color: inherit;
  }

  .breadcrumb__item[aria-current="page"] {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    padding-block: 12px;
    color: var(--color-muted);
    text-overflow: ellipsis;
  }
}

/* Case study house format: sections, dated results */
@layer templates {

  .casestudy-results__early {
    display: inline-block;
    margin-block-end: var(--space-3);
    padding: var(--space-1) var(--space-2);
    border: var(--border);
    border-radius: var(--radius-pill);
    background: var(--color-white);
  }

  /* "From Christina": a short signed aside after the results */
  .casestudy-note {
    padding: var(--space-3) var(--space-4);
    border-left: 4px solid var(--color-brand);
    background: var(--color-paper);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .casestudy-note__label {
    margin-block-end: var(--space-2);
  }

  .casestudy-note__text {
    font-family: var(--font-heading);
    font-size: var(--step-1);
    font-weight: var(--weight-heading-sm);
    line-height: 1.4;
  }

  .casestudy-note__signature {
    margin-block-start: var(--space-2);
  }

  .metrics {
    display: grid;
    gap: var(--space-3);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
  }

  @media (min-width: 48rem) {
    .metrics {
      grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    }
  }

  .metrics__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3);
    border: var(--border);
    background: var(--color-white);
  }

  /* The number big, the description under it (design system, as on the study cards) */
  .metrics__figure {
    font-family: var(--font-heading);
    font-size: var(--step-6);
    font-weight: var(--weight-heading);
    line-height: var(--leading-tight);
  }

  /* A label, not body text: stays 16px on phones */
  .metrics__label {
    font-size: var(--step-0);
    font-weight: 500;
  }

  .metrics__source,
  .metrics__note {
    color: var(--color-muted);
    font-size: var(--step--1);
  }
}

/* ---------- Section heads on desktop (bulk fixes A1, owner, 2026-11-29) ----------
   From 64rem up a section with no second column beside its head centers its
   eyebrow, heading and intro, and centers its content box in the container.
   The hook is .block-head, which every head printed by site/snippets/block-head.php
   carries, when the head sits straight inside its block's root (.container > root >
   head); a head inside a column wrapper (showcase__copy, nexttown__words,
   aetrack__copy and the like) is one side of two columns and stays as it is,
   except the wide showcase, whose copy runs over the whole width. The points
   heads that run over the whole width and the funnel map's head join the rule.
   An intro longer than about three lines (.block-head__long, set in the snippet)
   stays left-aligned inside the centered column. Under 64rem nothing changes.
   Scope: the landing templates. The industry pages keep their own designs and
   the Content plans page (the one with the content calculator) is left alone.
   In the templates layer so it wins over a block's own head margins (blocks layer).
   A block that must keep its head at the start adds .block-head--start. */
@layer templates {
  @media (min-width: 64rem) {
    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) :is(.container > * > .block-head, .showcase--wide > .showcase__copy > .block-head, :is(.points--searches, .points--blueprint, .points--list, .points--rows, .points--photos) > .points__head, .funnelmap > .funnelmap__head):not(.block-head--start) {
      max-width: 48rem;
      margin-inline: auto;
      text-align: center;
    }

    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) :is(.container > * > .block-head, .showcase--wide > .showcase__copy > .block-head, :is(.points--searches, .points--blueprint, .points--list, .points--rows, .points--photos) > .points__head, .funnelmap > .funnelmap__head):not(.block-head--start) > * {
      margin-inline: auto;
    }

    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) :is(.container > * > .block-head, .showcase--wide > .showcase__copy > .block-head, :is(.points--searches, .points--blueprint, .points--list, .points--rows, .points--photos) > .points__head, .funnelmap > .funnelmap__head):not(.block-head--start) > h2 {
      text-wrap: balance;
    }

    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) :is(.container > * > .block-head, .showcase--wide > .showcase__copy > .block-head, :is(.points--searches, .points--blueprint, .points--list, .points--rows, .points--photos) > .points__head, .funnelmap > .funnelmap__head):not(.block-head--start) > .block-head__long {
      text-align: start;
    }

    /* The content under a centered head: a box narrower than the container
       (a 68rem demo, a 38rem closing line) sits in the middle */
    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) .container > * > .block-head:not(.block-head--start) ~ * {
      margin-inline: auto;
    }

    /* A closing line, a note or a demo hint under the content: as wide as its
       text, so a short line is centered and a longer one reads left-aligned
       in a centered column */
    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) .container > * > .block-head:not(.block-head--start) ~ :is([class*="__closing"], [class*="__outro"], [class*="__note"], [class*="__over"], [class*="__after"], .demo-hint),
    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) :is(.points--searches, .points--blueprint, .points--list, .points--rows, .points--photos) > .points__head ~ .points__outro {
      width: fit-content;
      margin-inline: auto;
    }

    /* The receptionist demo's tabs (Custom websites) under its centered head */
    :is(.template-home, .template-tier, .template-page, .template-hub, .template-care, .template-about) .container > * > .block-head ~ .p05x-rec__tabs {
      display: flex;
      width: fit-content;
    }
  }
}

/* ---------- Card rows (bulk fixes A2, 2026-11-29): cards in one row share
   their lines. A blog card's category and a guide card's "Free guide" pill
   take the same height, so the titles beside each other start on one line. */
@layer templates {
  .bp-card__kicker {
    align-items: center;
    min-height: calc(1lh + 0.2em + 2px);
  }
}

/* The industry switch, outside every layer so it wins over a block's own display (unlayered rules come last).
   The industry switch (extensions/indswitch.php, ind-early.js): wording that belongs to the
   neutral state only (the line that says the sample is one trade) goes once an industry is
   active; <html data-ind> is set before the first paint, so it never shows and then goes */
html[data-ind]:not([data-ind=""]) [data-ind-neutral] {
  display: none;
}

/* ...unless it is kept for the trade it was written in ({{ind-neutral:nanny-agency}}, data-ind-keep) */
html[data-ind="nanny-agency"] [data-ind-neutral][data-ind-keep~="nanny-agency"],
html[data-ind="household-staffing"] [data-ind-neutral][data-ind-keep~="household-staffing"],
html[data-ind="childcare-center"] [data-ind-neutral][data-ind-keep~="childcare-center"],
html[data-ind="play-cafe"] [data-ind-neutral][data-ind-keep~="play-cafe"],
html[data-ind="therapist"] [data-ind-neutral][data-ind-keep~="therapist"],
html[data-ind="doula"] [data-ind-neutral][data-ind-keep~="doula"],
html[data-ind="midwife"] [data-ind-neutral][data-ind-keep~="midwife"],
html[data-ind="healthcare-practice"] [data-ind-neutral][data-ind-keep~="healthcare-practice"],
html[data-ind="med-spa"] [data-ind-neutral][data-ind-keep~="med-spa"],
html[data-ind="holistic-wellness"] [data-ind-neutral][data-ind-keep~="holistic-wellness"],
html[data-ind="coach"] [data-ind-neutral][data-ind-keep~="coach"],
html[data-ind="nonprofit"] [data-ind-neutral][data-ind-keep~="nonprofit"],
html[data-ind="ecommerce"] [data-ind-neutral][data-ind-keep~="ecommerce"] {
  display: revert;
}

/* Case study links underline on hover and on keyboard focus, site-wide (final uplift 1.1): the
   link-style buttons ("Read case study", "See all case studies") and every text link to a study
   in the page. The card rules (a card's name, its decorative "Read case study") are in study-cards.css */
@layer utilities {
  .btn--link:focus-visible,
  main a[href*="/case-studies/"]:not(.btn, .filter__link):is(:hover, :focus-visible) {
    text-decoration-line: underline;
    text-decoration-color: currentColor;
  }
}
