:root {
  --bg: #0d111a;
  --bg-soft: #131a26;
  --ink: #f5f7fb;
  --muted: #98a4b3;
  --panel: #171f2d;
  --panel-2: #101722;
  --line: #293445;
  --line-strong: #3a485c;
  --accent: #21c6a8;
  --accent-dark: #119277;
  --accent-2: #ffb13b;
  --danger: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #151c28 0, #0d111a 440px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 18px 22px 28px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(33, 198, 168, 0.35);
  border-radius: 8px;
  background: #0b2b2a;
  color: var(--accent);
  font-size: 0.72rem;
}

.site-header nav a,
.site-footer a,
.content-page a {
  color: var(--muted);
  font-weight: 850;
  text-decoration: none;
}

.site-header nav a:hover,
.site-footer a:hover,
.content-page a:hover {
  color: var(--accent);
}

.content-page {
  width: min(860px, 100%);
}

.content-header {
  display: flex;
  align-items: center;
  min-height: 54px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.content-page h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(270px, 0.62fr) minmax(420px, 1fr);
  gap: 24px;
  align-items: end;
  padding: 38px 0 22px;
}

.hero-copy {
  padding-bottom: 4px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 5rem);
  line-height: 0.95;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.search-panel,
.summary,
.mission,
.detected,
.retailer-tile,
.deal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 31, 45, 0.96);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  gap: 13px;
  padding: 18px;
}

label {
  color: #dce5ed;
  font-weight: 900;
}

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

.suggest-box {
  position: relative;
  min-width: 0;
}

.suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0b111b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.suggestions:empty,
.suggestions[hidden] {
  display: none;
}

.suggestions button {
  display: block;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  padding: 10px 12px;
  text-align: left;
}

.suggestions button:last-child {
  border-bottom: 0;
}

.suggestions button:hover,
.suggestions button:focus {
  background: rgba(33, 198, 168, 0.14);
  color: #baf8ee;
  outline: 0;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0d1420;
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  padding: 13px 14px;
}

select {
  appearance: auto;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(33, 198, 168, 0.18);
  outline: 0;
}

button,
.deal-link {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #06110f;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  padding: 0 18px;
  text-decoration: none;
}

button:hover,
.deal-link:hover {
  background: #6ee7d1;
}

.examples,
.chips,
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-detected {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.inline-detected label {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  padding: 10px;
  text-transform: uppercase;
}

.inline-detected select {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  padding: 9px 10px;
  text-transform: none;
}

.field-note {
  color: #7e8b9c;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.25;
  text-transform: none;
}

.examples button,
.chip,
.badge {
  min-height: 30px;
  border: 1px solid rgba(33, 198, 168, 0.24);
  border-radius: 6px;
  background: rgba(33, 198, 168, 0.09);
  color: #9bf3e4;
  font-size: 0.8rem;
  font-weight: 850;
  padding: 0 10px;
}

.examples button:hover {
  border-color: rgba(33, 198, 168, 0.6);
  background: rgba(33, 198, 168, 0.16);
  color: var(--ink);
}

.detected {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
  padding: 13px 14px;
  background: #101722;
  box-shadow: none;
}

.checked-at {
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

.summary {
  margin-top: 12px;
  padding: 15px 16px;
  background: #101722;
  box-shadow: none;
}

.summary p {
  margin: 0 0 8px;
}

.mission {
  margin-top: 12px;
  padding: 12px 16px;
  background: #0f1520;
  box-shadow: none;
}

.mission p {
  margin: 0;
}

.summary strong {
  color: var(--accent-2);
}

.retailer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.retailer-links a {
  border: 1px solid rgba(255, 177, 59, 0.35);
  border-radius: 6px;
  background: rgba(255, 177, 59, 0.11);
  color: #ffd18a;
  font-size: 0.82rem;
  font-weight: 950;
  padding: 8px 10px;
  text-decoration: none;
}

.retailer-links a:hover {
  border-color: var(--accent-2);
  color: var(--ink);
}

.retailer-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.retailer-tile {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 13px;
  background: #101722;
  box-shadow: none;
}

.retailer-tile-highlight {
  border-color: rgba(33, 198, 168, 0.42);
}

.retailer-tile-muted {
  background: #0f1520;
}

.retailer-name,
.retailer-sub {
  margin: 0;
}

.retailer-name {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.retailer-price {
  color: var(--accent-2);
  font-size: 1.36rem;
  font-weight: 950;
  line-height: 1;
}

.retailer-sub {
  display: -webkit-box;
  overflow: hidden;
  min-height: 38px;
  color: #a9b4c2;
  font-size: 0.78rem;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.retailer-tile a {
  align-self: end;
  border: 1px solid rgba(33, 198, 168, 0.3);
  border-radius: 6px;
  color: #9bf3e4;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
}

.retailer-tile a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.results {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.deal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: stretch;
  padding: 14px 16px;
  background: linear-gradient(90deg, #151d2a 0, #101722 100%);
  box-shadow: none;
}

.deal-card h2 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.28;
}

.deal-card p {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.price {
  color: var(--accent-2);
  font-size: 1.72rem;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.price small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.25;
}

.badge:empty {
  display: none;
}

.risk {
  border-color: rgba(255, 107, 107, 0.32);
  background: rgba(255, 107, 107, 0.1);
  color: #ffadad;
}

.deal-actions {
  display: flex;
  align-items: end;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.deal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--accent-dark);
  color: white;
}

.deal-link:hover {
  background: var(--accent);
  color: #06110f;
}

.disclosure {
  color: #7f8b9a;
  font-size: 0.82rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  main {
    padding: 14px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 14px;
  }

  .hero,
  .search-row,
  .inline-detected,
  .retailer-overview,
  .deal-card {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 26px;
  }

  .deal-actions {
    align-items: stretch;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    padding-left: 0;
  }

  .price,
  .checked-at {
    text-align: left;
  }

  .detected {
    flex-direction: column;
  }
}
