/* Shared look for every page: tokens, global font, sky-blue header with a hamburger menu.
   Colour roles: white / soft grey backgrounds; sky blue for structure (header, input borders, selectors);
   hot pink only for actions (search buttons, zoom controls, loaders, the answer highlight box). */
:root {
  --stoa-white: #FFFFFF;
  --stoa-soft: #F8F9FA;
  --stoa-sky: #87CEEB;
  --stoa-sky-soft: #E7F6FC;
  --stoa-sky-deep: #1D6A8C;   /* sky family, dark enough for text and links on white */
  --stoa-pink: #FF1493;
  --stoa-pink-dark: #D60F7B;
  --stoa-ink: #14232B;
  --stoa-muted: #5B6970;
  --stoa-line: #E3E8EC;
  --stoa-font: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Global font. `html body …` outranks the pages' own `body` rules whatever order the stylesheets load in. */
html body, html body button, html body input, html body select, html body textarea { font-family: var(--stoa-font); }
html body { -webkit-font-smoothing: antialiased; background-color: var(--stoa-soft); }

/* Shared action and structure styles for pages that use the common class names. */
/* Dark charcoal on hot pink: white on #FF1493 is ~3.5:1 (fails AA for body text); #202124 is ~6:1. */
html body button.primary { background: var(--stoa-pink); border-color: var(--stoa-pink); color: #202124; }
html body button.primary:hover { background: var(--stoa-pink); border-color: var(--stoa-pink); }   /* hover is the lift below; a darker pink would drop charcoal text to ~3:1 */
/* Tactile lift for pink actions on every page: top highlight, contact shadow, soft tinted glow; press settles. */
html body button.primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(20, 35, 43, .14), 0 4px 12px -3px rgba(255, 20, 147, .45);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease; }
html body button.primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 4px rgba(20, 35, 43, .14), 0 10px 22px -6px rgba(255, 20, 147, .55); }
html body button.primary:active { transform: translateY(0); box-shadow: inset 0 1px 2px rgba(20, 35, 43, .22), 0 1px 1px rgba(20, 35, 43, .10); }
@media (prefers-reduced-motion: reduce) { html body button.primary { transition: none; } html body button.primary:hover { transform: none; } }
html body input[type=text], html body input[type=search], html body select { border-color: var(--stoa-sky); }
html body :focus-visible { outline: 3px solid var(--stoa-pink); outline-offset: 2px; }

/* ---------- Header ---------- */
/* Frosted glass: translucent white over a 12px blur, hairline border. Sticky, so page content scrolls beneath it
   and the blur has something to frost. No solid colour block. */
.productHeader { position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 16px; display: flex; align-items: center; gap: 12px; flex: none;
  background: rgba(255, 255, 255, 0.75); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid #E5E7EB; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .productHeader { background: rgba(255, 255, 255, 0.96); }   /* no blur available: stay readable */
}
.productHeader .productBrand { font: 750 28px/1 var(--stoa-font); letter-spacing: -1.5px; color: var(--stoa-ink); text-decoration: none; }
.productHeader .productBrand span { color: var(--stoa-sky); }

/* Floating glass pill (segmented control), centred in the header. Selectors name the nav element so they
   outrank product.css's older `.productHeader nav` rules on the Schedules and 3D pages. */
.productHeader nav.navPill { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
  display: flex; align-items: center; gap: 2px; padding: 4px; white-space: nowrap; overflow: visible;
  background: rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid #E5E7EB; border-radius: 999px; font: 500 14px/1 var(--stoa-font);
  box-shadow: 0 1px 2px rgba(20, 35, 43, .04), 0 6px 18px -8px rgba(20, 35, 43, .14); }
.productHeader nav.navPill > a, .productHeader .navPill .menuToggle {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 14px; border: 0; border-radius: 999px;
  color: #5F6368; background: transparent; text-decoration: none; cursor: pointer; font: inherit;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.productHeader nav.navPill > a:hover, .productHeader .navPill .menuToggle:hover, .productHeader .navPill .menuToggle[aria-expanded="true"] { color: var(--stoa-ink); background: rgba(20, 35, 43, .05); }
/* Current page: a raised white segment with a sky edge. */
.productHeader nav.navPill > a.on { color: var(--stoa-ink); font-weight: 650; background: #fff; border: 0; padding-bottom: 0;
  box-shadow: 0 0 0 1px rgba(135, 206, 235, .9), 0 1px 3px rgba(20, 35, 43, .12); }
.productHeader .navPill .menuToggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.productHeader .navMore { position: relative; }
/* On 3D models or Overview, More shows as the active segment (it's the only cue on phones, where it's an icon). */
.productHeader .navMore:has(a.on) .menuToggle { color: var(--stoa-ink); font-weight: 650; background: #fff;
  box-shadow: 0 0 0 1px rgba(135, 206, 235, .9), 0 1px 3px rgba(20, 35, 43, .12); }

/* "More" dropdown (3D models, Overview). */
.productHeader .siteMenu { position: absolute; top: calc(100% + 10px); right: 0; margin: 0; width: 232px; padding: 8px;
  display: flex; flex-direction: column; gap: 2px; white-space: normal;
  background: var(--stoa-white); border: 1px solid var(--stoa-line); border-radius: 14px; box-shadow: 0 12px 32px #14232b29, 0 2px 6px #14232b14;
  font: 15px/1.2 var(--stoa-font); animation: stoaMenuIn .14s ease-out; }
.productHeader .siteMenu[hidden] { display: none !important; }
.productHeader .siteMenu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; border: 0;
  color: var(--stoa-ink); text-decoration: none; font-weight: 500; }
.productHeader .siteMenu a:hover { background: var(--stoa-soft); }
.productHeader .siteMenu a.on { background: var(--stoa-sky-soft); font-weight: 650; padding-bottom: 10px; border: 0; }
.productHeader .siteMenu svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--stoa-sky-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.productHeader .siteMenu .productLocal { display: block; margin: 6px 12px 4px; padding-top: 8px; border-top: 1px solid var(--stoa-line); font: 12px var(--stoa-font); color: var(--stoa-muted); }
/* Slide only, no fade: the menu is always fully opaque, even if an animation frame is skipped. */
@keyframes stoaMenuIn { from { transform: translateY(-4px); } to { transform: none; } }

/* Analytics: the one standout button. Frosted white, hot-pink text and a soft pink glow that intensifies on hover. */
@media (prefers-reduced-motion: reduce) { .productHeader .siteMenu { animation: none; } .productHeader nav.navPill > a { transition: none; } }

/* Narrower screens: the pill joins the flow between brand and Analytics. */
@media (max-width: 900px) {
  .productHeader nav.navPill { position: static; transform: none; margin: 0 auto; }
}
/* Phones: drop the brand, the pill takes the space and scrolls if needed (More stays reachable), Analytics becomes an icon. */
@media (max-width: 700px) {
  .productHeader { height: 52px; padding: 0 10px; gap: 8px; }
  .productHeader .productBrand { display: none; }
  .productHeader nav.navPill { flex: 1; min-width: 0; margin: 0; justify-content: space-between; font-size: 13px; }
  .productHeader nav.navPill > a, .productHeader .navPill .menuToggle { padding: 0 9px; height: 36px; }   /* taller touch targets */
  .productHeader .navPill .menuToggle { padding: 0 8px; }
  .productHeader .navPill .menuToggle span { display: none; }   /* icon-only "More" so the pill fits; aria-label keeps its name */
  /* The pill's backdrop-filter makes it the containing block, so anchor the dropdown to its right edge. */
  .productHeader .navMore { position: static; }
  .productHeader .siteMenu { right: 0; top: calc(100% + 8px); }
}

/* Pages with their own big wordmark (body.minimal, e.g. Drawings) hide the header brand. */
body.minimal .productHeader .productBrand { visibility: hidden; }

@media (max-width: 360px) { .productHeader nav.navPill > a { padding: 0 7px; } }
