:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --dark: #0f172a;
  --ok-bg: #d1fae5;
  --ok-fg: #065f46;
  --warn-bg: #fef3c7;
  --warn-fg: #92400e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #7c2d12;
  color: #fff7ed;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #9a3412;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  text-decoration: none;
}
.brand-badge {
  background: var(--dark);
  color: #f97316;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 14px;
}
.brand span em {
  font-style: normal;
  color: var(--accent);
}
.pill-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ok-bg);
  color: var(--ok-fg);
}
.hero {
  background: var(--dark);
  color: #f8fafc;
  border-radius: 20px;
  padding: 28px;
  margin-top: 20px;
}
.hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
}
.hero p {
  margin: 0;
  color: #cbd5e1;
  max-width: 760px;
  font-size: 14px;
}
.controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-top: 20px;
}
@media (max-width: 900px) {
  .controls { grid-template-columns: 1fr 1fr; }
  .controls input[type="search"] { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .controls { grid-template-columns: 1fr; }
}
.controls input, .controls select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  background: #f8fafc;
  color: var(--text);
}
.summary-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 18px 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: #fdba74;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.cat-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-dark);
  background: #ffedd5;
  padding: 2px 8px;
  border-radius: 999px;
}
.card h3 {
  margin: 8px 0 6px;
  font-size: 15px;
  line-height: 1.35;
}
.meta {
  font-size: 12px;
  color: var(--muted);
}
.price-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.price-val {
  font-size: 21px;
  font-weight: 800;
}
.price-sub {
  font-size: 11px;
  color: var(--muted);
}
.btn {
  margin-top: 12px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--accent); }
.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid #cbd5e1;
}
.btn-secondary:hover { background: #e2e8f0; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 20px;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.offer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.badge-best {
  background: var(--ok-bg);
  color: var(--ok-fg);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.badge-unknown {
  background: var(--warn-bg);
  color: var(--warn-fg);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.chart-wrap {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.merchants-section {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.site-footer {
  margin-top: 40px;
  background: var(--dark);
  color: #cbd5e1;
  padding: 24px 16px;
  font-size: 12px;
  text-align: center;
}
