@font-face {
  font-family: Inter Tight;
  src: url(InterTight.woff2) format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --gutter: clamp(16px, 2.1vw, 34px);
  --ink: #151719;
  --muted: #535c63;
  --stroke: #c7cdd2;
  --paper: #fff;
  --glass: #ffffffc9;
  --wash: #eff2f4;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --quick: 150ms;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter Tight, Arial, sans-serif;
  font-size: 16px;
  scroll-padding-top: 16px;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  line-height: 1.45;
  background: linear-gradient(135deg, #f1f3f5, #fff 560px);
}
a { color: inherit; text-decoration: none; }
button, input, select, summary { font: inherit; color: inherit; }
button, a, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #394752; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.05rem, 4vw, 3.8rem); font-weight: 560; letter-spacing: -.045em; line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 2.3vw, 2rem); font-weight: 600; letter-spacing: -.028em; line-height: 1.18; }

.shell { width: 100%; padding-inline: var(--gutter); }
.topbar { position: relative; min-height: 78px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--stroke); }
.brand { grid-column: 2; display: flex; align-items: center; justify-self: center; min-height: 44px; }
.brand img { display: block; width: 132px; height: auto; }
.toplinks { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: clamp(8px, 1.8vw, 26px); }
.toplinks a { display: flex; align-items: center; min-height: 44px; font-size: .95rem; }
.toplinks a:hover, .map-link { text-decoration: underline; text-underline-offset: 4px; }
.map-link { text-decoration-color: var(--stroke); }
.map-link:hover { text-decoration-color: var(--ink); }
.intro { padding: 31px 0 19px; }

.glass { background: var(--glass); border: 1px solid var(--stroke); border-radius: 17px; }
.tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.segments { display: flex; gap: 2px; border: 1px solid var(--stroke); border-radius: 11px; background: var(--wash); padding: 3px; }
.segments button { min-height: 40px; padding: 5px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: .92rem; }
.segments button[aria-pressed='true'] { border-color: var(--stroke); background: var(--paper); }
.search-tools { display: flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 0; }
.searchbox, .region { min-height: 44px; border: 1px solid var(--stroke); border-radius: 9px; background: var(--paper); }
.searchbox { display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.searchbox svg { flex: none; width: 17px; height: 17px; stroke: var(--muted); }
.searchbox input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; }
.searchbox:focus-within { outline: 2px solid #58626a; outline-offset: 1px; }
.searchbox input:focus { outline: 0; }
.region { min-width: 0; max-width: 165px; padding: 0 8px; }

.results-line, .render-topline { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 10px; margin: 11px 0 8px; color: var(--muted); font-size: .88rem; }
.rail-controls { display: flex; gap: 8px; }
.rail-arrow, .button, .lightbox-top button, .lightbox-bottom button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
}
.rail-arrow { padding: 0; font-size: 1.35rem; line-height: 1; }
.rail-arrow:disabled { opacity: .42; }
.button { padding: 8px 15px; }
.rail-arrow, .button, .segments button, .render-thumb, .lightbox-top button, .lightbox-bottom button { transition: transform var(--quick) var(--ease-out); }
.rail-arrow:active:not(:disabled), .button:active, .segments button:active, .render-thumb:active, .lightbox-inner button:active:not(:disabled) { transform: scale(.97); }

.grid, .render-rail, .thumb-rail { position: relative; scroll-padding-inline: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #a9b1b8 transparent; }
.grid { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(290px, 24vw, 430px); gap: 16px; scroll-snap-type: x proximity; padding: 2px 2px 15px; }
.project-card { display: flex; flex-direction: column; position: relative; overflow: hidden; min-width: 0; scroll-snap-align: start; transition: transform var(--quick) var(--ease-out); }
.project-card:has(.card-hit:active) { transform: scale(.99); }
.cover { position: relative; aspect-ratio: 6 / 5; overflow: hidden; border-bottom: 1px solid var(--stroke); background: var(--wash); }
.cover img, .pipeline-art { display: block; width: 100%; height: 100%; }
.cover img { object-fit: cover; transition: transform 200ms var(--ease-out); }
.pipeline-art { display: flex; flex-direction: column; justify-content: center; padding: 21px; background: linear-gradient(130deg, #e7ecef, #f9fafb); }
.pipeline-art strong { font-size: 2.65rem; line-height: 1.1; font-weight: 500; letter-spacing: -.05em; }
.pipeline-art small { margin-top: 6px; color: var(--muted); }
.cardbody { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 13px 15px 9px; }
.cardbody h3 { font-size: clamp(1.26rem, 1.65vw, 1.64rem); font-weight: 620; line-height: 1.08; letter-spacing: -.035em; }
.cardbody .location { width: fit-content; display: flex; align-items: center; min-height: 40px; position: relative; z-index: 2; font-size: .91rem; color: #30383e; }
.cardmeta { display: grid; gap: 1px; margin-top: auto; }
.cardmeta strong { font-size: 1.12rem; font-weight: 630; line-height: 1.25; }
.cardmeta span { font-size: .88rem; color: var(--muted); }
.card-action { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-top: 7px; border-top: 1px solid var(--stroke); font-size: .88rem; font-weight: 600; }
.arrow { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--stroke); border-radius: 50%; background: var(--wash); }
.card-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-hit:focus-visible { outline-offset: -4px; }
.empty { padding: 32px 16px; text-align: center; }
.empty p { margin: 8px 0 14px; color: var(--muted); }
.pagefoot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 24px; margin-top: 22px; padding: 17px 0 25px; border-top: 1px solid var(--stroke); color: var(--muted); font-size: .8rem; }
.pagefoot br { display: none; }

.detail-heading { padding: 25px 0 9px; }
.detail-heading h1 { margin-bottom: 4px; }
.detail-heading .map-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.02rem; color: #30383e; }
.minimal-nav { display: flex; align-items: center; gap: 4px 12px; overflow-x: auto; white-space: nowrap; padding-inline: 9px; border: 1px solid var(--stroke); border-radius: 10px; background: var(--glass); scrollbar-width: thin; }
.minimal-nav a { display: flex; align-items: center; padding: 0 9px; min-height: 44px; font-size: .91rem; }
.minimal-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.render-rail { display: flex; gap: 14px; scroll-snap-type: x mandatory; padding: 2px 2px 10px; }
.render-panel { display: block; flex: 0 0 min(75vw, 1100px); align-self: flex-start; min-width: 0; padding: 0; overflow: hidden; text-align: left; border: 1px solid var(--stroke); border-radius: 16px; background: var(--glass); scroll-snap-align: start; transition: transform var(--quick) var(--ease-out); }
.render-panel:active { transform: scale(.995); }
.render-panel:focus-visible, .render-thumb:focus-visible { outline-offset: -4px; }
.render-panel img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; max-height: 62vh; object-fit: contain; background: var(--wash); }
.render-panel span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 6px 12px; border-top: 1px solid var(--stroke); font-size: .87rem; }
.render-panel span::after { content: '↗' / ''; flex: none; color: var(--muted); }
.render-panel img[data-src], .cover img[data-src], .render-thumb img[data-src] { color: transparent; }
.thumb-rail { display: flex; gap: 8px; margin-top: 9px; padding: 2px 2px 10px; }
.render-thumb { display: block; flex: 0 0 auto; padding: 0; overflow: hidden; border: 1px solid var(--stroke); border-radius: 8px; background: var(--wash); }
.render-thumb[aria-current='true'] { outline: 2px solid #3f4b55; outline-offset: -3px; }
.render-thumb img { display: block; width: 97px; height: 61px; object-fit: cover; }

.key-section { padding-top: 24px; }
.key-section h2 { margin-bottom: 12px; }
.key-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr)); gap: 10px; margin: 0; }
.fact { min-width: 0; padding: 14px; }
.fact dt { margin-bottom: 6px; color: var(--muted); font-size: .72rem; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; }
.fact dd { margin: 0; font-weight: 610; font-size: clamp(1.02rem, 1.7vw, 1.35rem); line-height: 1.24; overflow-wrap: anywhere; }
.fact dd small { display: block; margin-top: 2px; color: var(--muted); font-size: .85em; font-weight: 450; }
.amenity-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.amenity-chip { padding: 6px 10px; border: 1px solid var(--stroke); border-radius: 8px; background: var(--glass); font-size: .88rem; }
.unit-details, .source-details { margin-top: 15px; padding-inline: 14px; }
.unit-details summary, .source-details summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 8px; font-size: .95rem; font-weight: 550; }
:is(.unit-details, .source-details) summary::-webkit-details-marker { display: none; }
:is(.unit-details, .source-details) summary::after { content: '+' / ''; font-size: 1.22rem; color: var(--muted); }
:is(.unit-details, .source-details)[open] summary::after { content: '−' / ''; }
.data-table { border-collapse: collapse; width: 100%; margin-bottom: 11px; }
.data-table td, .data-table th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--stroke); font-size: .87rem; }
.data-table th { color: var(--muted); font-weight: 600; }
.note-text { max-width: 80ch; color: #3d454b; font-size: .92rem; }
.source-details .note-text, .source-local { margin-block: 7px 12px; }
.source-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; border-top: 1px solid var(--stroke); font-size: .92rem; }
.source-link span, .source-local { color: var(--muted); font-size: .83rem; }
.project-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.pager-link { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 10px 13px; }
.pager-link:last-child { text-align: right; }
.pager-link small { color: var(--muted); font-size: .78rem; }
.pager-link strong { font-size: .93rem; font-weight: 610; line-height: 1.25; }

body:has(dialog[open]) { overflow: hidden; }
dialog { width: min(1320px, calc(100% - 22px)); height: min(920px, calc(100% - 26px)); max-height: calc(100dvh - 26px); padding: 0; border: 1px solid var(--stroke); border-radius: 16px; background: var(--paper); color: var(--ink); }
dialog[open] { animation: viewer-in var(--quick) var(--ease-out); }
dialog::backdrop { background: #10151ba3; }
@keyframes viewer-in { from { opacity: 0; transform: translateY(5px) scale(.992); } to { opacity: 1; transform: translateY(0) scale(1); } }
.lightbox-inner { display: flex; flex-direction: column; height: 100%; }
.lightbox-top, .lightbox-bottom { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 7px 10px; flex: none; font-size: .87rem; }
.lightbox-top { border-bottom: 1px solid var(--stroke); }
.lightbox-bottom { border-top: 1px solid var(--stroke); }
.lightbox-top button, .lightbox-bottom button { padding: 6px 11px; flex: none; }
.lightbox-stage { display: grid; place-items: center; flex: 1; min-height: 0; background: var(--wash); touch-action: pan-y pinch-zoom; }
.lightbox-stage img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }

@media (hover: hover) and (pointer: fine) {
  .project-card:hover .cover > img { transform: scale(1.025); }
  .rail-arrow:hover:not(:disabled), .lightbox-inner button:hover, .button:hover { background: var(--wash); }
  .pager-link:hover strong, .source-link:hover { text-decoration: underline; text-underline-offset: 4px; }
}

@media (max-width: 680px) {
  .topbar { min-height: 61px; }
  .brand img { width: clamp(90px, 24vw, 102px); }
  .toplinks { gap: 5px; }
  .toplinks a { justify-content: center; min-width: 44px; font-size: .85rem; }
  .toplinks .portfolio-link { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
  .intro { padding: 22px 0 15px; }
  .tools { display: grid; gap: 8px; padding: 7px; }
  .segments button { flex: 1; min-height: 44px; padding-block: 5px; }
  .search-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(104px, .65fr); }
  .searchbox input, .region { font-size: 16px; }
  .searchbox input::placeholder { font-size: .9rem; }
  .region { width: 100%; max-width: none; }
  .grid { grid-auto-columns: min(86%, 380px); gap: 10px; align-items: start; scroll-snap-type: x mandatory; }
  .cover { aspect-ratio: 5 / 4; }
  .cardbody .location { min-height: 44px; }
  .detail-heading { padding: 17px 0 5px; }
  .minimal-nav { gap: 1px; padding-inline: 5px; }
  .minimal-nav a { flex: 1; justify-content: center; padding-inline: 7px; font-size: .86rem; }
  .render-rail { gap: 10px; }
  .render-panel { flex-basis: calc(100% - 16px); border-radius: 12px; }
  .render-panel:only-child { flex-basis: 100%; }
  .render-panel img { max-height: 56vh; }
  .render-thumb img { width: 73px; height: 52px; }
  .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 10px 11px; }
  .pagefoot { margin-top: 17px; }
}

@media (max-width: 365px) {
  .region { padding-inline: 5px; font-size: 14px; }
  .toplinks { gap: 2px; }
  .searchbox svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
