/* Site chrome: the header, the mobile menu and the footer, shared by every page.

   The markup is ONE partial each (_src/templates/partials/header.html and footer.html),
   stamped into every page between <!-- chrome:... --> marker comments by _src/build.mjs.
   These rules used to live in three copies (index.html's inline CSS, assets/legal.css and
   assets/guidance.css) that had drifted; this file replaces all three.

   Colour and type tokens (--paper, --ink, --ink-soft, --line, --line-soft, --ember,
   --ember-deep, --amber, --sans) come from the page: index.html's inline :root or
   assets/legal.css. Load order: fonts.css, site.css, then the page's own CSS. */

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 60;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px;
  padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,248,243,.88); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; display: block; }
/* Right-aligned (Nathan, September 23, 2026). */
.nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--ink-soft); font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"],
.nav-links a[aria-current="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ember); padding: 4px 0; }
.nav-cta { display: flex; align-items: center; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: 11px;
  color: var(--ink); cursor: pointer;
}
.nav-toggle:hover { background: rgba(21,26,45,.04); }
.nav-toggle svg { width: 19px; height: 19px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-panel { display: none; border-top: 1px solid var(--line-soft); background: var(--paper); }
.nav-panel.open { display: block; }
.nav-panel nav { padding-top: 6px; padding-bottom: 16px; }
.nav-panel a {
  display: block; padding: 13px 0; color: var(--ink-soft);
  font-size: 16.5px; font-weight: 500; border-bottom: 1px solid var(--line-soft);
}
.nav-panel a:last-child { border-bottom: 0; }
.nav-panel a:hover { color: var(--ink); text-decoration: none; }
.nav-panel a[aria-current] { color: var(--ink); font-weight: 600; }
/* Six links need 1040px (measured when Guidance was added). */
@media (max-width: 1040px) { .nav-links { display: none; } .nav-toggle { display: inline-flex; } }
@media (min-width: 1041px) { .nav-panel { display: none !important; } .nav-cta { display: none; } }
@media (max-width: 420px) {
  .brand { font-size: 17.5px; gap: 9px; }
  .brand svg { width: 27px; height: 27px; }
}
header.site a:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--ember-deep); outline-offset: 3px; border-radius: 4px; }

/* ---------- Footer ---------- */
footer.site { background: var(--ink); color: #AEB4C6; padding: 44px 0 40px; border-top: 1px solid rgba(255,255,255,.08); }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.foot-brand svg { width: 26px; height: 26px; display: block; }
.foot-links { display: flex; gap: 12px 26px; flex-wrap: wrap; font-size: 15px; }
footer.site a { color: #AEB4C6; }
footer.site a:hover { color: #fff; text-decoration: none; }
footer.site a[aria-current="page"] { color: #fff; }
footer.site a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
/* #8C93A6 on the ink band: 5.6:1 (was #7A8195, 4.44:1; C1-25). */
.foot-legal { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #8C93A6; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Reduced motion: every page (the Guidance pages add their own card rule in guidance.css). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn-primary:hover { transform: none; }
}

@media print {
  .skip-link, header.site, .nav-panel { display: none !important; }
}
