:root {
  color-scheme: light;
  --ink: #15130f;
  --muted: #665f55;
  --line: #e3ded6;
  --paper: #fbfaf7;
  --panel: #f3eee6;
  --white: #ffffff;
  --green: #2f6b4f;
  --green-soft: #dcecdf;
  --clay: #9a5d35;
  --navy: #1f2c3a;
  --shadow: 0 18px 42px rgba(35, 29, 22, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(227, 222, 214, 0.86);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 820;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(255,255,255,0.84) 45% 55%, transparent 55%),
    var(--green);
}

.topnav {
  display: flex;
  gap: 6px;
}

.topnav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 720;
}

.topnav a:hover,
.topnav a.active {
  color: var(--ink);
  background: var(--panel);
}

.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 9vh 28px 10vh;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 16, 12, 0.86), rgba(18, 16, 12, 0.46) 42%, rgba(18, 16, 12, 0.08) 78%),
    linear-gradient(0deg, rgba(18, 16, 12, 0.5), rgba(18, 16, 12, 0));
}

.hero-content {
  position: relative;
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #d6f2df;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4.3rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.search-box {
  max-width: 720px;
  margin-top: 30px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
}

.search-box div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-box input,
.search-box button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

.search-box button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.search-box input {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.28);
  padding: 0 14px;
  color: #fff;
  background: rgba(0,0,0,0.28);
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.58);
}

.search-box button {
  border: 0;
  padding: 0 18px;
  background: #fff;
  color: var(--ink);
  font-weight: 820;
  cursor: pointer;
}

.search-box.submitted {
  border-color: rgba(214, 242, 223, 0.72);
  box-shadow: 0 0 0 4px rgba(214, 242, 223, 0.15);
}

.section {
  padding: clamp(50px, 8vw, 96px) clamp(22px, 6vw, 76px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 900px;
}

.section-heading p:not(.eyebrow) {
  max-width: 740px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.report-section {
  background: var(--paper);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) repeat(2, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.live-report {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.8fr);
  gap: 16px;
  margin-top: 34px;
}

.live-original {
  min-height: 0;
}

.product-image {
  display: block;
  width: 100%;
  height: 190px;
  margin-bottom: 22px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel);
}

.source-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 18px;
  padding: 0 12px;
  border: 1px solid rgba(47, 107, 79, 0.3);
  border-radius: 8px;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
}

.source-link:hover {
  background: var(--green-soft);
}

.candidate-section {
  min-width: 0;
}

.candidate-section > h3 {
  margin-bottom: 12px;
}

.report-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.candidate-list {
  display: grid;
  gap: 12px;
}

.candidate-card {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.candidate-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  background: var(--panel);
}

.candidate-content {
  min-width: 0;
  padding: 17px;
}

.candidate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.candidate-class {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.match-score {
  color: var(--green);
  font-size: 0.84rem;
  white-space: nowrap;
}

.candidate-content h4 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.supplier-name {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.candidate-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.candidate-details b {
  color: var(--ink);
  font-weight: 740;
}

.evidence-list.compact {
  gap: 6px;
  margin: 13px 0 0;
  font-size: 0.9rem;
}

.evidence-list.compact li::before {
  width: 7px;
  height: 7px;
}

.report-empty,
.loading-state {
  display: grid;
  min-height: 150px;
  place-items: center;
  margin-top: 34px;
  padding: 28px;
  border: 1px dashed #cfc7bc;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.report-empty p,
.loading-state p {
  max-width: 540px;
  margin: 0;
}

.loading-state {
  gap: 12px;
}

.loader {
  width: 26px;
  height: 26px;
  border: 3px solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.original-card,
.match-card,
.pipeline article,
.cards article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(35, 29, 22, 0.04);
}

.original-card,
.match-card {
  min-height: 430px;
  padding: 22px;
}

.chair-visual {
  position: relative;
  height: 170px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ede5da, #faf8f2);
  overflow: hidden;
}

.chair-back,
.chair-seat,
.chair-leg {
  position: absolute;
  display: block;
  background: #d8c5ae;
  border: 2px solid rgba(86, 55, 31, 0.28);
}

.chair-back {
  width: 106px;
  height: 88px;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  border-radius: 14px 14px 8px 8px;
}

.chair-seat {
  width: 140px;
  height: 44px;
  left: 50%;
  top: 108px;
  transform: translateX(-50%);
  border-radius: 10px;
}

.chair-leg {
  width: 12px;
  height: 50px;
  top: 124px;
  border-radius: 99px;
  background: #5b3d27;
}

.chair-leg.left {
  left: calc(50% - 58px);
  transform: rotate(7deg);
}

.chair-leg.right {
  left: calc(50% + 46px);
  transform: rotate(-7deg);
}

dl {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.9rem;
}

dd {
  margin: 0;
  font-weight: 720;
}

.primary-match {
  border-color: rgba(47, 107, 79, 0.38);
  background: linear-gradient(180deg, #fff, #f5fbf6);
}

.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.match-header .eyebrow {
  margin: 0;
}

.match-header span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 820;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.score-row div,
.price-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,0.72);
}

.score-row b,
.price-box span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.score-row strong,
.price-box strong {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-size: 1.9rem;
  line-height: 1;
}

.price-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  margin-top: 22px;
}

.price-box b,
.price-box strong {
  text-align: right;
}

.price-box em {
  grid-column: 1 / -1;
  color: var(--green);
  font-style: normal;
  font-weight: 830;
}

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

.evidence-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
}

.evidence-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.pipeline article,
.cards article {
  min-height: 190px;
  padding: 20px;
}

.pipeline span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 840;
}

.pipeline p,
.cards p {
  color: var(--muted);
}

.split-dark {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.7fr);
  gap: 34px;
  align-items: start;
  background: var(--navy);
  color: #fff;
}

.split-dark .eyebrow {
  color: #a9d8bc;
}

.split-dark .section-heading p:not(.eyebrow) {
  color: rgba(255,255,255,0.72);
}

.score-table {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
}

.score-table div {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(90px, 0.5fr));
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.score-table div:first-child {
  color: rgba(255,255,255,0.66);
  font-size: 0.82rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.score-table div:last-child {
  border-bottom: 0;
}

.score-table b {
  color: #c6f1d2;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.cards a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid rgba(47, 107, 79, 0.28);
  border-radius: 8px;
  color: var(--green);
  font-weight: 820;
}

footer {
  padding: 34px 28px;
  background: #11100d;
  color: rgba(255,255,255,0.68);
  text-align: center;
}

@media (max-width: 1040px) {
  .live-report {
    grid-template-columns: 1fr;
  }

  .report-grid,
  .pipeline,
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-dark {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .topnav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .topnav a {
    flex: 0 0 auto;
  }

  .hero {
    min-height: 86svh;
    padding: 14vh 18px 8vh;
  }

  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(18, 16, 12, 0.88), rgba(18, 16, 12, 0.34) 76%, rgba(18, 16, 12, 0.18));
  }

  .search-box div {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 46px 18px;
  }

  .report-grid,
  .pipeline,
  .cards {
    grid-template-columns: 1fr;
  }

  .original-card,
  .match-card {
    min-height: auto;
  }

  .candidate-card {
    grid-template-columns: 1fr;
  }

  .candidate-image {
    height: 200px;
    min-height: 0;
  }

  .score-table div {
    grid-template-columns: 1fr;
  }
}
