@font-face {
  font-family: Baskervville;
  src: url("assets/baskervville.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: Baskervville;
  font-style: italic;
  src: url("assets/baskervville-italic.ttf") format("truetype");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #172e28;
  --cream: #f5ecda;
  --gold: #d7b87d;
  --muted: #c4cfbf;
  --serif: Baskervville, Georgia, serif;
  font-family: system-ui, sans-serif;
  background: var(--ink);
  color: var(--cream);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 30%, #2b4237 0%, #1b342c 56%, #162b25 100%);
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #fff3af; outline-offset: 4px; }
.masthead { border-bottom: 1px solid #bba27344; }
.masthead-inner {
  width: min(91%, 1320px);
  margin: auto;
  min-height: 61px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark, .guide, .location, .progress { display: inline-flex; align-items: center; }
.wordmark { gap: 11px; font: 1.24rem var(--serif); }
.wordmark img { width: 28px; height: 28px; }
.guide {
  background: transparent;
  border: 0;
  gap: 9px;
  min-height: 44px;
  font-size: .88rem;
  padding: 0 2px 0 10px;
}
.guide:hover { color: var(--gold); }
.guide svg, .location svg { width: 17px; height: 17px; }
main { width: min(91%, 1320px); margin: auto; padding: 0 0 23px; }
.intro { text-align: center; padding: clamp(24px, 3.2vw, 48px) 0 clamp(22px, 2.4vw, 38px); }
.edition, .paper-edition {
  font: 600 .73rem/1.5 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .22em;
}
.edition { display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--gold); }
.edition i { width: 38px; height: 1px; background: #d7b87d77; }
.edition span { font-size: .65rem; }
h1 { margin: 9px 0 7px; color: #eee1bf; font: 400 clamp(2.85rem, 5.85vw, 5.55rem)/1.12 var(--serif); letter-spacing: -.052em; }
h1 em { color: #dfc087; white-space: nowrap; }
.intro p { margin: 0; color: #e3e3d6; font: 1.15rem/1.6 var(--serif); }
.calendar {
  margin: 0;
  background: #f2e8d3;
  color: #394737;
  padding: clamp(5px, .55vw, 9px);
  padding-bottom: 0;
  border: 1px solid #e4d6b7;
  outline: 1px solid #b59c6480;
  outline-offset: 3px;
  box-shadow: 0 10px 24px #081c1940;
}
.street {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #7d7565 url("assets/washington.webp") center / cover;
  min-height: 1px;
}
.house {
  aspect-ratio: 1 / 2;
  position: relative;
  background: url("assets/washington.webp") var(--crop) center / 400% 100% no-repeat;
  container-type: inline-size;
}
.door {
  --w: clamp(33px, 18cqw, 66px);
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  width: var(--w);
  height: max(44px, calc(var(--w) * 1.16));
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 2px;
  perspective: 320px;
}
.flap {
  display: grid;
  place-items: center;
  position: relative;
  width: var(--w);
  height: calc(var(--w) * 1.16);
  color: #fff3d4;
  border: 1px solid #f6dfa7;
  outline: 1px solid #43361f;
  border-radius: 2px;
  background: linear-gradient(110deg, #382f20ba, #483722ad 58%, #57412bbd);
  box-shadow: 1px 2px 4px #2517079c, inset 0 0 6px #3c291966;
  text-shadow: 0 1px 4px #301c0e;
  font: 400 clamp(23px, 10.6cqw, 39px)/1 var(--serif);
  font-variant-numeric: lining-nums;
  transform-origin: left center;
  transition: transform .24s ease, box-shadow .24s ease;
}
.flap::before { content: ""; position: absolute; inset: 3px; border: 1px dashed #e6ca8bba; }
.flap::after {
  content: "";
  position: absolute; bottom: 0; right: 0;
  width: 7px; height: 7px;
  background: linear-gradient(135deg, transparent 48%, #e0c799 51%, #c1a06d);
}
.house:nth-child(3n + 1) .door:nth-child(2n) .flap,
.house:nth-child(3n + 2) .door:nth-child(2n + 1) .flap { background: linear-gradient(115deg, #613825c4, #663727b5); }
.house:nth-child(3) .flap, .house:nth-child(4) .door:nth-child(3n) .flap { background: linear-gradient(115deg, #23392ec9, #2c4032b8); }
.door.opened .flap {
  background: #f2e4c5; color: #304337; border-color: #543f21; text-shadow: none;
  transform: rotateY(-12deg);
}
.door.opened .flap::before { border: 1px solid #b39c70; }
.door.opened .flap::after { content: "✓"; background: #355641; color: white; font: 10px/14px system-ui; width: 14px; height: 14px; }
@media (hover: hover) {
  .door:hover { z-index: 1; }
  .door:hover .flap { transform: rotateY(-19deg) translateY(-2px); box-shadow: 4px 4px 8px #261d14a8; }
}
figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 9px 12px; }
.location { gap: 6px; font: italic 1.05rem var(--serif); }
.progress { gap: 10px; font-size: .82rem; }
.progress-track { width: 58px; height: 4px; background: #d3c8b0; overflow: hidden; border-radius: 2px; }
#fill { display: block; height: 100%; background: #526946; }
.note { margin: 21px auto 0; text-align: center; color: var(--muted); font: italic .99rem/1.55 var(--serif); }
dialog {
  color-scheme: light;
  overflow: auto;
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 7px;
  background: #f8efdc;
  color: #263c31;
  border: 1px solid #b3a078;
  box-shadow: 0 16px 70px #05150b5c;
}
dialog::backdrop { background: #0b211bd6; }
dialog:focus-visible, dialog :focus-visible { outline-color: #815c26; }
dialog[open] { animation: reveal .22s ease-out; }
.paper { border: 1px solid #cab990; padding: 40px clamp(19px, 5vw, 34px) 34px; position: relative; }
.close {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px;
  border: 0; background: none; font: 1.65rem var(--serif);
}
.paper-edition { color: #735a36; padding-right: 12px; }
h2 { font: 400 clamp(1.7rem, 4vw, 2.2rem)/1.18 var(--serif); letter-spacing: -.035em; margin: 15px 0; overflow-wrap: anywhere; }
#panel-text { font: 1.07rem/1.65 var(--serif); margin: 0; overflow-wrap: anywhere; }
#article { display: inline-block; padding: 12px 19px; margin-top: 21px; background: #294536; color: #fff6e3; font-size: .95rem; text-decoration: none; }
#article:hover { background: #3c5a48; }
#article[hidden] { display: none; }
@keyframes reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) {
  .street { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 5px; background: #f2e8d3; }
  .intro { padding: 30px 0; }
}
@media (max-width: 540px) {
  .masthead-inner, main { width: 92%; }
  .masthead-inner { min-height: 55px; }
  .wordmark { font-size: 1.02rem; gap: 7px; }
  .wordmark img { width: 23px; }
  .guide { font-size: .8rem; gap: 6px; }
  .intro { padding: 24px 0; }
  h1 { margin: 10px auto 9px; font-size: clamp(2.55rem, 10.8vw, 3.4rem); line-height: 1.03; text-wrap: balance; }
  .intro p { max-width: 29ch; margin: auto; font-size: 1.01rem; line-height: 1.4; }
  .edition { font-size: .67rem; }
  .progress-track { display: none; }
  .location { font-size: .95rem; }
  .progress { font-size: .76rem; }
}
@media (max-width: 374px) {
  .street { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
