/* One public navigation shell, shared by the site and Gazette. */
header.public-header {
  position: relative;
  inset: auto;
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
  background: var(--maroon);
  color: var(--paper);
  border: 0;
  font-family: var(--sans);
  box-sizing: border-box;
}
header.public-header * { box-sizing: border-box; }
header.public-header .wrap {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: calc(100% - 96px);
  max-width: 1360px;
  height: auto;
  margin: 0 auto;
  padding: 24px 0;
}
header.public-header .brand {
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 750;
  line-height: 1;
  font-size: 39px;
  letter-spacing: -.045em;
  white-space: nowrap;
  text-decoration: none;
}
header.public-header .brand span { color: var(--gold); }
header.public-header .tag {
  order: initial;
  display: block;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--paper);
  font: 400 12px/1.55 var(--sans);
  letter-spacing: normal;
}
header.public-header nav {
  position: static;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 22px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
header.public-header nav a {
  display: flex;
  align-items: center;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  font: 400 15px/1.5 var(--sans);
  letter-spacing: normal;
  text-decoration: none;
  white-space: nowrap;
}
header.public-header nav a::after { display: none; }
header.public-header nav a[aria-current=page] {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
header.public-header a:hover { color: var(--gold); }
header.public-header :focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
header.public-header .menu-btn { display: none; }
.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  width: calc(100% - 96px);
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font: 400 14px/1.5 var(--sans);
}
.page-nav > span { color: var(--muted); }
.page-nav a, .page-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--maroon);
}
.page-nav button { margin-left: auto; }
@media (max-width: 1150px) {
  header.public-header .wrap {
    width: calc(100% - 56px);
    grid-template-columns: auto 1fr;
    gap: 16px 24px;
  }
  header.public-header nav {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid var(--on-dark-rule);
  }
  .page-nav { width: calc(100% - 56px); }
}
@media (max-width: 700px) {
  header.public-header .wrap {
    width: calc(100% - 40px);
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 20px 0;
  }
  header.public-header .brand { font-size: clamp(26px, 8.5vw, 33px); }
  header.public-header .tag { grid-column: 1 / -1; grid-row: 2; font-size: 11px; }
  header.public-header .menu-btn {
    grid-column: 2;
    grid-row: 1;
    display: block;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--on-dark-rule);
    border-radius: 3px;
    color: var(--paper);
    background: transparent;
    font: 400 13px/1.5 var(--sans);
    cursor: pointer;
  }
  header.public-header .menu-btn span { margin-left: 7px; }
  header.public-header nav {
    /* The wrap grid is `1fr auto` here; without spanning, the open nav sits in
       column 1 while column 2 stays reserved for .menu-btn, so its links wrap
       early. .tag above spans for the same reason. */
    grid-column: 1 / -1;
    grid-row: 3;
    display: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px 25px;
  }
  header.public-header nav.open { display: flex; }
  html:not(.js-nav) header.public-header nav { display: flex; }
  html:not(.js-nav) header.public-header .menu-btn { display: none; }
  .page-nav { width: calc(100% - 40px); gap: 4px 18px; }
}
/* Motion. The shell shares one vocabulary with the pages it frames: a gold
   rule draws under the link you are about to take, the drawer settles in
   link by link, and same-origin navigation crossfades while the masthead
   holds still. Reduced motion collapses each to its final state. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
header.public-header { view-transition-name: masthead; }
header.public-header a { transition: color var(--d-fast) var(--ease-out); }
header.public-header nav a { position: relative; }
header.public-header nav a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-state) var(--ease-out);
}
header.public-header nav a:hover::after,
header.public-header nav a:focus-visible::after { transform: scaleX(1); }
header.public-header nav a[aria-current=page]::after { display: none; }
@keyframes public-nav-in {
  from { opacity: 0; transform: translateY(-4px); }
}
@media (max-width: 700px) {
  header.public-header nav.open a {
    animation: public-nav-in .28s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 35ms);
  }
  header.public-header nav.open a:nth-child(2) { --i: 1; }
  header.public-header nav.open a:nth-child(3) { --i: 2; }
  header.public-header nav.open a:nth-child(4) { --i: 3; }
  header.public-header nav.open a:nth-child(5) { --i: 4; }
  header.public-header nav.open a:nth-child(6) { --i: 5; }
}
@media (prefers-reduced-motion: reduce) {
  header.public-header * { transition: none; animation: none; }
}
@media print {
  header.public-header, .page-nav { display: none; }
}

/* High-zoom reflow: retain every control when even the compact row cannot fit. */
@media (max-width: 300px) {
  header.public-header .wrap {
    width: calc(100% - 32px);
    grid-template-columns: minmax(0, 1fr);
  }
  header.public-header .brand { font-size: 24px; }
  header.public-header .menu-btn {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  header.public-header .tag { grid-row: 3; }
  header.public-header nav { grid-row: 4; }
  .page-nav { width: calc(100% - 32px); }
}
