/* ==========================================================================
   Prestige — shared theme chrome.

   Ported from the Header.dc.html / Footer.dc.html helmets. Inline styles from
   the reference became classes here so they can be re-laid-out at breakpoints.
   Selectors are scoped to [data-pr] / footer so nothing leaks into page CSS.

   Never hard-code a shared value — everything comes from prestige-tokens.css.
   ========================================================================== */

/* ---------------------------------------------------------------------------
 * Jump-link clearance.
 *
 * The header is `position: fixed` from the first frame, so a browser scrolling
 * to #services puts the target at y=0 — underneath the header, with the
 * section's own heading hidden behind it.
 *
 * scroll-margin-top is the fix rather than a JS scroll handler: the browser
 * applies it to every way a target is reached — a clicked link, a pasted URL
 * with a fragment, the back button, and keyboard focus — which a click handler
 * cannot cover.
 *
 * Uses the COMPACT height: by the time the page has scrolled to an anchor the
 * header has already shrunk, so offsetting by the resting height would leave a
 * visible gap above the target. It falls back to the resting height, then to a
 * constant, so this is correct before site.js has published anything — which
 * matters, because --pr-header-height-compact is only written once the user
 * has actually scrolled.
 *
 * Applied to any element carrying an id, not just `section`: #contact is a
 * div, and a target that does not clear the header is the same bug whatever
 * its tag. Form CONTROLS are excluded — they get a smaller offset below, since
 * a field scrolled to by validation should sit just clear of the header rather
 * than a third of the way down the viewport.
 * ------------------------------------------------------------------------- */
[id]:not(input):not(select):not(textarea):not(button) {
  /* The compact header is 79px, and the offset is deliberately a little LESS
     than that. Every anchor target is a section carrying 56–272px of its own
     top padding, so the heading still sits well clear of the header — the
     scroll margin only has to stop the section's top EDGE hiding behind it,
     not reserve a second gap on top of the one the design already has.

     The fallback is a CONSTANT, deliberately not --pr-header-height: that
     value folds in the announcement bar and measures 196–283px, so falling
     back to it put jump links ~250px too low. site.js now publishes the
     compact height on load, so the fallback only covers the frames before
     script runs. */
  /* scroll-margin-top: calc(
    var(--pr-header-height-compact, 79px) - 14px
  ); */
  scroll-margin-top: calc(
    var(--pr-header-height-compact, 79px) + 20px
  );
}

/* A field jumped to by form validation. Same clearance, no extra breathing
   room, so the error message above it stays on screen. */
input[id],
select[id],
textarea[id] {
  scroll-margin-top: calc(
    var(--pr-header-height-compact, 79px) + 16px
  );
}

/* Component display values outrank the UA rule for [hidden]. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  /* The source sets this inline on .pr-page. Without it every element that
     does not name its own family falls back to the browser serif — the
     breadcrumbs and the blog banner lede were rendering in Times. */
  font-family: var(--font-body);
  color: var(--ink);
}

h1, h2, h3, h4, p { margin: 0; }

/* Anchor reset.
 *
 * Every source page carries `a { color: var(--ink); text-decoration: none }`
 * in its helmet. Without it the browser default underlines every link the
 * design does not explicitly style — 27 stray underlines on the home page
 * alone, and unstyled blue links on the blog cards.
 *
 * Written as a bare type selector (specificity 0-0-1) ON PURPOSE: it must sit
 * BELOW every component, so `.pr-cta`, `.pr-crumbs a` and the rest keep their
 * own colours and underlines. A page-scoped version of this reset using an id
 * (`#pr-main a`) is what turned the blog breadcrumbs black — never raise its
 * specificity to make it "win". Links inside .pr-prose are editor-authored and
 * are styled by prestige-components.css, which scores higher and still wins. */
a {
  color: var(--ink);
  text-decoration: none;
}
a:hover { color: var(--muted); }

#pr-main { display: block; }

/* Skip link — visible only on focus. */
.pr-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
}
.pr-skip:focus {
  left: 0;
}

/* ==========================================================================
   Announcement bar

   In normal flow, above the fixed header, and deliberately NOT sticky: it
   scrolls away with the page while the header stays. That is the whole reason
   it is not `position: fixed` alongside the header — see inc/announcement.php.

   Both the bar and the header are fixed, stacked: the bar at top:0, the header
   directly below it. One value from site.js positions the header:

     --pr-announcement-height   the bar's own height, measured, never guessed —
                                it wraps to two or three lines on a phone

   The bar therefore does NOT scroll away; it stays until dismissed. That is
   deliberate. It used to sit in flow and scroll off, with a scroll handler
   rewriting the header's `top` every frame to follow it — which forced layout
   and paint per frame and, with the logo's 27px drop-shadow in the repaint
   region, visibly dropped the header's frame rate on iOS. The height changes
   only when the bar is measured, so nothing is written during a scroll.

   Falling back to 0px means a page with no bar, or with JS not yet run, is
   byte-identical to how it rendered before the bar existed.
   ========================================================================== */
[data-pr="announce"] {
  /* In normal flow, ABOVE the wrapper that holds the rest of the site, so it
     pushes the whole page down and scrolls away with it. Nothing positions
     against it: the header below is sticky and the browser pins that by
     itself once the bar has scrolled past. */
  position: relative;
  z-index: 41; /* above [data-pr="root"] at 40, so the close button is clickable */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 24px);
  min-height: 44px; /* the hit-area floor; the close button fills it */
  padding: 10px clamp(20px, 4.27vw, 82px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  /*
   * Close the sub-pixel seam under the bar.
   *
   * The bar's height is whatever its copy makes it — commonly fractional
   * (63.5px for two lines at 390px). The header below is transparent at rest,
   * so at a phone's 3x device pixel ratio the bar's rounded bottom edge let the
   * WHITE page background show through as a 1-3px line. Reported on iPhone;
   * invisible at 1x, which is why the desktop sweep never caught it.
   *
   * Pulling the page UP over that edge is what actually closes it. A shadow or
   * a border only repaints against the same fractional boundary, so the seam
   * reappears on whichever side the rounding falls — it moves the problem
   * rather than removing it. There is no new edge here: the content below
   * simply starts 2px higher and covers the rounding.
   *
   * NOTE: getBoundingClientRect() does NOT include this margin, so the bar
   * measures taller than the space it occupies. initHeaderHeight() in site.js
   * reads --pr-announcement-overlap back off the element and subtracts it when
   * folding the bar into --pr-header-height, so the two cannot drift: change
   * the token and both sides follow.
   */
  --pr-announcement-overlap: 2px;
  margin-bottom: calc(-1 * var(--pr-announcement-overlap));
}

[data-pr="announce"][hidden] { display: none; }

[data-pr="announce-text"] {
  flex: 0 1 auto;
  min-width: 0; /* lets long copy wrap instead of forcing the bar wider */
  text-align: center;
  /* The close button is out of flow, so nothing else reserves room for it.
     Copy long enough to reach the right edge would run underneath it. */
  padding-right: 44px;
  padding-left: 44px;
}

/* The close button.
   44px square is the hit-area floor from the accessibility rules, held by
   min-width/min-height rather than padding so the icon can stay small.

   It is taken OUT OF FLOW rather than pulled back with a negative margin. As a
   flex item it still occupied 44px plus the gap, so the text was centred in
   what was left and sat 16px left of the bar's true centre — measured, not
   guessed. Absolute positioning means the message centres against the full bar
   width and the button floats over the right gutter. */
[data-pr="announce-close"] {
  position: absolute;
  right: clamp(8px, 1vw, 16px);
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  cursor: pointer;
  opacity: .72;
  transition: opacity .22s ease;
}
[data-pr="announce-close"]:hover,
[data-pr="announce-close"]:focus-visible { opacity: 1; }
[data-pr="announce-close"] svg { width: 18px; height: 18px; }

/* The bar is a dark ground, so the focus ring has to be the light one. The
   page root's own ring is dark and vanishes here. */
[data-pr="announce"] :focus-visible { outline-color: var(--paper); }

@media (max-width: 575px) {
  /* At phone width the side gutter is already at its 20px floor, so pulling
     the button into it would hang it off the edge. Sit it inside instead. */
  [data-pr="announce"] { padding-left: 16px; padding-right: 8px; }
  /* Less symmetric padding at phone width: the bar's own gutter is already at
     its floor, so the text only needs to clear the button on the right. */
  [data-pr="announce-text"] { padding-left: 0; padding-right: 36px; }
}

/* ==========================================================================
   Header
   ========================================================================== */

/* The mount wraps the header, main and the footer — opened in header.php,
   closed in footer.php — and is the sticky header's containing block. A sticky
   element unsticks the moment its parent's box ends, so this must span the
   scrollable page; it used to be a zero-height anchor beside a fixed header.

   Deliberately NOT given position, transform, overflow or contain: each of
   those would either clip the sticky header or make this the containing block
   for the drawer's position:fixed, which expects the viewport. z-index alone
   is safe — it needs `position` to take effect, and that is exactly what must
   not be set here, so the stacking is left to the header and bar themselves. */
[data-pr="mount"] {
  width: 100%;
}

/*
 * Header chrome links: white, no underline.
 *
 * Scoped to [data-pr="root"] (the header) and [data-pr="panel"] (the mobile
 * drawer), NOT to [data-pr="mount"] — that wrapper opens in header.php and
 * closes in footer.php, so it contains <main> and every CTA on the page. As
 * `[data-pr="mount"] a` this rule was 0-1-1 against .pr-cta's 0-1-0 and stripped
 * the underline off every call to action on the site.
 */
[data-pr="root"] a,
[data-pr="panel"] a {
  color: #ffffff;
  text-decoration: none;
  transition: color .22s ease, text-decoration-color .22s ease, opacity .22s ease;
}
[data-pr="root"] a:hover,
[data-pr="panel"] a:hover { color: #d9d9d9; }

/* How far every page's first section pads to clear the header. CHOSEN, not
   measured (BugHerd #162): a measured value is 0px until site.js runs, so the
   hero loaded in and jumped. The first clamp tracks the resting band (logo
   22.5vw at 432/243, plus the top bar), measured 111px at 390 → 300px at 1920;
   the second is breathing room between the logo and the hero copy. */
:root {
  --pr-header-height: calc(clamp(111px, 57px + 12.66vw, 300px) + clamp(24px, 2.5vw, 48px));
}
@media (max-width: 767px) {
  /* No top bar on phones: the band is the logo alone. */
  :root {
    --pr-header-height: calc(max(111px, 27px + 12.66vw) + 24px);
  }
}

/* FIXED FROM THE FIRST FRAME.
   Do not switch this to `relative` and back on scroll: taking the header out
   of flow mid-scroll reflows everything below it by the header's own height,
   which reads as a white flash where the page ground shows through. Only
   paint and size change on scroll — never `position`. */
[data-pr="root"] {
  /* STICKY, not fixed. Its containing block is [data-pr="mount"], which wraps
     main and the footer — a sticky element unsticks the moment its parent's
     box ends, so that wrapper is load-bearing. See header.php. */
  position: sticky;
  /* Pinned to the top of the viewport by the browser, once the announcement
     bar above has scrolled past. A plain constant: sticky needs no measurement
     and nothing is written here during a scroll.

     This replaced a fixed header whose `top` was rewritten from a scroll
     handler on every frame to follow the bar. That forced layout and paint
     each frame and, with the logo's 27px drop-shadow in the repaint region,
     visibly dropped the frame rate on iOS. Do not reintroduce a scroll-driven
     `top`: sticky already does this, on the compositor, for free. */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 40;
  /* The header occupies flow space now that it is sticky, but every page still
     pads its first section by --pr-header-height to sit UNDER the header (the
     transparent-over-hero treatment). Without this that space is counted
     twice. Pulling the header's own height back off the flow keeps the page
     laid out exactly as it was beside a fixed header, while the sticky box
     itself is unaffected — sticky is positioned from its pre-margin box.

     ZERO, and constant. Not a margin sized to the header: `box height +
     any constant` still varies with the box, and the box is what changes.

     The header shrinks ~33px on a phone and ~160px on desktop when it
     compacts. While that reached the flow, the document shortened by the same
     amount mid-transition, which moved window.scrollY, which fed straight back
     into the handler deciding whether to compact — the header pumped between
     its two sizes. A measurement cannot fix it either: the collapse is a
     280ms CSS transition and the feedback happens during it, before any
     height can be read.

     `position: fixed` never had this problem because it was out of flow.
     Sticky is in flow, so the height is removed from the flow instead: the
     visible band lives in [data-pr="bar"] inside, which is absolutely
     positioned and therefore contributes nothing. The header keeps sticking
     because sticky resolves `top` against the viewport, not against its own
     height. */
  height: 0;
  font-family: var(--font-body);
  color: #ffffff;
  /* NO background or box-shadow here: this element is height:0, so anything
     painted on it has no box to fill. The ground lives on [data-pr="bar"]
     below, which is the element that actually has height. */
}

/* The header's visible band.

   Absolutely positioned so it contributes NOTHING to the flow — see
   [data-pr="root"] { height: 0 } above for why that is load-bearing. Its
   parent is the sticky header, so it travels with it.

   The scrim and the drawer stay OUTSIDE this element: they are position:fixed
   and expect the viewport, and an absolutely positioned ancestor would become
   their containing block. */
[data-pr="bar"] {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* The header's visible ground. It lives here rather than on
     [data-pr="root"] because that element is height:0 — see above. Transparent
     over the hero; the scrolled state fades in a solid ground. */
  background: transparent;
  transition: background .28s ease, box-shadow .28s ease;
}

[data-pr="topbar"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 30px;
  padding: 13px clamp(20px, 4.27vw, 82px) 0;
  overflow: hidden;
  transition: height .28s ease, padding-top .28s ease, opacity .2s ease;
}

[data-pr="topphone"] {
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 0.01em;
  color: #ffffff;
  white-space: nowrap;
}

[data-pr="socialrow"] {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 21px;
}
[data-pr="socialrow"] a { display: flex; align-items: center; opacity: 1; }

[data-pr="navrow"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  padding: 27px clamp(20px, 4.27vw, 82px) 0;
  transition: padding .28s ease;
}

[data-pr="side"] {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 2.4vw, 46px);
  min-width: 0;
}
[data-pr="side"][data-pr-align="end"] { justify-content: flex-end; }

/* Burger — hidden above 1200, 48px hit area (44px floor). */
[data-pr="mbtn"] {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  align-self: center;
}
[data-pr="burger"] {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 28px;
}
[data-pr="burger"] span {
  display: block;
  height: 2px;
  background: #ffffff;
}

[data-pr="dnav"] {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 46px);
  flex: 1 1 0;
  min-width: 0;
  padding-top: clamp(6px, 2.08vw, 40px);
  transition: padding .28s ease;
}
[data-pr="side"][data-pr-align="end"] [data-pr="dnav"] { justify-content: flex-end; }

[data-pr="navitem"] {
  position: relative;
  flex: 0 0 auto;
}
[data-pr="navitem"] > a {
  display: inline-block;
  font-size: clamp(14px, 1.04vw, 20px);
  line-height: 30px;
  color: #ffffff;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  text-decoration-color: transparent;
}
[data-pr="navitem"] > a:hover { text-decoration-color: #ffffff; }

/* Desktop dropdown. */
[data-pr="navitem"] [data-pr="dd"] {
  position: absolute;
  top: 100%;
  min-width: 264px;
  padding: 14px 0;
  background: #000000;
  box-shadow: 0px 4px 27px 0px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
[data-pr="dd"][data-pr-side="left"] { left: -20px; }
[data-pr="dd"][data-pr-side="right"] { right: -20px; }

[data-pr="navitem"]:hover [data-pr="dd"],
[data-pr="navitem"]:focus-within [data-pr="dd"],
[data-pr="navitem"][data-open="1"] [data-pr="dd"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

[data-pr="dd"] a {
  display: block;
  padding: 9px 24px;
  font-size: 18px;
  line-height: 24px;
  color: #ffffff;
  white-space: nowrap;
}
[data-pr="dd"] a:hover { background: #ffffff; color: #000000; }

/* --- Third tier: a flyout beside its parent row ---------------------------
   Nesting a third level inside the dropdown would push it off the bottom of
   the viewport, so it opens sideways instead. */
[data-pr="dditem"] { position: relative; }
[data-pr="dditem"] > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
[data-pr="ddchev"] {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

[data-pr="ddsub"] {
  position: absolute;
  top: -14px;
  min-width: 240px;
  padding: 14px 0;
  background: #000000;
  box-shadow: 0px 4px 27px 0px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
[data-pr="ddsub"][data-pr-side="left"]  { left: 100%; }
[data-pr="ddsub"][data-pr-side="right"] { right: 100%; transform: translateX(-6px); }

[data-pr="dditem"]:hover > [data-pr="ddsub"],
[data-pr="dditem"]:focus-within > [data-pr="ddsub"],
[data-pr="dditem"][data-open="1"] > [data-pr="ddsub"] {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

[data-pr="root"] [data-pr="logo"],
[data-pr="logo"] {
  display: block;
  width: clamp(150px, 22.5vw, 432px);
  aspect-ratio: 432 / 243;
  /* `width` must be named alongside the inherited colour/opacity transitions:
     `.pr-page a` in prestige-components.css sets its own transition list, and
     a bare `transition: width` here is REPLACED by it rather than merged — the
     logo then snapped 432px to 120px in a single frame. */
  transition:
    width .28s ease,
    color .22s ease,
    text-decoration-color .22s ease,
    opacity .22s ease;
}
[data-pr="logo"] img {
  display: block;
  /* The drop-shadow is removed in the scrolled state; fade it out over the
     same duration so it does not blink off a frame into the resize. */
  transition: filter .28s ease;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0px 0px 27px rgba(0, 0, 0, 0.49));
}

[data-pr="mphone"] {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 30px;
  letter-spacing: 0.01em;
  color: #ffffff;
  white-space: nowrap;
  flex: 0 0 auto;
  align-self: center;
}

/* The icon only appears at the narrow breakpoint; the number is the default. */
[data-pr="mphone-icon"] { display: none; width: 22px; height: 22px; }

/* Scrolled (compact) state.
   Paint and size only — `position` is already fixed, so nothing reflows. */
[data-pr="mount"][data-scrolled="1"] [data-pr="bar"] {
  background: #000000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

/*
 * A solid ground behind the header on the pages that have no hero.
 *
 * The header is transparent at rest and only fades to black once scrolled,
 * which works everywhere it opens over a dark hero photo. The reference pages
 * and the default page template open on a light background instead, so at the
 * top of the page the white logo and nav sat on near-white with nothing behind
 * them — legible only after scrolling.
 *
 * Scoped with a body class, NOT applied globally: making the header solid
 * everywhere would remove the transparent-over-hero treatment the homepage and
 * every bannered page are designed around. The class is set in
 * prestige_body_class() — a class rather than :has() so this does not depend on
 * selector support, which is the trap that made the Safari cursor bug so hard
 * to see.
 */
.pr-solid-header [data-pr="bar"] {
  background: #000000;
}

/* The header band is shorter than --pr-header-height, which also covers the
   announcement bar and the space the fixed header reserves. Without this the
   page's own background paints that difference and leaves a pale strip under
   the black band. */
.pr-solid-header [data-i="page"] {
  background-image: linear-gradient(#000000, #000000);
  background-repeat: no-repeat;
  background-size: 100% var(--pr-header-height, 0px);
  background-position: top left;
}

/* The logo's drop-shadow exists to lift it off photography. On the solid band
   it just muddies the mark, so drop it — the same thing the scrolled state
   does for the same reason. */
.pr-solid-header [data-pr="logo"] img {
  filter: none;
}
[data-pr="mount"][data-scrolled="1"] [data-pr="topbar"] {
  /* Collapsed by height, not display:none — a display swap cannot transition
     and snaps the header's height in one frame. */
  height: 0;
  padding-top: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
[data-pr="mount"][data-scrolled="1"] [data-pr="navrow"] {
  padding-top: 14px;
  padding-bottom: 14px;
  align-items: center;
}
[data-pr="mount"][data-scrolled="1"] [data-pr="logo"] { width: clamp(90px, 6.25vw, 120px); }
[data-pr="mount"][data-scrolled="1"] [data-pr="logo"] img { filter: none; }
[data-pr="mount"][data-scrolled="1"] [data-pr="dnav"] { padding-top: 0; }

/* Mobile drawer. */
[data-pr="scrim"] {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s;
}
[data-pr="mount"][data-open="1"] [data-pr="scrim"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

[data-pr="panel"] {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #000000;
  color: #ffffff;
  font-family: var(--font-body);
  transform: translateY(-104%);
  opacity: 0;
  visibility: hidden;
  transition: transform .32s cubic-bezier(.22, .61, .36, 1), opacity .25s ease, visibility .25s;
  padding-top: env(safe-area-inset-top, 0px);
}
[data-pr="mount"][data-open="1"] [data-pr="panel"] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

[data-pr="panelhead"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
[data-pr="panelhead"] a {
  font-size: 18px;
  line-height: 30px;
  letter-spacing: 0.01em;
  color: #ffffff;
}
[data-pr="mclose"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  font-family: var(--font-body);
}

[data-pr="mnav"] {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0 32px;
}
[data-pr="mitem"] {
  display: flex;
  flex-direction: column;
  /* Divides one menu entry from the next. */
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/*
 * No rule under the last entry — a divider with nothing below it reads as a
 * cut-off list rather than a separation.
 *
 * :last-child, not :last-of-type: the items are all divs, and a sibling that
 * is not a menu entry would make :last-of-type pick the wrong one. Applied at
 * every level, so the bottom of an open sub-menu is clean too.
 */
[data-pr="mitem"]:last-child {
  border-bottom: 0;
}
[data-pr="mrow"] {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
}
[data-pr="mrow"] > a {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 24px;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 32px;
  color: #ffffff;
}
[data-pr="mtoggle"] {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-height: 56px;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  color: #ffffff;
}
[data-pr="chevron"] {
  display: block;
  width: 11px;
  height: 11px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .22s ease;
}
[data-pr="mtoggle"][aria-expanded="true"] [data-pr="chevron"] {
  transform: rotate(-135deg) translateY(2px);
}

[data-pr="msub"] {
  display: flex;
  flex-direction: column;
  padding: 4px 0 14px;
  background: rgba(255, 255, 255, 0.06);
}
[data-pr="msub"] a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px 0 40px;
  font-size: 18px;
  line-height: 24px;
  color: #ffffff;
}

/* A third tier inside the drawer indents again and dims slightly, so depth is
   readable without a second interaction pattern. */
[data-pr="msub"] [data-pr="msub"] {
  background: rgba(255, 255, 255, 0.05);
  padding-top: 0;
  padding-bottom: 8px;
}
/* Indent by depth. The rows inside a nested panel are wrapped in
   [data-pr="mrow"], so target those directly — a bare descendant `a` also
   matched the tier-two rows and every level came out at the same 40px. */
[data-pr="msub"] [data-pr="msub"] [data-pr="mrow"] > a,
[data-pr="msub"] [data-pr="msub"] > a {
  padding-left: 60px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.86);
}
/* The nested toggle keeps the parent's 64px. It was 56px, so the two chevron
   columns did not line up down the drawer — the child sat 8px narrower than
   the row above it. The indent on a submenu comes from its label padding,
   not from shaving the control. */
[data-pr="msub"] [data-pr="mtoggle"] { width: 64px; }

[data-pr="panelsocial"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 22px 24px calc(30px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
[data-pr="panelsocial"] a { display: flex; }

/* Social icons turn the accent red on hover, in the header, the mobile panel
   and the footer (BugHerd #85). The artwork is drawn with fixed white shapes
   and black cut-outs, so only the white shapes change; a Font Awesome mark
   takes the colour directly. */
[data-pr="socialrow"] a path[fill="#ffffff"],
[data-pr="panelsocial"] a path[fill="#ffffff"],
[data-prf="social"] a path[fill="#ffffff"] { transition: fill .25s ease; }
[data-pr="socialrow"] a:is(:hover, :focus-visible) path[fill="#ffffff"],
[data-pr="panelsocial"] a:is(:hover, :focus-visible) path[fill="#ffffff"],
[data-prf="social"] a:is(:hover, :focus-visible) path[fill="#ffffff"] { fill: var(--accent); }
[data-pr="socialrow"] a:is(:hover, :focus-visible) .pr-social-fa,
[data-pr="panelsocial"] a:is(:hover, :focus-visible) .pr-social-fa,
[data-prf="social"] a:is(:hover, :focus-visible) .pr-social-fa { color: var(--accent); }

@media (max-width: 1199px) {
  [data-pr="dnav"] { display: none !important; }
  [data-pr="mbtn"] { display: inline-flex !important; }
}

@media (max-width: 767px) {
  [data-pr="topbar"] { display: none !important; }
  [data-pr="mphone"] { display: flex !important; }
}

/* Below 460px the digits crowd the logo, so the link becomes a phone icon.
   The number stays in the DOM for assistive tech — it is the link's accessible
   name — and the tap target grows to the 44px floor. */
@media (max-width: 460px) {
  [data-pr="mphone-num"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  [data-pr="mphone-icon"] { display: block; }
  [data-pr="mphone"] {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer[data-prf="root"] {
  width: 100%;
  background:
    linear-gradient(rgba(0, 0, 0, 0.90), rgba(0, 0, 0, 0.90)),
    var(--pr-footer-photo) center / cover no-repeat,
    #000000;
  color: #ffffff;
  font-family: var(--font-body);
  /* Clears the CTA card that straddles the edge. site.js measures the card and
     publishes --pr-cta-overhang; the clamp() keeps this right before JS runs
     and on pages with no card. The floor is about 40% under the 235px it
     was, which left a tall empty band above the badges (BugHerd #108). */
  padding-top: max(clamp(48px, 7.3vw, 140px), calc(var(--pr-cta-overhang, 0px) + 96px));
  padding-right: clamp(20px, 11.04vw, 212px);
  /* Much shallower than it was (48–126px): with the colophon centred and its
     rule gone, that depth left the credit floating in empty space. */
  padding-bottom: clamp(24px, 2.2vw, 42px);
  padding-left: clamp(20px, 11.04vw, 212px);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5.94vw, 114px);
}

footer[data-prf="root"] a {
  color: #ffffff;
  text-decoration: none;
  transition: color .22s ease, text-decoration-color .22s ease, opacity .22s ease;
}
footer[data-prf="root"] a:hover { color: #d9d9d9; }

[data-prf="brandrow"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(32px, 4vw, 64px);
}

[data-prf="brandcol"] {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 1.67vw, 32px);
}
[data-prf="brandcol"][data-prf-main="1"] {
  flex: 0 1 auto;
  min-width: 0;
  gap: clamp(24px, 2.3vw, 44px);
}

/*
 * Accreditation marks sit on a paper chip: the BBB seal is dark teal on
 * transparency (BBB serves no light variant), unreadable on the ink footer.
 * Both slots share the chip so the pair matches.
 */
[data-prf="partner"] {
  flex: 0 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(150px, 11.04vw, 212px);
  aspect-ratio: 187 / 130;
  /* Without this an aspect-ratio box grows to fit its content, so a square
     seal made its chip taller than a wide one: the pair must match at every
     size (BugHerd #144). */
  min-height: 0;
  overflow: hidden;
  padding: clamp(10px, 0.83vw, 16px);
  background: var(--paper);
  border-radius: var(--radius-sm);
  transition: transform .22s ease;
}
a[data-prf="partner"]:hover { transform: translateY(-2px); }
[data-prf="partner"] img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

[data-prf="logo"] {
  display: block;
  width: clamp(240px, 21.9vw, 421px);
  aspect-ratio: 421 / 237;
}
[data-prf="logo"] img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

[data-prf="social"] {
  display: flex;
  align-items: center;
  gap: clamp(20px, 1.46vw, 28px);
  height: 26px;
}
[data-prf="social"] a { display: flex; align-items: center; }

[data-prf="lower"] {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 2.3vw, 44px);
}
[data-prf="rule"] {
  height: 1px;
  background: #ffffff;
}
/* Centred at every width, like the colophon below it: links first, any
   accreditation badges beyond the first two in a row under them. */
[data-prf="bottom"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 3vw, 56px);
  text-align: center;
}

[data-prf="links"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.1vw, 41px);
}
[data-prf="links"] a {
  font-size: 20px;
  line-height: 30px;
  color: #ffffff;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  text-decoration-color: transparent;
}
[data-prf="links"] a:hover { text-decoration-color: #ffffff; }


/* ---------------------------------------------------------------------------
 * Colophon — the copyright line and the WST company credit.
 *
 * A row of its own below [data-prf="lower"]: these are ownership credits, not
 * navigation, and the company credit used to sit in the footer nav where it
 * read as one more footer link.
 * ------------------------------------------------------------------------- */
/* Copyright and the company credit read as one line, centred.
   They were pushed to opposite edges by space-between under a full-width rule,
   which on a wide screen left two fragments with a gulf between them. */
[data-prf="colophon"] {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  /* The row gap only applies if the pair wraps on a narrow screen; the column
     gap is what sets them apart side by side. */
  gap: 6px clamp(10px, 1.2vw, 20px);
  text-align: center;
  margin-top: clamp(16px, 1.3vw, 26px);
  /*
   * The footer's side padding is up to 212px a side, which left this row 589px
   * wide for 878px of text — so the two lines could never sit together and
   * always wrapped. Cancelling that padding for this row only gives them the
   * full width; they still wrap on a genuinely narrow screen.
   */
  margin-inline: calc(-1 * clamp(20px, 11.04vw, 212px));
  padding-inline: 20px;
}

[data-prf="copyright"] {
  margin: 0;
  /* Smaller than the footer links above it: a colophon is a credit line, not
     something to read. Still 16px minimum, and white on the 90% black ground
     measures well past 4.5:1. */
  font-size: 16px;
  line-height: 26px;
  color: #ffffff;
}

/*
 * The WST company credit ("JLB - Nashville Web Design & SEO Services") is a
 * shortcode whose content is synced from a central API and run through
 * wpautop, so it arrives as a <p> rather than a bare <a>. Matched to the
 * copyright line beside it rather than restyled in the shortcode: that file is
 * shared across every WST site and is not this theme's to change.
 */
[data-prf="company"] p {
  margin: 0;
  font-size: 16px;
  line-height: 26px;
  color: #ffffff;
}

[data-prf="company"] a {
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: transparent;
}

[data-prf="company"] a:hover,
[data-prf="company"] a:focus-visible {
  text-decoration-color: #ffffff;
}

/*
 * No mobile override. This used to force flex-direction: column at ≤767px, but
 * the base rule is now centred and wraps on its own — so the two lines sit
 * side by side wherever they fit and break only when they genuinely cannot,
 * rather than stacking at a fixed width whether or not there is room.
 */

[data-prf="badges"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 1.56vw, 30px);
}
[data-prf="badge"] {
  display: flex;
  align-items: center;
  gap: 10px;
  width: clamp(138px, 8.8vw, 169px);
}
[data-prf="badge"] img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 991px) {
  /* The badge, logo, badge row stays one row of three on a phone, scaled down
     together (BugHerd #139), with clear space either side of the logo
     (BugHerd #144). */
  [data-prf="brandrow"] {
    --prf-logo-w: min(30vw, 280px);
    --prf-chip-w: min(17vw, 150px);
    justify-content: center;
    align-items: flex-start;
    gap: 6vw;
  }
  [data-prf="brandcol"] { gap: 16px; }
  [data-prf="partner"] {
    width: var(--prf-chip-w);
    padding: 1.6vw;
    border-radius: var(--radius-sm);
  }
  [data-prf="logo"] { width: var(--prf-logo-w); }
  /* The badges level with the middle of the logo itself, not of the logo and
     the social icons under it, which sat them low (BugHerd #139): each side
     column drops by half the difference between the two heights. */
  [data-prf="brandcol"]:not([data-prf-main="1"]) {
    margin-top: max(0px, calc((var(--prf-logo-w) * 237 / 421 - var(--prf-chip-w) * 130 / 187) / 2));
  }
  [data-prf="bottom"] { gap: 36px; }
}

/* Very narrow phones: three across is too small to read, so the two badges
   sit side by side in a row above the logo (BugHerd #144). */
@media (max-width: 339px) {
  [data-prf="brandrow"] {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 24px 16px;
  }
  [data-prf="brandcol"][data-prf-main="1"] {
    grid-column: 1 / -1;
    order: 1;
  }
  [data-prf="brandcol"]:not([data-prf-main="1"]) { margin-top: 0; }
  [data-prf="partner"] {
    width: min(38vw, 124px);
    padding: 8px;
  }
  [data-prf="logo"] { width: min(76vw, 260px); }
}

/* --------------------------------------------------------------------------
   Fallback templates (index.php, 404.php, page.php). Deliberately plain — the
   bespoke templates carry the design.
   -------------------------------------------------------------------------- */

[data-i="fallback"],
[data-i="page"] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(20px, 1.56vw, 30px);
  /*
   * The header is fixed and out of flow, so the first thing on the page sits
   * underneath it unless the padding clears it. Every other template does this
   * (see the banner rules in pages/*.css); the generic page template did not,
   * so a page with no banner — the Gravity Forms test page, for one — opened
   * with its title behind the logo.
   */
  padding: calc(var(--pr-header-height, 0px) + clamp(56px, 6.3vw, 121px))
           var(--gutter-page)
           clamp(56px, 6.3vw, 121px);
  background: var(--paper);
}

/* Content sits in the same measure as every other page rather than running the
   full window width. A Gravity Form on this template was spanning edge to edge
   while the same form on /contact/ is held to the content column. */
[data-i="page"] > * {
  width: 100%;
  max-width: var(--content-max, 1620px);
  margin-inline: auto;
}

[data-i="fallback"] article {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 991px) {
  [data-i="fallback"],
  [data-i="page"] {
    align-items: center;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Visually hidden, still reachable by screen readers and by keyboard focus.
   Used by paginate_links() output and by the blog's mobile filter submit.
   -------------------------------------------------------------------------- */

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

.screen-reader-text:focus-visible {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}

/* ---------------------------------------------------------------------------
 * Font Awesome social marks
 *
 * Networks without artwork in the design source are drawn by Font Awesome.
 * The bundled SVGs are sized per context (21px in the header bar, 26px in the
 * footer and the mobile drawer), so the glyph is matched to each rather than
 * given one size — otherwise an added network sits visibly small beside the
 * four originals. Colour is white to match the SVG fills.
 * ------------------------------------------------------------------------- */
.pr-social-fa {
  display: block;
  color: var(--paper);
  line-height: 1;
}

[data-pr="socialrow"] .pr-social-fa { font-size: 19px; }
[data-pr="panelsocial"] .pr-social-fa { font-size: 23px; }
[data-prf="social"] .pr-social-fa { font-size: 23px; }
