/* Eco Hamlet. System fonts only, no external requests. MIT licence. */
:root {
  color-scheme: light dark;
  --bg: #f6f5ee;
  --text: #1d392c;
  --muted: #3f5a4c;
  --link: #245c4a;
  --eyebrow: #3d6b53;
  --surface: #ffffff;
  --border: #c7d4c8;
  --button: #235842;
  --button-hover: #16442e;
  --button-text: #ffffff;
  --pressed: #8f5a21;
  --pressed-border: #8f5a21;
  --focus: #b45e1c;
  --header: #163a30;
  --header-text: #ffffff;
  --header-focus: #ffd28a;
  --paper: #faf8f2;
  --notice: #fff4e0;
  --ok: #1f6b3a;
  --fail: #a3261b;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a16;
    --text: #e6efe8;
    --muted: #bcd0c3;
    --link: #9fd6bd;
    --eyebrow: #a8cdb6;
    --surface: #1b2621;
    --border: #3a5144;
    --button: #2f7a5a;
    --button-hover: #3a8d69;
    --pressed: #8f5a21;
    --pressed-border: #e0a35c;
    --focus: #ffb56b;
    --header: #0b120f;
    --notice: #2b2416;
    --ok: #8fdca8;
    --fail: #ff9e94;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input:focus-visible { outline-offset: 2px; }
img, svg { max-width: 100%; }
code { font-size: 0.95em; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -10rem; z-index: 10;
  background: var(--surface); color: var(--link); padding: 0.6rem 1rem; border-radius: 0.4rem;
}
.skip:focus { top: 1rem; }

.site-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  padding: 0.9rem max(1.2rem, calc((100vw - 1150px) / 2)); background: var(--header); color: var(--header-text);
}
.site-header a { color: var(--header-text); text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.site-header a:focus-visible, .site-footer a:focus-visible { outline-color: var(--header-focus); }
.brand { font-weight: 800; letter-spacing: 0.1em; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin: 0; padding: 0; list-style: none; }

main { max-width: 1150px; margin: auto; padding: 0 1.2rem; }
main:focus { outline: none; }
section { padding: 4rem 0; border-bottom: 1px solid var(--border); }
section > p, .disclosures p, .small { max-width: 72ch; }
h1 { font-size: clamp(2.1rem, 4vw, 3.55rem); line-height: 1.08; margin: 0.4rem 0 0.7rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.2; margin: 0.2rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 2.2rem 0 0.8rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 750; color: var(--eyebrow); margin: 0; }
.small, .note { font-size: 0.9rem; color: var(--muted); }

.action, button {
  display: inline-block; border: 2px solid transparent; border-radius: 0.5rem; background: var(--button); color: var(--button-text);
  padding: 0.6rem 1rem; font: inherit; cursor: pointer; text-decoration: none; min-height: 44px;
}
.action:hover, button:hover { background: var(--button-hover); }
button[aria-pressed="true"] { background: var(--pressed); border-color: var(--text); font-weight: 700; }
button[aria-pressed="true"]::before { content: "✓ "; }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.hero-image img, .lodge-image img { width: 100%; height: auto; border-radius: 1rem; border: 1px solid var(--border); background: var(--paper); display: block; }
.lodge-image { max-width: 760px; margin: 1.5rem 0; }
.notice { background: var(--notice); border-left: 4px solid var(--focus); padding: 0.6rem 0.9rem; }

/* site map */
.map-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(17rem, 1fr) minmax(13rem, 0.72fr); grid-template-areas: "map panel key"; gap: 1.25rem; align-items: start; }
.map-wrap { grid-area: map; min-width: 0; }
.map-panel { grid-area: panel; min-width: 0; }
.map-side { grid-area: key; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 0.7rem; padding: 0.8rem 1rem; scroll-margin-top: 1rem; }
.map-side:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.map-side h3 { margin-top: 0; }
.map-side .legend { grid-template-columns: 1fr; gap: 0.35rem; }
.map-side .legend li { align-items: flex-start; }
.map-side .swatch { margin-top: 0.15rem; }
.map-layers { margin-top: 1rem; }
.map-layers fieldset { margin: 0; }
.map { background: #d9e4ca; border-radius: 1rem; overflow: hidden; border: 1px solid var(--border); }
.map svg { display: block; width: 100%; height: auto; overflow: hidden; forced-color-adjust: none; }
.map .building { cursor: pointer; }
.map .building:hover .part-building { stroke: #b45e1c; stroke-width: 1.2; }
.map .building.selected .part { stroke: #b45e1c; stroke-width: 1.4; }
.map .building.selected .hit { fill: #ffd28a; fill-opacity: 0.45; stroke: #7a3b14; stroke-width: 1; stroke-dasharray: 2 1.5; }
.map .building.selected text { font-size: 8px; }
.map-panel fieldset, .explorer-controls fieldset { border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.6rem 0.9rem 0.8rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 0.3rem; }
.layers label, fieldset.checks label { display: flex; gap: 0.5rem; align-items: center; padding: 0.25rem 0; min-height: 32px; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--button); margin: 0; flex: none; }
.selector { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.selector .label { flex-basis: 100%; margin: 0; font-weight: 700; }
.selection { font-weight: 650; margin: 0 0 0.6rem; min-height: 7.5rem; }
.details { background: var(--surface); border: 1px solid var(--border); border-radius: 0.7rem; padding: 0.4rem 1rem; height: 30rem; max-height: 30rem; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.details:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.details:empty { display: none; }
.details h3 { margin: 0.6rem 0 0.4rem; }
.details ul { padding-left: 1.2rem; }
.detail-facts { display: grid; gap: 0.35rem; margin: 0.6rem 0; }
.detail-facts > div { display: grid; grid-template-columns: minmax(7.5rem, 0.35fr) minmax(0, 1fr); gap: 0.6rem; }
.detail-facts dt { font-weight: 700; }
.detail-facts dd { margin: 0; }
.detail-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; }
.panel-notes { padding-left: 1.1rem; margin: 0.9rem 0 0; }
.panel-notes li { margin: 0.25rem 0; }

.legend { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.4rem 1.5rem; }
.legend li { display: flex; gap: 0.6rem; align-items: center; }
.swatch { display: inline-block; flex: none; width: 1.6rem; height: 1rem; border: 1px solid #1d392c; forced-color-adjust: none; }
.sw-buffer { background: repeating-linear-gradient(45deg, #f3e3c3 0 3px, #a5552d 3px 4.5px); }
.sw-wetland { background: #9cc3a7; }
.sw-lake { background: #8ebdcc; }
.sw-lane { background: #e4e0bd; }
.sw-access { background: #e9dfc5; }
.sw-path { background: #f3ecd8; }
.sw-crane { background: #f6e2cf; border: 2px solid #b45e1c; }
.sw-home { background: #b58a62; }
.sw-lodge { background: #8a694d; }
.sw-terrain { background: linear-gradient(135deg, #c9d3b1 0 33%, #e7e2cb 33% 66%, #9fb791 66%); }
.sw-rock { background: repeating-linear-gradient(45deg, #b9b3a4 0 3px, #8b8475 3px 4px); }
.sw-clearing { background: #e7dfb9; }
.sw-woodland { background: #b7c7a6; }
.sw-view { background: #3f5f8a; }
.sw-potential { background: repeating-linear-gradient(90deg, #f6f1d8 0 3px, #8a8f5e 3px 4px); }
.sw-parcel { background: linear-gradient(transparent 45%, #7a3b2e 45% 60%, transparent 60%); }

/* drawings */
.drawings { margin: 1.5rem 0; }
.drawing { margin: 1rem 0; padding: 1rem; background: var(--paper); border: 1px solid var(--border); border-radius: 0.8rem; color: #1d392c; }
.drawing img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; display: block; }
.drawing figcaption { font-size: 0.95rem; margin-top: 0.6rem; }
.drawing figcaption a { color: #245c4a; }
.js .drawings .drawing:not(.is-current) { display: none; }
fieldset.segmented { border: 0; padding: 0; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
fieldset.segmented legend { flex-basis: 100%; padding: 0; margin-bottom: 0.3rem; float: left; width: 100%; }
fieldset.segmented label {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.8rem; min-height: 44px;
  border: 2px solid var(--border); border-radius: 0.5rem; background: var(--surface); cursor: pointer;
}
fieldset.segmented label:has(input:checked) { border-color: var(--pressed-border); font-weight: 700; }
fieldset.segmented label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
fieldset.segmented input:focus-visible { outline: none; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.6rem 1.5rem; margin: 1.2rem 0; }
.facts div { background: var(--surface); border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.6rem 0.9rem; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0.2rem 0 0; }

/* explorer */
.explorer { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(16rem, 1fr); grid-template-areas: "view controls" "rooms rooms"; gap: 1rem 1.5rem; align-items: start; }
.explorer-figure { grid-area: view; margin: 0; }
.explorer-controls { grid-area: controls; }
.rooms-nav { grid-area: rooms; }
.explorer-canvas { background: var(--paper); border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.5rem; }
.explorer-canvas svg, .explorer-canvas img { display: block; width: 100%; height: auto; max-height: 72vh; forced-color-adjust: none; }
.explorer-figure figcaption { font-size: 0.95rem; margin-top: 0.4rem; }
.explorer-controls fieldset.segmented { border: 1px solid var(--border); padding: 0.5rem 0.7rem 0.7rem; }
.explorer-controls fieldset.segmented label { padding: 0.3rem 0.6rem; min-height: 40px; }
.room-buttons { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.room-info { background: var(--surface); border: 1px solid var(--border); border-radius: 0.7rem; padding: 0.3rem 1rem; max-width: 72ch; }
.room-info h4 { font-size: 1.15rem; margin: 0.6rem 0 0.3rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.preset-cards { margin: 1.4rem 0 1.2rem; }
.preset-cards article { display: flex; flex-direction: column; }
.preset-cards img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 0.5rem; margin-bottom: 0.7rem; background: var(--paper); }
.preset-cards h3 { margin: 0.2rem 0 0.5rem; }
.preset-cards p:last-child { margin-top: auto; }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }

.cards article { background: var(--surface); border: 1px solid var(--border); padding: 1rem; border-radius: 0.7rem; }
.cards h3 { margin-top: 0; }
.disclosures details { border: 1px solid var(--border); border-radius: 0.6rem; background: var(--surface); margin: 0.5rem 0; padding: 0 1rem; }
.disclosures summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; min-height: 44px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--border); border-radius: 0.6rem; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; padding: 0.7rem 0.9rem; font-weight: 600; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.9rem; border-top: 1px solid var(--border); }
thead th { background: color-mix(in srgb, var(--border) 35%, transparent); }
table.passport { min-width: 70rem; }
table.checks { min-width: 46rem; }
.ok { color: var(--ok); font-weight: 700; }
.ok::before { content: "✓ "; }
.fail { color: var(--fail); font-weight: 700; }
.fail::before { content: "✗ "; }

#downloads ul.downloads { padding-left: 1.2rem; }
#downloads li { margin: 0.4rem 0; }
.meta { color: var(--muted); font-size: 0.9rem; }

.site-footer { padding: 2rem 1.2rem; text-align: center; background: var(--header); color: var(--header-text); }
.site-footer a { color: var(--header-text); }


/* hero, day and landscape */
.hero { align-items: stretch; }
.hero .lead { font-size: 1.08rem; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.2rem 0 1rem; }
.action.secondary { background: transparent; color: var(--link); border-color: var(--link); }
.action.secondary:hover { background: var(--surface); }
.hero-facts { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1rem; font-size: 0.92rem; color: var(--muted); }
.hero-facts li { border-left: 3px solid var(--border); padding-left: 0.55rem; }
.hero-image { margin: 0; }
.hero-image figcaption, .lodge-image figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.hero-image img { aspect-ratio: 1400 / 760; object-fit: cover; }

.day { list-style: none; counter-reset: day; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.day li { counter-increment: day; background: var(--surface); border: 1px solid var(--border); border-radius: 0.8rem; padding: 1rem 1.1rem; }
.day li::before { content: counter(day, decimal-leading-zero); display: block; font-weight: 800; letter-spacing: 0.08em; color: var(--eyebrow); font-size: 0.85rem; }
.day h3 { margin: 0.35rem 0 0.45rem; font-size: 1.1rem; }
.day p { margin: 0; }

.technical { border: 1px solid var(--border); border-radius: 0.7rem; background: var(--surface); padding: 0 1rem; margin: 1.5rem 0; }
.technical > summary { cursor: pointer; font-weight: 700; padding: 0.8rem 0; min-height: 44px; }
.technical > p, .technical > .table-wrap { margin-left: 0; }

/* homes */
.home-tabs { margin: 1.2rem 0 1.5rem; }
.home-dossiers { display: grid; gap: 1.5rem; }
.home { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.home:first-of-type { border-top: 0; padding-top: 0; }
.home-head { max-width: 72ch; }
.home-head h3 { margin: 0.2rem 0 0.4rem; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.home-name { color: var(--eyebrow); font-weight: 500; }
.home-lede { font-size: 1.05rem; }
.home-grid { display: grid; grid-template-columns: minmax(15rem, 0.8fr) minmax(0, 1.6fr); gap: 1.4rem 1.8rem; align-items: start; }
.view-diagram { margin: 0; background: var(--paper); border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.6rem; color: #1d392c; }
.view-diagram img { display: block; width: 100%; height: auto; }
.view-diagram figcaption { font-size: 0.85rem; color: #3f5a4c; margin-top: 0.5rem; }
.home-facts { display: grid; gap: 0.55rem; margin: 0; }
.home-facts > div { display: grid; grid-template-columns: minmax(8.5rem, 0.4fr) minmax(0, 1fr); gap: 0.8rem; border-top: 1px solid var(--border); padding-top: 0.55rem; }
.home-facts > div:first-child { border-top: 0; padding-top: 0; }
.home-facts dt { font-weight: 700; }
.home-facts dd { margin: 0; }
.home-actions { margin: 0.8rem 0 0; display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.home-actions button { min-height: 44px; }
.home-actions a { font-weight: 600; }
.js .home-dossiers .home:not(.is-current) { display: none; }

/* models and construction sequence */
.model-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.model-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0.8rem; overflow: hidden; }
.model-card-image { background: var(--paper); border-bottom: 1px solid var(--border); }
.model-card-image img { display: block; width: 100%; height: auto; }
.model-card-body { padding: 0.8rem 1rem 1rem; }
.model-card-body h3 { margin: 0.2rem 0 0.5rem; }
.model-card-body p { margin: 0.4rem 0; }
.model-card-body a { font-weight: 600; }
.plain-list { padding-left: 1.2rem; max-width: 72ch; }
.plain-list li { margin: 0.35rem 0; }
.sequence { padding-left: 1.4rem; max-width: 72ch; }
.sequence li { margin: 0.6rem 0; padding-left: 0.3rem; }
.sequence strong { display: block; }
h4 { font-size: 1.05rem; margin: 1.6rem 0 0.5rem; }

@media (max-width: 900px) {
  .explorer { grid-template-columns: 1fr; grid-template-areas: "view" "controls" "rooms"; }
  .home-grid { grid-template-columns: 1fr; }
  .home-facts > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .hero-facts { grid-template-columns: 1fr; }
}
@media (max-width: 1200px) {
  .map-layout { grid-template-columns: minmax(0, 2.2fr) minmax(15rem, 1fr); grid-template-areas: "map key" "panel panel"; }
}
@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; grid-template-areas: "map" "key" "panel"; }
  .details { height: auto; max-height: none; overflow: visible; }
}
@media (max-width: 750px) {
  .hero { grid-template-columns: 1fr; }
  .cards, .day, .model-cards { grid-template-columns: 1fr; }
  section { padding: 2.5rem 0; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (forced-colors: active) {
  button[aria-pressed="true"] { border: 3px solid Highlight; }
  fieldset.segmented label:has(input:checked) { border-color: Highlight; }
  .map .building.selected .hit { stroke: Highlight; }
  .notice { border-left-color: CanvasText; }
  .view-diagram, .model-card-image { forced-color-adjust: none; }
  .home { border-color: CanvasText; }
}
@media print {
  .site-header nav, [data-enhance], .skip { display: none !important; }
  .js .drawings .drawing:not(.is-current) { display: block; }
  .js .home-dossiers .home:not(.is-current) { display: block; }
  .home { break-inside: avoid; }
  section { break-inside: auto; padding: 1.5rem 0; }
  .table-wrap { overflow: visible; }
}

.home-index-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.home-index-card { background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; overflow: hidden; }
.home-card-image { display: block; background: var(--paper); border-bottom: 1px solid var(--border); }
.home-card-image img { display: block; width: 100%; height: auto; }
.home-card-body { padding: .75rem 1rem 1rem; }
.home-card-body h3 { margin: .2rem 0 .4rem; }
.home-card-links { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: .7rem 0 0; font-weight: 600; }

.home-index-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.home-index-card { background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; overflow: hidden; }
.home-card-image { display: block; background: var(--paper); border-bottom: 1px solid var(--border); }
.home-card-image img { display: block; width: 100%; height: auto; }
.home-card-body { padding: .75rem 1rem 1rem; }
.home-card-body h3 { margin: .2rem 0 .4rem; }
.home-card-links { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: .7rem 0 0; font-weight: 600; }

.model-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; margin: 1.5rem 0; }
.model-page-figure { margin: 1rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; overflow: hidden; }
.model-page-figure img { display: block; width: 100%; height: auto; }
.model-page-figure figcaption { padding: .7rem 1rem; font-size: .88rem; }
@media (max-width: 800px) { .model-page-grid { grid-template-columns: 1fr; } }

/* Make the map wider: selector beside it, key below. */
.map-layout { grid-template-columns: minmax(0, 2.8fr) minmax(17rem, 1fr); grid-template-areas: "map panel" "key key"; }
.map-side .legend { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem 1.2rem; }
.map-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0 .35rem; }
.map-actions .button { display: inline-flex; align-items: center; min-height: 2.75rem; }
.map:fullscreen { display: flex; align-items: center; justify-content: center; background: #d9e4ca; padding: 1rem; }
.map:fullscreen svg { width: auto; max-width: 100vw; max-height: 100vh; }
.map-promo { max-width: 52rem; margin: 1.5rem 0; }
.map-promo a { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: .9rem; padding: .8rem; text-decoration: none; color: inherit; }
.map-promo img { display: block; width: 100%; height: auto; border-radius: .5rem; border: 1px solid var(--border); }
.map-promo-title { display: block; font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.map-promo-copy { display: block; margin-top: .25rem; color: var(--muted); }
@media (max-width: 1200px) { .map-layout { grid-template-columns: minmax(0, 2.2fr) minmax(15rem, 1fr); grid-template-areas: "map panel" "key key"; } }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; grid-template-areas: "map" "panel" "key"; } .map-side .legend { grid-template-columns: 1fr; } .map-promo a { grid-template-columns: 1fr; } }

.map-callout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1.5rem; align-items: center; margin: 2rem 0; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; }
.map-callout h2 { margin-top: 0; }
.map-callout .map-promo { margin: 0; max-width: none; }
@media (max-width: 750px) { .map-callout { grid-template-columns: 1fr; } }

.home-config-figure { max-width: 34rem; margin: 1rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; overflow: hidden; }
.home-config-figure img { display: block; width: 100%; height: auto; }
.home-config-figure figcaption { padding: .55rem .8rem; font-size: .86rem; }

details.deep-dive { border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); margin: 1.2rem 0; padding: 0 1rem; }
details.deep-dive > summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; padding: .8rem 0; min-height: 44px; }
details.deep-dive[open] { padding-bottom: 1rem; }
details.concept-specs { border: 1px solid var(--border); border-radius: .5rem; padding: 0 .6rem; margin: .5rem 0; }
details.concept-specs > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
@media print { details.deep-dive, details.concept-specs { border: 0; padding: 0; } details.deep-dive > summary, details.concept-specs > summary { list-style: none; } }

.resident-intro { margin: 2rem 0; }
.resident-intro-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.resident-intro-grid article { background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; padding: 1rem; }
.resident-intro-grid h3 { margin-top: 0; }
.resident-intro-grid p { font-size: .92rem; }
.resident-intro-grid a { font-weight: 700; }
@media (max-width: 900px) { .resident-intro-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .resident-intro-grid { grid-template-columns: 1fr; } }

/* Phase 1.5 resident pages */
.resident-questions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.resident-questions article, .hub-grid > a, .hub-grid > article, .living-card, .scenario-card { background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; padding: 1rem; }
.resident-questions h3, .scenario-card h2, .living-card h3, .hub-grid h3 { margin-top: 0; }
.resident-questions p { font-size: .9rem; }
.scenario-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; padding: 0; }
.scenario-list a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; padding: 1rem; text-decoration: none; color: inherit; }
.scenario-list a span { display: block; margin-top: .35rem; font-size: .9rem; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.scenario-card { margin: 0; }
.scenario-facts { display: grid; grid-template-columns: 1fr; gap: .45rem; }
.scenario-facts > div { border-top: 1px solid var(--border); padding-top: .4rem; }
.scenario-facts dt { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.scenario-facts dd { margin: .15rem 0 0; font-size: .92rem; }
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.hub-grid > a { display: block; text-decoration: none; color: inherit; }
.hub-grid > a strong, .hub-grid > a span { display: block; }
.hub-grid > a span { margin-top: .3rem; font-size: .9rem; }
.roadmap-list { padding-left: 0; list-style: none; }
.roadmap-list > li { margin: .6rem 0; }
.roadmap-list details { border: 1px solid var(--border); border-radius: .7rem; padding: 0 1rem; background: var(--surface); }
.roadmap-list summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; }
.living-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.living-card dl { display: grid; grid-template-columns: 1fr; gap: .5rem; }
.living-card dt { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.living-card dd { margin: .1rem 0 0; font-size: .9rem; }
.cost-worksheet fieldset { margin: 1rem 0; border: 1px solid var(--border); border-radius: .8rem; padding: .8rem 1rem; }
.cost-worksheet table { width: 100%; border-collapse: collapse; }
.cost-worksheet th, .cost-worksheet td { border-bottom: 1px solid var(--border); padding: .45rem; vertical-align: top; text-align: left; }
.cost-worksheet th p { margin: .25rem 0 0; font-weight: 400; }
.cost-worksheet input { width: 9rem; max-width: 100%; min-height: 44px; }
.usability-tasks li { margin: .4rem 0; }
@media (max-width: 1100px) { .resident-questions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .scenario-list, .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 750px) { .resident-questions, .scenario-list, .scenario-grid, .hub-grid, .living-grid { grid-template-columns: 1fr; } }

.site-footer .small { color: inherit; }

/* Consistent top-level header + compact Design Lab sub-navigation */
.site-header { flex-wrap: wrap; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.subnav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; padding: .55rem max(1rem, calc((100vw - 72rem) / 2)); background: var(--surface); border-bottom: 1px solid var(--border); }
.subnav a { font-weight: 700; text-decoration: none; padding: .35rem .1rem; }
.subnav a[aria-current="page"] { border-bottom: 3px solid var(--focus); }
@media (max-width: 750px) { .site-header { align-items: flex-start; } .site-header nav { gap: .2rem .8rem; } .subnav { padding: .5rem 1rem; } }

/* Keep model pages and worksheets inside the mobile viewport. */
.model-page-grid, .model-page-grid > *, .model-page-figure { min-width: 0; }
.cost-worksheet fieldset { overflow-x: auto; min-width: 0; }
.cost-worksheet table { min-width: 34rem; }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; } }
