:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #5d6a62;
  --line: #d8ded8;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --accent: #176b59;
  --accent-strong: #0d4f43;
  --gold: #a56600;
  --soft: #edf3ef;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 22px;
  align-items: end;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
button,
select {
  min-height: 46px;
  border-radius: 6px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

input {
  padding: 0 14px;
  font-size: 1.05rem;
}

select {
  padding: 0 36px 0 12px;
}

button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button {
  padding: 0 18px;
}

button:hover,
.primary-link:hover {
  background: var(--accent-strong);
}

.status-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.results-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.summary {
  position: sticky;
  top: 20px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.summary p:last-of-type {
  color: var(--muted);
  line-height: 1.5;
}

.primary-link {
  min-height: 42px;
  width: 100%;
  margin-top: 10px;
  border-radius: 6px;
}

.primary-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
}

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

.toolbar h2 {
  margin-bottom: 0;
}

.toolbar select {
  max-width: 190px;
}

.results {
  display: grid;
  gap: 12px;
}

.item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  min-height: 128px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.thumb {
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-title {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  padding: 4px 8px;
  background: var(--soft);
  border-radius: 999px;
}

.live-pill {
  background: #e1f5ea;
  color: #11633f;
  font-weight: 800;
}

.demo-pill {
  background: #fff0d6;
  color: #8a5600;
  font-weight: 800;
}

.deal-side {
  min-width: 130px;
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 12px;
  text-align: right;
}

.price {
  font-size: 1.35rem;
  font-weight: 900;
}

.badge {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.82rem;
}

.open-link {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .search-panel,
  .results-layout,
  .item {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }

  .deal-side {
    justify-items: start;
    text-align: left;
  }

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