.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* 3 columns (logo | nav | actions), logo/actions sized to content and nav-links
   centred in whatever space is left between them - not just left-packed against the logo. */
.site-header__bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-6);
  height: 64px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  text-decoration: none !important;
}

.site-brand__mark {
  height: 28px;
  width: auto;
  display: block;
  /* The mark is now inline <svg> (see Controls/BrandMark.ascx) with its "M" painted in
     fill="currentColor" - this is what that color resolves to. Explicit rather than relying on
     inherited text color so it's correct even in contexts (muted footer text, etc.) that override
     color on an ancestor. */
  color: var(--fg);
}

.site-brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--fg);
  white-space: nowrap;
}
.site-brand__word em {
  font-style: normal;
  color: var(--accent-ink);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.site-nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: var(--sp-2) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--fg);
  border-radius: var(--r-2);
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--accent-ink); }
.icon-btn:active { transform: scale(0.94); }

.search-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--muted);
  border-radius: var(--r-2);
  padding: 7px var(--sp-3);
  font-size: 13px;
  transition: border-color var(--transition-fast);
}
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-1);
  padding: 1px 5px;
  background: var(--surface);
  color: var(--muted);
}

/* Box styling (size/border/hover) comes from .icon-btn, shared with search/theme so all three
   header action buttons line up identically (reported bug: the hamburger sat apart from the
   other two, and the search button was a different size). This rule only ever needs to
   override display - hidden by default, shown at mobile widths (responsive.css). */
.nav-toggle { display: none; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--sp-9);
  padding: var(--sp-7) 0;
}

.site-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.site-footer__brand .site-brand__mark { height: 22px; }

.site-footer__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

.site-footer__meta a { text-decoration: none; color: var(--muted); }
.site-footer__meta a:hover { color: var(--accent-ink); }

.site-footer__legal {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* ---------- Page scaffolding ---------- */

.page-head {
  padding: var(--sp-7) 0 var(--sp-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-7);
}

.page-head__eyebrow { margin-bottom: var(--sp-3); }

.page-head__title {
  font-size: clamp(32px, 5vw, 52px);
  margin: 0;
}

.page-head__desc {
  margin-top: var(--sp-3);
  color: var(--muted);
  max-width: 640px;
  font-size: 17px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.section-label__text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.section-label__rule {
  height: 1px;
  background: var(--border);
  flex: 1;
}

.main-content { min-height: 50vh; }
