/* Canonical header for all local FullMark pages. Load after v3-home.css. */
:root {
  --fm-v3-header-height: 88px;
}

html body.fm-premium {
  padding-top: var(--fm-v3-header-height) !important;
}

html body.fm-premium .fm-site-header.fm-header-v3 {
  --fm-ground: #101310;
  --fm-surface: #1b201a;
  --fm-raised: #262d23;
  --fm-ink: #f3f5ed;
  --fm-muted: #bdc5b7;
  --fm-accent: #caff32;
  --fm-dark: #151a10;
  position: fixed !important;
  inset: 0 0 auto !important;
  z-index: 80;
  width: 100%;
  height: var(--fm-v3-header-height) !important;
  min-height: 0 !important;
  padding: 16px 32px !important;
  overflow: visible !important;
  border: 0 !important;
  color: var(--fm-ink, #f3f5ed) !important;
  background: var(--fm-surface, #1b201a) !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the legacy header shadow. */
  backdrop-filter: none !important; /* taste-skill-ignore: removes the legacy backdrop blur. */
}

html body.fm-premium .fm-header-v3::before {
  display: none !important;
}

html body.fm-premium .fm-header-v3 .fm-site-nav {
  position: relative;
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) max-content;
  align-items: center;
  width: min(1376px, 100%);
  min-width: 0;
  height: 100%;
  min-height: 0 !important;
  margin: 0 auto;
  gap: 24px;
}

html body.fm-premium .fm-header-v3 .fm-site-brand {
  display: flex;
  align-items: center;
  width: 180px !important;
  max-width: 100%;
  min-width: 0;
  height: 48px !important;
  margin: 0;
  flex: 0 1 auto !important;
  overflow: visible !important;
}

html body.fm-premium .fm-header-v3 .fm-site-brand img {
  position: static !important;
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
  object-fit: contain;
  filter: invert(1);
  mix-blend-mode: screen;
}

html body.fm-premium .fm-header-v3 .fm-site-links {
  position: static;
  display: flex !important;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  width: auto;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 0 !important;
  gap: 20px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the legacy navigation shadow. */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none !important;
  transition: none !important;
}

html body.fm-premium .fm-header-v3 .fm-site-links a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-width: 0;
  min-height: 48px;
  padding: 8px 0 !important;
  border-radius: 0 !important;
  color: var(--fm-ink, #f3f5ed) !important;
  background: transparent !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the legacy link shadow. */
  font: 600 16px/1.4 'Manrope', sans-serif !important;
  text-decoration: none !important;
  white-space: nowrap;
  transform: none !important;
  transition: none !important;
}

html body.fm-premium .fm-header-v3 .fm-site-links a:is(:hover, .is-active) {
  color: var(--fm-accent, #caff32) !important;
}

html body.fm-premium .fm-header-v3 .fm-site-links a.is-active {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 8px;
}

html body.fm-premium .fm-header-v3 .fm-site-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  width: auto !important;
  min-width: 0;
  gap: 12px;
}

html body.fm-premium .fm-header-v3 .fm-site-action--primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 178px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: 4px !important;
  color: var(--fm-dark, #151a10) !important;
  background: var(--fm-accent, #caff32) !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the legacy CTA shadow. */
  font: 600 16px/1.4 'Manrope', sans-serif !important;
  text-decoration: none !important;
  white-space: nowrap;
  transform: none !important;
  transition: none !important;
}

html body.fm-premium .fm-header-v3 .fm-site-action--primary:hover {
  color: var(--fm-dark, #151a10) !important;
  background: var(--fm-ink, #f3f5ed) !important;
}

html body.fm-premium .fm-header-v3 .fm-site-menu-toggle {
  display: none !important;
  position: relative;
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: var(--fm-raised, #262d23) !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the legacy toggle shadow. */
  cursor: pointer;
  transition: none !important;
}

html body.fm-premium .fm-header-v3 .fm-site-menu-toggle span {
  display: block !important;
  position: absolute !important;
  inset: 50% auto auto 50% !important;
  width: 22px !important;
  height: 2px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--fm-ink, #f3f5ed) !important;
  opacity: 1;
  transform: translate(-50%, -50%) !important;
  transition: none !important;
}
html body.fm-premium .fm-header-v3 .fm-site-menu-toggle span:nth-child(1) { transform: translate(-50%, calc(-50% - 6px)) !important; }
html body.fm-premium .fm-header-v3 .fm-site-menu-toggle span:nth-child(3) { transform: translate(-50%, calc(-50% + 6px)) !important; }
html body.fm-premium .fm-header-v3.is-menu-open .fm-site-menu-toggle span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg) !important; }
html body.fm-premium .fm-header-v3.is-menu-open .fm-site-menu-toggle span:nth-child(2) { opacity: 0; }
html body.fm-premium .fm-header-v3.is-menu-open .fm-site-menu-toggle span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg) !important; }

html body.fm-premium .fm-header-v3 .fm-site-links .fm-v3-menu-contact {
  display: none !important;
}

html body.fm-premium .fm-header-v3 .fm-site-actions .fm-phone-disclosure {
  display: block !important;
  position: relative;
  width: 122px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--fm-ink, #f3f5ed);
}

html body.fm-premium .fm-header-v3 .fm-phone-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 4px;
  color: var(--fm-ink, #f3f5ed) !important;
  background: var(--fm-raised, #262d23);
  font: 600 15px/1.4 'Manrope', sans-serif;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: none !important;
}

html body.fm-premium .fm-header-v3 .fm-phone-disclosure > summary::-webkit-details-marker {
  display: none;
}

html body.fm-premium .fm-header-v3 .fm-phone-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

html body.fm-premium .fm-header-v3 .fm-phone-chevron {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
}

html body.fm-premium .fm-header-v3 .fm-phone-disclosure[open] > summary,
html body.fm-premium .fm-header-v3 .fm-phone-disclosure > summary:hover {
  color: var(--fm-accent, #caff32) !important;
}

html body.fm-premium .fm-header-v3 .fm-phone-disclosure[open] .fm-phone-chevron {
  transform: rotate(180deg);
}

html body.fm-premium .fm-header-v3 .fm-phone-panel {
  position: absolute;
  z-index: 2;
  top: calc(100% + 16px);
  right: 0;
  width: 326px;
  max-height: calc(100dvh - var(--fm-v3-header-height) - 32px);
  padding: 24px;
  overflow: auto;
  border: 0;
  border-radius: 4px;
  color: var(--fm-ink, #f3f5ed);
  background: var(--fm-raised, #262d23);
}

html body.fm-premium .fm-header-v3 .fm-phone-label {
  margin: 0 0 8px;
  color: var(--fm-muted, #bdc5b7) !important;
  font: 400 14px/1.5 'Manrope', sans-serif;
}

html body.fm-premium .fm-header-v3 .fm-phone-number {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 0 0 20px;
  color: var(--fm-ink, #f3f5ed) !important;
  font: 600 23px/1.4 'Manrope', sans-serif;
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  white-space: nowrap;
}

html body.fm-premium .fm-header-v3 .fm-phone-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

html body.fm-premium .fm-header-v3 .fm-phone-channels .fm-phone-channel {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 66px !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-radius: 3px !important;
  color: var(--fm-ink, #f3f5ed) !important;
  background: var(--fm-surface, #1b201a) !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the decorated social-link shadow. */
  font: 500 13px/1.4 'Manrope', sans-serif !important;
  text-decoration: none !important;
  overflow: visible;
  transform: none !important;
  transition: none !important;
}

/* site-header.js decorates only the icon; restore its visible text label. */
html body.fm-premium .fm-header-v3 .fm-phone-channel[data-fm-social-ready="true"]::after {
  content: attr(aria-label);
  position: static;
  display: block;
}

html body.fm-premium .fm-header-v3 .fm-phone-channel::before {
  display: none !important;
}

html body.fm-premium .fm-header-v3 .fm-phone-channel:is(:hover, :focus-visible) {
  color: var(--fm-accent, #caff32) !important;
}

html body.fm-premium .fm-header-v3 .fm-phone-channel svg,
html body.fm-premium .fm-header-v3 .fm-site-social-max-mark {
  width: 20px;
  height: 20px;
}

html body.fm-premium .fm-header-v3 .fm-site-social-max-dark {
  opacity: 0 !important;
}

html body.fm-premium .fm-header-v3 .fm-site-social-max-light {
  opacity: 1 !important;
  transition: none !important;
}

html body.fm-premium .fm-header-v3 :is(a, button, summary):focus-visible {
  outline: 2px solid var(--fm-accent, #caff32) !important;
  outline-offset: 3px;
}

@media (max-width: 1280px) {
  :root { --fm-v3-header-height: 80px; }

  html body.fm-premium .fm-site-header.fm-header-v3 {
    padding: 16px 24px !important;
  }

  html body.fm-premium .fm-header-v3 .fm-site-nav {
    grid-template-columns: minmax(0, 1fr) max-content 48px;
    gap: 16px;
  }

  html body.fm-premium .fm-header-v3 .fm-site-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    justify-self: end;
  }

  html body.fm-premium .fm-header-v3 .fm-site-links {
    display: none !important;
  }

  html body.fm-premium .fm-header-v3.is-menu-open .fm-site-links {
    position: absolute;
    inset: calc(100% + 16px) 0 auto auto;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(640px, 100%);
    max-height: calc(100dvh - var(--fm-v3-header-height) - 24px);
    padding: 24px !important;
    gap: 8px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 4px !important;
    background: var(--fm-raised, #262d23) !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none !important;
  }

  html body.fm-premium .fm-header-v3.is-menu-open .fm-site-links > a {
    width: 100%;
    min-height: 48px;
    font-size: 18px !important;
    line-height: 1.4;
    white-space: normal;
  }

  html body.fm-premium .fm-header-v3 .fm-site-links .fm-v3-menu-contact {
    display: grid !important;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 12px;
    gap: 4px 24px;
  }

  html body.fm-premium .fm-header-v3 .fm-v3-menu-contact a {
    min-height: 44px;
    color: var(--fm-muted, #bdc5b7) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
  }
}

@media (max-width: 600px) {
  :root { --fm-v3-header-height: 72px; }

  html body.fm-premium .fm-site-header.fm-header-v3 {
    padding: 12px 16px !important;
  }

  html body.fm-premium .fm-header-v3 .fm-site-nav {
    grid-template-columns: minmax(0, 1fr) 110px 44px;
    gap: 8px;
  }

  html body.fm-premium .fm-header-v3 .fm-site-brand {
    width: 148px !important;
    height: 44px !important;
  }

  html body.fm-premium .fm-header-v3 .fm-site-action--primary {
    display: none !important;
  }

  html body.fm-premium .fm-header-v3 .fm-site-menu-toggle {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  html body.fm-premium .fm-header-v3 .fm-phone-disclosure > summary {
    min-height: 44px;
    gap: 5px;
    padding-inline: 6px;
    font-size: 14px;
  }

  html body.fm-premium .fm-header-v3 .fm-site-actions .fm-phone-disclosure {
    width: 110px;
  }

  html body.fm-premium .fm-header-v3 .fm-phone-icon {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
  }

  html body.fm-premium .fm-header-v3 .fm-phone-chevron {
    flex-basis: 10px;
    width: 10px;
    height: 10px;
  }

  html body.fm-premium .fm-header-v3 .fm-phone-panel {
    position: fixed;
    inset: calc(var(--fm-v3-header-height) + 8px) 16px auto;
    width: auto;
    padding: 20px;
  }

  html body.fm-premium .fm-header-v3 .fm-phone-number {
    font-size: 22px;
  }

  html body.fm-premium .fm-header-v3.is-menu-open .fm-site-links {
    top: calc(100% + 12px);
    width: 100%;
    padding: 20px 16px !important;
    gap: 8px 16px;
  }
}

@media (max-width: 340px) {
  html body.fm-premium .fm-site-header.fm-header-v3 {
    padding-inline: 12px !important;
  }
}

/* One common two-action dock; root supplies the same markup on every page. */
html body.fm-premium .mobile-bar.fm-v3-mobile-bar {
  display: none !important;
}

@media (max-width: 760px) {
  html body.fm-premium:has(.fm-v3-mobile-bar) {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html body.fm-premium .mobile-bar.fm-v3-mobile-bar {
    position: fixed;
    z-index: 70;
    inset: auto 12px max(8px, env(safe-area-inset-bottom, 0px));
    display: grid !important;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px !important;
    gap: 6px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: var(--fm-surface, #1b201a) !important;
    box-shadow: none !important; /* taste-skill-ignore: removes the legacy dock shadow. */
    backdrop-filter: none !important; /* taste-skill-ignore: removes the legacy dock blur. */
  }

  html body.fm-premium .mobile-bar.fm-v3-mobile-bar > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px !important;
    margin: 0;
    padding: 10px 8px !important;
    border: 0 !important;
    border-radius: 3px !important;
    font: 500 15px/1.3 'Manrope', sans-serif !important;
    text-align: center;
    text-decoration: none !important;
    transition: none !important;
  }

  html body.fm-premium .mobile-bar.fm-v3-mobile-bar > a[href="/#contacts"] {
    color: var(--fm-ink, #f3f5ed) !important;
    background: transparent !important;
  }

  html body.fm-premium .mobile-bar.fm-v3-mobile-bar > a[href="/#calculator"] {
    color: var(--fm-dark, #151a10) !important;
    background: var(--fm-accent, #caff32) !important;
  }

  html body.fm-premium .mobile-bar.fm-v3-mobile-bar > a:focus-visible {
    outline: 2px solid var(--fm-accent, #caff32) !important;
    outline-offset: 3px;
  }
}
