/*
 * 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; }

/* 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); }
.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; }

/* 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; }
}

/* 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) {
  .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; }
}

/* 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); }

/* 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; }

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

/* 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"] { 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: 8rem; /* nav (.sticky-top) plus clear air below the border */ max-height: calc(100vh - 9rem); 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; }
/* 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: 7rem; }
@media (max-width: 991.98px) { section[id], h2[id], h3[id] { scroll-margin-top: 5.5rem; } }
