/* Uses the shared research type roles; geometry is scoped to this component. */
.tr-wls,
.tr-wls-toast {
  --tr-wls-bg: #10242e;
  --tr-wls-border: #30454f;
  --tr-wls-muted: #a5b2bd;
  color: #e1e8eb;
  font: var(--tr-type-body-weight, 400) var(--tr-type-body-size, 14px)/1.5 var(--tr-type-family, "IBM Plex Sans", Plex, system-ui, sans-serif);
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  color-scheme: dark;
}
.tr-wls,
.tr-wls *:not(svg),
.tr-wls-toast,
.tr-wls-toast *:not(svg) { box-sizing: border-box; }
.tr-wls {
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--tr-wls-border);
  border-radius: 18px;
  background: var(--tr-wls-bg);
  box-shadow: 0 24px 90px #0009;
}
body:has(.tr-wls[open]) { overflow: hidden; }
.tr-wls::backdrop { background: #031017b8; backdrop-filter: blur(3px); }
.tr-wls [hidden] { display: none !important; }
.tr-wls-form { display: flex; flex-direction: column; max-height: min(758px, calc(100dvh - 34px)); margin: 0; }
.tr-wls h2 { margin: 0; color: #edf1f3; font: var(--tr-type-heading-weight, 600) var(--tr-type-section-size, 21px)/1.3 var(--tr-type-family, "IBM Plex Sans", Plex, system-ui, sans-serif); letter-spacing: 0; text-transform: none; }
.tr-wls h3 { margin: 0; font: var(--tr-type-heading-weight, 600) var(--tr-type-subsection-size, 16px)/1.4 var(--tr-type-family, "IBM Plex Sans", Plex, system-ui, sans-serif); letter-spacing: 0; text-transform: none; }
.tr-wls p { margin: 0; }
.tr-wls button,
.tr-wls input,
.tr-wls-toast button { font: inherit; letter-spacing: 0; text-transform: none; }
.tr-wls button,
.tr-wls-toast button { min-height: 44px; border: 1px solid var(--tr-wls-border); border-radius: 9px; padding: 8px 14px; color: #dbe6eb; background: transparent; cursor: pointer; line-height: 1.3; box-shadow: none; }
.tr-wls button:disabled,
.tr-wls-toast button:disabled { opacity: .5; cursor: default; }
.tr-wls button:not(:disabled):hover,
.tr-wls-toast button:not(:disabled):hover { background-color: #233d49; }
.tr-wls :focus-visible,
.tr-wls-toast :focus-visible { outline: 2px solid #82bdec; outline-offset: 3px; }
.tr-wls-header { display: flex; flex-shrink: 0; align-items: flex-start; gap: 12px; padding: 24px 20px 16px; }
.tr-wls-header > div { flex: 1; min-width: 0; }
.tr-wls-header p { margin-top: 8px; color: var(--tr-wls-muted); }
.tr-wls .tr-wls-close { flex: 0 0 44px; width: 44px; margin: -8px -8px 0 0; padding: 0; font-size: 25px; border: 0; }
.tr-wls-stock { display: flex; flex-shrink: 0; align-items: center; gap: 12px; padding: 0 20px 20px; border-bottom: 1px solid var(--tr-wls-border); }
.tr-wls-stock > div { min-width: 0; }
.tr-wls-logo { flex: 0 0 44px; width: 44px; height: 44px; object-fit: cover; clip-path: polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px); }
.tr-wls-symbol { display: block; font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.tr-wls-company { color: #c6d0d7; font-size: var(--tr-type-meta-size, 12px); line-height: 16px; font-weight: var(--tr-type-company-weight, 500); overflow-wrap: anywhere; }
.tr-wls-content { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 20px; min-height: 0; }
.tr-wls-fields { min-width: 0; border: 0; margin: 0; padding: 0; }
.tr-wls-list-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.tr-wls-membership-count { font-size: var(--tr-type-meta-size, 12px); color: var(--tr-wls-muted); white-space: nowrap; }
.tr-wls-search-label,
.tr-wls-new > label { display: block; font-size: var(--tr-type-meta-size, 12px); font-weight: var(--tr-type-label-weight, 500); margin-bottom: 6px; color: #c6d0d7; }
.tr-wls input[type="text"],
.tr-wls input[type="search"] { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--tr-wls-border); border-radius: 8px; padding: 10px 12px; color: #edf1f3; background: #0b1b22; }
.tr-wls input::placeholder { color: #8295a0; }
.tr-wls-lists { display: grid; gap: 6px; margin-top: 12px; }
.tr-wls-list { display: flex; align-items: center; min-height: 64px; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; background: #142c37; }
.tr-wls-list:has(input:checked) { background: #193a48; border-color: #426b80; }
.tr-wls-list:has(input:disabled) { opacity: .6; cursor: default; }
.tr-wls-list input { width: 19px; height: 19px; min-width: 19px; margin: 0; accent-color: #75b7e0; }
.tr-wls-list-copy { flex: 1; min-width: 0; }
.tr-wls-list-name { display: block; font-weight: var(--tr-type-label-weight, 500); overflow-wrap: anywhere; }
.tr-wls-list-count { display: block; color: var(--tr-wls-muted); font-size: var(--tr-type-meta-size, 12px); line-height: 16px; margin-top: 2px; }
.tr-wls-list-status { color: #a7cadb; font-size: var(--tr-type-dense-size, 11px); white-space: nowrap; }
.tr-wls .tr-wls-create { width: 100%; margin-top: 12px; border-style: dashed; color: #a7d0ec; text-align: left; }
.tr-wls-new { margin-top: 16px; }
.tr-wls-new-row { display: flex; gap: 8px; }
.tr-wls .tr-wls-cancel-new { flex: 0 0 44px; width: 44px; padding: 0; font-size: 22px; }
.tr-wls .tr-wls-help,
.tr-wls .tr-wls-limit { margin-top: 6px; color: var(--tr-wls-muted); font-size: var(--tr-type-meta-size, 12px); }
.tr-wls .tr-wls-error,
.tr-wls .tr-wls-field-error { margin-top: 12px; color: #ffb9ad; }
.tr-wls .tr-wls-field-error { font-size: var(--tr-type-meta-size, 12px); margin-top: 6px; }
.tr-wls .tr-wls-empty { padding: 16px 0 4px; color: var(--tr-wls-muted); }
.tr-wls .tr-wls-retry { margin-top: 12px; }
.tr-wls-footer { padding: 16px 20px 20px; border-top: 1px solid var(--tr-wls-border); flex-shrink: 0; }
.tr-wls-summary { font-size: var(--tr-type-meta-size, 12px); color: #c6d0d7; min-height: 18px; }
.tr-wls-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.tr-wls .tr-wls-save { background: #40799c; color: #fff; border-color: #528baa; font-weight: var(--tr-type-label-weight, 500); min-width: 140px; }
.tr-wls .tr-wls-save:not(:disabled):hover { background: #4c89ae; }
.tr-wls-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tr-wls-toast { position: fixed; z-index: 2147483647; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); width: min(440px, calc(100vw - 32px)); border: 1px solid #476879; border-radius: 12px; padding: 16px 48px 14px 18px; background: #16313e; box-shadow: 0 12px 40px #0008; }
.tr-wls-toast p { margin: 0; overflow-wrap: anywhere; }
.tr-wls-toast-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 -4px; }
.tr-wls-toast-actions button { padding: 6px 0; border: 0; color: #b9ddf4; text-align: left; overflow-wrap: anywhere; }
.tr-wls-toast .tr-wls-toast-dismiss { position: absolute; top: 2px; right: 2px; padding: 0; width: 44px; border: 0; font-size: 22px; }
@media (max-width: 599px) {
  .tr-wls { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  .tr-wls-form { max-height: calc(100dvh - 26px); }
  .tr-wls-header { padding: 20px 16px 16px; }
  .tr-wls-stock { padding: 0 16px 16px; }
  .tr-wls-content { padding: 16px; }
  .tr-wls-footer { padding: 14px 16px 16px; }
  .tr-wls-actions { display: grid; grid-template-columns: 1fr 1.5fr; }
  .tr-wls .tr-wls-save { min-width: 0; }
  .tr-wls-toast { right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
}

/* A canonical membership response fills the existing card star in place. */
.watchlist-button.is-saved .wlCircle svg > path { fill: rgba(30,216,195,.52); }

/* Membership editing uses the same quiet control faces as the workspace. */
.tr-wls,.tr-wls-toast{--tr-wls-bg:#101f27;--tr-wls-border:#30454f;--tr-wls-muted:#92a8b4;--tr-wls-ink:#d4e2e9;--tr-wls-accent:#a9ded8;--tr-wls-accent-bg:#132c30;--tr-wls-accent-edge:#538782;--tr-wls-field:#0b1b22;color:var(--tr-wls-ink)}
.tr-wls{border-radius:8px}
.tr-wls h2{color:var(--tr-wls-ink)}
.tr-wls-header{padding:16px 20px 12px;align-items:center}
.tr-wls-header p{margin-top:6px;font-size:12px;line-height:18px}
.tr-wls .tr-wls-close{margin:-6px -10px -6px 0;font-size:22px;min-height:44px;background:transparent}
.tr-wls-stock{gap:10px;padding-bottom:12px}
.tr-wls-logo{width:32px;height:32px;flex-basis:32px;clip-path:polygon(5px 0,100% 0,100% calc(100% - 5px),calc(100% - 5px) 100%,0 100%,0 5px)}
.tr-wls-symbol{font-size:16px;line-height:20px;font-weight:600}
.tr-wls-company{color:var(--tr-wls-muted);font-size:12px;line-height:16px}
.tr-wls-content{padding:14px 20px}
.tr-wls-list-header{margin-bottom:12px}
.tr-wls input[type=text],.tr-wls input[type=search]{border-radius:3px;background:var(--tr-wls-field);color:var(--tr-wls-ink);font-size:14px;line-height:20px;padding:10px 12px}
.tr-wls-search-label,.tr-wls-new>label{color:var(--tr-wls-muted)}
.tr-wls-lists{gap:4px;margin-top:8px}
.tr-wls-list{min-height:52px;padding:8px 10px;border-radius:3px;background:transparent;border-color:var(--tr-wls-border);gap:10px}
.tr-wls-list:has(input:checked){background:var(--tr-wls-accent-bg);border-color:var(--tr-wls-accent-edge)}
.tr-wls-list input{appearance:none;width:16px;height:16px;min-width:16px;border:1px solid var(--tr-wls-muted);border-radius:2px;background:var(--tr-wls-field);display:grid;place-content:center}
.tr-wls-list input:checked{background:var(--tr-wls-accent);border-color:var(--tr-wls-accent)}
.tr-wls-list input:checked::after{content:"";width:8px;height:5px;border-left:2px solid var(--tr-wls-bg);border-bottom:2px solid var(--tr-wls-bg);transform:translateY(-1px) rotate(-45deg)}
.tr-wls-list-name{font-size:14px;line-height:20px}
.tr-wls-list-count{font-size:11px;line-height:16px;margin-top:0}
.tr-wls-list-status{color:var(--tr-wls-accent)}
.tr-wls .tr-wls-create{margin-top:6px;padding-inline:0;border:0;color:var(--tr-wls-accent);font-size:12px;line-height:16px;font-weight:500}
.tr-wls-footer{padding:12px 20px}
.tr-wls-summary{color:var(--tr-wls-muted);font-size:12px;line-height:18px}
.tr-wls-actions{margin-top:6px;gap:8px}
.tr-wls-actions>button,.tr-wls .tr-wls-retry{--tr-wls-control-edge:var(--tr-wls-border);--tr-wls-control-face:var(--tr-wls-bg);position:relative;isolation:isolate;min-height:44px;padding:0 14px;border:0;border-radius:0;background:transparent;color:var(--tr-wls-ink);font-size:12px;line-height:16px;font-weight:500}
.tr-wls-actions>button::before,.tr-wls-actions>button::after,.tr-wls .tr-wls-retry::before,.tr-wls .tr-wls-retry::after{content:"";position:absolute;pointer-events:none}
.tr-wls-actions>button::before,.tr-wls .tr-wls-retry::before{z-index:-2;inset:6px 0;background:var(--tr-wls-control-edge);clip-path:polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px)}
.tr-wls-actions>button::after,.tr-wls .tr-wls-retry::after{z-index:-1;inset:7px 1px;background:var(--tr-wls-control-face);clip-path:polygon(5.5px 0,100% 0,100% calc(100% - 5.5px),calc(100% - 5.5px) 100%,0 100%,0 5.5px)}
.tr-wls .tr-wls-save{--tr-wls-control-edge:var(--tr-wls-accent-edge);--tr-wls-control-face:var(--tr-wls-accent-bg);color:var(--tr-wls-accent);min-width:112px}
.tr-wls-actions>button:not(:disabled):hover,.tr-wls .tr-wls-retry:not(:disabled):hover{--tr-wls-control-edge:var(--tr-wls-accent);background:transparent}
.tr-wls-toast{border-radius:6px;background:var(--tr-wls-bg)}
html[data-reading-theme=light] :is(.tr-wls,.tr-wls-toast){--tr-wls-bg:#f4f8f8;--tr-wls-border:#afc3ca;--tr-wls-muted:#526b76;--tr-wls-ink:#234550;--tr-wls-accent:#245e56;--tr-wls-accent-bg:#e4efec;--tr-wls-accent-edge:#739d98;--tr-wls-field:#fbfdfd;color-scheme:light}
html[data-reading-theme=light] .tr-wls .tr-wls-error,html[data-reading-theme=light] .tr-wls .tr-wls-field-error{color:#983f37}
html[data-reading-theme=light] .tr-wls button:not(:disabled):hover{background-color:#e4efec}
html[data-reading-theme=light] .tr-wls-actions>button:not(:disabled):hover,html[data-reading-theme=light] .tr-wls .tr-wls-retry:not(:disabled):hover{background:transparent}
@media(max-width:599px){.tr-wls{border-radius:8px}.tr-wls-header{padding:14px 16px 12px}.tr-wls-content{padding:12px 16px}.tr-wls-stock{padding:0 16px 12px}.tr-wls-footer{padding:12px 16px}.tr-wls-actions{display:flex;justify-content:flex-end}.tr-wls .tr-wls-save{min-width:112px}}
@media(pointer:coarse){.tr-wls input[type=text],.tr-wls input[type=search]{font-size:16px}}
@media(forced-colors:active){.tr-wls-list input{appearance:auto}.tr-wls-list input::after{display:none}.tr-wls-actions>button,.tr-wls .tr-wls-retry{outline:1px solid ButtonText;outline-offset:-6px}.tr-wls-actions>button::before,.tr-wls-actions>button::after,.tr-wls .tr-wls-retry::before,.tr-wls .tr-wls-retry::after{display:none}.tr-wls-actions>button:focus-visible,.tr-wls .tr-wls-retry:focus-visible{outline:2px solid Highlight;outline-offset:2px}}
.tr-wls .tr-wls-save,.tr-wls .tr-wls-save:not(:disabled):hover{background:transparent;border:0}
