/*
 * Theme layer for Bootstrap 5.3 — brand tokens and element-level styling only.
 * Markup uses Bootstrap classes; the single custom utility is `.font-accent`
 * (the handwritten eyebrow font), which Bootstrap has no equivalent for.
 */

:root {
  /* Brand palette (Feast+ branding values from the reference site).
     Per-site overrides come from site.txt via the <style> block that
     layout/header.php prints after this file; these are the ftm defaults. */
  --bs-primary: #28657d;          /* buttons, top banner, links */
  --bs-primary-rgb: 40, 101, 125;
  --bs-info: #ffc857;             /* accent from site.txt: highlighter behind eyebrows (surface only, too light for text) */
  --bs-info-rgb: 255, 200, 87;
  --bs-secondary: #bfe9ea;        /* CTA band */
  --bs-secondary-rgb: 191, 233, 234;
  --bs-light: #edf2f7;            /* full-width feature bands */
  --bs-light-rgb: 237, 242, 247;

  /* Paper tinted a hair toward the primary hue, ink a tinted near-black (never pure #fff/#000) */
  --bs-body-bg: #fbfcfc;
  --bs-body-bg-rgb: 251, 252, 252;
  --bs-body-color: #182024;
  --bs-body-color-rgb: 24, 32, 36;
  --bs-secondary-color: rgba(24, 32, 36, .75);
  --bs-secondary-color-rgb: 24, 32, 36;
  --bs-tertiary-color: rgba(24, 32, 36, .5);
  --bs-tertiary-color-rgb: 24, 32, 36;
  --bs-body-font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: 1.1875rem;
  --bs-body-line-height: 1.8;
  --bs-font-heading: "Poppins", var(--bs-body-font-family);
  --bs-font-accent: "Caveat", cursive;

  --bs-link-color: var(--bs-primary);
  --bs-link-color-rgb: var(--bs-primary-rgb);
  --bs-link-hover-color: var(--bs-primary);
  --bs-link-hover-color-rgb: var(--bs-primary-rgb);
  --bs-link-decoration: none;
  --bs-focus-ring-color: rgba(var(--bs-primary-rgb), .25);

  /* Theme-dependent site tokens (header.php prints per-site values for both themes) */
  --site-on-primary: #fff;                 /* text on a primary-filled surface: buttons, banner, dots */
  --site-on-primary-rgb: 255, 255, 255;
  --site-card-bg: var(--bs-body-bg);       /* post/child cards */
  --site-mark-rgb: 255, 224, 51;           /* highlighter pen */
  --site-mark-strength: .95;

  /* Square corners sitewide: cards, panels, tips, buttons and form fields all resolve to these.
     Radius is used only where the shape is the point: circles (avatars, social icons, step dots)
     via rounded-circle, and the highlighter mark. Raise these to soften everything at once. */
  --bs-border-radius: 0;
  --bs-border-radius-sm: 0;
  --bs-border-radius-lg: 0;
  --bs-box-shadow-sm: 0 2px 6px rgba(0, 0, 0, .16);
  --site-hover: .15s ease;                            /* every hover transition on the site uses this */
}

/* Main nav: hold the height the old 56px logo gave it (56 + 2×1rem padding) */
.site-nav { min-height: 5.5rem; }

/* Text logo (header + footer) */
.site-logo {
  font-family: var(--bs-font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bs-emphasis-color);
  text-decoration: none;
}
.site-logo:hover { color: var(--bs-primary); }
.site-logo-mark { width: 1.6em; height: 1.6em; flex: none; }
/* Phones: scale the header wordmark with the viewport so a longer site name keeps the menu button on its row */
@media (max-width: 479.98px) { .site-nav .site-logo { font-size: clamp(1.05rem, 4.6vw, 1.5rem); margin-right: .5rem; } }

/* Nav links: same primary tint on hover as the logo. !important because Bootstrap's
   .text-black utility is !important; the transition keeps it from snapping. */
.site-nav .navbar-nav .nav-link { transition: color var(--site-hover); }
/* Between xl and xxl the expanded nav is tight; a smaller gap keeps a full menu on one line */
@media (min-width: 1200px) and (max-width: 1399.98px) { .site-nav .navbar-nav { column-gap: 1rem !important; } }
/* Second bar under the navbar (layout/subnav): one row that scrolls sideways when it doesn't fit */
.site-subnav { background: var(--site-subnav-bg, var(--bs-primary)); font-size: 1rem; }
.site-subnav .nav { column-gap: 1.375rem; scrollbar-width: none; }
/* Fade the right edge while there is more to scroll to (set by the snippet's script) */
.site-subnav .nav.has-more { mask-image: linear-gradient(to left, transparent, #000 3rem); }
.site-subnav .nav::-webkit-scrollbar { display: none; }
.site-subnav .nav-link { --bs-nav-link-padding-y: 1rem; font-size: 1.0625rem; color: var(--site-subnav-fg); font-weight: 700; transition: color var(--site-hover), box-shadow var(--site-hover); }
.site-subnav .nav-link:hover, .site-subnav .nav-link:focus-visible, .site-subnav .nav-link.show { color: var(--site-subnav-fg); box-shadow: inset 0 -3px 0 rgba(var(--site-subnav-fg-rgb), .5); }
.site-subnav .nav-link.active { color: var(--site-subnav-fg); box-shadow: inset 0 -4px 0 var(--site-subnav-line, var(--bs-info)); }
/* Desktop: header dropdowns (main menu and procedures bar) are compact, so long lists stay short */
@media (min-width: 1200px) {
  .site-nav .dropdown-menu, .site-subnav .dropdown-menu { --bs-dropdown-padding-y: .375rem; --bs-dropdown-item-padding-y: .4rem; --bs-dropdown-header-padding-y: .4375rem; --bs-dropdown-divider-margin-y: .375rem; --bs-dropdown-font-size: calc(var(--bs-body-font-size) * .9); line-height: 1.425; }
  .site-nav .dropdown-header, .site-subnav .dropdown-header { font-size: .75rem; }
  /* Invisible strip above the menu so the pointer stays over the dropdown on its way down from the link */
  .site-nav .dropdown-menu::before, .site-subnav .dropdown-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -.75rem; height: .75rem; }
}
/* The bar adds to the sticky header, so sticky panels and jump targets sit that much lower */
html:has(.site-subnav) { --site-subnav-h: 3.75rem; }
/* Scrolled (.is-compact, set by the script in layout/header): both bars tighten, with a soft shadow */
.site-header { transition: box-shadow .25s ease; }
.site-header .site-nav { transition: min-height .25s ease; }
.site-header .site-nav .site-logo { transition: font-size .25s ease, padding .25s ease, color var(--site-hover); }
.site-header .site-subnav .nav-link { transition: padding .25s ease, color var(--site-hover), box-shadow var(--site-hover); }
.site-header.is-compact { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .08); }
.site-header.is-compact .site-nav { min-height: 4.25rem; }
.site-header.is-compact .site-nav .site-logo { font-size: 1.3rem; padding-top: .5rem !important; padding-bottom: .5rem !important; }
.site-header.is-compact .site-subnav .nav-link { --bs-nav-link-padding-y: .625rem; }
@media (max-width: 479.98px) { .site-header.is-compact .site-nav .site-logo { font-size: clamp(1rem, 4.2vw, 1.3rem); } }
@media (prefers-reduced-motion: reduce) { .site-header, .site-header .site-nav, .site-header .site-nav .site-logo, .site-header .site-subnav .nav-link { transition: none; } }
.site-nav .navbar-nav .nav-link:hover,
.site-nav .navbar-nav .nav-link:focus-visible { color: var(--bs-primary) !important; }

/* Headings: Poppins extra-bold, tighter leading */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--bs-font-heading);
  font-weight: 800;
  line-height: 1.3;
}

/* Equivalent of overriding Bootstrap's $container-max-widths: keep the
   xxl container at the xl width so the page never grows past 1140px */
@media (min-width: 1400px) {
  .container-xl { max-width: 1140px; }
}

/* Bootstrap's spacing scale has nothing between 4 (1.5rem) and 5 (3rem). This is the
   CDN equivalent of adding a step to the $spacers Sass map: 2.25rem vertical padding
   and margin used as the standard section rhythm. Named to sit between 4 and 5. */
.py-4-5 { padding-block: 2.25rem !important; }
.mt-4-5 { margin-top: 2.25rem !important; }
.my-4-5 { margin-block: 2.25rem !important; }

/* The footer is tinted and sits a section step below the page. When the page already ends
   on a tinted band, that margin shows as a white strip between two tints, so drop it and let
   the footer's top border separate them. Trailing JSON-LD scripts are ignored. */
main:has(> section:nth-last-child(1 of :not(script)):is(.bg-light, .bg-secondary)) + footer { margin-top: 0 !important; }

/* Tinted bands paint their padding, so a trailing paragraph/list margin would sit on top
   of it and make the band look bottom-heavy. Drop the last child's margin. */
.py-4-5 > .container-xl > :last-child { margin-bottom: 0; }

/* Bootstrap's negative-margin utilities are off by default ($enable-negative-margins).
   This is the one we use, for the sidebar photo poking above its box. */
.mt-n4 { margin-top: -1.5rem !important; }

/* Bordered note whose frame sits outside the text column: the padding is cancelled by
   equal negative side margins, so the text lines up with the paragraphs around it. */
.outset-box { padding: 1.25rem 1.5rem; margin-inline: -1.5rem; border-radius: var(--bs-border-radius-lg); }
/* On phones there is no room to outset, so drop the frame and use a short rule above instead */
@media (max-width: 575.98px) {
  .outset-box { padding: 1.25rem 0 0; margin-inline: 0; border: 0 !important; position: relative; }
  .outset-box::before { content: ""; position: absolute; top: 0; left: 0; width: 4rem; border-top: 2px solid var(--bs-primary); }
}

/* Round feature photo (author intro). Stacked: tinted card, photo capped so it does not fill a phone screen.
   Side by side: no card, no ring, photo fills its column. */
.feature-bio { background: var(--bs-light); }
.feature-round { max-width: 14rem; }
@media (min-width: 992px) {
  .feature-bio { background: none; padding: 0 !important; margin-top: 0 !important; }
  .feature-round { max-width: none; margin-top: 0 !important; border: 0 !important; }
}

/* Hub preview card (sections/hub-preview): the media column fills the card's height and is never less than
   square; the summary is clamped to four lines so long summaries don't stretch the card */
.hub-card-media { position: relative; width: 100%; height: 100%; aspect-ratio: 1; }
.hub-card-media > img, .hub-card-media > .initials { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-card-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; }

/* Initials tile: stands in for a card image until the page has one (sections/hub-preview) */
.initials {
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary);
  font-family: var(--bs-font-heading, inherit); font-weight: 800; font-size: 1.75rem; letter-spacing: .02em;
}

/* Hover system. Three treatments, all on --site-hover:
   1 Text links: colour to primary (nav, TOC, footer, tip byline) or underline (body links) — see their own rules.
   2 Linked cards (a.card, and a .card carrying a .stretched-link): 2px lift, shadow deepens, title turns primary.
   3 Tiles (category images, social buttons): label to primary, image dims a touch. No lift on images. */
a.card, .card:has(.stretched-link), .alt-card {
  transition: transform var(--site-hover), box-shadow var(--site-hover);
}
a.card:hover, a.card:focus-visible, .card:has(.stretched-link:hover), .card:has(.stretched-link:focus-visible),
.alt-card:has(.stretched-link:hover), .alt-card:has(.stretched-link:focus-visible) {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .14) !important;  /* beats the .shadow-sm utility */
}
a.card h3, a.card h4, a.card .h5, .card:has(.stretched-link) h3 { transition: color var(--site-hover); }
a.card:hover h3, a.card:hover h4, a.card:hover .h5, a.card:focus-visible h3, a.card:focus-visible h4,
.card:has(.stretched-link:hover) h3 { color: var(--bs-primary); }

.tile { transition: color var(--site-hover); }
.tile img { transition: opacity var(--site-hover); }
.tile:hover, .tile:focus-visible { color: var(--bs-primary) !important; }  /* beats the .text-black utility */
.tile:hover img, .tile:focus-visible img { opacity: .88; }

@media (prefers-reduced-motion: reduce) {
  a.card, .card:has(.stretched-link), .alt-card, .tile, .tile img, .site-nav .navbar-nav .nav-link { transition: none; }
  a.card:hover, .card:has(.stretched-link:hover), .alt-card:has(.stretched-link:hover) { transform: none; }
}

/* Handwritten eyebrow text */
.font-accent {
  font-family: var(--bs-font-accent);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
}
/* Marker-pen highlight in the accent colour along the lower half of the eyebrow's text.
   On the inline span (not the block) so each wrapped line gets its own stroke. */
.mark-accent {
  background: linear-gradient(transparent 58%, var(--bs-info) 58%, var(--bs-info) 92%, transparent 92%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding-inline: .15em;
  margin-inline: -.15em;
}

/* Dropdown menus: match the body size instead of Bootstrap's fixed 1rem */
.dropdown-menu {
  --bs-dropdown-font-size: var(--bs-body-font-size);
  --bs-dropdown-item-padding-y: .5rem;
  --bs-dropdown-spacer: 0; /* no gap between link and menu, so hover doesn't drop out */
  --bs-dropdown-link-active-bg: var(--bs-primary);   /* Bootstrap's default is its own blue */
  --bs-dropdown-link-active-color: var(--site-on-primary);
  /* Hover: text to primary (hover treatment 1) on a primary tint, instead of Bootstrap's faint grey */
  --bs-dropdown-link-hover-color: var(--bs-primary);
  --bs-dropdown-link-hover-bg: rgba(var(--bs-primary-rgb), .1);
}
.dropdown-item { transition: color var(--site-hover), background-color var(--site-hover); }

/* Collapsed mobile menu floats over the page instead of pushing content down.
   Bootstrap animates the height of .navbar-collapse and nothing else, so it carries no
   padding or border of its own: those live on the inner wrapper, which shrinks cleanly
   under overflow:hidden instead of snapping away on the last frame of the close. */
@media (max-width: 1199.98px) {
  /* Above the procedures bar that follows it (its fade mask makes its own stacking layer) */
  .site-nav { z-index: 2; }
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bs-body-bg);
  }
  .navbar-collapse-inner {
    padding: 0 .75rem 1rem;
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
  }
}
/* Expanded: the wrapper must not exist as a flex item, or the nav loses its centring */
@media (min-width: 1200px) { .d-xl-contents { display: contents; } }

/* Open nav dropdowns on hover where the navbar is expanded (Bootstrap is click-only by
   default). Below xl the menu is collapsed and the click toggle still applies. */
@media (min-width: 1200px) {
  .navbar .dropdown:hover > .dropdown-menu { display: block; }
  /* Same short close delay as the procedures bar (layout/subnav): the menu stays up for a
     moment after the pointer leaves, so a slightly off path to an item doesn't shut it */
  .navbar .dropdown > .dropdown-menu { display: block; visibility: hidden; opacity: 0; transition: visibility 0s .25s, opacity 0s .25s; }
  .navbar .dropdown:hover > .dropdown-menu, .navbar .dropdown > .dropdown-menu.show { visibility: visible; opacity: 1; transition-delay: 0s; }
}

/* Form fields share the panel radius so they sit flush inside the contact form's box */
.form-control, .form-select { border-radius: var(--bs-border-radius-lg); }

/* Accordion (homepage FAQ): no focus ring or tint on the open question; keyboard users still get the ring via :focus-visible */
.accordion-button:focus:not(:focus-visible) { box-shadow: none; }
.accordion-button:not(.collapsed) { background-color: transparent; color: inherit; box-shadow: none; }
/* Hover matches the nav submenu: text to primary on a primary tint */
.accordion-button { transition: color var(--site-hover), background-color var(--site-hover); }
.accordion-button:hover { color: var(--bs-primary); background-color: rgba(var(--bs-primary-rgb), .1); }
.accordion-body { padding-top: 0; padding-bottom: 1rem; }
.accordion-body > :last-child { margin-bottom: 0; }

/* Buttons: uppercase, wide tracking */
.btn {
  --bs-btn-font-size: var(--bs-body-font-size);
  --bs-btn-font-weight: 800;
  --bs-btn-padding-x: 18px;
  --bs-btn-padding-y: 11px;
  --bs-btn-border-width: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: transform var(--site-hover), box-shadow var(--site-hover), background-color var(--site-hover), color var(--site-hover);
}
/* Buttons take the card treatment at half strength: 1px lift and a soft shadow */
.btn:hover, .btn:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .14); }
.btn:active { transform: none; box-shadow: none; }
/* Small variant (popular searches): declared after .btn so its tokens win */
.btn-sm {
  --bs-btn-font-size: .8125rem;
  --bs-btn-padding-x: 14px;
  --bs-btn-padding-y: 8px;
  letter-spacing: 1px;
}

.btn-sm {
  --bs-btn-padding-x: 14px;
  --bs-btn-padding-y: 8px;
  --bs-btn-font-size: .875rem;
}

.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-color: var(--site-on-primary);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-color: var(--site-on-primary);
  --bs-btn-active-bg: var(--bs-primary);
  --bs-btn-active-color: var(--site-on-primary);
  --bs-btn-disabled-bg: var(--bs-primary);          /* Bootstrap's defaults are its own blue */
  --bs-btn-disabled-border-color: var(--bs-primary);
  --bs-btn-disabled-color: var(--site-on-primary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

.btn-outline-primary {
  --bs-btn-border-width: 2px;
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-border-color: var(--bs-primary);
  --bs-btn-hover-color: var(--site-on-primary);
  --bs-btn-active-bg: var(--bs-primary);
  --bs-btn-active-border-color: var(--bs-primary);
  --bs-btn-active-color: var(--site-on-primary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

/* Round social icons (components/social-links): primary at low alpha, so the palette reads
   as primary + light band rather than introducing a third colour for one footer element */
.btn-info {
  --bs-btn-bg: rgba(var(--bs-primary-rgb), .12);
  --bs-btn-border-color: transparent;
  --bs-btn-color: var(--bs-primary);
  --bs-btn-hover-bg: rgba(var(--bs-primary-rgb), .22);
  --bs-btn-hover-color: var(--bs-primary);
  --bs-btn-active-bg: rgba(var(--bs-primary-rgb), .3);
  --bs-btn-active-color: var(--bs-primary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
  --bs-btn-font-size: 1rem;
  --bs-btn-padding-x: 10px;
  --bs-btn-padding-y: 10px;
  letter-spacing: 0;
  text-transform: none;
}

/* Wavy section divider (mask-based, primary at half strength) */
main hr {
  height: 5px;
  border: 0;
  opacity: 1;
  background-color: rgba(var(--bs-primary-rgb), .5);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 5'%3E%3Cpath d='M0,1c6.25,0,6.25,3,12.5,3s6.25-3,12.5-3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 25px 5px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 5'%3E%3Cpath d='M0,1c6.25,0,6.25,3,12.5,3s6.25-3,12.5-3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 25px 5px repeat-x;
}

/* Sub-page headings inside a procedure article: read as headings, not body links */
.variant-title a { color: var(--bs-primary); text-decoration: none; }
.variant-title a:hover, .variant-title a:focus-visible { text-decoration: underline; }  /* already primary, so underline is the cue; the card itself lifts */

/* Byline under page titles */
.byline img { object-fit: cover; }
.byline-sep { margin-inline: .4rem; opacity: .5; }
.author-box { padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--bs-primary); }
.author-box img { object-fit: cover; }

/* Highlighter-pen emphasis inside body text */
/* Colour and strength come from --site-mark-* (yellow) */
mark { padding: .1em .25em; margin: 0 -.1em; background: linear-gradient(104deg, rgba(var(--site-mark-rgb), 0) .9%, rgba(var(--site-mark-rgb), var(--site-mark-strength)) 2.4%, rgba(var(--site-mark-rgb), calc(var(--site-mark-strength) * .63)) 97.5%, rgba(var(--site-mark-rgb), 0) 100%); box-decoration-break: clone; -webkit-box-decoration-break: clone; color: inherit; border-radius: .2em; }

/* Structure-field tables (components/data-table): bold lead column, optional sub-text under it */
.data-table { margin: 0 0 1rem; } /* the paragraph above supplies the gap */
.data-table tbody tr:first-child > * { padding-top: .2rem; }
.data-table th[scope="row"] { font-weight: 600; width: 40%; }
.data-table th[scope="row"] small { line-height: 1.3; }
.data-table td, .data-table th { padding-block: .6rem; padding-inline: 0 1rem; }
/* Timeline shape: narrow period column in the primary colour, no header row */
.data-table.timeline th[scope="row"] { width: 7rem; color: var(--bs-primary); font-weight: 700; }

/* Article heading hierarchy: H2 sections, H3 sub-sections clearly subordinate, H4 items smaller still */
article h2 { font-size: 1.75rem; margin-top: 2.25rem; margin-bottom: .75rem; }
article h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.75rem; margin-bottom: .5rem; }
article h4 { font-size: 1.05rem; font-weight: 700; margin-top: 1.25rem; margin-bottom: .25rem; }
article h2:first-child { margin-top: 0; }

/* Cards (post-card, child-cards, directory): the page colour */
.card { --bs-card-bg: var(--site-card-bg); }

/* Bootstrap's .link-primary hover is its own darkened blue; keep it on the site primary */
.link-primary:hover, .link-primary:focus { color: rgba(var(--bs-primary-rgb), var(--bs-link-opacity, 1)) !important; text-decoration-color: rgba(var(--bs-primary-rgb), var(--bs-link-underline-opacity, 1)) !important; }
.procedure-diagram img { display: block; background: var(--bs-light); }

/* Below sm, each data-table row stacks into a block: lead cell as heading, other cells labelled */
@media (max-width: 575.98px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: auto; }
  .data-table tr { padding-block: .75rem; border-top: 1px solid var(--bs-border-color); }
  .data-table tbody tr:first-child { border-top: 0; }
  .data-table th[scope="row"], .data-table td { padding: 0; border: 0; white-space: normal; }
  .data-table th[scope="row"] { width: auto; margin-bottom: .35rem; }
  .data-table th[scope="row"] small { margin-top: .15rem; }
  .data-table td { margin-top: .25rem; }
  .data-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
  .data-table.timeline th[scope="row"] { width: auto; margin-bottom: .15rem; }
  .data-table.timeline td[data-label]::before { content: none; }
}

/* Sidebar: fixed 300px column beside the article on lg+, full width stacked below it on smaller screens */
.sidebar-inner { max-width: 300px; margin-inline: auto; }
@media (max-width: 991.98px) {
  .sidebar-inner { max-width: none; }
  .sidebar-inner .ad-slot img { max-width: 100%; }
}

/* 1 rule: left border only */
.tip--rule { padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--bs-primary); }
/* 2 card: tinted panel, rounded */
.tip--card { background: var(--bs-light); border-radius: var(--bs-border-radius-lg); padding: 1.25rem; }
/* 3 bubble: bordered speech bubble pointing at the avatar */
.tip--bubble .tip-body { position: relative; border: 2px solid var(--bs-primary); border-radius: var(--bs-border-radius-lg); padding: 1rem 1.25rem; }
.tip--bubble .tip-body::before { content: ""; position: absolute; left: -12px; top: 22px; border: 6px solid transparent; border-right: 8px solid var(--bs-primary); border-left: 0; }
.tip--bubble .tip-body::after { content: ""; position: absolute; left: -8px; top: 24px; border: 4px solid transparent; border-right: 6px solid var(--bs-body-bg); border-left: 0; }
/* 4 note: handwritten label, soft tint, avatar overlapping the top edge */
.tip--note { background: rgba(var(--bs-primary-rgb), .07); border-radius: var(--bs-border-radius-lg); padding: 1.25rem 1.25rem 1.25rem 1rem; margin-top: 2.5rem !important; }
.tip--note .tip-avatar { margin-top: -2.5rem; }
/* 5 band: solid primary block, white text, avatar ringed in white */
.tip--band { background: var(--bs-primary); color: var(--site-on-primary); border-radius: var(--bs-border-radius-lg); padding: 1.25rem; }
.tip--band .tip-label, .tip--band .tip-label span { color: rgba(var(--site-on-primary-rgb), .85); }
.tip--band .tip-avatar { filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.tip--band a { color: var(--site-on-primary); }
@media (max-width: 575.98px) { .tip { gap: .5rem; } .tip-avatar { width: 84px; height: 84px; } }

/* Pointing cut-out variants: the figure points into the text, so it always sits left and is never cropped */
.tip--pointing { align-items: center; }
.tip--pointing .tip-avatar { width: 140px; height: 140px; object-fit: contain; }
/* 6 point-card: figure beside a tinted panel */
.tip--point-card { gap: .5rem; }
.tip--point-card .tip-body { background: var(--bs-light); border-radius: var(--bs-border-radius-lg); padding: 1.25rem 1.5rem; }
/* 7 point-bubble: figure beside an outlined bubble that points back at him */
.tip--point-bubble .tip-body { position: relative; border: 2px solid var(--bs-primary); border-radius: var(--bs-border-radius-lg); padding: 1rem 1.25rem; }
.tip--point-bubble .tip-body::before { content: ""; position: absolute; left: -12px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-right: 8px solid var(--bs-primary); border-left: 0; }
.tip--point-bubble .tip-body::after { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-right: 6px solid var(--bs-body-bg); border-left: 0; }
/* 8 point-band: figure standing on a primary band, breaking the top edge */
.tip--point-band { background: var(--bs-primary); color: var(--site-on-primary); border-radius: var(--bs-border-radius-lg); padding: .75rem 1.5rem .75rem 1rem; margin-top: 2.5rem !important; align-items: flex-end; }
.tip--point-band .tip-avatar { margin-top: -2.5rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.tip--point-band .tip-body { padding-block: .5rem; }
.tip--point-band .tip-label, .tip--point-band .tip-label span { color: rgba(var(--site-on-primary-rgb), .85); }
.tip--point-band a { color: var(--site-on-primary); }
/* 10 point-tint: like the band but on a light primary tint, dark text, figure breaking the top edge */
.tip--point-tint { background: rgba(var(--bs-primary-rgb), .08); border-radius: var(--bs-border-radius-lg); padding: .75rem 1.5rem .75rem 1rem; margin-top: 2.5rem !important; align-items: flex-end; }
.tip--point-tint .tip-avatar { margin-top: -2.5rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.tip--point-tint .tip-body { padding-block: .5rem; }
/* 11 point-inset: like edge, but the border starts at the article's left edge and the figure overlaps it only slightly */
.tip--point-inset { margin-left: 1rem; position: relative; border: 2px solid rgba(var(--bs-primary-rgb), .35); border-radius: var(--bs-border-radius-lg); padding: 1.25rem 1.5rem 1.25rem 8.25rem; display: block; min-height: 9rem; }
.tip--point-inset .tip-avatar { position: absolute; left: -1rem; top: 50%; transform: translateY(-50%); }
/* 9 point-edge: bordered panel, figure overlapping its left edge half in, half out */
.tip--point-edge { margin-left: 3.5rem; position: relative; border: 2px solid rgba(var(--bs-primary-rgb), .35); border-radius: var(--bs-border-radius-lg); padding: 1.25rem 1.5rem 1.25rem 5.5rem; display: block; }
.tip--point-edge .tip-avatar { position: absolute; left: -3.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 575.98px) {
  .tip { gap: .75rem; }
  .tip-avatar { width: 48px; height: 48px; }
  .tip--pointing .tip-avatar { width: 96px; height: 96px; }
  .tip--point-edge { margin-left: 2.5rem; padding-left: 4rem; }
  .tip--point-inset { margin-left: .5rem; padding-left: 5.5rem; min-height: 0; }
  .tip--point-inset .tip-avatar { left: -.5rem; width: 84px; height: 84px; }
  .tip--point-edge .tip-avatar { left: -2.5rem; width: 84px; height: 84px; }
}

/* Alternate the avatar side down the page so four tips don't stamp the same shape */
article .tip:nth-of-type(even) { flex-direction: row-reverse; text-align: right; }
article .tip:nth-of-type(even) .tip-body { text-align: left; }
.tip-label { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.tip-label span { font-weight: 700; color: var(--bs-primary); }
@media (max-width: 575.98px) { .tip { gap: .875rem; padding: 1rem; } .tip-avatar { width: 56px; height: 56px; } }

/* "One thing to do" pull-quote (components/tip): tinted card, author avatar, the moment as heading, one action */
.tip { display: flex; gap: 1.25rem; align-items: flex-start; margin-inline: 0; font-size: inherit; background: var(--bs-light); border-radius: var(--bs-border-radius-lg); padding: 1.25rem 1.5rem; }
.tip--flip { flex-direction: row-reverse; }
.tip-avatar { flex-shrink: 0; width: 80px; height: 80px; object-fit: cover; }
.tip-when { font-family: var(--bs-font-heading); font-weight: 800; font-size: 1.15rem; color: var(--bs-primary); line-height: 1.2; }
.tip-by { font-size: .9rem; }
.tip-by a { color: inherit; font-weight: 700; text-decoration: none; }
.tip-by a:hover { text-decoration: underline; }
@media (max-width: 575.98px) { .tip { gap: .875rem; padding: 1rem; } .tip-avatar { width: 56px; height: 56px; } }

/* Facts line under each procedure on a hub: label/value pairs that wrap as a row */
.facts-line { display: flex; flex-wrap: wrap; gap: .35rem 1.75rem; font-size: 1rem; margin-top: .6rem; }
.facts-line div { display: flex; gap: .35rem; }
.facts-line dt { font-weight: 600; }
.facts-line dt::after { content: ":"; }
.facts-line dd { margin: 0; }

/* Process steps (components/steps): one tinted panel, rail inside it, numbered dots on the heading lines */
.steps { list-style: none; margin: 0; padding: 1.5rem 1.5rem 1.5rem 1.25rem; background: var(--bs-light); border-radius: var(--bs-border-radius-lg); position: relative; }
.steps::before { content: ""; position: absolute; left: calc(1.25rem + 1rem - 1px); top: 2.5rem; bottom: 2.5rem; width: 2px; background: rgba(var(--bs-primary-rgb), .3); }
.steps li { position: relative; display: flex; gap: 1rem; padding-bottom: 1.5rem; }
.steps li:last-child { padding-bottom: 0; }
.steps-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bs-primary); color: var(--site-on-primary); font-weight: 700; flex-shrink: 0; margin-top: -.15rem; }
.steps h3 { line-height: 1.7rem; }
.steps-dur { font-size: .9rem; color: var(--bs-primary); font-weight: 600; }
@media (max-width: 575.98px) { .steps { padding: 1.25rem 1rem 1.25rem .9rem; } .steps::before { left: calc(.9rem + 1rem - 1px); } }

/* ---- Table of contents (components/toc): sticky in the sidebar on lg+, inline above the
   first section on phones. The sidebar column is stretched to the article's height by the
   row, so .sidebar-inner must fill it for the sticky child to have room to travel. ---- */
.sidebar-inner { height: 100%; }
.toc-sticky { position: sticky; top: calc(8rem + var(--site-subnav-h, 0rem)); /* nav (.sticky-top) plus clear air below the border */ max-height: calc(100vh - 9rem - var(--site-subnav-h, 0rem)); overflow-y: auto; }
.toc-label { font-family: var(--bs-font-heading); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-primary); margin-bottom: .5rem; }
.toc-list { list-style: none; margin: 0; padding: 0; font-size: 1rem; line-height: 1.45; border-left: 2px solid var(--bs-border-color); }
.toc-list a { display: block; padding: .3rem 0 .3rem .9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--bs-body-color); text-decoration: none; }
.toc-list a:hover, .toc-list a:focus-visible { color: var(--bs-primary); border-left-color: var(--bs-primary); }
.toc-list a.is-active { color: var(--bs-primary); border-left-color: var(--bs-primary); font-weight: 600; }
/* Sidebar page list (components/page-list): stacked outlined buttons; the current page is filled */
.page-list a {
  display: block; padding: .5rem 1rem; border: 2px solid var(--bs-primary); border-radius: var(--bs-border-radius);
  color: var(--bs-primary); font-weight: 600; text-decoration: none;
  transition: color var(--site-hover), background-color var(--site-hover);
}
.page-list a:hover, .page-list a:focus-visible { background-color: rgba(var(--bs-primary-rgb), .1); }
.page-list a.is-active { background-color: var(--bs-primary); color: var(--site-on-primary); }
/* Mobile: a closed panel that opens to a plain list; chevron on the summary flips when open */
.toc-collapsible summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.toc-collapsible summary::-webkit-details-marker { display: none; }
.toc-collapsible summary::after { content: ""; width: .5em; height: .5em; margin-top: -.25em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--site-hover); margin-right: .2em; }
.toc-collapsible[open] summary::after { transform: rotate(-135deg); margin-top: .25em; }
.toc-collapsible .toc-list { border-left: 0; }
.toc-collapsible .toc-list a { padding-left: 0; margin-left: 0; border-left: 0; }
.toc-collapsible .toc-list a.is-active { font-weight: 400; color: var(--bs-body-color); }

/* ---- Empty ad slot (components/ad-slot) ---- */
.ad-slot-empty { max-width: 100%; letter-spacing: 2px; text-transform: uppercase; }

/* Jump links land below the sticky nav, not underneath it */
html { scroll-behavior: smooth; }
section[id], h2[id], h3[id], [id^="at-a-glance"] { scroll-margin-top: calc(7rem + var(--site-subnav-h, 0rem)); }
@media (max-width: 991.98px) { section[id], h2[id], h3[id] { scroll-margin-top: calc(5.5rem + var(--site-subnav-h, 0rem)); } }

/* Source list at the foot of an article: citation, then the claim it backs */
.reference-list { padding-left: 1.25rem; }
.reference-list li::marker { color: var(--bs-secondary-color); }
.reference-supports { color: var(--bs-secondary-color); }

/* ---- Title band (layout/title-band: listicle and provider pages) ---- */
/* The site's primary colour; everything inside reads in the on-primary colour */
.title-band { background: var(--bs-primary); color: var(--site-on-primary); }
.title-band a:not(.btn), .title-band .text-body, .title-band .breadcrumb-item, .title-band .breadcrumb-item::before { color: var(--site-on-primary) !important; }
.title-band .lead { color: rgba(var(--site-on-primary-rgb), .85); }
.title-band-cover { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--bs-border-radius-xl); box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .18); }
/* Provider page: logo tile on the band, sections on the listicle rhythm, key-facts card sticky beside the article */
.title-band-logo { left: 1rem; bottom: 1rem; }
.title-band-logo .provider-logo { box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .18); border: 0 !important; }
.provider-body > section { margin-top: 2.25rem; }
.provider-body > section:first-child { margin-top: 0; }
.provider-body > section > :last-child { margin-bottom: 0; }
.provider-facts { background: rgba(var(--bs-primary-rgb), .05); }
.provider-facts dt { font-weight: 600; }
.provider-facts dd { margin-bottom: .75rem; }
@media (min-width: 992px) { .provider-facts { position: sticky; top: calc(8rem + var(--site-subnav-h, 0rem)); } }
.title-band .btn-outline-light { --bs-btn-border-width: 2px; border-color: rgba(var(--site-on-primary-rgb), .6); }
/* Clinic directory (templates/provider-index) */
.directory-city + .directory-city { margin-top: 2.25rem; }
.directory-guides { background: rgba(var(--bs-primary-rgb), .05); }
.directory-guides .tick-list a { font-weight: 600; }
.directory-guides .tick-list .small { display: block; }
.provider-card-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.title-chip { background: rgba(var(--site-on-primary-rgb), .1); border: 1px solid rgba(var(--site-on-primary-rgb), .25); }
/* Light band (title-band 'light' => true): the site's light background with ordinary ink */
.title-band.title-band-light { background: var(--bs-light); color: var(--bs-body-color); }
.title-band.title-band-light a:not(.btn), .title-band.title-band-light .breadcrumb-item::before { color: var(--bs-primary) !important; }
.title-band.title-band-light .text-body, .title-band.title-band-light .breadcrumb-item { color: var(--bs-body-color) !important; }
.title-band.title-band-light .lead { color: var(--bs-secondary-color); }
.title-band.title-band-light .title-chip { background: rgba(var(--bs-primary-rgb), .08); border-color: rgba(var(--bs-primary-rgb), .25); }
/* Section rhythm: every top-level section starts the site's standard 2.25rem (the 4-5 step) after
   whatever came before, and nothing inside a section adds trailing space on top of it */
.listicle-body > section { margin-top: 2.25rem; }
.listicle-body > section > :last-child, .rank-list > .rank-entry:last-child { margin-bottom: 0 !important; }
/* Ranked entry: rank tab, plain header (logo, name, area, CTA), blurb, ticked highlights, surgeon,
   checked date in the header line; no footer, so the card reads calm. */
.rank-list > .rank-entry { margin-bottom: 2.5rem; border: 1px solid rgba(var(--bs-primary-rgb), .14); border-radius: var(--bs-border-radius-xl); box-shadow: 0 .25rem 1.25rem rgba(var(--bs-primary-rgb), .06); scroll-margin-top: calc(9rem + var(--site-subnav-h, 0rem)); }  /* clears the sticky nav plus the tab above the card on phones */
.rank-list > .rank-entry:not(:first-child) { margin-top: 3.75rem; }  /* room for the tab above it */
/* Rank tab: sits on the card's top edge, so cards line up with the heading and text above them.
   From xxl there is room in the page margin, so it moves out to the card's left edge instead. */
.rank-tab { position: absolute; z-index: 1; display: grid; place-items: center; top: -2rem; left: 1rem; width: 3rem; height: 2rem; border-radius: .6rem .6rem 0 0; background: var(--bs-primary); color: var(--site-on-primary); font: 800 1.1rem/1 var(--bs-font-heading, inherit); }
.rank-list > .rank-entry:first-child { margin-top: 3rem; }  /* the 2rem tab plus a 1rem gap under the heading */
@media (min-width: 1400px) {
  .rank-list > .rank-entry:first-child { margin-top: 1.25rem; }
  .rank-list > .rank-entry:not(:first-child) { margin-top: 0; }
  .rank-tab { top: 1.5rem; left: -3rem; height: 3.5rem; border-radius: .8rem 0 0 .8rem; font-size: 1.5rem; }
}
/* Number 1: primary outline and a "Top pick" label in the primary tint, so it follows any site's palette */
.rank-list > .rank-entry-top { border: 2px solid var(--bs-primary); box-shadow: 0 .5rem 2rem rgba(var(--bs-primary-rgb), .14); }
.rank-top-label { display: inline-block; padding: .15rem .6rem; border-radius: 50rem; background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); font: 700 .7rem/1.4 var(--bs-font-heading, inherit); letter-spacing: .06em; text-transform: uppercase; }
@media (min-width: 1400px) { .rank-entry-top .rank-tab { left: calc(-3rem - 2px); } }
.rank-entry-visual { width: 56px; }
@media (max-width: 575.98px) { .rank-entry-visual .initials { font-size: 1.2rem !important; } }
@media (min-width: 576px) { .rank-entry-visual { width: 80px; } }
.rank-entry-visual .provider-logo { width: 100% !important; }
.rank-entry-area { color: var(--bs-secondary-color); line-height: 1.35; }
.rank-entry-name { margin-top: 0; font-size: calc(1.25rem + .5vw); line-height: 1.15; }
@media (min-width: 1200px) { .rank-entry-name { font-size: 1.75rem; } }
.rank-entry-name a { transition: color var(--site-hover); }
.rank-entry-name a:hover, .rank-entry-name a:focus-visible { color: var(--bs-primary) !important; }
.rank-entry-blurb > :last-child { margin-bottom: 1.25rem; }
.tick-list .tick { color: var(--bs-primary); flex-shrink: 0; }
.rank-entry .card-body > :last-child { margin-bottom: 0 !important; }
/* Secondary CTA: .btn-info's soft primary tint at normal button size */
.rank-entry .btn-info { --bs-btn-font-size: var(--bs-body-font-size); --bs-btn-padding-x: 18px; --bs-btn-padding-y: 11px; letter-spacing: 2px; text-transform: uppercase; }
/* Surgeon card (components/surgeon-card): round avatar or initials, name, role */
.surgeon-card { background: rgba(var(--bs-primary-rgb), .04); }
.surgeon-avatar { box-shadow: 0 0 0 3px var(--bs-body-bg), 0 0 0 5px rgba(var(--bs-primary-rgb), .25); }
.surgeon-name { font-family: var(--bs-font-heading); font-weight: 700; line-height: 1.25; }
/* Numbered steps after the list (HowTo): a primary number disc beside each step */
.min-w-0 { min-width: 0; }
/* Search results (components/search-box): a lighter, tighter highlighter so a phrase reads as one stroke */
.site-search mark { --site-mark-strength: .5; padding: .05em .1em; margin: 0; }
