:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-alt: #f1eee7;
  --ink: #231f20;
  --muted: #5d5852;
  --faint: #7a746c;
  --border: #d8d1c5;
  --border-strong: #b8aa96;
  --cornell-red: #b31b1b;
  --cornell-red-dark: #8f1414;
  --link: #1261a6;
  --gold: #b38b00;
  --usar-green: #2e7d32;
  --usar-green-dark: #1b5e20;
  --usar-green-bg: #eaf5ea;
  --usar-green-ink: #14401a;
  --footer-bg: #5d1117;
  --footer-ink: #f7ece8;
  --footer-muted: #ddc8c3;
  --footer-link: #fff7f3;
  --focus: 0 0 0 3px rgba(179, 27, 27, 0.22);
  --measure: 74rem;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--sans);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171514;
  --surface: #211f1d;
  --surface-alt: #2b2825;
  --ink: #f4efe8;
  --muted: #d7cfc3;
  --faint: #b9ad9f;
  --border: #514a42;
  --border-strong: #776b5c;
  --cornell-red: #f06a6a;
  --cornell-red-dark: #ff8c8c;
  --link: #8cc7ff;
  --gold: #e0bd47;
  --usar-green: #5cb85c;
  --usar-green-dark: #7fd17f;
  --usar-green-bg: #1c2c1d;
  --usar-green-ink: #cdeecd;
  --footer-bg: #310b0f;
  --footer-ink: #fff2ee;
  --footer-muted: #d8c1bc;
  --footer-link: #fff8f5;
  --focus: 0 0 0 3px rgba(240, 106, 106, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: inherit;
  line-height: 1.5;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--cornell-red-dark);
}

button,
input,
summary {
  font-family: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 500;
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: relative;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.masthead__inner,
.primary-nav__inner,
.search-band__inner,
.page-shell,
.site-footer__inner {
  width: min(var(--measure), calc(100% - 2rem));
  margin: 0 auto;
}

.masthead {
  border-top: 5px solid var(--cornell-red);
}

.masthead__inner {
  min-height: 6.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 0;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand-mark {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.brand-kicker,
.eyebrow {
  color: var(--cornell-red-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.03;
  overflow-wrap: anywhere;
}

.brand-tagline {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.94rem;
  font-style: italic;
}

.masthead__tools {
  display: grid;
  justify-items: end;
  gap: 0.75rem;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.theme-switcher__button {
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-switcher__button:last-child {
  border-right: 0;
}

.theme-switcher__button.is-active {
  background: var(--cornell-red-dark);
  color: #fff;
}

.primary-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.primary-nav__inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: visible;
}

.primary-nav a {
  min-height: 3rem;
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  padding: 0.72rem 0.82rem;
  border-left: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.primary-nav a:last-child {
  border-right: 1px solid var(--border);
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--cornell-red-dark);
}

.primary-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px var(--cornell-red-dark);
}

.primary-nav__related {
  margin-left: auto;
}

.search-band {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.search-band__inner {
  display: grid;
  grid-template-columns: minmax(16rem, 0.72fr) minmax(20rem, 1.28fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3vw, 2rem) 0;
}

.search-band h1 {
  margin: 0.2rem 0 0;
  max-width: 28rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.08;
  font-weight: 700;
}

.search-band__copy {
  align-self: center;
}

.citation-search {
  align-self: center;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(12rem, auto) minmax(4rem, 0.32fr) minmax(5.25rem, 0.4fr) minmax(10rem, 1fr) minmax(4.75rem, auto);
  align-items: end;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
}

.citation-search > * {
  min-width: 0;
}

.citation-search__modes {
  display: flex;
  min-width: 12rem;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--border);
  padding: 0;
  margin: 0;
  background: var(--surface);
}

.citation-search__mode {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.citation-search__mode:last-child {
  border-right: 0;
}

.citation-search__mode input {
  accent-color: var(--cornell-red);
}

.citation-search__mode.is-active {
  background: var(--cornell-red);
  color: #fff;
}

.citation-search .field {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.citation-search label {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.citation-search input,
.title-browser__header input {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: inherit;
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
}

.citation-search input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid var(--cornell-red-dark);
  background: var(--cornell-red);
  color: #fff;
  padding: 0.55rem 1rem;
  font-weight: 800;
  cursor: pointer;
}

.button:hover,
.button:focus {
  background: var(--cornell-red-dark);
}

.page-shell {
  flex: 1;
  padding: clamp(1rem, 2.5vw, 2rem) 0 2.5rem;
}

.research-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding-top: 1.25rem;
}

.title-browser {
  background: var(--surface);
  border: 1px solid var(--border);
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.title-browser__header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.title-browser__header h2 {
  margin: 0 0 0.65rem;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.title-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
}

.title-item {
  border-bottom: 1px solid var(--border);
}

.title-item:last-child {
  border-bottom: 0;
}

.title-item button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 1rem;
  text-align: left;
  cursor: pointer;
}

.title-item button:hover,
.title-item button:focus,
.title-item.active button {
  background: var(--surface-alt);
}

.title-item.active button {
  box-shadow: inset 4px 0 0 var(--cornell-red);
}

.title-item__label {
  color: var(--cornell-red-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title-item__heading {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.25;
}

.title-browser__footer {
  border-top: 1px solid var(--border);
  padding: 0.8rem 1rem;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 0.85rem;
}

.title-browser__footer p {
  margin: 0;
}

.document-viewer {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(1rem, 2.2vw, 1.75rem);
}

.document-message {
  color: var(--cornell-red-dark);
  font-weight: 700;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.breadcrumbs span::after,
.breadcrumbs button::after {
  content: "/";
  margin: 0 0.25rem;
  color: var(--border-strong);
}

.breadcrumbs span:last-child::after,
.breadcrumbs button:last-child::after {
  content: none;
}

.breadcrumb-link {
  border: 0;
  background: transparent;
  color: var(--link);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.breadcrumb-link:hover,
.breadcrumb-link:focus {
  color: var(--cornell-red-dark);
  text-decoration: underline;
}

.toc-highlight {
  animation: toc-highlight-flash 1.5s ease-out;
}

@keyframes toc-highlight-flash {
  0% {
    box-shadow: inset 4px 0 0 var(--cornell-red), 0 0 0 2px var(--cornell-red);
  }
  100% {
    box-shadow: none;
  }
}

.title-overview {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.title-overview h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1.15;
}

.title-overview p,
.overview-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-weight: 700;
}

.toc-container {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.toc-container[data-state="collapsed"] .toc {
  display: none;
}

.toc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toc-toolbar h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.toc-toggle,
.section-toggle__button {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.toc {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 0.7rem;
}

.toc details {
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 0.55rem;
}

.toc details[open] {
  border-left: 4px solid var(--cornell-red);
}

.toc summary {
  cursor: pointer;
  list-style: none;
  padding: 0.62rem 0.75rem;
  font-family: var(--serif);
  font-weight: 700;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc .toc-children {
  padding: 0 0.65rem 0.75rem 1rem;
  display: grid;
  gap: 0.4rem;
}

.section-link {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.section-link:hover,
.section-link:focus,
.section-link.active {
  border-color: var(--cornell-red);
  color: var(--cornell-red-dark);
}

.section-link.active {
  box-shadow: inset 4px 0 0 var(--cornell-red);
  font-weight: 800;
}

.search-results {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 1rem;
  margin: 1rem 0;
}

.search-results__summary h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.search-results__summary p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.search-results__list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.search-results__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cornell-red);
  padding: 0.85rem 1rem;
}

.search-results__title {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results__button {
  border: 0;
  background: transparent;
  color: var(--link);
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.search-results__button:hover,
.search-results__button:focus {
  color: var(--cornell-red-dark);
}

.search-results__snippet {
  margin: 0.65rem 0 0;
  color: var(--ink);
}

.search-results__snippet mark {
  background: rgba(179, 139, 0, 0.28);
  color: inherit;
  padding: 0 0.1rem;
}

.search-results__note {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.section-content {
  margin-top: 1rem;
}

.section-content header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.section-heading-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
}

.section-number {
  color: var(--cornell-red-dark);
  font-weight: 800;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}

.section-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.section-toggle__button {
  border: 0;
  border-right: 1px solid var(--border);
}

.section-toggle__button:last-child {
  border-right: 0;
}

.section-toggle__button.is-active {
  background: var(--cornell-red);
  color: #fff;
}

.section-panels {
  position: relative;
}

.section-panel {
  display: none;
  margin-top: 1.1rem;
}

.section-panels[data-view="statute"] .section-panel--statute,
.section-panels[data-view="notes"] .section-panel--notes {
  display: block;
}

.section-empty {
  margin: 1rem 0 0;
  color: var(--muted);
  font-style: italic;
}

.section-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.section-pagination__link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  padding: 0.65rem 0.85rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.section-pagination__link:hover,
.section-pagination__link:focus {
  border-color: var(--cornell-red);
}

.section-pagination__link--next {
  text-align: right;
  align-items: flex-end;
}

.section-pagination__kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-pagination__label {
  font-family: var(--serif);
  font-weight: 700;
}

.usc-body {
  display: grid;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.58;
}

.usc-paragraph,
.usc-subsection,
.usc-item,
.usc-clause,
.usc-subparagraph,
.usc-subclause,
.usc-subitem,
.usc-level {
  border-left: 3px solid var(--border-strong);
  padding: 0.4rem 0 0.4rem 0.6rem;
}

.usc-chapeau,
.usc-continuation {
  margin: 0.35rem 0;
}

.usc-marker {
  color: var(--cornell-red-dark);
  font-family: var(--sans);
  font-weight: 800;
  margin-right: 0.35rem;
}

button.usc-marker,
button.section-number {
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.usc-marker--link {
  cursor: pointer;
}

.usc-marker--link:hover,
.usc-marker--link:focus-visible {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.usc-text p {
  margin: 0.35rem 0;
}

.usc-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  background: var(--surface-alt);
}

.usc-note h3 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.08rem;
}

/* Notes added by USAR public-law codification get a distinct green
   treatment so readers can tell them apart from ordinary OLRC notes at a
   glance, without relying on color alone (see the badge below). */
.usc-note--usar {
  border-left-color: var(--usar-green);
  background: var(--usar-green-bg);
}

.usc-note--usar h3 {
  color: var(--usar-green-ink);
}

.usc-note__badge {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--usar-green-dark);
  border-radius: 999px;
  background: var(--usar-green);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.usc-quoted {
  margin: 0.75rem 0;
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
  color: var(--muted);
}

.usc-footnote-marker {
  font-size: 0.75em;
  font-weight: 700;
  text-decoration: none;
  color: var(--cornell-red-dark);
  padding: 0 0.1em;
}

.usc-footnotes {
  margin-top: 1.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
}

.usc-footnotes h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.usc-footnotes ol {
  margin: 0;
  padding-left: 1.3rem;
}

.usc-footnotes li {
  margin: 0.3rem 0;
}

.usc-footnote-backref {
  margin-left: 0.3rem;
  text-decoration: none;
}

.button:focus-visible,
.theme-switcher__button:focus-visible,
.toc-toggle:focus-visible,
.section-link:focus-visible,
.section-toggle__button:focus-visible,
.title-item button:focus-visible,
.primary-nav a:focus-visible,
.usc-marker--link:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.usc-copy-toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translate(-50%, 10px);
  background: rgba(20, 18, 16, 0.94);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.usc-copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-footer {
  margin-top: auto;
  padding: 1.7rem 0 1.35rem;
  border-top: 5px solid var(--gold);
  background: var(--footer-bg);
  color: var(--footer-ink);
}

.site-footer__inner {
  font-size: 0.86rem;
}

.site-footer p {
  margin: 0;
}

.footer-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer a {
  color: var(--footer-link);
}

.site-footer a:hover {
  color: #fff;
}

.nara-attribution {
  max-width: 42rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--footer-ink) !important;
  text-decoration: none;
}

.nara-attribution img {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.nara-attribution span {
  font-size: 0.86rem;
}

.nara-attribution strong {
  color: #fff;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.84rem;
}

.footer-source,
.footer-disclaimer {
  max-width: 60rem;
  color: var(--footer-muted);
}

.footer-source {
  margin-top: 1.2rem !important;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
}

.footer-disclaimer {
  margin-top: 0.55rem !important;
  font-size: 0.74rem;
}

@media (max-width: 1050px) {
  .search-band__inner,
  .research-layout {
    grid-template-columns: 1fr;
  }

  .title-browser {
    position: static;
    max-height: none;
  }

}

@media (max-width: 760px) {
  .masthead__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead__tools {
    width: 100%;
    justify-items: start;
  }

  .theme-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .theme-switcher__button {
    flex: 1;
    min-width: 0;
    padding-inline: 0.4rem;
  }

  .primary-nav__inner {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .primary-nav a {
    flex: 1 1 50%;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }

  .primary-nav__related {
    margin-left: 0;
  }

  .footer-primary {
    display: grid;
  }

  .search-band h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .citation-search {
    grid-template-columns: 1fr 1fr;
  }

  .citation-search__modes,
  .citation-search__keyword,
  .button {
    grid-column: 1 / -1;
  }

  .section-header {
    flex-direction: column;
  }

  .section-toggle {
    width: 100%;
  }

  .section-toggle__button {
    flex: 1;
  }

  .section-pagination {
    grid-template-columns: 1fr;
  }

  .section-pagination__link--next {
    text-align: left;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .masthead__inner,
  .primary-nav__inner,
  .search-band__inner,
  .page-shell,
  .site-footer__inner {
    width: min(100% - 1rem, var(--measure));
  }

  .brand {
    align-items: flex-start;
    width: 100%;
  }

  .brand-mark {
    width: 3.6rem;
    height: 3.6rem;
  }

  .brand-title {
    font-size: clamp(1.5rem, 9vw, 2.2rem);
    line-height: 1.05;
  }

  .brand-tagline {
    font-size: 0.8rem;
  }

  .primary-nav a {
    padding: 0.7rem 0.75rem;
  }

  .citation-search {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
