.history-detail .page-hero h1,
.history-index .page-hero h1 {
  max-width: 1050px;
  font-size: clamp(0.9rem, 2.4vw, 2.15rem);
  overflow-wrap: anywhere;
}
.history-detail .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--basic-text);
}
.history-detail .section,
.history-index .section {
  padding-block: 3.5rem;
}
.history-detail .prose,
.history-index .prose {
  min-width: 0;
}
.history-detail [id],
.history-index [id] {
  scroll-margin-top: 115px;
}
.history-detail h2,
.history-index h2,
.history-index h3 {
  overflow-wrap: anywhere;
}
.history-detail .sidebar-box h2 {
  font-size: 0.5rem;
}
.history-detail .sidebar-box li + li {
  margin-top: 0.55rem;
}
.history-detail .sidebar-box {
  max-height: calc(100vh - 125px);
  overflow-y: auto;
}
.history-detail .prose a,
.history-index .prose a {
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.history-detail .callout a,
.history-index .callout a {
  color: var(--basic-text);
}
.history-detail .spec-table {
  overflow-wrap: anywhere;
}
.history-detail .spec-table th {
  width: auto;
}
.history-detail .spec-table caption {
  text-align: left;
  font-weight: bold;
  margin-bottom: 0.7rem;
}
.history-figure {
  margin: 2rem 0;
}
.history-figure img {
  display: block;
  max-height: 380px;
  width: 100%;
  object-fit: contain;
  background: #e9e1d2;
}
.history-figure figcaption {
  font-size: 0.85rem;
  margin-top: 0.6rem;
}
.history-source-note {
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--teal);
  background: rgba(255, 255, 255, 0.45);
}
.history-sources li {
  margin-bottom: 1rem;
}
.history-sources p {
  margin: 0.3rem 0;
}
.history-related {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}
.history-related h2 {
  font-size: 0.8rem;
}
.history-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 2rem;
}
.history-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.history-cards .card {
  min-height: 0;
}
.history-cards h3 {
  font-size: 1.4rem;
  line-height: 1.4;
  margin-block: 0.8rem;
}
.history-cards .meta {
  color: #615c54;
}
.history-transcript {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1rem;
}
.history-transcript p {
  white-space: normal;
}
.history-chronology {
  padding-left: 1.5rem;
}
.history-chronology li {
  margin-bottom: 0.8rem;
}
.history-stack {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.history-stack li {
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}
.history-stack strong {
  display: block;
}
@media (max-width: 700px) {
  .history-cards,
  .history-link-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-detail .content-grid {
    gap: 2rem;
  }
  .history-detail .prose h2,
  .history-index .prose h2 {
    font-size: 0.675rem;
  }
  .history-detail .spec-table {
    font-size: 0.85rem;
  }
  .history-detail .spec-table td,
  .history-detail .spec-table th {
    padding: 0.5rem;
  }
}
@media (max-width: 760px) {
  .history-detail .content-grid > aside {
    grid-row: 1;
  }
  .history-detail .sidebar-box {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .history-detail .page-hero,
  .history-index .page-hero {
    padding-block: 1.5rem;
  }
}
@media print {
  .history-detail .site-header,
  .history-detail aside,
  .history-related,
  .history-detail .site-footer {
    display: none;
  }
  .history-detail .content-grid {
    display: block;
  }
  .history-detail .prose {
    max-width: none;
  }
  .history-detail .page-hero {
    color: #000;
    background: #fff;
    padding: 0.5rem 0;
    border: 0;
    box-shadow: none;
  }
  .history-detail .page-hero p {
    color: #222;
  }
  .history-detail .section {
    padding: 1rem 0;
  }
}
