/* Money super-app: Market + Analytics tabs + the super-app tab nav. Reuses the
   brand tokens from styles.css (--purple, --surface, --border, --ink, …). */
[hidden] { display: none !important; }

/* super-app tab nav (distinct from the in-portfolio pf-tabs switcher) */
.app-tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px; box-shadow: var(--shadow); margin: 4px 0 18px; }
.app-tab { font: inherit; font-weight: 600; font-size: 14px; color: var(--ink-soft); background: transparent;
  border: 0; border-radius: 999px; padding: 9px 20px; cursor: pointer; transition: color .12s; }
.app-tab.active { background: var(--grad); color: #fff; }
.app-tab:not(.active):hover { color: var(--purple); }
.apanel { animation: apf .18s ease; }
@keyframes apf { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* market bar: search + market selector */
.market-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.mkt-search { position: relative; flex: 1 1 320px; }
.mkt-search .search-box { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r); padding: 13px 16px; box-shadow: var(--shadow); }
.mkt-search .search-box:focus-within { border-color: var(--purple); }
.mkt-search .search-ic { font-size: 17px; opacity: .7; }
.mkt-search #mq { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.mkt-search .results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; max-height: 380px; overflow-y: auto; }
.mkt-search .res { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--ink); font: inherit; padding: 11px 15px; cursor: pointer; border-bottom: 1px solid var(--border); }
.mkt-search .res:last-child { border-bottom: 0; }
.mkt-search .res:hover, .mkt-search .res.hl { background: color-mix(in srgb, var(--purple) 8%, transparent); }
.res-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.res-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-meta { font-size: 12px; color: var(--muted); }
.res-sym { font-weight: 700; font-size: 13px; color: var(--purple); flex: 0 0 auto; }
.mkt-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
#marketSel { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; cursor: pointer; box-shadow: var(--shadow); }
#marketSel:focus { border-color: var(--purple); outline: 0; }

/* loading + grid + cards (shared by overview/analyze/analytics) */
.loading { display: flex; justify-content: center; padding: 50px; }
.load-img { width: 52px; height: 52px; animation: mpulse 1.1s ease-in-out infinite; }
@keyframes mpulse { 0%,100%{opacity:.45;transform:scale(.95);} 50%{opacity:1;transform:scale(1);} }
.apanel .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 16px; }
.apanel .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.apanel .card h3 { font-family: var(--display); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.apanel .kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.apanel .kv:last-child { border-bottom: 0; }
.apanel .kv-k { font-size: 13.5px; color: var(--ink-soft); }
.apanel .kv-v { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.apanel .up { color: var(--ok); } .apanel .down { color: var(--bad); }
.err { text-align: center; padding: 44px 20px; color: var(--muted); }
.asof { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 0; }

/* market overview */
.ov-head { display: flex; align-items: center; gap: 10px; margin: 4px 2px 10px; }
.ov-flag { font-size: 22px; }
.ov-mkt { font-family: var(--display); font-size: 18px; font-weight: 700; }
/* index ticker — a horizontal strip of all the market's top indices; marquees if many */
.ov-ticker { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 11px 4px; margin-bottom: 16px; overflow: hidden; }
.ov-track { display: flex; align-items: center; }
.ov-ticker:not(.marquee) .ov-track { overflow-x: auto; scrollbar-width: none; }
.ov-ticker:not(.marquee) .ov-track::-webkit-scrollbar { display: none; }
.ov-ticker.marquee .ov-track { width: max-content; animation: w10ticker 38s linear infinite; }
.ov-ticker.marquee:hover .ov-track { animation-play-state: paused; }
@keyframes w10ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.idx-chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 2px 18px; white-space: nowrap;
  border-right: 1px solid var(--border); flex: 0 0 auto; }
.idx-name { font-family: var(--display); font-weight: 700; font-size: 13px; }
.idx-px { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.idx-chg { font-size: 12px; font-weight: 700; }
.mv { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--border); color: var(--ink); font: inherit; padding: 9px 2px; cursor: pointer; }
.mv:last-child { border-bottom: 0; } .mv:hover { background: color-mix(in srgb, var(--purple) 7%, transparent); }
.mv-l { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mv-sym { font-weight: 700; font-size: 13.5px; }
.mv-name { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.mv-r { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; }
.mv-px { font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 600; }
.mv-chg { font-size: 12.5px; font-weight: 700; } .mv-vol { font-size: 11.5px; }

/* news widget */
.mkt-news { margin: 8px 0 20px; }
.news-sec { margin-bottom: 22px; }
.mkt-news-h { font-family: var(--display); font-size: 15px; font-weight: 700; margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.news-card { display: flex; gap: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 13px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .14s var(--ease, ease), border-color .14s, box-shadow .14s; }
.news-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--purple) 45%, var(--border));
  box-shadow: 0 16px 36px -20px rgba(11,15,25,.4); }
.news-img { flex: 0 0 66px; width: 66px; height: 66px; border-radius: 10px; background-size: cover; background-position: center;
  background-color: var(--bg); border: 1px solid var(--border); }
.news-img-ph { display: grid; place-items: center; font-size: 24px; opacity: .7; }
.news-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.news-tag { align-self: flex-start; font-size: 10.5px; font-weight: 700; color: var(--purple); letter-spacing: .02em;
  background: color-mix(in srgb, var(--purple) 12%, transparent); border-radius: 999px; padding: 2px 9px;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-title { font-weight: 600; font-size: 13.5px; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { font-size: 11.5px; color: var(--muted); margin-top: auto; }

/* analyze: company header + financial tables */
.co-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.co-name { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.co-tags { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.co-tag { background: color-mix(in srgb, var(--purple) 9%, var(--surface)); border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px; }
.co-px { text-align: right; }
.co-px-v { font-family: var(--display); font-size: 26px; font-weight: 700; }
.co-px-c { font-size: 14px; font-weight: 600; }
.about { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.about h3 { font-family: var(--display); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.about p { margin: 0; line-height: 1.6; color: var(--ink-soft); font-size: 14.5px; } .about a { color: var(--purple); }
.fin { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th, table.tbl td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; font-weight: 600; }
table.tbl thead th { color: var(--muted); font-weight: 600; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
.back-mkt { display: inline-block; margin-bottom: 12px; color: var(--purple); font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; }
.back-mkt:hover { text-decoration: underline; }

/* watchlist (Market tab) */
.mkt-watch { margin-bottom: 16px; }
.wl-card h3 { margin-bottom: 8px; }
.wl-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.wl-row:last-of-type { border-bottom: 0; }
.wl-main { flex: 1; display: flex; flex-direction: column; gap: 1px; text-align: left; background: transparent; border: 0; color: var(--ink); font: inherit; cursor: pointer; min-width: 0; padding: 0; }
.wl-main:hover .wl-sym { color: var(--purple); }
.wl-sym { font-weight: 700; font-size: 13.5px; }
.wl-name { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.wl-px { font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 600; min-width: 64px; text-align: right; }
.wl-chg { font-size: 12.5px; font-weight: 700; min-width: 58px; text-align: right; }
.wl-rm { background: transparent; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 3px 5px; border-radius: 6px; }
.wl-rm:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.wl-more { margin-top: 8px; }

/* stock-detail action buttons */
.stock-actions { display: flex; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; }
.act-btn { font: inherit; font-weight: 600; font-size: 13.5px; border-radius: var(--r); padding: 10px 18px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); transition: border-color .12s, background .12s; }
.act-btn:hover { border-color: var(--purple); }
.act-buy { background: var(--grad); color: #fff; border-color: transparent; }
.act-watch.on { color: var(--purple); border-color: var(--purple); background: color-mix(in srgb, var(--purple) 10%, var(--surface)); }

/* analytics stat cards */
.an-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.an-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.an-k { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.an-v { font-family: var(--display); font-size: 26px; font-weight: 700; }
.an-sub { font-size: 12px; }
.an-sec { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 22px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.an-sec:first-of-type { margin-top: 4px; }
/* horizontal bar lists */
.an-bar { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.an-bar-k { flex: 0 0 30%; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.an-bar-fill { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.an-bar-v { flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-soft); min-width: 48px; text-align: right; }

@media (max-width: 560px) { .co-px { text-align: left; } .ov-head { align-items: flex-start; } }

/* ============ Home feed (news timeline) ============ */
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 4px 2px 14px; }
.feed-title { font-family: var(--display); font-size: 22px; font-weight: 700; margin: 0; }
.feed-head-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feed-add { position: relative; }
.search-box.sm { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; box-shadow: var(--shadow); }
.search-box.sm:focus-within { border-color: var(--purple); }
.search-box.sm .search-ic { font-size: 14px; opacity: .7; }
.search-box.sm #mq { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; width: 190px; }
.feed-add .results { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; max-height: 360px; overflow-y: auto; }
.feed-add .res { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.feed-add .res:last-child { border-bottom: 0; }
.feed-add .res:hover, .feed-add .res.hl { background: color-mix(in srgb, var(--purple) 8%, transparent); }
.feed-add .res-l { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.feed-add .res-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.feed-add .res-meta { font-size: 11.5px; color: var(--muted); }
.feed-add .res-sym { font-size: 12px; font-weight: 700; color: var(--purple); flex: 0 0 auto; }

.feed-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.feed-chip { font: inherit; font-weight: 600; font-size: 13px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: color .12s, border-color .12s; }
.feed-chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.feed-chip:not(.active):hover { border-color: var(--purple); color: var(--purple); }

.watch-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.watch-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, var(--purple) 10%, var(--surface)); border: 1px solid var(--border); border-radius: 999px; padding: 5px 6px 5px 12px; }
.watch-x { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; padding: 1px 4px; border-radius: 50%; }
.watch-x:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }

.feed-timeline { position: relative; }
.tl-item { display: flex; gap: 14px; align-items: stretch; }
.tl-rail { position: relative; flex: 0 0 14px; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item:first-child .tl-rail::before { top: 18px; }
.tl-item:last-child .tl-rail::before { bottom: calc(100% - 18px); }
.tl-dot { position: relative; z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--grad); margin-top: 14px; box-shadow: 0 0 0 4px var(--bg); }
.tl-card { flex: 1; display: flex; gap: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 13px; margin-bottom: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .14s, border-color .14s, box-shadow .14s; min-width: 0; }
.tl-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--purple) 45%, var(--border)); box-shadow: 0 16px 36px -20px rgba(11,15,25,.4); }
.tl-img { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 10px; background-size: cover; background-position: center; background-color: var(--bg); border: 1px solid var(--border); }
.tl-img-ph { display: grid; place-items: center; font-size: 26px; opacity: .7; }
.tl-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tl-tag { align-self: flex-start; font-size: 10.5px; font-weight: 700; color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent); border-radius: 999px; padding: 2px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tl-tag.mkt { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.tl-title { font-weight: 600; font-size: 14px; line-height: 1.34; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-meta { font-size: 11.5px; color: var(--muted); margin-top: auto; }
@media (max-width: 560px) { .tl-img { flex-basis: 54px; width: 54px; height: 54px; } .search-box.sm #mq { width: 140px; } }

/* ---- activity timeline (portfolio transactions) ---- */
.tl-dot.buy { background: var(--good, #15a36e); }
.tl-dot.sell { background: var(--bad, #d4503e); }
.tl-card.act { display: block; cursor: default; }
.tl-card.act:hover { transform: none; box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--purple) 30%, var(--border)); }
.tl-act { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; border-radius: 6px; padding: 2px 8px; margin-bottom: 7px; }
.tl-act.buy { color: var(--good, #15a36e); background: color-mix(in srgb, var(--good, #15a36e) 13%, transparent); }
.tl-act.sell { color: var(--bad, #d4503e); background: color-mix(in srgb, var(--bad, #d4503e) 13%, transparent); }
.tl-card.act .tl-title { display: block; -webkit-line-clamp: unset; }
.tl-sym { font-weight: 600; font-size: 12px; color: var(--muted); margin-left: 4px; }
.tl-line { display: block; font-size: 13px; color: var(--ink-soft, var(--ink)); margin: 3px 0 4px; }
.tl-date-sep { font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 6px 0 10px 28px; }
.tl-date-sep:first-child { margin-top: 0; }

/* ---- analytics: filter bar + cumulative growth chart ---- */
.an-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 2px 2px 16px; }
.an-filter .mkt-pick { gap: 3px; }
.an-clear { align-self: center; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--bad, #d4503e); background: color-mix(in srgb, var(--bad, #d4503e) 9%, transparent); border: 1px solid color-mix(in srgb, var(--bad, #d4503e) 30%, var(--border)); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.an-clear:hover { background: color-mix(in srgb, var(--bad, #d4503e) 16%, transparent); }
.grid.one { grid-template-columns: 1fr; }
.grow-card { padding: 16px 16px 12px; }
.grow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.grow-head h3 { margin: 0; }
.grow-now { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--purple); }
.grow-svg { width: 100%; height: 200px; display: block; overflow: visible; }
.grow-area { fill: color-mix(in srgb, var(--purple) 16%, transparent); stroke: none; }
.grow-line { fill: none; stroke: var(--purple); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.grow-zero { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.grow-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ---- Home: horizontal activity TIMELINE with a draggable year scrubber ---- */
.tl-frame { position: relative; }
.tl-cards-wrap { position: relative; }
/* edge-fade overlays — visible only when there's more to scroll toward */
.tl-cards-wrap::before, .tl-cards-wrap::after { content: ""; position: absolute; top: 0; bottom: 8px; width: 56px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 2; }
.tl-cards-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.tl-cards-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.tl-frame.can-left .tl-cards-wrap::before { opacity: 1; }
.tl-frame.can-right .tl-cards-wrap::after { opacity: 1; }
.tl-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: 21px; line-height: 1; cursor: pointer; box-shadow: 0 8px 22px -8px rgba(11,15,25,.45); display: none; place-items: center; padding: 0; transition: color .12s, border-color .12s, transform .12s; }
.tl-prev { left: 2px; } .tl-next { right: 2px; }
.tl-frame.can-left .tl-prev { display: grid; }
.tl-frame.can-right .tl-next { display: grid; }
.tl-nav:hover { border-color: var(--purple); color: var(--purple); }
.tl-frame.hint .tl-next { display: grid; animation: tlNudge .9s ease-in-out 2; }
@keyframes tlNudge { 0%, 100% { transform: translateY(-50%) translateX(0); } 50% { transform: translateY(-50%) translateX(5px); } }

.feed-widget { position: relative; display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.feed-widget::-webkit-scrollbar { display: none; }   /* clean: chevrons + scrubber are the affordance */

/* year scrubber: a live current-year readout + a draggable window over a year-ticked track */
.tl-scrub { display: flex; align-items: center; gap: 14px; margin: 4px 4px 2px; opacity: 0; transition: opacity .2s; }
.tl-frame.scrollable .tl-scrub { opacity: 1; }
.tl-scrub-year { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1; min-width: 48px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-scrub-track { position: relative; flex: 1; height: 34px; cursor: pointer; touch-action: none; }
.tl-scrub-track::before { content: ""; position: absolute; left: 0; right: 0; top: 24px; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--border) 75%, transparent); }
.tl-ticks { position: absolute; inset: 0; pointer-events: none; }
/* Every year gets a tick MARK (the ::after line); the LABEL text is hidden by default
   and shown only for spaced-out years (.lbl) or the year under the scrubber (.on), so
   dense histories never stack "2023" over "2018". */
.tl-tick { position: absolute; top: 2px; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: transparent; white-space: nowrap; transition: color .12s; }
.tl-tick.lbl { color: var(--muted); }
.tl-tick.on { color: var(--purple); font-weight: 800; z-index: 2; }
.tl-tick::after { content: ""; position: absolute; left: 50%; top: 13px; width: 1px; height: 9px; background: var(--border); transform: translateX(-50%); transition: background .12s, height .12s, width .12s; }
.tl-tick.on::after { background: var(--purple); height: 12px; width: 2px; }
.tl-win { position: absolute; top: 22px; height: 8px; min-width: 18px; border-radius: 5px; background: var(--grad); box-shadow: 0 2px 8px -2px rgba(124,58,237,.55); cursor: grab; transition: box-shadow .12s; }
.tl-win:hover { box-shadow: 0 2px 12px -2px rgba(124,58,237,.8); }
.tl-win.dragging { cursor: grabbing; }
@media (max-width: 640px) { .tl-scrub-year { font-size: 17px; min-width: 40px; } }
.ev { position: relative; flex: 0 0 232px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--r-lg); padding: 32px 14px 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); min-height: 150px; transition: transform .14s, border-color .14s, box-shadow .14s; }
.ev-buy { border-left-color: var(--good, #15a36e); }
.ev-sell { border-left-color: var(--bad, #d4503e); }
.ev-news { border-left-color: var(--purple); }
a.ev:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--purple) 45%, var(--border)); box-shadow: 0 16px 36px -20px rgba(11,15,25,.4); }
a.ev:hover { border-left-color: var(--purple); }
/* the rail: a continuous line across the tops of the cards (bridges the 12px gap) */
.ev::before { content: ""; position: absolute; top: 16px; left: -7px; right: -7px; height: 2px; background: var(--border); z-index: 0; }
.ev:first-child::before { left: 14px; border-radius: 2px; }
.ev:last-child::before { right: 14px; border-radius: 2px; }
.ev-node { position: absolute; top: 11px; left: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--surface); z-index: 1; }
.ev-buy .ev-node { background: var(--good, #15a36e); }
.ev-sell .ev-node { background: var(--bad, #d4503e); }
.ev-news .ev-node { background: var(--purple); }
.ev-when { position: absolute; top: 9px; left: 34px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface); padding: 0 5px; z-index: 1; white-space: nowrap; }
.ev-top { display: flex; align-items: center; gap: 8px; }
.ev-logo { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; overflow: hidden; color: #fff; }
.ev-logo.has-img { background: #fff !important; border: 1px solid var(--border); }
.ev-mono { font-weight: 700; font-size: 14px; line-height: 1; }
.ev-logo.has-img .ev-mono { display: none; }
.ev-logo-img { width: 100%; height: 100%; object-fit: contain; padding: 2px; box-sizing: border-box; }
.ev-badge { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .4px; padding: 3px 8px; border-radius: 6px; }
.ev-badge.buy { color: var(--good, #15a36e); background: color-mix(in srgb, var(--good, #15a36e) 14%, transparent); }
.ev-badge.sell { color: var(--bad, #d4503e); background: color-mix(in srgb, var(--bad, #d4503e) 14%, transparent); }
.ev-badge.news { color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent); }
.ev-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; margin-top: 2px; }
.ev-head { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-sym { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.ev-line { font-size: 12.5px; color: var(--ink-soft, var(--ink)); }
.ev-val { font-weight: 700; font-size: 15px; }
.ev-pl { font-size: 12px; font-weight: 700; margin-top: 1px; }
.ev-pl.up { color: var(--good, #15a36e); }
.ev-pl.down { color: var(--bad, #d4503e); }
.ev-pf { margin-top: auto; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-market { font-size: 12.5px; font-weight: 600; color: var(--ink-soft, var(--ink)); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; align-self: center; }
/* phones: one card + a peek of the next, swipe to scroll (no chevrons), thin fades */
@media (max-width: 640px) {
  .ev { flex-basis: min(82vw, 280px); }
  .tl-nav { display: none !important; }
  .tl-cards-wrap::before, .tl-cards-wrap::after { width: 28px; }
}

/* ---- Home: news section below the widget ---- */
.feed-news { margin-top: 4px; }
.feed-sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 2px 12px; border-top: 1px solid var(--border); padding-top: 16px; flex-wrap: wrap; }
.feed-sub { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 0; }
.feed-sub-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feed-sub-r .feed-add { position: relative; }
.watch-lbl { font-size: 12px; font-weight: 600; align-self: center; margin-right: 2px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.news-card { display: flex; gap: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 11px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .14s, border-color .14s, box-shadow .14s; min-width: 0; }
.news-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--purple) 40%, var(--border)); box-shadow: 0 14px 30px -20px rgba(11,15,25,.4); }
.news-img { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 9px; background-size: cover; background-position: center; background-color: var(--bg); border: 1px solid var(--border); }
.news-img-ph { display: grid; place-items: center; font-size: 22px; opacity: .7; }
/* company logo as the news thumbnail (reuses the .ev-logo proxy swap) */
.news-logo { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 9px; }
.news-logo .ev-mono { font-size: 20px; }
.news-logo .ev-logo-img { padding: 11px; }
.news-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-tag { align-self: flex-start; font-size: 10px; font-weight: 700; color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent); border-radius: 999px; padding: 1px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.news-title { font-weight: 600; font-size: 13px; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { font-size: 11px; color: var(--muted); margin-top: auto; }
/* news loading states (brand loader) */
.news-load { padding: 22px 0; }
.news-more { min-height: 8px; }
.news-more.loading { min-height: 56px; background: center / 30px 30px no-repeat url("https://accounts.what10.com/brand/logo-loader.svg"); }
