* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: #0b1220;
  color: #e2e8f0;
}

header {
  padding: 14px 24px;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid #1f2a44;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: .2px;
}

header .subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

header .cap {
  color: #4ade80;
  font-weight: 600;
}

header .build-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .5px;
}

header .meta {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  text-align: right;
}

main {
  display: grid;
  grid-template-columns: 1fr 440px;
  height: calc(100vh - 72px);
  min-height: 0;
}

#map {
  height: 100%;
  background: #0b1220;
}

#sidebar {
  background: #0f172a;
  border-left: 1px solid #1f2a44;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid #1f2a44;
  background: #111a2e;
}

.sidebar-header h2 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.compare-tray-btn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 8px 10px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.compare-tray-btn:hover {
  background: #8b5cf6;
}
.compare-tray-btn #compare-count {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

.search-row {
  margin: 10px 0 8px;
}
.search-row input[type="search"] {
  width: 100%;
  padding: 8px 10px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 13px;
  box-sizing: border-box;
}
.search-row input[type="search"]:focus {
  outline: none;
  border-color: #38bdf8;
  background: #0b1a2e;
}
.search-row input[type="search"]::placeholder {
  color: #64748b;
}

.region-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 10px;
}
.region-chip {
  background: #1e293b;
  color: #cbd5e1;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid #334155;
  user-select: none;
  transition: background-color .12s, border-color .12s;
}
.region-chip:hover {
  background: #334155;
}
.region-chip.active {
  background: #0ea5e9;
  color: #0f172a;
  border-color: #0ea5e9;
  font-weight: 600;
}
.region-chip .count {
  margin-left: 4px;
  font-size: 10px;
  opacity: .75;
}

/* Vibe chips -- same visual DNA as region chips but with a
   magenta accent so the two rows don't visually blend. */
.vibe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 10px;
}
.vibe-chip {
  background: #1e293b;
  color: #cbd5e1;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid #334155;
  user-select: none;
  transition: background-color .12s, border-color .12s;
}
.vibe-chip:hover {
  background: #334155;
}
.vibe-chip.active {
  background: #a855f7;
  color: #f5f3ff;
  border-color: #a855f7;
  font-weight: 600;
}
.vibe-chip .count {
  margin-left: 4px;
  font-size: 10px;
  opacity: .8;
}

/* Trip-cost toggle in the sidebar header. */
.trip-cost-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  margin: 4px 0 8px;
  cursor: pointer;
  user-select: none;
}
.trip-cost-toggle input[type="checkbox"] {
  accent-color: #a855f7;
}

/* Trip-cost estimate row on each deal card. Sits below the top
   row (city + price) so the headline flight price still owns
   the top-right corner. */
.trip-cost {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 6px;
  padding: 6px 8px;
  background: rgba(168, 85, 247, .08);
  border: 1px solid rgba(168, 85, 247, .25);
  border-radius: 6px;
  font-size: 11px;
  color: #c4b5fd;
}
.trip-cost-total {
  font-weight: 700;
  color: #e9d5ff;
  font-size: 13px;
  white-space: nowrap;
}
.trip-cost-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .75;
  margin-left: 2px;
  font-weight: 400;
}
.trip-cost-breakdown {
  font-size: 10px;
  color: #a78bfa;
  text-align: right;
  opacity: .85;
}

.filters {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.filters input[type=checkbox] {
  accent-color: #38bdf8;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.snn { background: #4ade80; }
.dot.dub { background: #60a5fa; }
.dot.bhx { background: #fb923c; }

.sort-row {
  font-size: 12px;
  color: #94a3b8;
}

.sort-row select {
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  margin-left: 4px;
}

.price-slider-row {
  margin: 10px 0 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.price-slider-row label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.price-slider-row #price-max-label {
  color: #4ade80;
  font-weight: 700;
  font-size: 13px;
}

.price-slider-row input[type=range] {
  width: 100%;
  accent-color: #38bdf8;
  cursor: pointer;
}

/* Trip-length preset row and individual window chips were removed
   when the scanner moved to only emitting long-weekend windows for
   real bank holiday dates. The bank-holiday toggle below the slider
   is now the single filter that matters for trip length. */

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.filters .muted {
  color: #64748b;
  font-weight: 400;
}

.clear-dest-btn {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 10px;
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.clear-dest-btn:hover {
  background: #0f172a;
  border-color: #38bdf8;
}

.recommend-btn {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #f8fafc;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(14, 165, 233, .25);
}
.recommend-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(14, 165, 233, .4);
}
.recommend-btn:active {
  transform: translateY(0);
}

/* Google-Flights-Explore-style price badge markers on the map */
.price-badge {
  background: #0f172a;
  color: #f8fafc;
  border: 1.5px solid #475569;
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform .1s, border-color .1s, background .1s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.price-badge:hover {
  transform: translateY(-1px) scale(1.08);
  border-color: #38bdf8;
  z-index: 1000;
}
.price-badge.snn {
  border-color: rgba(74, 222, 128, 0.6);
}
.price-badge.snn:hover {
  border-color: #4ade80;
}
.price-badge.dub {
  border-color: rgba(96, 165, 250, 0.6);
}
.price-badge.dub:hover {
  border-color: #60a5fa;
}
.price-badge.bhx {
  border-color: rgba(251, 146, 60, 0.6);
}
.price-badge.bhx:hover {
  border-color: #fb923c;
}
.price-badge.selected {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  transform: scale(1.1);
  z-index: 999;
}
.price-badge.cluster {
  background: #0f172a;
  color: #f8fafc;
  border: 2px solid #38bdf8;
  padding: 4px 10px;
  font-size: 13px;
}
.price-badge.cluster .count {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  margin-left: 2px;
}

/* Hide the plugin's default circle cluster icon -- we use our own
 * divIcon. The plugin stamps a .marker-cluster wrapper around the
 * icon HTML which has its own ::before / ::after artifacts. */
.marker-cluster {
  background: transparent !important;
}
.marker-cluster div {
  background: transparent !important;
  border: none !important;
}

/* Cleaner Leaflet DivIcon defaults for our badges */
.leaflet-div-icon {
  background: transparent;
  border: none;
}

#deal-list {
  list-style: none;
  padding: 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.deal {
  background: #111a2e;
  border: 1px solid #1f2a44;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  position: relative;
}
.deal.has-photo {
  background-color: #111a2e;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Dark overlay so text stays legible over the photo. */
.deal.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.65) 0%, rgba(15,23,42,.92) 100%);
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
}
.deal.has-photo > * { position: relative; z-index: 1; }

.weather-pill {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .1);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, .25);
}

.deal:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, .08);
}

.deal.highlighted {
  border-color: #facc15;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, .25);
}

/* Brighter, animated glow for recommend-button picks. Much more
   visible than the plain yellow outline above so the user can
   actually see what the button did. */
.deal.highlighted-strong {
  border-color: #4ade80;
  box-shadow:
    0 0 0 3px rgba(74, 222, 128, .55),
    0 0 18px rgba(74, 222, 128, .35);
  animation: rec-pulse 1.2s ease-in-out 2;
}
@keyframes rec-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(74, 222, 128, .55),
      0 0 18px rgba(74, 222, 128, .35);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(74, 222, 128, .7),
      0 0 30px rgba(74, 222, 128, .55);
  }
}

.deal .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.deal .city {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.deal .country {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.deal .price-block {
  text-align: right;
  white-space: nowrap;
}

.deal .price {
  font-size: 22px;
  font-weight: 800;
  color: #4ade80;
  line-height: 1;
}

.deal .price .price-check {
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  font-style: italic;
  text-transform: lowercase;
}

.deal .price-note {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

.deal .trend {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
}
.deal .trend.down {
  background: rgba(74, 222, 128, .15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, .4);
}
.deal .trend.up {
  background: rgba(248, 113, 113, .12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, .3);
}
.deal .trend.lowest-ever {
  background: rgba(249, 115, 22, .18);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, .5);
}

.deal.lowest-ever {
  border-color: rgba(249, 115, 22, .5);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, .15);
}

.deal .meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 8px;
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge.snn { background: rgba(74, 222, 128, .15); color: #86efac; border: 1px solid rgba(74, 222, 128, .4); }
.badge.dub { background: rgba(96, 165, 250, .15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, .4); }
.badge.bhx { background: rgba(251, 146, 60, .15); color: #fdba74; border: 1px solid rgba(251, 146, 60, .4); }
.badge.carrier { margin-left: 4px; font-size: 9px; padding: 2px 6px; }
.badge.carrier-fr { background: rgba(253, 224, 71, .12); color: #fde047; border: 1px solid rgba(253, 224, 71, .4); }
.badge.carrier-ei { background: rgba(34, 197, 94, .12); color: #86efac; border: 1px solid rgba(34, 197, 94, .4); }
.badge.carrier-u2 { background: rgba(249, 115, 22, .12); color: #fdba74; border: 1px solid rgba(249, 115, 22, .4); }
.badge.carrier-w6 { background: rgba(236, 72, 153, .12); color: #f9a8d4; border: 1px solid rgba(236, 72, 153, .4); }

/* Irish bank holiday badge -- green accent, stands out from the
   carrier/origin/window badges so the user spots real long-weekend
   opportunities at a glance. Tooltip carries the "no work day used"
   bonus explanation. */
.badge.holiday {
  background: rgba(22, 163, 74, .18);
  color: #86efac;
  border: 1px solid rgba(22, 163, 74, .55);
  font-weight: 700;
  cursor: help;
}
.badge.window {
  margin-left: 4px;
  background: rgba(148, 163, 184, .1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, .3);
}

.times {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.55;
  border-top: 1px dashed #1f2a44;
  padding-top: 6px;
}

.times .label {
  display: inline-block;
  width: 32px;
  color: #64748b;
  font-weight: 600;
}

.times .muted {
  color: #64748b;
  font-size: 11px;
}

.deal .warn {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(250, 204, 21, .08);
  border: 1px solid rgba(250, 204, 21, .3);
  border-radius: 6px;
  font-size: 11px;
  color: #fde68a;
  line-height: 1.35;
}

.extras-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 10px;
  color: #64748b;
}
.extras-row .extra {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.extras-row .extra.ical,
.extras-row .extra.hotels,
.extras-row .extra.activities,
.extras-row .extra.share {
  color: #38bdf8;
  text-decoration: none;
  cursor: pointer;
}
.extras-row .extra.ical:hover,
.extras-row .extra.hotels:hover,
.extras-row .extra.activities:hover,
.extras-row .extra.share:hover {
  color: #7dd3fc;
  text-decoration: underline;
}
.extras-row .extra.duration {
  color: #94a3b8;
}

.currency-label {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: #94a3b8;
}

.book-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.book {
  flex: 1;
  display: block;
  padding: 8px 10px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s, transform .15s;
}

.book:hover { transform: translateY(-1px); }

.book-google { background: #1a73e8; }
.book-google:hover { background: #1558b0; }

.book-sky { background: #0770e3; background: #00b2d6; }
.book-sky:hover { background: #008fb0; }

.empty {
  text-align: center;
  color: #64748b;
  padding: 32px 16px;
  font-size: 13px;
}

.empty code {
  background: #111a2e;
  padding: 2px 6px;
  border-radius: 4px;
  color: #cbd5e1;
}

.empty-state {
  padding: 32px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.empty-state .empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}
.empty-state .empty-title {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 6px;
  font-weight: 600;
}
.empty-state .empty-hint {
  margin-bottom: 14px;
  line-height: 1.5;
}
.empty-state .reset-filters-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #0ea5e9;
  color: #0f172a;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.empty-state .reset-filters-btn:hover {
  background: #38bdf8;
}

/* Toast notification (shown briefly when a deal URL is copied). */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0ea5e9;
  color: #0f172a;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Leaflet popup dark theme */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #111a2e;
  color: #e2e8f0;
  border: 1px solid #1f2a44;
}

.leaflet-popup-content {
  margin: 10px 12px;
  font-size: 13px;
}

.leaflet-popup-content b { color: #f8fafc; }
.leaflet-popup-content a { color: #38bdf8; }

.leaflet-container a.leaflet-popup-close-button { color: #94a3b8; }

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  align-items: center;
  flex-direction: column;
  gap: 4px;
}
.sidebar-toggle .bar {
  width: 20px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 2px;
  transition: background .1s;
}
.sidebar-toggle:hover .bar { background: #f8fafc; }

@media (max-width: 900px) {
  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  header .meta { text-align: left; font-size: 10px; }
  .sidebar-toggle { display: inline-flex; }

  main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: calc(100vh - 72px);
    position: relative;
  }
  #map {
    grid-column: 1;
    grid-row: 1;
    z-index: 1;
  }
  /* Sidebar slides in from the right as an overlay instead of
   * stacking below the map. Toggle via body.sidebar-open. */
  #sidebar {
    grid-column: 1;
    grid-row: 1;
    position: absolute;
    top: 0;
    right: 0;
    width: min(92vw, 440px);
    height: 100%;
    border-left: 1px solid #1f2a44;
    border-top: none;
    transform: translateX(100%);
    transition: transform .2s ease-out;
    z-index: 1000;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.4);
  }
  body.sidebar-open #sidebar {
    transform: translateX(0);
  }
  /* Small close hint via the toggle button changing colour */
  body.sidebar-open .sidebar-toggle {
    border-color: #38bdf8;
  }
}

/* ---------- Tiny label shared by sparkline + heatmap captions ---------- */
.chart-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #94a3b8;
  line-height: 1;
  margin-bottom: 2px;
  font-weight: 600;
}
.chart-label .muted {
  opacity: .7;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.chart-label .arrow {
  display: inline-block;
  background: linear-gradient(
    90deg,
    #4ade80 0%,
    #facc15 50%,
    #f87171 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  padding: 0 2px;
}

/* ---------- Sparkline (price history on each card) ---------- */
.sparkline-wrap {
  margin-top: 6px;
  opacity: 0.9;
  line-height: 0;  /* prevents extra vertical space below the SVG */
}
.sparkline {
  display: block;
}

/* ---------- Weekend heatmap (price comparison across weekends) ---------- */
.heatmap-wrap {
  margin-top: 6px;
  line-height: 0;
}
.heatmap {
  display: block;
}
.heatmap-cell {
  cursor: pointer;
  transition: opacity .15s;
}
.heatmap-cell:hover {
  opacity: 0.8;
}

/* ---------- Scan health badge (in the header meta line) ---------- */
.scan-health {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-right: 4px;
  vertical-align: middle;
  border: 1px solid transparent;
  cursor: help;
}
.scan-health-fresh {
  background: rgba(74, 222, 128, .15);
  color: #86efac;
  border-color: rgba(74, 222, 128, .4);
}
.scan-health-stale {
  background: rgba(250, 204, 21, .12);
  color: #fde047;
  border-color: rgba(250, 204, 21, .4);
}
.scan-health-very-stale,
.scan-health-prospects {
  background: rgba(248, 113, 113, .12);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, .4);
}
.scan-health-unknown {
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, .4);
}

/* ---------- Compare checkbox (on each card) ---------- */
.compare-check {
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
  cursor: pointer;
}
.compare-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #8b5cf6;
  cursor: pointer;
}

/* ---------- Compare modal overlay ---------- */
.compare-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 20px;
  overflow-y: auto;
}
.compare-modal-inner {
  background: #0b1220;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  max-width: 1100px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.compare-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #1f2a44;
}
.compare-modal-header h2 {
  margin: 0;
  font-size: 16px;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.compare-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
}
.compare-close-btn:hover {
  color: #f1f5f9;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 20px;
  overflow-y: auto;
}
.compare-card {
  background: #111a2e;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}
.compare-card.has-photo {
  background-size: cover;
  background-position: center;
  position: relative;
  color: #f1f5f9;
}
.compare-card.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.75), rgba(11, 18, 32, 0.95));
  border-radius: 8px;
}
.compare-card.has-photo > * {
  position: relative;
  z-index: 1;
}
.compare-card .cc-city {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
}
.compare-card .cc-price {
  font-size: 22px;
  font-weight: 700;
  color: #38bdf8;
}
.compare-card .cc-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0;
  border-bottom: 1px dashed #1f2a44;
}
.compare-card .cc-row:last-child {
  border-bottom: none;
}
.compare-card .cc-label {
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.compare-card .cc-value {
  text-align: right;
  font-weight: 500;
}
.compare-card .cc-remove {
  align-self: flex-end;
  background: #1f2a44;
  color: #f87171;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  text-transform: uppercase;
}
.compare-card .cc-remove:hover {
  background: #7f1d1d;
  color: #fca5a5;
}
.compare-empty {
  text-align: center;
  color: #64748b;
  padding: 40px 20px;
  font-size: 14px;
  grid-column: 1 / -1;
}

/* Adjust card top-left to accommodate sparkline without cramping */
.deal .top {
  align-items: flex-start;
}
.deal .top-left {
  flex: 1;
  min-width: 0;
}
