
:root {
  --bg:#080c10; --bg2:#0d1318; --bg3:#131a21;
  --border:#1e2d3a; --border2:#243547;
  --text:#c8d8e8; --muted:#8aafc8; --accent:#00d4ff;
  --bull:#00e676; --bear:#ff3d57; --neu:#f0b429;
  --bull-dim:rgba(0,230,118,.12); --bear-dim:rgba(255,61,87,.12);
}
*{box-sizing:border-box;margin:0;padding:0;}
body{background:var(--bg);color:var(--text);font-family:'Inter',sans-serif;min-height:100vh;}
.page-wrap{max-width:1600px;margin:0 auto;}

header{
  padding:10px 22px 12px;
  border-top:3px solid var(--accent);
  border-bottom:1px solid var(--border);
  background:linear-gradient(90deg,#080c10,#0d1820);
  position:sticky;top:0;z-index:100;
}
.header-inner{max-width:1280px;margin:0 auto;width:100%;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;}
.logo{font-size:17px;font-weight:900;letter-spacing:-0.5px;color:#ffffff;font-family:'Inter',sans-serif;}
.logo span{color:var(--accent);font-weight:400;}
.header-center{display:flex;align-items:center;gap:8px;flex:1;justify-content:center;flex-wrap:wrap;}
.date-pill{
  display:flex;align-items:center;gap:6px;
  font-family:'JetBrains Mono',monospace;font-size:12px;
  padding:5px 12px;border-radius:20px;border:1px solid var(--border2);
  background:var(--bg2);color:var(--accent);
}
.date-pill input[type=date]{
  background:transparent;border:none;color:var(--accent);
  font-family:'JetBrains Mono',monospace;font-size:12px;
  cursor:pointer;outline:none;width:115px;
}
.date-pill input[type=date]::-webkit-calendar-picker-indicator{
  filter:invert(.4) sepia(1) saturate(5) hue-rotate(175deg);cursor:pointer;
}
.vs{font-size:10px;color:var(--muted);font-family:'JetBrains Mono',monospace;}
.header-right{display:flex;align-items:center;gap:10px;}
.load-btn{
  background:var(--accent);color:#000;border:none;padding:7px 18px;
  border-radius:6px;font-family:'Inter',sans-serif;font-weight:700;
  font-size:13px;cursor:pointer;transition:opacity .2s;white-space:nowrap;
}
.load-btn:hover{opacity:.85;}
.load-btn:disabled{opacity:.45;cursor:not-allowed;}
.replay-btn{
  background:transparent;color:var(--muted);border:1px solid var(--border2);
  padding:7px 14px;border-radius:6px;font-family:'Inter',sans-serif;font-weight:700;
  font-size:12px;cursor:pointer;transition:all .2s;white-space:nowrap;
}
.replay-btn:hover:not(:disabled){border-color:var(--bull);color:var(--bull);}
.replay-btn.replay-on{border-color:var(--bull);color:var(--bull);background:var(--bull-dim);}
.replay-btn:disabled{opacity:.35;cursor:not-allowed;}
.replay-stop-btn{border-color:#ff3d57 !important;color:#ff3d57 !important;}
.replay-stop-btn:hover{background:rgba(255,61,87,.12) !important;}
.home-btn{display:inline-flex;align-items:center;gap:5px;padding:7px 14px;border-radius:8px;border:1px solid var(--border2);background:transparent;color:var(--muted);font-family:'Inter',sans-serif;font-size:12px;font-weight:600;text-decoration:none;transition:all .15s;white-space:nowrap;}
.home-btn:hover{border-color:var(--accent);color:var(--accent);}
.ts{font-family:'JetBrains Mono',monospace;font-size:10px;color:var(--muted);white-space:nowrap;}

/* SERVER STATUS BANNER */
#serverBanner{
  display:none;background:#1a0a08;border-bottom:1px solid var(--bear);
  padding:10px 22px;font-size:12px;color:var(--bear);font-family:'JetBrains Mono',monospace;
  line-height:1.6;
}
#serverBanner.show{display:block;}
#serverBanner code{background:rgba(0,0,0,.4);padding:1px 6px;border-radius:3px;color:#ffb3bb;}

/* PROGRESS OVERLAY */
#overlay{
  position:fixed;inset:0;z-index:200;
  background:rgba(8,12,16,.96);
  display:none;flex-direction:column;align-items:center;justify-content:center;gap:14px;
}
#overlay.on{display:flex;}
.ov-title{font-size:18px;font-weight:800;color:var(--accent);}
.ov-sub{font-size:12px;color:var(--muted);font-family:'JetBrains Mono',monospace;text-align:center;}
.prog-wrap{width:min(380px,88vw);background:var(--bg3);border-radius:8px;height:8px;overflow:hidden;}
.prog-bar{height:8px;background:var(--accent);border-radius:8px;width:0%;transition:width .25s;}
.ov-counts{font-family:'JetBrains Mono',monospace;font-size:11px;color:var(--muted);}
.ov-err{font-size:10px;color:var(--bear);max-width:400px;text-align:center;}

main{padding:8px 22px 18px;display:flex;flex-direction:column;gap:18px;max-width:1280px;margin:0 auto;width:100%;}

.section-head{
  font-size:11px;font-weight:700;letter-spacing:2px;text-transform:uppercase;
  color:var(--accent);margin-bottom:11px;margin-top:18px;display:flex;align-items:center;gap:10px;
}
.section-head:first-child{ margin-top:0; }
.section-head::after{content:'';flex:1;height:1px;background:var(--border);}
.section-head small{font-size:9px;color:var(--muted);letter-spacing:.3px;font-weight:400;text-transform:none;}

/* AD CARDS */
.adv-row{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;}
.stat-card{
  background:var(--bg2);border:1px solid var(--border);border-radius:10px;
  padding:15px 17px;display:flex;flex-direction:column;gap:3px;
}
.stat-label{font-size:9px;font-weight:700;letter-spacing:1.5px;color:var(--muted);text-transform:uppercase;}
.stat-val{font-size:32px;font-weight:800;line-height:1;font-family:'JetBrains Mono',monospace;}
.stat-val.bull{color:var(--bull);}
.stat-val.bear{color:var(--bear);}
.stat-val.neu{color:var(--neu);}
.stat-val.acc{color:var(--accent);}
.stat-sub{font-size:10px;color:var(--muted);font-family:'JetBrains Mono',monospace;}

/* RATIO BAR */
.ratio-wrap{background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:13px 17px;}
.ratio-label{font-size:9px;letter-spacing:1.5px;color:var(--muted);text-transform:uppercase;margin-bottom:8px;font-weight:700;}
.ratio-bar{height:10px;border-radius:5px;background:var(--bear);overflow:hidden;}
.ratio-fill{height:10px;background:var(--bull);border-radius:5px 0 0 5px;transition:width .8s cubic-bezier(.4,0,.2,1);}
.ratio-sub{margin-top:7px;display:flex;justify-content:space-between;font-size:10px;color:var(--muted);font-family:'JetBrains Mono',monospace;}

/* HEATMAP */
.heatmap-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:8px;}
.heat-cell{
  border-radius:8px;padding:11px 13px;cursor:pointer;
  transition:transform .15s,box-shadow .15s;border:1px solid transparent;user-select:none;
}
.heat-cell:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.5);border-color:rgba(255,255,255,.1);}
.heat-cell.sel{border-color:var(--accent)!important;box-shadow:0 0 0 2px rgba(0, 212, 255,.2);}
.hc-name{font-size:9px;font-weight:700;letter-spacing:.3px;line-height:1.3;margin-bottom:4px;}
.hc-pct{font-size:20px;font-weight:800;font-family:'JetBrains Mono',monospace;line-height:1;}
.hc-meta{font-size:9px;margin-top:4px;opacity:.95;font-family:'JetBrains Mono',monospace;}

/* PANELS */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:11px;}
.panel{background:var(--bg2);border:1px solid var(--border);border-radius:10px;overflow:hidden;}
.panel-head{
  padding:10px 13px;display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--border);
}
.panel-title{font-size:12px;font-weight:700;}
.badge{font-size:9px;font-weight:700;font-family:'JetBrains Mono',monospace;padding:2px 7px;border-radius:4px;}
.badge.bull{background:var(--bull-dim);color:var(--bull);}
.badge.bear{background:var(--bear-dim);color:var(--bear);}
.plist{max-height:310px;overflow-y:auto;}
.plist::-webkit-scrollbar{width:3px;}
.plist::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px;}
.srow{
  display:grid;grid-template-columns:1fr auto auto;align-items:center;
  gap:8px;padding:6px 13px;border-bottom:1px solid rgba(30,45,58,.35);
  transition:background .1s;
}
.srow:hover{background:rgba(255,255,255,.02);}
.sym{font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:700;}
.sname{font-size:9px;color:#7fb8d8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100px;}
.pct{font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:700;text-align:right;}
.pct.bull{color:var(--bull);}
.pct.bear{color:var(--bear);}
.sprice{font-family:'JetBrains Mono',monospace;font-size:9px;color:var(--muted);text-align:right;}

/* FILTER */
.sf-wrap{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:11px;}
.sf-btn{
  font-size:9px;font-weight:700;padding:3px 9px;border-radius:4px;
  border:1px solid var(--border);background:var(--bg2);color:var(--muted);
  cursor:pointer;transition:all .15s;font-family:'Inter',sans-serif;letter-spacing:.3px;
}
.sf-btn:hover,.sf-btn.active{background:var(--accent);color:#000;border-color:var(--accent);}

.empty{padding:18px;text-align:center;color:var(--muted);font-size:11px;}

@media(max-width:860px){.adv-row{grid-template-columns:1fr 1fr;}.two-col{grid-template-columns:1fr;}}
/* Footer */
footer{padding:18px 22px 28px;border-top:1px solid var(--border);}
.footer-inner{max-width:1280px;margin:0 auto;}
.disclaimer{font-size:10px;color:var(--muted);line-height:1.7;text-align:center;}
.disclaimer b{color:#8aafc8;}
@media(max-width:500px){main{padding:10px;}}
/* A/D Progress */
#adpCanvas{display:block;}
.adp-wrap{padding-bottom:14px;}
/* A/D Progress legend */
.adp-legend{display:flex;gap:16px;margin-top:8px;font-size:10px;padding:0 13px 10px;}
.adp-legend span{display:flex;align-items:center;gap:5px;color:var(--muted);}
.adp-legend i{display:inline-block;width:24px;height:2px;border-radius:2px;}

/* ── MOBILE HEADER FIX (≤600px) ─────────────────────────────────────────────
   Desktop: logo | date vs date | home · status · scan  (single flex row)
   Mobile:  Row1: logo ················ Home
            Row2: 📅 date  vs  📅 date  (centred, full width)
            Row3: status text ········· ⚡ Start Scan
   ─────────────────────────────────────────────────────────────────────────── */
@media(max-width:600px){
  header{ padding:10px 14px; }

  .header-inner{
    display:grid;
    grid-template-columns:1fr auto;   /* two columns */
    grid-template-rows:auto auto auto;
    align-items:center;
    gap:8px 6px;
  }

  /* Row 1 col 1 — logo + plan badge, side by side, sized to content only */
  .logo{ grid-column:1; grid-row:1; display:flex; align-items:center; gap:5px; flex-wrap:nowrap; max-width:100%; overflow:hidden; font-size:15px; }
  #tpPlanBadge{ flex:0 0 auto; white-space:nowrap; font-size:9px !important; padding:2px 7px !important; }

  /* Row 1 col 2 — Home button (right-aligned) */
  .home-btn{ grid-column:2; grid-row:1; }

  /* Row 2 — date pickers span both columns, centred */
  .header-center{
    grid-column:1 / -1; grid-row:2;
    justify-content:center;
    flex-wrap:wrap;
    gap:6px;
  }

  /* Row 3 — status + scan button span both columns */
  .header-right{
    grid-column:1 / -1; grid-row:3;
    display:flex;
    justify-content:space-between;
    align-items:center;
    width:100%;
  }

  /* Scan button fills remaining width on mobile */
  .load-btn{ flex:1; max-width:160px; text-align:center; }

  /* Status text can truncate if very long */
  .ts{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:160px; }
}

/* ── DELTA SCANNER ─────────────────────────────────────────────────────────── */
/* All rules are scoped to #dsSectionWrap / .ds-* so they cannot affect any
   class used by earlier versions of market_dashboard.html. Safe to ship the
   same mpstyle.css to both old and new HTML — old HTML simply has no elements
   matching these selectors, so every rule below is a no-op there.            */

/* Section header: allow wrapping so the controls row doesn't overflow */
#dsSectionWrap .section-head {
  flex-wrap: wrap;
  gap: 8px;
  row-gap: 8px;
}
#dsSectionWrap .section-head small {
  flex-shrink: 0;
}
/* Remove the decorative ::after line inside the scanner header only —
   the controls div fills that visual space instead */
#dsSectionWrap .section-head::after {
  display: none;
}

/* Controls row: right-aligned inside the section header */
.ds-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.ds-controls label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ds-controls select,
.ds-controls input[type=number] {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 10px;
  border-radius: 4px;
  padding: 2px 5px;
  font-family: 'JetBrains Mono', monospace;
}
.ds-controls input[type=number] {
  width: 48px;
  text-align: center;
}

/* Summary badges row */
.ds-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ds-badge {
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 10px;
  border-radius: 5px;
  white-space: nowrap;
}
.ds-badge-bull { background: var(--bull-dim);           color: var(--bull);   }
.ds-badge-bear { background: var(--bear-dim);           color: var(--bear);   }
.ds-badge-neu  { background: rgba(240,180,41,.12);      color: var(--neu);    }
.ds-badge-acc  { background: rgba(0, 212, 255,.08);       color: var(--accent); }

/* 3-column results grid — fully CSS-driven so media queries work correctly.
   No inline style="" on #dsGridWrap in the HTML. */
#dsGridWrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 11px;
}

/* OI Spurt section — same 3-column pattern as #dsGridWrap, just a separate
   id since it's a visually distinct section (no per-panel header, unlike
   the Scanner's 3 panels — one shared header+badge sits above the whole grid). */
#oiGridWrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 11px;
}

/* ── Chart drawing tools rail (left side of the chart popup) ────────────── */
.draw-rail {
  width: 40px;
  background: #0d1219;
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 4px;
  flex-shrink: 0;
  min-height: 0;      /* prevent the rail's own content height from forcing the row (and chartContainer) taller than available space */
  overflow-y: auto;   /* scroll internally on very short viewports instead */
}
.draw-tool-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--muted);
}
.draw-tool-btn:hover:not(.active) { background: #131a21; }
.draw-tool-btn.active {
  background: rgba(0,212,255,.14);
  border-color: var(--accent);
  color: var(--accent);
}
.draw-rail-divider {
  width: 20px; height: 1px;
  background: var(--border2);
  margin: 4px 0;
}
/* Mobile: the rail's 40px eats too much of an already-narrow chart — hide
   it below 600px (phone-sized), same breakpoint used elsewhere in this
   file for "mobile" specifically. Stays visible on tablet/iPad (768px+)
   and laptop/desktop. */
@media (max-width: 600px) {
  .draw-rail { display: none; }
}

/* Scanner result rows inherit .srow layout; only override what differs:
   align-items:start keeps the 3-line right column from forcing odd centering */
.ds-row {
  align-items: start;
  padding: 8px 13px;
}

/* Responsive */
@media (max-width: 860px) {
  #dsGridWrap { grid-template-columns: 1fr 1fr; }
  #oiGridWrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  #dsGridWrap { grid-template-columns: 1fr; }
  #oiGridWrap { grid-template-columns: 1fr; }
  .ds-controls {
    margin-left: 0;
    width: 100%;
  }
}

/* ── INDEX TICKER BAR (NIFTY / BANKNIFTY / SENSEX / INDIAVIX) ───────────────
   Slim single-row strip matching the style in the reference screenshot.       */
#indexBar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 6px;
  height: 38px;
  overflow: hidden;
  margin-bottom: 4px;
}
.idx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  flex: 1;
  min-width: 0;
}
.idx-divider {
  width: 1px;
  height: 20px;
  background: var(--border2);
  flex-shrink: 0;
}
.idx-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.idx-price {
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  white-space: nowrap;
}
.idx-chg {
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.idx-chg.bull { color: var(--bull); }
.idx-chg.bear { color: var(--bear); }
.idx-chg.neu  { color: var(--muted); }

@media (max-width: 860px) {
  #indexBar { flex-wrap: wrap; height: auto; padding: 6px; gap: 4px; }
  .idx-item { flex: 1 1 45%; padding: 4px 8px; }
  .idx-divider { display: none; }
}
@media (max-width: 500px) {
  .idx-item { flex: 1 1 100%; }
  .idx-price { font-size: 12px; }
  .idx-chg   { font-size: 11px; }
}

/* ── Scanner dot blink ─────────────────────────────────────────────────────
   The leading ● on reversal dot tags (PDH↑ / PDL↓) pulses to draw attention
   without being distracting. Opacity cycles 1 → 0.15 → 1 every 1.4 s.
   The rest of the label text (time, arrow) stays fully visible at all times.
   prefers-reduced-motion: pause the animation for accessibility.            */
@keyframes ds-dot-pulse {
  0%, 100% { opacity: 1;    }
  50%       { opacity: 0.15; }
}
.ds-dot-blink {
  display: inline-block;
  animation: ds-dot-pulse 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ds-dot-blink { animation: none; }
}

/* ── Watchlist Chip Bar ────────────────────────────────────────────────────── */
#tp-chip-bar {
  display: flex;
  flex-wrap: nowrap;          /* single row — scroll horizontally */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;      /* hide scrollbar on Firefox */
  gap: 5px;
  padding: 5px 6px;
  margin-bottom: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: center;
  min-height: 34px;
}
#tp-chip-bar::-webkit-scrollbar { display: none; } /* hide on Chrome/Safari */

.tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 212, 255,.07);
  border: 1px solid rgba(0, 212, 255,.22);
  border-radius: 5px;
  padding: 3px 6px 3px 7px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;             /* never squish chips */
  user-select: none;
}
.tp-chip:hover {
  background: rgba(0, 212, 255,.14);
  border-color: rgba(0, 212, 255,.4);
}

.tp-chip-sym {
  font-size: 11px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  letter-spacing: .3px;
}

.tp-chip-price {
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.tp-chip-rm {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  padding-left: 2px;
  line-height: 1;
  transition: color .15s;
  /* minimum touch target */
  min-width: 20px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tp-chip-rm:hover { color: var(--bear); }

/* ── Scanner card star — inline on desktop, column button on mobile ─────── */
/* col star hidden on desktop; media query below shows it on mobile */
.tp-star-col { display: none; }

.tp-star {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: color .15s, transform .15s;
  user-select: none;
  flex-shrink: 0;
}
.tp-star:hover  { color: #f0b429; transform: scale(1.2); }
.tp-star-on     { color: #f0b429; }
.tp-star-on:hover { color: var(--bear); transform: scale(1.1); }

/* On mobile: star moves to a dedicated 4th column — wide tap zone,
   no risk of accidentally opening the chart.                        */
@media (max-width: 600px) {
  .tp-star-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 44px;
    cursor: pointer;
  }
  /* Hide the inline star on mobile — col button replaces it */
  .tp-star-inline { display: none; }
  .tp-star-col .tp-star { font-size: 16px; }
  /* Give srow (which owns grid-template-columns) the 4th column */
  .ds-row { grid-template-columns: 1fr auto auto 36px !important; }

  /* Tighter chip text on small screens */
  .tp-chip-sym  { font-size: 10px; }
  .tp-chip-price { font-size: 9px; }
}

/* Pinned card gets a subtle left accent border so it's visually distinct */
.ds-row.tp-pinned {
  border-left: 2px solid #f0b429;
  padding-left: 6px;
}

/* ── Universal Stock Search — highlight states ──────────────────────────────
   Applied by tpSearchHighlight() in render.js. Three states:
     .tp-search-match  → row matches search query (bright highlight)
     .tp-search-dim    → row exists but doesn't match (dimmed, de-emphasized)
   When search is empty/cleared, neither class is applied — normal display.   */
/* Permanent highlight state — stays applied as long as the row matches the
   current search query. No animation here, so it never fades/reverts. */
.srow.tp-search-match,
.ds-row.tp-search-match {
  background: rgba(0, 212, 255, 0.18) !important;
  border-left: 3px solid #00d4ff;
  padding-left: 10px;
}
/* One-time "just appeared" pulse — separate class, removed by JS ~1.2s after
   being added. Layers a brighter flash on top of the steady highlight above
   without controlling whether the highlight itself persists. */
.srow.tp-search-pulse-flash,
.ds-row.tp-search-pulse-flash {
  animation: tp-search-pulse 1.2s ease-out 1;
}
@keyframes tp-search-pulse {
  0%   { background: rgba(0, 212, 255, 0.40) !important; }
  100% { background: rgba(0, 212, 255, 0.18) !important; }
}
.srow.tp-search-dim,
.ds-row.tp-search-dim {
  opacity: 0.25;
  filter: grayscale(40%);
}
.heat-cell.tp-search-match {
  outline: 2px solid #00d4ff;
  outline-offset: -2px;
}
.heat-cell.tp-search-pulse-flash {
  animation: tp-search-pulse 1.2s ease-out 1;
}
.heat-cell.tp-search-dim {
  opacity: 0.35;
}

/* Search "no results" toast */
#tp-search-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #161b27;
  border: 1px solid #2a3347;
  color: #8aafc8;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
#tp-search-toast.show { opacity: 1; }
