/* Approved outer-chrome refinement. Keep content accents and genuine logo colours.
   Header height and flow reservation share one token at the existing breakpoint. */
html {
  --intellect-header-height: 104px;
  background-color: #006F99;
  scroll-padding-top: calc(var(--intellect-header-height) + 17px);
}
body.synapse-site {
  background-color: #006F99;
  padding-top: calc(var(--intellect-header-height) + 1px);
}
body.synapse-site > main { background-color: #fff; }
body.synapse-site .site-header {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  background: #006F99;
  border-bottom-color: #006F99;
}
body.synapse-site .header-inner { height: var(--intellect-header-height); }
body.synapse-site .site-header .brand {
  background: #fff;
  border-radius: 6px;
  padding: 5px 12px;
}
body.synapse-site #primary-navigation > a:not(.button),
body.synapse-site #primary-navigation > details > summary,
body.synapse-site .site-header .menu-toggle {
  color: #fff !important;
}
body.synapse-site .site-header .button {
  background: #263238;
  color: #fff;
}
body.synapse-site .site-header .button:hover { background: #3e515a; }
body.synapse-site .site-header .menu-toggle { border-color: #a6d3e5; }
body.synapse-site .site-header .menu-toggle[aria-expanded="true"],
body.synapse-site #primary-navigation > details[open] > summary {
  background: #ffffff1f;
}
body.synapse-site .site-header :is(.brand, .menu-toggle):focus-visible,
body.synapse-site #primary-navigation > a:focus-visible,
body.synapse-site #primary-navigation > details > summary:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
/* Dropdowns remain white, readable panels; never recolour all header descendants. */
body.synapse-site .site-header .mega-menu { color: #263238; }
body.synapse-site .site-header .mega-menu :focus-visible {
  outline: 3px solid #006F99;
  outline-offset: 3px;
}
body.synapse-site :is(main, .footer) :is([id], input, select, textarea, button, a) {
  scroll-margin-top: 16px;
}
@media (max-width: 1100px) {
  html { --intellect-header-height: 88px; }
  body.synapse-site #primary-navigation { background: #006F99; }
}
/* Tracker-free knowledge pages retain their simpler navigation and all content. */
body:has(> .mast) {
  background: #006F99;
  padding-top: calc(var(--intellect-header-height) + 1px);
}
body:has(> .mast) > main {
  background: #fff;
  width: 100%;
  max-width: none;
  padding-inline: max(28px, calc((100% - 1154px) / 2));
}
body > .mast {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  width: 100%;
  max-width: none;
  height: calc(var(--intellect-header-height) + 1px);
  padding-block: 0;
  padding-inline: max(28px, calc((100% - 1154px) / 2));
  background: #006F99;
  border-color: #006F99;
}
body > .mast > a { background: #fff; border-radius: 6px; padding: 5px 12px; }
body > .mast nav a { color: #fff; min-height: 44px; display: inline-flex; align-items: center; }
body > .mast :focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
body:has(> .mast) > .skip { position: fixed; z-index: 1000; }
body:has(> .mast) > .skip:focus { color: #263238; }
@media (max-width: 680px) {
  html:has(.mast) { --intellect-header-height: 144px; }
  body:has(> .mast) > main { padding-inline: 21px; }
  body > .mast { flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding-inline: 16px; }
  body > .mast nav { justify-content: center; font-size: 13px; gap: 0 12px; }
}
@media (forced-colors: active) {
  body.synapse-site .site-header,
  body.synapse-site #primary-navigation { background: Canvas; }
  body.synapse-site #primary-navigation > a:not(.button),
  body.synapse-site #primary-navigation > details > summary,
  body.synapse-site .site-header .menu-toggle { color: LinkText !important; }
}
