.residence-collection {
  --res-paper: light-dark(#f5f3eb, #1e2421);
  --res-ink: light-dark(#26382c, #f0eee5);
  --res-muted: light-dark(#526057, #b9c3b9);
  --res-rule: light-dark(#c9cfc1, #444f46);
  --res-active: light-dark(#2e4936, #d7e4cc);
  --res-on-active: light-dark(#faf9f2, #223426);
  --res-serif: "Instrument Serif", Georgia, serif;
  --res-gutter: clamp(1rem, 4.6vw, 5.5rem);
  background: var(--res-paper); color: var(--res-ink);
  padding: clamp(3.6rem, 6vw, 7rem) var(--res-gutter);
  font: 400 1rem/1.55 Geist, Arial, sans-serif;
}
.residence-inner { width: min(100%, 150rem); margin: 0 auto; }
.residence-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(1.7rem, 3.1vw, 3.5rem); }
.residence-heading h2 { margin: 0; font: 400 clamp(3.1rem, 5.9vw, 7.2rem)/.96 var(--res-serif); letter-spacing: -.042em; color: var(--res-ink); }
.residence-heading h2 em { font: italic 400 1em/.96 var(--res-serif); color: inherit; }
.residence-heading > p { max-width: 32ch; margin: 0; color: var(--res-muted); font: 400 clamp(.94rem, 1.1vw, 1.15rem)/1.55 Geist, Arial, sans-serif; }
.residence-choices { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.residence-choices a {
  position: relative; display: flex; align-items: center; gap: .6rem; min-width: 0; min-height: 48px;
  padding: .55rem .2rem .8rem; border-block: 1px solid var(--res-rule); color: var(--res-muted);
  font: 400 clamp(1.18rem, 2.05vw, 2.05rem)/1.12 var(--res-serif); text-decoration: none;
}
.residence-choices a::before { content: ''; flex: none; width: .43rem; height: .43rem; box-sizing: border-box; border-radius: 50%; border: 1px solid currentColor; }
.residence-choices a[aria-current] { color: var(--res-ink); box-shadow: inset 0 -2px var(--res-active); }
.residence-choices a[aria-current]::before { background: currentColor; }
.residence-choices a:hover { color: var(--res-ink); text-decoration: underline; text-underline-offset: .2em; }
.residence[hidden] { display: none; }
.residence {
  display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(15.5rem, .8fr);
  grid-template-rows: 1fr auto auto 1fr; column-gap: clamp(1.6rem, 4.3vw, 5.6rem); margin: clamp(1.4rem, 2.4vw, 2.8rem) 0 0; scroll-margin-top: 1rem;
}
.residence-story { grid-area: 3 / 2; min-width: 0; padding-bottom: 1.75rem; }
.residence-name { grid-area: 2 / 2; margin: 0 0 1rem; color: var(--res-ink); font: 400 clamp(2.8rem, 4.65vw, 5.4rem)/.93 var(--res-serif); letter-spacing: -.04em; }
.residence-name span { display: block; margin-bottom: .2rem; font: italic 400 .52em/1 var(--res-serif); }
.residence-story > p { max-width: 37ch; margin: 0; color: var(--res-muted); font: 400 clamp(.94rem, 1.03vw, 1.11rem)/1.56 Geist, Arial, sans-serif; }
.residence-facts { display: flex; gap: clamp(1rem, 2.2vw, 2.7rem); padding-block: .95rem; margin: clamp(1.25rem, 2.3vw, 2.65rem) 0 .55rem; border-block: 1px solid var(--res-rule); }
.residence-facts div { display: flex; flex-direction: column-reverse; gap: .34rem; }
.residence-facts dd { margin: 0; white-space: nowrap; color: var(--res-ink); font: 400 clamp(1.6rem, 2.25vw, 2.65rem)/1 var(--res-serif); }
.residence-facts dt { color: var(--res-muted); font: 500 .76rem/1.3 Geist, Arial, sans-serif; }
.residence-walk { display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; color: var(--res-ink); font: 600 .86rem/1.4 Geist, Arial, sans-serif; text-decoration: none; }
.residence-walk span { font-size: 1.35em; }
.residence-walk:hover { text-decoration: underline; text-underline-offset: .2em; }
.residence-gallery { grid-area: 1 / 1 / 5 / 2; min-width: 0; align-self: start; display: grid; grid-template-columns: minmax(0,1fr); }
@media (max-width: 780px) {
  .residence-heading { display: block; }
  .residence-heading > p { max-width: 48ch; margin-top: .9rem; }
  .residence { display: flex; flex-direction: column; gap: 1rem; }
  .residence-story { padding: 0; }
  .residence-name { margin: .2rem 0 0; font-size: clamp(2.65rem, 7vw, 4rem); }
  .residence-name span { display: inline; font-size: .75em; }
  .residence-gallery { align-self: stretch; }
  .residence-story > p { max-width: 54ch; }
  .residence-facts { justify-content: flex-start; gap: clamp(2.3rem, 10vw, 5rem); margin: 1rem 0 .45rem; padding-block: .85rem; }
  .residence-choices a { min-height: 46px; }
}
@media (max-width: 490px) {
  .residence-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .residence-choices a:nth-child(n+3) { border-top: 0; }
}
@media (forced-colors: active) {
  .residence-choices a[aria-current] { outline: 2px solid Highlight; }
}
