:root {
  font-family: Arial, sans-serif;
  color: #1b1d19;
  background: #f6f6f3;
  font-synthesis: none;
  --ink: #1b1d19;
  --muted: #6b7065;
  --line: #dedfd7;
  --lime: #d5ff3f;
  scroll-padding-top: 24px;
  scrollbar-gutter: stable;
}

* { box-sizing: border-box; }
body { margin: 0; }
body.dialog-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #6a7b20; outline-offset: 4px; }

.wrap { width: min(1360px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 10; padding: 12px 20px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
.header { display: flex; justify-content: space-between; align-items: center; gap: 30px; min-height: 104px; border-bottom: 1px solid var(--line); }
.brand-block { display: flex; align-items: center; gap: 44px; }
.wordmark { font-size: 27px; font-weight: 800; letter-spacing: -1.6px; line-height: 1; }
.navigation { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.navigation a { padding-block: 8px; color: var(--muted); }
.navigation a[aria-current] { color: var(--ink); box-shadow: 0 2px var(--lime); }
.navigation a:hover, .text-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.phone-action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: 100%; }
.header-contacts { align-items: flex-end; text-align: right; }
.phone-link { padding: 0; border: 0; background: transparent; appearance: none; color: var(--ink); font-size: 13px; line-height: 1.4; text-align: inherit; white-space: nowrap; }
.phone-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.phone-number { font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.header-contacts .phone-link, .footer-phone .phone-link { font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.contact-context { max-width: 34ch; color: var(--ink); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.call-hours { color: var(--muted); font-size: 10px; line-height: 1.5; max-width: 100%; overflow-wrap: break-word; }
.phone-feedback { color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.phone-copy-input { width: 200px; max-width: 100%; min-width: 0; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.4; user-select: all; }
.phone-copy-input::selection { background: var(--lime); color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 18px; border: 1px solid transparent; font-size: 12px; font-weight: 600; line-height: 1.4; }
.button-dark { background: var(--ink); color: #fff; }
.button-dark:hover { background: #3a4032; }
.button-outline { background: transparent; border-color: var(--line); }
.button-outline:hover { border-color: var(--ink); }
.button-lime { background: var(--lime); color: var(--ink); }
.button-lime:hover { background: #e0ff77; }
.text-link { color: var(--muted); font-size: 11px; line-height: 1.6; }
.text-link span { margin-left: 5px; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--ink); font-size: 11px; line-height: 1.6; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: #536229; }

.gallery { padding-block: 24px 58px; min-height: 55vh; }
.gallery-heading { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 36px 0 38px; border-bottom: 1px solid var(--line); text-align: center; }
.eyebrow { margin-bottom: 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.gallery-heading h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.1; font-weight: 700; letter-spacing: -1.8px; }
.gallery-intro { max-width: 60ch; color: var(--muted); font-size: 12px; line-height: 1.7; }
.gallery-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 55px; }
.gallery-status { color: var(--muted); font-size: 11px; line-height: 1.6; }
.mass-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.gallery > .mass-note { margin-bottom: 24px; }
.gallery-notice { padding: 14px 18px; margin-bottom: 24px; border-left: 3px solid #859435; background: #eeeee8; font-size: 12px; line-height: 1.7; }
.build-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 30px; }
.build-card { min-width: 0; }
.build-cover { position: relative; display: grid; place-items: center; width: 100%; padding: 0; aspect-ratio: 4 / 3; overflow: hidden; border: 0; background: #e9e9e4; }
.build-cover img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.cover-unavailable { padding: 22px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.build-info { display: flex; flex-direction: column; gap: 9px; padding: 17px 0 0; }
.build-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; width: 100%; }
.build-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.build-badge { align-self: flex-start; display: inline-block; padding: 4px 7px; background: #eaf0d9; color: #465526; font-size: 10px; line-height: 1.5; font-weight: 500; }
.build-title { min-width: 0; font-size: 20px; line-height: 1.35; font-weight: 500; letter-spacing: -.35px; overflow-wrap: anywhere; }
.build-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.build-count { flex-shrink: 0; color: var(--muted); font-size: 10px; line-height: 1.5; white-space: nowrap; }
.gallery-state { padding: 40px 22px; border: 1px solid var(--line); background: #eeefe8; text-align: center; }
.gallery-state h2 { font-size: 22px; line-height: 1.3; font-weight: 500; }
.gallery-state p { margin: 12px auto 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-block: 28px 34px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.footer-address { display: flex; flex-direction: column; gap: 5px; }
.footer-name { color: var(--ink); font-weight: 600; }
.footer-phone { align-items: flex-end; text-align: right; }

.build-dialog { width: min(1120px, calc(100% - 48px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); overflow: auto; background: #f6f6f3; color: var(--ink); }
.build-dialog::backdrop { background: #13170fce; }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; background: #f6f6f3; }
.dialog-heading { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.dialog-heading h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.5px; font-weight: 600; overflow-wrap: anywhere; }
.dialog-count { flex-shrink: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.icon-button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 23px; line-height: 1; }
.icon-button:hover { background: var(--lime); }
.dialog-close { font-size: 28px; }
.photo-stage { position: relative; display: grid; place-items: center; height: min(61dvh, 650px); min-height: 240px; background: #e8e8e2; touch-action: pan-y pinch-zoom; }
.photo-content { width: 100%; height: 100%; min-height: 0; }
.photo-content img { width: 100%; height: 100%; object-fit: contain; }
.photo-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 70px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }
.photo-arrow { position: absolute; z-index: 1; top: calc(50% - 22px); background: #f6f6f3ee; }
.photo-previous { left: 14px; }
.photo-next { right: 14px; }
.photo-thumbnails { display: flex; gap: 8px; padding: 14px 22px; overflow-x: auto; overscroll-behavior-inline: contain; }
.thumbnail { flex: 0 0 80px; height: 60px; padding: 3px; border: 1px solid var(--line); background: #fff; }
.thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.thumbnail[aria-current="true"] { border: 2px solid var(--ink); padding: 2px; box-shadow: 0 3px var(--lime); }
.thumbnail:hover { border-color: var(--ink); }
.dialog-footer { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 6px 22px 22px; }
.dialog-description { max-width: 600px; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.dialog-story { flex: 1 1 500px; min-width: 0; }
.dialog-story .build-badge { margin-bottom: 12px; }
.dialog-story > .mass-note { margin-top: 14px; }
.build-components { display: grid; grid-template-columns: minmax(100px, 130px) minmax(0, 1fr); gap: 7px 18px; margin: 18px 0 0; font-size: 12px; line-height: 1.6; }
.build-components dt { color: var(--muted); }
.build-components dd { margin: 0; overflow-wrap: anywhere; }
.dialog-sources { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; }
.source-link { color: var(--muted); font-size: 11px; line-height: 1.6; text-decoration: underline; text-underline-offset: 3px; }
.source-link:hover { color: var(--ink); }
.dialog-actions { display: flex; flex: 0 1 270px; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; margin-left: auto; }
.project-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding-block: 8px; font-size: 12px; line-height: 1.6; }
.project-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.dialog-actions > .contact-context { margin-bottom: 7px; }
.share-action { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px 20px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.share-feedback { flex-basis: 100%; min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.share-copy-input { display: block; width: 100%; max-width: 100%; margin-top: 7px; padding: 9px 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; user-select: all; }

@media (max-width: 1000px) {
  .brand-block { gap: 28px; }
  .build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-catalog { order: 3; flex-basis: 100%; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .header { align-items: flex-start; padding-block: 24px; gap: 20px; }
  .brand-block { flex-direction: column; align-items: flex-start; gap: 18px; }
  .navigation { gap: 20px; }
  .gallery-heading { gap: 16px; padding-block: 22px 28px; }
  .gallery-intro { font-size: 11px; }
  .gallery-heading h1 { font-size: 36px; letter-spacing: -1px; }
  .gallery { padding-top: 30px; }
  .build-grid { gap: 30px 20px; }
  .build-title { font-size: 18px; }
  .build-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .dialog-heading { flex-direction: column; gap: 5px; }
  .photo-stage { height: 48dvh; min-height: 230px; }
  .dialog-header { padding: 14px 16px; }
  .dialog-heading h2 { font-size: 20px; }
  .photo-thumbnails { padding: 12px 16px; }
  .dialog-footer { padding: 8px 16px 20px; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .header { flex-direction: column; gap: 21px; padding-block: 23px 20px; }
  .brand-block { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; gap: 18px; }
  .wordmark { font-size: 25px; }
  .navigation { gap: 14px; font-size: 11px; }
  .header-contacts { align-items: flex-start; text-align: left; }
  .phone-link { font-size: 13px; }
  .gallery { padding-block: 27px 32px; }
  .gallery-heading { gap: 14px; padding: 23px 20px; }
  .gallery-heading h1 { font-size: 29px; }
  .gallery-summary { gap: 12px; min-height: 48px; }
  .gallery-status, .gallery-summary .text-link { font-size: 10px; }
  .build-grid { grid-template-columns: 1fr; gap: 28px; }
  .build-info { padding-top: 14px; }
  .build-title { font-size: 18px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 19px; padding-block: 24px 28px; }
  .footer-phone { align-items: flex-start; text-align: left; }
  .footer-catalog { order: 0; }
  .dialog-actions { flex-basis: 100%; margin-left: 0; }
  .photo-arrow { width: 40px; height: 44px; }
  .photo-previous { left: 8px; }
  .photo-next { right: 8px; }
  .photo-state { padding-inline: 54px; }
  .thumbnail { flex-basis: 72px; height: 54px; }
}

@media (max-width: 359px) {
  .brand-block { flex-direction: column; align-items: flex-start; gap: 14px; }
  .build-heading { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
