/* SPDX-License-Identifier: GPL-3.0-or-later */
:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #243d33;
  background: #f4f0e6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main,
footer {
  max-width: 1280px;
  margin: auto;
  padding: 24px clamp(16px, 4vw, 56px);
}
nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 60px;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
}
a:hover {
  color: #86572d;
}
:focus-visible {
  outline: 3px solid #9a602c;
  outline-offset: 5px;
}
h1 {
  font:
    clamp(2.6rem, 6vw, 5rem)/1.05 Georgia,
    serif;
  margin: 16px 0 24px;
  letter-spacing: -0.04em;
}
h2 {
  font:
    2rem/1.2 Georgia,
    serif;
  margin: 0;
}
p {
  line-height: 1.6;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}
.intro {
  max-width: 760px;
  font-size: 1.2rem;
}
.note {
  max-width: 840px;
  color: #5d685d;
  font-size: 0.95rem;
}
.filter {
  margin-top: 32px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}
input {
  width: min(100%, 540px);
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  border: 1px solid #859889;
  border-radius: 4px;
  background: #fffdf8;
  color: inherit;
}
#results {
  color: #5d685d;
  min-height: 1.6em;
}
article {
  border-top: 1px solid #c6cdbf;
  padding: 28px 0 44px;
}
.card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.models {
  color: #5d685d;
  font-size: 0.9rem;
}
img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #c3ccc3;
}
.image-link {
  display: block;
  margin-top: 20px;
}
footer {
  border-top: 1px solid #c6cdbf;
  padding-bottom: 48px;
}
[hidden] {
  display: none !important;
}
.preview-open {
  overflow: hidden;
}
dialog {
  width: min(1120px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #859889;
  border-radius: 12px;
  color: inherit;
  background: #f4f0e6;
  box-shadow: 0 24px 90px #10251fcc;
  overflow: auto;
}
dialog::backdrop {
  background: #10251fcc;
}
.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}
.preview-heading .eyebrow {
  margin: 0 0 8px;
}
.preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
}
.preview-scene {
  min-width: 0;
}
#building-preview {
  height: min(55vh, 520px);
  min-height: 240px;
  border-radius: 8px;
  overflow: hidden;
  background: #a5b5b1;
  cursor: grab;
}
#building-preview:active {
  cursor: grabbing;
}
#building-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#preview-status {
  font-size: 0.85rem;
  color: #5d685d;
  min-height: 2.8em;
}
button,
select {
  font: inherit;
  color: inherit;
  min-height: 44px;
  border: 1px solid #859889;
  border-radius: 5px;
  background: #fffdf8;
  padding: 8px 12px;
}
button {
  cursor: pointer;
}
button:hover {
  background: #e3e8dc;
}
button:disabled,
select:disabled {
  opacity: 0.55;
  cursor: default;
}
select {
  width: 100%;
  margin-bottom: 22px;
}
.view-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.view-buttons button {
  min-width: 44px;
}
#preview-close {
  flex: 0 0 44px;
}
@media (max-width: 700px) {
  .preview-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  #building-preview {
    height: 34vh;
  }
  .preview-heading h2 {
    font-size: 1.6rem;
  }
}

button,
.image-link {
  touch-action: manipulation;
}
#preview-launch-label {
  font-size: 0.9rem;
  font-weight: 400;
}
#preview-launch {
  width: 18px;
  min-height: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 6px;
}
@media (max-width: 700px) {
  .preview-heading {
    position: sticky;
    top: -16px;
    z-index: 1;
    background: #f4f0e6;
    padding: 12px 0;
  }
}
