/* ============================================================================
   Insight Surgery - site stylesheet
   Extracted from the per-page inline styles in the original mockups and
   consolidated into one theme-aware sheet.

   Structure:
     1. Fonts
     2. Tokens (light) + theme overrides (dark)
     3. Reset and base
     4. Typography
     5. Layout primitives
     6. Components
     7. Page blocks
     8. Responsive
   ========================================================================= */

/* -- 1. Fonts ------------------------------------------------------------ */
/* Self-hosted: no third-party request, and no visitor IPs sent to Google. */

@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/assets/fonts/barlow-800.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('/assets/fonts/barlow-900.woff2') format('woff2'); }

/* -- 2. Tokens ----------------------------------------------------------- */

:root {
  /* brand constants - identical in both themes */
  --blue: #16a7e6;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* surfaces */
  --paper: #ffffff;
  --paper-2: #f4f4f4;
  --paper-3: #ffffff;

  /* text */
  --ink: #0a0a0a;
  --text: #0a0a0a;
  --muted: #5a5a5a;

  /* #16a7e6 on white is 2.73:1 and fails AA for text, so link text uses a
     darkened blue. The brand blue stays for non-text accents and the
     wordmark. See docs/DARK-MODE.md. */
  --accent: #16a7e6;
  --accent-text: #0b6d96;

  --rule: #dedede;
  --rule-strong: #c9c9c9;

  /* the closing CTA band */
  --band-bg: #0a0a0a;
  --band-text: #ffffff;
  --band-muted: rgba(255, 255, 255, 0.55);
  --band-visual: #0e0e0e;

  /* the footer is a dark band in both themes */
  --footer-bg: #0a0a0a;
  --footer-text: #b8b8b8;
  --footer-body: #9a9a9a;
  --footer-title: #6f6f6f;
  --footer-rule: #1e1e1e;
  --footer-rule-soft: #141414;

  /* A content container (review item L-01): text and card grids sit in a
     1320px column with a fluid gutter, so headings and paragraphs no longer
     run to the window edges on a wide monitor. Tint bands, photographs, the
     hero canvas and the closing CTA band still run full width. */
  --shell: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  /* One inset for every tile. A bleed grid steps out by exactly this much,
     so the text inside the outer tiles lines up with the heading above them
     (review item B-05). Never wider than the gutter, or a phone would get a
     horizontal scroll. */
  --card-pad: min(clamp(24px, 2.6vw, 34px), var(--gutter));
  --header-h: 68px;

  /* Edge fades for photographs that sit beside copy. Eased rather than a
     straight ramp, so there is no visible line where the fade stops. A mask
     only sets opacity, so these work in either theme. */
  --fade-from-left: linear-gradient(to right, transparent 0, rgba(0,0,0,.18) 5%, rgba(0,0,0,.5) 11%, rgba(0,0,0,.82) 17%, #000 24%);
  --fade-from-right: linear-gradient(to left, transparent 0, rgba(0,0,0,.18) 5%, rgba(0,0,0,.5) 11%, rgba(0,0,0,.82) 17%, #000 24%);
  --fade-from-top: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.18) 6%, rgba(0,0,0,.5) 13%, rgba(0,0,0,.82) 21%, #000 30%);
}

:root:not([data-theme='light']) {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #0a0a0a;
    --paper-2: #141414;
    --paper-3: #1c1c1c;

    --ink: #f4f4f4;
    --text: #e8e8e8;
    --muted: #a0a0a0;

    /* on near-black the brand blue reaches 7.26:1, so it needs no darkening */
    --accent: #16a7e6;
    --accent-text: #16a7e6;

    --rule: #2e2e2e;
    --rule-strong: #3d3d3d;

    /* a pure-black band on a near-black page would vanish; the closing block
       becomes a raised panel with an accent hairline instead */
    --band-bg: #16181a;
    --band-text: #f4f4f4;
    --band-muted: rgba(244, 244, 244, 0.6);
    --band-visual: #101214;

    --footer-bg: #050505;
    --footer-rule: #1c1c1c;
    --footer-rule-soft: #121212;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #0a0a0a;
  --paper-2: #141414;
  --paper-3: #1c1c1c;

  --ink: #f4f4f4;
  --text: #e8e8e8;
  --muted: #a0a0a0;

  --accent: #16a7e6;
  --accent-text: #16a7e6;

  --rule: #2e2e2e;
  --rule-strong: #3d3d3d;

  --band-bg: #16181a;
  --band-text: #f4f4f4;
  --band-muted: rgba(244, 244, 244, 0.6);
  --band-visual: #101214;

  --footer-bg: #050505;
  --footer-rule: #1c1c1c;
  --footer-rule-soft: #121212;
}

/* -- 3. Reset and base --------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--text);
  /* 17px on a phone, 19px on a large monitor. Anything smaller read as
     small print on a phone, and beside 76px headlines on a wide screen. */
  font-size: clamp(17px, 0.3vw + 13.3px, 19px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.skip-link:focus { left: 0; }

.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;
}

/* -- 4. Typography ------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: var(--ink);
}

/* H1 is the largest type on every page (review item B-02). */
h1 { font-size: clamp(2.75rem, 1rem + 3.4vw, 5rem); line-height: 0.92; }
h2 { font-size: clamp(2rem, 1rem + 2.6vw, 3.5rem); }
h1, h2, h3 { text-wrap: balance; }
h3 { font-size: clamp(20px, 2.2vw, 30px); }
h4 { font-size: clamp(16px, 1.6vw, 21px); letter-spacing: 0.01em; }
h5, h6 { font-size: 15px; letter-spacing: 0.06em; }

p { margin-bottom: 1.15em; }
/* 60 to 72 characters a line (review item L-07). */
main p { max-width: 70ch; }
p:last-child { margin-bottom: 0; }

.label,
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.lede {
  font-size: clamp(19px, 1vw + 10px, 25px);
  line-height: 1.65;
  color: var(--text);
  max-width: 62ch;
}

/* Running text scales with the window. Widths are in ch, so the block grows
   with the type and a line stays 60-75 characters at every size. */
.prose { max-width: 72ch; font-size: clamp(18px, 0.5vw + 12.7px, 21px); }
/* Long-form body copy, a step up again: a page whose job is to be read, run
   down the page rather than sitting inside a tile. */
.prose--lead { font-size: clamp(19px, 0.7vw + 11.7px, 23px); line-height: 1.75; max-width: 70ch; }
.prose h2 { margin: 2em 0 0.6em; font-size: clamp(22px, 2.4vw, 32px); }
.prose h3 { margin: 1.8em 0 0.5em; font-size: clamp(18px, 1.9vw, 24px); }
.prose h4 { margin: 1.6em 0 0.5em; }
.prose ul, .prose ol { margin: 0 0 1.15em 1.1em; }
.prose ul li { list-style: disc; margin-bottom: 0.4em; padding-left: 4px; }
.prose ol li { list-style: decimal; margin-bottom: 0.4em; padding-left: 4px; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 700; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.4em; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; }
.prose th { background: var(--paper-2); font-weight: 700; }

/* Wide content must scroll inside itself, never the page. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* -- 5. Layout primitives ------------------------------------------------ */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  /* 104px on a desktop, 64px on a tablet and 48px on a phone (L-04). */
  padding: 104px 0;
  border-bottom: 1px solid var(--rule);
}
.section--flush { padding: 0; }
/* A full-bleed image band. The image is cropped to the band rather than the
   band taking the image's own height, so a 3:2 photograph and a 16:9 one
   make the same shape, and neither eats a whole viewport. */
.section--flush > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62vh;
  object-fit: cover;
}
.section--tint { background: var(--paper-2); }
.section--last { border-bottom: 0; }

.section-head { margin-bottom: clamp(32px, 4vw, 56px); max-width: 78ch; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--text); max-width: 62ch; font-size: clamp(18px, 0.5vw + 12.7px, 21px); }

/* On a wide screen a head sets its headline on the left and its standfirst on
   the right, the two meeting on the headline's last line. Stacked, the
   standfirst stops at its measure and leaves half the window empty beside a
   headline that already spans it. Below 1101px they stack again. Rows are
   placed by hand: the trail across the top, then a flexible spacer, then
   label and headline. The standfirst spans the spacer down to the headline,
   so when it is the taller of the two its extra height opens the spacer
   rather than prising the label away from its headline. A head with nothing
   to set beside the headline lets it run full. */
@media (min-width: 1101px) {
  .section-head,
  .page-head .shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    /* trail, label, headline, then a flexible row that takes any extra
       height of the standfirst, so it never pushes the headline down */
    grid-template-rows: auto auto auto 1fr;
    column-gap: 64px;
    align-items: start;
    max-width: none;
  }
  .page-head .breadcrumb { grid-column: 1 / -1; grid-row: 1; }
  .section-head > .label,
  .page-head .label { grid-column: 1; grid-row: 2; }
  .section-head > h2,
  .page-head h1 { grid-column: 1; grid-row: 3; margin-bottom: 0; }
  .section-head > h2:last-child,
  .page-head h1:last-child { grid-column: 1 / -1; }
  /* The standfirst starts level with the eyebrow (review item L-02). */
  .section-head > :not(.label):not(h2),
  .page-head .shell > .lede {
    grid-column: 2; grid-row: 2 / 5;
    max-width: 52ch; margin: 0;
  }
}

.grid { display: grid; gap: 1px; background: var(--rule); }
.grid > * { background: var(--paper); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
/* For a set whose length is not a round number - five specialties, say - so
   the row fills the window instead of leaving a hole in a fixed four. */
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
/* For a set that does not fill its last row - a filtered list, say. The
   rules come from each tile's own shadow instead of the grid's background,
   so an empty cell is paper rather than a grey block. */
.grid--ragged { background: transparent; }
.grid--ragged > * { box-shadow: 1px 0 0 var(--rule), 0 1px 0 var(--rule); }

/* Tile grids run edge to edge. The section keeps its gutter so headings stay
   on the text measure, and the grid steps back out of it so the rules meet
   the window. Set on the grid rather than the section, because the heading
   above it must not move. */
.grid--bleed {
  margin-left: calc(-1 * var(--card-pad));
  margin-right: calc(-1 * var(--card-pad));
}

/* A section split down the middle, text one side and a full-height image the
   other, with the image running to the window edge. Same shape as the hero
   and the closing band. */
.split { display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch; }
.split__body {
  padding: clamp(48px, 6vw, 92px) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split__media { background: var(--paper-2); overflow: hidden; min-height: 300px; }
.split__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Image left, copy right. Done with order rather than by reversing the
   markup, so the document order stays heading-then-image for screen readers,
   and so the stacked layout below can put the heading back on top. */
.split--flip { grid-template-columns: 1fr 1.05fr; }
.split--flip .split__media { order: -1; }
/* Photographs fade into the copy column, as in the Get In Touch band. */
.split__media:has(img:not(.ph-img)) { background: none; }
.split__media img:not(.ph-img) { -webkit-mask-image: var(--fade-from-left); mask-image: var(--fade-from-left); }
.split--flip .split__media img:not(.ph-img) { -webkit-mask-image: var(--fade-from-right); mask-image: var(--fade-from-right); }

.cols { display: grid; gap: clamp(28px, 4vw, 64px); }
.cols--2 { grid-template-columns: repeat(2, 1fr); }
.cols--3 { grid-template-columns: repeat(3, 1fr); }
.cols--sidebar { grid-template-columns: minmax(0, 1fr) 320px; }

/* -- 6. Components ------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--onband { background: var(--band-text); color: var(--band-bg); border-color: var(--band-text); }
.btn--onband:hover { background: transparent; color: var(--band-text); }
.btn--onband-outline { background: transparent; color: var(--band-text); border-color: var(--band-text); }
.btn--onband-outline:hover { background: var(--band-text); color: var(--band-bg); }
.btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 0 var(--gutter);
  max-width: var(--shell);
  margin: 0 auto;
}

.nav-left { display: flex; align-items: center; gap: 18px; }
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 6px 0;
}

.hamburger { display: block; width: 18px; height: 12px; position: relative; }
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.22s, opacity 0.22s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 5px; }
.hamburger span:nth-child(3) { top: 10px; }
body.menu-open .hamburger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.brand { display: inline-flex; align-items: center; }
.brand svg, .brand img { height: 30px; width: auto; }
/* The supplied light and dark wordmarks are the same shape and differ only in
   the ink half, so one inline copy is themed here rather than shipping both.
   These are the artwork's own colours, not the body ink token. */
.brand .wordmark-ink { fill: #0a0a0a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .brand .wordmark-ink { fill: #ffffff; }
}
:root[data-theme='dark'] .brand .wordmark-ink { fill: #ffffff; }


/* The company name in copy, set like the logo (tools/brand-name.js):
   "insight" in the surrounding text colour, "surgery" in the logo blue. */
.brand-name { text-transform: none; white-space: nowrap; }
.brand-name__a { color: inherit; }
.brand-name__b { color: var(--blue); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.18s, background 0.18s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .icon-moon { display: none; }
}

/* Mega menu */
.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 99;
}
body.menu-open .mega-menu { opacity: 1; pointer-events: all; transform: translateY(0); }

.mega-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.menu-col-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.menu-col a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  transition: color 0.15s, padding-left 0.15s;
}
.menu-col a:hover { color: var(--accent-text); padding-left: 6px; }
.menu-col a.is-highlight { color: var(--accent-text); font-weight: 800; }

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  padding: var(--card-pad);
  background: var(--paper);
  transition: background 0.18s;
}
.card:hover { background: var(--paper-2); }
/* display:flex above outranks the browser's [hidden] rule, so the case study
   filter would toggle the attribute and nothing would disappear. */
.card[hidden] { display: none; }
/* The image fills the tile. Negative margins pull it back out of the card's
   padding so it meets the tile edges, while the copy below keeps the inset. */
.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-2);
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) var(--card-pad);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__title { font-size: clamp(17px, 1.7vw, 22px); font-weight: 900; text-transform: uppercase; line-height: 1.15; margin-bottom: 10px; }
.card__meta { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.card__body { font-size: clamp(17px, 0.35vw + 13.6px, 19px); color: var(--text); line-height: 1.7; margin-bottom: 18px; }
.card__cta { margin-top: auto; font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
/* The 18px under the body is clearance for a call to action. A tile that
   ends on its body copy does not want it. */
.card > .card__body:last-child { margin-bottom: 0; }

/* Chips / filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.16s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Closing CTA band */
.cta-band { background: var(--band-bg); color: var(--band-text); border-top: 1px solid var(--rule); }
:root[data-theme='dark'] .cta-band,
.cta-band { border-top-color: var(--rule); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .cta-band { border-top: 1px solid var(--accent); }
}
:root[data-theme='dark'] .cta-band { border-top: 1px solid var(--accent); }

.cta-band__inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
}
.cta-band__body { padding: clamp(48px, 6vw, 80px) var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.cta-band__body .label { color: var(--band-muted); }
.cta-band__title {
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.92;
  color: var(--band-text);
  margin-bottom: 18px;
}
.cta-band__title span { color: var(--accent); }
.cta-band__body > p { font-size: 18px; color: var(--band-muted); line-height: 1.75; max-width: 400px; margin-bottom: 32px; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band__visual { background: var(--band-visual); position: relative; overflow: hidden; min-height: 240px; }
.cta-band__visual img { width: 100%; height: 100%; object-fit: cover; }
/* A photograph fades into the copy beside it instead of meeting it at a hard
   edge. The mask reveals what is behind the image, so the column drops its own
   fill and the fade lands on the band colour itself. */
.cta-band__visual:has(img:not(.ph-img)) { background: none; }
.cta-band__visual img:not(.ph-img) { -webkit-mask-image: var(--fade-from-left); mask-image: var(--fade-from-left); }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-body); padding: clamp(48px, 6vw, 76px) 0 32px; }
.site-footer .shell { max-width: var(--shell); }
.footer-brand { display: flex; align-items: center; margin-bottom: 10px; }
.footer-brand svg, .footer-brand img { height: 30px; width: auto; }
.footer-brand .wordmark-ink { fill: #ffffff; }
.footer-tagline { font-size: 11px; color: var(--footer-title); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 48px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--footer-rule);
  margin-bottom: 26px;
}
.footer-about p { font-size: 17px; color: var(--footer-body); line-height: 1.75; margin-bottom: 22px; padding-right: 24px; }
.footer-col-title {
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--footer-title); margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--footer-rule);
}
.footer-col a {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--footer-text); padding: 6px 0; border-bottom: 1px solid var(--footer-rule-soft);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-col a.is-highlight { color: var(--accent); font-weight: 800; }

/* legacy marks, kept discreet */
.footer-legacy { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-bottom: 26px; }
.footer-legacy__item { display: flex; align-items: center; gap: 10px; opacity: 0.75; transition: opacity 0.18s; }
.footer-legacy__item:hover { opacity: 1; }
.footer-legacy img, .footer-legacy svg { height: 26px; width: auto; }
.footer-legacy__label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--footer-text); }

.footer-social { display: inline-flex; align-items: center; gap: 8px; color: var(--footer-text); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-social:hover { color: var(--accent); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-copy { font-size: 10px; color: #8a8a8a; letter-spacing: 0.06em; }

/* -- 7. Page blocks ------------------------------------------------------ */

/* Hero */
.hero { border-bottom: 1px solid var(--rule); }
.hero__inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  /* The image carries the page, so it takes the larger share. The copy
     still has room for the strapline at its 40ch measure. */
  grid-template-columns: 0.92fr 1.08fr;
  align-items: stretch;
  min-height: min(78vh, 720px);
}
.hero__body { padding: clamp(48px, 6vw, 92px) var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.hero__title { margin-bottom: 16px; }
/* The headline is a sentence now, not the two-word wordmark this was built
   for. Forty-three characters at the h1's own 76px broke into four ragged
   lines, and the worst of it was not the widest window but the narrow band
   just above the 1100px breakpoint, where the hero is still two columns and
   the text one is at its tightest. 2.8vw holds it to two lines from 1150px
   all the way up; `balance` keeps those two even, and both break after
   "Certainty." rather than mid-phrase.

   The 24ch cap only matters below 1100px, where the hero is a single column:
   without it the line runs the full width of the window as one thin band,
   while the paragraph beneath it stops at 40ch. */
.hero__title--statement {
  /* 30ch, not 24: at the top of the clamp "Personalized Precision." is about
     600px of type and 24ch was 576px, so the widest desktop was the one place
     it broke to three lines. The measure is still short enough to keep the
     two sentences on two lines rather than running them together. */
  font-size: clamp(2.75rem, 1.2rem + 4.2vw, 6rem);
  line-height: 0.95;
  text-wrap: balance;
  max-width: 30ch;
}
.hero__tagline { font-size: clamp(19px, 2.1vw, 28px); font-weight: 700; text-transform: uppercase; line-height: 1.1; color: var(--ink); margin-bottom: 20px; }
/* A full sentence rather than a three-word tag: uppercase at 28px turns that
   into a wall, so this variant keeps the weight and drops the shouting. */
.hero__tagline--sentence { text-transform: none; font-weight: 400; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.3; max-width: 40ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__media { background: var(--paper-2); position: relative; overflow: hidden; min-height: 280px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* -- Hero with the 3D sequence -------------------------------------------

   The photograph used to be the right-hand column of a two-column grid. The
   3D canvas is not a column: it is the whole section, with the copy sitting
   on top of it. So the grid collapses to one track and .hero__stage is
   painted underneath at inset:0.

   .hero__body keeps every one of its own styles. The only thing added is a
   measure, and that is not decoration - hero3d.js is handed this element as
   its `avoid` box and frames the model in whatever space is left beside it.
   Uncapped, the box would be the full width of the window and the model
   would have nowhere to sit. */
.hero--3d { position: relative; overflow: hidden; }
.hero__stage { position: absolute; inset: 0; }
.hero--3d .hero__inner {
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
  min-height: min(80vh, 760px);
  /* The canvas listens for pointer moves to parallax. Letting the copy
     swallow them would kill that over half the hero, so the block is
     transparent to the pointer and only the things you can actually click
     take it back. */
  pointer-events: none;
}
.hero--3d .hero__inner a,
.hero--3d .hero__inner button { pointer-events: auto; }
/* 760px, up from 700, is what gives the statement headline room to keep
   "Personalized Precision." on one line at the top of its clamp.

   The percentage stays at 54 and must not go past 55. hero3d.js decides
   whether to frame the model beside the copy or above it by its own test -
   the free column has to be more than 45% of the canvas - and that is a
   different question from the 860px the CSS stacks at. Widening this to 58%
   put the two into disagreement between about 860 and 1310px: the page laid
   out side by side while the module framed for stacked, pinning the model to
   the top of the canvas at its zoom floor. The cap does the widening instead,
   and only where there is room for it. */
.hero--3d .hero__body { max-width: min(54%, 760px); }

@media (max-width: 860px) {
  /* Stacked: the model moves above the copy rather than beside it, so the
     measure comes off and the text uses the full gutter.

     860px, not the 1100px the rest of the page collapses at. That breakpoint
     was written for the old hero photograph, a fixed-width column that stopped
     earning its space; the model has no width of its own and simply takes what
     it is given. Stacking at 1100 left a tablet with the model in the top half
     and the whole right of the window empty.

     860 is where stacking genuinely starts to win. Above it the constraint is
     horizontal and there is room to solve it - the lens pulls back and the
     model clears the text. Below it the constraint turns vertical: stacked,
     the model is sized to the band above the copy, and that band cannot grow
     without pushing the button off the bottom of the screen. */
  .hero--3d .hero__body { max-width: none; }
  .hero--3d .hero__inner { min-height: min(88vh, 820px); }

  /* Copy sits at the bottom here rather than centred, and the box hugs it.
     Both halves matter, and the second one is not cosmetic.

     hero3d.js measures the space it may use as `avoid.top - stage.top`. As a
     stretched grid item .hero__body starts at the very top of the hero, so
     that measurement was zero however the text inside it was aligned: the
     model was framed into no height at all and clipped against the header.
     Hugging its content makes the box start where the copy actually starts,
     which is the number the module is asking for.

     `align-self: end` does both jobs - the box shrinks to its content and
     that content lands at the bottom, so the button sits near the foot of
     the section and everything above it is one band for the model. */
  .hero--3d .hero__body { align-self: end; }
}

/* No WebGL, no JS, or a browser that fails to start the canvas: the stage
   stays empty and the copy sits on the page background. Nothing overlaps and
   nothing is lost, so there is no fallback image to load. */

/* Page header for interior pages */
.page-head { padding: clamp(48px, 6vw, 92px) 0 clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--rule); }
.page-head h1 { margin-bottom: 16px; }
.page-head .lede { color: var(--text); }


/* The trail (_includes/breadcrumb.njk). Section names only, never a page
   title, so it is three short words at most and sits on one line at every
   width; it may still wrap rather than clip if a label ever grows. Quieter
   than the label below it - lighter weight, hairline separators - so the
   two read as navigation and then content, not as two stacked captions. */
.breadcrumb { margin-bottom: 22px; }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em; line-height: 1.4;
  text-transform: uppercase; color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin: 0 0.75em; color: var(--rule-strong); }
.breadcrumb a { color: inherit; transition: color 0.15s; }
.breadcrumb a:hover, .breadcrumb a:focus-visible { color: var(--accent-text); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 600; }

/* Below the trail, a page head's label is facts about the page - a case's
   discipline, a release's date, a role's location - so it takes the accent
   rather than repeating the trail's grey. */
.page-head .label { color: var(--accent-text); }

/* Pull quotes */
.quote-block { align-items: center; }
/* The image fills its column at 3:2, cropped toward the hands on the right,
   and squares up as the column narrows so it still fills the width. */
.quote-block__img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; object-position: 70% center; border-radius: 3px; }
/* About: the photograph beside the opening copy, a plain rectangle like
   the site's other photographs, top-aligned with the text. */
.about-intro { align-items: start; }
.about-intro__photo img { width: 100%; height: auto; border-radius: 3px; }
.pullquote { margin: 0; }
.pullquote blockquote {
  font-size: clamp(17px, 1.9vw, 24px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 20px;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
}
.pullquote figcaption { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-left: 25px; }
.pullquote blockquote p { margin: 0; }
/* Without a portrait the quote takes the full width. */
.testimonial.testimonial--plain { grid-template-columns: minmax(0, 1fr); }
/* A quote with its speaker's portrait beside it. The photo column scales
   with the window and stops at 200px. */
.testimonial {
  display: grid;
  grid-template-columns: clamp(110px, 14vw, 200px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  margin: 0;
  max-width: 1100px;
}
.testimonial__photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.testimonial .pullquote blockquote { max-width: 62ch; }
.testimonial figcaption { display: grid; gap: 4px; }
.testimonial__name { color: var(--ink); }
.testimonial__role { font-weight: 600; letter-spacing: 0.1em; }
@media (max-width: 620px) {
  .testimonial { grid-template-columns: 1fr; }
  .testimonial__photo { width: 140px; }
}

/* Credentials strip */
.credentials { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.credentials li { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.credentials li::before { content: ''; width: 5px; height: 5px; background: var(--accent); flex: none; }

/* Emersya 3D viewer - responsive, unlike the fixed 1200x600 on the live site */
.viewer { margin: 32px 0; }
.viewer__frame { position: relative; width: 100%; aspect-ratio: 2 / 1; border: 1px solid var(--rule); background: var(--paper-2); }
.viewer__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer__removed {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  background: var(--paper-2);
}
.viewer__removed p { font-size: 18px; color: var(--muted); max-width: 32ch; line-height: 1.6; }
.viewer__removed a { color: var(--accent-text); text-decoration: underline; }
.viewer__note { font-size: 16px; color: var(--muted); margin-top: 10px; letter-spacing: 0.04em; }
@media (max-width: 700px) { .viewer__frame { aspect-ratio: 4 / 3; } }

/* Case study: the written case beside its 3D model.

   Source order is viewer first, so a phone gets the model above the text.
   From 900px the grid places them explicitly - text left, viewer right, both
   on row 1 - so the source order does not decide the desktop layout. The
   viewer sticks while the case is read, which is the point of running them
   side by side rather than one after the other. */
.case-layout { display: grid; gap: 32px; }
.case-layout__viewer .viewer { margin: 0; }
.case-layout__head h1 { font-size: clamp(2.25rem, 1rem + 3vw, 4rem); margin-bottom: 16px; }
.case-layout__head .label { color: var(--accent-text); }
.case-layout__head .lede { color: var(--text); }
/* A phone gets a tall frame (review item B-10): the model was small in a
   4:3 box the width of the screen. */
.case-layout__viewer .viewer__frame { aspect-ratio: auto; height: 70vh; }
@media (min-width: 1000px) {
  /* Model left at 60%, sticky; title and written case beside it (L-13-03). */
  .case-layout:has(.case-layout__viewer) {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    grid-template-rows: auto 1fr;
    column-gap: 48px; row-gap: 32px;
    align-items: start;
  }
  .case-layout__viewer {
    grid-column: 1; grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
  .case-layout__head { grid-column: 2; grid-row: 1; }
  .case-layout__body { grid-column: 2; grid-row: 2; }
  .case-layout__viewer .viewer__frame { height: min(calc(100vh - var(--header-h) - 96px), 760px); min-height: 420px; }
}

/* Our own model viewer sits in the same frame the Emersya embed uses; it
   fills the box and draws its scene buttons inside it. */
.viewer__model { position: absolute; inset: 0; }

/* The viewer draws its scene buttons with inline styles, so tightening them
   needs !important - the alternative is editing viewer3d.js, which is the
   delivered package file and would lose the change on the next drop.
   At the package's own 10px/.16em/11px-14px the four labels run about 500px
   and wrapped "Outcome" onto a second row in this half-width column. */
#case-viewer [role='tablist'] button {
  font-size: 9px !important;
  letter-spacing: 0.06em !important;
  padding: 7px 8px !important;
}
/* Measured: the four labels need 381px on one row at that size. The narrowest
   the viewer column gets beside the text is about 404px, at the 1000px
   breakpoint below - which is why that breakpoint moved up from 900px. */
@media (max-width: 620px) {
  /* Full width on a phone, but a narrower page: 346px on one row down to
     about a 390px screen, and wrapping below that rather than overflowing. */
  #case-viewer [role='tablist'] button {
    font-size: 8.5px !important;
    letter-spacing: 0.04em !important;
    padding: 6px 7px !important;
  }
}

/* Case study structured sections */
.case-sections { display: grid; gap: 28px; }
.case-section h2 { font-size: clamp(16px, 1.7vw, 21px); letter-spacing: 0.04em; margin-bottom: 10px; }
.case-section p { color: var(--text); max-width: 74ch; font-size: clamp(18px, 0.5vw + 12.7px, 21px); }
/* What was supplied for the case: one item per line. */
.case-list { color: var(--text); max-width: 74ch; font-size: clamp(18px, 0.5vw + 12.7px, 21px); margin: 0; padding: 0; }
/* Square blue markers, so the indent reads as a list (review item B-09). */
.case-list li { margin-bottom: 8px; position: relative; padding-left: 20px; }
.case-list li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; background: var(--accent); }
.case-list li:last-child { margin-bottom: 0; }

/* Press pager - one URL, all items in the DOM for crawlers */
.press-page[hidden] { display: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pager__btn {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; transition: all 0.16s;
}
.pager__btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.pager__btn[aria-current='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pager__btn:disabled { opacity: 0.35; cursor: not-allowed; }
/* With JS off the pager is meaningless and every page block stays visible. */
.no-js .pager { display: none; }
.no-js .press-page[hidden] { display: grid !important; }

/* Forms */
.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  /* 16px or more also stops iOS zooming the page when a field is tapped. */
  font-family: var(--font); font-size: 17px; color: var(--text);
  background: var(--paper); border: 1px solid var(--rule-strong); padding: 12px 14px; width: 100%;
  transition: border-color 0.16s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); outline: none; }
.field textarea { min-height: 150px; resize: vertical; }
.field--error input, .field--error textarea, .field--error select { border-color: #c0392b; }
/* The native arrow differs per browser; this one matches the form's rules. */
.field select {
  appearance: none; -webkit-appearance: none; border-radius: 0; cursor: pointer; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field select:invalid { color: var(--muted); }
.field select option { color: var(--text); }
.field__error { font-size: 16px; color: #c0392b; }
:root[data-theme='dark'] .field__error { color: #ff8a7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .field__error { color: #ff8a7a; } }
/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: 16px; color: var(--muted); max-width: 52ch; }

/* Office cards */
.office { --office-pad: clamp(22px, 2.4vw, 30px); padding: var(--office-pad); background: var(--paper); }
/* The photograph fills the tile. Negative margins pull it back out of the
   card's own padding so it meets the rules on three sides, the same as the
   discipline and case study tiles. */
/* The facility photographs are small - most are 453px wide - so the cards
   run four across (grid--4) to keep each one near that size; two across
   stretched them to 720px and they went soft. 4:3 is their own shape, so
   the crop takes little off. */
.office__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
  margin: calc(-1 * var(--office-pad)) calc(-1 * var(--office-pad)) var(--office-pad);
}
.office__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.office__country { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }
.office__name { font-size: 15px; font-weight: 900; text-transform: uppercase; line-height: 1.2; margin-bottom: 6px; color: var(--ink); }
.office__where { font-size: 17px; color: var(--muted); margin-bottom: 12px; }
.office__link { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }

/* Job list */
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(20px, 2.4vw, 30px); background: var(--paper); }
.job__meta { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.job__title { font-size: clamp(16px, 1.7vw, 22px); font-weight: 900; text-transform: uppercase; line-height: 1.15; margin-bottom: 8px; }
.job__summary { font-size: 18px; color: var(--text); max-width: 68ch; }
.jobs-empty { padding: clamp(32px, 4vw, 56px); text-align: center; background: var(--paper-2); }
.jobs-empty p { color: var(--muted); }
.jobs-empty p + p { margin-top: 12px; }
.jobs-note { margin-top: 36px; color: var(--muted); font-size: 16px; max-width: 60ch; }
/* Links inside short CMS-written notes. */
.prose-links a { color: var(--accent-text); text-decoration: underline; }

/* Directors
   Each photograph carries its own biography. The two used to be in different
   sections a screen and a half apart - four names under four pictures with no
   text at all, and the biographies in a narrow column above them - which is
   what made the page read as two unrelated halves. */
/* One director per row, set like a roster: photograph, then name and roles,
   then the biography across the rest of the width. Spread that wide, each
   biography runs to about the height of its photograph, so the rows stay
   even instead of some running far below their picture. */
.director-list { display: grid; grid-template-columns: 1fr; }
.director {
  display: grid;
  grid-template-columns: clamp(140px, 13vw, 200px) minmax(180px, 250px) minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 44px);
  align-items: start;
  padding-block: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--rule);
}
.director:last-child { border-bottom: 1px solid var(--rule); }
.director__photo { aspect-ratio: 1 / 1; background: var(--paper-2); overflow: hidden; margin-bottom: 16px; }
.director__photo img { width: 100%; height: 100%; object-fit: cover; }
/* The photo is a grid cell here, so the gap does the spacing. */
.director .director__photo { margin-bottom: 0; }
.director__name { font-size: 15px; font-weight: 900; text-transform: uppercase; margin-bottom: 4px; }
.director .director__name { font-size: clamp(16px, 1.4vw, 20px); margin-bottom: 10px; }
/* Title at Insight Surgery, then any roles elsewhere in plain, quieter text. */
.director__title { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); line-height: 1.7; margin-bottom: 14px; }
.director__other { margin: -6px 0 14px; }
.director__other li { font-size: 13px; color: var(--muted); line-height: 1.5; }
.director__other li + li { margin-top: 2px; }
/* Capped, because in the single-column layout the text cell is the whole
   window and 100 characters a line is not a biography anyone reads. */
.director__bio { font-size: 16px; color: var(--text); line-height: 1.7; max-width: 38rem; }
.director__bio p + p { margin-top: 0.8em; }

/* A block on Partner With Us that reads across rather than down, on a
   narrower measure than the full-bleed grids around it: a line of forty
   institution names is unreadable when it runs the whole width of a wide
   window. Inside the shell, so this is on top of the page gutter, not
   instead of it. */
.inset {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(0px, 2.5vw, 40px);
}

/* Who We Collaborate With: one audience per tile, text only. The audience
   is the tile's whole content, so it is set as a lead line in sentence case
   rather than the uppercase card title - these run to a dozen words, which
   in heavy caps would be a block, not a line. The tile's hover is the
   card's own. */
/* Block-only resets: margin-inline belongs to grid--bleed, which pulls the
   row out to the window edge. */
.audiences { list-style: none; margin-block: 0; padding: 0; }
.audience {
  margin: 0;
  font-size: clamp(17px, 0.6vw + 10px, 20px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}
.audiences .card { border-top: 3px solid transparent; transition: background 0.18s, border-color 0.18s; }
.audiences .card:hover { border-top-color: var(--accent); }
/* Five tiles of one size at every width. Five will not fill a three- or
   two-column grid, so rather than leave a hole the row stays five across
   down to tablet width and then stacks one per row; auto-rows of 1fr keep
   every row as tall as the tallest. */
.audiences { grid-auto-rows: 1fr; }
@media (max-width: 1100px) {
  .audiences.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .audiences { --card-pad: 20px; }
  .audience { font-size: 16px; }
}
@media (max-width: 860px) {
  .audiences.grid--5 { grid-template-columns: 1fr; }
  .audiences { --card-pad: min(clamp(20px, 2.6vw, 34px), var(--gutter)); }
  .audience { font-size: 17px; }
}

/* Clients and partners: one group per row, each name in its own cell of a
   grid with no rules, so the eye reads down columns, not along commas. */
.roster { display: grid; gap: clamp(36px, 4vw, 56px); }
.roster__title { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.roster__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px clamp(20px, 3vw, 40px); }
.roster__grid li { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ink); text-wrap: pretty; }

/* A short opening statement: label, a heading and one paragraph set large,
   at a reading measure. Partner With Us and the Investors invitation. */
.narrative { max-width: 62rem; }
.narrative__heading { margin-bottom: 20px; }
.narrative__body { font-size: clamp(19px, 1.4vw, 24px); line-height: 1.55; color: var(--text); margin: 0; max-width: 60ch; }

/* About: the origin story, heading beside the copy. */
.story { align-items: start; }
.story__heading { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.12; margin-top: 4px; }

/* About: Board, then Leadership Team, each a titled roster of people. */
.team-group + .team-group { margin-top: clamp(48px, 5vw, 72px); }
.team-group__title { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0; padding-bottom: 14px; }
.director__linkedin { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.director__linkedin svg { width: 16px; height: 16px; fill: currentColor; }
.director__linkedin:hover, .director__linkedin:focus-visible { color: var(--accent-text); }

/* Investors */
.investor-quote { margin-top: clamp(48px, 5vw, 72px); }
.press-type { color: var(--accent-text); }
/* A surgeon quote inside a case's Outcome section: same shape, smaller. */
.case-quote { margin-top: 24px; }
.case-quote .pullquote blockquote { font-size: clamp(17px, 1.5vw, 20px); }

/* A statement set beside the copy it introduces, rather than above it in
   14px bold caps, which is all an h5 gave it. */
.statement { font-size: clamp(20px, 2.1vw, 30px); font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
/* A head's standfirst is muted running text; a statement there keeps its
   weight and colour, at a shorter measure. */
.section-head > .statement { color: var(--ink); max-width: 30ch; font-size: clamp(20px, 1.9vw, 28px); }

/* A featured story: photograph and body copy, with a third column of key
   facts when there are any. The photograph's column scales with the window
   rather than stepping between fixed widths, and stops at 320px: the source
   is 531px wide, and past that the logo on it goes soft on a 2x screen. */
.feature {
  --feature-photo: clamp(200px, 24vw, 320px);
  display: grid;
  grid-template-columns: var(--feature-photo) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
}
.feature__photo { display: block; width: 100%; height: auto; border-radius: 3px; }
.feature--facts { grid-template-columns: var(--feature-photo) minmax(0, 1fr) minmax(220px, 300px); }
.feature__body { max-width: 62ch; }
/* Top-align the copy by its capitals, not its line box: at this line height
   the first line's leading would otherwise drop the text ten pixels below
   the top of the photograph. Browsers without text-box get the same pull
   from a negative margin, worked out for Barlow. */
.feature__body { text-box: trim-start cap alphabetic; }
@supports not (text-box: trim-start cap alphabetic) {
  .feature__body > :first-child { margin-top: calc((1em - 1lh) / 2 - 0.3em); }
}
.feature__facts .card__cta { display: inline-block; margin-top: 24px; }

/* Label above value, a hairline between rows: facts to scan, not read. */
.facts { margin: 0; border-top: 1px solid var(--rule-strong); }
.facts__row { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--ink); }

/* Section sub-headings outside .prose. The page h3 is 30px uppercase, which
   turns a fourteen-word title into five lines. */
.subhead { font-size: clamp(16px, 1.6vw, 21px); line-height: 1.15; margin-bottom: 14px; }

/* FAQs. Twelve questions and their answers ran 2,500px down the column; open
   one at a time they run about 700px and every question is visible at once.
   <details> so it works with no JavaScript and stays in the DOM for crawlers. */
.faq { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__item summary {
  display: flex;
  align-items: baseline;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  padding: clamp(18px, 2vw, 24px) 0;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  margin-left: auto;
  flex: none;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent-text);
}
/* The escape, not the character: a literal minus sign in this file was
   mangled once already and rendered as a missing-glyph box. */
.faq__item[open] summary::after { content: '\2212'; }
.faq__item summary:hover { color: var(--accent-text); }
.faq__answer { padding: 0 0 clamp(18px, 2vw, 26px); color: var(--text); }

/* Placeholder imagery slot */
.ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); border: 1px dashed var(--rule-strong);
  min-height: 200px; color: var(--muted);
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}

/* -- 8. Responsive ------------------------------------------------------- */

@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { min-height: 320px; order: -1; }
  .cta-band__inner { grid-template-columns: 1fr; }
  .cta-band__visual { min-height: 180px; }
  .split, .split--flip { grid-template-columns: 1fr; }
  /* Stacked, the copy is above the image, so the fade moves to the top edge. */
  .split__media img:not(.ph-img), .split--flip .split__media img:not(.ph-img),
  .cta-band__visual img:not(.ph-img) { -webkit-mask-image: var(--fade-from-top); mask-image: var(--fade-from-top); }
  .split__media { min-height: 240px; }
  /* Stacked, the heading leads; the side-by-side flip no longer applies. */
  .split--flip .split__media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .mega-inner { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .cols--sidebar { grid-template-columns: 1fr; }
  .director-list { grid-template-columns: 1fr; }
  /* Too narrow for three columns: the biography moves under the name. */
  .director { grid-template-columns: clamp(130px, 16vw, 170px) minmax(0, 1fr); row-gap: 0; }
  .director__photo { grid-row: span 2; }
  .director__bio { grid-column: 2; }
  .feature__facts { grid-column: 1 / -1; }
  .quote-block__img { aspect-ratio: 4 / 3; }
}

@media (max-width: 860px) {
  .grid--3, .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .cols--3 { grid-template-columns: repeat(2, 1fr); }
  .job { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 620px) {
  /* The whole trail fits at this width now it carries no titles; only the
     separators tighten. */
  .breadcrumb ol { font-size: 10px; letter-spacing: 0.12em; }
  .breadcrumb li + li::before { margin: 0 0.55em; }
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
  .cols--2, .cols--3 { grid-template-columns: 1fr; }
  /* Photos stay down the left on a phone, small enough to leave the
     biography a readable column. */
  .director { grid-template-columns: 84px minmax(0, 1fr); gap: 0 18px; }
  .director__photo { grid-row: auto; }
  .director__bio { grid-column: 1 / -1; margin-top: 16px; }
  .feature, .feature--facts { grid-template-columns: 1fr; }
  .feature__photo { max-width: 320px; }
  .quote-block__img { aspect-ratio: 1 / 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .mega-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn, .cta-band__actions .btn { width: 100%; justify-content: center; }
}

@media print {
  .site-header, .mega-menu, .cta-band, .site-footer, .pager, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .press-page[hidden] { display: block !important; }
  .faq__answer { display: block !important; }
}

/* -- Workflow: how a case runs ------------------------------------------- */
/* Seven stages on one rail: the surgical team's above it, ours below, so the
   touchpoints are where the blue is. The drawings sit on a light plate in
   both themes, since they are ink on white. */


.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 104px repeat(7, minmax(0, 1fr)); grid-template-rows: auto 56px auto auto; column-gap: 14px; }
.flow__lane, .flow__start { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); grid-column: 1; }
.flow__lane--top { grid-row: 1; align-self: end; padding-bottom: 14px; }
.flow__lane--bottom { grid-row: 3; padding-top: 14px; }
.flow__start { grid-row: 2; align-self: center; color: var(--ink); }
.flow__rail { grid-row: 2; grid-column: 2 / -1; position: relative; }
.flow__rail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); }
.flow__rail::after { content: ""; position: absolute; right: -2px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-left: 11px solid var(--ink); border-right: 0; }
.flow__node { grid-row: 2; align-self: center; justify-self: center; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  font-size: 15px; font-weight: 800; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); }
.flow__node--you { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.flow__node--maybe { border-style: dashed; border-color: var(--accent); color: var(--accent-text); }

.flow__step { display: flex; flex-direction: column; gap: 8px; position: relative; min-width: 0; }
.flow__step--above { grid-row: 1; justify-content: flex-end; padding-bottom: 16px; }
.flow__step--below { grid-row: 3; padding-top: 16px; }
.flow__step::after { content: ""; position: absolute; left: 50%; height: 16px; border-left: 2px solid var(--ink); }
.flow__step--above::after { bottom: 0; }
.flow__step--below::after { top: 0; }
.flow__step--you::after { border-color: var(--accent); }
.flow__step--maybe::after { border-left-style: dashed; border-color: var(--accent); }
.flow__who { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.flow__step--you .flow__who, .flow__step--maybe .flow__who { color: var(--accent-text); }
.flow__title { font-size: 18px; line-height: 1.1; margin: 0; }
.flow__text { font-size: 16px; line-height: 1.45; color: var(--text); margin: 0; }
/* The picture sits next to the rail, so pictures line up along a lane however long the text runs. */
.flow__step--above .flow__fig { margin-top: 6px; }
.flow__step--below .flow__fig { margin-bottom: 6px; }
.flow__fig { aspect-ratio: 1; background: #f4f4f4; display: grid; place-items: center; position: relative; overflow: hidden; }
.flow__fig > img { width: 86%; height: 86%; object-fit: contain; }
.flow__form { width: 70%; height: 70%; }
.flow__step--you .flow__fig { box-shadow: inset 0 0 0 2px var(--accent); }
.flow__badge { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.flow__badge svg { width: 14px; height: 14px; }
.flow__screen { width: 86%; height: 74%; border: 2px solid #2b3138; border-radius: 3px; background: #fff; display: grid; place-items: center; position: relative; }
.flow__screen::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -12px; height: 8px; border-top: 2px solid #2b3138; }
.flow__screen img { width: 92%; height: 92%; object-fit: contain; }
.flow__span { grid-row: 4; grid-column: 2 / -1; margin-top: 28px; }
.flow__bracket { display: block; border: 2px solid var(--ink); border-top: 0; height: 12px; }
.flow__span p { padding-top: 12px; text-align: right; font-size: 16px; color: var(--muted); }
.flow__span b { color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-right: 8px; }

@media (max-width: 980px) {
  .flow { grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: none; column-gap: 18px;
    background: linear-gradient(var(--ink), var(--ink)) no-repeat 19px 0 / 2px calc(100% - 64px); }
  .flow__lane, .flow__start, .flow__rail { display: none; }
  .flow__node { grid-column: 1 !important; grid-row: auto; align-self: start; margin-top: 2px; }
  .flow__step, .flow__step--above, .flow__step--below { grid-column: 2 !important; grid-row: auto; justify-content: flex-start; padding: 0 0 28px; }
  .flow__step::after { display: none; }
  .flow__fig { max-width: 220px; width: 100%; }
  .flow__step--below .flow__fig { order: 9; margin: 6px 0 0; }
  .flow__span { grid-column: 1 / -1; grid-row: auto; margin-top: 0; background: var(--paper); }
  .flow__bracket { display: none; }
  .flow__span p { text-align: left; border-top: 2px solid var(--ink); }
}

/* -- Review round, November 2026 ----------------------------------------
   From docs/Website_Copy_and_Layout_Review.md. Each rule names its item. */

/* L-01: the bands that stay full width line their copy up with the
   container instead of the window edge. The band is a size container, so
   100cqw is its own width rather than the viewport plus a scrollbar. */
.split, .cta-band__inner { container-type: inline-size; }
.cta-band__inner { max-width: none; }
.split__body, .cta-band__body {
  padding-left: max(var(--gutter), calc((100cqw - var(--shell)) / 2 + var(--gutter)));
}
.split--flip .split__body {
  padding-left: var(--gutter);
  padding-right: max(var(--gutter), calc((100cqw - var(--shell)) / 2 + var(--gutter)));
}

/* B-07: no fade on the Regulated band's photograph; a hard edge and a
   hairline instead. The closing CTA band keeps its own treatment. */
.split .split__media img:not(.ph-img) { -webkit-mask-image: none; mask-image: none; }
.split .split__media { border-left: 1px solid var(--rule); }
.split--flip .split__media { border-left: 0; border-right: 1px solid var(--rule); }
@media (max-width: 1100px) {
  .split .split__media img:not(.ph-img) { -webkit-mask-image: none; mask-image: none; }
  .split .split__media, .split--flip .split__media { border: 0; border-top: 1px solid var(--rule); }
}

/* L-24-03: card pictures stop growing once a row is wide. */
.card__media { max-height: 280px; }

/* P-03 / P-04: two facts side by side with a gap, no separator glyph. */
.card__meta--pair, .label--pair { display: flex; flex-wrap: wrap; gap: 0 16px; }

/* C-CS-02: the zoom hint names the gesture the device has. */
.hint-coarse { display: none; }
@media (pointer: coarse) {
  .hint-fine { display: none; }
  .hint-coarse { display: inline; }
}

/* B-01: a question in the FAQ is one flex item beside its +/- sign. */
.faq__item summary > span { flex: 1 1 auto; min-width: 0; }

/* L-05: the All Case Studies button sits beside the intro in the head row. */
.section-head__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.section-head__aside p { margin: 0; }

/* L-13-01: the main sections on the bar from 1024px. Below that the bar is
   the Menu button, the wordmark and the theme toggle, as before. */
.nav-bar, .nav-contact { display: none; }
.mega-contact { display: none; }
@media (min-width: 1024px) {
  .nav { grid-template-columns: auto 1fr auto auto; gap: 28px; }
  .brand { order: 1; }
  .nav-bar { order: 2; display: flex; gap: clamp(16px, 2vw, 32px); list-style: none; margin: 0; padding: 0; }
  .nav-right { order: 3; gap: 20px; }
  .nav-left { order: 4; }
  .nav-bar a {
    font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
  }
  .nav-bar a:hover, .nav-bar a[aria-current='page'] { border-bottom-color: var(--accent); }
  .nav-contact { display: inline-flex; }
}
@media (max-width: 1023px) {
  /* L-M-07: on a phone or tablet the main action is the first thing in the
     menu. */
  .mega-contact { display: flex; justify-content: center; grid-column: 1 / -1; width: 100%; }
}

/* L-M-04 / B-06: a shorter header on a phone, with the wordmark centred.
   "Menu" drops to the icon below 480px; the word stays for screen readers. */
@media (max-width: 620px) {
  :root { --header-h: 56px; }
  .nav { min-height: 56px; }
  .brand svg, .brand img { height: 26px; }
}
@media (max-width: 479px) {
  #menu-toggle-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* L-13-04: the bar of in-page links under the Partner With Us banner, held
   under the header while the page scrolls. */
.subnav {
  position: sticky; top: var(--header-h); z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.subnav ul {
  display: flex; gap: clamp(20px, 3vw, 40px); list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: block; padding: 16px 0; white-space: nowrap;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid transparent;
}
.subnav a:hover, .subnav a:focus-visible { color: var(--ink); border-bottom-color: var(--accent); }
main [id] { scroll-margin-top: calc(var(--header-h) + 64px); }

/* L-13-02: four tiles go 2x2 and five go 3+2 on a 13" laptop, where four
   or five across left each tile a few words wide. */
@media (min-width: 1024px) and (max-width: 1365px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .audiences.grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* L-04: section spacing steps down on a tablet and a phone. */
@media (max-width: 1100px) { .section { padding: 64px 0; } }
@media (max-width: 620px) { .section { padding: 48px 0; } }

/* L-M-05: phone body text. */
@media (max-width: 620px) {
  body { line-height: 1.6; }
}

/* L-M-06: the Get In Touch photograph is a full screen of image on a phone;
   the band is the black block and its buttons. */
@media (max-width: 620px) {
  .cta-band__visual { display: none; }
}

/* L-M-01: on a phone the discipline cards are compact rows: an 88px picture,
   the title and its one line, the whole row a link. */
@media (max-width: 620px) {
  .grid--rows-phone > .card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    padding-block: 16px;
  }
  .grid--rows-phone .card__media {
    grid-row: 1 / span 2;
    width: 88px; aspect-ratio: 1; max-height: none;
    margin: 0;
  }
  .grid--rows-phone .card__meta,
  .grid--rows-phone .card__cta { display: none; }
  .grid--rows-phone .card__title { align-self: end; margin-bottom: 4px; font-size: 16px; }
  .grid--rows-phone .card__body { align-self: start; margin: 0; font-size: 15px; line-height: 1.45; }
}

/* L-M-02: How a Case Runs on a phone. The drawing is a 96px thumbnail
   beside the step rather than a full-width picture under it. */
@media (max-width: 620px) {
  .flow__step, .flow__step--above, .flow__step--below {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    column-gap: 16px;
    align-content: start;
  }
  .flow__step > * { grid-column: 1; }
  .flow__step > .flow__fig,
  .flow__step--below > .flow__fig {
    grid-column: 2; grid-row: 1 / span 4;
    width: 96px; max-width: 96px; margin: 0; order: 0; align-self: start;
  }
}

/* B-10: the scene buttons stay on one row on a phone and scroll sideways. */
@media (max-width: 999px) {
  #case-viewer [role='tablist'] {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }
  #case-viewer [role='tablist']::-webkit-scrollbar { display: none; }
  #case-viewer [role='tablist'] button { flex: none; }
}

/* The case study page has no page head now; the trail sits above the
   layout instead. */
.case-page .breadcrumb { margin-bottom: 28px; }

/* L-13-03: the scene buttons sit along the top of the viewer, with the
   caption under them. The viewer draws this overlay pinned to the bottom
   with inline styles, hence !important rather than an edit to the
   delivered bundle. */
#case-viewer > div:has(> [role='tablist']) {
  top: 0 !important;
  bottom: auto !important;
  flex-direction: column-reverse !important;
}
/* Less air above the trail, so the model starts higher on a laptop. */
.section.case-page { padding-top: clamp(24px, 3vw, 40px); }

/* Batch 2, item 4: below 480px the scene buttons are a 2x2 grid of equal
   buttons across the full width of the viewer, with short labels (the mount
   script adds them; the full label is the aria-label). A fifth scene spans
   both columns. The 1px gap shows the rule colour behind the buttons. */
.tab-short { display: none; }
@media (max-width: 479px) {
  #case-viewer > div:has(> [role=tablist]) { padding: 0 !important; gap: 0 !important; align-items: stretch !important; }
  #case-viewer > div:has(> [role=tablist]) > :not([role=tablist]) { padding: 10px 12px; }
  #case-viewer [role=tablist] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    padding: 0 0 1px !important;
    overflow: visible;
    width: 100%;
    background: var(--rule);
  }
  #case-viewer [role=tablist] button {
    min-height: 44px;
    margin: 0 !important;
    border: 0 !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    letter-spacing: 0.1em !important;
    white-space: nowrap;
    text-align: center;
  }
  #case-viewer [role=tablist] button:nth-child(5):last-child { grid-column: 1 / -1; }
  #case-viewer [role=tablist] button[aria-selected=false] { color: var(--ink) !important; }
  #case-viewer .tab-full { display: none; }
  #case-viewer .tab-short { display: inline; }
}

/* Tiles that read as a sequence (home "Planned for One Patient", Solutions
   "What a Plan Adds", Partner "Why Work With Us"): grey, then pale blue,
   ending on a solid deep blue tile with white text. Set by position, so the
   CMS needs nothing new. The rule colour still shows in the 1px gaps. */
.grid--steps > .card:nth-child(1) { background: #f4f4f4; }
.grid--steps > .card:nth-child(2) { background: #e4f2fa; }
.grid--steps > .card:nth-child(3) { background: #d3eaf6; }
.grid--steps > .card:last-child { background: #0b6d96; }
.grid--steps .card__meta { color: var(--accent-text); }
.grid--steps > .card:last-child,
.grid--steps > .card:last-child :is(.card__title, .card__body, .card__meta, a) { color: #fff; }
.grid--steps > .card:last-child a { text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .grid--steps > .card:nth-child(1) { background: #141414; }
  :root:not([data-theme=light]) .grid--steps > .card:nth-child(2) { background: #12212a; }
  :root:not([data-theme=light]) .grid--steps > .card:nth-child(3) { background: #152a36; }
  :root:not([data-theme=light]) .grid--steps > .card:last-child { background: #0b5f84; }
}
:root[data-theme=dark] .grid--steps > .card:nth-child(1) { background: #141414; }
:root[data-theme=dark] .grid--steps > .card:nth-child(2) { background: #12212a; }
:root[data-theme=dark] .grid--steps > .card:nth-child(3) { background: #152a36; }
:root[data-theme=dark] .grid--steps > .card:last-child { background: #0b5f84; }

/* Cookie choice for Google Analytics. Rendered only when Site Settings has a
   Measurement ID (base.njk); a plain bar at the foot of the window. */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 12px var(--gutter);
  background: var(--paper); color: var(--text);
  border-top: 1px solid var(--rule-strong);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}
.consent[hidden] { display: none; }
.consent__text { margin: 0; max-width: 70ch; font-size: 13px; line-height: 1.45; }
.consent__text a { color: var(--accent-text); text-decoration: underline; }
.consent__actions { display: flex; gap: 8px; }
.consent .btn { padding: 9px 16px; font-size: 9px; }
.footer-cookies {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 10px; letter-spacing: 0.06em; color: #8a8a8a; text-decoration: underline;
}
.footer-cookies:hover { color: #ffffff; }
