/* ─── Site shell: fonts, header, mobile menu, footer ─────────────────────
   Loaded on every page; the markup comes from _build/site_shell.py.
   Layout and breakpoints follow contractual-web's shell.css. Colours are
   var(--*) only (tokens.css); _build/check-colours.py enforces it.

   Breakpoints, shared with site.css:
     < 768   phones (16px gutters, brand sheet space-4)
     768+    tablet (40px gutters)
     1024+   desktop header nav and footer columns
     1200+   content capped at 1200                                       */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/figtree-400.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/figtree-500.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/figtree-600.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/newsreader-500.woff2") format("woff2");
}

:root { --gutter: var(--space-4); }
@media (min-width: 768px) {
  :root { --gutter: max(40px, calc((100% - 1200px) / 2)); }
}

/* ── Skip link ──────────────────────────────────────────────────────────── */
.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: var(--radius-md);
  background: var(--b-ivory);
  color: var(--b-ink);
  font: 600 16px/1 var(--font-sans);
  text-decoration: none;
}
.skip:focus { top: var(--space-2); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.sh {
  position: relative;
  z-index: 50;
  background: var(--b-forest);
  color: var(--b-ivory);
  font-family: var(--font-sans);
}
.sh *, .sf * { box-sizing: border-box; }
.sh-bar {
  height: 68px;
  padding: 0 12px 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sh-brand, .sf-brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.sh-brand img, .sf-brand img { display: block; width: 138px; height: 52px; }

.sh-nav { display: none; }
.sh-compact { display: flex; gap: var(--space-2); align-items: center; }

.sh-link {
  color: var(--b-ivory);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.sh-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: var(--b-brass);
  color: var(--b-ink);
}
.sh-btn:hover { background: var(--b-ivory); color: var(--b-ink); }

.sh-menu-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--cd-text-muted);
  color: var(--b-ivory);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.sh-ico-close { display: none; }
.sh.is-open .sh-ico-open { display: none; }
.sh.is-open .sh-ico-close { display: block; }

/* Mobile menu: a panel that drops over the page below the bar. */
.sh-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--b-forest);
  border-top: 1px solid var(--scrim-band);
  box-shadow: var(--shadow-band);
  padding: var(--space-2) var(--gutter) var(--space-5);
}
.sh-menu[hidden] { display: none; }
.sh-menu ul { list-style: none; margin: 0; padding: 0; }
.sh-menu li + li { border-top: 1px solid var(--scrim-band); }
.sh-menu-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  color: var(--b-ivory);
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .sh-bar { padding: 0 var(--gutter); }
}
@media (min-width: 1024px) {
  .sh-bar { height: 84px; }
  .sh-nav { display: flex; gap: 32px; align-items: center; }
  .sh-compact { display: none; }
  .sh-menu { display: none !important; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.sf {
  background: var(--b-ink);
  color: var(--b-ivory);
  padding: var(--space-7) var(--gutter) 40px;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
.sf p, .sf ul { margin: 0; }
.sf ul { list-style: none; padding: 0; }
.sf .sf-tagline {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.35;
  color: var(--b-ivory);
}
.sf-cols { display: flex; flex-direction: column; gap: 28px; margin-top: var(--space-6); }
.sf-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--b-brass);
}
.sf-col ul { margin-top: 6px; }
.sf a.sf-link {
  color: var(--b-ivory);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.sf a.sf-link:hover { text-decoration: underline; }
.sf-rule { height: 1px; background: var(--scrim-band); margin: var(--space-6) 0 20px; }
.sf-legal { font-size: 13px; line-height: 1.45; color: var(--cd-text-muted); }

@media (min-width: 768px) {
  .sf { padding: 64px var(--gutter) var(--space-7); }
  .sf-cols { flex-direction: row; flex-wrap: wrap; gap: var(--space-6) 64px; }
}
@media (min-width: 1024px) {
  .sf { padding: 80px var(--gutter) 56px; }
  .sf-top { display: flex; justify-content: space-between; gap: 60px; }
  .sf-brandcol { max-width: 320px; }
  .sf-cols { margin-top: 0; gap: 72px; flex-wrap: nowrap; }
  .sf-col ul { margin-top: 14px; }
  .sf a.sf-link { min-height: 32px; }
  .sf-rule { margin: 56px 0 var(--space-5); }
}

/* ── Focus: visible on every interactive element in the shell ──────────── */
.sh a:focus-visible, .sh button:focus-visible, .sf a:focus-visible, .skip:focus-visible {
  outline: 3px solid var(--b-brass);
  outline-offset: 2px;
  border-radius: 6px;
}
