:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --panel: #ffffff;
  --ink: #20231f;
  --muted: #687066;
  --line: #ddd8cd;
  --green: #225244;
  --green-soft: #dce8e1;
  --blue: #496a8f;
  --gold: #bd8b42;
  --rose: #8b4e4a;
  --shadow: 0 18px 44px rgba(33, 36, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(34, 82, 68, 0.08), transparent 360px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(220px, 520px);
  gap: 24px;
  align-items: center;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(221, 216, 205, 0.85);
  background: rgba(247, 244, 238, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.search-wrap {
  position: relative;
}

.search-wrap::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-50%);
}

.search-wrap::after {
  content: "";
  position: absolute;
  left: 28px;
  top: calc(50% + 8px);
  width: 8px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
  transform-origin: left center;
}

#searchInput {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  outline: none;
}

#searchInput:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 82, 68, 0.13);
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 48px) 56px;
}

.sidebar {
  position: sticky;
  top: 95px;
  align-self: start;
  max-height: calc(100vh - 118px);
  max-height: calc(100dvh - 118px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.sidebar-head strong {
  color: var(--green);
}

.model-list {
  display: grid;
  gap: 8px;
}

.model-tab {
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.model-tab:hover,
.model-tab:focus-visible {
  border-color: var(--green);
}

.model-tab.is-active {
  background: var(--green);
  color: #fff;
}

.model-tab strong,
.model-tab span {
  display: block;
}

.model-tab strong {
  font-size: 15px;
}

.model-tab span {
  margin-top: 5px;
  color: currentColor;
  font-size: 12px;
  opacity: 0.72;
}

.content {
  min-width: 0;
}

.model-page {
  animation: model-enter 320ms ease both;
}

.loading,
.empty {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 46%);
  gap: 28px;
  align-items: end;
  min-height: clamp(520px, 72vh, 760px);
  padding-bottom: 32px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--gold);
}

h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 680px;
  margin: 22px 0 0;
  color: #41463f;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.dimension-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: 10px;
  margin-top: 22px;
}

.dimension-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.dimension-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.dimension-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dimension-card small,
.dimension-card strong {
  display: block;
}

.dimension-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dimension-card strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.action-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #3e453e;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.action-chip:hover,
.action-chip:focus-visible {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 82, 68, 0.1);
}

.hero-media {
  align-self: stretch;
  min-height: 420px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, #ece6da);
  box-shadow: var(--shadow);
}

.section-band {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0;
}

.section-title p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.gallery-button {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: zoom-in;
}

.gallery-button:nth-child(1),
.gallery-button:nth-child(2) {
  grid-column: span 6;
  min-height: 320px;
}

.gallery-button:not(:nth-child(1)):not(:nth-child(2)) {
  grid-column: span 4;
}

.gallery-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 180ms ease;
}

.gallery-button:hover img,
.gallery-button:focus-visible img {
  transform: scale(1.025);
}

.sections-grid {
  display: grid;
  gap: 14px;
}

.info-section {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  scroll-margin-top: 130px;
}

.section-number {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}

.info-section h3 {
  margin: 0 0 12px;
  font-size: 23px;
  letter-spacing: 0;
}

.rich-text {
  color: #363b35;
  font-size: 16px;
  line-height: 1.68;
}

.rich-text p,
.rich-text ul {
  margin: 0 0 12px;
}

.rich-text p:last-child,
.rich-text ul:last-child {
  margin-bottom: 0;
}

.rich-text h4 {
  margin: 18px 0 8px;
  color: var(--green);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rich-text ul {
  padding-left: 20px;
}

.rich-text li + li {
  margin-top: 7px;
}

.section-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 260px));
  gap: 10px;
  margin-top: 18px;
}

.section-image-button {
  width: 100%;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
}

.section-image-button img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  padding: 8px;
  transition: transform 180ms ease;
}

.section-image-button:hover img,
.section-image-button:focus-visible img {
  transform: scale(1.035);
}

.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 34%);
  gap: 16px;
  align-items: start;
}

.summary-panel,
.objections-panel {
  padding: 24px;
  border-radius: 8px;
}

.summary-panel {
  background: var(--green);
  color: #fff;
}

.objections-panel {
  border: 1px solid var(--line);
  background: #fff;
}

.summary-panel h3,
.objections-panel h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.summary-list b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
}

.summary-list span {
  line-height: 1.55;
}

.objection {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.objection:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.objection dt {
  margin-bottom: 7px;
  color: var(--rose);
  font-weight: 900;
}

.objection dd {
  margin: 0 0 14px;
  color: #424840;
  line-height: 1.55;
}

.no-match {
  display: none;
  margin-top: 10px;
  color: var(--rose);
  font-size: 14px;
}

.no-match.is-visible {
  display: block;
}

.image-dialog {
  width: min(1120px, calc(100vw - 32px));
  padding: 42px 16px 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.image-dialog::backdrop {
  background: rgba(18, 22, 19, 0.72);
}

.image-dialog img {
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes model-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .model-page {
    animation: none;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 18px;
    overflow: visible;
  }

  .sidebar {
    position: static;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    scrollbar-gutter: auto;
  }

  .model-list {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .model-tab {
    flex: 0 0 190px;
    scroll-snap-align: start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 20px;
  }

  .hero-media {
    min-height: 320px;
  }

  .summary-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .section-band {
    padding: 32px 0;
  }

  .section-title {
    display: block;
  }

  .section-title p {
    margin-top: 8px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-button,
  .gallery-button:nth-child(1),
  .gallery-button:nth-child(2),
  .gallery-button:not(:nth-child(1)):not(:nth-child(2)) {
    grid-column: auto;
    min-height: 220px;
  }

  .info-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .section-media {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .topbar,
  .layout {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  #searchInput {
    height: 42px;
  }

  .layout {
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 36px;
  }

  .model-tab {
    flex-basis: 160px;
    min-height: 54px;
    padding: 10px 12px;
  }

  .model-tab strong {
    font-size: 14px;
  }

  .hero {
    padding-bottom: 24px;
  }

  h1 {
    font-size: clamp(38px, 14vw, 58px);
    line-height: 0.98;
  }

  .hero-subtitle {
    font-size: 16px;
    line-height: 1.48;
    margin-top: 16px;
  }

  .hero-actions {
    display: grid;
    gap: 8px;
    margin-top: 18px;
  }

  .dimension-strip {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 18px;
  }

  .dimension-card {
    min-height: 60px;
  }

  .hero-media {
    min-height: 240px;
  }

  .gallery-button,
  .gallery-button:nth-child(1),
  .gallery-button:nth-child(2),
  .gallery-button:not(:nth-child(1)):not(:nth-child(2)) {
    min-height: 210px;
  }

  .summary-panel,
  .objections-panel {
    padding: 18px;
  }

  .section-image-button img {
    height: 150px;
  }
}
