/* Shared header and footer for secondary public pages. */
:root {
  --site-chrome-paper: #f6f5ef;
  --site-chrome-ink: #142638;
  --site-chrome-muted: #5a6876;
  --site-chrome-navy: #101e30;
  --site-chrome-blue: #2452a9;
  --site-chrome-line: #d9dfdf;
  --site-chrome-gold: #efc759;
}

body.site-chrome-active {
  color: var(--site-chrome-ink);
  background: var(--site-chrome-paper) !important;
  -webkit-font-smoothing: antialiased;
}

body.site-chrome-active .site-chrome-header :focus-visible,
body.site-chrome-active .site-chrome-footer :focus-visible,
body.site-chrome-active .site-guide-search :focus-visible {
  outline: 3px solid var(--site-chrome-gold) !important;
  outline-offset: 3px;
}

.site-chrome-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 10px max(20px, calc((100% - 1240px) / 2));
  color: var(--site-chrome-ink) !important;
  background: rgba(246, 245, 239, .97) !important;
  border-bottom: 1px solid rgba(20, 38, 56, .12) !important;
  box-shadow: 0 8px 26px rgba(20, 38, 56, .06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-chrome-header .brand,
.site-chrome-header .logo-link,
.site-chrome-header .logo-link *,
.site-chrome-header .site-brand,
.site-chrome-header .header-right a { color: var(--site-chrome-navy) !important; }
.site-chrome-header > .header-inner,
.site-chrome-header > .site-header-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1240px;
  min-width: 0;
  min-height: 56px;
  margin-inline: auto;
}
.site-chrome-brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--site-chrome-navy) !important;
  font-family: Outfit, 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
}
.site-chrome-brand img { width: 40px; height: 40px; object-fit: contain; }
.site-chrome-wordmark { color: inherit; }
.site-chrome-wordmark-accent { color: var(--site-chrome-gold); }
.site-chrome-footer .site-chrome-brand { color: #fff !important; }
.site-chrome-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.site-chrome-header .language-nav a,
.site-chrome-header .site-language-switcher a,
.site-chrome-header .site-locale,
.site-chrome-header .lang-btn {
  min-width: 44px;
  min-height: 44px;
  color: #344756 !important;
  background: #fff !important;
  border: 1px solid var(--site-chrome-line) !important;
}
.site-chrome-header .language-nav a[aria-current='page'],
.site-chrome-header .site-locale[aria-current='page'],
.site-chrome-header .lang-btn.active,
.site-chrome-header .lang-btn[aria-pressed='true'] {
  color: #fff !important;
  background: var(--site-chrome-navy) !important;
  border-color: var(--site-chrome-navy) !important;
}
.site-chrome-nav a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #3d5060 !important;
  font-size: .92rem;
  font-weight: 650;
  text-decoration: none;
}
.site-chrome-nav a:hover { color: var(--site-chrome-blue) !important; background: #e9eef9; }
.site-chrome-menu-toggle { display: none; }
.site-chrome-mobile-nav[hidden] { display: none !important; }
.site-chrome-mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 101;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 12px max(20px, calc((100% - 1240px) / 2)) 22px;
  background: #f6f5ef;
  border-bottom: 1px solid var(--site-chrome-line);
  box-shadow: 0 20px 35px rgba(20, 38, 56, .16);
}
.site-chrome-mobile-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--site-chrome-line);
  border-radius: 8px;
  color: var(--site-chrome-ink) !important;
  font-weight: 650;
  text-decoration: none;
}
.site-chrome-mobile-nav a:hover { color: var(--site-chrome-blue) !important; background: #e9eef9; }

/* Long genetics guides get an in-page search; the user guide has its own search. */
.site-guide-search {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid var(--site-chrome-line);
  border-radius: 18px;
  background: #f2f5fa;
  color: var(--site-chrome-ink);
}
.site-guide-search h2 {
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--site-chrome-navy) !important;
  font: 700 1.15rem Outfit, 'DM Sans', system-ui, sans-serif !important;
}
.site-guide-search-row { display: flex; gap: 8px; }
.site-guide-search input {
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #bdcad8;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--site-chrome-ink);
  font: inherit;
}
.site-guide-search input::placeholder { color: #657383; opacity: 1; }
.site-guide-search input::-webkit-search-cancel-button { display: none; }
.site-guide-search-clear {
  width: 48px;
  min-height: 48px;
  border: 1px solid #bdcad8;
  border-radius: 10px;
  background: #fff;
  color: var(--site-chrome-ink);
  font-size: 1.5rem;
  cursor: pointer;
}
.site-guide-search-clear[hidden] { display: none !important; }
.site-guide-search-status { margin: 10px 0 0 !important; color: var(--site-chrome-muted) !important; font-size: .88rem; }
.site-guide-search-results[hidden] { display: none !important; }
.site-guide-search-results { display: grid; gap: 7px; margin: 12px 0 0 !important; padding: 0 !important; list-style: none; }
.site-guide-search-results li { margin: 0 !important; padding: 0 !important; }
.site-guide-search-results button {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--site-chrome-line);
  border-radius: 10px;
  background: #fff;
  color: var(--site-chrome-ink);
  text-align: left;
  cursor: pointer;
}
.site-guide-search-results button:hover { border-color: var(--site-chrome-blue); background: #f8fbff; }
.site-guide-search-results strong { color: var(--site-chrome-navy); font-size: .9rem; }
.site-guide-search-results span { overflow: hidden; color: var(--site-chrome-muted); font-size: .85rem; line-height: 1.45; }
.site-guide-search-hit { outline: 3px solid var(--site-chrome-gold); outline-offset: 4px; border-radius: 4px; }

/* The genetics guides still ship their original dark utility styles. */
body.site-chrome-guide .bg-layer,
body.site-chrome-guide .orb,
body.site-chrome-guide .particles,
body.site-chrome-guide .sparkles,
body.site-chrome-guide .page-curtain { display: none !important; }
body.site-chrome-guide .guide-article,
body.site-chrome-guide .guide-toc-details {
  border: 1px solid var(--site-chrome-line) !important;
  background: #fff !important;
  color: var(--site-chrome-ink) !important;
  box-shadow: 0 14px 36px rgba(20, 38, 56, .07) !important;
}
body.site-chrome-guide .guide-article h1,
body.site-chrome-guide .guide-article h2,
body.site-chrome-guide .guide-article h3,
body.site-chrome-guide .guide-article h4 { color: var(--site-chrome-navy) !important; }
body.site-chrome-guide .guide-article p,
body.site-chrome-guide .guide-article li,
body.site-chrome-guide .guide-article td,
body.site-chrome-guide .guide-article th,
body.site-chrome-guide .guide-toc-details { color: #344756 !important; }
body.site-chrome-guide .guide-article a,
body.site-chrome-guide .guide-toc-details a { color: var(--site-chrome-blue) !important; }
body.site-chrome-guide .guide-toc-details summary,
body.site-chrome-guide .guide-toc-details li { color: var(--site-chrome-navy) !important; }
body.site-chrome-guide .guide-article code {
  border-color: var(--site-chrome-line) !important;
  background: #eef2f8 !important;
  color: #244b89 !important;
}

#navbar {
  background: rgba(246, 245, 239, .97) !important;
  border-bottom: 1px solid var(--site-chrome-line) !important;
  box-shadow: 0 8px 26px rgba(20, 38, 56, .06);
}
#navbar .font-extrabold { color: var(--site-chrome-navy) !important; }
#navbar .nav-link { color: #3d5060 !important; }
#navbar .nav-link:hover { color: var(--site-chrome-blue) !important; }
#navbar .lang-btn { color: var(--site-chrome-ink) !important; }
#navbar .lang-btn.active,
#navbar .lang-btn[aria-pressed='true'] { color: #fff !important; background: var(--site-chrome-navy) !important; }

.site-chrome-footer {
  box-sizing: border-box;
  width: 100%;
  margin: 64px 0 0 !important;
  padding: 50px max(20px, calc((100% - 1160px) / 2)) 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #eaf0f7 !important;
  background: var(--site-chrome-navy) !important;
  box-shadow: none !important;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem !important;
  line-height: 1.55;
}
.site-chrome-footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) repeat(3, minmax(135px, 1fr));
  gap: 32px;
  padding-bottom: 34px;
}
.site-chrome-footer-brand { max-width: 310px; }
.site-chrome-footer-brand p { margin: 14px 0 12px; color: #afc0d5; font-size: .9rem; }
.site-chrome-footer-brand > a:not(.site-chrome-brand) { color: #e8cc80 !important; overflow-wrap: anywhere; }
.site-chrome-footer-group { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.site-chrome-footer-group h2 { margin: 3px 0 12px; color: #fff !important; font-family: Outfit, 'DM Sans', system-ui, sans-serif; font-size: .95rem; font-weight: 700; }
.site-chrome-footer-group a, .site-chrome-footer-bottom a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #afc0d5 !important;
  font-size: .86rem;
  text-decoration: none;
}
.site-chrome-footer-group a:hover, .site-chrome-footer-bottom a:hover { color: var(--site-chrome-gold) !important; text-decoration: underline; }
.site-chrome-footer-bottom {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  border-top: 1px solid rgba(255,255,255,.14);
  color: #91a6be;
  font-size: .78rem;
}
.site-chrome-footer-bottom .version-badge { color: #e8cc80 !important; }

/* The older policy and release-notes pages use a fixed dark background and dark cards. */
body.site-chrome-legacy-paper {
  min-height: 100vh;
  color: var(--site-chrome-ink) !important;
  background: var(--site-chrome-paper) !important;
}
body.site-chrome-legacy-paper::before,
body.site-chrome-legacy-paper::after { display: none !important; }
body.site-chrome-legacy-paper .page-curtain,
body.site-chrome-legacy-paper .bg-layer,
body.site-chrome-legacy-paper .orb,
body.site-chrome-legacy-paper .particles { display: none !important; }
body.site-chrome-legacy-paper .page { color: var(--site-chrome-ink); }
body.site-chrome-legacy-paper main { color: var(--site-chrome-ink); }
body.site-chrome-legacy-paper main p,
body.site-chrome-legacy-paper main li,
body.site-chrome-legacy-paper .section-body,
body.site-chrome-legacy-paper .section-intro { color: #344756 !important; }
body.site-chrome-legacy-paper .page-header,
body.site-chrome-legacy-paper .page-title-block { color: var(--site-chrome-ink) !important; }
body.site-chrome-legacy-paper .page-title,
body.site-chrome-legacy-paper .section-h2,
body.site-chrome-legacy-paper main h1,
body.site-chrome-legacy-paper main h2,
body.site-chrome-legacy-paper main h3,
body.site-chrome-legacy-paper main h4 { color: var(--site-chrome-navy) !important; }
body.site-chrome-legacy-paper .page-subtitle,
body.site-chrome-legacy-paper .section-text,
body.site-chrome-legacy-paper .section-h3,
body.site-chrome-legacy-paper .intro,
body.site-chrome-legacy-paper .source-note,
body.site-chrome-legacy-paper .release-content,
body.site-chrome-legacy-paper .release-content li,
body.site-chrome-legacy-paper .terms-section,
body.site-chrome-legacy-paper .community-section { color: #344756 !important; }
body.site-chrome-legacy-paper .content-card,
body.site-chrome-legacy-paper .contact-card,
body.site-chrome-legacy-paper .policy-section,
body.site-chrome-legacy-paper .terms-card,
body.site-chrome-legacy-paper .release-card,
body.site-chrome-legacy-paper .hero {
  border-color: var(--site-chrome-line) !important;
  color: var(--site-chrome-ink) !important;
  background: #fff !important;
  box-shadow: 0 14px 36px rgba(20, 38, 56, .07) !important;
}
body.site-chrome-legacy-paper .release-card h2,
body.site-chrome-legacy-paper .eyebrow,
body.site-chrome-legacy-paper .section-title { color: var(--site-chrome-navy) !important; }
body.site-chrome-legacy-paper .release-card a,
body.site-chrome-legacy-paper main a:not(.button) { color: var(--site-chrome-blue) !important; }
body.site-chrome-legacy-paper .button {
  color: #fff !important;
  background: var(--site-chrome-blue) !important;
  border-color: var(--site-chrome-blue) !important;
}
body.site-chrome-legacy-paper .section-divider { border-color: var(--site-chrome-line) !important; }

/* Blog and genetics pages already have a working mobile panel. Match its visual language. */
#hamburger-btn.site-mobile-menu-toggle {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--site-chrome-line);
  border-radius: 11px;
  background: #fff;
  color: var(--site-chrome-ink) !important;
}
#hamburger-btn.site-mobile-menu-toggle svg { color: var(--site-chrome-ink) !important; }
#mobile-panel {
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: #f6f5ef !important;
  border-color: var(--site-chrome-line) !important;
  box-shadow: 0 20px 35px rgba(20, 38, 56, .16);
}
#mobile-panel a { color: var(--site-chrome-ink) !important; }
#mobile-panel a:hover { color: var(--site-chrome-blue) !important; background: #e9eef9; }
#mobile-panel a[data-i18n='nav_download'] { background: var(--site-chrome-blue) !important; color: #fff !important; }

@media (max-width: 900px) {
  .site-chrome-menu-ready .site-chrome-nav,
  .site-chrome-menu-ready .site-nav { display: none !important; }
  .site-chrome-menu-ready .site-chrome-menu-toggle {
    min-width: 46px;
    min-height: 46px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--site-chrome-line);
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
  }
  .site-chrome-menu-toggle span { width: 20px; height: 2px; border-radius: 2px; background: var(--site-chrome-ink); transition: transform .2s ease, opacity .2s ease; }
  .site-chrome-menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(7px) rotate(45deg); }
  .site-chrome-menu-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
  .site-chrome-menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 760px) {
  .site-chrome-header { min-height: 68px; flex-wrap: wrap; gap: 4px 10px; padding: 8px 14px; }
  .site-chrome-header > .header-inner, .site-chrome-header > .site-header-inner { min-height: 48px; flex-wrap: wrap; }
  .site-chrome-header .header-inner > .site-chrome-nav,
  .site-chrome-header .site-header-inner > .site-chrome-nav { order: 3; flex: 1 0 100%; }
  .site-chrome-brand { font-size: .94rem; }
  .site-chrome-brand img { width: 36px; height: 36px; }
  .site-chrome-nav { width: 100%; justify-content: flex-start; gap: 2px; }
  .site-chrome-nav a { padding-inline: 9px; font-size: .86rem; }
  .site-chrome-footer { margin-top: 44px !important; padding: 36px 18px 0 !important; }
  .site-chrome-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .site-chrome-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .site-chrome-menu-ready > .header-inner,
  .site-chrome-menu-ready > .site-header-inner { flex-wrap: wrap !important; }
  .site-chrome-menu-ready .header-right { min-width: 0; max-width: 100%; flex-wrap: wrap; }
  .site-chrome-menu-ready .header-right > .back-link { display: none !important; }
  .site-chrome-menu-ready .logo-text,
  .site-chrome-menu-ready .site-brand-name { display: none !important; }
}

@media (max-width: 640px) {
  body.site-chrome-legacy-paper .release-list { grid-template-columns: minmax(0, 1fr); }
  body.site-chrome-legacy-paper .release-card { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
  body.site-chrome-legacy-paper .page-title {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(1.5rem, 8vw, 2rem);
  }
  body.site-chrome-legacy-paper #page-title {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(1.75rem, 9vw, 2rem);
  }
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 > * {
    min-width: 0;
    max-width: 100%;
  }
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 .section-heading h2,
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 .shield-list li,
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 .shield-list li a,
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 .callout {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 .shield-list {
    min-width: 0;
    max-width: 100%;
  }
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 .shield-list li {
    display: block;
    position: relative;
    padding-left: 40px;
  }
  body.site-chrome-legacy-paper main .content-card > section.fade-up.delay-5 .shield-list li::before {
    position: absolute;
    top: 11px;
    left: 12px;
    margin-top: 0;
  }
  .site-chrome-header { padding-inline: 10px; }
  .site-chrome-nav { justify-content: space-between; }
  .site-chrome-nav a { padding-inline: 7px; font-size: .8rem; }
  .site-chrome-footer { padding-inline: 14px !important; }
  .site-chrome-footer-inner { gap: 22px 12px; }
  .site-chrome-footer-group a { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-chrome-header *, .site-chrome-header *::before, .site-chrome-header *::after,
  .site-chrome-footer *, .site-chrome-footer *::before, .site-chrome-footer *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
