/* The shared header, footer, .btn and .card. Every value is a token from config/theme.json
   (the theme-tokens block in each page's head). Mobile first; 900px is the one breakpoint. */
:root { --header-h: 64px; }
@media (min-width: 900px) { :root { --header-h: var(--header-height, 72px); } }

.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface);
  border-bottom: 1px solid var(--line); font-family: var(--font); color: var(--body); }
.site-header a, .site-header button { -webkit-tap-highlight-color: transparent; }
.site-header :focus-visible, .site-footer :focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sh-skip { position: absolute; left: 12px; top: -100px; z-index: 2; background: var(--navy);
  color: var(--surface); padding: 10px 16px; border-radius: var(--radius-pill); font-weight: 600;
  text-decoration: none; }
.sh-skip:focus { top: 8px; }
.sh-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--header-h); max-width: var(--page-max, 1200px); margin: 0 auto; padding: 0 20px; }
.sh-brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.01em;
  color: var(--navy); text-decoration: none; white-space: nowrap; }
.sh-toggle { width: 44px; height: 44px; margin-right: -10px; display: inline-flex; align-items: center;
  justify-content: center; background: none; border: 0; border-radius: var(--radius-circle, 50%);
  color: var(--navy); cursor: pointer; }
.sh-burger, .sh-burger::before, .sh-burger::after { display: block; width: 22px; height: 2px;
  background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.sh-burger { position: relative; }
.sh-burger::before, .sh-burger::after { content: ""; position: absolute; left: 0; }
.sh-burger::before { top: -7px; }
.sh-burger::after { top: 7px; }
.site-header[data-menu-open] .sh-burger { background: transparent; }
.site-header[data-menu-open] .sh-burger::before { transform: translateY(7px) rotate(45deg); }
.site-header[data-menu-open] .sh-burger::after { transform: translateY(-7px) rotate(-45deg); }

.sh-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-raised);
  max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
.site-header[data-menu-open] .sh-nav { display: block; }
.sh-list { list-style: none; margin: 0; padding: 4px 20px 16px; }
.sh-item { display: grid; grid-template-columns: minmax(0, 1fr) 48px; align-items: center;
  border-bottom: 1px solid var(--line); }
.sh-item:last-child { border-bottom: 0; }
.sh-link, .sh-sublink { color: var(--body); text-decoration: none; font-weight: 600; }
.sh-link { display: block; padding: 14px 0; font-size: 17px; }
.sh-item > .sh-link:only-child { grid-column: 1 / -1; }
.sh-link:hover, .sh-sublink:hover { color: var(--navy); }
.sh-link[aria-current], .sh-sublink[aria-current] { color: var(--navy); }
.sh-sub { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--navy); cursor: pointer; }
.sh-sub svg { transition: transform .2s ease; }
.sh-has-menu[data-open] .sh-sub svg { transform: rotate(180deg); }
.sh-menu { grid-column: 1 / -1; display: none; list-style: none; margin: 0; padding: 0 0 10px 14px; }
.sh-has-menu[data-open] > .sh-menu { display: block; }
.sh-sublink { display: block; padding: 10px 0; font-size: 15.5px; font-weight: 500; }
.sh-sublink[aria-current] { font-weight: 700; }

@media (min-width: 900px) {
  .sh-toggle { display: none; }
  .sh-nav { display: block; position: static; background: none; border: 0; box-shadow: none;
    max-height: none; overflow: visible; }
  .sh-list { display: flex; align-items: center; gap: 2px; padding: 0; }
  .sh-item { position: relative; display: flex; align-items: center; border: 0; }
  .sh-link { position: relative; padding: 10px 12px; font-size: 15px; border-radius: var(--radius-pill); }
  .sh-has-menu > .sh-link { padding-right: 4px; }
  .sh-link[aria-current]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
    height: 2px; border-radius: 2px; background: var(--orange); }
  .sh-has-menu > .sh-link[aria-current]::after { right: 4px; }
  .sh-sub { width: 26px; height: 36px; margin-right: 6px; }
  .sh-menu { position: absolute; left: 0; top: 100%; min-width: 264px; margin-top: 4px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
    box-shadow: var(--shadow-raised); }
  .sh-sublink { padding: 9px 12px; border-radius: var(--radius-sm); }
  .sh-sublink:hover, .sh-sublink:focus-visible { background: var(--sand2); }
}

/* Without JavaScript the parents are ordinary links to their hub pages, and the menus show
   inline (phones) or on hover and focus (desktop). */
@media (scripting: none) {
  .site-header { position: static; }
  .sh-toggle { display: none; }
  .sh-nav { display: block; position: static; box-shadow: none; max-height: none; }
  .sh-menu { display: block; }
}
@media (scripting: none) and (min-width: 900px) {
  .site-header { position: sticky; }
  .sh-menu { display: none; }
  .sh-item:hover > .sh-menu, .sh-item:focus-within > .sh-menu { display: block; }
}

.site-footer { background: var(--navy); color: var(--on-navy); font-family: var(--font);
  font-size: var(--size-sm); line-height: var(--leading-normal); padding: 40px 20px 48px; }
.sf-inner { max-width: var(--page-max, 1200px); margin: 0 auto; display: grid; gap: 28px; }
@media (min-width: 900px) { .sf-inner { grid-template-columns: 1.4fr 1.6fr 1.2fr; gap: 40px; } }
.sf-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--surface);
  text-decoration: none; }
.sf-brand p, .sf-legal p { margin: 8px 0 0; }
.sf-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.sf-nav ul, .sf-legal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; }
.sf-nav a, .sf-legal a { color: var(--brass-light); text-decoration: none; display: inline-block; padding: 4px 0; }
.sf-nav a:hover, .sf-legal a:hover { text-decoration: underline; }
.sf-legal p { color: var(--on-navy); }

/* Buttons and cards, from the button and card groups of config/theme.json. Orange is the
   primary action, navy the secondary. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font-family: var(--font); font-size: var(--size-button); font-weight: var(--weight-bold); line-height: 1.2;
  padding: 11px 22px; border: var(--border-width) solid transparent; border-radius: var(--radius-pill);
  text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-border); }
.btn-primary:hover { background: var(--btn-primary-hover-bg); border-color: var(--btn-primary-hover-border); }
.btn-primary:focus-visible { outline: 2px solid var(--btn-primary-focus-ring); outline-offset: 2px; }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border-color: var(--btn-secondary-border); }
.btn-secondary:hover { background: var(--btn-secondary-hover-bg); border-color: var(--btn-secondary-hover-border); }
.btn-secondary:focus-visible { outline: 2px solid var(--btn-secondary-focus-ring); outline-offset: 2px; }
.btn-ghost { background: var(--btn-ghost-bg); color: var(--btn-ghost-text); border-color: var(--btn-ghost-border); }
.btn-ghost:hover { background: var(--btn-ghost-hover-bg); border-color: var(--btn-ghost-hover-border); }
.btn-ghost:focus-visible { outline: 2px solid var(--btn-ghost-focus-ring); outline-offset: 2px; }
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow); padding: var(--card-padding); }
