/*
  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;
  }
}


/* ============================================================
   Historical record pages
   ============================================================ */

.record-page .record-main {
  width: min(980px, calc(100% - 40px));
}

.record-page-header {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 28px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 5px 16px rgba(23, 42, 54, 0.04);
}

.record-page-header h1 {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  overflow-wrap: break-word;
}

.record-page-header > div {
  min-width: 0;
}

.record-emblem {
  display: block;
  width: 195px;
  height: 156px;
  min-width: 195px;
  max-width: 195px;
  min-height: 156px;
  max-height: 156px;
  object-fit: contain;
}

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

.record-back a {
  text-decoration: none;
}

.record-back-bottom {
  margin: 22px 0 0;
}

.transcription {
  overflow-wrap: anywhere;
}

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

.transcription-attribution {
  margin: 0 0 24px;
  padding: 12px 15px;
  color: #405560;
  background: var(--river-pale);
  border-left: 4px solid var(--river);
  border-radius: 2px;
  font-size: 0.94rem;
}

.transcription-subhead {
  margin: 30px 0 12px;
  padding-bottom: 6px;
  color: var(--navy-deep);
  border-bottom: 1px solid var(--line);
  font-size: 1.2rem;
  letter-spacing: 0.015em;
}

.transcription-divider {
  height: 1px;
  margin: 26px 0;
  background: var(--line);
}

.transcription .record-image {
  display: block;
  max-width: min(100%, 620px);
  height: auto;
  margin: 24px auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.transcription .editor-note {
  display: block;
  margin: 6px 0;
  padding: 6px 9px;
  color: #75433e;
  background: #fbf2ef;
  border-left: 3px solid #bd756d;
  font-size: 0.9rem;
  font-style: italic;
}

.sensitive-source-note {
  margin: 0 0 22px;
}

/* Death certificate collection */
.death-tools {
  margin: 30px 0;
  padding: 22px 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.death-tools-heading {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.death-tools-heading h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.death-tools-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.alphabet-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0;
}

.alphabet-jump a {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: #fff;
  background: var(--navy);
  border-radius: 3px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.alphabet-jump a:hover,
.alphabet-jump a:focus {
  color: #fff;
  background: var(--red);
}

.name-index-details summary {
  cursor: pointer;
  color: var(--navy-deep);
  font-weight: 800;
}

.name-index-columns {
  columns: 3 220px;
  column-gap: 28px;
  margin-top: 18px;
}

.name-index-letter {
  break-inside: avoid;
  margin-bottom: 18px;
}

.name-index-letter h3 {
  margin: 0 0 5px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
}

.name-index-letter ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.name-index-letter li {
  margin: 2px 0;
  font-size: 0.87rem;
  line-height: 1.35;
}

.death-legend {
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
}

.death-legend h2 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.death-legend dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 0;
}

.death-legend dt {
  font-weight: 850;
}

.death-legend dd {
  margin: 0;
}

.death-entry {
  position: relative;
  padding: 18px 0 19px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}

.death-entry:first-of-type {
  border-top: 0;
}

.death-entry h2 {
  margin: 0 0 7px;
  color: var(--navy-deep);
  font-size: 1.12rem;
}

.death-entry-details p {
  margin: 1px 0;
}

.death-entry .entry-top {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.newspaper-records {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 3px solid var(--navy-deep);
}

.newspaper-records h2 {
  font-size: 1.45rem;
}

@media (max-width: 760px) {
  .death-tools-heading {
    display: block;
  }
  .death-tools-heading > p {
    margin-top: 7px;
  }
}

@media (max-width: 760px) {
  .record-page-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .record-emblem {
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .transcription {
    padding: 22px 18px;
  }
  .death-tools {
    padding: 18px;
  }
}

/* ============================================================
   Share Your Records / submission page
   ============================================================ */

.submit-main {
  width: min(1040px, calc(100% - 40px));
}

.submit-intro {
  max-width: 860px;
  margin: 38px auto 44px;
}

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

.submit-section-heading {
  margin-bottom: 20px;
}

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

.submit-card {
  position: relative;
  padding: 25px 23px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--river);
  border-radius: 6px;
  box-shadow: 0 5px 16px rgba(23, 42, 54, 0.04);
}

.submit-card h3 {
  margin: 5px 0 10px;
  color: var(--navy-deep);
  font-size: 1.2rem;
}

.submit-card p {
  margin: 9px 0;
}

.submit-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 850;
}

.submit-email {
  font-size: 1.06rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.submit-details {
  margin: 36px 0;
  padding: 25px 28px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 5px;
}

.submit-details h2 {
  margin-bottom: 13px;
  font-size: 1.45rem;
}

.submit-checklist {
  margin: 0;
  padding-left: 22px;
}

.submit-checklist li {
  margin: 8px 0;
  padding-left: 3px;
}

.submit-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 38px 0 26px;
  padding: 25px 28px;
  color: #fff;
  background: var(--navy-deep);
  border-radius: 6px;
}

.submit-result h2 {
  margin-bottom: 7px;
  color: #fff;
  font-size: 1.45rem;
}

.submit-result p:not(.eyebrow) {
  margin: 0;
  color: #d7e4ea;
}

.submit-result .eyebrow {
  color: #f0c77c;
}

.submit-records-button {
  flex: 0 0 auto;
  margin-top: 0;
  color: var(--navy-deep);
  background: #fff;
}

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

.submission-note {
  padding: 17px 20px;
  color: #405560;
  background: var(--river-pale);
  border-left: 4px solid var(--river);
  border-radius: 3px;
  font-size: 0.94rem;
}

@media (max-width: 820px) {
  .submit-grid {
    grid-template-columns: 1fr;
  }

  .submit-result {
    display: block;
  }

  .submit-records-button {
    margin-top: 16px;
  }
}
