/* ---------- Watchlist (/saved) and Account (/account) pages (assets/saved.js) ---------- */

#saved-app .sv-inapp { margin: 4px 0 10px; padding: 8px 10px; border-radius: 6px; background: var(--soft, rgba(42,138,126,.08)); font-size: 13.5px; }
#saved-app .sv-copy { padding: 0; border: 0; background: none; color: var(--accent, #2a8a7e); font: inherit; text-decoration: underline; cursor: pointer; }
#saved-app .sv-note { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
#saved-app .sv-empty { padding: 14px 16px; margin: 16px 0; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); }
#saved-app .sv-empty p { margin: 4px 0; }

/* sign-in box */
.sv-sync {
  max-width: 640px;
  margin: 28px 0 8px;
  padding: 4px 16px 12px;
  background: var(--head);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.sv-sync h2 { margin: 12px 0 10px; }
.sv-sync p { margin: 10px 0; }
.sv-lbl { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sv-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-row input[type="email"], .sv-row input#sv-in {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming in on focus */
  padding: 6px 10px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
.sv-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 13.5px; cursor: pointer; }
.sv-check input { margin: 3px 0 0; flex: none; }
.sv-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sv-btn {
  font: inherit;
  padding: 6px 14px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  cursor: pointer;
}
.sv-btn:hover { border-color: var(--muted); }
.sv-btn.primary { color: #fff; background: #128270; border-color: #128270; }
.sv-btn.primary:hover { background: #0f6e5f; }
.sv-btn.sv-del.armed { color: var(--neg); background: var(--neg-bg); border-color: var(--neg-line); font-weight: 600; }
.sv-btn:disabled { opacity: .6; cursor: default; }
.sv-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sv-status:empty { display: none; }
.sv-status { font-weight: 600; }
.sv-dev { font-size: 12.5px; overflow-wrap: anywhere; }

/* add your own stocks (saved.js): a box with suggestions under it */
.sv-add { position: relative; max-width: 640px; margin: 14px 0 6px; }
.sv-add .sv-row input#sv-in { text-transform: none; }
.sv-add-msg { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.sv-sug {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}
.sv-sug li { display: flex; align-items: baseline; gap: 8px; padding: 7px 12px; cursor: pointer; }
.sv-sug li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.sv-sug li em { font-style: normal; font-size: 12px; color: var(--faint); white-space: nowrap; }
.sv-sug li:hover, .sv-sug li[aria-selected="true"] { background: var(--hover); }
.sv-sum { margin: 4px 0 8px; font-size: 13.5px; }

@media (max-width: 639.98px) {
  .sv-sync { padding: 2px 12px 10px; }
  .sv-row .sv-btn { flex: 1 1 100%; }
}

/* ---------- watchlist rows (saved.js titanRows / stockRows) ----------
   name | 12-quarter line | figure, change pill, small line; × to remove at the end. */
.wl { list-style: none; margin: 0 0 6px; padding: 0; max-width: 720px; border-top: 1px solid var(--line); }
.wl-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.wl-a {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(7.5em, auto);
  align-items: center;
  gap: 14px;
  padding: 12px 4px 12px 0;
  color: var(--fg);
  text-decoration: none;
}
.wl-a:hover { text-decoration: none; background: var(--hover); }
.wl-n { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wl-face { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.wl-nt { min-width: 0; }
.wl-nt b { font-size: 16px; font-weight: 700; }
.wl-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); font-weight: 400; }
.wl-sp { display: block; width: 96px; height: 36px; overflow: visible; }
.wl-base { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.wl-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wl-fill { stroke: none; opacity: .16; }
.wl-sp.up .wl-line { stroke: var(--pos); } .wl-sp.up .wl-fill { fill: var(--pos); }
.wl-sp.down .wl-line { stroke: var(--neg); } .wl-sp.down .wl-fill { fill: var(--neg); }
.wl-sp.flat .wl-line { stroke: var(--muted); } .wl-sp.flat .wl-fill { fill: var(--muted); }
.wl-v { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.wl-v b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl-v b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.wl-v .wl-sub { font-size: 12px; }
.wl-pill {
  min-width: 4.2em;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.wl-pill.up { background: #1d8a57; }
.wl-pill.down { background: #d0453b; }
.wl-pill.flat { color: var(--fg); background: var(--hover); }
.wl-row .sv-x { flex: none; margin-left: 4px; }
/* Edit mode (owner, 2026-11-22): × and the drag handle show only after Edit; rows are not links then. */
.wl-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 720px; }
.wl-edit {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 4px 12px;
  color: var(--link);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}
.wl-edit[aria-pressed="true"] { color: #fff; background: #128270; border-color: #128270; }
.wl:not(.editing) .wl-ck, .wl:not(.editing) .wl-drag { display: none; }
.wl.editing .wl-a { pointer-events: none; grid-template-columns: minmax(0, 1fr); }
.wl.editing .wl-sp, .wl.editing .wl-v { display: none; }
.wl-ck { order: -1; flex: none; display: flex; align-items: center; justify-content: center; width: 40px; align-self: stretch; cursor: pointer; }
.wl-ck input { width: 20px; height: 20px; margin: 0; accent-color: #128270; cursor: pointer; }
.wl-hb { display: inline-flex; gap: 8px; }
.wl-rm {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 4px 12px;
  color: var(--neg);
  background: transparent;
  border: 1px solid var(--neg-line);
  border-radius: 6px;
  cursor: pointer;
}
.wl-rm:disabled { color: var(--faint); border-color: var(--line); cursor: default; }
.wl-drag {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 52px;
  margin-left: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: grab;
  touch-action: none;
}
.wl-drag svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.wl-drag:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.wl.sorting .wl-row { transition: transform .16s ease; }
.wl-row.dragging { background: var(--head); box-shadow: 0 8px 20px rgba(0, 0, 0, .28); position: relative; z-index: 2; transition: none !important; }
.wl.sorting { user-select: none; -webkit-user-select: none; }
.wl-row.dragging .wl-drag { cursor: grabbing; color: var(--fg); }
@media (max-width: 639.98px) {
  .wl-a { grid-template-columns: minmax(0, 1fr) 72px minmax(6.5em, auto); gap: 10px; }
  .wl-sp { width: 72px; height: 32px; }
  .wl-nt b { font-size: 15.5px; }
}
/* phones, while typing in the add box: room below so the box can glide up under the header (saved.js glide) */
#saved-app.sv-typing { padding-bottom: 70vh; }
/* phones: Add sits beside the box (not under it), so suggestions open right below what you type */
@media (max-width: 639.98px) {
  .sv-add .sv-row { flex-wrap: nowrap; }
  .sv-add .sv-row .sv-btn { flex: none; padding-left: 18px; padding-right: 18px; }
}

/* Watchlist page, signed in: just a line (the account box is on /account) */
.sv-sync.sv-line { padding: 2px 14px; background: transparent; font-size: 13.5px; color: var(--muted); }
.sv-sync.sv-line p { margin: 8px 0; }
.sv-sync.sv-line .sv-status:empty { display: none; }

/* Computers: the watchlist uses the full width (owner): a wider line, one more figure and the
   latest filing's changes between the line and the main figure (saved.js extra()). */
.wl-x { display: none; }
@media (min-width: 900px) {
  .wl, .wl-h, .sv-add { max-width: none; }
  .sv-add { max-width: 720px; }
  .wl-a { grid-template-columns: minmax(10em, 1.1fr) 160px minmax(0, 2fr) minmax(8.5em, auto); gap: 24px; padding-left: 4px; }
  .wl-sp { width: 160px; height: 40px; }
  .wl-x { display: grid; grid-template-columns: 9em minmax(0, 1fr); align-items: center; gap: 16px; min-width: 0; }
  .wl-xv b { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .wl-xv small { font-size: 12px; color: var(--muted); }
  .wl-xc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; }
  .wl-xc i { font-style: normal; font-weight: 600; white-space: nowrap; }
  .wl-xc .new, .wl-xc .add { color: var(--pos); }
  .wl-xc .red, .wl-xc .cl { color: var(--neg); }
  .wl-xc .nc { color: var(--muted); font-weight: 400; }
  .wl.editing .wl-x { display: none; }
}

/* Watchlist time range (saved.js rangeBar) */
.wl-rg { display: flex; align-items: center; gap: 0; margin: 16px 0 4px; font-size: 13px; }
.wl-rg span { margin-right: 10px; color: var(--muted); }
.wl-rg button { padding: 5px 12px; font: inherit; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid var(--line-strong); cursor: pointer; }
.wl-rg button + button { border-left: 0; }
.wl-rg button:first-of-type { border-radius: 6px 0 0 6px; }
.wl-rg button:last-of-type { border-radius: 0 6px 6px 0; }
.wl-rg button[aria-pressed="true"] { color: #fff; background: #128270; border-color: #128270; }

/* Section bars for Stocks and Titans (saved.js head) */
.wl-h { margin-top: 22px; padding: 8px 10px 8px 12px; background: var(--head); border: 1px solid var(--line); border-left: 4px solid #128270; border-radius: 8px; }
.wl-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.wl-hi { display: inline-flex; color: #128270; }
.wl-hi svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wl-hn { min-width: 22px; padding: 1px 7px; font-size: 12px; font-weight: 700; text-align: center; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.wl-cols { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(6.5em, auto); gap: 10px; align-items: end; padding: 10px 4px 4px 0; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); }
.wl-cols span:last-child { text-align: right; }
.wl-cols .wl-cx { display: none; }
.sv-sum { margin: 8px 0 0; }
@media (min-width: 900px) {
  .wl-cols { grid-template-columns: minmax(10em, 1.1fr) 160px minmax(0, 2fr) minmax(8.5em, auto); gap: 24px; padding-left: 4px; }
  .wl-cols .wl-cx { display: block; }
}
@media (max-width: 639.98px) {
  .wl-cols span:nth-child(2) { font-size: 0; } /* phones: the line column stays unlabeled (too narrow) */
}
/* The time range stays in view under the header while scrolling the list (owner, 2026-11-22). */
.wl-rg { position: sticky; top: var(--headh, 0px); z-index: 6; margin: 12px -16px 0; padding: 8px 16px; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
