/* ═══════════════════════════════════════════════════════════════════
   THAMES 2026 — Header V2 + Mega Menu + Mobile Overlay
   Ported from the Figma mockup (_mockups/thames-header-menu-build-mock.html).
   Enqueued standalone (see functions.php: thames_enqueue_header_v2) —
   independent of the legacy assets/css/sass/screen.scss pipeline.
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --navy:        #4B6079;
  --navy-dark:   #33445A;
  --steel:       #7891A4;
  --gold:        #A7754D;
  --gold-light:  #C79D74;
  --cream:       #F5F0ED;
  --white:       #ffffff;
  --font-header: 'Source Sans Pro', -apple-system, sans-serif;
  --bp-desktop:  992px;
}

/* screen.css sets `body { overflow-x: hidden; }` — body is #deskHeader's
   direct parent, and having ANY non-visible overflow on a sticky element's
   ancestor neutralizes position:sticky in browsers (it silently falls back
   to behaving like static — computed style still reports "sticky", but it
   never actually pins to the viewport as you scroll). html already has the
   same overflow-x:hidden, so it still clips horizontal overflow at the
   true document root — removing the redundant one on body is safe and
   unblocks sticky for its children. */
body { overflow-x: visible !important; }

/* screen.css also has a bare `section { padding-top: 20vw; }` — matches
   ANY <section>, including the page-content wrapper (<section class="pad">,
   opened in header.php, closed in footer.php), creating a large blank gap
   below the header. That gap compensated for the OLD theme's fixed-
   position header; our V2 header is sticky-in-flow so it's not needed.
   Do NOT strip the "pad" class or swap the tag to fix this (tried that —
   pod-global-styling.css has dozens of legitimate rules scoped to
   `section.pad` — headings, paragraphs, buttons, and critically the
   accreditation-logo badge sizing `section.pad .images img { height:50px }`
   — killing the class broke all of that). `section.pad` (element+class)
   naturally outranks the bare `section` (element-only) selector on
   specificity alone, so this alone is enough — no other section.pad
   content styling is touched. */
section.pad { padding-top: 0 !important; }

/* Root cause of the ~15px white gap under #deskNav (confirmed via injected
   getComputedStyle measurements, not guesswork): sections/global/global.css
   has a bare `.section{width:100%;clear:both;display:block;float:left}` —
   every flexible-content block from page-main.php (section.section-hero,
   section.section-usps, etc.) carries the literal class "section", so ALL
   of them are floated. The <section id="section_noN"> wrapper page-main.php
   puts around each one is a plain display:block box with overflow:visible,
   which does NOT establish a block-formatting-context — so it never
   contains its floated child and collapses to zero height (confirmed:
   section.hero measured top=234/bottom=234/height=0 while its floated
   .section.section-hero child rendered a full 720px starting at that same
   top). That collapse is what created the gap, and it happens between
   EVERY stacked section on EVERY page, not just under the nav. Fix: give
   each wrapper its own block-formatting-context so it contains the float,
   without touching the shared legacy `.section{float:left}` rule itself
   (removing that would ripple across every section-based page on the
   site). */
main#primary > section { display: flow-root !important; }

/* Legacy sections/global/global.css has a bare `a:hover { text-decoration:
   underline; }` (specificity beats our unqualified base link rules since
   it also matches during hover) that put an underline on every header/
   mega-menu/mobile-overlay link on hover, alongside its own steel color. */
.d-header a:hover, .m-header a:hover, .mob-overlay a:hover {
  text-decoration: none !important;
}

/* base.css also has a bare `a:hover, a:focus, a:active { color: #191970; }`
   (navy-blue). Our own class-based :hover rules already beat it on
   specificity for properties we declare — but several of ours never
   declared a hover color at all, so it fell straight through unopposed
   (e.g. .d-cta's white text would flip to navy-on-navy = invisible on
   hover; .mob-book-btn/.mob-phone-link the same). Likewise pod-global-
   styling.css/base.css have `button:hover { background: #5a7b99 }` and
   `button:hover, ...:hover { border-color: #ccc #bbb #aaa }` with NO
   :not() exclusions at all (unlike the base-state button resets), so
   even .mega-tab — otherwise safe via [role="tab"] — picks up a stray
   blue-grey hover background. Covering every hover/focus/active state
   explicitly here, not just the base state. */
#deskNav .d-nav-item:hover, #deskNav .d-nav-item:focus, #deskNav .d-nav-item:active,
#hamBtn:hover, #hamBtn:focus, #hamBtn:active,
#mobOverlay .mob-cat-btn:hover, #mobOverlay .mob-cat-btn:focus, #mobOverlay .mob-cat-btn:active,
button.mega-tab:hover, button.mega-tab:focus, button.mega-tab:active {
  background: none !important;
  border: none !important;
}
#mobCloseBtn:hover, #mobCloseBtn:focus, #mobCloseBtn:active {
  background: transparent !important;
  border: 1px solid rgba(75,96,121,0.3) !important;
}
.d-cta:hover, .d-cta:focus, .d-cta:active { color: var(--white) !important; }
.mob-book-btn:hover, .mob-book-btn:focus, .mob-book-btn:active { color: #fff !important; }
.mob-phone-link:hover, .mob-phone-link:focus { color: #fff !important; }
.mob-link-row:hover, .mob-link-row:focus { color: var(--gold) !important; }
.mob-sec-row:hover, .mob-sec-row:focus { color: var(--gold) !important; }

/* sections/global/global.css also has a bare `a, a:visited { color: #476179;
   text-decoration: none; font-size: 1.6rem; }` for the BASE (non-hover)
   state. Every real nav/menu link already declares its own color+font-size
   via a more specific class rule, so those are unaffected — confirmed via
   computed styles at both desktop and mobile widths (this theme's root
   font-size is set in vw units, so rem-based legacy sizing swings wildly
   by viewport; ours are all fixed px, immune either way). The one actual
   leak: .d-logo/.m-logo/.mob-hd-logo never declare a color at all (they
   only wrap an <img>, so it's invisible today) — closing it anyway so it
   doesn't show legacy blue-grey text if the logo image ever fails to load. */
.d-logo, .mob-hd-logo { color: var(--navy); }
.m-logo { color: #fff; }

/* `a:visited` (element + pseudo-class) has HIGHER specificity than a bare
   class like .d-nav-sec (element+pseudo-class beats a single class on the
   b-tier: 0,1,1 vs 0,1,0) — so once a link has actually been visited,
   `a, a:visited { color: #476179; }` wins outright over our class rules,
   regardless of any of the fixes above. Browsers deliberately hide
   :visited styling from getComputedStyle()/JS (privacy protection against
   history-sniffing), so this can't be verified via Playwright the way
   everything else has been — fixing from specificity math alone. */
.d-nav-sec:visited { color: rgba(255,255,255,0.92); }
.d-phone:visited { color: var(--navy); }
.d-cta:visited { color: var(--white); }
.mega-link:visited { color: var(--navy); }
.mob-link-row:visited { color: var(--navy); }
.mob-sec-row:visited { color: var(--navy); }
.mob-book-btn:visited { color: #fff; }
.mob-phone-link:visited { color: #fff; }
.d-logo:visited, .mob-hd-logo:visited { color: var(--navy); }
.m-logo:visited { color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   AWARD RIBBON — non-sticky, scrolls away with the page
   ═══════════════════════════════════════════════════════════════════ */
.d-ribbon {
  display: none;
  position: relative;
  background: var(--cream) url('../img/ageing-pink.jpg') repeat-x left center;
  background-size: auto 100%;
  height: 55px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-header);
  overflow: hidden;
}
@media (min-width: 992px) { .d-ribbon { display: flex; } }

/* Message stack: each row is absolutely stacked on the others and
   crossfades in/out — RibbonRotator (header-v2.js) toggles .is-active
   every few seconds. A single message just sits there, permanently active. */
.d-ribbon-text {
  position: absolute;
  left: 0; right: 0;
  padding: 0 60px;
  text-align: center;
  font-size: 16px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--gold);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.d-ribbon-text.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP HEADER — logo bar + nav bar, sticky in-flow
   ───────────────────────────────────────────────────────────────────
   #deskHeader / #deskNav / #mHeader (element+ID, not just a class) —
   the legacy `header { position:fixed; ... }` and
   `nav:not(.woocommerce-MyAccount-navigation) { position:fixed; width:65vw/
   83vw/70vw at various breakpoints; ... }` rules in screen.css and
   pod-global-styling.css style ANY <header>/<nav> on the site, including
   ours, across several min-width breakpoints (520/767/980/1011/1200px).
   Patching individual properties as they were discovered kept missing
   others (e.g. width was never patched, so it silently fell through).
   `all: revert !important` wipes every property those rules set back to
   the browser default in one pass, then we redeclare exactly what we
   want — nothing legacy can leak through regardless of which property
   or breakpoint it comes from.
   ═══════════════════════════════════════════════════════════════════ */
#deskHeader {
  all: revert !important;
  display: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 300 !important;
  width: auto !important;
  margin: 0 !important;
  transition: transform 0.3s ease !important;
  font-family: var(--font-header) !important;
}
@media (min-width: 992px) { #deskHeader { display: block !important; } }

#deskHeader.header--hidden { transform: translateY(-100%) !important; }

.d-top {
  background: var(--white);
  height: 108px;
  border-bottom: 1px solid rgba(75,96,121,0.08);
}

.d-top-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.d-logo { display: flex; align-items: center; text-decoration: none; }
.d-logo img { display: block; height: 65px; width: auto; }

.d-util { display: flex; align-items: center; gap: 24px; }

.d-phone {
  font-size: 18px; color: var(--navy); font-weight: 700; letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; transition: color 0.2s;
}
.d-phone:hover { color: var(--steel); }
.d-phone svg { flex-shrink: 0; color: var(--steel); }

.d-cta {
  background: var(--steel);
  color: var(--white);
  font-size: 16px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 24px; height: 52px; border-radius: 4px;
  border: none; display: flex; align-items: center; gap: 8px;
  white-space: nowrap; text-decoration: none;
  transition: background 0.2s;
}
.d-cta:hover { background: var(--navy); }
.d-cta svg { flex-shrink: 0; }

/* #deskNav — see the note above #deskHeader: all: revert !important wipes
   every property the legacy nav:not() rule sets (position, width, top,
   right, left, margin, max-width, padding, opacity, overflow, z-index,
   background — across 5+ breakpoints) so nothing can leak through. */
#deskNav {
  all: revert !important;
  display: block !important;
  background: var(--navy) !important;
  height: 54px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  opacity: 1 !important;
  overflow: visible !important;
  border-bottom: 1px solid rgba(255,255,255,0.15) !important;
}

.d-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.d-nav-item {
  font-size: 15px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  height: 54px; padding: 0 20px;
  display: flex; align-items: center; gap: 6px;
  border: none; background: none; cursor: pointer;
  white-space: nowrap; user-select: none;
  transition: color 0.15s;
}
.d-nav-item:hover,
.d-nav-item.is-active { color: var(--steel); }

.d-nav-sec {
  font-size: 15px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  height: 54px; padding: 0 20px;
  display: flex; align-items: center;
  text-decoration: none; transition: color 0.15s; white-space: nowrap;
}
.d-nav-sec:hover { color: var(--steel); }

.chev {
  width: 8px; height: 8px; flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.2s;
}
.d-nav-item.is-active .chev { transform: rotate(-135deg); margin-top: 3px; }

/* ═══════════════════════════════════════════════════════════════════
   MEGA MENU PANELS — cream background, tabbed (Treatments / Concerns /
   Knowledge Hubs), each tab shows 3 text columns + a photo.
   ═══════════════════════════════════════════════════════════════════ */
.mega {
  position: fixed;
  left: 0; right: 0;
  background: var(--cream);
  box-shadow: 0 20px 60px rgba(51,68,90,0.14);
  z-index: 299;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  font-family: var(--font-header);
}
.mega::-webkit-scrollbar { display: none; }
.mega.is-open { opacity: 1; transform: translateY(0); pointer-events: all; }

/* .d-top-inner/.d-nav-inner compute as box-sizing:content-box (both the
   universal `* { box-sizing: border-box }` and `*, ::before, ::after {
   box-sizing: inherit }` resets tie at zero specificity, and it resolves
   differently per ancestor chain — theirs bottoms out at the browser's
   content-box default, .mega-wrap's doesn't). That means their max-width:
   1200px + padding:0 60px renders as 1200 CONTENT + 120 padding = 1320px
   total, while .mega-wrap (border-box) rendered max-width:1200 as the
   TOTAL including padding — 120px narrower, misaligned with the header
   above it. Forcing content-box here matches the header's actual model
   so both edges line up exactly regardless of why the cascade differs. */
.mega-wrap { box-sizing: content-box; max-width: 1200px; margin: 0 auto; padding: 32px 60px 48px; }

.mega-tabs {
  display: flex; align-items: baseline; gap: 40px;
  border-bottom: 1px solid rgba(75,96,121,0.15);
  padding-bottom: 12px; margin-bottom: 32px;
}
/* base.css has an unconditional `button, input[type="button"], ... {
   border-radius: 3px; border: 1px solid ...; background: #e6e6e6;
   line-height: 1; padding: 0.6em 1em 0.4em; }` reset — no :not() exclusions
   at all. .mega-tab's own class rule already out-specifies it for
   background/border (both correctly compute as none), but border-radius,
   line-height, and padding-top/left/right were never explicitly declared
   here, so those specific properties fell through unopposed (3px rounded
   corners, extra top/side padding, squashed line-height). */
.mega-tab {
  font-size: 15px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  background: none; border: none; border-radius: 0; cursor: pointer;
  line-height: normal;
  padding: 0 0 12px; margin-bottom: -13px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.mega-tab:hover { color: var(--gold); }
.mega-tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }

.mega-tab-panel { display: none; }
.mega-tab-panel.is-active { display: block; }

.mega-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr) minmax(280px, 340px);
  gap: 40px;
}

.mega-col { display: flex; flex-direction: column; }

.mega-link {
  font-size: 15px; color: var(--navy); font-weight: 400;
  line-height: 1; padding: 10px 0;
  text-decoration: none; transition: color 0.15s, padding-left 0.15s;
}
.mega-link:hover { color: var(--gold); padding-left: 4px; }

.mega-photo {
  width: 100%; height: 220px; max-height: 220px;
  align-self: start;
  border-radius: 4px; overflow: hidden;
}
.mega-photo img { width: 100%; height: 100%; object-fit: cover; }
.mega-photo--placeholder { background: rgba(120,145,164,0.25); }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE HEADER BAR
   ═══════════════════════════════════════════════════════════════════ */
/* #mHeader — same all:revert treatment as #deskHeader, since this is
   also a bare <header> element hit by the legacy header{} rules. */
#mHeader {
  all: revert !important;
  display: block !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 300 !important;
  width: auto !important;
  margin: 0 !important;
  background: var(--navy) !important;
  border-bottom: 1px solid rgba(255,255,255,0.15) !important;
  font-family: var(--font-header) !important;
}
@media (min-width: 992px) { #mHeader { display: none !important; } }

.m-inner {
  height: 64px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}

.m-logo { display: flex; align-items: center; text-decoration: none; }
.m-logo img { display: block; height: 32px; width: auto; }

.m-actions { display: flex; align-items: center; gap: 4px; }

.m-icon-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: #fff; cursor: pointer;
  border-radius: 2px; -webkit-tap-highlight-color: transparent;
  outline: none;
}
.m-icon-btn:focus-visible { outline: 2px solid rgba(255,255,255,0.4); outline-offset: 2px; }
.m-icon-btn:active { opacity: 0.7; }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE FULLSCREEN OVERLAY
   ═══════════════════════════════════════════════════════════════════ */
.mob-overlay {
  position: fixed; inset: 0; z-index: 999999;
  background: var(--cream);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  font-family: var(--font-header);
}
.mob-overlay[hidden] { display: none; }
.mob-overlay.is-open { transform: translateX(0); }

body.mob-menu-is-open { overflow: hidden; }

.mob-hd {
  background: var(--white);
  height: 63px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(75,96,121,0.1);
}
.mob-hd-logo { display: flex; align-items: center; text-decoration: none; }
.mob-hd-logo img { display: block; height: 40px; width: auto; }

.mob-close-btn {
  width: 40px; height: 40px;
  background: transparent; border: 1px solid rgba(75,96,121,0.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; flex-shrink: 0; outline: none;
}
.mob-close-btn:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
.mob-close-btn:active { opacity: 0.6; }

.mob-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--cream);
}

.mob-section-lbl {
  font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
  padding: 20px 20px 8px;
}

.mob-cat { border-bottom: 1px solid rgba(75,96,121,0.15); }

.mob-cat-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 58px; padding: 0 20px;
  background: none; border: none; text-align: left;
  -webkit-tap-highlight-color: transparent; cursor: pointer; outline: none;
}
.mob-cat-btn:focus-visible { outline: 2px solid var(--steel); outline-offset: -2px; }

.mob-cat-name {
  font-size: 16px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy); line-height: 1.2;
  transition: color 0.15s;
}
.mob-cat.is-open .mob-cat-name { color: var(--gold); }

.mob-cat-toggle {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(75,96,121,0.35);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); flex-shrink: 0; pointer-events: none;
  transition: transform 0.25s, background 0.2s, border-color 0.2s, color 0.2s;
  font-size: 16px; background: transparent;
}
.mob-cat.is-open .mob-cat-toggle {
  transform: rotate(45deg); background: var(--gold); border-color: var(--gold); color: #fff;
}

.mob-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.mob-cat.is-open .mob-panel { grid-template-rows: 1fr; }
.mob-panel-inner { overflow: hidden; min-height: 0; }
.mob-panel-content { padding-bottom: 20px; }

.mob-sub-lbl {
  font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold); padding: 14px 20px 6px; font-weight: 600;
}

.mob-link-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 20px;
  font-size: 16px; color: var(--navy); text-decoration: none; font-weight: 400;
  -webkit-tap-highlight-color: transparent; transition: color 0.12s;
}
.mob-link-row:active { color: var(--gold); }
.mob-link-chevron { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--steel); font-size: 16px; flex-shrink: 0; }

.mob-more-lbl {
  font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold); padding: 24px 20px 8px; font-weight: 600;
  border-top: 1px solid rgba(75,96,121,0.15);
}
.mob-sec-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 20px;
  border-top: 1px solid rgba(75,96,121,0.15);
  font-size: 16px; color: var(--navy); text-decoration: none; font-weight: 400;
  -webkit-tap-highlight-color: transparent; transition: color 0.12s;
}
.mob-sec-row:active { color: var(--gold); }

.mob-footer {
  flex-shrink: 0; background: var(--navy);
  padding: 20px 20px 36px;
  display: flex; flex-direction: column; gap: 10px;
}
.mob-book-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; width: 100%; background: var(--steel);
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none; border-radius: 4px; cursor: pointer;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.mob-book-btn:hover, .mob-book-btn:active { background: var(--gold); }
.mob-book-btn svg { flex-shrink: 0; }

.mob-phone-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; font-size: 15px; color: #fff; font-weight: 600; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mob-phone-link svg { flex-shrink: 0; color: var(--gold-light); }

/* ═══════════════════════════════════════════════════════════════════
   OVERRIDE — legacy site-wide button resets
   pod-global-styling.css, sections/global/global.css and screen.css all
   define `button:not(.hamburger):not(.slick-arrow):not(...)  { ... !important }`
   rules (some with 15+ exclusions) styling every <button> not on their
   list — background/height/padding/font-size/line-height/border-radius,
   several duplicated per breakpoint. Patching each discovered property
   kept missing others. `all: revert !important` wipes the whole element
   back to browser defaults in one shot (ID-anchored so it can't lose a
   specificity tie), then we redeclare exactly what each button needs.
   ═══════════════════════════════════════════════════════════════════ */
/* NOTE: every property below needs its own !important. Once `all: revert
   !important` runs, EVERY longhand it touched (i.e. every longhand there
   is) carries !important-level priority — a later plain (non-important)
   declaration for the same property in this same rule does NOT win; it's
   simply discarded, silently falling back to the browser default (which
   is how .d-nav-item ended up with black text, no-uppercase and a native
   2px outset button border despite those being "redeclared" below them). */
#deskNav .d-nav-item {
  all: revert !important;
  display: flex !important; align-items: center !important; gap: 6px !important;
  height: 54px !important;
  background: none !important;
  padding: 0 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important; letter-spacing: 0.05em !important; text-transform: uppercase !important;
  color: rgba(255,255,255,0.92) !important;
  line-height: normal !important;
  border-radius: 0 !important;
  border: none !important; cursor: pointer !important; white-space: nowrap !important; user-select: none !important;
  appearance: none !important;
  transition: color 0.15s !important;
  font-family: var(--font-header) !important;
}
#deskNav .d-nav-item:hover,
#deskNav .d-nav-item.is-active { color: var(--steel) !important; }

#hamBtn {
  all: revert !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  height: 44px !important;
  width: 44px !important;
  background: none !important;
  padding: 0 !important;
  border-radius: 2px !important;
  border: none !important; color: #fff !important; cursor: pointer !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

#mobOverlay .mob-cat-btn {
  all: inherit !important;
  display: flex !important; align-items: center !important; justify-content: space-between !important;
  width: 100% !important;
  height: 58px !important;
  background: none !important;
  padding: 0 20px !important;
  font-size: inherit !important;
  line-height: normal !important;
  border-radius: 0 !important;
  border: none !important; text-align: left !important; cursor: pointer !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

#mobCloseBtn {
  all: revert !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  height: 40px !important;
  width: 40px !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: normal !important;
  border-radius: 50% !important;
  border: 1px solid rgba(75,96,121,0.3) !important;
  color: var(--navy) !important; cursor: pointer !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}


/* ═══════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .d-header, .d-cta, .d-phone, .d-nav-item, .d-nav-sec, .chev, .d-ribbon-text,
  .mega, .mega-link, .mega-tab,
  .mob-overlay, .mob-panel, .mob-cat-toggle, .mob-link-row, .mob-sec-row, .mob-book-btn {
    transition: none; animation: none;
  }
}
