/* My stocks (/my-stocks) — the lists page and each list's Terminal (2026-10-15).
   From static/proto/portfolio-terminal-drafts.html drafts F ("Clean") + G ("My stocks"): white cards with hairline
   borders, plain 15px titles inside the card (the grey header bands were "a little bit ugly"), one ink line for the
   list against a dashed S&P, colour only on moves and signals. No stat-card row (user removed it). */
.tm { --tm-bg:#1F1F1F; --tm-card:#292929; --tm-in:#333333; --tm-line:rgba(255,255,255,.08); --tm-row:rgba(255,255,255,.06);
      --tm-ink:rgba(255,255,255,.94); --tm-sub:#a9a9a5; --tm-mute:#7f7f7a; --tm-blue:#6f83ea; --tm-pos:#43D1A7; --tm-neg:#F73463;
      --tm-pos-bg:rgba(67,209,167,.14); --tm-neg-bg:rgba(247,52,99,.13); --tm-tip:#0A2540;
      color:var(--tm-ink); font-size:13px; line-height:1.45; font-variant-numeric:tabular-nums; }
html[data-theme="light"] .tm { --tm-bg:#F4F6F9; --tm-card:#fff; --tm-in:#F6F8FB; --tm-line:#E7EAF0; --tm-row:#EEF1F5;
      --tm-ink:#0A2540; --tm-sub:#5E6E85; --tm-mute:#8792A6; --tm-blue:#455DDC; --tm-pos:#0d8a66; --tm-neg:#c8203f;
      --tm-pos-bg:rgba(67,209,167,.15); --tm-neg-bg:rgba(247,52,99,.1); }
.tm .pos { color:var(--tm-pos); } .tm .neg { color:var(--tm-neg); } .tm .mute { color:var(--tm-mute); }
.tm h1 { margin:0; font-size:23px; font-weight:650; letter-spacing:-.01em; color:var(--tm-ink); }
.tm-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:2px 0 16px; }
.tm-head .r { margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.tm-btn { display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 12px; border-radius:4px; border:1px solid var(--tm-line);
          background:var(--tm-card); color:var(--tm-ink); font:inherit; font-size:13px; font-weight:550; cursor:pointer; text-decoration:none; white-space:nowrap; }
.tm-btn:hover { border-color:var(--tm-blue); color:var(--tm-blue); }
.tm-btn.pri { background:var(--tm-blue); border-color:var(--tm-blue); color:#fff; }
.tm-btn.pri:hover { color:#fff; filter:brightness(1.05); }
.tm-btn i { font-size:14px; }

/* cards (shared) */
.tm-c { background:var(--tm-card); border:1px solid var(--tm-line); border-radius:4px; padding:18px 20px; min-width:0; }
.tm-ch { display:flex; align-items:center; gap:8px; margin-bottom:14px; min-height:26px; }
.tm-ch h2 { margin:0; font-size:15px; font-weight:600; letter-spacing:-.01em; color:var(--tm-ink); }
.tm-ch .r { margin-left:auto; display:flex; gap:6px; align-items:center; }
.tm-chip { font-size:11.5px; padding:3px 8px; background:var(--tm-in); border-radius:4px; color:var(--tm-sub); white-space:nowrap; }
.tm-lnk { background:none; border:0; padding:0; font:inherit; font-size:12.5px; color:var(--tm-sub); cursor:pointer; text-decoration:none; }
.tm-lnk:hover, .tm-lnk.on { color:var(--tm-ink); }
.tm-lnk.on { font-weight:600; }
.tm-pl { display:inline-block; padding:2px 7px; border-radius:4px; font-weight:600; font-size:12px; white-space:nowrap; }
.tm-pl.up { background:var(--tm-pos-bg); color:var(--tm-pos); } .tm-pl.dn { background:var(--tm-neg-bg); color:var(--tm-neg); }
.tm-logo { width:30px; height:30px; border-radius:50%; object-fit:contain; background:#fff; border:1px solid var(--tm-line); padding:3px; flex:none; }
.tm-seg { display:inline-flex; border:1px solid var(--tm-line); border-radius:4px; padding:1px; background:var(--tm-in); }
.tm-seg button { border:0; background:transparent; padding:2px 9px; border-radius:3px; font:inherit; font-size:12px; color:var(--tm-sub); cursor:pointer; }
.tm-seg button.on { background:var(--tm-card); color:var(--tm-ink); font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.08); }

/* ── lists page ── */
.tm-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(224px, 1fr)); gap:10px; margin-bottom:22px; }
.tm-grid[hidden], .tm-sec[hidden] { display:none; }
.tm-sec { display:flex; align-items:center; gap:8px; margin:4px 0 10px; font-size:13px; font-weight:600; color:var(--tm-sub); }
.tm-card { display:flex; flex-direction:column; gap:8px; padding:12px 14px; text-decoration:none; color:inherit; cursor:pointer; transition:border-color .12s; }
.tm-card:hover { border-color:color-mix(in srgb, var(--tm-blue) 45%, var(--tm-line)); }
/* × in the card's top-right corner (user, 2026-10-16); shows on hover, always on touch screens */
.tm-card { position:relative; }
.tm-del { position:absolute; top:-9px; right:-9px; z-index:2; width:22px; height:22px; border-radius:50%; display:flex;
          align-items:center; justify-content:center; padding:0; border:1px solid var(--tm-line); background:var(--tm-in);
          color:var(--tm-mute); font-size:11px; cursor:pointer; opacity:0; }
.tm-card:hover .tm-del, .tm-del:focus-visible { opacity:1; }
.tm-del:hover { color:#fff; background:#F73463; border-color:#F73463; }
@media (hover:none) { .tm-del { opacity:1; } }
.tm-card .top { display:flex; align-items:center; gap:10px; }
.tm-ico { width:30px; height:30px; border-radius:4px; display:grid; place-items:center; font-size:15px; flex:none; }
.tm-ico.pf { background:color-mix(in srgb, var(--tm-blue) 14%, transparent); color:var(--tm-blue); }
.tm-ico.wl { background:rgba(255,134,46,.14); color:#E07015; }
.tm-card .nm { min-width:0; }
.tm-card .nm b { display:block; font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-starter { display:inline-block; font-size:10px; font-weight:600; padding:0 6px; margin-right:6px; border-radius:999px; background:rgba(67,209,167,.16); color:var(--tm-pos); vertical-align:1px; }
.tm-card .nm small { display:block; font-size:11.5px; color:var(--tm-mute); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-card .day { margin-left:auto; }
.tm-card .val { font-size:17px; font-weight:600; letter-spacing:-.02em; margin-top:-2px; }
.tm-card .val small { font-size:12px; font-weight:500; color:var(--tm-mute); letter-spacing:0; }
.tm-card .alloc { display:grid; grid-template-columns:68px minmax(0,1fr); gap:12px; align-items:center; min-height:68px; }
.tm-card .alloc svg { width:68px; height:68px; }
.tm-card .alloc svg { display:block; }
.tm-card .leg { display:grid; grid-template-columns:8px minmax(0,1fr) auto; gap:3px 7px; align-items:center; font-size:11.5px; }
.tm-card .leg i { width:8px; height:8px; border-radius:2px; }
.tm-card .leg span { color:var(--tm-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-card .leg b { font-weight:600; text-align:right; }
.tm-card .facts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px 10px; font-size:12px; border-top:1px solid var(--tm-row); padding-top:9px; }
.tm-card .facts small { display:block; font-size:10.5px; color:var(--tm-mute); margin-bottom:1px; }
.tm-card .facts b { font-weight:600; }
/* header bar (2026-10-15): framed, title + counts on the left, key facts on the right */
.tm-hbar { display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:14px 16px; margin-bottom:20px; background:var(--tm-card); border:1px solid var(--tm-line); border-radius:4px; }
.tm-hbar-ic { width:38px; height:38px; border-radius:4px; display:grid; place-items:center; font-size:18px; background:rgba(67,209,167,.14); color:var(--tm-pos); flex:none; }
.tm-hbar-t { flex:1 1 auto; min-width:0; margin:0; }
.tm-hbar-t h1 { font-size:18px; margin:0; }
.tm-hbar-t small { display:block; font-size:12px; color:var(--tm-mute); margin-top:1px; }
.tm-hbar { position:relative; overflow:hidden; }
.tm-hbar-x { margin-left:auto; display:flex; align-items:center; gap:22px; flex-wrap:nowrap; min-height:38px; min-width:0; overflow:hidden; }
.tm-hf small { display:block; font-size:11px; color:var(--tm-mute); }
.tm-hf b { font-size:13.5px; font-weight:600; }
/* "add" ghost card at the end of each section (user: instead of buttons at the top) */
.tm-ghost { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:130px; padding:14px;
            border:1.5px dashed var(--tm-line); border-radius:4px; background:transparent; color:var(--tm-sub); font:inherit; cursor:pointer; text-align:center; }
html[data-theme="light"] .tm-ghost { border-color:#D5DBE5; }
.tm-ghost i { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-size:16px; background:var(--tm-in); color:var(--tm-ink); margin-bottom:6px; }
.tm-ghost b { font-size:13.5px; font-weight:600; color:var(--tm-ink); }
.tm-ghost small { font-size:12px; color:var(--tm-mute); max-width:200px; }
.tm-ghost small span { color:var(--tm-blue); }
.tm-ghost:hover { border-color:var(--tm-blue); }
.tm-ghost:hover i { background:var(--tm-blue); color:#fff; }
.tm-choose { display:grid; gap:8px; padding-bottom:18px; }
.tm-choose a, .tm-choose button { display:flex; width:100%; text-align:left; background:none; font:inherit; cursor:pointer; gap:12px; align-items:flex-start; padding:12px; border:1px solid var(--pop-line2); border-radius:4px; color:var(--pop-ink); text-decoration:none; }
.tm-choose a:hover, .tm-choose button:hover { border-color:var(--pop-blue); }
.tm-choose i { font-size:18px; color:var(--pop-blue); margin-top:1px; }
.tm-choose b { display:block; font-size:13px; font-weight:600; }
.tm-choose small { display:block; font-size:12px; color:var(--pop-sub); margin-top:2px; }
.tm-empty { padding:36px 28px; text-align:center; color:var(--tm-sub); }
.tm-empty b { display:block; font-size:16px; color:var(--tm-ink); margin-bottom:6px; }
.tm-empty .acts { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-top:16px; }

/* New portfolio pop-up: choose → model portfolios → one model (2026-10-15) */
#tm-pf-dlg.wide { --dlg-w:960px; height:min(760px, calc(100vh - 64px)); }   /* same box on every browse step: the back arrow never jumps */
/* Frosted (user, 2026-10-15: "this pop-up card should be frosted"). aiq-frost.css already gives .aiq-dlg the glass, but the
   dark shared scrim (rgba 0,0,0,.5) left nothing to blur, so it read as solid: these two get a light scrim and a clearer pane. */
.aiq-scrim:has(+ #tm-pf-dlg), .aiq-scrim:has(+ #tm-wl-dlg) { background:rgba(8,10,14,.24); }
html[data-theme="light"] .aiq-scrim:has(+ #tm-pf-dlg), html[data-theme="light"] .aiq-scrim:has(+ #tm-wl-dlg) { background:rgba(15,17,21,.10); }
#tm-pf-dlg:not(#_):not(#_), #tm-wl-dlg:not(#_):not(#_) { background:rgba(34,34,38,.58) !important; -webkit-backdrop-filter:blur(28px) saturate(180%); backdrop-filter:blur(28px) saturate(180%); }
html[data-theme="light"] #tm-pf-dlg:not(#_):not(#_), html[data-theme="light"] #tm-wl-dlg:not(#_):not(#_) { background:rgba(255,255,255,.62) !important; }
#tm-pf-dlg .tm-choose a, #tm-pf-dlg .tm-choose button, #tm-pf-dlg .tm-mc, #tm-pf-dlg .tm-in { background:rgba(255,255,255,.04) !important; }
html[data-theme="light"] #tm-pf-dlg .tm-choose a, html[data-theme="light"] #tm-pf-dlg .tm-choose button, html[data-theme="light"] #tm-pf-dlg .tm-mc,
html[data-theme="light"] #tm-pf-dlg .tm-in, html[data-theme="light"] #tm-wl-dlg .tm-in { background:rgba(255,255,255,.55) !important; }
#tm-pf-dlg .aiq-dlg-b { min-height:0; overflow:auto; flex:1; }
.tm-back-ic { width:28px; height:28px; margin:0 6px 0 -8px; border:0; border-radius:4px; background:none; color:var(--pop-sub); cursor:pointer; display:grid; place-items:center; flex:none; }
.tm-back-ic:hover { background:var(--pop-hover); color:var(--pop-ink); }
#tm-pf-step.is-list { display:flex; flex-direction:column; overflow:hidden; padding-bottom:0; }
#tm-pf-step.is-list > [data-scroll], #tm-pf-step.is-list > .tm-lib { flex:1; min-height:0; }
[data-scroll] { overflow:auto; }
.tm-mtool { display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.tm-msearch { flex:1; display:flex; align-items:center; gap:8px; height:36px; padding:0 12px; border:1px solid var(--pop-line2); border-radius:4px; color:var(--pop-sub); }
.tm-msearch input { flex:1; border:0 !important; background:transparent !important; color:var(--pop-ink) !important; font:inherit; font-size:13px; outline:none; padding:0; }
.tm-msort { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--pop-sub); }
.tm-msort select { height:36px; border:1px solid var(--pop-line2); border-radius:4px; background:transparent; color:var(--pop-ink); font:inherit; font-size:13px; padding:0 8px; }
.tm-msort option { color:#0A2540; }
/* browse: Library */
.tm-lib { display:grid; grid-template-columns:190px minmax(0,1fr); gap:18px; margin:0 -18px; padding:0 18px; border-top:1px solid var(--pop-line); }
.tm-lib-rail { display:flex; flex-direction:column; gap:2px; padding:10px 0; overflow:auto; }
.tm-lib-rail button { display:flex; align-items:center; gap:8px; border:0; background:none; color:var(--pop-sub); font:inherit; font-size:13px; text-align:left; padding:7px 10px; border-radius:4px; cursor:pointer; }
.tm-lib-rail button span { flex:1; }
.tm-lib-rail button em { font-style:normal; font-size:11.5px; color:var(--pop-sub); opacity:.8; }
.tm-lib-rail button:hover { background:var(--pop-hover); color:var(--pop-ink); }
.tm-lib-rail button.on { background:color-mix(in srgb, var(--pop-blue) 16%, transparent); color:var(--pop-ink); font-weight:600; }
.tm-lib-main { padding:12px 2px 16px; min-height:0; }
.tm-lib-main.solo { margin:0 -18px; padding:12px 18px 16px; border-top:1px solid var(--pop-line); }
.tm-lib-h { display:flex; align-items:baseline; gap:10px; margin:2px 0 10px; }
.tm-lib-h b { font-size:14px; font-weight:600; } .tm-lib-h span { font-size:12px; color:var(--pop-sub); } .tm-lib-h .tm-lnk:last-child { margin-left:auto; }
.tm-mgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:10px; }
.tm-mc { display:flex; flex-direction:column; gap:8px; padding:12px; border:1px solid var(--pop-line2); border-radius:4px; color:var(--pop-ink); font:inherit; text-align:left; cursor:pointer; min-width:0; }
.tm-mc:hover { border-color:var(--pop-blue); }
.tm-mc .h { display:flex; align-items:center; gap:10px; min-width:0; }
.tm-mc .h svg { flex:none; }
.tm-mc .h div { min-width:0; } .tm-mc .h b { display:block; font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-mc .h small { display:block; font-size:11px; color:var(--pop-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-mc p { margin:0; font-size:12px; color:var(--pop-sub); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:34px; }
.tm-mc .s { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; border-top:1px solid var(--pop-line); padding-top:8px; font-size:12.5px; }
.tm-mc .s small { display:block; font-size:10.5px; color:var(--pop-sub); }
.tm-mc .s b { font-weight:600; }
/* one model */
.tm-mdet { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr); gap:26px; padding-bottom:16px; }
.tm-mcat { display:inline-block; font-size:11px; font-weight:600; padding:2px 8px; border-radius:999px; background:color-mix(in srgb, var(--c) 18%, transparent); color:var(--pop-ink); margin-bottom:8px; }
.tm-mdet-r { border-left:1px solid var(--pop-line); padding-left:24px; }
.tm-mform-t { font-size:14px; font-weight:600; }
.tm-mform-s { color:var(--pop-sub); font-size:12px; margin-top:-6px; }
/* (the browse .tm-mtool rule above sets its margin) */
.tm-mtag { margin:0 0 12px; color:var(--pop-sub); }
.tm-mstats { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; padding:12px 0; border-top:1px solid var(--pop-line); border-bottom:1px solid var(--pop-line); }
.tm-mstats small { display:block; font-size:11px; color:var(--pop-sub); margin-bottom:2px; }
.tm-mstats b { font-size:14px; font-weight:600; }
.tm-mhold { display:grid; grid-template-columns:120px minmax(0,1fr); gap:20px; align-items:center; padding:16px 0; }
.tm-mleg { display:grid; grid-template-columns:8px minmax(0,1fr) auto; gap:4px 8px; align-items:center; font-size:12.5px; max-width:300px; }
.tm-mleg i { width:8px; height:8px; border-radius:2px; }
.tm-mleg span { color:var(--pop-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-mleg b { font-weight:600; text-align:right; }
.tm-mtop { grid-column:1 / -1; margin-top:6px; font-size:12px; }
.tm-mform { display:grid; gap:12px; }
.tm-mform label > span { display:block; font-size:12px; font-weight:550; color:var(--pop-sub); margin-bottom:4px; }
.tm-mf2 { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
.tm-merr { color:var(--pop-red, #F73463); font-size:12.5px; }
@media (max-width:900px) { .tm-mdet { grid-template-columns:minmax(0,1fr); } .tm-mdet-r { border-left:0; padding-left:0; border-top:1px solid var(--pop-line); padding-top:16px; }
  .tm-lib { grid-template-columns:minmax(0,1fr); } .tm-lib-rail { flex-direction:row; overflow-x:auto; padding:8px 0 0; } .tm-lib-rail button { white-space:nowrap; } }
@media (max-width:767px) { .tm-mstats { grid-template-columns:repeat(2, minmax(0,1fr)); } .tm-mhold { grid-template-columns:minmax(0,1fr); justify-items:center; }
  .tm-mf2 { grid-template-columns:minmax(0,1fr); } }

/* New portfolio pop-up: Paper portfolio + Import from your broker steps (mystocks-import.js, 2026-10-16) */
#tm-pf-dlg.mid { --dlg-w:600px; }
.tm-pro { font-style:normal; font-size:10.5px; font-weight:600; padding:1px 6px; border-radius:999px; margin-left:6px; vertical-align:1px;
          background:color-mix(in srgb, var(--pop-blue) 18%, transparent); color:var(--pop-blue); }
.tm-flbl { display:block; font-size:12px; font-weight:550; color:var(--pop-sub); margin-bottom:4px; }
.tm-mform label > span em, .tm-flbl em { font-style:normal; font-weight:400; opacity:.8; margin-left:4px; }
.tm-seg.tm-cash, .tm-seg.tm-src, .tm-seg.tm-bk-mode { display:flex; background:transparent; border-color:var(--pop-line2); }
.tm-seg.tm-cash label { flex:1; position:relative; }
.tm-seg.tm-cash input { position:absolute; opacity:0; pointer-events:none; }
.tm-seg.tm-cash span, .tm-seg.tm-src button, .tm-seg.tm-bk-mode button { display:flex; align-items:center; justify-content:center; gap:6px; height:30px; padding:0 12px;
          border:0; border-radius:3px; background:none; color:var(--pop-sub); font:inherit; font-size:12.5px; font-weight:550; cursor:pointer; white-space:nowrap; }
.tm-seg.tm-src button, .tm-seg.tm-bk-mode button { flex:1; }
.tm-seg.tm-cash input:checked + span, .tm-seg.tm-src button.on, .tm-seg.tm-bk-mode button.on { background:color-mix(in srgb, var(--pop-blue) 18%, transparent); color:var(--pop-ink); box-shadow:none; }
.tm-seg.tm-cash input:focus-visible + span { outline:2px solid var(--pop-blue); }
.tm-pp-q { margin-bottom:8px; }
.tm-pp-empty { font-size:12.5px; color:var(--pop-sub); padding:10px 12px; border:1px dashed var(--pop-line2); border-radius:4px; }
.tm-pp-list { max-height:260px; overflow:auto; }
.aiq-tbl.tm-pp-t, .aiq-tbl.tm-pv-t { width:100%; }
.tm-pp-t td, .tm-pp-t th, .tm-pv-t td, .tm-pv-t th { background:transparent !important; }
.tm-pp-t td b { font-weight:600; }
.tm-pp-lg { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:4px; overflow:hidden; vertical-align:middle; margin-right:8px;
            background:var(--pop-hover); font-size:10px; font-weight:700; color:var(--pop-sub); position:relative; }
.tm-pp-lg::before { content:attr(data-l); position:absolute; }
.tm-pp-lg img { width:100%; height:100%; object-fit:contain; position:relative; background:#fff; }
.tm-pp-w { width:64px !important; height:26px !important; text-align:right; font-variant-numeric:tabular-nums; }
.tm-pp-t td i { font-style:normal; color:var(--pop-sub); margin-left:4px; }
.tm-pp-t tfoot td { font-size:12px; color:var(--pop-sub); border-bottom:0; }
.tm-pp-x { width:24px; height:24px; border:0; border-radius:4px; background:none; color:var(--pop-sub); cursor:pointer; display:inline-grid; place-items:center; }
.tm-pp-x:hover { background:var(--pop-hover); color:var(--pop-ink); }
.tm-pp-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:4px; }
.tm-pp-foot .aiq-btn { height:34px; }
.tm-paper { padding-bottom:18px; }
/* pick your broker */
.tm-bk-priv { display:flex; gap:8px; align-items:center; font-size:12px; color:var(--pop-sub); margin:-4px 0 10px; }
.tm-bk-priv i { color:var(--pop-blue); }
.tm-bk-body { flex:1; min-height:0; margin:0 -18px; padding:4px 18px 18px; border-top:1px solid var(--pop-line); }
.tm-bk-grp { margin-top:14px; }
.tm-bk-grp > b { display:block; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; color:var(--pop-sub); margin-bottom:8px; }
.tm-bk-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:8px; }
.tm-bk { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--pop-line2); border-radius:4px; background:rgba(255,255,255,.04);
         color:var(--pop-ink); font:inherit; text-align:left; cursor:pointer; min-width:0; }
html[data-theme="light"] .tm-bk { background:rgba(255,255,255,.55); }
.tm-bk:hover { border-color:var(--pop-blue); }
.tm-bk-m { flex:none; width:30px; height:30px; border-radius:4px; display:grid; place-items:center; font-size:13px; font-weight:700;
           background:color-mix(in srgb, var(--pop-blue) 14%, transparent); color:var(--pop-ink); }
.tm-bk-n { min-width:0; }
.tm-bk-n b { display:block; font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-bk-n small { display:flex; align-items:center; gap:4px; font-size:11.5px; color:var(--pop-sub); }
.tm-bk-n small.k-live { color:var(--tb-pos, #43D1A7); }
/* one broker */
.tm-bk-mode { margin-bottom:14px; max-width:420px; }
.tm-bg { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr); gap:26px; padding-bottom:16px; }
.tm-bg-r { border-left:1px solid var(--pop-line); padding-left:24px; display:flex; flex-direction:column; gap:10px; }
.tm-bg-l .tm-mform-t { display:block; margin-bottom:4px; }
.tm-bg-meta { font-size:12px; color:var(--pop-sub); margin-bottom:12px; }
.tm-bg-meta a, .tm-bg-steps a, .tm-bg-tip a, .tm-ib-b a, .tm-bg-foot a { color:var(--pop-blue); text-decoration:none; }
.tm-bg-steps { list-style:decimal; margin:0 0 12px; padding-left:20px; font-size:13px; line-height:1.6; color:var(--pop-sub); }
.tm-bg-steps li { margin-bottom:6px; } .tm-bg-steps b, .tm-ib-b b { color:var(--pop-ink); font-weight:600; }
.tm-bg-steps code, .tm-ib-b code { font-size:11.5px; font-weight:600; padding:1px 5px; border-radius:4px; background:var(--pop-hover); color:var(--pop-ink); }
.tm-bg-tip { display:flex; gap:8px; font-size:12.5px; color:var(--pop-sub); line-height:1.5; margin-top:8px; }
.tm-bg-tip i { color:var(--pop-blue); margin-top:2px; flex:none; }
.tm-bg-tip.warn { margin:0 0 12px; } .tm-bg-tip.warn i { color:#FF862E; }
.tm-drop { display:block; border:2px dashed var(--pop-line2); border-radius:4px; padding:30px 18px; text-align:center; color:var(--pop-sub); cursor:pointer; font-size:13px; }
.tm-drop[hidden], [data-pastebox][hidden] { display:none; }
.tm-drop:hover, .tm-drop.over { border-color:var(--pop-blue); color:var(--pop-ink); }
.tm-drop i { display:block; font-size:24px; color:var(--pop-blue); margin-bottom:6px; }
.tm-drop b { color:var(--pop-ink); font-weight:600; }
.tm-drop small { display:block; font-size:12px; margin-top:4px; }
.aiq-dlg .tm-in.tm-paste { height:auto; padding:8px 10px; font:12px/1.5 ui-monospace, Menlo, monospace; resize:vertical; }
.tm-bg-foot { margin:0; font-size:12px; color:var(--pop-sub); line-height:1.5; }
.tm-reading { margin-top:6px; }
/* IBKR walkthrough */
.tm-ib-h { display:flex; align-items:baseline; gap:10px; margin-bottom:8px; }
.tm-ib-h span { font-size:11px; font-weight:600; color:var(--pop-blue); text-transform:uppercase; letter-spacing:.04em; }
.tm-ib-h b { font-size:14px; font-weight:600; }
.tm-ib-dots { display:flex; gap:4px; margin-bottom:12px; }
.tm-ib-dots button { flex:1; height:4px; border:0; border-radius:999px; background:var(--pop-line2); cursor:pointer; padding:0; }
.tm-ib-dots button.done { background:color-mix(in srgb, var(--pop-blue) 45%, transparent); }
.tm-ib-dots button.on { background:var(--pop-blue); }
.tm-ib-b { font-size:13px; line-height:1.6; color:var(--pop-sub); margin-bottom:12px; }
.tm-ib-b ol { list-style:decimal; padding-left:20px; margin:6px 0; }
.tm-ib-b .cx-note { margin-top:8px; padding:8px 10px; border-radius:4px; background:var(--pop-hover); font-size:12.5px; }
.tm-ib-b .cx-n, .tm-ib-mock .cx-n { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; background:#455DDC; color:#fff; font-size:10.5px; font-weight:700; vertical-align:1px; }
.tm-ib-b .cx-copy { cursor:pointer; } .tm-ib-b .cx-copy.ok { color:var(--tb-pos, #43D1A7); }
.tm-ib-shot { display:block; border:1px solid var(--pop-line2); border-radius:4px; overflow:hidden; background:#fff; }
.tm-ib-shot img { display:block; width:100%; height:auto; }
.tm-ib-mock { border:1px solid #d9dde5; border-radius:4px; background:#fff; color:#222631; font-size:12.5px; padding:0 0 12px; }
.tm-ib-mock .h { padding:10px 14px; border-bottom:1px solid #eceef2; font-weight:600; margin-bottom:8px; }
.tm-ib-mock .row, .tm-ib-mock .kv { display:flex; align-items:center; gap:8px; padding:5px 14px; }
.tm-ib-mock .kv > span:first-child { width:140px; color:#4b5163; } .tm-ib-mock .kv b { font-weight:500; }
.tm-ib-mock .cb { width:16px; height:16px; border-radius:3px; background:#1756cd; color:#fff; display:grid; place-items:center; font-size:11px; }
.tm-ib-mock .mbtn { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border:1px solid #c5cad6; border-radius:4px; }
.tm-ib-mock .hl { outline:2px solid #455DDC; outline-offset:1px; border-radius:4px; width:max-content; }
.tm-ib-nav { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:12px; }
.tm-ib-nav .aiq-btn[disabled] { opacity:.4; cursor:default; }
.tm-ib-done { font-size:12.5px; font-weight:600; color:var(--pop-ink); }
.tm-ib-help { margin-top:14px; font-size:12.5px; color:var(--pop-sub); }
.tm-ib-help summary { cursor:pointer; display:flex; align-items:center; gap:6px; }
.tm-ib-help dt { color:var(--pop-ink); font-weight:600; margin-top:8px; } .tm-ib-help dd { margin:2px 0 0; }
.tm-hint { display:block; font-size:11.5px; color:var(--pop-sub); margin-top:4px; }
.tm-hint .tm-lnk { font-size:11.5px; color:var(--pop-blue); }
/* preview + columns */
.tm-pv { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr); gap:26px; padding-bottom:16px; }
.tm-pv-r { border-left:1px solid var(--pop-line); padding-left:24px; align-content:start; }
.tm-pv-h { display:flex; align-items:baseline; gap:10px; margin-bottom:8px; }
.tm-pv-h b { font-size:14px; font-weight:600; } .tm-pv-h span { font-size:12px; color:var(--pop-sub); } .tm-pv-h .tm-lnk { margin-left:auto; color:var(--pop-blue); }
.tm-pv-warn { font-size:12px; color:#FF862E; margin:0 0 8px; line-height:1.5; }
.tm-pv-tbl { max-height:440px; overflow:auto; }
.tm-pv-t small { display:block; font-size:11px; color:var(--pop-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:240px; }
.tm-pv-sym { width:96px !important; height:26px !important; font-weight:600; }
.tm-flag { font-size:10.5px; font-weight:600; padding:1px 6px; border-radius:999px; margin-left:6px; background:var(--pop-hover); color:var(--pop-sub); }
.tm-flag.warn { background:color-mix(in srgb, #FF862E 18%, transparent); color:#FF862E; }
.tm-pv-hint { font-size:12px; color:var(--pop-sub); margin-top:-4px; }
.tm-pv-sub { margin:0 0 12px; font-size:13px; color:var(--pop-sub); }
.tm-pv-none { padding:24px 0; } .tm-pv-none b { display:block; color:var(--pop-ink); margin-bottom:4px; }
.tm-map { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.tm-map label > span { display:block; font-size:12px; font-weight:550; color:var(--pop-sub); margin-bottom:4px; }
.tm-map-tbl { overflow:auto; max-height:300px; margin-bottom:10px; }
.tm-map-tbl .hl { background:color-mix(in srgb, var(--pop-blue) 14%, transparent) !important; }
@media (max-width:900px) { .tm-bg, .tm-pv { grid-template-columns:minmax(0,1fr); }
  .tm-bg-r, .tm-pv-r { border-left:0; padding-left:0; border-top:1px solid var(--pop-line); padding-top:16px; }
  .tm-map { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
@media (max-width:767px) { .tm-bk-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .tm-seg.tm-cash { overflow-x:auto; } }

/* a list's dashboard in a large pop-up on /my-stocks (2026-10-15) */
#tm-term-dlg { --dlg-w:1480px; width:min(1480px, calc(100vw - 40px)); height:calc(100vh - 40px); max-height:none; }
#tm-term-dlg:not(#_):not(#_) { background:rgba(26,26,30,.86) !important; }
html[data-theme="light"] #tm-term-dlg:not(#_):not(#_) { background:rgba(244,246,249,.9) !important; }
.aiq-scrim:has(+ #tm-term-dlg) { background:rgba(8,10,14,.32); }
html[data-theme="light"] .aiq-scrim:has(+ #tm-term-dlg) { background:rgba(15,17,21,.14); }
.tm-term-h { display:flex; align-items:center; gap:12px; padding:14px 18px 10px; }
.tm-term-t { flex:1; min-width:0; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.tm-term-t .tm-pick-btn { font-size:20px; color:var(--pop-ink); }
.tm-term-t small { font-size:12.5px; color:var(--pop-sub); }
.tm-term-h .tm-btn { height:30px; font-size:12.5px; background:transparent; border-color:var(--pop-line2); color:var(--pop-ink); }
#tm-term-body { padding:4px 18px 18px; flex:1; min-height:0; overflow:auto; background:none; }
#tm-term-body .tm-c { box-shadow:none; }

/* new-watchlist dialog field (the dialog itself is the Quiet kit) */
.aiq-dlg .tm-in { width:100%; height:34px; box-sizing:border-box; padding:0 10px; border-radius:4px; border:1px solid var(--pop-line2) !important;
                  background:var(--pop-bg) !important; color:var(--pop-ink) !important; font:inherit; font-size:13px; outline:none; }
.aiq-dlg .tm-in:focus { border-color:var(--pop-blue) !important; }

/* ── Terminal ── */
.tm-crumb { font-size:13px; color:var(--tm-sub); margin-bottom:4px; }
.tm-crumb a { color:var(--tm-sub); text-decoration:none; } .tm-crumb a:hover { color:var(--tm-blue); }
.tm-pick { position:relative; display:inline-flex; align-items:center; }
.tm-pick select { appearance:none; -webkit-appearance:none; border:0; background:transparent; font:inherit; font-size:23px; font-weight:650;
                  letter-spacing:-.01em; color:var(--tm-ink); padding:0 24px 0 0; cursor:pointer; max-width:60vw; }
.tm-pick select option, .tm-pick select optgroup { font-size:14px; color:#0A2540; background:#fff; }
.tm-pick:not(:has(.tm-pick-btn))::after { content:'▾'; position:absolute; right:4px; top:50%; transform:translateY(-50%); color:var(--tm-mute); font-size:14px; pointer-events:none; }
/* the switcher's button + its menu, which drops straight down (aiqTerminal.pick) */
.tm-pick-btn { display:inline-flex; align-items:center; gap:8px; border:0; background:transparent; padding:2px 6px; margin-left:-6px; border-radius:4px;
               font:inherit; font-size:23px; font-weight:650; letter-spacing:-.01em; color:var(--tm-ink); cursor:pointer; max-width:60vw; }
.tm-pick-btn span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-pick-btn i { font-size:14px; color:var(--tm-mute); flex:none; }
.tm-pick-btn:hover { background:color-mix(in srgb, currentColor 7%, transparent); }
.tm-pick-btn[aria-expanded="true"] i { transform:rotate(180deg); }
.tm-pick-menu { z-index:var(--z-dlg-top); min-width:220px; overflow-y:auto; }
.tm-pick-menu .aiq-menu-lbl:not(:first-child) { margin-top:4px; }
.tm-kind { font-size:12.5px; color:var(--tm-mute); }
.tm-tabs { display:flex; gap:26px; border-bottom:1px solid var(--tm-line); margin:0 0 16px; }
.tm-tabs button { background:none; border:0; font:inherit; font-size:14px; color:var(--tm-sub); padding:8px 0 11px; cursor:pointer; }
.tm-tabs button.on { color:var(--tm-ink); font-weight:600; box-shadow:inset 0 -2px var(--tm-ink); }
.tm-mt { margin-top:14px; }
.tm-legend { display:flex; gap:16px; flex-wrap:wrap; font-size:13px; color:var(--tm-sub); margin:-4px 0 10px; }
.tm-legend b { font-weight:600; }
.tm-chart { position:relative; height:330px; }
.tm-chart svg { display:block; }
.tm-chart text { font:10.5px Inter, sans-serif; fill:var(--tm-mute); font-variant-numeric:tabular-nums; }
.tm-tip { position:absolute; pointer-events:none; background:var(--tm-tip); color:#fff; border-radius:4px; padding:7px 10px; font-size:11.5px;
          line-height:1.5; display:none; white-space:nowrap; box-shadow:0 8px 20px -8px rgba(10,37,64,.5); z-index:2; }
.tm-tip .d { color:#A0A9C0; font-size:10.5px; }
.tm-tip i { display:inline-block; width:2px; height:10px; margin-right:6px; vertical-align:-1px; }
.tm-back { border:1px solid var(--tm-line); background:var(--tm-card); border-radius:4px; padding:3px 9px; font:inherit; font-size:12px; color:var(--tm-sub); cursor:pointer; }
.tm-dots { display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--tm-mute); margin-top:8px; }
.tm-dot { display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:6px; vertical-align:1px; }

.tm-nm { display:flex; align-items:center; gap:10px; min-width:0; overflow:hidden; }
.tm-nm > div { min-width:0; overflow:hidden; }
.tm-nm b { display:block; font-weight:600; font-size:13px; }
.tm-nm small { display:block; color:var(--tm-mute); font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* why it moved */
.tm-why { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:14px; }
.tm-wc { border:1px solid var(--tm-line); border-radius:4px; padding:16px; cursor:pointer; display:flex; flex-direction:column; background:var(--tm-card); min-width:0; }
.tm-wc:hover { border-color:color-mix(in srgb, var(--tm-blue) 35%, var(--tm-line)); }
.tm-wc .top { display:flex; align-items:center; gap:10px; }
.tm-wc .top .tm-logo { width:34px; height:34px; }
.tm-wc .top b { display:block; font-size:14px; font-weight:600; }
.tm-wc .top small { display:block; color:var(--tm-mute); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-verdict { margin-top:12px; font-size:15px; font-weight:600; color:var(--tm-ink); letter-spacing:-.01em; }
.tm-verdict span { display:block; font-size:12.5px; font-weight:500; color:var(--tm-sub); margin-top:1px; letter-spacing:0; }
.tm-bar { display:grid; grid-template-columns:96px minmax(0,1fr) 54px; gap:10px; align-items:center; font-size:12px; color:var(--tm-sub); padding:2px 0; }
.tm-bar span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-bar i { height:6px; background:var(--tm-row); border-radius:3px; position:relative; }
.tm-bar i b { position:absolute; top:0; bottom:0; border-radius:3px; }
.tm-bar i::after { content:''; position:absolute; left:50%; top:-3px; bottom:-3px; width:1px; background:var(--tm-mute); opacity:.6; }
.tm-bar em { font-style:normal; text-align:right; font-weight:600; }
.tm-hl { display:block; font-size:12.5px; line-height:1.4; color:var(--tm-ink); text-decoration:none; padding:5px 0; border-bottom:1px solid var(--tm-row); }
.tm-hl:last-child { border-bottom:0; }
a.tm-hl:hover { color:var(--tm-blue); }
.tm-hl span { color:var(--tm-mute); font-size:11.5px; margin-right:8px; }

/* signals */
.tm-sg { font-weight:600; font-size:12.5px; white-space:nowrap; }
.tm-sg.pos { color:var(--tm-pos); } .tm-sg.neg { color:var(--tm-neg); } .tm-sg.neu { color:var(--tm-sub); font-weight:500; }
.tm-sg::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:6px; vertical-align:1px; background:currentColor; opacity:.85; }
.tm-sr { display:grid; grid-template-columns:70px minmax(0,1fr); gap:4px 10px; align-items:center; padding:6px 0; font-size:12.5px; }
.tm-sr > span { color:var(--tm-sub); }
.tm-sr em { grid-column:2; font-style:normal; font-size:12px; }
.tm-sb { display:flex; height:7px; border-radius:4px; overflow:hidden; gap:2px; }
.tm-sb b.pos { background:#43D1A7; } .tm-sb b.neu { background:var(--tm-row); } .tm-sb b.neg { background:#F73463; }

/* donut */
.tm-dn { display:grid; justify-items:center; gap:16px; }
.tm-dn svg text { font-family:Inter, sans-serif; font-variant-numeric:tabular-nums; }
.tm-dl { display:grid; grid-template-columns:9px minmax(0,1fr) auto auto; gap:5px 8px; align-items:center; font-size:12.5px; width:100%; }
.tm-dl i { width:9px; height:9px; border-radius:3px; }
.tm-dl > span { color:var(--tm-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-dl .w { font-weight:600; text-align:right; color:var(--tm-ink); }
.tm-dl .d { text-align:right; min-width:52px; }

/* coming up + activity */
.tm-cu { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:12px; align-items:center; padding:8px 0; border-bottom:1px solid var(--tm-row); cursor:pointer; }
.tm-cu:last-child { border-bottom:0; }
.tm-dt { text-align:center; border:1px solid var(--tm-line); border-radius:4px; line-height:1.1; padding:4px 0; }
.tm-dt small { display:block; font-size:10px; color:var(--tm-mute); text-transform:uppercase; font-weight:600; }
.tm-dt b { font-size:15px; font-weight:600; }
.tm-cu .w2 { font-size:12px; color:var(--tm-mute); }
.tm-er { display:grid; grid-template-columns:40px minmax(0,1fr); gap:10px; padding:8px 0; border-bottom:1px solid var(--tm-row); font-size:12.5px; }
.tm-er:last-child { border-bottom:0; }
.tm-er .tm-dt b { font-size:14px; }
.tm-er .hd { display:flex; align-items:center; gap:6px; margin-bottom:1px; }
.tm-er .hd img { width:16px; height:16px; border-radius:3px; background:#fff; object-fit:contain; }
.tm-er .hd b { font-weight:650; cursor:pointer; }
.tm-er a { color:var(--tm-ink); text-decoration:none; } .tm-er a:hover { color:var(--tm-blue); }
.tm-er .m { color:var(--tm-sub); font-size:11.5px; }
.tm-tag { font-size:10.5px; font-weight:600; padding:1px 6px; border-radius:999px; background:color-mix(in srgb, var(--c) 14%, transparent); color:var(--c); }
.tm-tbl-wrap { overflow-x:auto; }
.tm-tbl-wrap .aiq-tbl tr[data-t] { cursor:pointer; }
.tm-tbl-wrap .tk { display:flex; align-items:center; gap:7px; }
.tm-tbl-wrap .tk img { width:18px; height:18px; border-radius:4px; background:#fff; object-fit:contain; }
.tm-tbl-wrap .tk em { font-style:normal; color:var(--tm-sub); max-width:150px; overflow:hidden; text-overflow:ellipsis; }
.tm-note { color:var(--tm-sub); font-size:13px; padding:6px 0; }
.tm-skel-chart { height:330px; }

@media (max-width:767px) {
  .tm-c { padding:14px; }
  .tm-grid { grid-template-columns:minmax(0,1fr); }
  .tm-tabs { gap:18px; overflow-x:auto; }
  .tm-chart, .tm-skel-chart { height:240px; }
  .tm-pick select, .tm-pick-btn { font-size:20px; }
}

/* ── Terminal tabs (2026-10-16: "really clean, cutting edge, lots of white space… nice graphs") ── */
.tm-pane { display:block; }
.tm-ov { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,320px); gap:20px; align-items:stretch; }
.tm-two { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; }
.tm-news { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr); gap:20px; align-items:start; }
.tm-stack { display:grid; gap:20px; }
.tm-mt { margin-top:20px; }
.tm-flush { padding:6px 0 4px; }
.tm-hero .tm-ch { margin-bottom:6px; }
.tm-subj .tm-pick-btn { font-size:16px; font-weight:600; letter-spacing:-.01em; padding:2px 6px; }
.tm-subj .tm-pick-btn i { font-size:12px; }
.tm-legend { margin:0 0 14px; }
.tm-legend span { display:inline-flex; align-items:center; gap:7px; }
.tm-sw { display:inline-block; width:14px; height:2.5px; border-radius:2px; background:var(--tm-blue); }
.tm-sw.d { background:none; border-top:1.5px dashed var(--tm-mute); height:0; }
/* key facts: label left, value right, generous rows, no rules */
.tm-kv { margin:0; display:grid; gap:2px; }
.tm-kv > div { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:9px 0; }
.tm-kv dt { color:var(--tm-sub); font-size:13px; }
.tm-kv dd { margin:0; font-size:14px; font-weight:600; text-align:right; white-space:nowrap; }
.tm-facts .tm-ch h2 { font-size:15px; }
.tm-bars { margin:12px 0 8px; }
.tm-wc .tm-hl { margin-top:auto; border:0; padding-top:10px; color:var(--tm-sub); }
.tm-wc .tm-hl:hover { color:var(--tm-blue); }
/* today's map */
.tm-tree { position:relative; height:268px; border-radius:4px; overflow:hidden; }
.tm-tc { position:absolute; box-sizing:border-box; border:2px solid var(--tm-card); border-radius:4px; padding:6px 8px; overflow:hidden; cursor:pointer;
         display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; line-height:1.2; }
.tm-tc b { font-size:12.5px; font-weight:650; color:var(--tm-ink); }
.tm-tc span { font-size:11.5px; color:var(--tm-ink); opacity:.85; }
.tm-tc:hover { filter:brightness(1.12); }
.tm-scale { display:inline-flex; gap:2px; } .tm-scale i { width:14px; height:8px; border-radius:2px; }
.tm-scale-l { font-size:11px; color:var(--tm-mute); }
.tm-dn { grid-template-columns:auto minmax(0,1fr); align-items:center; justify-items:start; gap:28px; min-height:268px; }
.tm-dl { grid-template-columns:9px minmax(0,1fr) auto; gap:9px 10px; font-size:13px; }
/* news */
.tm-nws { display:grid; gap:4px; }
.tm-nw { display:grid; grid-template-columns:32px minmax(0,1fr); gap:14px; align-items:start; padding:11px 0; color:inherit; text-decoration:none; }
.tm-nw .tm-logo { width:32px; height:32px; }
.tm-nw b { display:block; font-size:14px; font-weight:550; line-height:1.4; color:var(--tm-ink); }
.tm-nw small { display:block; margin-top:3px; font-size:12px; color:var(--tm-mute); }
.tm-nw:hover b { color:var(--tm-blue); }
.tm-cu { border-bottom:0; padding:7px 0; }
.tm-er { border-bottom:0; padding:7px 0; }
/* fuller Overview (2026-10-16) */
.tm-three { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:20px; }
.tm-perf { width:100%; border-collapse:collapse; font-size:13px; }
.tm-perf th { font-size:11.5px; font-weight:600; color:var(--tm-mute); text-align:right; padding:0 0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:110px; }
.tm-perf td { padding:8px 0; text-align:right; font-weight:600; }
.tm-perf td:first-child, .tm-perf th:first-child { text-align:left; color:var(--tm-sub); font-weight:500; }
html[data-theme="light"] .tm-perf th { background:none !important; }
html[data-theme="light"] .tm-perf tbody tr, html[data-theme="light"] .tm-perf td { background:none !important; }
.tm-lbl2 { font-size:11.5px; font-weight:600; color:var(--tm-mute); margin:2px 0 4px; }
.tm-lbl2 ~ .tm-lbl2 { margin-top:12px; }
.tm-mv { display:grid; grid-template-columns:28px minmax(0,1fr) auto 66px; gap:10px; align-items:center; padding:5px 0; cursor:pointer; }
.tm-mv .tm-logo { width:28px; height:28px; }
.tm-mv b { display:block; font-size:13px; font-weight:600; }
.tm-mv small { display:block; font-size:11.5px; color:var(--tm-mute); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-mv .px { font-size:12.5px; color:var(--tm-sub); }
.tm-mv .tm-pl { text-align:center; }
.tm-mv:hover b { color:var(--tm-blue); }
.tm-sigs { margin-top:10px; padding-top:6px; border-top:1px solid var(--tm-row); }
/* the list chart, trading-platform style */
.tm-legend .d { color:var(--tm-ink); font-weight:600; }
.tm-chart { height:360px; }
/* a focused stock in the chart engine (static/js/aiq-chart.js) */
.tm-chart.is-stock { height:400px; }
.tm-aqc { position:absolute; inset:0; }
.tm-aqc canvas { position:absolute; inset:0; }
.tm-aqc .aqc-top { cursor:crosshair; touch-action:none; }
.tm-aqc .aqc-legends { position:absolute; inset:0; pointer-events:none; }
.tm-aqc .aqc-leg { position:absolute; display:flex; flex-wrap:wrap; gap:4px 10px; align-items:center; }
.tm-aqc .aqc-leg-item { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; color:var(--tm-sub); }
.tm-aqc .aqc-leg-acts { display:none; }
.tm-aqc .aqc-dot { width:7px; height:7px; border-radius:50%; }
.tm-aqc .aqc-text-editor { display:none; }
.tm-aqc-load { position:absolute; inset:0; }
/* the pop-up gets more air */
#tm-term-body .tm-c { padding:22px 24px; }
#tm-term-body .tm-flush { padding:6px 0 4px; }
#tm-term-body .tm-tabs { margin-bottom:22px; }
/* the pane's own width, not the window's: the pop-up and the full page differ (CLAUDE.md "Laptop widths") */
.tm-pane { container:tmpane / inline-size; }
@container tmpane (max-width:860px) { .tm-ov, .tm-news, .tm-two, .tm-three { grid-template-columns:minmax(0,1fr); } }
@media (max-width:767px) {
  .tm-tree { height:220px; }
  .tm-chart { height:260px; }
  .tm-chart.is-stock { height:320px; }
  #tm-term-body .tm-c { padding:16px; }
  .tm-dn { grid-template-columns:minmax(0,1fr); justify-items:center; min-height:0; }
}

/* ── Overview (2026-10-16): draft B "Clean" as first shown (user preferred it to every section in a card) — the
   range's return as the headline, a Trader-Workstation-style chart frame, borderless lists split by hairlines ── */
.tm-m1-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:2px 0 14px; }
.tm-m1-hero .nm { font-size:13.5px; font-weight:550; color:var(--tm-sub); } .tm-m1-hero .nm span { color:var(--tm-mute); font-weight:400; }
.tm-m1 .tm-legend { display:block; margin:4px 0 0; }
.tm-m1 .tm-legend .big { font-size:38px; font-weight:600; letter-spacing:-.025em; line-height:1.1; font-variant-numeric:tabular-nums; }
.tm-m1 .tm-legend .sub { font-size:13px; color:var(--tm-sub); margin-top:6px; }
/* the chart (static/js/aiq-chart.js), framed like a TWS chart window: plot, right axis, footer range bar */
.tm-xc { border:1px solid var(--tm-line); border-radius:4px; background:var(--tm-card); overflow:hidden; }
.tm-xc .tm-chart { position:relative; height:440px; }
.tm-xc .tm-chart.is-stock { height:500px; }
.tm-xbar { display:flex; align-items:center; gap:2px; height:34px; padding:0 8px; border-top:1px solid var(--tm-line); }
.tm-xbar button { background:none; border:0; font:inherit; font-size:12px; font-weight:600; color:var(--tm-mute); padding:3px 9px; border-radius:4px; cursor:pointer; }
.tm-xbar button:hover { color:var(--tm-ink); }
.tm-xbar button.on { color:var(--tm-blue); background:color-mix(in srgb, var(--tm-blue) 14%, transparent); }
.tm-xbar .sp { flex:1; } .tm-xbar .vr { width:1px; height:16px; background:var(--tm-line); margin:0 6px; }
.tm-xbar .tm-subj .tm-pick-btn { font-size:12px; font-weight:600; color:var(--tm-sub); padding:3px 8px; margin:0; }
.tm-xbar .tm-subj .tm-pick-btn:hover { background:none; color:var(--tm-ink); }
.tm-aqc .aqc-head { flex-basis:100%; display:flex; gap:4px 12px; flex-wrap:wrap; align-items:center; font-size:12px; line-height:20px; color:var(--tm-mute);
                    font-variant-numeric:tabular-nums; pointer-events:none; }
.tm-aqc .aqc-head b { color:var(--tm-ink); font-weight:600; margin-left:4px; }
.tm-aqc .aqc-head b.pos { color:var(--tm-pos); } .tm-aqc .aqc-head b.neg { color:var(--tm-neg); }
.tm-aqc .aqc-head .d { color:var(--tm-ink); font-weight:650; letter-spacing:.01em; }
.tm-aqc .aqc-head .tm-sw { margin-right:6px; vertical-align:middle; }
.tm-aqc.is-list .aqc-leg-item { display:none; }          /* the list's readout names both lines; the cmp legend would show an index */
.tm-aqc .aqc-leg-item { height:20px; padding:0 6px; background:none; border:0; }
/* borderless lists */
.tm-m1-cols { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:48px; margin-top:40px; }
.tm-m1s { min-width:0; } .tm-m1s.why, .tm-m1s.news { margin-top:40px; }
.tm-m1s h3 { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:0 0 6px; font-size:15px; font-weight:600; color:var(--tm-ink); }
.tm-m1s h3 > span { font-size:12px; font-weight:500; color:var(--tm-mute); }
.tm-m1s .tm-seg button { padding:1px 8px; font-size:11.5px; }
.tm-li { display:flex; justify-content:space-between; align-items:baseline; gap:16px; padding:11px 0; border-bottom:1px solid var(--tm-row); font-size:13.5px; color:inherit; text-decoration:none; }
.tm-li > span { color:var(--tm-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.tm-li > b { font-weight:600; white-space:nowrap; } .tm-li small { font-size:11.5px; font-weight:500; color:var(--tm-mute); margin-left:6px; }
.tm-li .tk, .tm-wy .tk { color:var(--tm-ink); font-weight:600; margin-right:4px; } .tm-li[data-t] { cursor:pointer; }
.tm-li[data-t]:hover .tk, .tm-wy:hover .tk { color:var(--tm-blue); }
.tm-li.nw > span { color:var(--tm-ink); font-weight:500; } .tm-li.nw > b { color:var(--tm-mute); font-weight:500; font-size:12px; }
.tm-li.nw:hover > span { color:var(--tm-blue); }
.tm-wy { display:grid; grid-template-columns:60px 64px minmax(0,1fr) minmax(0,1.3fr); gap:14px; align-items:baseline; padding:11px 0; border-bottom:1px solid var(--tm-row); font-size:13.5px; cursor:pointer; }
.tm-wy .rd { color:var(--tm-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-wy .hl { color:var(--tm-sub); text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .tm-wy a.hl:hover { color:var(--tm-blue); }
.tm-m1s .tm-sigs { margin:4px 0 0; padding:0; border:0; }
.tm-pnote { padding:12px 0; font-size:13px; color:var(--tm-sub); }
@container tmpane (max-width:860px) {
  .tm-m1-cols { grid-template-columns:minmax(0,1fr); gap:28px; }
  .tm-wy { grid-template-columns:56px 60px minmax(0,1fr); } .tm-wy .hl { grid-column:1 / -1; }
}
@media (max-width:767px) { .tm-xc .tm-chart { height:300px; } .tm-xc .tm-chart.is-stock { height:360px; } .tm-m1 .tm-legend .big { font-size:30px; } }
.tm-aqc .aqc-head .tm-sw.d { border-top:0; height:2px; background:#A0A9C0; }

/* ── the panel at the top of the Overview (user, 2026-10-16): the list's stocks on the left, the selected stock's chart
   on the right. First built "Bloomberg terminal style" (black, amber, caps); the user found that "too close to
   Bloomberg… needs to be more of our own style", so it uses the site's card, line, ink and blue tokens — only the chart
   keeps its neon candles (engine theme 'terminal', dark mode only). ── */
.tq { display:grid; grid-template-columns:minmax(300px,360px) minmax(0,1fr); background:var(--tm-card); border:1px solid var(--tm-line); border-radius:4px;
      overflow:hidden; color:var(--tm-ink); font-variant-numeric:tabular-nums; height:600px; }
.tq .up { color:var(--tm-pos); } .tq .dn { color:var(--tm-neg); } .tq .mute { color:var(--tm-mute); }
.tq em { font-style:normal; }
/* the list */
.tq-list { display:flex; flex-direction:column; min-height:0; border-right:1px solid var(--tm-line); }
.tq-bar { display:flex; align-items:center; gap:10px; height:44px; padding:0 14px; border-bottom:1px solid var(--tm-line); font-size:12.5px; flex:none; }
.tq-bar b { font-size:14px; font-weight:600; color:var(--tm-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tq-bar span { color:var(--tm-mute); white-space:nowrap; } .tq-bar .sp { flex:1; } .tq-bar em { font-weight:600; font-size:12px; }
.tq-r { display:grid; grid-template-columns:minmax(0,1fr) 64px 56px 62px 56px; gap:6px; align-items:center; height:32px; padding:0 14px; font-size:12.5px;
        border-bottom:1px solid var(--tm-row); cursor:pointer; position:relative; }
.tq-r > *:not(b) { text-align:right; } .tq-r b { font-weight:600; color:var(--tm-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tq-r span { color:var(--tm-ink); } .tq-r em { font-weight:550; }
.tq-r.hd { height:30px; cursor:default; font-size:11.5px; flex:none; }
.tq-r.hd > * { color:var(--tm-mute) !important; font-weight:500; }
.tq-r:not(.hd):hover { background:var(--tm-row); }
.tq-r.on { background:color-mix(in srgb, var(--tm-blue) 12%, transparent); } .tq-r.on::before { content:''; position:absolute; left:0; top:0; bottom:0; width:2px; background:var(--tm-blue); }
.tq-r.on b { color:var(--tm-blue); }
.tq-body { overflow-y:auto; min-height:0; flex:1; scrollbar-width:thin; }
/* the chart side */
.tq-chart { display:flex; flex-direction:column; min-width:0; min-height:0; }
.tq-tools { display:flex; align-items:center; gap:8px; padding:6px 10px; border-bottom:1px solid var(--tm-line); flex:none; }
.tq-seg { display:inline-flex; border:1px solid var(--tm-line); border-radius:4px; padding:1px; background:var(--tm-in); }
.tq-seg button { background:none; border:0; color:var(--tm-sub); font:inherit; font-size:12px; font-weight:550; padding:3px 9px; border-radius:3px; cursor:pointer; line-height:1.35; }
.tq-seg button:hover { color:var(--tm-ink); }
.tq-seg button.on { color:var(--tm-ink); background:var(--tm-card); font-weight:650; box-shadow:0 1px 2px rgba(0,0,0,.12); }
.tq-seg button i { font-size:13px; vertical-align:-2px; }
.tq-tools .sp { flex:1; }
.tq-cfg { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 11px; border:1px solid var(--tm-line); border-radius:4px; background:var(--tm-card);
          color:var(--tm-ink); font:inherit; font-size:12.5px; font-weight:550; cursor:pointer; }
.tq-cfg:hover { border-color:var(--tm-blue); color:var(--tm-blue); }
.tq .tm-chart.is-stock { flex:1; height:auto; min-height:0; position:relative; }
.tq .tm-aqc .aqc-head .d { color:var(--tm-ink); }
.tq .tm-aqc-load { background:var(--tm-card); }
.tm-cfg { z-index:var(--z-dlg-top); min-width:230px; max-height:70vh; overflow-y:auto; }
.tm-m1 > .tq + .tm-m1-cols { margin-top:40px; }
@container tmpane (max-width:860px) {
  .tq { grid-template-columns:minmax(0,1fr); height:auto; }
  .tq-list { border-right:0; border-bottom:1px solid var(--tm-line); } .tq-body { max-height:240px; }
  .tq .tm-chart.is-stock { height:380px; flex:none; }
}
.tq-chart { container:tqchart / inline-size; }
.tq-tools { gap:6px; flex-wrap:nowrap; overflow:hidden; }
@container tqchart (max-width:640px) { .tq-cfg span { display:none; } .tq-cfg { padding:0 8px; } .tq-seg button { padding:3px 6px; font-size:11.5px; } }

/* ── the panel = draft C "Sidebar list" (user picked 2026-10-16; the boxed card "doesn't feel… natural within the
   style of the pop-up"): borderless on the pop-up, the list as a side menu of two-line rows, the chart beside it ── */
.tq { background:none; border:0; border-radius:0; height:580px; grid-template-columns:minmax(240px,280px) minmax(0,1fr); gap:20px; }
.tq .tq-list { border-right:0; }
.tq .tq-bar { padding:0 4px; border-bottom:0; height:36px; }
.tq .tq-r { grid-template-columns:minmax(0,1fr) auto 66px; height:46px; padding:0 10px; border:0; border-radius:4px; margin-bottom:2px; }
.tq .tq-r b small { display:block; font-size:11.5px; font-weight:400; color:var(--tm-mute); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.tq .tq-r.on::before { display:none; } .tq .tq-r.on { background:color-mix(in srgb, var(--tm-blue) 13%, transparent); }
.tq .tq-tools { border-bottom:0; padding:0 0 8px; } .tq .tq-seg { background:none; }
@container tmpane (max-width:860px) {
  .tq { grid-template-columns:minmax(0,1fr); height:auto; gap:12px; }
  .tq-body { max-height:260px; } .tq .tm-chart.is-stock { height:380px; flex:none; }
}

/* ── Analytics (2026-10-16: replaces Stocks / Holdings; "really advanced… IBKR trading work terminal style"). First built
   as boxed panels with header bands; the user: "the cards and the style… doesn't fit in with the overview tab and the
   news tab". So: the Overview's borderless sections (15px title, a muted note on the right), dense tables of plain
   tabular numbers split by hairlines, the same white space between sections. ── */
.ta { display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:40px 44px; align-items:start; }
.ta .s3 { grid-column:span 3; } .ta .s4 { grid-column:span 4; } .ta .s5 { grid-column:span 5; } .ta .s6 { grid-column:span 6; }
.ta .s7 { grid-column:span 7; } .ta .s12 { grid-column:span 12; }
.ta-col { display:grid; gap:40px; }
.ta-p { min-width:0; }
.ta-p > header { display:flex; align-items:center; gap:10px; margin:0 0 6px; }
.ta-p > header h3 { margin:0; font-size:15px; font-weight:600; color:var(--tm-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ta-p > header .r { margin-left:auto; display:flex; align-items:center; gap:10px; font-size:12px; color:var(--tm-mute); white-space:nowrap; overflow:hidden; }
.ta-t { width:100%; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; }
.ta-t th { font-size:11.5px; font-weight:500; color:var(--tm-mute); text-align:right; padding:6px 8px; border-bottom:1px solid var(--tm-line); white-space:nowrap; }
.ta-t td { text-align:right; padding:8px 8px; border-bottom:1px solid var(--tm-row); white-space:nowrap; color:var(--tm-ink); font-weight:550; }
.ta-t th:first-child, .ta-t td:first-child { text-align:left; padding-left:0; } .ta-t th:last-child, .ta-t td:last-child { padding-right:0; }
.ta-t td:first-child { color:var(--tm-sub); font-weight:450; }
.ta-t td.pos { color:var(--tm-pos); } .ta-t td.neg { color:var(--tm-neg); } .ta-t td.neu { color:var(--tm-sub); font-weight:450; }
.ta-t.kv td:last-child { font-weight:600; } .ta-t.pos td:first-child b { color:var(--tm-ink); font-weight:600; } .ta-t td em { font-style:normal; color:var(--tm-mute); font-weight:400; margin-left:8px; display:inline-block; max-width:150px; overflow:hidden; text-overflow:ellipsis; vertical-align:bottom; }
.ta-t tr[data-t] { cursor:default; }
.ta-t th[data-sort] { cursor:pointer; user-select:none; } .ta-t th[data-sort]:hover, .ta-t th.on { color:var(--tm-ink); }
.ta-t.heat td { text-align:center; color:var(--tm-ink); font-weight:550; border-bottom:2px solid transparent; } .ta-t.heat td:first-child { text-align:left; font-weight:450; }
.ta-t.heat th { text-align:center; } .ta-t.heat td:not(:first-child) { border-radius:3px; } .ta-t.heat { border-collapse:separate; border-spacing:2px; }
.ta-t.corr td.dg { color:var(--tm-mute); }
html[data-theme="light"] .ta-t th { background:transparent !important; }
html[data-theme="light"] .ta-t tbody tr, html[data-theme="light"] .ta-t td:not([style]) { background:transparent !important; }
/* base.html paints every light-mode table / thead / tbody white (!important): the dashboard's tables sit on the panel,
   as they do in dark mode (user, 2026-10-16: the white behind "At a glance" and Diversifiers "looks pretty ugly") */
html[data-theme="light"] .ta-t, html[data-theme="light"] .ta-t thead, html[data-theme="light"] .ta-t tbody, html[data-theme="light"] .ta-t tfoot { background:transparent !important; }
html[data-theme="light"] .ta-t tr[data-t]:hover td { background:var(--tm-row) !important; }
.ta-scroll { overflow:auto; max-height:460px; }
.ta-ch { height:200px; margin:6px 0 0; position:relative; }
.ta-ch svg { display:block; } .ta-ch text { font:10.5px Inter, sans-serif; fill:var(--tm-mute); font-variant-numeric:tabular-nums; }
.ta-ch .gl { stroke:var(--tm-row); } .ta-ch .ref { stroke:var(--tm-mute); stroke-dasharray:3 3; stroke-opacity:.6; } .ta-ch .xv { stroke:var(--tm-sub); stroke-dasharray:3 3; }
.ta-rd { display:inline-flex; gap:10px; font-variant-numeric:tabular-nums; } .ta-rd span { display:inline-flex; align-items:center; gap:5px; }
.ta-rd i { width:8px; height:2px; display:inline-block; } .ta-rd b { color:var(--tm-ink); font-weight:600; }
.ta-p > .b > .ta-rd { display:flex; flex-wrap:wrap; gap:4px 12px; padding:2px 0 0; font-size:12px; color:var(--tm-sub); min-height:18px; }
.ta-note { padding:12px 0; font-size:13px; color:var(--tm-sub); }
@container tmpane (max-width:860px) { .ta { gap:32px; } .ta > * { grid-column:span 12 !important; } }

/* ── News (2026-10-16: "more in line"): the Overview's side menu + one dense feed ── */
.tq.tn { height:640px; }
.tn .tq-r em { font-weight:600; color:var(--tm-sub); }
.tn .tq-seg small { font-size:10.5px; color:var(--tm-mute); margin-left:2px; font-weight:500; } .tn .tq-seg button.on small { color:var(--tm-sub); }
.tn-feed { flex:1; min-height:0; overflow-y:auto; border-top:1px solid var(--tm-line); }
.tn-r { display:grid; grid-template-columns:48px 52px 64px minmax(0,1fr) auto; gap:10px; align-items:baseline; padding:8px 4px; border-bottom:1px solid var(--tm-row); font-size:12.5px; color:inherit; text-decoration:none; }
.tn-r time { color:var(--tm-mute); font-size:11.5px; } .tn-r b { font-weight:650; color:var(--tm-ink); cursor:pointer; }
.tn-r .tg { justify-self:start; font-size:10.5px; font-weight:600; padding:1px 6px; border-radius:999px; background:color-mix(in srgb, var(--c) 15%, transparent); color:var(--c); white-space:nowrap; }
.tn-r .tt { color:var(--tm-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tn-r em { font-style:normal; color:var(--tm-mute); font-size:11.5px; white-space:nowrap; max-width:180px; overflow:hidden; text-overflow:ellipsis; }
a.tn-r:hover .tt { color:var(--tm-blue); }
@container tmpane (max-width:860px) { .tq.tn { height:auto; } .tn-feed { max-height:520px; } .tn-r { grid-template-columns:46px 50px minmax(0,1fr); } .tn-r .tg, .tn-r em { display:none; } }
.ta-t.kv td:first-child { white-space:normal; }
/* Analytics spacing (2026-10-16: "the text is overlapping, spacing isn't good" — three tables a row didn't fit a ~1000px
   pop-up): a section never spills into the next, and below 1180px the panels go two a row */
.ta-p { overflow:hidden; } .ta-p > .b { min-width:0; }
.ta-t th { white-space:normal; }
@container tmpane (max-width:1180px) {
  .ta { gap:36px 40px; }
  .ta .s4, .ta .s3 { grid-column:span 6; } .ta .s5, .ta .s7, .ta .s6 { grid-column:span 12; }
  .ta .ta-col { grid-column:span 12; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px; }
}
/* News: upcoming events first (2026-10-16), then the recent feed */
.tn-h { font-size:11.5px; font-weight:600; color:var(--tm-mute); padding:12px 4px 4px; border-bottom:1px solid var(--tm-line); }
.tn-h:first-child { padding-top:8px; }
.tn-r.up { cursor:pointer; } .tn-r.up em { color:var(--tm-blue); font-weight:600; }
.tn-more { display:block; width:100%; text-align:left; background:none; border:0; border-bottom:1px solid var(--tm-row); padding:8px 4px; font:inherit; font-size:12.5px; font-weight:600; color:var(--tm-blue); cursor:pointer; }
/* Diversifiers (2026-10-16) */
.ta-sum { font-size:13px; color:var(--tm-sub); margin:2px 0 8px; } .ta-sum b { color:var(--tm-pos); font-weight:650; }
.ta-lk { color:inherit; text-decoration:none; } .ta-lk:hover b { color:var(--tm-blue); }
/* Analytics: the plain part on top (2026-10-16) — best / worst, at a glance, near the 52-week high */
.ta-basic { display:grid; gap:24px; padding-bottom:8px; border-bottom:1px solid var(--tm-line); }
.ta-bh { display:flex; align-items:center; gap:14px; } .ta-bh h3 { margin:0; font-size:17px; font-weight:650; color:var(--tm-ink); }
.ta-bh .tm-seg button { padding:2px 10px; font-size:12px; } .ta-bh .mute { font-size:12.5px; }
.ta-b3 { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:44px; }
.ta-b2 { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:44px; }
.ta-basic .tm-li { padding:9px 0; font-size:13px; } .ta-basic .tm-li small { color:var(--tm-mute); margin-left:4px; font-size:11.5px; }
@container tmpane (max-width:1180px) { .ta-b3 { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .ta-b3 > :last-child { grid-column:span 2; } }
@container tmpane (max-width:860px) { .ta-b3, .ta-b2 { grid-template-columns:minmax(0,1fr); } .ta-b3 > :last-child { grid-column:auto; } }
/* Analytics rows aren't links (2026-10-16): no pointer, no hover tint */
.ta [data-t]:not(#_), .ta [data-t] *:not(a):not(#_) { cursor:default; } .ta-t tr[data-t]:hover td { background:none; }
html[data-theme="light"] .ta-t tr[data-t]:hover td { background:transparent !important; }
.ta .tm-li[data-t]:hover .tk { color:var(--tm-ink); }
/* Diversifiers filter row, Valuation, Dividend income, Overlap, Factor exposure (2026-10-16) */
.ta-dvh { display:flex; align-items:center; gap:14px; margin:0 0 6px; } .ta-dvh .ta-sum { margin:0; flex:1; }
.ta-dvh .tm-seg button { padding:2px 9px; font-size:11.5px; }
.ta-two { display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:44px; align-items:start; }
.ta-div3 { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:44px; align-items:end; margin-bottom:18px; }
.ta-cal { display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:6px; height:140px; align-items:end; }
.ta-cal > div { display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; gap:4px; }
.ta-cal i { display:block; width:100%; max-width:26px; min-height:2px; border-radius:3px 3px 0 0; background:linear-gradient(180deg, var(--tm-blue), color-mix(in srgb, var(--tm-blue) 55%, transparent)); }
.ta-cal span { font-size:11px; color:var(--tm-mute); }
.ta-fx { display:grid; grid-template-columns:96px minmax(0,1fr) 48px; grid-template-rows:auto auto; column-gap:12px; align-items:center; padding:7px 0; border-bottom:1px solid var(--tm-row); font-size:13px; }
.ta-fx > span { color:var(--tm-sub); } .ta-fx > b { text-align:right; font-weight:600; }
.ta-fx > i { position:relative; height:8px; } .ta-fx > i::after { content:''; position:absolute; left:50%; top:-3px; bottom:-3px; width:1px; background:var(--tm-line); }
.ta-fx em { position:absolute; top:0; bottom:0; border-radius:3px; } .ta-fx em.up { background:var(--tm-blue); } .ta-fx em.dn { background:#FF862E; }
.ta-fx small { grid-column:2 / -1; font-size:11.5px; color:var(--tm-mute); margin-top:2px; }
@container tmpane (max-width:1180px) { .ta-two, .ta-div3 { grid-template-columns:minmax(0,1fr); gap:24px; } }
/* editing a watchlist in place (2026-10-16): an add box on top, a × on each row, Done in the bar */
.tq-list.is-ed .tq-r { grid-template-columns:minmax(0,1fr) auto 62px 24px; }
.tq-rm { width:22px; height:22px; border:0; border-radius:4px; background:none; color:var(--tm-mute); display:grid; place-items:center; cursor:pointer; padding:0; font-size:12px; }
.tq-rm:hover { background:color-mix(in srgb, var(--tm-neg) 16%, transparent); color:var(--tm-neg); }
.tq-add { display:flex; align-items:center; gap:8px; margin:2px 0 8px; padding:0 10px; height:36px; border:1px solid var(--tm-line); border-radius:4px; background:var(--tm-card); }
.tq-add:focus-within { border-color:var(--tm-blue); }
.tq-add i { color:var(--tm-mute); font-size:13px; }
.tq-add input { flex:1; min-width:0; border:0 !important; background:none !important; color:var(--tm-ink) !important; font:inherit; font-size:13px; outline:none; padding:0; }
.tq-done { border:0; background:var(--tm-blue); color:#fff; font:inherit; font-size:12px; font-weight:600; padding:3px 12px; border-radius:4px; cursor:pointer; }
/* Attribution + Stress test (2026-10-16, FactSet-style) */
.ta-attr { display:grid; grid-template-columns:minmax(220px,3fr) minmax(0,9fr); gap:44px; align-items:start; }
.ta-t tr.tot td { border-top:1px solid var(--tm-line); font-weight:650; color:var(--tm-ink); }
.ta-stress { display:grid; grid-template-columns:minmax(0,7fr) minmax(0,5fr); gap:44px; align-items:start; }
.ta-stress h4 { margin:0 0 4px; font-size:12px; font-weight:600; color:var(--tm-mute); } .ta-stress h4 ~ h4 { margin-top:18px; }
.ta-stress td em { display:block; margin:1px 0 0; font-size:11.5px; max-width:none; }
@container tmpane (max-width:1180px) { .ta-stress, .ta-attr { grid-template-columns:minmax(0,1fr); gap:24px; } }
.ta-partial { display:flex; align-items:center; gap:8px; } .ta-partial .skel { display:inline-block; width:14px; height:14px; border-radius:50%; flex:none; }

/* ── Trade tab: a paper portfolio's trading workspace (static/js/aiq-trade.js, 2026-10-16). Picked from two rounds of
   drafts ("B is the best"): chart beside the order ticket, Overview cards on a 12-column grid. No buttons inside rows. ── */
#tm-trade { container-type:inline-size; }      /* the panel's width, not the window's (sidebar + rail) */
/* shared */
.tr-up { color:var(--tm-pos); } .tr-dn { color:var(--tm-neg); }
.tr-scroll { overflow-x:auto; }
.tr-t { width:100%; } .tr-t th, .tr-t td { white-space:nowrap; } .tr-t .num { text-align:right; }
.tr-pos tbody tr[data-tr-row] { cursor:pointer; }
.tr-pos tbody tr[data-tr-row]:hover td:first-child b, .tr-pos tbody tr.sel td:first-child b { color:var(--tm-blue); }
.tr-t tr.tr-cash td { color:var(--tm-sub); font-weight:450; }
.tr-t tfoot td { border-top:1px solid var(--tm-line); border-bottom:0; font-weight:650; color:var(--tm-ink); }
.tr-mut { color:var(--tm-mute) !important; font-weight:450 !important; }
.tr-pc { font-size:11px; margin-left:4px; font-weight:500; }
.tr-sy { display:flex; align-items:center; gap:8px; min-width:0; } .tr-sy b { font-weight:600; color:var(--tm-ink); }
.tr-lg { flex:none; width:18px; height:18px; border-radius:4px; overflow:hidden; display:inline-grid; place-items:center; position:relative;
         background:var(--tm-in); font-size:9.5px; font-weight:700; color:var(--tm-sub); }
.tr-lg::before { content:attr(data-l); position:absolute; } .tr-lg.cash::before { content:none; }
.tr-lg img { position:relative; width:100%; height:100%; object-fit:contain; background:#fff; }
.tr-b { border:1px solid var(--tm-line); background:none; color:var(--tm-sub); font:inherit; font-size:12px; font-weight:550; height:24px; padding:0 9px; border-radius:4px; cursor:pointer; }
.tr-b:hover { color:var(--tm-ink); border-color:var(--tm-sub); }
.tr-sd { font-weight:600; } .tr-sd.buy { color:var(--tm-pos); } .tr-sd.sell { color:var(--tm-neg); }
.tr-st { font-weight:550; } .tr-st.filled { color:var(--tm-pos); } .tr-st.rejected { color:var(--tm-neg); } .tr-st.expired, .tr-st.cancelled { color:var(--tm-mute); }
.tr-empty { padding:14px 0; font-size:13px; color:var(--tm-sub); }
.tr-mkt { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--tm-mute); white-space:nowrap; font-weight:500; }
.tr-mkt i { width:6px; height:6px; border-radius:50%; background:var(--tm-mute); } .tr-mkt.on i { background:var(--tm-pos); }
.tr-sm { height:28px; padding:0 10px; font-size:12.5px; }
.tm-btn:disabled, .aiq-btn:disabled { opacity:.45; cursor:default; pointer-events:none; }
/* order entry (shared) */
.tr-tk { display:grid; gap:12px; }
.tr-sym { display:flex; align-items:center; gap:8px; height:32px; padding:0 10px; border:1px solid var(--tm-line); border-radius:4px; background:var(--tm-in); color:var(--tm-mute); }
.tr-sym:focus-within { border-color:var(--tm-blue); }
.tr-sym input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--tm-ink); font:inherit; font-size:13px; font-weight:600; text-transform:uppercase; }
.tr-sym input::placeholder { text-transform:none; font-weight:400; }
[data-tkb] { display:grid; gap:12px; }
.tr-qh { display:grid; gap:2px; } .tr-qh.empty { color:var(--tm-sub); font-size:12.5px; }
.tr-qh-n { display:flex; align-items:center; gap:8px; min-width:0; font-size:12.5px; }
.tr-qh-n b { font-size:14px; font-weight:650; } .tr-qh-n span { color:var(--tm-mute); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tr-qh.c .tr-qh-n .px { margin-left:auto; color:var(--tm-ink); font-weight:650; font-size:13px; }
.tr-qh-p { display:flex; align-items:baseline; gap:10px; margin-top:4px; }
.tr-qh-p b { font-size:22px; font-weight:650; letter-spacing:-.01em; } .tr-qh-p span { font-size:12.5px; font-weight:600; }
.tr-qh-m { font-size:12px; color:var(--tm-mute); }
.tm-seg.tr-side { display:flex; } .tm-seg.tr-side button { flex:1; padding:5px 0; font-size:13px; }
.tm-seg.tr-side button.buy.on { color:var(--tm-pos); } .tm-seg.tr-side button.sell.on { color:var(--tm-neg); }
.tr-form { display:grid; gap:8px; }
.tr-row { display:grid; grid-template-columns:92px minmax(0,1fr); align-items:center; gap:8px; }
.tr-row > label { font-size:12px; color:var(--tm-sub); }
.tr-seg { display:flex !important; width:100%; } .tr-seg > button { flex:1; text-align:center; padding:4px 0; }
.tr-qty { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; } .tr-qty .tr-seg { width:auto; } .tr-qty .tr-seg > button { padding:4px 8px; flex:none; }
.tr-in { width:100%; height:30px; box-sizing:border-box; padding:0 9px; border:1px solid var(--tm-line); border-radius:4px; background:var(--tm-in); color:var(--tm-ink);
         font:inherit; font-size:12.5px; font-variant-numeric:tabular-nums; text-align:right; outline:none; }
.tr-in:focus { border-color:var(--tm-blue); } .tr-in:disabled { opacity:.7; }
.ta-t.tr-kv td { padding:6px 0; font-size:12.5px; } .ta-t.tr-kv td.tr-dn { color:var(--tm-neg); }
.tr-go { width:100%; height:34px; justify-content:center; }
.tr-go.sell { background:var(--tm-neg); border-color:var(--tm-neg); }
.tr-rv { display:grid; gap:10px; }
.tr-rv-h { font-size:14px; font-weight:650; } .tr-rv-h.buy { color:var(--tm-pos); } .tr-rv-h.sell { color:var(--tm-neg); }
.tr-acts { display:flex; gap:8px; } .tr-acts .tm-btn.pri { flex:1; justify-content:center; }
.tr-err { color:var(--tm-neg); font-size:12px; } .tr-note { font-size:12px; color:var(--tm-mute); }

/* Overview cards on a 12-column grid */
.tr-grid { display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:16px; align-items:start; }
.tr-grid > .s4 { grid-column:span 4; } .tr-grid > .s8 { grid-column:span 8; } .tr-grid > .s12 { grid-column:span 12; }
.tr-c .tm-ch { margin-bottom:10px; }
/* light mode: no white card fill (user, 2026-10-16: "should match how dark mode displays things"), hairline only */
html[data-theme="light"] .tm-c.tr-c { background:transparent; }
.tr-c .tm-ch .tm-seg button { padding:3px 10px; }
/* B: chart */
.tr-chc { display:flex; flex-direction:column; align-self:stretch; }
.tr-chc .tr-chart { flex:1; min-height:240px; height:auto; }
.tr-chh { display:flex; align-items:baseline; gap:16px; min-width:0; }
.tr-chh-n { display:flex; align-items:center; gap:8px; font-size:13px; } .tr-chh-n b { font-size:15px; font-weight:650; } .tr-chh-n span { color:var(--tm-mute); }
.tr-chh-p { display:flex; align-items:baseline; gap:8px; } .tr-chh-p b { font-size:18px; font-weight:650; } .tr-chh-p span { font-size:12.5px; font-weight:600; }
.tr-chart { position:relative; height:260px; }
/* a card too narrow for eight columns drops Avg cost (it's in the ticket's position line) */
.tr-c { container-type:inline-size; }
@container (max-width:690px) { .tr-t .c-avg { display:none; } }
.tr-chart svg { display:block; overflow:visible; }
.tr-chart text { font:10.5px Inter, sans-serif; fill:var(--tm-mute); font-variant-numeric:tabular-nums; }
.tr-chart .gl { stroke:var(--tm-row); }
.tr-chart .ln { fill:none; stroke-width:1.6; } .tr-chart .up .ln { stroke:var(--tm-pos); } .tr-chart .dn .ln { stroke:var(--tm-neg); }
.tr-chart .ar { opacity:.08; } .tr-chart .up .ar { fill:var(--tm-pos); } .tr-chart .dn .ar { fill:var(--tm-neg); }
.tr-chart .ref { stroke:var(--tm-sub); stroke-dasharray:3 3; } .tr-chart .ref-t { fill:var(--tm-sub); }
.tr-chart .xh { stroke:var(--tm-sub); stroke-dasharray:2 3; } .tr-chart .dot { fill:var(--tm-ink); }
.tr-tip { position:absolute; top:-2px; font-size:12px; color:var(--tm-sub); white-space:nowrap; pointer-events:none; } .tr-tip b { color:var(--tm-ink); }
/* rebalance dialog */
.aiq-dlg.tr-dlg { --dlg-w:900px; }
.tr-dlg .aiq-dlg-b { padding-bottom:18px; }
.tr-rb { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:28px; }
.tr-rb-r { display:grid; gap:10px; align-content:start; }
.tr-rb-h { font-size:15px; font-weight:600; }
.tr-rb-w { width:72px; height:26px; display:inline-block; }
.tr-rb-add { margin-top:12px; }
.tr-rb-o { display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:12px; color:var(--tm-sub); }
.tr-rb-o select { height:26px; border:1px solid var(--tm-line); border-radius:4px; background:var(--tm-in); color:var(--tm-ink); font:inherit; font-size:12px; }
.tr-rb-n { font-size:12px; color:var(--tm-sub); }
@container (max-width:860px) { .tr-grid > .s4, .tr-grid > .s8 { grid-column:span 12; } }
@media (max-width:767px) { .tr-rb { grid-template-columns:minmax(0,1fr); } }
