@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #003e7e;
  --teal: #007e82;
  --bright-teal: #26b2a6;
  --pale-teal: #eef7f6;
  --ink: #212529;
  --muted: #515b64;
  --line: #dce3e7;
  --paper: #fff;
  font-family: "Barlow", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 18px; }
body * { letter-spacing: 0; }
a { color: var(--teal); text-underline-offset: 4px; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--blue); font-family: "Barlow", "Segoe UI", sans-serif; font-weight: 700; }
h1 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 54px; line-height: 1.04; text-transform: uppercase; }
main, .masthead-inner, .footer-inner { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
main { min-height: calc(100vh - 210px); padding-bottom: 72px; }
.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; }

.masthead { background: var(--blue); color: white; }
.masthead-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand img { display: block; width: 230px; height: auto; max-height: 55px; object-fit: contain; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 28px; font-size: 17px; }
.top-nav a { color: white; text-decoration: none; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.footer { padding: 26px 0; border-top: 6px solid var(--bright-teal); background: var(--blue); color: white; font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; }
.footer-inner a { color: white; }

.eyebrow { margin-bottom: 9px; color: var(--teal); font-size: 15px; font-weight: 700; }
.page-intro { padding: 37px 0 31px; border-bottom: 5px solid var(--bright-teal); }
.page-intro h1 { max-width: 950px; margin-bottom: 12px; font-size: 62px; }
.intro-copy { max-width: 820px; margin-bottom: 21px; font-size: 20px; line-height: 1.5; }
.quick-search { display: flex; width: min(690px, 100%); min-height: 48px; border: 1px solid #a5b2bd; background: white; }
.quick-search input { min-width: 0; flex: 1; padding: 0 13px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.text-link { display: inline-block; margin-top: 10px; font-weight: 700; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--teal); color: white; }
.button-outline { border-color: var(--teal); background: white; color: var(--teal); }
.button-outline:hover { background: var(--pale-teal); color: var(--blue); }

.archive-section { padding-top: 27px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 22px; margin-bottom: 12px; }
.section-heading h2 { margin-bottom: 0; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 35px; text-transform: uppercase; }
.section-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.era-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 38px; }
.era-row { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 19px; align-items: start; padding: 20px 0; border-top: 1px solid var(--line); }
.era-image { width: 75px; height: 75px; object-fit: cover; }
.era-content h3 { margin: 0 0 10px; font-size: 22px; line-height: 1.2; }
.topic-links, .plain-list { display: flex; flex-wrap: wrap; gap: 5px 15px; margin: 0; padding: 0; list-style: none; }
.topic-links li { font-size: 16px; line-height: 1.5; }
.topic-links a, .plain-list a { text-decoration-thickness: 1px; text-decoration-color: #98c9ca; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 18px 0 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.breadcrumbs a { text-decoration: none; }
.page-heading { padding: 27px 0 21px; border-bottom: 5px solid var(--bright-teal); }
.page-heading h1 { margin-bottom: 10px; }
.page-heading > p:last-child { max-width: 780px; margin-bottom: 0; font-size: 18px; line-height: 1.5; }
.source-jump { display: inline-flex; align-items: center; gap: 10px; margin-top: 2px; color: var(--teal); font-size: 16px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.source-jump:hover { color: var(--blue); }
.source-jump-icon { font-size: 20px; line-height: 1; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; align-items: start; padding-top: 30px; }
.essay { max-width: 790px; }
.prose { font-size: 18px; line-height: 1.72; }
.prose > :last-child { margin-bottom: 0; }
.prose a { overflow-wrap: anywhere; }
.essay-copy.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  line-clamp: 8;
}
.essay-more { margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--teal); font: inherit; font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.essay-more:hover { color: var(--blue); }
.page-aside, .record-aside { border-top: 4px solid var(--bright-teal); }
.aside-section { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.aside-section h2 { margin-bottom: 10px; font-size: 19px; }
.aside-section p { margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.plain-list { display: grid; gap: 9px; }
.plain-list > li > .plain-list { margin: 4px 0 0 14px; }
.source-section { margin-top: 48px; padding-top: 22px; border-top: 5px solid var(--bright-teal); scroll-margin-top: 20px; }
.source-group { padding: 14px 0 17px; border-bottom: 1px solid var(--line); }
.source-group-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.source-group-heading h3 { margin: 0; font-size: 21px; }
.source-count { color: var(--muted); font-size: 13px; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; margin: 0; padding: 0; list-style: none; }
.source-list li { padding: 8px 0; }
.source-list a { font-size: 16px; line-height: 1.4; }

.search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 58px; align-items: start; padding-top: 27px; }
.search-main { max-width: 800px; }
.form-intro { margin-bottom: 21px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.form-error { margin: -9px 0 17px; padding: 10px 12px; border-left: 4px solid #b33d33; background: #fff5f3; color: #77251f; font-size: 15px; }
.advanced-form { display: grid; gap: 23px; }
.filter-group { min-width: 0; margin: 0; padding: 0 0 23px; border: 0; border-bottom: 1px solid var(--line); }
.filter-group legend { width: 100%; margin-bottom: 15px; color: var(--blue); font-size: 22px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { color: var(--blue); font-size: 15px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 45px; padding: 8px 10px; border: 1px solid #a5b2bd; border-radius: 0; background: white; color: var(--ink); font: inherit; font-size: 16px; }
.subject-filters { border-bottom: 1px solid var(--line); }
.subject-filters summary { padding: 0 0 17px; color: var(--teal); font-size: 17px; font-weight: 700; cursor: pointer; }
.subject-filters[open] summary { margin-bottom: 15px; }
.subject-filters > p { margin: -2px 0 17px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.subject-rows { display: grid; gap: 13px; padding-bottom: 20px; }
.subject-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; align-items: end; }
.and-label { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.form-actions { display: flex; flex-wrap: wrap; gap: 11px 20px; align-items: center; }
.form-actions .text-link { margin: 0; }
.search-aside { padding-top: 3px; }

.filter-summary { display: flex; flex-wrap: wrap; gap: 7px 10px; margin: 0; padding: 0; list-style: none; }
.filter-summary li { padding: 5px 9px; border-left: 3px solid var(--bright-teal); background: var(--pale-teal); color: var(--blue); font-size: 14px; font-weight: 700; }
.results-section { padding-top: 18px; }
.results-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.results-toolbar p { margin: 0; font-size: 16px; }
.results-toolbar strong { color: var(--blue); }
.results-toolbar .text-link { margin: 0; }
.result-list { margin: 0; padding: 0; list-style: none; }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 19px 0; border-bottom: 1px solid var(--line); }
.result-type { margin: 0 0 4px; color: var(--teal); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.result-row h2 { margin: 0 0 5px; font-size: 20px; line-height: 1.3; }
.result-row h2 a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.result-title { margin: 0; color: var(--muted); font-size: 14px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 19px 0; }
.pagination p { margin: 0; color: var(--muted); font-size: 14px; }
.pagination-links { display: flex; gap: 16px; }
.pagination-links a { font-weight: 700; }
.empty-state { padding: 30px 0; }
.empty-state h2 { margin-bottom: 8px; font-size: 23px; }
.empty-state p { color: var(--muted); }

.record-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; padding: 27px 0 23px; border-bottom: 5px solid var(--bright-teal); }
.record-heading h1 { max-width: 850px; margin: 8px 0; font-size: 46px; }
.record-badge { display: inline-block; padding: 4px 9px; border-left: 3px solid var(--bright-teal); background: var(--pale-teal); color: var(--blue); font-size: 13px; font-weight: 700; }
.record-deck { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.5; }
.document-action { white-space: nowrap; }
.record-main > .document-action { display: flex; width: fit-content; margin: 0 0 22px; }
.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 58px; align-items: start; padding-top: 28px; }
.record-main { max-width: 790px; }
.record-prose h2, .citation-block h2 { margin-bottom: 13px; font-size: 22px; }
.citation-block { margin-top: 30px; padding-top: 19px; border-top: 1px solid var(--line); }
.citation-block p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.metadata-list { display: grid; gap: 12px; margin: 0; }
.metadata-list div { display: grid; gap: 3px; }
.metadata-list dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.metadata-list dd { margin: 0; font-size: 15px; line-height: 1.45; }
.external-note { padding: 12px; background: var(--pale-teal); color: var(--blue); font-size: 14px; line-height: 1.45; }
.record-navigation { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; margin-top: 35px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.record-navigation a { font-size: 15px; font-weight: 700; text-decoration: none; }

.page-error .page-heading { min-height: 310px; }
.page-error .button { margin-top: 19px; }

@media (max-width: 820px) {
  main, .masthead-inner, .footer-inner { width: calc(100% - 40px); }
  .masthead-inner { min-height: 72px; gap: 12px 20px; }
  .top-nav { gap: 10px 18px; font-size: 15px; }
  .era-grid { grid-template-columns: 1fr; }
  .content-layout, .search-layout, .record-layout { grid-template-columns: 1fr; gap: 25px; }
  .page-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .record-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .record-heading { grid-template-columns: 1fr; gap: 17px; }
}

@media (max-width: 540px) {
  body { font-size: 17px; }
  main, .masthead-inner, .footer-inner { width: calc(100% - 32px); }
  .masthead-inner { min-height: 70px; flex-wrap: wrap; gap: 9px 14px; padding: 10px 0; }
  .brand img { width: 195px; }
  .top-nav { width: 100%; justify-content: flex-start; gap: 8px 20px; font-size: 15px; }
  .page-intro { padding-top: 28px; }
  .page-intro h1 { font-size: 44px; }
  h1 { font-size: 40px; }
  .intro-copy { font-size: 18px; }
  .quick-search { min-height: 45px; }
  .quick-search .button { padding-inline: 12px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 6px; }
  .section-heading h2 { font-size: 31px; }
  .era-row { grid-template-columns: 60px minmax(0, 1fr); gap: 13px; }
  .era-image { width: 60px; height: 60px; }
  .era-content h3 { font-size: 20px; }
  .field-grid, .subject-row, .page-aside, .record-aside { grid-template-columns: 1fr; }
  .field-wide, .and-label { grid-column: auto; }
  .source-list { grid-template-columns: 1fr; }
  .record-heading h1 { font-size: 36px; }
  .result-row { grid-template-columns: 1fr; gap: 11px; }
  .result-row .button { justify-self: start; }
  .results-toolbar { align-items: flex-start; flex-direction: column; }
  .record-navigation { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}