:root{
  --bg:          #0b0e14;
  --surface:     #131826;
  --surface-2:   #1b2233;
  --border:      #232b3d;
  --text:        #e8ecf4;
  --text-dim:    #8891a8;
  --cheap:       #4ade80;
  --mid:         #fbbf24;
  --expensive:   #fb6b6b;
  --font-display:'Space Grotesk', system-ui, sans-serif;
  --font-body:   'Inter', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, monospace;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  min-height:100vh;
}

body{
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(74,222,128,.06), transparent),
    radial-gradient(ellipse 900px 500px at 85% 0%, rgba(251,107,107,.06), transparent);
  background-attachment:fixed;
}

a{ color:inherit; }

::selection{ background:var(--mid); color:#131826; }

:focus-visible{
  outline:2px solid var(--mid);
  outline-offset:2px;
}

.wrap{
  max-width:1400px;
  margin:0 auto;
  padding:32px 28px 80px;
}

/* ---------- header ---------- */
header.top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--border);
  padding-bottom:20px;
  margin-bottom:24px;
}

.brand h1{
  font-family:var(--font-display);
  font-size:26px;
  font-weight:600;
  letter-spacing:.04em;
  margin:0 0 4px;
  text-transform:uppercase;
}

.brand h1 span{ color:var(--cheap); }

.brand p{
  margin:0;
  color:var(--text-dim);
  font-size:13.5px;
}

.brand p code{
  font-family:var(--font-mono);
  background:var(--surface-2);
  padding:1px 6px;
  border-radius:4px;
  font-size:12.5px;
}

/* ---------- connect bar ---------- */
.connect-bar{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.connect-bar input[type=text]{
  width:340px;
  max-width:60vw;
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  font-family:var(--font-mono);
  font-size:13px;
  padding:10px 12px;
  border-radius:8px;
}

.connect-bar input[type=text]::placeholder{ color:#5a6478; }

.btn{
  font-family:var(--font-body);
  font-weight:600;
  font-size:13px;
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  padding:10px 16px;
  border-radius:8px;
  cursor:pointer;
  transition:transform .12s ease, border-color .12s ease, background .12s ease;
  white-space:nowrap;
}

.btn:hover{ border-color:#3a4560; background:#212a40; }
.btn:active{ transform:translateY(1px); }

.btn.primary{
  background:var(--cheap);
  border-color:var(--cheap);
  color:#0b1a10;
}
.btn.primary:hover{ background:#5eeb92; border-color:#5eeb92; }

.btn.ghost{ background:transparent; }

.status-pill{
  font-size:12px;
  font-family:var(--font-mono);
  color:var(--text-dim);
  padding:6px 0;
}
.status-pill.ok{ color:var(--cheap); }
.status-pill.err{ color:var(--expensive); }

/* ---------- stats box ---------- */
.stats-box{
  display:flex;
  align-items:center;
  gap:18px;
  margin-top:16px;
  padding:16px 20px;
  border:1px solid var(--border);
  border-radius:14px;
  background:linear-gradient(135deg, rgba(74,222,128,.08), rgba(74,222,128,0) 60%), var(--surface);
}
.stats-box-num{
  font-family:var(--font-display);
  font-size:32px;
  font-weight:700;
  color:var(--cheap);
  letter-spacing:.01em;
  white-space:nowrap;
}
.stats-box-body{ min-width:0; }
.stats-box-label{
  font-family:var(--font-body);
  font-weight:600;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--text);
  margin-bottom:3px;
}
.stats-box-explain{
  font-size:12.5px;
  color:var(--text-dim);
  line-height:1.5;
}
.stats-box-explain span{
  font-family:var(--font-mono);
  color:var(--text);
  font-weight:600;
}

@media (max-width: 560px){
  .stats-box{ flex-direction:column; align-items:flex-start; gap:8px; }
}

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

.view-toggle{
  display:inline-flex;
  border:1px solid var(--border);
  border-radius:8px;
  overflow:hidden;
}
.view-toggle button{
  font-family:var(--font-body);
  font-size:12.5px;
  font-weight:600;
  color:var(--text-dim);
  background:var(--surface);
  border:none;
  padding:8px 14px;
  cursor:pointer;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.view-toggle button + button{ border-left:1px solid var(--border); }
.view-toggle button.active{ background:var(--surface-2); color:var(--text); }

.meta-right{
  display:flex;
  align-items:center;
  gap:14px;
  color:var(--text-dim);
  font-size:12.5px;
  font-family:var(--font-mono);
}

/* ---------- empty / error states ---------- */
.state-panel{
  border:1px dashed var(--border);
  border-radius:14px;
  padding:56px 32px;
  text-align:center;
  color:var(--text-dim);
  background:var(--surface);
}
.state-panel h2{
  font-family:var(--font-display);
  color:var(--text);
  font-size:19px;
  margin:0 0 8px;
  font-weight:600;
}
.state-panel p{ margin:0 auto; max-width:480px; line-height:1.6; font-size:13.5px; }
.state-panel.error{ border-color:rgba(251,107,107,.35); }
.state-panel.error h2{ color:var(--expensive); }

/* ================= SHARED PANEL BITS ================= */
.panel-blurb{
  color:var(--text-dim);
  font-size:13px;
  margin:0 0 14px;
  max-width:720px;
  line-height:1.5;
}

.toggle-inline{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12.5px;
  color:var(--text-dim);
  font-family:var(--font-mono);
  cursor:pointer;
  user-select:none;
}
.toggle-inline input[type=checkbox]{ accent-color:var(--cheap); width:14px; height:14px; cursor:pointer; }
.toggle-inline input[type=number]{
  width:56px;
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  font-family:var(--font-mono);
  font-size:12.5px;
  padding:5px 6px;
  border-radius:6px;
}
.toggle-inline select{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  font-family:var(--font-mono);
  font-size:12.5px;
  padding:6px 8px;
  border-radius:6px;
  cursor:pointer;
}

.site-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 9px;
  border-radius:6px;
  background:var(--surface-2);
  border:1px solid var(--border);
  font-family:var(--font-display);
  font-weight:600;
  font-size:11.5px;
  letter-spacing:.03em;
  text-transform:uppercase;
  white-space:nowrap;
  text-decoration:none;
  cursor:pointer;
  transition:border-color .12s ease, background .12s ease;
}
a.site-badge:hover{ border-color:var(--cheap); background:#212a40; }
.site-badge-icon{
  width:14px;
  height:14px;
  object-fit:contain;
  border-radius:3px;
  flex:0 0 auto;
}

/* ---------- detail drawer ---------- */
.drawer{
  margin-top:20px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  overflow:hidden;
}
.drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background:var(--surface-2);
}
.drawer-head h3{
  margin:0;
  font-family:var(--font-display);
  font-size:14px;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.drawer-head button{
  background:none;
  border:none;
  color:var(--text-dim);
  font-size:18px;
  cursor:pointer;
  line-height:1;
}
.drawer-columns{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
}
.drawer-col{
  flex:1 1 320px;
  min-width:280px;
}
.drawer-col + .drawer-col{ border-left:1px solid var(--border); }
@media (max-width: 660px){
  .drawer-col + .drawer-col{ border-left:none; border-top:1px solid var(--border); }
}

.drawer-footnote{
  margin:0;
  padding:10px 18px;
  font-size:11.5px;
  line-height:1.5;
  color:var(--text-dim);
  border-top:1px solid var(--border);
}

.drawer-section-title{
  padding:12px 18px 8px;
  font-family:var(--font-display);
  font-size:11px;
  font-weight:600;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--text-dim);
  background:var(--surface-2);
  border-bottom:1px solid var(--border);
}
.drawer-section-title + table{ margin-bottom:0; }
.drawer table{ width:100%; border-collapse:collapse; }
.drawer th{
  text-align:left;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--text-dim);
  padding:10px 18px;
  border-bottom:1px solid var(--border);
  font-weight:600;
}
.drawer td{
  padding:10px 18px;
  font-size:13px;
  border-bottom:1px solid var(--border);
}
.drawer tr:last-child td{ border-bottom:none; }
.drawer td.price{ font-family:var(--font-mono); font-weight:600; }

footer.foot{
  margin-top:40px;
  text-align:center;
  color:var(--text-dim);
  font-size:11.5px;
  font-family:var(--font-mono);
}
footer.foot p{ margin:0 0 8px; }
footer.foot p:last-child{ margin-bottom:0; }
.foot-disclaimer{
  max-width:640px;
  margin-left:auto !important;
  margin-right:auto !important;
  line-height:1.6;
  opacity:.7;
}
.foot-colofon{
  opacity:.85;
  letter-spacing:.02em;
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}

@media (max-width: 720px){
  .connect-bar input[type=text]{ width:100%; max-width:100%; }
  .wrap{ padding:20px 16px 60px; }
}

/* ================= TABS / PANELS ================= */
.main-tabs{
  display:flex;
  gap:8px;
  margin:20px 0 18px;
}
.main-tab{
  font-family:var(--font-body);
  font-weight:600;
  font-size:12.5px;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-dim);
  background:var(--surface);
  border:1px solid var(--border);
  padding:9px 16px;
  border-radius:8px;
  cursor:pointer;
}
.main-tab.active{ background:var(--surface-2); color:var(--text); border-color:#3a4560; }
.panel{ }

.main-tab-dropdown{ position:relative; }
.extra-menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:10;
  flex-direction:column;
  min-width:180px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:6px;
  box-shadow:0 8px 24px rgba(0,0,0,.4);
}
.extra-menu-item{
  font-family:var(--font-body);
  font-weight:600;
  font-size:12.5px;
  letter-spacing:.02em;
  color:var(--text-dim);
  background:none;
  border:none;
  text-align:left;
  padding:9px 10px;
  border-radius:6px;
  cursor:pointer;
}
.extra-menu-item:hover{ background:var(--surface-2); color:var(--text); }

/* ================= MATRIX ================= */
:root{
  --item-col-w: 250px;
  --site-col-w: 92px;
  --spread-col-w: 88px;
  --row-h: 34px;
}

.matrix-toolbar{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.matrix-toolbar input[type=text]{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  font-family:var(--font-body);
  font-size:13px;
  padding:9px 12px;
  border-radius:8px;
  width:260px;
}
.legend{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--text-dim);
  font-size:11.5px;
  font-family:var(--font-mono);
  margin-left:auto;
}
.legend-dot{
  width:8px; height:8px; border-radius:50%; display:inline-block; margin-left:10px;
}
.legend-dot.cheap{ background:var(--cheap); margin-left:0; }
.legend-dot.expensive{ background:var(--expensive); }

.matrix-scroll{
  position:relative;
  height:min(70vh, 640px);
  overflow:auto;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
}

.matrix-row{
  display:flex;
  align-items:stretch;
  height:var(--row-h);
}
.matrix-row.header{
  position:sticky;
  top:0;
  z-index:3;
  height:auto;
  min-height:40px;
  background:var(--surface-2);
  border-bottom:1px solid var(--border);
}

.matrix-body{ position:relative; }

.matrix-cell{
  flex:0 0 var(--site-col-w);
  width:var(--site-col-w);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-mono);
  font-size:12.5px;
  border-right:1px solid var(--border);
  padding:0 6px;
  white-space:nowrap;
}

.matrix-cell.sticky-col{
  position:sticky;
  left:0;
  z-index:2;
  flex:0 0 var(--item-col-w);
  width:var(--item-col-w);
  justify-content:flex-start;
  font-family:var(--font-body);
  font-size:12.5px;
  background:var(--surface);
  border-right:1px solid var(--border);
  overflow:hidden;
  text-overflow:ellipsis;
}

.matrix-row.header .matrix-cell{
  font-family:var(--font-body);
  font-weight:600;
  font-size:11.5px;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-dim);
  cursor:pointer;
  user-select:none;
  padding:10px 6px;
  flex-direction:column;
  gap:2px;
  background:var(--surface-2);
}
.matrix-row.header .matrix-cell.sticky-col{ background:var(--surface-2); align-items:flex-start; cursor:pointer; }
.matrix-row.header .matrix-cell:hover{ color:var(--text); }
.matrix-row.header .matrix-cell.sorted{ color:var(--mid); }
.matrix-row.header .sort-arrow{ font-size:9px; opacity:.8; }

.matrix-row.odd .matrix-cell.sticky-col{ background:#151b2b; }
.matrix-row.odd .matrix-cell:not(.sticky-col){ background:rgba(255,255,255,.012); }

.matrix-cell.spread-col{ flex:0 0 var(--spread-col-w); width:var(--spread-col-w); }

.matrix-cell.empty-val{ color:#3f4864; }
.cell-cheap{ font-weight:700; color:var(--cheap); }
.cell-expensive{ font-weight:700; color:var(--expensive); }

.matrix-item-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.matrix-empty-row{
  position:absolute;
  top:0; left:0; right:0;
  padding:40px 20px;
  text-align:center;
  color:var(--text-dim);
  font-size:13px;
}

.spread-hot{ color:var(--expensive); font-weight:700; }
.spread-warm{ color:var(--mid); font-weight:600; }

/* ================= PRICEEMPIRE-STYLE COMPARE ROWS (Big Discrepancies + Profitable Items) ================= */
.pe-cell-item{ flex:1 1 auto; min-width:0; }
.pe-cell-compare{ flex:0 0 320px; width:320px; }
.pe-cell-metric{ flex:0 0 110px; width:110px; }
.pe-cell-pct{ flex:0 0 100px; width:100px; }
.pe-cell-action{ flex:0 0 104px; width:104px; }

.pe-row{
  position:absolute;
  left:0; right:0;
  display:flex;
  align-items:center;
  gap:4px;
  height:80px;
  padding:0 6px;
  border-bottom:1px solid var(--border);
}
.pe-row.odd{ background:rgba(255,255,255,.012); }
.pe-row:hover{ background:rgba(255,255,255,.03); }

.pe-cell-item{
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  min-width:0;
  padding-right:10px;
}
.pe-icon{ width:44px; height:44px; flex:0 0 44px; font-size:13px; }
.pe-item-text{ min-width:0; }
.pe-name{
  font-family:var(--font-body);
  font-size:13px;
  color:var(--text);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pe-cell-compare{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.pe-compare-box{
  display:flex;
  align-items:center;
  gap:7px;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:8px;
  padding:6px 10px;
}
.pe-compare-price{ font-family:var(--font-mono); font-size:12.5px; font-weight:600; color:var(--text); }
.pe-site-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:6px;
  overflow:hidden;
  flex:0 0 auto;
  text-decoration:none;
  transition:transform .12s ease;
}
a.pe-site-chip{ cursor:pointer; }
a.pe-site-chip:hover{ transform:scale(1.12); }
.pe-site-chip img{ width:100%; height:100%; object-fit:contain; }
.pe-site-chip.fallback{
  font-family:var(--font-display);
  font-weight:700;
  font-size:9.5px;
  color:#fff;
  background:var(--surface-2); /* overridden inline per-source via colorForSource() */
}
.pe-arrow{ color:var(--text-dim); font-size:14px; flex:0 0 auto; }

/* skinsback special case — two storefronts shown instead of one badge/chip */
.pe-site-chip-group{
  display:inline-flex;
  gap:3px;
  flex:0 0 auto;
  cursor:help;
}
.pe-site-chip-mini{ width:18px; height:18px; font-size:8px; }
.skinsback-badges{
  display:inline-flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
  cursor:help;
}
.site-badge-mini{
  padding:2px 6px;
  font-size:9.5px;
}

.pe-cell-metric, .pe-cell-pct{ display:flex; align-items:center; justify-content:center; }
.pe-pill{
  display:inline-block;
  padding:5px 12px;
  border-radius:20px;
  font-family:var(--font-mono);
  font-weight:700;
  font-size:12.5px;
  white-space:nowrap;
  background:var(--surface-2);
  color:var(--text);
}
.pe-pill.pill-green{ background:rgba(74,222,128,.14); color:var(--cheap); }
.pe-pill.pill-amber{ background:rgba(251,191,36,.14); color:var(--mid); }
.pe-pill.pill-red{ background:rgba(251,107,107,.14); color:var(--expensive); }

.pe-cell-action{ display:flex; align-items:center; justify-content:center; }
.pe-details-btn{
  font-family:var(--font-body);
  font-weight:600;
  font-size:11.5px;
  letter-spacing:.02em;
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  padding:7px 14px;
  border-radius:8px;
  cursor:pointer;
  transition:border-color .12s ease, background .12s ease;
}
.pe-details-btn:hover{ border-color:var(--cheap); background:#212a40; }

@media (max-width: 900px){
  .pe-cell-compare{ flex-basis:230px; width:230px; }
  .pe-compare-box{ padding:5px 7px; gap:4px; }
  .pe-cell-action{ display:none; }
}

/* ================= BEST DEALS — ICON GRID ================= */
.deals-toolbar{ position:relative; }
.deals-toolbar input[type=number]{
  width:76px;
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  font-family:var(--font-mono);
  font-size:12.5px;
  padding:8px 10px;
  border-radius:8px;
}

.markets-panel{
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  padding:14px 16px;
  margin-bottom:14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
}
.market-toggle{
  display:flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-mono);
  font-size:12px;
  color:var(--text-dim);
  cursor:pointer;
  user-select:none;
}
.market-toggle input{ accent-color:var(--cheap); width:14px; height:14px; cursor:pointer; }
.market-toggle-time{ font-size:10.5px; opacity:.75; }

/* shared freshness color coding — Markets panel, Market Overview, drawer */
.fresh{ color:var(--cheap); }
.aging{ color:var(--mid); }
.stale{ color:var(--expensive); }

/* ---------- Market Overview: "Last scraped" card ---------- */
.freshness-card{ margin-top:20px; }
.freshness-list{
  display:flex;
  flex-direction:column;
  gap:2px;
  max-height:320px;
  overflow-y:auto;
}
.freshness-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 4px;
  border-bottom:1px solid var(--border);
  font-size:12.5px;
}
.freshness-row:last-child{ border-bottom:none; }
.freshness-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  flex:0 0 auto;
  background:currentColor;
}
.freshness-source{
  font-family:var(--font-display);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.02em;
  min-width:110px;
}
.freshness-kind{
  color:var(--text-dim);
  font-size:11px;
  flex:1 1 auto;
}
.freshness-time{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--text-dim);
}

/* ---------- drawer "Updated" column ---------- */
.drawer td.drawer-time{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--text-dim);
  white-space:nowrap;
}

.deals-scroll{
  position:relative;
  height:min(70vh, 680px);
  overflow:auto;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  padding:8px;
}
.deals-grid-body{ position:relative; }

.deal-tile-row{
  display:flex;
  gap:12px;
  padding:0 4px;
}

.deal-tile{
  position:relative;
  width:190px;
  height:228px;
  flex:0 0 190px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  overflow:hidden;
  cursor:pointer;
  transition:border-color .12s ease, transform .12s ease;
}
.deal-tile:hover{ border-color:#3a4560; transform:translateY(-2px); }

/* base icon tile — used by compare-row icons (.pe-icon); Best Deals tiles use
   .deal-tile-media instead (full-bleed, transparent, no box) */
.icon-tile{
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--surface);
  overflow:hidden;
}
.icon-tile img{ width:100%; height:100%; object-fit:contain; }
.icon-tile.fallback{
  font-family:var(--font-display);
  font-weight:700;
  color:#0b1a10;
}

/* full-bleed, fully transparent art filling the whole card — no boxed border */
.deal-tile-media{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
}
.deal-tile-media img{ width:100%; height:100%; object-fit:contain; object-position:center 15%; padding:14px; }
.deal-tile-media.fallback{
  font-family:var(--font-display);
  font-weight:700;
  font-size:34px;
  color:rgba(255,255,255,.85);
}

.deal-tile-discount{
  position:absolute;
  top:8px;
  right:8px;
  z-index:2;
  background:var(--cheap);
  color:#0b1a10;
  font-family:var(--font-display);
  font-weight:700;
  font-size:11px;
  padding:4px 8px;
  border-radius:20px;
  box-shadow:0 2px 6px rgba(0,0,0,.4);
}

/* name + price/site sit over the bottom of the image, on a gradient scrim */
.deal-tile-overlay{
  position:absolute;
  left:0; right:0; bottom:0;
  z-index:1;
  padding:22px 12px 12px;
  background:linear-gradient(to top, rgba(11,14,20,.95) 20%, rgba(11,14,20,.75) 55%, transparent 100%);
}

.deal-tile-name{
  font-size:12.5px;
  line-height:1.35;
  text-align:center;
  color:#fff;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin-bottom:6px;
}

.deal-tile-meta{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.deal-tile-price{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:12.5px;
  color:var(--cheap);
}

/* ================= MARKET OVERVIEW — TREEMAPS ================= */
.overview-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
.overview-card{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  padding:16px;
}
.overview-card h3{
  font-family:var(--font-display);
  font-size:13px;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-dim);
  margin:0 0 12px;
  font-weight:600;
}
.treemap-wrap{ width:100%; }
.treemap-wrap svg{ display:block; }
.treemap-cell rect{ stroke:var(--surface); stroke-width:1; transition:opacity .12s ease; }
.treemap-cell:hover rect{ opacity:.85; }
.treemap-label{
  font-family:var(--font-body);
  font-weight:600;
  font-size:12px;
  fill:#fff;
  text-transform:uppercase;
  letter-spacing:.02em;
  pointer-events:none;
}
.treemap-value{
  font-family:var(--font-mono);
  font-size:11px;
  fill:rgba(255,255,255,.85);
  pointer-events:none;
}
.treemap-empty{
  padding:60px 20px;
  text-align:center;
  color:var(--text-dim);
  font-size:13px;
}

@media (max-width: 860px){
  .overview-grid{ grid-template-columns:1fr; }
}
