:root {
  --ink: #0d1c27;
  --navy: #102c3c;
  --navy-2: #164256;
  --paper: #f4f6f5;
  --white: #fff;
  --gold: #d9a441;
  --muted: #65747c;
  --line: #d9dfe0;
  --shadow: 0 22px 60px rgba(8, 28, 40, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }

.masthead { min-height: 92px; padding: 22px clamp(24px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--white); border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; flex: 1 1 auto; }
.inspector-logo { display: block; width: min(680px, 58vw); height: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.community-logo { display: block; width: min(560px, 82vw); max-height: 250px; margin: 20px 0 24px; padding: 12px 18px; object-fit: contain; object-position: left center; background: var(--white); }
.eyebrow, .brand-sub, .kicker, .section-number { margin: 0; }
.eyebrow { font-size: .86rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.brand-sub { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.project-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .85rem; }
.separator { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

main { min-height: 80vh; }
.intro { padding: clamp(70px, 10vw, 130px) clamp(24px, 8vw, 120px) 115px; color: var(--white); background: linear-gradient(120deg, rgba(8,29,41,.97), rgba(17,61,80,.91)), radial-gradient(circle at 80% 15%, #3e7285, #0d2635); position: relative; overflow: hidden; }
.intro::after { content: ""; position: absolute; width: 360px; height: 360px; right: -100px; bottom: -210px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.03), 0 0 0 140px rgba(255,255,255,.025); }
.kicker { color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { max-width: 880px; margin: 18px 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 7vw, 6.8rem); font-weight: 400; line-height: .92; letter-spacing: -.055em; }
h1 span { color: #c8d9df; }
.lede { max-width: 670px; margin: 0; color: #d8e2e6; font-size: clamp(1rem, 1.8vw, 1.25rem); line-height: 1.7; }

.map-section { max-width: 1440px; margin: 0 auto; padding: 72px clamp(20px, 5vw, 72px) 24px; }
.map-copy { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 20px; margin-bottom: 30px; }
.map-copy .section-number { grid-column: 1 / -1; }
.map-copy p:last-child { max-width: 470px; margin: 0 0 5px; color: var(--muted); line-height: 1.6; }
.map-frame { position: relative; overflow: hidden; border: 8px solid var(--white); background: #152a31; box-shadow: var(--shadow); }
.map-frame > img { display: block; width: 100%; height: auto; }
.map-markers { position: absolute; inset: 0; }
.map-marker { position: absolute; width: 34px; height: 34px; padding: 0; transform: translate(-50%, -50%); border: 2px solid var(--white); border-radius: 50%; background: var(--navy); color: var(--white); box-shadow: 0 3px 12px rgba(0,0,0,.42); cursor: pointer; font-size: .76rem; font-weight: 850; transition: transform .18s ease, background .18s ease; z-index: 1; }
.map-marker span { display: grid; place-items: center; width: 100%; height: 100%; }
.map-marker b { position: absolute; left: 50%; bottom: calc(100% + 8px); width: max-content; max-width: 150px; padding: 7px 9px; transform: translateX(-50%) translateY(5px); border-radius: 3px; background: rgba(6,24,34,.94); color: var(--white); opacity: 0; pointer-events: none; font-size: .72rem; letter-spacing: .02em; transition: opacity .18s ease, transform .18s ease; }
.map-marker:hover, .map-marker:focus-visible { transform: translate(-50%, -50%) scale(1.18); background: var(--gold); color: var(--navy); outline: 3px solid rgba(255,255,255,.55); z-index: 5; }
.map-marker:hover b, .map-marker:focus-visible b { opacity: 1; transform: translateX(-50%) translateY(0); }
.map-marker.pool { width: 38px; height: 38px; background: #087f87; }
.map-marker.pool span { font-size: .62rem; letter-spacing: -.02em; }
.map-key { margin: 18px 0 0; color: var(--muted); font-size: .86rem; }
.map-key span { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: var(--gold); }
.library { max-width: 1440px; margin: 0 auto; padding: 56px clamp(20px, 5vw, 72px) 100px; }
.library-head { margin-bottom: 36px; display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.section-number { margin-bottom: 7px; color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 400; letter-spacing: -.035em; }
.search { min-width: min(330px, 100%); display: flex; align-items: center; gap: 10px; padding: 11px 3px; border-bottom: 1px solid #8c989d; }
.search svg { width: 19px; fill: none; stroke: var(--navy); stroke-width: 1.8; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
.search input::placeholder { color: #7b888d; }

.building-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.building-card { min-height: 230px; padding: 23px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); background: var(--white); border: 1px solid var(--line); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; text-align: left; }
.building-card:hover, .building-card:focus-visible { transform: translateY(-4px); border-color: #9dabb0; box-shadow: var(--shadow); outline: 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.building-index { color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.status { padding: 5px 8px; background: #edf1f2; color: #617078; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.building-card.ready .status { background: #e5efe9; color: #2a6045; }
.building-name { margin: 34px 0 8px; font-family: Georgia, serif; font-size: 1.58rem; font-weight: 400; }
.card-label { margin: 0; color: var(--muted); font-size: .86rem; }
.card-action { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; color: var(--navy-2); border-top: 1px solid #e9eded; font-size: .86rem; font-weight: 750; }
.arrow { font-size: 1.2rem; transition: transform .2s ease; }
.building-card:hover .arrow { transform: translateX(4px); }
.empty { padding: 40px; color: var(--muted); text-align: center; }

footer { padding: 30px clamp(24px, 5vw, 72px); display: flex; justify-content: space-between; gap: 24px; background: #091c27; color: #b9c7cc; font-size: .78rem; }
footer p { margin: 0; }
footer strong { color: var(--white); }

dialog { width: min(1000px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; background: transparent; }
dialog::backdrop { background: rgba(3, 14, 20, .86); backdrop-filter: blur(5px); }
.dialog-shell { position: relative; padding: clamp(22px, 4vw, 46px); background: var(--white); box-shadow: 0 40px 100px rgba(0,0,0,.35); }
.close { position: absolute; top: 16px; right: 18px; width: 42px; height: 42px; border: 0; background: #eef1f2; color: var(--navy); cursor: pointer; font-size: 1.75rem; line-height: 1; }
.dialog-heading { margin-bottom: 24px; padding-right: 50px; }
.dialog-heading h2 { margin-top: 8px; }
.video-frame { display: grid; gap: 26px; }
.video-selector { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.video-choice { min-height: 44px; padding: 10px 18px; border: 1px solid #b7c2c7; background: #f4f6f6; color: var(--navy); cursor: pointer; font-weight: 750; }
.video-choice.active { border-color: var(--navy); background: var(--navy); color: var(--white); }
.video-item h3 { margin: 0 0 10px; color: var(--navy); font-size: 1rem; }
.video-player { aspect-ratio: 16 / 9; overflow: hidden; background: #0b202c; color: var(--white); }
.video-player iframe, .video-player video { width: 100%; height: 100%; border: 0; }
.video-poster { width: 100%; height: 100%; padding: clamp(24px, 5vw, 54px); display: grid; place-items: center; align-content: center; gap: 16px; border: 0; background: linear-gradient(145deg, #f8faf9, #dce6e9); color: var(--navy); cursor: pointer; }
.video-poster img { display: block; width: min(72%, 540px); max-height: 55%; object-fit: contain; mix-blend-mode: multiply; }
.video-poster strong { font-size: clamp(.9rem, 2.4vw, 1.15rem); }
.poster-play { width: 62px; height: 62px; display: grid; place-items: center; padding-left: 4px; border-radius: 50%; background: var(--navy); color: var(--gold); font-size: 1.3rem; box-shadow: 0 10px 30px rgba(8,29,41,.25); }
.drive-fallback { display: inline-block; margin-top: 12px; color: var(--navy); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.video-placeholder { min-height: min(520px, 56vw); padding: 30px; display: grid; place-content: center; text-align: center; background: #0b202c; color: var(--white); }
.play-mark { width: 66px; height: 66px; margin: 0 auto 20px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: var(--gold); font-size: 1.35rem; }
.video-placeholder strong { display: block; margin-bottom: 8px; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; }
.video-placeholder span { color: #b9c8ce; line-height: 1.6; }
.dialog-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .85rem; }
.dialog-foot p { margin: 0; }
.text-button { padding: 0; border: 0; border-bottom: 1px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; font-weight: 750; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) { .building-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .masthead { align-items: flex-start; }
  .community-logo { width: min(520px, 100%); max-height: 210px; }
  .inspector-logo { width: min(620px, 100%); }
  .project-meta { display: none; }
  .intro { padding-bottom: 82px; }
  .library-head { align-items: stretch; flex-direction: column; }
  .map-copy { grid-template-columns: 1fr; }
  .map-copy .section-number { grid-column: auto; }
  .map-frame { overflow-x: auto; }
  .map-frame > img, .map-markers { min-width: 760px; }
  .search { min-width: 100%; }
  .building-grid { grid-template-columns: repeat(2, 1fr); }
  footer, .dialog-foot { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 480px) {
  .masthead { padding: 18px; }
  .inspector-logo { width: 100%; }
  .intro { padding-left: 20px; padding-right: 20px; }
  .building-grid { grid-template-columns: 1fr; }
  .building-card { min-height: 205px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
