.heritage { padding-block: clamp(2.6rem, 6vw, 5.3rem) clamp(1.25rem, 3.2vw, 2.85rem); }
.heritage + .section { padding-top: clamp(1.5rem, 3.8vw, 2.85rem); }
.heritage:focus, .heritage-directory-head h2:focus, .heritage-department:focus { outline: none; }
.heritage-directory-section { padding-block: clamp(1.35rem, 3.7vw, 2.85rem) clamp(1.15rem, 3vw, 2.2rem); scroll-margin-top: 1rem; }
.heritage-archive { padding-top: clamp(2rem, 5vw, 4.2rem); }
.heritage-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .85rem 1.7rem; margin-bottom: 1.15rem; }
.heritage-heading h2 { color: var(--night); font: 500 clamp(2.05rem, 5vw, 4.15rem)/.99 var(--serif); letter-spacing: -.055em; }
.heritage-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: .28rem .45rem; max-width: 45rem; }
.heritage-navigation a, .heritage-navigation button {
  display: inline-flex; align-items: center; min-height: 2.6rem; padding: .35rem .65rem; border: 1px solid transparent;
  border-radius: .55rem; background: transparent; color: #24557e; font-size: .88rem; font-weight: 680; text-align: start; text-decoration: none;
}
.heritage-navigation a:hover, .heritage-navigation button:hover { border-color: #b3c9db; background: #ffffffb0; }

.heritage-welcome-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 1fr); gap: clamp(.72rem, 2.3vw, 1.45rem); }
.heritage-welcome {
  display: flex; flex-direction: column; align-items: start; justify-content: center; padding: clamp(1.25rem, 4.1vw, 3.15rem);
  background: linear-gradient(135deg, #fffdf7, #fff); border: 1px solid #e9e1cc; border-radius: 1.22rem;
}
.heritage-welcome figcaption { color: #725019; font-size: .83rem; font-weight: 720; }
.heritage-welcome blockquote { max-width: 64ch; margin: .72rem 0 0; color: #28465f; }
.heritage-welcome blockquote p + p { margin-top: .57rem; }
.heritage-welcome .heritage-greeting { font: 500 clamp(1.45rem, 3vw, 2.45rem)/1.13 var(--serif); color: var(--night); letter-spacing: -.028em; }
.heritage-welcome blockquote footer { margin-top: .85rem; font-size: .89rem; }
.heritage-old-contact { width: 100%; margin-top: auto; padding-top: .86rem; color: #385a77; font-size: .86rem; }
.heritage-old-contact strong { color: #173e64; white-space: nowrap; }

.heritage .attendance-embedded { display: flex; padding: 0; min-width: 0; }
.heritage .attendance-card {
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; width: 100%; gap: 1rem;
  padding: clamp(1.25rem, 3.1vw, 2.45rem); border-radius: 1.22rem;
  background: linear-gradient(135deg, #16324e, #244967);
}
.heritage .attendance-summary :is(h2, h3) { font-size: clamp(1.4rem, 2.65vw, 2rem); text-wrap: initial; }
.heritage .attendance-odometer { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(.2rem, .7vw, .4rem); max-width: 24rem; margin-top: .85rem; }
.heritage .attendance-odometer span { padding: .12em 0; min-width: 0; font-size: clamp(1.13rem, 4.1vw, 2.15rem); }
.heritage .attendance-periods div { padding-block: .2rem; }

.heritage-directory-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.4rem; margin-bottom: .85rem; }
.heritage-directory-head h2, .heritage-popular :is(h2, h3) { font: 500 clamp(1.85rem, 3.7vw, 3.15rem)/1.08 var(--serif); letter-spacing: -.048em; color: var(--night); }
.heritage-directory-head h2 { scroll-margin-top: 1rem; }
.heritage-catalog-total { margin-top: .28rem; color: var(--muted); font-size: .88rem; }
.heritage-search { display: grid; gap: .3rem; min-width: min(100%, 22rem); }
.heritage-search label { color: #385a77; font-size: .81rem; font-weight: 700; }
.heritage-search > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .25rem; }
.heritage-search input, .heritage-search button { min-width: 0; min-height: 2.65rem; border: 1px solid #a7bfd2; border-radius: .52rem; }
.heritage-search input { width: 100%; padding-inline: .55rem; background: #fff; }
.heritage-search button { padding-inline: clamp(.3rem, 1.4vw, .62rem); color: #234969; background: #eaf2f8; font-size: .8rem; font-weight: 700; }
.heritage-search button:hover { background: #dcebf8; border-color: #799ab6; }

.heritage-group-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .48rem; margin-bottom: clamp(.72rem, 1.6vw, 1rem); }
.heritage-group-nav a {
  display: grid; min-height: 2.9rem; place-items: center; padding: .45rem .55rem; border: 1px solid #b8cddd;
  border-radius: .65rem; background: #eaf2f9; color: #1d4568; font-size: .9rem; line-height: 1.3;
  font-weight: 710; text-align: center; text-decoration: none; overflow-wrap: anywhere;
}
.heritage-group-nav a:hover, .heritage-group-nav a:focus-visible { border-color: #789cb8; background: #daeafa; color: #0d345b; }
.heritage-group-nav a:active, .heritage-group-nav a[aria-current="location"] { border-color: #315e80; background: #d6e8f8; }
.heritage-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-bottom: clamp(.75rem, 2vw, 1.2rem); }
.heritage-quick .tabs { align-self: start; min-width: max-content; }
.quick-choices { display: flex; flex-wrap: wrap; align-items: center; gap: .06rem .45rem; }
.quick-choice { display: inline-flex; min-height: 2.4rem; align-items: center; gap: .36rem; padding: .3rem .52rem; border-radius: .5rem; color: #214f74; font-size: .88rem; font-weight: 640; text-decoration-color: #a1b9ce; text-underline-offset: .17em; }
.quick-choice span { min-width: 1.65rem; padding: .11rem .35rem; border-radius: .35rem; background: #e8f1f8; color: #2b506c; font-size: .72rem; text-align: center; }
.quick-choice:hover, .quick-choice:focus-visible { background: #e7f0f8; text-decoration-color: currentColor; }

.heritage-departments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.65rem, 1.7vw, 1.25rem); }
.heritage-department {
  display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); min-inline-size: 0; border-radius: 1.05rem;
  border: 1px solid #d6e3ee; background: white; box-shadow: 0 .2rem 1rem #173d6110; scroll-margin-top: 1rem;
}
.heritage-department:is(:target, :focus) { border-color: #6e97b9; box-shadow: 0 0 0 .15rem #b5d4ed, 0 .2rem 1rem #173d6110; }
.heritage-department-art {
  position: relative; isolation: isolate; container-type: inline-size; display: flex; align-items: end; overflow: hidden; min-height: 100%; min-width: 0;
  padding: clamp(.75rem, 2.45vw, 1.5rem); border-radius: calc(1.05rem - 1px) 0 0 calc(1.05rem - 1px);
  color: white; background: #163650;
}
.heritage-department-art img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.heritage-department-art::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, transparent 38%, #0d274a8c 68%, #0b1e33 100%); }
.heritage-department-art h3 { margin: 0; max-width: 100%; color: white; font: 600 1.5rem/1.05 var(--serif); font-size: clamp(1.25rem, 13cqi, 2.05rem); letter-spacing: -.035em; text-wrap: balance; text-shadow: 0 .1em .35em #071b30; }
.heritage-directory-list, .heritage-directory-entry ul, .heritage-popular ul { margin: 0; list-style: none; padding: 0; }
.heritage-directory-list { align-self: center; padding: .46rem clamp(.58rem, 1.55vw, .92rem); }
.heritage-directory-entry + .heritage-directory-entry { border-top: 1px solid #e0ebf4; }
.heritage-directory-entry a, .heritage-directory-entry summary {
  display: flex; min-height: 2.75rem; align-items: center; justify-content: space-between; gap: .4rem;
  padding: .43rem .34rem; color: #234867; font-size: .92rem; line-height: 1.32; font-weight: 670; text-decoration: none;
}
.heritage-directory-entry a:hover, .heritage-directory-entry summary:hover { background: #eef5fb; color: #133a5f; text-decoration: underline; text-underline-offset: .2em; }
.heritage-directory-entry a > span { overflow-wrap: anywhere; }
.heritage-directory-entry a small { flex: none; font-size: .75rem; color: #486b89; }
.heritage-directory-entry summary { list-style: none; cursor: pointer; }
.heritage-directory-entry summary::-webkit-details-marker { display: none; }
.heritage-directory-entry summary::after { content: '+'; color: #2b5a80; align-self: center; flex: none; font-size: 1.12rem; }
.heritage-directory-entry details[open] summary::after { content: '−'; }
.heritage-directory-entry ul { padding: 0 .5rem .35rem .65rem; border-inline-start: 2px solid #dbe9f4; }
.heritage-directory-entry ul a { font-size: .85rem; }

.heritage-popular { margin-top: clamp(1.5rem, 3.8vw, 2.85rem); padding: clamp(1.05rem, 3.2vw, 2rem); background: #e9f2fa; border: 1px solid #dce8f2; border-radius: 1.12rem; }
.heritage-popular ul { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .83rem; }
.heritage-popular a { display: inline-flex; min-height: 2.75rem; align-items: center; flex-wrap: wrap; gap: .05rem .55rem; padding: .42rem .67rem; border: 1px solid #bdd1e3; border-radius: .54rem; background: #fff; color: #214a6e; font-size: .9rem; font-weight: 675; text-decoration: none; }
.heritage-popular a:hover { border-color: #7599b7; background: #f5fbff; text-decoration: underline; text-underline-offset: .18em; }
.heritage-popular small { color: #654619; font-size: .76rem; }

.heritage-history { display: flex; flex-wrap: wrap; gap: .35rem .8rem; align-items: baseline; margin-top: .85rem; }
.heritage-history a { display: inline-flex; min-height: 2.65rem; align-items: center; flex-wrap: wrap; gap: .24rem .4rem; text-decoration-color: #98b2ca; text-underline-offset: .2em; padding-inline: .3rem; }
.heritage-history a:hover { text-decoration-color: currentColor; }
.heritage-history small, .heritage-unlinked { color: #526c83; font-size: .81rem; }
.heritage-unlinked { padding-inline: .3rem; }

@media (max-width: 72rem) {
  .heritage-department { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .heritage-department-art { min-height: 6.5rem; border-radius: calc(1.05rem - 1px) calc(1.05rem - 1px) 0 0; }
  .heritage-directory-list { align-self: start; }
}

@media (max-width: 48rem) {
  .heritage-group-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 46rem) {
  .heritage-welcome-grid { grid-template-columns: minmax(0, 1fr); }
  .heritage-heading { gap: .5rem; }
  .heritage-navigation { column-gap: .2rem; }
  .heritage-navigation a, .heritage-navigation button { padding-inline: .42rem; }
}

@media (max-width: 44rem) {
  .heritage-departments { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 34rem) {
  .heritage-department-art { min-height: clamp(5rem, 24vw, 6.5rem); }
  .heritage-search { width: 100%; }
  .heritage-history { column-gap: .33rem; }
  .quick-choices { gap: 0 .14rem; }
  .quick-choice { padding-inline: .33rem; font-size: .8rem; }
}
