/* ═══════════════════════════════════════════════
   NextGen Pathology — design system v3
   A clinical report, stained: ink on white, hairlines
   instead of shadows, squared corners, color where the
   brand or the specimen lives.
   ═══════════════════════════════════════════════ */
:root {
  --edge: max(var(--gutter), calc((100vw - 1152px) / 2 + var(--gutter)));
  --white: #FFFFFF;
  --paper: #F8F5F4;          /* the one alternate ground, warm like an H&E slide margin */
  --paper-deep: #EFEBEA;     /* photo placeholders, image grounds */
  --ink: #1D1D1F;
  --slate: #515459;
  --slate-mid: #66696E;      /* smallest soft text; >= 4.5:1 on white and paper */
  --slate-light: #8A8D92;    /* large text and decorative marks only */
  --accent: #BE0000;         /* logo red, RGB 190,0,0 */
  --accent-deep: #9A0000;
  --line: #E4E0DE;
  --line-strong: #CFCACA;
  --line-hover: #B5B0B0;
  --ink-deep: #141416;
  --on-dark: #F7F4F5;
  --on-dark-soft: rgba(247, 244, 245, 0.72);
  --on-dark-faint: rgba(247, 244, 245, 0.58);
  --line-dark: rgba(247, 244, 245, 0.14);
  --radius: 8px;             /* cards, panels, media frames */
  --radius-sm: 6px;          /* buttons, fields, images inside cards */
  --shadow-float: 0 2px 6px rgba(29, 29, 31, 0.06), 0 16px 40px rgba(29, 29, 31, 0.12); /* floating layers only */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);   /* expo out: small UI (submenu, menu panel) */
  /* Entrance curves. Expo-out spent ~80% of its travel in the first quarter, so a
     0.6s reveal read as 0.15s; these spread the motion so it is perceptible. */
  --ease-enter: cubic-bezier(0.33, 1, 0.68, 1);   /* cubic out: movement */
  --ease-fade: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* quad out: opacity */
  --ease-stain: cubic-bezier(0.45, 0, 0.25, 1);   /* soft in-out: the red spreading */
  --gutter: 28px;
  --nav-h: 68px;
  --texture: url("images/tissue-dark.svg");
  --texture-veil: linear-gradient(rgba(20, 20, 22, 0.42), rgba(20, 20, 22, 0.42));
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}

::selection { background: rgba(190, 0, 0, 0.14); }

img { max-width: 100%; display: block; }

.container { max-width: 1152px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 800px; }
/* Inside ordinary sections a narrow column keeps the page's left edge; only
   centered bands (CTA) center it */
.section .container.narrow { max-width: 1152px; }
.section .container.narrow > * { max-width: 760px; }
.center { text-align: center; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ═══════════ Typography ═══════════ */
h1, h2, h3 { text-wrap: balance; }

h1 {
  font-size: clamp(2.6rem, 5.8vw, 4.4rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.page-title {
  font-size: clamp(2.15rem, 4.2vw, 3.3rem);
  font-weight: 650;
  letter-spacing: -0.026em;
  line-height: 1.08;
  max-width: 22ch;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 630;
  letter-spacing: -0.022em;
  line-height: 1.14;
  margin-bottom: 18px;
}

.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.26rem);
  line-height: 1.55;
  color: var(--slate);
  font-weight: 430;
  max-width: 62ch;
  text-wrap: pretty;
}

.body-copy {
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--slate);
  max-width: 64ch;
  text-wrap: pretty;
}
.body-copy + .body-copy { margin-top: 18px; }
.body-copy a { color: var(--ink); font-weight: 520; }
.body-copy a, .legal a, .faq p a, .notice a, .card p a {
  text-decoration-color: rgba(190, 0, 0, 0.45);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease);
}
.body-copy a:hover, .legal a:hover, .faq p a:hover, .notice a:hover, .card p a:hover { text-decoration-color: var(--accent); }

.statement {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 520;
  letter-spacing: -0.016em;
  line-height: 1.34;
  margin-bottom: 28px;
  max-width: 34ch;
}
.statement em { font-style: normal; color: var(--accent); }

.meta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-mid);
  font-variant-numeric: tabular-nums;
}
.byline { margin: -6px 0 20px; }

/* ═══════════ Focus ═══════════ */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero-dark :focus-visible, .band-dark :focus-visible, .footer :focus-visible,
.nav-dark :focus-visible { outline-color: var(--on-dark); }

/* ═══════════ Buttons ═══════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.1s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: #000; }

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

.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.92rem; }

/* Text link: a drawn chevron in the logo red, not a glyph */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  font-weight: 560;
  color: var(--ink);
  text-decoration: none;
}
.text-link::after, .card-link h3::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-top: 1.7px solid var(--accent);
  border-right: 1.7px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}
.text-link:hover { text-decoration: underline; text-decoration-color: rgba(190, 0, 0, 0.45); text-underline-offset: 4px; }
.text-link:hover::after { transform: translateX(2px) rotate(45deg); }

/* ═══════════ Skip link ═══════════ */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 560;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible { top: 12px; outline-color: var(--accent); }

/* ═══════════ Navigation ═══════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }

/* Dark variant — engaged while a dark band sits under the bar */
.nav.nav-dark { background: rgba(20, 20, 22, 0.78); }
.nav.nav-dark.scrolled { border-bottom-color: var(--line-dark); }
.nav-dark .nav-logo { color: var(--on-dark); }
.nav-dark .nav-links a { color: var(--on-dark-soft); }
.nav-dark .nav-links a:hover,
.nav-dark .nav-links a[aria-current="page"],
.nav-dark .nav-group-current > a { color: var(--on-dark); }
.nav-dark .nav-cta { background: var(--on-dark); color: var(--ink); }
.nav-dark .nav-cta:hover { background: #FFFFFF; }
.nav-dark .nav-toggle span { background: var(--on-dark); }

.nav-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.nav-logo img { width: auto; height: 38px; }
.nav-logo .logo-dark { display: none; }
.nav-dark .nav-logo .logo-light { display: none; }
.nav-dark .nav-logo .logo-dark { display: block; }

.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 0.94rem;
  font-weight: 480;
  color: var(--slate);
  text-decoration: none;
  white-space: nowrap;
  text-underline-offset: 8px;
  text-decoration-thickness: 1.5px;
  transition: color 0.2s var(--ease);
}
/* Client request (e11b1d9): main nav items underline in logo red on hover */
.nav-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.nav-links a[aria-current="page"], .nav-group-current > a {
  color: var(--ink);
  font-weight: 560;
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.nav-group { position: relative; }
.nav-group > a::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin: 0 0 3px 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.nav-sub {
  position: absolute;
  top: 100%; left: -16px;
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  min-width: 210px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s linear 0.18s;
}
.nav-sub::before {
  content: "";
  position: absolute;
  inset: 14px 0 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  z-index: -1;
}
.nav-group:hover .nav-sub,
.nav-group:focus-within .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.24s var(--ease-out), transform 0.24s var(--ease-out), visibility 0s;
}
.nav-group.sub-closed .nav-sub { opacity: 0; visibility: hidden; transform: translateY(-4px); }
.nav-sub a { padding: 11px 16px; color: var(--slate) !important; text-decoration: none !important; }
.nav-sub a:first-child { margin-top: 6px; }
.nav-sub a:last-child { margin-bottom: 6px; }
.nav-sub a:hover, .nav-sub a[aria-current="page"] { color: var(--ink) !important; background: var(--paper); }
.nav-sub a[aria-current="page"] { font-weight: 560; }

.nav-cta { flex-shrink: 0; }
.nav-mobile-only { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  margin-left: auto;
  margin-right: -10px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 1.7px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.85px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.85px) rotate(-45deg); }

/* ═══════════ Page hero (subpages) ═══════════ */
.page-hero {
  padding: 152px 0 64px;
  border-bottom: 1px solid var(--line);
}
.page-hero .lede { margin-top: 20px; }
.page-hero.hero-dark { border-bottom: none; padding-bottom: 88px; }
/* 404: a left-aligned header like every subpage, tall enough to keep the footer low */
.page-hero.notfound { border-bottom: none; min-height: 64vh; }
.notfound .hero-actions { justify-content: flex-start; }

/* ═══════════ Dark surfaces ═══════════
   The tissue field is veiled and shifted per surface so the same glands
   never line up from band to band. */
.hero-dark, .band-dark {
  background: var(--texture-veil), var(--texture) 50% 0 / 1400px auto repeat, var(--ink-deep);
  color: var(--on-dark);
}
.band-dark { background-position: 0 0, 22% 40%, 0 0; }
.cta-band.band-dark { background-position: 0 0, 78% 70%, 0 0; }
.hero-dark .lede, .band-dark .lede, .band-dark p { color: var(--on-dark-soft); }
.hero-dark h1 .soft { color: var(--accent); }
/* Client request: only these words in the logo red, rgb(190, 0, 0) */
.page-title .accent { color: var(--accent); }
.band-dark .section-title, .band-dark .statement { color: var(--on-dark); }
.hero-dark .btn-primary, .band-dark .btn-primary { background: var(--on-dark); color: var(--ink); }
.hero-dark .btn-primary:hover, .band-dark .btn-primary:hover { background: #FFFFFF; }
.hero-dark .btn-ghost, .band-dark .btn-ghost { color: var(--on-dark); border-color: rgba(247, 244, 245, 0.34); }
.hero-dark .btn-ghost:hover, .band-dark .btn-ghost:hover { border-color: var(--on-dark); }
.hero-dark .text-link, .band-dark .text-link { color: var(--on-dark); }
.hero-dark ::selection, .band-dark ::selection, .footer ::selection { background: rgba(190, 0, 0, 0.4); }

/* ═══════════ Home hero ═══════════ */
.hero { padding: 172px 0 108px; text-align: center; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero .lede { margin: 24px auto 0; max-width: 50ch; }
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-patient { margin-top: 22px; font-size: 0.96rem; color: var(--slate); }
.hero-patient a { color: var(--ink); font-weight: 560; }
.hero-dark .hero-patient { color: var(--on-dark-faint); }
.hero-dark .hero-patient a { color: var(--on-dark); text-decoration-color: rgba(247, 244, 245, 0.4); text-underline-offset: 4px; }
.hero-dark .hero-patient a:hover { text-decoration-color: var(--on-dark); }

/* ═══════════ Figures ═══════════
   One image language, three uses:
   A  scientific figure: micrograph or stained collage with a figure legend
   B  feature image: a wide photograph tied to the page header or a section
   C  portraits (People), unchanged
   The legend sits on a hairline under the image: a short ink label, then the
   explanation in slate, the way a journal sets a figure. */
.figure img { width: 100%; height: auto; border-radius: var(--radius); }
/* Pale stained tissue has no edge of its own on white; a hairline gives it one */
.figure-specimen img, .banner-ihc img { outline: 1px solid rgba(29, 29, 31, 0.08); outline-offset: -1px; }
.figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.5;
}
.figure-label { font-weight: 600; color: var(--ink); }
.figure-text { color: var(--slate-mid); }

/* Home: the micrograph shares the text's top line and roughly its height, and
   is shown nearly whole (square frame on a 0.95 image) */
.split.split-figure { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
/* Home, Services, About: the image leaves the container and runs to the page
   edge; its legend stays on the text grid. The section clips the bleed so a
   scrollbar can never cause horizontal scroll. */
.bleed-section { overflow-x: clip; }
.bleed-right { margin-right: calc(-1 * var(--edge)); }
.bleed-right img { border-radius: var(--radius) 0 0 var(--radius); }
.bleed-right figcaption { margin-right: var(--edge); }
.bleed-left { margin-left: calc(-1 * var(--edge)); }
.bleed-left img { border-radius: 0 var(--radius) var(--radius) 0; }
.bleed-left figcaption { margin-left: var(--edge); }
.bleed-full { margin-inline: calc(-1 * var(--edge)); }
.photo-banner.bleed-full img { border-radius: 0; outline: none; }
.bleed-full figcaption { margin-inline: var(--edge); }
/* Home "shared workspace": Hadi's specimen image, shown whole at its own ratio, colors as supplied */
.figure-specimen img { aspect-ratio: 1200 / 596; }
.split-figure .section-title { margin-top: -0.12em; }

/* ═══════════ Stats band ═══════════ */
.statband { padding: 100px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  text-align: center;
  padding: 6px 20px;
  border-left: 1px solid var(--line-dark);
}
.stat:first-child { border-left: none; }
.stat-figure {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.6rem, 4.6vw, 3.8rem);
  font-weight: 650;
  letter-spacing: -0.028em;
  line-height: 1.05;
  color: var(--on-dark);
}
.stat-label { display: block; margin: 12px auto 0; max-width: 22ch; font-size: 0.94rem; line-height: 1.45; color: var(--on-dark-soft); }

/* ═══════════ Sections ═══════════ */
.section { padding: 112px 0; }
.section.tight { padding: 84px 0; }
.section.flush-bottom { padding-bottom: 0; }
.section-gray, .section-rose { background: var(--paper); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head .lede { margin-top: 4px; }
.section-foot { margin-top: 44px; }

/* ═══════════ Ruled list — the service catalog ═══════════ */
.ruled-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
  border-bottom: 1px solid var(--line);
}
.ruled-list.cols-3 { grid-template-columns: repeat(3, 1fr); column-gap: 44px; }
.ruled-list li { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.ruled-list h3 { font-size: 1.06rem; font-weight: 620; letter-spacing: -0.01em; line-height: 1.35; }
.ruled-list p { margin-top: 6px; font-size: 0.97rem; line-height: 1.6; color: var(--slate); max-width: 52ch; }
.section-gray .ruled-list, .section-gray .ruled-list li { border-color: var(--line-strong); }

/* ═══════════ Cards ═══════════ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px 28px;
}
.card + .card { margin-top: 16px; }
.card-grid .card + .card { margin-top: 0; }
.card h3 { font-size: 1.1rem; font-weight: 620; letter-spacing: -0.012em; margin-bottom: 8px; line-height: 1.3; }
.card p { font-size: 0.98rem; color: var(--slate); line-height: 1.6; }
.card p a { color: var(--ink); font-weight: 600; }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color 0.2s var(--ease); }
.card-link h3 { display: flex; align-items: center; gap: 10px; }
.card-link:hover { border-color: var(--ink); }
.card-link:hover h3::after { transform: translateX(2px) rotate(45deg); }

/* ═══════════ Feature list ═══════════ */
.feature-list { list-style: none; display: flex; flex-direction: column; }
.feature-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.feature-list li:first-child { border-top: none; padding-top: 0; }
.feature-list strong { display: block; font-weight: 600; font-size: 1.02rem; }
.feature-list span { font-size: 0.97rem; color: var(--slate); }
/* Lists without titles: the line itself is the content, so it carries ink */
.feature-list li > div > span:only-child { font-size: 1.02rem; color: var(--ink); }

/* ═══════════ Split layout ═══════════ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.split-center, .split:has(> .award-media), .split:has(> .news-cover) { align-items: center; }
.split .section-title { margin-bottom: 18px; }
/* About: client images beside "Bridging the old with the new" and "Recognized
   expertise", shown whole at their own ratio (4:3 and 3:2), no crop */
.about-figure img { width: 100%; height: auto; border-radius: var(--radius); }

/* ═══════════ Our Solutions ═══════════ */
.solutions { background: var(--paper); padding-top: 72px; }
/* Option C: each solution is a full-width framed row (white panel, hairline,
   generous inset); image and text share the row 5:6, alternating sides so the
   three options read as a sequence, not three copies of one card */
.solution-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 56px;
}
.solution-wide { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
.solution-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.solution-flip .solution-media { order: 2; }
/* Client structure: a Hospitals / Pathologists choice above the rows; the two
   pathologist rows sit under one "Pathologists" heading on a rule */
/* Rhythm: choices, 40, heading, 20, row(s), 64, heading, 20, rows */
.solution-jump { display: flex; flex-wrap: wrap; gap: 10px; }
.solution-group { margin-top: 64px; }
.solution-jump + .solution-group { margin-top: 40px; }
.solution-group-title {
  display: flex; align-items: baseline; gap: 16px;
  font-size: 1.35rem; font-weight: 650; letter-spacing: -0.016em; margin-bottom: 20px;
}
.solution-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.solution-rows { display: grid; gap: 20px; }
.solution-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.solution-media img[src*="office-space"] { object-position: 42% 50%; }
/* The 4:3 crop comes off the blurred shelving on the left: both pathologists,
   the display and the microscope stay in frame */
.solution-media img[src*="pathology-groups-lab"] { object-position: 90% 50%; }
/* Keep the eyepieces and the face in frame when the 3:2 photo is cropped to 4:3 */
.solution-media img[src*="pathologist-microscope"] { object-position: 62% 50%; }
.solution-body { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 20px 8px 0; }
.solution-flip .solution-body { padding: 8px 0 8px 20px; }
.solution-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.solution-head :is(h2, h3) { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 640; letter-spacing: -0.016em; line-height: 1.2; }
.solution-icon { flex-shrink: 0; display: grid; place-items: center; }
.solution-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.solution-body p { font-size: 1.02rem; line-height: 1.65; color: var(--slate); margin-bottom: 26px; max-width: 56ch; }
.solutions-phone { text-align: center; margin-top: 44px; color: var(--slate); }
.solutions-phone a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; text-decoration-color: rgba(190, 0, 0, 0.45); }
@media (max-width: 1060px) {
  .solution-card { gap: 36px; padding: 24px; }
  .solution-body { padding-right: 4px; }
  .solution-flip .solution-body { padding-left: 4px; }
}
@media (max-width: 800px) {
  /* Image above text inside each frame; a wide 3:2 frame so it never becomes a tall block */
  .solution-wide, .solution-flip { grid-template-columns: 1fr; gap: 22px; }
  .solution-flip .solution-media { order: 0; }
  .solution-media img { aspect-ratio: 3 / 2; }
  .solution-body, .solution-flip .solution-body { padding: 0 6px 6px; }
}
@media (max-width: 520px) {
  .solution-card { padding: 14px; }
  .solution-body, .solution-flip .solution-body { padding: 0 6px 8px; }
  .solution-group-title { font-size: 1.26rem; margin-bottom: 16px; }
  .solution-group { margin-top: 48px; }
  .solution-jump + .solution-group { margin-top: 32px; }
}

/* ═══════════ Award / recognition ═══════════ */
.award-media { display: flex; justify-content: flex-start; }
.award-badge {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 320px;
  transition: border-color 0.2s var(--ease);
}
.award-badge:hover { border-color: var(--ink); }
.award-badge img { display: block; width: 100%; height: auto; }
.news-cover { display: flex; justify-content: flex-start; }
.news-cover a {
  display: block;
  max-width: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
}
.news-cover a:hover { border-color: var(--ink); }
.news-cover img { display: block; width: 100%; height: auto; }

/* ═══════════ Photo banner ═══════════ */
/* B  Feature image: a fixed 12:5 frame instead of a max-height clamp, cropped
   per image; when it follows the page header it belongs to it (no rule, no gap) */
.photo-banner img { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; object-fit: cover; border-radius: var(--radius); background: var(--paper-deep); }
.banner-ihc img { aspect-ratio: 1800 / 526; }            /* the collage is a composed panel set: never crop it on desktop */
/* Careers visual: shown whole at its own 16:9, never cropped (microscope and monitor) */
.photo-banner.banner-careers img { aspect-ratio: 1672 / 941; }
.page-hero:has(+ .media-lead) { border-bottom: none; padding-bottom: 40px; }
.split.split-lab { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 80px; align-items: center; }
.banner-office img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 38% 50%; }
.split-lab .feature-list { margin-top: 28px; }
/* Patients: the photo is the portrait half of "Your doctor is your first stop" */
.split.split-portrait { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.banner-ribbon img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 52% 55%; border-radius: var(--radius); }
.info-rows { list-style: none; margin-top: 32px; border-top: 1px solid var(--line-strong); }
.info-rows li { padding: 18px 0 20px; border-bottom: 1px solid var(--line-strong); }
.info-rows h3 { font-size: 1.06rem; font-weight: 620; letter-spacing: -0.01em; }
.info-rows p { margin-top: 4px; font-size: 0.98rem; line-height: 1.6; color: var(--slate); max-width: 60ch; }
.info-rows a { color: var(--ink); font-weight: 600; text-decoration-color: rgba(190, 0, 0, 0.45); text-underline-offset: 3px; }
.section.tight.media-lead { padding-top: 0; }

/* ═══════════ People ═══════════
   Every person gets a card: white, hairline, 8px radius, no shadow. Three
   variants of one family:
   featured  physician leadership: two across, portrait fills the card's left side
   physician medical and support team: portrait across the top, info below
   executive leadership team: square portrait, the role leads the name
   Specialties are a list, one per line behind a short logo-red mark, so a
   specialty is never split across lines. */
.pc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pc-grid-featured { grid-template-columns: 1fr; gap: 20px; }
.pc-grid-exec { grid-template-columns: repeat(3, 1fr); }
.pc {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.pc:hover { border-color: var(--line-hover); }
.pc-photo { background: var(--paper-deep); overflow: hidden; }
.pc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.pc-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.pc-id h3 { font-size: 1.04rem; font-weight: 640; letter-spacing: -0.012em; line-height: 1.3; }
.pc-role { margin-top: 3px; font-size: 0.9rem; font-weight: 520; color: var(--slate); line-height: 1.4; }
.pc-kicker { margin-bottom: 4px; font-size: 0.86rem; font-weight: 620; color: var(--ink); line-height: 1.4; }
.pc-id .meta { margin-top: 8px; }
.pc-text { display: flex; flex-direction: column; flex: 1; }
.pc-bio { font-size: 0.92rem; line-height: 1.55; color: var(--slate); }
.pc-tags {
  list-style: none;
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pc-bio + .pc-tags { margin-top: 16px; }
.pc-tags li { display: flex; align-items: baseline; gap: 10px; font-size: 0.87rem; line-height: 1.4; color: var(--ink); }
.pc-tags li::before { content: ""; flex-shrink: 0; width: 10px; height: 2px; background: var(--accent); transform: translateY(-4px); }

/* physician: portrait flush across the top, identity above a rule, tags pinned to the bottom */
.pc-physician .pc-photo { aspect-ratio: 1 / 1.08; }
/* Per-portrait crop (Medical Team studio series): --py set by build.py, default unchanged */
.pc-physician .pc-photo img { object-position: 50% var(--py, 22%); }
.pc-physician .pc-id { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }

/* featured: horizontal, one per row. Portrait on the left as tall as the card;
   bio and specialties sit side by side so the card is only as tall as its content */
.pc-featured { display: grid; grid-template-columns: 280px 1fr; }
/* The portrait fills the card's full height whatever the text length: the image
   is taken out of flow so the text alone sets the height (300px minimum) */
.pc-featured .pc-photo { position: relative; min-height: 300px; }
.pc-featured .pc-photo img { position: absolute; inset: 0; object-position: 50% 18%; }
.pc-featured .pc-body { padding: 36px 40px; justify-content: center; }
.pc-featured .pc-text { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.pc-featured .pc-bio { margin-top: 0; }
.pc-featured .pc-tags { margin-top: 0; padding-top: 0; border-top: 0; }
.pc-featured .pc-id h3 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.018em; line-height: 1.22; }
.pc-featured .pc-role { font-size: 0.96rem; font-weight: 540; }
.pc-featured .pc-bio { font-size: 1.02rem; line-height: 1.6; max-width: 52ch; }

/* executive: square portrait, role above the name */
.pc-executive .pc-photo { aspect-ratio: 1 / 1; }
.pc-executive .pc-photo img { object-position: 50% 18%; }
.pc-executive .pc-body { padding: 20px 22px 22px; }
.pc-executive .pc-id h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.016em; }
.pc-executive .pc-bio { margin-top: 12px; font-size: 0.94rem; }

/* Consultants: a compact card (portrait, name, short title); the whole card
   opens a dialog with the full original description */
.cc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cc {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.cc:hover { border-color: var(--line-hover); }
.cc:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.cc-photo { aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper-deep); }
.cc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.cc h3 { padding: 14px 16px 0; font-size: 0.98rem; font-weight: 640; letter-spacing: -0.01em; line-height: 1.3; }
.cc-open { all: unset; cursor: pointer; }
/* The name button's hit area covers the whole card, portrait included */
.cc-open::after { content: ""; position: absolute; inset: 0; }
.cc-open:focus-visible { outline: none; }
.cc-title { padding: 3px 16px 16px; font-size: 0.86rem; font-weight: 500; line-height: 1.4; color: var(--slate); }

/* Consultant dialog */
dialog.cd {
  width: min(780px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
}
dialog.cd::backdrop { background: rgba(20, 20, 22, 0.62); }
dialog.cd[open] { animation: cd-in 0.26s var(--ease-out); }
@keyframes cd-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cd-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  max-height: calc(100dvh - 50px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px;
}
.cd-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 25%; border-radius: var(--radius-sm); }
.cd-body { padding-right: 28px; }
.cd-body h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.018em; line-height: 1.22; }
.cd-title { margin-top: 4px; font-size: 0.98rem; font-weight: 540; color: var(--slate); }
.cd-bio { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.cd-bio p { font-size: 1rem; line-height: 1.65; color: var(--slate); }
.cd-bio p + p { margin-top: 14px; }
.cd-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 1;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: 400 1.5rem/1 var(--font);
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.cd-close:hover { border-color: var(--ink); }
body.dialog-open { overflow: hidden; }

/* Team preview strip (home) */
.person-photo { aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius-sm); background: var(--paper-deep); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.07); }
.team-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.team-strip figcaption { padding-top: 14px; }
.team-strip h3 { font-size: 0.98rem; font-weight: 620; letter-spacing: -0.01em; }
.team-strip .role { font-size: 0.86rem; color: var(--slate); margin-top: 2px; line-height: 1.4; }

/* ═══════════ Facilities ═══════════ */
.system { margin-top: 64px; }
.system:first-child { margin-top: 0; }
.system-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.system-head h2 { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.016em; }
.system-head .count { margin-left: auto; font-size: 0.9rem; color: var(--slate-mid); }
.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.facility {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.facility h3 { font-size: 1.06rem; font-weight: 620; letter-spacing: -0.01em; }
.facility .addr { font-size: 0.95rem; color: var(--slate); }
.facility a {
  margin-top: 8px;
  font-size: 0.95rem;
  font-weight: 560;
  color: var(--ink);
  text-decoration: none;
}
.facility a:hover { text-decoration: underline; text-decoration-color: rgba(190, 0, 0, 0.45); text-underline-offset: 3px; }
.facility .site { margin-top: 0; font-weight: 500; color: var(--slate); }

/* Street addresses open in Google Maps. They keep the look of the text around
   them (colour, weight, size, spacing) and only reveal themselves on hover or
   focus; the selector outranks the link styles of each container. */
:is(.footer-col, .info-block, .facility, .legal) a.addr-link {
  display: inline;
  margin: 0;
  padding: 0;
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}
:is(.footer-col, .info-block, .facility, .legal) a.addr-link:hover {
  text-decoration: underline;
  text-decoration-color: rgba(190, 0, 0, 0.45);
  text-underline-offset: 3px;
}
.footer-col a.addr-link:hover { color: var(--on-dark); text-decoration-color: rgba(247, 244, 245, 0.45); }

/* ═══════════ Legal pages ═══════════ */
.legal-updated { font-size: 0.9rem; color: var(--slate-mid); margin-bottom: 36px; }
.legal h2 { font-size: 1.3rem; font-weight: 640; letter-spacing: -0.015em; margin: 44px 0 12px; }
.legal p, .legal li { font-size: 1.02rem; line-height: 1.65; color: var(--slate); max-width: 68ch; }
.legal p + p { margin-top: 14px; }
.legal a { color: var(--ink); font-weight: 560; }

/* ═══════════ FAQ ═══════════ */
.faq-group { border-top: 1px solid var(--line); }
.faq-group + .faq-group { margin-top: 20px; }
.faq-group h3 {
  font-size: 0.86rem;
  font-weight: 620;
  color: var(--slate-mid);
  padding: 28px 0 4px;
}
.faq { border-bottom: 1px solid var(--line); }
.faq:last-child { border-bottom: none; }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  font-size: 1.08rem;
  font-weight: 560;
  letter-spacing: -0.008em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  margin-left: auto;
  width: 8px; height: 8px;
  margin-right: 4px;
  border-right: 1.7px solid var(--slate-mid);
  border-bottom: 1.7px solid var(--slate-mid);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}
.faq[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover::after { border-color: var(--ink); }
.faq p {
  padding: 0 40px 22px 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--slate);
  max-width: 68ch;
}
.faq p a { color: var(--ink); font-weight: 560; }

/* ═══════════ Contact / form ═══════════ */
.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}
.info-block { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 26px 0; border-top: 1px solid var(--line-strong); }
.info-block:first-child { border-top: none; padding-top: 0; }
.info-block h2 { font-size: 1.05rem; font-weight: 640; letter-spacing: -0.01em; }
.info-block p, .info-block a { font-size: 1rem; color: var(--slate); text-decoration: none; }
.info-block a { font-weight: 560; color: var(--ink); }
.info-block a:hover { text-decoration: underline; text-decoration-color: rgba(190, 0, 0, 0.45); text-underline-offset: 3px; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.92rem; font-weight: 580; }
.field input, .field select, .field textarea {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-hover); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(190, 0, 0, 0.16);
}
.form-note { margin-top: 18px; font-size: 0.88rem; line-height: 1.5; color: var(--slate-mid); }
.form-card .btn { margin-top: 28px; }
/* Contact form states (script.js): field errors, sending, result message.
   .hp is the spam trap: off-screen, never shown or focused. */
.field-error { font-size: 0.86rem; line-height: 1.4; color: var(--accent); }
.field-error:empty { display: none; }
.field [aria-invalid="true"] { border-color: var(--accent); }
.form-card .btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.form-status { margin-top: 16px; font-size: 0.95rem; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--ink); font-weight: 560; }
.form-status.is-error { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 460px;
}
.notice a { color: var(--ink); font-weight: 600; text-decoration: underline; }

/* ═══════════ CTA band ═══════════ */
.cta-band { padding: 112px 0 120px; text-align: center; }
.cta-band .section-title { margin-inline: auto; max-width: 24ch; }
.cta-band .lede { margin: 0 auto; max-width: 52ch; }
.cta-band .hero-actions { margin-top: 32px; }

/* ═══════════ Footer (dark) ═══════════ */
.footer {
  background: var(--texture-veil), var(--texture) 70% 100% / 1400px auto repeat, #101012;
  border-top: 1px solid var(--line-dark);
  padding: 80px 0 40px;
  color: var(--on-dark-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
}
.footer .nav-logo { color: var(--on-dark); }
.footer .nav-logo img { width: 199px; max-width: 100%; height: auto; }  /* 48px tall; shrinks proportionally in a narrow column */
.footer-brand p { margin-top: 18px; font-size: 0.94rem; color: var(--on-dark-soft); line-height: 1.55; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-col :is(h2, h3) {
  font-size: 0.8rem;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: 4px;
}
.footer-col a { font-size: 0.94rem; color: var(--on-dark-soft); text-decoration: none; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--on-dark); }
.footer-address { font-size: 0.94rem; color: var(--on-dark-soft); line-height: 1.55; }
/* The rule is drawn inside the padding so it aligns with the columns above */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 28px;
  background: linear-gradient(var(--line-dark), var(--line-dark)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  font-size: 0.86rem;
  color: var(--on-dark-faint);
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--on-dark-faint); text-decoration: none; transition: color 0.2s var(--ease); }
.footer-legal a:hover { color: var(--on-dark); }

/* ═══════════ News Flashes (Sanity) ═══════════
   Announcements on the News page: a ruled list, the headshot beside the text.
   Homepage banner: one slim hairline frame at the top of the dark hero. */
.nf-section { padding-bottom: 96px; }
.nf-section + .section { border-top: 1px solid var(--line); }
.nf-list { list-style: none; margin-top: 8px; }
.nf-item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 44px; padding: 36px 0; border-top: 1px solid var(--line); }
.nf-item:last-child { padding-bottom: 0; }
.nf-item.nf-no-media { grid-template-columns: minmax(0, 1fr); }
.nf-media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--paper-deep); }
.nf-body { min-width: 0; overflow-wrap: break-word; }
.nf-title { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 640; letter-spacing: -0.016em; line-height: 1.22; margin-top: 6px; max-width: 40ch; }
.nf-subtitle { margin-top: 8px; font-size: 1.02rem; font-weight: 520; color: var(--ink); }
.nf-text { margin-top: 16px; }
.nf-text .body-copy + .body-copy, .nf-text .body-copy + .news-list-bullets, .nf-text .news-list-bullets + .body-copy { margin-top: 14px; }
.news-list-bullets { padding-left: 1.25em; font-size: 1.06rem; line-height: 1.65; color: var(--slate); max-width: 64ch; }
.news-list-bullets li + li { margin-top: 4px; }
.news-list-bullets li::marker { color: var(--accent); }
.news-list-bullets a { color: var(--ink); font-weight: 520; text-decoration-color: rgba(190, 0, 0, 0.45); text-underline-offset: 3px; }
.news-list-bullets a:hover { text-decoration-color: var(--accent); }
.nf-link { margin-top: 22px; }
/* Linked from the homepage banner: the anchored item clears the fixed nav */
.nf-item:target .nf-title { text-decoration: underline; text-decoration-color: rgba(190, 0, 0, 0.45); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.hero.has-banner { padding-top: calc(var(--nav-h) + 20px); }
.hero-banner { padding: 0 var(--gutter); margin-bottom: 72px; text-align: left; }
.hb-inner {
  display: flex; align-items: center; gap: 8px;
  max-width: 720px; margin: 0 auto; padding: 6px;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(20, 20, 22, 0.55);
}
.hb-track { list-style: none; display: grid; flex: 1; min-width: 0; }
.hb-slide { grid-area: 1 / 1; display: flex; opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease-fade), visibility 0s linear 0.6s; }
.hb-slide.is-current { opacity: 1; visibility: visible; transition: opacity 0.6s var(--ease-fade); }
.hb-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 6px 10px 6px 6px; border-radius: var(--radius-sm); color: var(--on-dark); text-decoration: none; }
.hb-link:hover { background: rgba(247, 244, 245, 0.06); }
.hb-thumb { flex-shrink: 0; }
.hb-thumb img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; background: rgba(247, 244, 245, 0.1); }
.hb-mark { flex-shrink: 0; width: 8px; height: 8px; margin: 0 4px 0 8px; background: var(--accent); }
.hb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hb-title {
  font-size: 0.98rem; font-weight: 580; line-height: 1.35; letter-spacing: -0.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.hb-link:hover .hb-title { text-decoration: underline; text-decoration-color: rgba(190, 0, 0, 0.7); text-underline-offset: 3px; }
.hb-date { font-size: 0.86rem; white-space: nowrap; color: var(--on-dark-faint); font-variant-numeric: tabular-nums; }
.hb-arrow { flex-shrink: 0; width: 7px; height: 7px; margin-right: 4px; border-top: 1.7px solid var(--accent); border-right: 1.7px solid var(--accent); transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.hb-link:hover .hb-arrow { transform: translateX(2px) rotate(45deg); }
/* Controls only once script.js has taken over (no-JS shows the first item alone) */
.hb-controls { display: none; align-items: center; gap: 2px; padding-left: 8px; border-left: 1px solid var(--line-dark); }
.hero-banner.is-ready .hb-controls { display: flex; }
.hb-count { min-width: 3.4em; text-align: center; font-size: 0.86rem; color: var(--on-dark-faint); font-variant-numeric: tabular-nums; }
.hb-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--on-dark-soft); cursor: pointer; transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.hb-btn:hover { background: rgba(247, 244, 245, 0.08); color: var(--on-dark); }
.hb-prev span, .hb-next span { width: 7px; height: 7px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; }
.hb-prev span { transform: translateX(1px) rotate(-135deg); }
.hb-next span { transform: translateX(-1px) rotate(45deg); }
.hb-pause span { width: 9px; height: 11px; border-left: 2.5px solid currentColor; border-right: 2.5px solid currentColor; }
.hb-pause[aria-pressed="true"] span { width: 0; height: 0; border-style: solid; border-color: transparent; border-width: 6px 0 6px 10px; border-left-color: currentColor; transform: translateX(1px); }

@media (max-width: 800px) {
  .nf-item { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 28px 0; }
  .nf-section { padding-bottom: 72px; }
  .hero.has-banner { padding-top: calc(var(--nav-h) + 14px); }
  .hero-banner { margin-bottom: 48px; }
}
@media (max-width: 520px) {
  .nf-item { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .nf-media { width: 132px; }
  /* Phones: the headline keeps the full width; the controls get their own row beneath */
  .hb-inner { flex-wrap: wrap; gap: 0; }
  .hb-track { flex-basis: 100%; }
  .hero-banner.is-ready .hb-controls { width: 100%; justify-content: flex-end; margin-top: 4px; padding: 2px 0 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .hb-btn { width: 40px; height: 36px; }
  .hb-thumb img { width: 36px; height: 36px; }
  .hb-link { gap: 12px; }
  .hb-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hb-slide, .hb-slide.is-current { transition: none; }
  .hb-link:hover .hb-arrow { transform: rotate(45deg); }
}

/* ═══════════ Reveals (gated behind .js so a script failure never blanks the page) ═══════════ */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease-fade), transform 0.95s var(--ease-enter);
}
.js .reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.12s; }
.reveal.d2 { transition-delay: 0.24s; }
.reveal.d3 { transition-delay: 0.36s; }
.reveal.d4 { transition-delay: 0.48s; }

/* ═══════════ Home hero entrance — the stain takes ═══════════
   Each headline line rises from behind a mask, then the logo red soaks
   through "of Hospital Pathology" left to right, like eosin taking to
   tissue. Content is fully visible without the animation (no .js gate
   needed: keyframes end on the resting state and `both` fill holds it). */
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-title .line > span { display: inline-block; animation: line-rise 1.05s var(--ease-enter) both; }
.hero-title .line + .line > span { animation-delay: 0.14s; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-dark .hero-title .soft {
    background: linear-gradient(90deg, var(--accent) 0 45%, rgba(247, 244, 245, 0.92) 55% 100%) 100% 0 / 225% 100% no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: line-rise 1.05s var(--ease-enter) 0.14s both, stain-take 1.7s var(--ease-stain) 0.55s both;
  }
}
.hero-in { animation: hero-fade 0.9s var(--ease-fade) both; }
.hi-1 { animation-delay: 0.5s; }
.hi-2 { animation-delay: 0.64s; }
.hi-3 { animation-delay: 0.78s; }
@keyframes line-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes stain-take { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes hero-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  dialog.cd[open] { animation: none; }
  /* Movement removed; gentle fades keep the sense of arrival */
  .js .reveal { transform: none; transition: opacity 0.4s linear; transition-delay: 0s; }
  .hero-title .line > span, .hero-dark .hero-title .soft { animation: hero-fade-still 0.5s linear both; }
  .hero-dark .hero-title .soft { background-position: 0 0; }
  .hero-in { animation: hero-fade-still 0.5s linear 0.15s both; }
  .nav-sub, .nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { transform: none; }
  .nav.menu-open .nav-links { animation: none; }
  .btn:active { transform: none; }
  .text-link:hover::after, .card-link:hover h3::after { transform: rotate(45deg); }
}
@keyframes hero-fade-still { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════ Responsive ═══════════ */
@media (max-width: 1000px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px var(--gutter) 32px;
    /* Opaque on purpose: a translucent panel nested under the bar's own
       backdrop-filter lets the page bleed through and hurts legibility. */
    background: var(--white);
    border-top: 1px solid var(--line);
    animation: menu-in 0.26s var(--ease-out) both;
  }
  .nav.menu-open .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.1rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }
  .nav.menu-open .nav-links a[aria-current="page"], .nav.menu-open .nav-group-current > a { font-weight: 620; }
  .nav.menu-open .nav-links a[aria-current="page"]::before {
    content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 2px 0;
    border-radius: 50%; background: var(--accent);
  }
  .nav-dark.menu-open .nav-links { background: var(--ink-deep); border-top-color: var(--line-dark); }
  .nav-dark.menu-open .nav-links a { color: var(--on-dark); border-bottom-color: var(--line-dark); }
  .nav-mobile-only { display: revert; }
  .nav.menu-open .nav-group > a::after { display: none; }
  .nav.menu-open .nav-sub { position: static; display: flex; flex-direction: column; padding: 0; min-width: 0; opacity: 1; visibility: visible; transform: none; transition: none; }
  .nav.menu-open .nav-sub::before { display: none; }
  .nav.menu-open .nav-sub a { padding: 12px 0 12px 18px; margin: 0; font-size: 1rem; color: var(--slate) !important; background: none; }
  .nav-dark.menu-open .nav-sub a { color: var(--on-dark-soft) !important; }
  .nav.menu-open .nav-links a.nav-mobile-tel { font-weight: 620; border-bottom: none; margin-top: 12px; }
}

@media (max-width: 1060px) {
  .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .ruled-list.cols-3 { grid-template-columns: 1fr; }
  .pc-grid { grid-template-columns: repeat(3, 1fr); }
  .cc-grid { grid-template-columns: repeat(4, 1fr); }
  .pc-grid-featured { grid-template-columns: 1fr; }
  .pc-featured { grid-template-columns: 240px 1fr; }
  .pc-featured .pc-body { padding: 28px 30px; }
  .pc-featured .pc-text { grid-template-columns: 1fr; gap: 16px; }
  .team-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .split, .contact-layout, .split.split-figure, .split.split-lab, .split.split-portrait { grid-template-columns: 1fr; gap: 44px; }
  .banner-office img { aspect-ratio: 16 / 9; }
  .banner-ribbon img { aspect-ratio: 16 / 9; object-position: 50% 58%; }
  .award-media { order: 1; }
  .award-badge { max-width: 240px; padding: 22px; }
  .pc-grid:not(.pc-grid-featured) { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cc-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  /* Stacked: one-sided bleeds would look lopsided, so images run edge to edge
     and the legend stays on the text grid */
  .bleed-right, .bleed-left { margin-inline: calc(-1 * var(--edge)); }
  .bleed-right img, .bleed-left img { border-radius: 0; }
  .bleed-right figcaption, .bleed-left figcaption { margin-inline: var(--edge); }
}

/* Comfortable tap targets wherever the layout is a touch layout */
@media (max-width: 1000px) {
  .footer-col { gap: 0; }
  .footer-col :is(h2, h3) { margin-bottom: 6px; }
  .footer-col a, .footer-legal a { padding: 10px 0; }
  .footer-address { padding-top: 10px; }
  .text-link { padding: 10px 0; }
  .facility a { padding: 10px 0 8px; margin-top: 0; }
  .facility a.site { padding: 6px 0 10px; }
  .info-block a { padding: 8px 0; }
}

@media (max-width: 740px) {
  :root { --gutter: 22px; }
  .hero { padding: 132px 0 72px; }
  .hero h1 { font-size: clamp(2.2rem, 10.5vw, 2.7rem); }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 340px; margin-inline: auto; }
  .page-hero { padding: 124px 0 44px; }
  .page-hero.hero-dark { padding-bottom: 60px; }
  .notfound .hero-actions { margin-inline: 0; }
  .section { padding: 76px 0; }
  .section.tight { padding: 60px 0; }
  .section-head { margin-bottom: 36px; }
  .statband { padding: 76px 0 72px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 52px 0; }
  .stat:nth-child(3) { border-left: none; }
  .ruled-list, .card-grid, .card-grid.cols-4, .card-grid.cols-2, .facility-grid { grid-template-columns: 1fr; }
  .card-grid .card + .card { margin-top: 0; }
  .ruled-list li { padding: 18px 0 20px; }
  .pc-grid:not(.pc-grid-featured) { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .team-strip { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .team-strip figure:nth-child(5) { display: none; }
  .pc-featured { grid-template-columns: 1fr; }
  .pc-featured .pc-photo { aspect-ratio: 5 / 4; min-height: 0; }
  .pc-featured .pc-photo img { object-position: 50% 8%; }
  .pc-featured .pc-body { padding: 22px 20px; }
  .pc-featured .pc-text { margin-top: 16px; padding-top: 16px; }
  .pc-featured .pc-id h3 { font-size: 1.3rem; }
  .award-badge { max-width: 200px; padding: 18px; }
  .photo-banner img { aspect-ratio: 4 / 3; }
  .banner-office img { aspect-ratio: 3 / 2; }             /* keep the room's architecture */
  .banner-ribbon img { aspect-ratio: 4 / 3; }
  .banner-ihc img { aspect-ratio: 24 / 25; object-position: 0 50%; } /* the first panel only, stopping short of its gutter */
  .figure figcaption { flex-direction: column; gap: 2px; }
  .form-card { padding: 26px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 84px 0 88px; }
  .footer { padding-top: 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { margin-top: 44px; flex-direction: column; gap: 4px; }
}

@media (max-width: 520px) {
  /* Every person keeps a card; the inside recomposes: a 96px portrait beside
     the name and role, then a rule, the bio and the specialties */
  .pc-grid:not(.pc-grid-featured) { grid-template-columns: 1fr; gap: 14px; }
  .pc-physician, .pc-executive { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; padding: 14px; }
  .pc-physician .pc-photo, .pc-executive .pc-photo { aspect-ratio: 1 / 1; border-radius: var(--radius-sm); }
  .pc-physician .pc-photo img { object-position: 50% var(--py-m, var(--py, 22%)); }
  .pc-physician .pc-body, .pc-executive .pc-body { display: contents; }
  .pc-physician .pc-id, .pc-executive .pc-id { align-self: center; padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
  .pc-executive .pc-id h3 { font-size: 1.12rem; }
  .pc-physician .pc-text, .pc-executive .pc-text { grid-column: 1 / -1; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
  .pc-executive .pc-bio { margin-top: 0; }
  /* Consultants on phones: one card each, a 72px portrait beside name and title */
  .cc-grid { grid-template-columns: 1fr; gap: 12px; }
  .cc { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; padding: 12px; }
  .cc-photo { grid-row: 1 / 3; border-radius: var(--radius-sm); }
  .cc h3 { padding: 6px 0 0; align-self: end; }
  .cc-title { padding: 2px 0 0; align-self: start; }
  .cd-grid { grid-template-columns: 1fr; gap: 18px; padding: 22px 20px 24px; }
  .cd-photo { width: 132px; }
  .cd-body { padding-right: 0; }
  .cd-body h2 { font-size: 1.3rem; padding-right: 44px; }
}
}
