/* chrome.css: the site header (logo, menu, user icon) and footer, for every page.
   styles.css imports it, so any page that loads styles.css gets them; the home page links it directly. nav.js builds the
   markup for pages that do not carry it (and the home page carries its own copy for search engines), and runs the
   submenus. Colours here are the site's own, so the chrome looks the same on a page with any palette of its own. */
@import url('fonts.css?v=1');

.sh-header, .sh-footer {
  --chrome-red: #C00000;
  --chrome-navy: #10222E;
  --chrome-text: #E6EAEF;
  --chrome-soft: #D3D9E1;
  --chrome-muted: #B8C2CE;
  --chrome-bar: linear-gradient(180deg, var(--chrome-red) -100%, var(--chrome-navy) 100%);
  box-sizing: border-box;
}
.sh-header *, .sh-footer * { box-sizing: border-box; }

/* ── Header ──────────────────────────────────────────────────────────── */
.sh-header {
  /* the explicit display, position, box and border keep a page's own `header` rules from reshaping it */
  display: block; position: relative; margin: 0; padding: 0; border: 0; width: 100%;
  background: var(--chrome-bar);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  z-index: 100;
}
.sh-header-inner {
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: 12px clamp(16px, 2.4vw, 44px);
  width: 100%; margin: 0 auto;
  padding: 14px clamp(16px, 3.6vw, 96px);
}
.sh-brand { flex: none; display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.sh-brand:hover { color: #fff; }
.sh-brand img { width: 52px; height: 52px; display: block; }
.sh-brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.sh-brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 22px; white-space: nowrap; }
.sh-brand-tag { font-family: var(--font-sans); font-weight: 400; font-style: italic; font-size: 12.5px; letter-spacing: .01em; color: var(--chrome-muted); }

.sh-menu {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end;
  gap: 4px clamp(14px, 1.8vw, 32px);
}
.sh-menu > a, .sh-sub > a { color: var(--chrome-text); text-decoration: none; padding: 10px 0; white-space: nowrap; }
.sh-menu > a:hover, .sh-sub > a:hover { color: #fff; }
.sh-menu a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 rgba(255,255,255,.55); }

.sh-sub { position: relative; display: flex; align-items: center; }
.sh-caret { background: none; border: 0; padding: 10px 0 10px 6px; color: var(--chrome-muted); cursor: pointer; line-height: 1; }
.sh-caret::before { content: ""; display: block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.sh-caret:hover, .sh-caret:focus-visible { color: #fff; }
.sh-sub.sh-open .sh-caret::before { transform: rotate(-135deg) translateY(-2px); }

.sh-submenu {
  display: none; position: absolute; top: 100%; left: -18px; z-index: 60;
  min-width: 270px; margin: 0; padding: 8px 0; list-style: none;
  background: #0F1B26; border: 1px solid #2A3440; border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.sh-sub--end .sh-submenu { left: auto; right: -18px; }
.sh-menu .sh-submenu a { display: block; padding: 10px 20px; color: var(--chrome-text); text-decoration: none; white-space: normal; line-height: 1.35; }
.sh-menu .sh-submenu a:hover, .sh-menu .sh-submenu a:focus-visible { background: rgba(255,255,255,.08); color: #fff; }
.sh-menu .sh-submenu .sh-soon { display: block; padding: 10px 20px; color: #8A94A1; cursor: default; line-height: 1.35; }
.sh-menu .sh-submenu .sh-soon em { font-size: .9em; }
.sh-sub.sh-open .sh-submenu { display: block; }
@media (hover: hover) and (min-width: 1181px) {
  .sh-sub:hover .sh-submenu, .sh-sub:focus-within .sh-submenu { display: block; }
}

/* The user icon: auth.js puts a sign-in link here when signed out, and the member's photo or initial with a menu when
   signed in. Its own colours are for the old header, so they are set here. */
.sh-header #sh-auth-wrap { flex: none; margin-left: 0 !important; display: flex; align-items: center; }
.sh-header .sh-signin-btn {
  width: 40px; height: 40px; border: 0; border-radius: 50%; padding: 0; background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.sh-header .sh-signin-btn img { display: block; width: 40px; height: 40px; object-fit: contain; }
.sh-header .sh-signin-btn:hover { opacity: .85; }
.sh-header .sh-user-trigger { gap: 6px; }
.sh-header .sh-user-avatar, .sh-header .sh-user-avatar-placeholder { width: 40px; height: 40px; border-color: #6C7B8B; }
.sh-header .sh-user-avatar-placeholder { font-size: 1rem; }
.sh-header .sh-user-name { display: none; }
.sh-header .sh-user-caret { color: var(--chrome-text); }

/* The three-line button: only on narrow screens, where it opens the menu as a list under the bar. */
.sh-burger {
  display: none; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid #6C7B8B; border-radius: 4px;
  background: transparent; cursor: pointer; align-items: center; justify-content: center;
}
.sh-burger span, .sh-burger span::before, .sh-burger span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--chrome-text); border-radius: 1px;
  transition: transform .15s, opacity .15s;
}
.sh-burger span { position: relative; }
.sh-burger span::before { position: absolute; left: 0; top: -6px; }
.sh-burger span::after { position: absolute; left: 0; top: 6px; }
.sh-burger:hover, .sh-burger:focus-visible { background-color: rgba(255,255,255,.12); border-color: #fff; }
.sh-menu-open .sh-burger span { background: transparent; }
.sh-menu-open .sh-burger span::before { transform: translateY(6px) rotate(45deg); }
.sh-menu-open .sh-burger span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  .sh-header-inner { flex-wrap: wrap; }
  .sh-brand { flex: 1 1 0; min-width: 0; }
  .sh-header #sh-auth-wrap { order: 2; }
  .sh-burger { display: flex; order: 3; }
  .sh-menu { display: none; }
  .sh-menu-open .sh-menu {
    display: flex; order: 4; flex: 1 1 100%; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    justify-content: flex-start; gap: 0; margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.18);
  }
  .sh-menu > a, .sh-sub > a { padding: 12px 0; }
  .sh-menu > a, .sh-sub { border-bottom: 1px solid rgba(255,255,255,.08); }
  .sh-sub { flex-wrap: wrap; justify-content: space-between; }
  .sh-sub > a { flex: 1 1 auto; }
  .sh-caret { padding: 14px 6px 14px 20px; }
  .sh-submenu, .sh-sub--end .sh-submenu {
    position: static; flex: 1 1 100%; min-width: 0; margin: 0 0 8px; border: 0; border-left: 2px solid #2A3440;
    border-radius: 0; box-shadow: none; background: transparent;
  }
}
@media (max-width: 640px) {
  .sh-brand-name { font-size: 18px; white-space: normal; }
  .sh-brand-tag { font-size: 12px; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.sh-footer {
  display: block; margin: 0; border: 0; width: 100%;
  background: var(--chrome-bar);
  color: var(--chrome-soft);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  padding: 20px 0;
  margin-top: auto;
}
.sh-footer-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 32px;
  width: 100%; margin: 0 auto; padding: 0 clamp(16px, 3.6vw, 96px);
}
.sh-footer .sh-brand img { width: 36px; height: 36px; }
.sh-footer .sh-brand-name { font-size: 17px; }
.sh-footer-mid { grid-column: 2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.sh-footer-mid a { color: var(--chrome-soft); }
.sh-footer-mid a:hover { color: #fff; }
.sh-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
@media (max-width: 860px) {
  .sh-footer-inner { grid-template-columns: 1fr; justify-items: center; }
  .sh-footer-mid { grid-column: 1; }
}

/* ── One page headline: 48px on a desktop screen, scaling down to 28px on a phone. It is set here for every page, over
   the pages' own hero rules. A small in-app screen title opts out with class="h1-screen". ── */
h1:not(.h1-screen) { font-size: clamp(28px, 4.7vw, 48px) !important; line-height: 1.18 !important; font-weight: 700 !important; }
