/* Watchlist board — matches spy.css Suite light theme. External file (CSP: no inline styles).
   This sheet loads ONLY on the standalone /watchlist/ page, so the header
   overrides below never touch the SPY sheet. */

/* tighter page header: smaller title, less air above the board
   (the divergence feed follows the topbar directly since 2026-10-16,
   when the in-board tab row was removed) */
.topbar { padding-bottom: 8px; margin-bottom: 10px; }
.brand { font-size: 15px; letter-spacing: 1.5px; }

.wl-controls { display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.wl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-chip {
  background: var(--bg); border: 1px solid var(--line-2); color: var(--body);
  border-radius: 999px; padding: 4px 11px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; letter-spacing: .3px;
  transition: border-color .12s ease, color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.wl-chip.on { background: var(--gold-tint);
  border-color: var(--gold); color: var(--gold-deep);
  box-shadow: 0 0 0 1px rgba(217,142,27,.25), 0 2px 8px rgba(217,142,27,.14); }
.wl-chip:hover { border-color: var(--gold); color: var(--text); transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(20,24,29,.14); }
.wl-chip.on:hover { color: var(--gold-deep); }
.wl-chip:active { transform: translateY(0); }
.wl-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wl-sortrow { display: flex; align-items: center; gap: 10px; }
.wl-updated { font-size: 11.5px; color: var(--dim); }
.wl-sort {
  appearance: none; -webkit-appearance: none;
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%),
    linear-gradient(180deg, #FFFFFF, #FAFAF8);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%, 0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
  border: 1px solid var(--line-2); color: var(--text);
  border-radius: 8px; padding: 5px 27px 5px 11px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.wl-sort:hover { border-color: var(--gold); box-shadow: 0 3px 8px rgba(20,24,29,.14); }
.wl-sort:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wl-sortlabel { font-size: 11.5px; color: var(--dim); font-weight: 700; }
.wl-dir {
  background: var(--bg);
  border: 1px solid var(--line-2); color: var(--text);
  border-radius: 8px; padding: 5px 11px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.wl-dir:hover { border-color: var(--gold); box-shadow: 0 3px 8px rgba(20,24,29,.14); }
.wl-dir:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wl-sort option { background: var(--panel); color: var(--text); }

.wl-gname { font-size: 11px; letter-spacing: 1.5px; color: var(--gold-deep);
  margin: 12px 0 6px; padding: 0 2px; font-weight: 800; }
.wl-gname .dim { color: var(--dim); font-weight: 400; }

/* card grid board — each ticker a heat-tinted card (mockups B+D merged) */
.wl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
@media (min-width: 1280px) {
  .wl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
  .wl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.wl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 5px;
  min-width: 0; }
.wl-card:hover, .wl-card:focus { border-color: #C9CBCB;
  box-shadow: 0 8px 28px rgba(20,24,29,.07); outline: none; }
.wl-ctop { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.wl-sym { font-size: 14px; font-weight: 700; letter-spacing: .3px; flex: none; }
.wl-name { font-size: 10.5px; color: var(--dim); font-weight: 400; letter-spacing: 0;
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-stale { font-size: 10px; color: var(--orange); font-weight: 400; }
.wl-cmid { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wl-price { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-chgpill { font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  border-radius: 999px; padding: 2px 8px; flex: none; }
.wl-chgpill.up { color: var(--green); background: rgba(23,114,69,.12); }
.wl-chgpill.down { color: var(--red); background: rgba(214,69,69,.12); }
.wl-hl { font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums;
  letter-spacing: .2px; }
.wl-w52 { display: flex; align-items: center; gap: 8px; }
.wl-track { position: relative; flex: 1; height: 4px; border-radius: 999px;
  background: var(--line); }
.wl-dot { position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--text); box-shadow: 0 0 0 1.5px #fff; transform: translate(-50%,-50%); }
.wl-w52n { font-size: 9.5px; color: var(--dim); flex: none; font-variant-numeric: tabular-nums; }

/* card fact elements (2026-10-12): $ day move beside the % pill, and a
   slim footer row — earnings chip left, hot volume right. Facts only;
   no bar, no line chart. */
.wl-cright { display: flex; align-items: center; gap: 6px; flex: none; }
.wl-dol { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-dol.up { color: var(--green); }
.wl-dol.down { color: var(--red); }
.wl-cfoot { display: flex; align-items: center; gap: 6px; }
.wl-earn { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; color: var(--gold-deep);
  background: rgba(217,142,27,.12); border: 1px solid rgba(217,142,27,.45);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.wl-vol { font-size: 9.5px; color: var(--dim); margin-left: auto; flex: none;
  font-variant-numeric: tabular-nums; white-space: nowrap; }

/* heat tint — whole-card background scaled by |day %|; class step set in
   build_watchlist.py (server render) and watchlist.js (sort re-render):
   0 faint <1% · 1 light 1-3% · 2 medium 3-6% · 3 strong >6%.
   rgba green = --green #177245, red = --red #D64545 over the light theme;
   card text stays var(--text) at full contrast on every step. */
.wl-card.heat-up-0 { background: rgba(23,114,69,.04); }
.wl-card.heat-up-1 { background: rgba(23,114,69,.09); }
.wl-card.heat-up-2 { background: rgba(23,114,69,.16); border-color: rgba(23,114,69,.38); }
.wl-card.heat-up-3 { background: rgba(23,114,69,.24); border-color: rgba(23,114,69,.58); }
.wl-card.heat-dn-0 { background: rgba(214,69,69,.04); }
.wl-card.heat-dn-1 { background: rgba(214,69,69,.09); }
.wl-card.heat-dn-2 { background: rgba(214,69,69,.16); border-color: rgba(214,69,69,.38); }
.wl-card.heat-dn-3 { background: rgba(214,69,69,.24); border-color: rgba(214,69,69,.58); }

/* detail panel — floating overlay card over a dimmed backdrop (watchlist.js toggles it) */
.wl-backdrop { position: fixed; inset: 0; background: rgba(20,24,29,.5); z-index: 80; }
#wl-detail { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(1100px, calc(100vw - 24px)); max-height: 92vh; overflow-y: auto;
  z-index: 81; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 16px 18px; box-shadow: 0 18px 60px rgba(20,24,29,.28); }
#wl-detail[hidden], .wl-backdrop[hidden] { display: none !important; }
body.wl-noscroll { overflow: hidden; }
@media (max-width: 760px) {
  #wl-detail { padding: 12px; }
}
.wl-dhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.wl-dsym { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.wl-dname { font-size: 14px; color: var(--dim); margin-left: 8px; }
.wl-dclose { background: var(--bg); border: 1px solid var(--line-2); color: var(--body);
  border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 14px;
  transition: border-color .12s ease, color .12s ease, transform .12s ease, box-shadow .12s ease; }
.wl-dclose:hover { border-color: var(--gold); color: var(--gold-deep); transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(20,24,29,.14); }
.wl-dclose:active { transform: translateY(0); }
.wl-dclose:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wl-dsubtabs { display: flex; gap: 3px; flex-wrap: wrap; margin-bottom: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.wl-dtab { background: transparent; border: 1px solid transparent; color: var(--body);
  border-radius: 8px; padding: 7px 14px; font-size: 12px; font-weight: 600;
  letter-spacing: 1px; cursor: pointer; font-family: inherit;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease; }
.wl-dtab:hover { color: var(--text); background: rgba(20,24,29,.05); }
.wl-dtab.on { border-color: rgba(217,142,27,.5); color: var(--gold-deep);
  background: var(--gold-tint);
  box-shadow: 0 1px 6px rgba(20,24,29,.10), 0 0 8px rgba(217,142,27,.12); }
.wl-dtab.on:hover { color: var(--gold-deep); background: var(--gold-tint); }
.wl-dtab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wl-dbody { font-size: 14px; line-height: 1.55; }
.wl-dbody h4 { font-size: 13px; letter-spacing: 1px; color: var(--gold-deep); margin: 0 0 8px; }
.wl-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.wl-kv > div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.wl-kv .k { font-size: 10px; letter-spacing: 1px; color: var(--dim); text-transform: uppercase; }
.wl-kv .v { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-kv .v.up { color: var(--green); } .wl-kv .v.down { color: var(--red); }
.wl-elist { margin: 0 0 12px; padding: 0; list-style: none; }
.wl-elist li { padding: 7px 0 7px 18px; border-bottom: 1px solid var(--line); position: relative; }
.wl-elist li:last-child { border-bottom: none; }
.wl-elist li::before { content: ""; position: absolute; left: 4px; top: 14px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.wl-elist .esub { color: var(--dim); font-size: 12.5px; }
.wl-chart6 { width: 100%; height: auto; display: block; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; }
.wl-note { font-size: 12px; color: var(--dim); margin-top: 10px; }
.wl-empty { padding: 18px; color: var(--dim); font-size: 14px; }

/* divergence feed — collapsible panel: slim bar when locked/collapsed,
   card grid inside the body once unlocked and expanded */
.wl-divfeed { background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: 10px; margin-bottom: 10px; }
.wl-divfeed-bar { display: flex; align-items: center; gap: 10px; padding: 7px 12px; }
.wl-divfeed-toggle { flex: 1; display: flex; align-items: center; gap: 8px;
  background: transparent; border: none; color: var(--text); padding: 2px 4px;
  border-radius: 8px; font-family: inherit; text-align: left; cursor: pointer; min-width: 0; }
.wl-divfeed-toggle:disabled { cursor: default; }
.wl-divfeed-toggle:not(:disabled):hover .wl-divfeed-title { color: var(--text); }
.wl-divfeed-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wl-divfeed-title { color: var(--gold-deep); font-weight: 800; letter-spacing: .8px;
  font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-divfeed-count { color: var(--dim); font-size: 12px; font-weight: 700;
  white-space: nowrap; }
.wl-divfeed-chev { color: var(--gold-deep); font-size: 11px; flex: none;
  background: rgba(217,142,27,.12); border: 1px solid rgba(217,142,27,.4);
  border-radius: 999px; padding: 1px 6px;
  transition: transform .15s ease; }
.wl-divfeed.open .wl-divfeed-chev { transform: rotate(90deg); }
.wl-divfeed-body { padding: 2px 12px 12px; }
.wl-divfeed-none { color: var(--dim); font-size: 12.5px; }
.wl-divgrid { display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.wl-divcard { display: flex; align-items: flex-start; gap: 8px; width: 100%;
  text-align: left; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 8px; color: var(--text); padding: 8px 10px; cursor: pointer;
  font-family: inherit;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.wl-divcard:hover { background: var(--panel); border-color: rgba(217,142,27,.65);
  transform: translateY(-1px); box-shadow: 0 3px 10px rgba(20,24,29,.14); }
.wl-divcard:active { transform: translateY(0); }
.wl-divcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wl-divsym { flex: none; margin-top: 1px; background: var(--gold); color: var(--text);
  border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 800;
  letter-spacing: .5px; }
.wl-divtext { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; }
@media (max-width: 640px) {
  .wl-divgrid { grid-template-columns: 1fr; }
}

/* dossier tab */
.wl-dtop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wl-asof { font-size: 12px; color: var(--dim); }
.wl-tldr { font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.wl-p { margin: 0 0 12px; }
.wl-next { margin: 0 0 8px; font-size: 13.5px; }
.wl-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 13.5px; }
.wl-table th, .wl-table td { padding: 6px 8px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top; }
.wl-table th { font-size: 10.5px; letter-spacing: 1px; color: var(--dim); text-transform: uppercase; }
.wl-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl-table td.num { font-weight: 600; }
.wl-per { color: var(--dim); font-size: 11.5px; }
.wl-erow { display: flex; align-items: center; gap: 12px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.wl-erow:last-of-type { margin-bottom: 12px; }
.wl-eper { font-weight: 800; min-width: 86px; }
.wl-eps { color: var(--dim); font-variant-numeric: tabular-nums; }
.wl-res { margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: 1px;
  border-radius: 5px; padding: 2px 7px; border: 1px solid var(--line); color: var(--dim); }
.wl-res.beat { color: var(--green); border-color: var(--green); }
.wl-res.miss { color: var(--red); border-color: var(--red); }
.wl-res.inline { color: var(--gold-deep); border-color: var(--gold); }
.wl-divbox { background: var(--bg); border: 1px solid var(--line);
  border-left: 4px solid var(--orange); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; line-height: 1.55; }

/* responsive — card grid steps 4 / 3 / 2 / 1 across */
.hide { display: none !important; }
@media (max-width: 1150px) {
  .wl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wl-divfeed-title { white-space: normal; }
}
@media (max-width: 520px) {
  .wl-grid { grid-template-columns: minmax(0, 1fr); }
  .wl-card { padding: 12px; }
}
