@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap");

/*
  Wicomico County MDGenWeb
  Master stylesheet for the entire redesigned site.
  Homepage, interior indexes, and individual record pages all use this file.
*/

:root {
  --ink: #172a36;
  --navy: #173d55;
  --navy-deep: #102f43;
  --river: #4f7f98;
  --river-pale: #eaf1f4;
  --gold: #c59a52;
  --gold-pale: #f4ead7;
  --cream: #fbfaf6;
  --paper: #ffffff;
  --red: #a7463f;
  --line: #d9e0e3;
  --muted: #60717b;
  --shadow: 0 12px 28px rgba(23, 42, 54, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f8f8 0, #ffffff 280px, #fbfaf6 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #1d607e;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: #8c3c35;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #e3b863;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  color: #fff;
  background: var(--navy-deep);
  border-radius: 4px;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

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

/* ------------------------------------------------------------
   Shared typography
   ------------------------------------------------------------ */

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.2;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: #405560;
  font-size: 1.12rem;
}

.text-link {
  font-weight: 750;
}

/* ------------------------------------------------------------
   Main navigation - shared by home and interior pages
   ------------------------------------------------------------ */

.primary-nav {
  position: relative;
  z-index: 10;
  background: var(--navy-deep);
  border-top: 4px solid var(--gold);
  box-shadow: 0 5px 14px rgba(16, 47, 67, 0.16);
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: block;
  padding: 13px 18px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav a[aria-current="page"] {
  color: #fff;
  background: #24566f;
}

/* ------------------------------------------------------------
   Homepage header and layout
   ------------------------------------------------------------ */

.site-header {
  padding: 28px 20px 18px;
}

.banner-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  text-align: center;
}

.banner-wrap img {
  display: block;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 36px auto 52px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.75fr);
  gap: 34px;
  align-items: start;
  margin-bottom: 44px;
}

.intro-copy {
  padding: 8px 0 4px;
}

.search-panel {
  padding: 22px;
  background: var(--river-pale);
  border: 1px solid #cddde4;
  border-top: 5px solid var(--river);
  border-radius: 8px;
}

.search-panel h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.search-panel p {
  margin-top: 0;
  color: #4b626e;
  font-size: 0.94rem;
}

.search-form {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
}

.search-form input[type="search"] {
  min-width: 0;
  flex: 1 1 auto;
  padding: 11px 12px;
  border: 1px solid #aebfc8;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.search-form button {
  padding: 11px 15px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--navy);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.search-form button:hover {
  background: #0f536f;
}

.search-links {
  margin: 0;
  font-size: 0.9rem;
}

.section {
  margin: 46px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: right;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.research-link {
  position: relative;
  display: block;
  min-height: 132px;
  padding: 19px 18px 18px 21px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 5px;
  box-shadow: 0 3px 8px rgba(23, 42, 54, 0.035);
  text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.research-link:hover,
.research-link:focus {
  color: var(--ink);
  border-color: #b9c7cd;
  border-left-color: var(--red);
  box-shadow: 0 8px 19px rgba(23, 42, 54, 0.08);
  transform: translateY(-2px);
}

.research-link .kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.research-link strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.research-link span:last-child {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature {
  padding: 24px;
  background: var(--cream);
  border-top: 4px solid var(--navy);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.feature:nth-child(2) {
  border-top-color: var(--red);
}

.feature:nth-child(3) {
  border-top-color: var(--gold);
}

.feature p {
  margin-bottom: 12px;
  color: #4d606a;
}

.rectified-maps {
  margin-top: 12px;
}

.rectified-maps summary {
  color: #1d607e;
  font-weight: 750;
  cursor: pointer;
}

.rectified-maps ul {
  margin-bottom: 0;
  padding-left: 22px;
}

.county-story {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 28px;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.county-story p:first-of-type {
  margin-top: 0;
}

.quick-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.quick-facts li {
  padding: 11px 0 11px 22px;
  border-bottom: 1px solid #edf0f1;
}

.quick-facts li:last-child {
  border-bottom: 0;
}

.quick-facts strong {
  display: block;
  color: var(--navy-deep);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.book-link {
  display: block;
  padding: 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
}

.book-link:hover,
.book-link:focus {
  color: var(--ink);
  border-color: var(--gold);
  background: #fffdf9;
}

.book-link span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.link-drawer {
  margin: 12px 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.link-drawer summary {
  padding: 15px 18px;
  color: var(--navy-deep);
  font-weight: 800;
  cursor: pointer;
}

.link-drawer summary:hover {
  background: #f7f9fa;
}

.drawer-content {
  padding: 2px 18px 18px;
  border-top: 1px solid var(--line);
}

.link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.contact-note {
  margin-top: 46px;
  padding: 24px 26px;
  background: var(--gold-pale);
  border-left: 5px solid var(--gold);
  border-radius: 5px;
}

.contact-note h2 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.contact-note p {
  margin: 7px 0;
}

/* ------------------------------------------------------------
   Interior page site header
   ------------------------------------------------------------ */

.interior-site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.interior-header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 17px 0 14px;
}

.site-brand {
  color: var(--navy-deep);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-brand span {
  color: var(--red);
}

.site-brand:hover,
.site-brand:focus {
  color: var(--navy);
}

.site-tagline {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------
   Interior indexes (Historical Records, cemeteries, history, etc.)
   ------------------------------------------------------------ */

.interior-main {
  width: min(1120px, calc(100% - 40px));
  margin: 34px auto 60px;
}

.interior-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 7px;
  box-shadow: 0 5px 16px rgba(23, 42, 54, 0.05);
}

/*
  Standard interior site emblem.
  The source PNG is physically 180 x 180 pixels and this rule displays it
  at exactly 180 x 180 pixels. The global img rule cannot enlarge it.
*/
.interior-logo {
  display: block;
  width: 180px;
  height: 180px;
  min-width: 180px;
  max-width: 180px;
  min-height: 180px;
  max-height: 180px;
  object-fit: contain;
}

.interior-hero h1 {
  margin-bottom: 12px;
}

.hero-link,
.button-link {
  display: inline-block;
  margin-top: 17px;
  padding: 9px 14px;
  color: #fff;
  background: var(--navy);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
}

.hero-link:hover,
.hero-link:focus,
.button-link:hover,
.button-link:focus {
  color: #fff;
  background: var(--red);
}

.boundary-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  margin: 24px 0 42px;
  padding: 20px 24px;
  background: var(--gold-pale);
  border-top: 1px solid #ead3a7;
  border-bottom: 1px solid #ead3a7;
}

.year-badge {
  min-width: 76px;
  padding: 8px 9px;
  color: #fff;
  background: var(--red);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.boundary-note h2 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.boundary-note p {
  margin: 0 0 7px;
}

.collection-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy-deep);
}

.collection-header p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.record-section {
  margin: 0 0 34px;
}

.record-section-title {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--river-pale);
  border-left: 4px solid var(--navy);
}

.record-section-title h3 {
  margin: 0;
  color: var(--navy-deep);
}

.record-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border-top: 1px solid var(--line);
}

.record-list li {
  border-bottom: 1px solid var(--line);
}

.record-list a,
.record-static {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.5fr);
  gap: 24px;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
}

.record-list a:hover,
.record-list a:focus {
  color: var(--ink);
  background: #fbfcfc;
  box-shadow: inset 4px 0 var(--gold);
}

.record-title {
  color: var(--navy-deep);
  font-weight: 800;
}

.record-description {
  color: var(--muted);
  font-size: 0.93rem;
}

.record-static {
  background: #f6f7f7;
}

.record-static .record-title {
  color: #5a666c;
}

.unavailable {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px;
  color: #6b5656;
  background: #eee6e6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.contribute {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 45px;
  padding: 24px 26px;
  color: #fff;
  background: var(--navy-deep);
  border-radius: 6px;
}

.contribute h2 {
  margin-bottom: 5px;
  color: #fff;
}

.contribute p {
  margin: 0;
  color: #d7e4ea;
}

.contribute a {
  flex: 0 0 auto;
  padding: 9px 14px;
  color: var(--navy-deep);
  background: #fff;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
}

/* ------------------------------------------------------------
   Individual record/transcription pages - ready for next phase
   ------------------------------------------------------------ */

.record-main {
  width: min(980px, calc(100% - 40px));
  margin: 34px auto 60px;
}

.record-page-header {
  margin-bottom: 28px;
  padding: 26px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  border-radius: 6px;
}

.record-page-header .record-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.transcription {
  padding: 30px clamp(22px, 5vw, 48px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 5px 16px rgba(23, 42, 54, 0.04);
}

.transcription p:first-child {
  margin-top: 0;
}

.transcription p:last-child {
  margin-bottom: 0;
}

.transcription-note {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
}

.record-back {
  margin: 0 0 20px;
  font-size: 0.92rem;
  font-weight: 750;
}

/* ------------------------------------------------------------
   Shared footer
   ------------------------------------------------------------ */

.site-footer {
  margin-top: 64px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.mdgenweb-band {
  padding: 28px 20px 24px;
  text-align: center;
}

.mdgenweb-band a {
  display: inline-block;
}

.mdgenweb-band img {
  display: block;
  width: min(580px, 88vw);
  margin: 0 auto;
}

.mdgenweb-band-small img {
  width: min(420px, 78vw);
}

.footer-bottom {
  padding: 25px 20px 30px;
  color: #dbe6eb;
  background: var(--navy-deep);
  border-top: 4px solid var(--gold);
}

.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 14px;
}

.footer-nav a {
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: #f3d8a3;
}

.footer-small {
  max-width: 900px;
  margin: 7px auto;
  color: #bfd0d8;
  font-size: 0.83rem;
}

/* ------------------------------------------------------------
   Responsive rules
   ------------------------------------------------------------ */

@media (max-width: 960px) {
  .research-grid,
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .county-story {
    grid-template-columns: 1fr;
  }

  .quick-facts {
    padding-top: 10px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .quick-facts li {
    padding-left: 0;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding-top: 18px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-heading,
  .collection-header {
    display: block;
  }

  .section-heading p,
  .collection-header p:last-child {
    margin-top: 7px;
    text-align: left;
  }

  .primary-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .primary-nav a {
    white-space: nowrap;
  }

  .link-list {
    grid-template-columns: 1fr;
  }

  .interior-header-inner {
    display: block;
  }

  .site-tagline {
    display: block;
    margin-top: 2px;
  }

  .interior-hero {
    gap: 24px;
    padding: 24px;
  }

  .record-list a,
  .record-static {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .contribute {
    display: block;
  }

  .contribute a {
    display: inline-block;
    margin-top: 14px;
  }
}

@media (max-width: 560px) {
  .page-shell,
  .interior-main,
  .record-main {
    width: min(100% - 24px, 1180px);
    margin-top: 24px;
  }

  .research-grid,
  .book-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    display: block;
  }

  .search-form input[type="search"],
  .search-form button {
    width: 100%;
  }

  .search-form button {
    margin-top: 8px;
  }

  .county-story,
  .feature,
  .contact-note {
    padding: 20px;
  }

  /* Keep the interior emblem at 180 px; stack it above the page title. */
  .interior-hero {
    display: block;
  }

  .interior-logo {
    margin: 0 auto 20px;
  }

  .interior-hero > div {
    text-align: center;
  }

  .interior-hero .lead {
    text-align: left;
  }

  .boundary-note {
    display: block;
  }

  .year-badge {
    display: inline-block;
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .research-link {
    transition: none;
  }
}

/* ------------------------------------------------------------
   Census pages
   ------------------------------------------------------------ */

/*
  These styles are used by the pages in /census/.
  They are kept here in the master stylesheet so the entire
  Wicomico County MDGenWeb site continues to use one CSS file.
*/

/* Census landing page */

.census-year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.census-year-grid .research-link {
  min-height: 150px;
}

.census-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 38px 0;
  padding: 22px 24px;
  background: var(--gold-pale);
  border: 1px solid #ead3a7;
  border-left: 5px solid var(--gold);
  border-radius: 6px;
}

.census-note-badge {
  min-width: 76px;
  padding: 8px 9px;
  color: #fff;
  background: var(--red);
  font-weight: 800;
  text-align: center;
}

.census-note h2 {
  margin-bottom: 6px;
  font-size: 1.3rem;
}

.census-note p {
  margin: 0 0 8px;
}


/* Census year navigation */

.census-year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 24px 0 30px;
}

.census-year-nav a {
  display: inline-block;
  padding: 7px 11px;
  color: var(--navy-deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.census-year-nav a:hover,
.census-year-nav a:focus,
.census-year-nav a[aria-current="page"] {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}


/* Embedded census readers */

.census-reader-section {
  margin-top: 34px;
}

.census-reader-block {
  margin: 0 0 34px;
}

.census-reader-block h3 {
  margin: 0 0 10px;
  color: var(--navy-deep);
  font-size: 1.18rem;
}

.census-reader {
  width: 100%;
  height: min(78vh, 820px);
  min-height: 560px;
  overflow: hidden;
  background: #edf1f3;
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(23, 42, 54, 0.06);
}

.census-reader iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.census-reader-help {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.census-reader-help a {
  font-weight: 750;
}


/* Census responsive rules */

@media (max-width: 900px) {
  .census-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .census-reader {
    min-height: 520px;
  }
}

@media (max-width: 560px) {
  .census-year-grid {
    grid-template-columns: 1fr;
  }

  .census-note {
    display: block;
    padding: 20px;
  }

  .census-note-badge {
    display: inline-block;
    margin-bottom: 12px;
  }

  .census-reader {
    height: 68vh;
    min-height: 480px;
  }
}


/* ------------------------------------------------------------
   John Nelms Store Accounts
   ------------------------------------------------------------ */

/*
  These styles are used by the pages in /jnsa/.
  The original long .htm transcription pages remain in place as the
  source text; the redesigned .html pages present that text in the
  current Wicomico County MDGenWeb layout.
*/

.jnsa-hero-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.jnsa-hero-meta strong {
  color: var(--navy-deep);
}

.jnsa-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 38px;
}

.jnsa-feature-card {
  display: block;
  padding: 24px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  border-radius: 7px;
  box-shadow: 0 5px 16px rgba(23, 42, 54, 0.05);
  text-decoration: none;
}

.jnsa-feature-card:nth-child(2) {
  border-top-color: var(--river);
}

.jnsa-feature-card:hover,
.jnsa-feature-card:focus {
  color: var(--ink);
  border-color: #bdc9ce;
  box-shadow: 0 9px 22px rgba(23, 42, 54, 0.09);
}

.jnsa-feature-card .eyebrow {
  margin-bottom: 5px;
}

.jnsa-feature-card h2 {
  margin-bottom: 7px;
  color: var(--navy-deep);
  font-size: 1.4rem;
}

.jnsa-feature-card p {
  margin: 0;
  color: var(--muted);
}

.jnsa-range-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.jnsa-range-card {
  display: block;
  min-height: 155px;
  padding: 20px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 6px;
  text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.jnsa-range-card:hover,
.jnsa-range-card:focus {
  color: var(--ink);
  border-color: #b9c7cd;
  border-left-color: var(--red);
  box-shadow: 0 8px 19px rgba(23, 42, 54, 0.08);
  transform: translateY(-2px);
}

.jnsa-range {
  display: block;
  margin-bottom: 8px;
  color: var(--navy-deep);
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.jnsa-range-card span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.jnsa-collection-note {
  margin: 36px 0;
  padding: 24px 26px;
  background: var(--gold-pale);
  border-left: 5px solid var(--gold);
  border-radius: 6px;
}

.jnsa-collection-note h2 {
  margin-bottom: 7px;
  font-size: 1.3rem;
}

.jnsa-collection-note p {
  margin: 7px 0;
}


/* Collection navigation on the reading pages */

.jnsa-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 24px 0 30px;
}

.jnsa-nav a {
  display: inline-block;
  padding: 7px 11px;
  color: var(--navy-deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.jnsa-nav a:hover,
.jnsa-nav a:focus,
.jnsa-nav a[aria-current="page"] {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}


/* Loaded legacy transcription content */

.jnsa-document {
  margin-top: 24px;
}

.jnsa-document-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy-deep);
}

.jnsa-document-header h2 {
  margin-bottom: 5px;
}

.jnsa-document-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.jnsa-source-status {
  padding: 20px 22px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.jnsa-source-status.error {
  color: #6c3d38;
  background: #fff7f5;
  border-color: #e0bbb6;
}

.jnsa-source-status p {
  margin: 0 0 7px;
}

.jnsa-source-status p:last-child {
  margin-bottom: 0;
}

.jnsa-prose {
  padding: 30px clamp(22px, 5vw, 48px);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  border-radius: 7px;
  box-shadow: 0 5px 16px rgba(23, 42, 54, 0.04);
}

.jnsa-prose p {
  max-width: 850px;
  margin: 0 auto 1.15em;
}

.jnsa-prose p:last-child {
  margin-bottom: 0;
}

.jnsa-prose .jnsa-original-note {
  margin-bottom: 24px;
  padding: 14px 17px;
  color: #4a5d66;
  background: var(--river-pale);
  border-left: 4px solid var(--river);
  font-size: 0.92rem;
}


/* Definitions */

.jnsa-definitions {
  margin: 0;
  background: #fff;
  border-top: 1px solid var(--line);
}

.jnsa-definition {
  display: grid;
  grid-template-columns: minmax(185px, 0.55fr) minmax(0, 1.45fr);
  gap: 24px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.jnsa-definition:nth-child(even) {
  background: #fbfcfc;
}

.jnsa-definition dt {
  color: var(--navy-deep);
  font-weight: 850;
}

.jnsa-definition dd {
  margin: 0;
  color: #4d606a;
}


/* Individual account blocks */

.jnsa-account-list {
  margin: 0;
}

.jnsa-intro-text,
.jnsa-extra-text {
  margin: 0 0 20px;
  padding: 18px 20px;
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
  border-radius: 5px;
}

.jnsa-extra-text {
  background: #f4f6f7;
  border-left-color: var(--river);
}

.jnsa-intro-text p,
.jnsa-extra-text p {
  margin: 0 0 8px;
}

.jnsa-intro-text p:last-child,
.jnsa-extra-text p:last-child {
  margin-bottom: 0;
}

.jnsa-account {
  margin: 0 0 13px;
  padding: 18px 20px 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 5px;
  box-shadow: 0 3px 8px rgba(23, 42, 54, 0.025);
}

.jnsa-account h3 {
  margin: 0 0 7px;
  color: var(--navy-deep);
  font-size: 1.03rem;
  line-height: 1.4;
}

.jnsa-account p {
  margin: 0;
  color: #415660;
  line-height: 1.65;
}

.jnsa-reading-tip {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.jnsa-reading-tip kbd {
  padding: 1px 5px;
  color: var(--navy-deep);
  background: #fff;
  border: 1px solid #cbd4d8;
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.82rem;
}


/* Attribution */

.jnsa-attribution {
  margin-top: 40px;
  padding: 22px 24px;
  background: var(--river-pale);
  border-left: 5px solid var(--river);
  border-radius: 5px;
}

.jnsa-attribution h2 {
  margin-bottom: 7px;
  font-size: 1.25rem;
}

.jnsa-attribution p {
  margin: 6px 0;
  color: #455b66;
}


/* Responsive rules */

@media (max-width: 960px) {
  .jnsa-range-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .jnsa-feature-grid {
    grid-template-columns: 1fr;
  }

  .jnsa-definition {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 560px) {
  .jnsa-range-grid {
    grid-template-columns: 1fr;
  }

  .jnsa-prose,
  .jnsa-account,
  .jnsa-collection-note,
  .jnsa-attribution {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jnsa-range-card {
    transition: none;
  }
}


/* ------------------------------------------------------------
   Online book reader pages
   ------------------------------------------------------------ */

/*
  Reusable styles for full-book pages such as:
  - Maryland's Colonial Eastern Shore
  - Indians of the Eastern Shore of Maryland

  These rules live in the master stylesheet so the Wicomico site
  continues to use one CSS file.
*/

.book-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin: 20px 0 0;
  padding: 13px 16px;
  color: #475b65;
  background: var(--river-pale);
  border-left: 4px solid var(--river);
  border-radius: 4px;
  font-size: 0.91rem;
}

.book-meta-strip strong {
  color: var(--navy-deep);
}

.book-reader-section {
  width: min(1480px, calc(100vw - 40px));
  margin: 38px 0 0 50%;
  transform: translateX(-50%);
}

.book-reader-section .collection-header {
  width: min(1120px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.book-reader {
  width: 100%;
  height: min(88vh, 980px);
  min-height: 720px;
  overflow: hidden;
  background: #edf1f3;
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  border-radius: 7px;
  box-shadow: 0 7px 20px rgba(23, 42, 54, 0.07);
}

.book-reader iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.book-reader-help {
  width: min(1120px, calc(100% - 40px));
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.book-reader-help a {
  font-weight: 750;
}

.book-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  margin-top: 40px;
}

.book-info-card {
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.book-info-card h2 {
  margin-bottom: 8px;
  color: var(--navy-deep);
  font-size: 1.32rem;
}

.book-info-card p {
  margin: 8px 0;
}

.book-contents {
  margin: 10px 0 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 38px;
}

.book-contents li {
  margin: 0 0 7px;
  break-inside: avoid;
}

.book-source-note {
  margin-top: 30px;
  padding: 19px 22px;
  color: #455b66;
  background: var(--gold-pale);
  border-left: 5px solid var(--gold);
  border-radius: 5px;
}

.book-source-note p {
  margin: 5px 0;
}

@media (max-width: 900px) {
  .book-reader {
    height: 82vh;
    min-height: 620px;
  }

  .book-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .book-contents {
    columns: 1;
  }
}

@media (max-width: 560px) {
  .book-reader-section {
    width: calc(100vw - 16px);
  }

  .book-reader-section .collection-header,
  .book-reader-help {
    width: calc(100% - 16px);
  }

  .book-reader {
    height: 74vh;
    min-height: 520px;
  }
}



/* ========================================================================
   WICOMICO COUNTY MDGENWEB
   Shared site stylesheet
   Lexend typography; river, marsh, and old-map palette
   ======================================================================== */

:root {
  --river: #2f6673;
  --river-dark: #173f4d;
  --river-deep: #102f3b;
  --river-pale: #e7f0f1;
  --marsh: #76866b;
  --marsh-dark: #55634c;
  --sand: #efe2c4;
  --map-gold: #c29b57;
  --paper: #fffdf8;
  --ink: #26343b;
  --muted: #647176;
  --line: #d8d4ca;
  --rose: #916a78;
  --rose-pale: #f3e9ed;
  --shadow: 0 8px 24px rgba(23, 63, 77, .10);
  --radius: 13px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f1eee5;
  font-family: "Lexend", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--river-dark);
  text-underline-offset: .15em;
}

a:hover,
a:focus {
  color: #0a2d39;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: .7rem 1rem;
  background: #fff;
  color: #000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 18px auto 28px;
  background: var(--paper);
  border: 1px solid #d7d1c4;
  box-shadow: 0 12px 34px rgba(37, 54, 61, .12);
}


/* ========================================================================
   HOMEPAGE HEADER
   ======================================================================== */

.site-header {
  background:
    linear-gradient(90deg, #eef5f5 0%, #fbf6eb 53%, #f1e8ec 100%);
  border-top: 5px solid var(--map-gold);
}

.banner-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 18px 13px;
  text-align: center;
}

.banner-wrap img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.site-tagline {
  margin: 8px 0 0;
  color: var(--river-dark);
  font-size: .94rem;
  font-weight: 600;
}


/* ========================================================================
   SHARED RIBBON NAVIGATION
   Matches Somerset selections, with Wicomico styling.
   ======================================================================== */

.primary-nav {
  background: var(--river-dark);
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 4px solid var(--map-gold);
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: block;
  padding: .82rem .82rem;
  color: #fff8e9;
  font-size: .89rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255,248,233,.75);
  text-underline-offset: .16em;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav a[aria-current="page"] {
  background: rgba(255,255,255,.12);
  color: #fff;
}


/* ========================================================================
   HOMEPAGE CONTENT
   ======================================================================== */

.site-main {
  padding: 24px clamp(18px, 4vw, 44px) 34px;
}

.page-intro {
  margin: 0 0 2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.page-intro h1 {
  margin: 0 0 .8rem;
  color: var(--river-dark);
  font-size: clamp(1.9rem, 3.2vw, 2.65rem);
  white-space: nowrap;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.page-intro p {
  max-width: none;
  margin: 0 0 1rem;
}

.page-intro::after {
  display: block;
  clear: both;
  content: "";
}

.intro-map {
  float: right;
  width: 340px;
  max-width: 42%;
  margin: .1rem 0 1rem 1.55rem;
}

.intro-map img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #8d8170;
  box-shadow: 0 4px 14px rgba(32, 48, 55, .16);
  background: #fff;
}

.intro-map figcaption {
  margin-top: .42rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
  text-align: center;
}

.section-block {
  margin: 2.1rem 0 0;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
  color: var(--river-dark);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.section-heading p {
  margin: .35rem 0 0;
  color: var(--muted);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.highlight-panel {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.whats-new {
  background: #e3e8dc;
  border-top: 5px solid var(--marsh);
}

.dont-miss {
  background: var(--river-pale);
  border-top: 5px solid var(--river);
}

.highlight-panel h2 {
  margin: 0 0 .7rem;
  color: var(--river-dark);
  font-size: 1.35rem;
}

.highlight-list {
  margin: 0;
  padding-left: 1.2rem;
}

.highlight-list li {
  margin: .48rem 0;
}

.content-badge {
  display: inline-block;
  margin-left: .35rem;
  padding: .08rem .42rem;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: .08em;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.research-card {
  display: flex;
  min-height: 176px;
  flex-direction: column;
  gap: .48rem;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--river);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(32,48,55,.06);
  text-decoration: none;
}

.research-card:nth-child(4n+2) {
  border-top-color: var(--marsh);
}

.research-card:nth-child(4n+3) {
  border-top-color: var(--rose);
}

.research-card:nth-child(4n+4) {
  border-top-color: var(--map-gold);
}

.research-card:hover,
.research-card:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.research-card .kicker {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.research-card strong {
  color: var(--river-dark);
  font-size: 1.08rem;
  line-height: 1.3;
}

.card-copy {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.search-card {
  padding: 22px;
  border: 1px solid #cbd7d8;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #edf5f5 0%, #f9f5eb 100%);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.search-form label {
  grid-column: 1 / -1;
  color: var(--river-dark);
  font-weight: 700;
}

.search-form input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: .72rem .85rem;
  border: 1px solid #9baeb2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.search-form button {
  min-height: 46px;
  padding: .72rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--river-dark);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.search-form button:hover,
.search-form button:focus {
  background: var(--river-deep);
}

.search-links {
  margin: .8rem 0 0;
  font-size: .86rem;
}

.contact-note {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf7ee;
}

.contact-note h2 {
  margin-top: 0;
  color: var(--river-dark);
}


/* ========================================================================
   SHARED FOOTER
   Same information architecture as Somerset, Wicomico colors.
   ======================================================================== */

.site-footer {
  margin-top: 2rem;
  padding: 24px 24px 22px;
  border-top: 5px solid var(--map-gold);
  background:
    linear-gradient(180deg, #173f4d 0%, #102f3b 100%);
  color: #eef4f4;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 19px;
  margin: 0 auto 16px;
}

.footer-nav a {
  color: #fff5dc;
  font-size: .91rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .16em;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: #fff;
}

.footer-project-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.footer-project-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-project-logos img {
  display: block;
  width: auto;
  max-height: 74px;
  background: #fff;
}

.footer-mdgenweb-logo {
  max-width: 182px;
}

.footer-usgenweb-logo {
  max-width: 128px;
}

.footer-meta {
  color: #edf2f1;
  font-size: .88rem;
  line-height: 1.55;
}

.footer-meta p {
  margin: .52rem 0;
}

.footer-meta strong {
  color: #fff;
}

.footer-meta a {
  color: #fff5dc;
  font-weight: 600;
}

.footer-small {
  color: #cbd8d8;
  font-size: .79rem;
}


/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 980px) {
  .research-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-intro h1 {
    white-space: normal;
  }

  .site-shell {
    width: 100%;
    margin: 0;
    border-right: 0;
    border-left: 0;
  }

  .primary-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .intro-map {
    float: none;
    width: min(100%, 520px);
    max-width: none;
    margin: 0 auto 1.1rem;
  }

  .highlight-grid,
  .research-grid {
    grid-template-columns: 1fr;
  }

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

  .search-form label {
    grid-column: auto;
  }
}


/* ========================================================================
   SEPTEMBER 2026 WICOMICO SITE-WIDE REFURBISHMENT OVERRIDES
   ======================================================================== */

:root {
  --river: #2f6673;
  --river-dark: #173f4d;
  --river-deep: #102f3b;
  --river-pale: #e7f0f1;
  --marsh: #76866b;
  --marsh-dark: #55634c;
  --marsh-sage: #e3e8dc;
  --sand: #efe2c4;
  --map-gold: #c29b57;
  --gold: #c29b57;
  --gold-pale: #f3ead7;
  --paper: #fffdf8;
  --cream: #fbf8ef;
  --ink: #26343b;
  --muted: #647176;
  --line: #d8d4ca;
  --rose: #916a78;
  --red: #7f5f50;
}

html, body, button, input, textarea, select {
  font-family: "Lexend", Arial, sans-serif;
}

body {
  min-width: 0;
  font-size: 16px;
  line-height: 1.65;
  background: #f1eee5;
}

body.interior-page {
  background: #f1eee5;
}

body.interior-page > .interior-main,
body.interior-page > main,
.interior-main,
.record-main,
.page-shell {
  width: min(1180px, calc(100% - 28px));
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.interior-main,
.record-main {
  padding-left: clamp(18px, 4vw, 44px);
  padding-right: clamp(18px, 4vw, 44px);
  padding-top: 28px;
  padding-bottom: 40px;
  background: var(--paper);
  border-left: 1px solid #d7d1c4;
  border-right: 1px solid #d7d1c4;
}

/* Ordinary prose gets the available content width. */
.interior-main p,
.record-main p,
.transcription p,
.record-description,
.lead {
  max-width: none;
}

/* Shared interior masthead: smaller square county logo + page title. */
.interior-site-header {
  width: min(1180px, calc(100% - 28px));
  margin: 18px auto 0;
  padding: 0;
  background: var(--paper);
  border: 1px solid #d7d1c4;
  border-bottom: 0;
  border-top: 5px solid var(--map-gold);
  box-shadow: 0 10px 26px rgba(23,63,77,.10);
}

.interior-masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 154px;
  padding: 18px 28px;
  background: linear-gradient(90deg, #eef5f5 0%, #fbf6eb 58%, #f1f2ea 100%);
}

.interior-logo-link {
  flex: 0 0 auto;
}

.interior-logo-link img {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.interior-heading {
  min-width: 0;
}

.interior-heading .eyebrow:empty,
.interior-heading .lead:empty {
  display: none;
}

.interior-heading .eyebrow {
  margin: 0 0 4px;
  color: var(--marsh-dark);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.interior-heading h1 {
  margin: 0;
  color: var(--river-dark);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.interior-heading .lead {
  margin: .55rem 0 0;
  color: #526369;
  font-size: .98rem;
  line-height: 1.5;
}

/* One no-wrap ribbon everywhere at normal desktop widths. */
.primary-nav ul {
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: center;
}

.primary-nav a {
  padding: .79rem .72rem;
  font-size: .78rem;
  letter-spacing: .015em;
  text-transform: none;
  white-space: nowrap;
}

/* Homepage What's New approved marsh sage. */
.whats-new {
  background: #e3e8dc !important;
  border-top-color: var(--marsh) !important;
}

/* Common interior collection panels. */
.collection-header,
.record-section,
.boundary-note,
.contribute,
.transcription-note,
.book-source-note,
.search-panel {
  border-radius: 12px;
}

.record-section {
  background: #fff;
}

.record-section-title,
.collection-header h2,
.collection-header h3,
.boundary-note h2 {
  color: var(--river-dark);
}

/* Shared footer: Somerset-style information architecture, Wicomico character. */
.site-footer {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 28px;
  padding: 24px;
  border: 1px solid #d7d1c4;
  border-top: 5px solid var(--map-gold);
  background: linear-gradient(180deg, #173f4d 0%, #102f3b 100%);
  color: #eef4f4;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 19px;
  margin: 0 auto 16px;
}

.footer-nav a {
  color: #fff5dc;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .16em;
}

.footer-project-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.footer-project-logos img {
  display: block;
  width: auto;
  max-height: 70px;
  background: #fff;
}

.footer-meta {
  color: #edf2f1;
  font-size: .88rem;
  line-height: 1.55;
}

.footer-meta p { margin: .52rem 0; }
.footer-meta a { color: #fff5dc; font-weight: 600; }
.footer-small { color: #cbd8d8; font-size: .79rem; }

/* Merge-history page additions. */
.history-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 2rem;
}

.history-featured a {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--marsh);
  border-radius: 12px;
  background: var(--marsh-sage);
  color: var(--ink);
  text-decoration: none;
}

.history-featured strong {
  display: block;
  margin-bottom: .35rem;
  color: var(--river-dark);
  font-size: 1.05rem;
}

.history-featured span {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .interior-site-header,
  .site-footer,
  body.interior-page > .interior-main,
  body.interior-page > main,
  .interior-main,
  .record-main,
  .page-shell {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-left: 0;
    border-right: 0;
  }

  .interior-masthead {
    align-items: flex-start;
    gap: 18px;
    min-height: 0;
    padding: 16px 18px;
  }

  .interior-logo-link img {
    width: 96px;
    height: 96px;
  }

  .interior-heading h1 {
    font-size: clamp(1.65rem, 7vw, 2.3rem);
  }

  .primary-nav ul { justify-content: flex-start; }
  .history-featured { grid-template-columns: 1fr; }
}
