/* Captioned photographs retain the warm, editorial language of the selected page. */
.aviation-history {
  padding-block: 28px 100px;
  scroll-margin-top: 28px;
}
.history-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 50px;
  margin-bottom: 46px;
}
.history-heading h2 { max-width: 9ch; }
.history-introduction > p {
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted, #61543c);
}
.history-introduction .history-archive-note {
  margin-top: 18px;
  font-size: 13px;
}
.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 30px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule, #c9ad75);
}
.history-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.history-filters[hidden], .history-group[hidden], .history-empty[hidden] { display: none; }
.history-filters button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink, #24201b);
  font-size: 14px;
}
.history-filters button[aria-pressed="true"] {
  background: #75551e;
  color: #fff5de;
}
.history-filters button:hover:not([aria-pressed="true"]) {
  border-color: var(--rule, #c9ad75);
  background: #fff5de;
}
.history-result-count {
  font-size: 13px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  color: var(--muted, #61543c);
}
.history-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 28px 38px;
}
.history-group { min-width: 0; border-bottom: 1px solid var(--rule, #c9ad75); }
.history-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  align-items: stretch;
  gap: 22px;
  min-height: 176px;
  padding-bottom: 24px;
  list-style: none;
}
.history-summary::-webkit-details-marker { display: none; }
.history-summary::marker { content: ""; }
.history-summary .history-cover {
  width: 100%;
  height: 100%;
  min-height: 160px;
  max-height: 208px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: #ead5a8;
}
.history-summary-copy {
  display: flex;
  flex-direction: column;
  align-items: start;
  min-width: 0;
  padding-block: 7px 2px;
}
.history-title {
  display: block;
  font-family: "Hedvig Letters Serif", serif;
  font-size: clamp(23px, 2.05vw, 31px);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.history-open-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 23px;
  font-size: 12px;
  line-height: 1.5;
  color: #75551e;
}
.history-open-label svg { transition: transform 180ms ease-out; }
.history-group[open] .history-open-label svg { transform: rotate(45deg); }
.history-summary:hover .history-title {
  text-decoration: underline;
  text-decoration-color: #a17b3a;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.history-gallery { padding: 0 0 24px; }
.history-gallery-instruction { margin-bottom: 13px; font-size: 12px; color: var(--muted, #61543c); }
.history-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.history-photo {
  display: block;
  aspect-ratio: 4 / 3;
  background: #ead5a8;
}
.history-photo img { width: 100%; height: 100%; object-fit: cover; }
.history-photo:hover { outline: 2px solid #75551e; outline-offset: 2px; }
.history-empty { padding: 40px 0; font-size: 16px; line-height: 1.6; }
.aviation-history :is(button, a, summary):focus-visible {
  outline: 2px solid #75551e;
  outline-offset: 5px;
}
.history-lightbox {
  width: min(1160px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  background: #211e19;
  color: #fff5de;
  box-shadow: 0 20px 70px #00000060;
}
.history-lightbox::backdrop { background: #17140fec; }
.history-lightbox[open] {
  display: flex;
  flex-direction: column;
}
.history-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  padding: 22px 28px 16px;
}
.history-lightbox-header h3 {
  font-family: "Hedvig Letters Serif", serif;
  font-size: clamp(22px, 2.5vw, 31px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.history-lightbox-header p {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: #deceb0;
  font-variant-numeric: tabular-nums;
}
.history-lightbox form { margin: 0; }
.history-lightbox button {
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #fff5de;
}
.history-lightbox button:hover { border-color: #b69a63; background: #3e3528; }
.history-lightbox button:disabled { opacity: .4; cursor: default; }
.history-lightbox :is(button, a):focus-visible { outline-color: #e9ca8b; outline-offset: 3px; }
.history-lightbox-figure { display: flex; flex-direction: column; min-height: 0; }
.history-lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(300px, 35dvh);
  padding-inline: 28px;
  overflow: hidden;
}
.history-lightbox-stage img {
  width: 100%;
  height: min(62dvh, 720px);
  object-fit: contain;
}
.history-lightbox-stage img[hidden] { display: none; }
.history-lightbox-stage.is-loading img { opacity: .35; }
.history-image-status {
  position: absolute;
  inset-inline: 20px;
  top: 50%;
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: #fff5de;
}
.history-lightbox-figure figcaption {
  padding: 13px 28px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #deceb0;
}
.history-lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
}
.history-lightbox-footer button { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.history-original { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
html.history-dialog-open { overflow: hidden; }
@media (max-width: 1000px) {
  .history-projects { gap: 25px; }
  .history-summary { grid-template-columns: 1fr; gap: 16px; }
  .history-summary .history-cover { height: auto; max-height: none; aspect-ratio: 16 / 10; }
  .history-summary-copy { min-height: 148px; padding: 0; }
  .history-title { font-size: 27px; }
  .history-heading { gap: 30px; }
}
@media (max-width: 599px) {
  .aviation-history { padding-block: 14px 60px; }
  .history-heading { grid-template-columns: 1fr; gap: 23px; margin-bottom: 26px; }
  .history-heading h2 { max-width: none; font-size: 44px; }
  .history-introduction > p { font-size: 16px; line-height: 1.7; }
  .history-introduction .history-archive-note { font-size: 12px; }
  .history-toolbar { gap: 15px; padding-bottom: 18px; }
  .history-filters { gap: 2px; }
  .history-filters button { padding-inline: 10px; font-size: 13px; }
  .history-projects { grid-template-columns: 1fr; gap: 23px; }
  .history-summary { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 17px; min-height: 145px; padding-bottom: 23px; }
  .history-summary .history-cover { height: 100%; min-height: 138px; max-height: 185px; aspect-ratio: 1; }
  .history-summary-copy { min-height: 0; padding-block: 2px; }
  .history-title { font-size: 23px; line-height: 1.25; }
  .history-open-label { padding-top: 16px; font-size: 11px; }
  .history-thumbnails { gap: 8px; }
  .history-lightbox { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .history-lightbox-header { padding: 17px 16px 13px; gap: 12px; }
  .history-lightbox-header h3 { font-size: 23px; }
  .history-lightbox-stage { padding-inline: 10px; }
  .history-lightbox-stage img { height: min(56dvh, 600px); }
  .history-lightbox-figure figcaption { padding-inline: 16px; }
  .history-lightbox-footer { padding: 10px 6px; gap: 4px; }
  .history-lightbox-footer button { gap: 6px; font-size: 12px; padding-inline: 7px; }
  .history-original { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .history-open-label svg { transition: none; }
}
