:root {
  color-scheme: light;
  --ink: #24211d;
  --muted: #6e665d;
  --rule: #d7d0c6;
  --paper: #fffdf8;
  --accent: #315f72;
  --accent-dark: #1e4352;
  --panel: #f5f1e9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.14em;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
}

.site-title {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.page {
  margin: 0 auto;
  max-width: 66rem;
  padding: 2rem clamp(1rem, 4vw, 3rem) 4rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 1rem;
}

h2 {
  border-bottom: 1px solid var(--rule);
  font-size: 1.45rem;
  margin-top: 2.5rem;
  padding-bottom: 0.35rem;
}

.intro {
  max-width: 44rem;
}

.summary-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 2rem 0;
}

.summary-grid a {
  background: var(--panel);
  color: var(--ink);
  padding: 1rem;
  text-decoration: none;
}

.summary-grid span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.index-list {
  list-style: none;
  padding: 0;
}

.index-list li {
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.55rem 0;
}

.index-list span,
.lifespan,
.aka,
.certainty,
.source-note {
  color: var(--muted);
}

.aka {
  margin: -0.5rem 0 0.5rem;
}

.source-note {
  display: block;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.record-header p {
  margin: 0 0 0.5rem;
}

.facts {
  background: var(--panel);
  padding: 1rem;
}

dl {
  display: grid;
  gap: 0.6rem 1rem;
  grid-template-columns: minmax(7rem, 12rem) 1fr;
  margin: 0;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
}

dd ul {
  margin: 0;
  padding-left: 1.2rem;
}

.relation-table {
  margin: 0;
}

.relation-table td {
  border: 0;
  padding: 0.1rem 1rem 0.1rem 0;
}

.relation-table td:last-child {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--rule);
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel);
}

.timeline-table th:first-child,
.timeline-table td:first-child {
  text-align: right;
  white-space: nowrap;
}

.reference-table th {
  background: transparent;
  color: var(--muted);
  width: 12rem;
}

.veterans-table td:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}

.prose {
  max-width: 44rem;
}

.additional-info {
  max-width: none;
}

@media (max-width: 42rem) {
  .site-header,
  .index-list li {
    display: block;
  }

  .site-nav {
    margin-top: 0.75rem;
  }

  dl {
    display: block;
  }

  dt {
    margin-top: 0.75rem;
  }
}
