/* Colour and small charts for the lists (tickmark/charts.py): the home tiles,
   screener cells, watchlist cards, superinvestor holdings and the feed's days.
   Same language as the company Overview in look.css. Loaded last. */
:root { --t-up1: #ecf8f1; --t-up2: #d3f0e0; --t-up3: #a9e2c4; --t-dn1: #fdf0ef; --t-dn2: #fbdcda; --t-dn3: #f6b8b4;
  --l-ok: #22a06b; --l-flag: #e5484d; --l-na: #c7d2fe; --s-one: #f5b83d; --s-two: #f08c00; }
:root[data-theme="dark"] { --t-up1: rgba(74, 222, 128, .08); --t-up2: rgba(74, 222, 128, .16); --t-up3: rgba(74, 222, 128, .28);
  --t-dn1: rgba(248, 113, 113, .08); --t-dn2: rgba(248, 113, 113, .16); --t-dn3: rgba(248, 113, 113, .28);
  --l-ok: #4ade80; --l-flag: #f87171; --l-na: #2b3a7c; --s-one: #fbbf24; --s-two: #fb923c; }

/* ---- home: every company at a glance ---- */
.cov-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cov-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 14px; box-shadow: var(--shadow-pop); }
.cov-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.cov-val { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cov-val b { font: 600 32px/1.1 var(--display); letter-spacing: -0.02em; }
.cov-val span { font-size: 13px; color: var(--muted); }
.cov-hist { display: flex; align-items: flex-end; gap: 4px; height: 92px; margin-top: 4px; }
.cov-hist a { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; text-decoration: none; min-width: 0; }
.cov-hist i { display: block; border-radius: 4px 4px 0 0; transition: filter .12s; }
.cov-hist a:hover i { filter: brightness(.92) saturate(1.2); }
.cov-hist span { font-size: 11px; color: var(--faint); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cov-stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin: 10px 0 4px; gap: 2px; }
.cov-stack a:hover { filter: brightness(.92); }
.cov-key { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 13px; }
.cov-key li { display: flex; align-items: center; gap: 6px; }
.cov-key a { color: var(--fg); }
.cov-key b { margin-left: auto; font-variant-numeric: tabular-nums; }
.cov-key i { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.cov-stack .ok, .cov-key .ok { background: var(--l-ok); } .cov-stack .one, .cov-key .one { background: var(--s-one); }
.cov-stack .two, .cov-key .two { background: var(--s-two); } .cov-stack .many, .cov-key .many { background: var(--l-flag); }
.cov-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.cov-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 58px; align-items: center; gap: 8px; }
.cov-list .tk { font-weight: 600; }
.cov-list .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.cov-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cov-bar i { display: block; height: 100%; background: var(--l-ok); border-radius: 4px; }
.cov-note { margin: auto 0 0; padding-top: 6px; font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .cov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cov-tiles { grid-template-columns: 1fr; } }

/* home evidence cards: a colour line by kind */
.ev-card[class*="k-"] { border-top: 3px solid var(--c, var(--accent)); }

/* ---- screener cells ---- */
.scr tbody tr td.up1 { background: var(--t-up1); } .scr tbody tr td.up2 { background: var(--t-up2); } .scr tbody tr td.up3 { background: var(--t-up3); }
.scr tbody tr td.dn1 { background: var(--t-dn1); } .scr tbody tr td.dn2 { background: var(--t-dn2); } .scr tbody tr td.dn3 { background: var(--t-dn3); }
.scr td.spark.up path, .wl-spark.up path { stroke: var(--l-ok); }
.scr td.spark.dn path, .wl-spark.dn path { stroke: var(--l-flag); }
.scr td.spark.up span { color: var(--gl-up); } .scr td.spark.dn span { color: var(--gl-down); }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.lights { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.lights:hover { text-decoration: none; }
.lights i { width: 7px; height: 12px; border-radius: 4px; background: var(--l-ok); opacity: .75; }
.lights i.flag { background: var(--l-flag); opacity: 1; }
.lights i.na { background: var(--l-na); opacity: 1; }
.lights span { margin-left: 6px; min-width: 8px; font-weight: 600; }
.lights.warnn span { color: var(--l-flag); }
.scr td.lights-td { white-space: nowrap; }
.cbar { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 76px; }
.cbar i { display: block; height: 8px; border-radius: 4px; margin-right: auto; max-width: 40px; flex: none; }
.cbar.wide { justify-content: flex-start; min-width: 0; gap: 8px; color: var(--muted); white-space: nowrap; }
.cbar .trk { width: 90px; height: 10px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cbar .trk i { max-width: none; height: 100%; margin: 0; border-radius: 0; }

/* ---- watchlist cards ---- */
.wl-look { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin: 10px 0 4px; }
.wl-spark { display: inline-flex; align-items: center; gap: 8px; }
.wl-spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.wl-spark.up b { color: var(--gl-up); } .wl-spark.dn b { color: var(--gl-down); }

/* ---- superinvestors: largest holdings as one bar ---- */
.inv-mix { flex: 0 0 100%; height: 9px; margin: 2px 0 4px; background: var(--surface-2); gap: 1px; border-radius: 4px; }
.top5 > span i { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 4px; vertical-align: 0; }
.pill-up, .pill-dn { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; }
.pill-up { color: var(--gl-up); background: var(--gl-up-bg); }
.pill-dn { color: var(--gl-down); background: var(--gl-down-bg); }

/* ---- feed: items per day by kind ---- */
.days-chart { display: flex; align-items: flex-end; gap: 3px; height: 74px; margin: 2px 20px 6px; }
.days-chart .day { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; gap: 1px; min-width: 0; }
.days-chart .day:hover { filter: brightness(.9); }
.days-chart i, .days-key i { display: block; border-radius: 4px; }
.days-key { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 0 20px 14px; font-size: 12px; color: var(--muted); }
.days-key > span:first-child { margin-right: auto; }
.days-key span { display: inline-flex; align-items: center; gap: 5px; }
.days-key i { width: 9px; height: 9px; }
.days-chart .k10k, .days-key .k10k { background: var(--k10k); } .days-chart .k10q, .days-key .k10q { background: var(--k10q); }
.days-chart .k8k, .days-key .k8k { background: var(--k8k-bar); }
.days-chart .kbuy, .days-key .kbuy { background: var(--kbuy); } .days-chart .kother, .days-key .kother { background: var(--kother); }
:root[data-theme="dark"] .cov-hist i, :root[data-theme="dark"] .cbar i { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }

/* ---- screener pages ---- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 12px 0; }
.pager > span { margin-right: auto; }
.pager a { min-width: 34px; padding: 5px 10px; text-align: center; border-radius: 6px; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); font-size: 14px; font-weight: 500; }
.pager a:hover { text-decoration: none; border-color: var(--line-strong); }
.pager a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
