/* The homepage's header on every static page (W-09, audit #28/#29): the logo far left, the site's
   six section links, and the Get launch news button (Get the apps once a store link is set; the
   pages build swaps the words). Below 1280px (phones most of all) the links collapse behind one
   Menu button that slides its panel down calmly. (The A/A/A text-size control is gone; every
   visitor gets Standard, and browser zoom still works.)

   A copy of the header rules in client/src/landing-v4.css, self-contained so /support, /privacy,
   /terms, /delete-account and /research can wear the header without the React build. Plain values
   only (Chrome 78, same rule as the static pages' other stylesheets) and no text under 18px. */
.sv-header {
  --site-paper: #f6f1e8;
  --site-card: #fffcf7;
  --site-ink: #13243b;
  --site-ink-soft: #4a5363;
  --site-pine: #245447;
  --site-pine-hover: #1b4338;
  --site-gutter: 1.25rem;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: .5rem var(--site-gutter);
  background: var(--site-paper);
  border-bottom: 1px solid rgba(19, 36, 59, .07);
}
/* The skip link, off-screen until it takes focus (as on the homepage). */
.sv-skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 110;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: var(--site-ink);
  color: #fffdf8;
  font-weight: 600;
  text-decoration: none;
}
.sv-skip:focus { top: .75rem; }

/* W-14: the logo link is a 48px tap (the picture stays 44px inside it). */
.sv-header-home { display: inline-flex; align-items: center; flex: none; min-height: 48px; border-radius: 12px; }
.sv-header-home:focus-visible { outline: 3px solid #8a6420; outline-offset: 3px; }
.sv-logo, .sv-header-home img { display: block; width: auto; height: 44px; }
.sv-nav { display: none; }
.sv-header-tools { display: flex; align-items: center; }
.sv-header-tools > * + * { margin-left: .5rem; }
/* Bigger text (200%, SVWD-29): the bar wraps instead of running off the side of the screen, so the logo, the
   button and Menu (or the row of links) all stay on screen and every one stays a 48px tap. */
.sv-header { flex-wrap: wrap; }
.sv-header-tools { flex-wrap: wrap; justify-content: flex-end; margin-inline-start: auto; max-width: 100%; }
/* SVWD-31: with standard text the bar stays as it was before that wrap (#1262). legal.css's phone rule makes every
   .sv-button 100% wide, which in a wrapping row took the header button onto a line of its own and pushed Menu under
   it; the header button keeps its own width instead. The tools' auto margin is on the start side (margin-inline-start,
   Chrome 69 and later), so a right-to-left page (/ar) keeps them at its far left. */
.sv-header .sv-header-cta { width: auto; max-width: 100%; }

/* The one button style across the site (W-09, audit #6): the homepage's green, corner radius and weight. */
.sv-header .sv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 1.4rem;
  border-radius: 16px;
  border: 1px solid transparent;
  font: 600 1.125rem/1.2 "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.sv-header a.sv-button-primary { background: var(--site-pine); color: #fffdf8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 16px -8px rgba(19, 36, 59, .5); }
.sv-header a.sv-button-primary:hover { background: var(--site-pine-hover); color: #fffdf8; }
.sv-header .sv-header-cta { display: none; }
/* First impressions (23 Nov 2026): a visitor who lands on a guide on a phone sees the way to the apps beside Menu,
   not only inside it. From 360px wide; the smallest phones keep the logo and Menu alone. */
@media (min-width: 360px) {
  .sv-header .sv-header-cta { display: inline-flex; min-height: 48px; padding: 0 .9rem; white-space: nowrap; }
}
@media (min-width: 900px) {
  .sv-header .sv-header-cta { padding: 0 1.4rem; }
}

/* The Menu button that replaces the row of links on narrow screens (audit #29). */
.sv-menu-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 .9rem;
  border: 1px solid rgba(19, 36, 59, .25);
  border-radius: 14px;
  background: var(--site-card);
  color: var(--site-ink);
  font: 600 1.125rem/1 "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
.sv-menu-button:focus-visible, .sv-menu li a:focus-visible {
  outline: 3px solid #8a6420;
  outline-offset: 3px;
}
.sv-menu-button svg { margin-right: .4rem; }
/* Menu on narrow screens, Close while the panel is open: one icon and one word each. */
.sv-header .sv-menu-icon-close, .sv-header .sv-menu-word-close { display: none; }
.sv-header.is-open .sv-menu-icon-open, .sv-header.is-open .sv-menu-word-open { display: none; }
.sv-header.is-open .sv-menu-icon-close, .sv-header.is-open .sv-menu-word-close { display: inline; }

/* W-09 (round 2): phones. The Menu button drops to its icon alone (48px; its word is still read
   aloud by screen readers, only clipped from sight) so the logo, the A/A/A control and Menu all fit
   in the one bar; the smallest phones get a little back from the logo and the side gutter. */
@media (max-width: 480px) {
  .sv-header { padding-left: .75rem; padding-right: .75rem; }
  .sv-header-tools > * + * { margin-left: .4rem; }
  .sv-menu-button { width: 48px; min-width: 48px; padding: 0; justify-content: center; }
  .sv-menu-button svg { margin-right: 0; }
  .sv-header .sv-menu-word-open, .sv-header.is-open .sv-menu-word-close {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
    display: inline;
  }
}
@media (max-width: 360px) {
  .sv-header { padding-left: .5rem; padding-right: .5rem; }
  .sv-logo, .sv-header-home img { height: 34px; }
}

/* The panel itself: a calm slide-down, never a hamburger explosion. */
.sv-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: .5rem var(--site-gutter) 1.25rem;
  background: var(--site-paper);
  border-bottom: 1px solid rgba(19, 36, 59, .1);
  box-shadow: 0 24px 40px -24px rgba(19, 36, 59, .35);
}
.sv-menu[hidden] { display: none; }
/* Website audit: the panel scrolls when it is taller than the screen (a phone on its side, zoom). */
.sv-menu { max-height: calc(100vh - 72px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@keyframes sv-menu-down { from { opacity: 0; transform: translateY(-10px); } }
.sv-menu:not([hidden]) { animation: sv-menu-down .22s ease-out; }
.sv-menu ul { margin: 0; padding: 0; list-style: none; }
.sv-menu li a {
  display: block;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(19, 36, 59, .08);
  color: var(--site-ink);
  font: 400 1.5rem/1.2 "Newsreader", Georgia, serif;
  text-decoration: none;
}
.sv-menu li a:hover { color: var(--site-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.sv-menu .sv-button { width: 100%; margin-top: 1.1rem; }

/* Wide screens: the row of links instead of the Menu button. */
/* The full row of links starts at 1280px on every page (the homepage's own header rule): the row
   measured wider than smaller screens, so below 1280px the Menu button carries the links. */
@media (min-width: 900px) {
  .sv-header { position: -webkit-sticky; position: sticky; top: 0; }
}
@media (min-width: 1280px) {
  .sv-header { padding-left: 2.5rem; padding-right: 2.5rem; min-height: 84px; }
  /* SVWD-31: the tools' auto start margin (above) took all the spare room, so the links sat against the logo. An
     auto start margin on the links too splits it, which centres them between the logo and the button as before. */
  .sv-nav { display: flex; flex-wrap: wrap; margin-inline-start: auto; }
  .sv-nav a {
    margin: 0 .2rem;
    padding: .6rem .8rem;
    border-radius: 12px;
    color: var(--site-ink);
    font-size: 1.125rem;
    font-family: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
    text-decoration: none;
    white-space: nowrap;
  }
  .sv-nav a:hover { background: rgba(19, 36, 59, .06); color: var(--site-ink); }
  .sv-nav a:focus-visible { outline: 3px solid #8a6420; outline-offset: 3px; }
  .sv-header .sv-header-cta { display: inline-flex; min-height: 48px; }
  .sv-menu-button, .sv-menu { display: none; }
}

/* Website audit: Tab and Shift+Tab scroll a control clear of the sticky header (WCAG 2.4.11). */
html { scroll-padding-top: 6.5rem; }

@media (prefers-reduced-motion: reduce) {
  .sv-menu:not([hidden]) { animation: none; }
}
