/* ==========================================================================
   美股AI 研究台 · TradingView Classic Minimalist + Soft Macaron Micro-Accents
   90% Calm Neutral Surfaces + Restrained Pastel Semantic Dots (Light & Dark)
   ========================================================================== */

:root,
html[data-theme="light"] {
  color-scheme: light;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --topbar-h: 44px;
  --rail-w: 44px;
  --drawer-w: 320px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  /* Neutral Surfaces */
  --bg-canvas: #F2F4F8;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-inset: #F7F8FB;
  --bg-hover: #EFF2F7;
  --bg-active: #EEF3FF;
  --pill-bg: #F2F4F8;

  /* Hairlines */
  --border-subtle: #E4E7EF;
  --border-strong: #D0D6E3;

  /* Typography */
  --text-primary: #131722;
  --text-secondary: #4E586B;
  --text-muted: #787B86;

  /* Restrained Primary Accent (Periwinkle / TV Blue) */
  --accent: #3B6CF6;
  --accent-soft: #EEF3FF;
  --accent-border: #C7D7FE;
  --accent-contrast: #FFFFFF;

  /* Soft Macaron Semantic Micro-Accents */
  --up: #139A7E;
  --up-dot: #1EB292;
  --up-soft: #ECF8F5;
  --up-border: #CBECE4;

  --down: #D94A5A;
  --down-dot: #E26473;
  --down-soft: #FDF1F2;
  --down-border: #F6D2D6;

  --warn: #C97A2B;
  --warn-dot: #E59A54;
  --warn-soft: #FAF6F0;
  --warn-border: #E7DEC8;

  --purple: #7C6EE6;
  --purple-dot: #8F82ED;
  --purple-soft: #F4F2FE;
  --purple-border: #DDD7FB;

  /* Elevation & Chrome */
  --shadow-pop: 0 8px 28px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(15, 23, 42, 0.04);
  --shadow-float: 0 4px 14px rgba(15, 23, 42, 0.07);
  --float-bg: rgba(255, 255, 255, 0.92);
  --overlay-bg: rgba(255, 255, 255, 0.80);
  --backdrop-bg: rgba(19, 23, 34, 0.32);
  --scrollbar-thumb: rgba(19, 23, 34, 0.14);
  --scrollbar-thumb-hover: rgba(19, 23, 34, 0.26);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #0F131B;
  --bg-surface: #151A24;
  --bg-elevated: #1B2230;
  --bg-inset: #191F2C;
  --bg-hover: #222A3B;
  --bg-active: rgba(122, 162, 247, 0.14);
  --pill-bg: #232938;

  --border-subtle: #262E3F;
  --border-strong: #364057;

  --text-primary: #E6EAF2;
  --text-secondary: #A6B0C3;
  --text-muted: #7A859C;

  --accent: #7AA2F7;
  --accent-soft: rgba(122, 162, 247, 0.14);
  --accent-border: rgba(122, 162, 247, 0.34);
  --accent-contrast: #0D121D;

  --up: #4AC2A7;
  --up-dot: #4AC2A7;
  --up-soft: rgba(74, 194, 167, 0.12);
  --up-border: rgba(74, 194, 167, 0.28);

  --down: #E87A86;
  --down-dot: #E87A86;
  --down-soft: rgba(232, 122, 134, 0.12);
  --down-border: rgba(232, 122, 134, 0.28);

  --warn: #E6AE67;
  --warn-dot: #E6AE67;
  --warn-soft: rgba(230, 174, 103, 0.10);
  --warn-border: rgba(230, 174, 103, 0.26);

  --purple: #A99CF4;
  --purple-dot: #A99CF4;
  --purple-soft: rgba(169, 156, 244, 0.12);
  --purple-border: rgba(169, 156, 244, 0.28);

  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-float: 0 4px 16px rgba(0, 0, 0, 0.36);
  --float-bg: rgba(21, 26, 36, 0.90);
  --overlay-bg: rgba(15, 19, 27, 0.78);
  --backdrop-bg: rgba(6, 9, 15, 0.62);
  --scrollbar-thumb: rgba(230, 234, 242, 0.14);
  --scrollbar-thumb-hover: rgba(230, 234, 242, 0.26);
}

/* ==========================================================================
   Base Reset & Utilities
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Semantic Micro-Dot */
.sem-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}
.sem-dot.is-mint { background: var(--up-dot); }
.sem-dot.is-rose { background: var(--down-dot); }
.sem-dot.is-apricot { background: var(--warn-dot); }
.sem-dot.is-lavender { background: var(--purple-dot); }
.sem-dot.is-blue { background: var(--accent); }

.is-up { color: var(--up); }
.is-down { color: var(--down); }
.is-flat { color: var(--text-muted); }
.is-vix-up { color: var(--warn) !important; }
.is-vix-down { color: var(--up) !important; }

/* ==========================================================================
   App Shell
   ========================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-canvas);
}

/* ==========================================================================
   Zone 1: Crisp 44px Single-Row TradingView Topbar
   ========================================================================== */
.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 45;
  min-width: 0;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.topbar-right {
  justify-content: flex-end;
}

.topbar-sep {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--text-primary);
  padding: 0 2px;
}

.brand-svg {
  flex-shrink: 0;
}

/* Quick Symbol Search Trigger */
.tv-symbol-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.tv-symbol-btn svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.tv-symbol-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.tv-symbol-code {
  letter-spacing: -0.01em;
}

.tv-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  line-height: 1.2;
}

/* Topbar Chart Controls */
.topbar-chart-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.interval-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  gap: 1px;
}

.interval-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 110ms ease, color 110ms ease;
}

.interval-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.interval-btn.active {
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.tb-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease, border-color 110ms ease;
}

.tb-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tb-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

#chartExtendedHours[aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* Topbar Nav Buttons (每日雷达 / 博主雷达 — subtle neutral, NEVER loud blue box) */
.topbar-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.tb-nav-btn {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease;
}

.tb-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tb-nav-btn.active,
.tb-nav-btn[aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--accent);
  font-weight: 600;
}

/* Indicators Dropdown */
.chart-indicators {
  position: relative;
}

.chart-indicators[open] {
  z-index: 60;
}

.chart-indicators summary {
  list-style: none;
}

.chart-indicators summary::-webkit-details-marker {
  display: none;
}

.chart-indicators summary::after {
  content: "▾";
  font-size: 9.5px;
  color: var(--text-muted);
  margin-left: 1px;
}

.chart-indicators[open] summary {
  background: var(--bg-active);
  color: var(--accent);
}

.indicator-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  background: var(--bg-active);
}

.indicator-count.is-empty {
  color: var(--text-muted);
  background: var(--pill-bg);
}

.chart-indicator-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: max-content;
  min-width: 310px;
  max-width: min(368px, calc(100vw - 24px));
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-pop);
}

.chart-indicator-menu.align-right {
  left: auto;
  right: 0;
}

.indicator-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.indicator-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.indicator-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
}

.chart-indicator-menu label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 5px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 100ms ease;
}

.chart-indicator-menu label:hover {
  background: var(--bg-hover);
}

.chart-indicator-menu label.indicator-span-full {
  grid-column: 1 / -1;
}

.chart-indicator-menu input[type="checkbox"] {
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.chart-indicator-menu label:has(:disabled) {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.chart-indicator-menu label:has(:disabled):hover {
  background: transparent;
}

.indicator-menu-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.indicator-action-btn {
  appearance: none;
  background: var(--bg-inset);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 3px 9px;
  font-size: 11.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: color 110ms ease, border-color 110ms ease, background-color 110ms ease;
}

.indicator-action-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

/* Macro Chip (Neutral surface + apricot dot on alert — NEVER orange box) */
.macro-wrap {
  position: relative;
  flex-shrink: 0;
}

.macro-window {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  max-width: 108px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 110ms ease, border-color 110ms ease, color 110ms ease;
}

.macro-window:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.macro-window .macro-dot {
  background: var(--up-dot);
}

.macro-window.is-alert {
  color: var(--text-primary);
  background: var(--bg-inset);
  border-color: var(--border-strong);
}

.macro-window.is-alert .macro-dot {
  background: var(--warn-dot);
}

.macro-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.macro-caret {
  font-size: 9.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Benchmarks (Crisp compact TradingView ticker strip) */
.benchmark-strip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.benchmark {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 110ms ease, border-color 110ms ease;
}

.benchmark:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.benchmark[aria-pressed="true"] {
  background: var(--bg-active);
  border-color: var(--accent-border);
}

.benchmark[aria-pressed="true"] strong {
  color: var(--accent);
}

.benchmark strong {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.vix-benchmark {
  cursor: default;
  background: var(--bg-inset);
}

.vix-benchmark:hover {
  background: var(--bg-inset);
  border-color: var(--border-subtle);
}

.benchmark-quote {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.benchmark .ticker-item-price {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.benchmark .ticker-item-chg {
  font-size: 10px;
  font-weight: 600;
  min-width: auto;
}

.vix-session {
  font-size: 10px;
  color: var(--text-muted);
}

.demo-pill {
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Status Lamp (Neutral pill + crisp 6px semantic dot, ZERO colored rectangle) */
.status-lamp-wrap {
  position: relative;
  flex-shrink: 0;
}

.status-lamp {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 110ms ease, border-color 110ms ease;
}

.status-lamp:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.status-lamp-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--up-dot);
}
.status-lamp-dot[data-status="warn"] { background: var(--warn-dot); }
.status-lamp-dot[data-status="error"] { background: var(--down-dot); }

.status-lamp-score {
  font-size: 11px;
  color: var(--text-muted);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 110ms ease, border-color 110ms ease, color 110ms ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.theme-icon {
  font-size: 12px;
  line-height: 1;
}

/* Topbar Popovers */
.topbar-popover {
  position: absolute;
  top: calc(100% + 7px);
  z-index: 70;
  padding: 12px 13px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pop);
  color: var(--text-primary);
}

.macro-popover {
  right: 0;
  width: min(420px, calc(100vw - 24px));
}

.status-popover {
  right: 0;
  width: min(328px, calc(100vw - 24px));
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.popover-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.popover-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.popover-badge[data-alert="true"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn-dot);
}

.macro-full-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.macro-events-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.macro-events-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.status-pop-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.status-pop-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 10px 0;
}

.regime-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.regime-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up-dot);
}
.regime-badge[data-level="caution"] .regime-dot { background: var(--warn-dot); }
.regime-badge[data-level="circuit_breaker"] .regime-dot { background: var(--down-dot); }

.risk-meter-pop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-label {
  color: var(--text-secondary);
  font-size: 11.5px;
  white-space: nowrap;
}

.risk-value {
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: right;
  color: var(--text-primary);
}

.risk-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}

.risk-fill {
  height: 100%;
  background: var(--up);
  transition: width 240ms ease, background-color 240ms ease;
}

.status-submeta {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.data-health-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.health-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--up-dot);
}
.health-dot[data-status="warn"] { background: var(--warn-dot); }
.health-dot[data-status="error"] { background: var(--down-dot); }

.health-sources-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 176px;
  overflow-y: auto;
}

.health-source-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
}

.health-source-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.health-source-name {
  color: var(--text-primary);
  font-weight: 500;
}

.health-source-detail {
  color: var(--text-muted);
  font-size: 11px;
  word-break: break-word;
}

.health-source-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text-secondary);
}

.health-source-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}
.health-source-status[data-state="ok"]::before { background: var(--up-dot); }
.health-source-status[data-state="warn"]::before { background: var(--warn-dot); }
.health-source-status[data-state="error"]::before { background: var(--down-dot); }

.health-source-empty {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 4px 0;
}

/* ==========================================================================
   4-Zone Main Workspace Shell
   ========================================================================== */
.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-canvas);
}

/* ==========================================================================
   Zone 2 & Zone 4B: 44px TradingView Left & Right Vertical Rails
   ========================================================================== */
.tv-tool-rail,
.tv-right-rail {
  width: var(--rail-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  background: var(--bg-surface);
  position: relative;
  z-index: 30;
}

.tv-tool-rail {
  border-right: 1px solid var(--border-subtle);
}

.tv-right-rail {
  border-left: 1px solid var(--border-subtle);
}

.rail-btn {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease, border-color 110ms ease;
}

.rail-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.rail-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.rail-btn.active,
.rail-btn[aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--accent);
}

.tv-right-rail .right-rail-btn.active::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 7px;
  bottom: 7px;
  width: 2.5px;
  border-radius: 2px 0 0 2px;
  background: var(--accent);
}

.rail-divider {
  width: 22px;
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
  flex-shrink: 0;
}

.rail-tz-badge {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}

.rail-pop-wrap {
  position: relative;
}

.rail-popover {
  position: absolute;
  left: calc(100% + 9px);
  top: 0;
  z-index: 70;
  min-width: 146px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pop);
}

.rail-popover-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 4px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.rail-popover-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-opt-btn {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.rail-opt-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.rail-opt-btn.active {
  background: var(--bg-active);
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   Zone 3: Giant Unobstructed Center Stage
   ========================================================================== */
.center-stage {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-canvas);
}

.chart-stage {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  overflow: hidden;
}

/* Slim Quote Bar */
.quote-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  min-height: 39px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
}

.quote-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.quote-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.quote-symbol {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.quote-name {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.quote-price {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.quote-change {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.quote-live {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Neutral Pills with Soft Macaron Dot */
.rs-badge,
.pivot-zone-pill,
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.rs-badge::before,
.pivot-zone-pill::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.rs-badge.is-up { color: var(--text-primary); }
.rs-badge.is-up::before { background: var(--up-dot); }
.rs-badge.is-down { color: var(--text-primary); }
.rs-badge.is-down::before { background: var(--down-dot); }

.pivot-zone-pill[data-zone="buy"]::before { background: var(--up-dot); }
.pivot-zone-pill[data-zone="extended"]::before { background: var(--down-dot); }
.pivot-zone-pill[data-zone="below"]::before { background: var(--text-muted); }

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.source-badge[data-quality="realtime"] .source-dot { background: var(--up-dot); }
.source-badge[data-quality="delayed"] .source-dot { background: var(--warn-dot); }

.chart-as-of {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.chart-as-of:empty { display: none; }

/* Ultra-Subtle Single-Line Stale Notice (Neutral + Soft Apricot Dot, ZERO orange box) */
.stale-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 14px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
}

.stale-banner-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.stale-banner-text {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stale-refresh-link {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 110ms ease, color 110ms ease, background-color 110ms ease;
}

.stale-refresh-link:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--bg-active);
}

/* Giant Unobstructed Chart Canvas */
.chart-wrapper {
  position: relative;
  flex: 1 1 0;
  min-height: 240px;
  width: 100%;
  background: var(--bg-surface);
  overflow: hidden;
}

.chart-container {
  width: 100%;
  height: 100%;
}

.chart-floating-zoom {
  position: absolute;
  right: 78px;
  bottom: 32px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  background: var(--float-bg);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-float);
}

.chart-floating-zoom .fit-btn {
  height: 22px;
  min-width: 22px;
  padding: 0 5px;
  font-size: 11px;
  border-color: transparent;
  background: transparent;
}

.chart-floating-zoom .fit-btn:hover {
  background: var(--bg-hover);
  border-color: transparent;
}

.measure-pill {
  position: absolute;
  left: 12px;
  bottom: 32px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 210px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--float-bg);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 11.5px;
  box-shadow: var(--shadow-float);
}

.measure-clear-btn {
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.chart-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-bg);
  color: var(--text-secondary);
  font-size: 12.5px;
  z-index: 12;
  backdrop-filter: blur(2px);
}

/* Docked Legend & OHLCV Strip */
.chart-legend-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  flex-wrap: wrap;
  padding: 5px 14px;
  background: var(--bg-inset);
  border-top: 1px solid var(--border-subtle);
  font-size: 11.5px;
  line-height: 1.35;
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 4px 11px;
  flex-wrap: wrap;
  min-width: 0;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 0;
  border-top-width: 2px;
  border-top-style: solid;
  flex-shrink: 0;
}

.legend-val {
  color: var(--text-primary);
  font-weight: 500;
}

.legend-empty {
  color: var(--text-muted);
  font-size: 11px;
}

.ohlcv-readout {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-inline-start: auto;
  color: var(--text-secondary);
  font-size: 11.5px;
}

.ohlcv-stamp {
  color: var(--text-muted);
  white-space: nowrap;
}

.ohlcv-values {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 9px;
  margin: 0;
}

.ohlcv-values > div {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.ohlcv-values dt { color: var(--text-muted); }
.ohlcv-values dd { margin: 0; color: var(--text-primary); font-weight: 500; }

/* KOL Marker Summary Strip */
.kol-marker-strip {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 5px 14px;
  background: var(--bg-inset);
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-secondary);
}

.kol-marker-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

/* Compact Momentum Subchart Section */
.momentum-section {
  flex-shrink: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 5px 14px;
}

.momentum-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.momentum-switch .interval-btn {
  height: 22px;
  padding: 0 7px;
  font-size: 11px;
}

.momentum-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

#momentumEmpty {
  font-size: 11px;
  color: var(--text-muted);
}

.momentum-chart {
  width: 100%;
  height: 114px;
  margin-top: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
}

/* Empty State */
.empty-workspace {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.empty-card {
  max-width: 400px;
  padding: 24px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.empty-title {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12.5px;
}

/* Center Scrollable Views (Daily Radar & KOL Activity) */
.center-scroll-view {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 32px;
  background: var(--bg-canvas);
}

.daily-radar-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   Zone 4A: Right Shared Switchable Drawer (320px, collapsible to 0px)
   ========================================================================== */
.right-drawer {
  width: var(--drawer-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 25;
}

.right-drawer.is-collapsed {
  width: 0;
  border-left: none;
}

.right-drawer-header {
  height: 39px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.drawer-mode-tab {
  appearance: none;
  position: relative;
  height: 100%;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 110ms ease;
}

.drawer-mode-tab:hover {
  color: var(--text-primary);
}

.drawer-mode-tab.active {
  color: var(--accent);
  font-weight: 600;
}

.drawer-mode-tab.active::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}

.drawer-close-btn {
  appearance: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease;
}

.drawer-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.right-pane {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==========================================================================
   Right Pane 1: Watchlist & Strategy Pools
   ========================================================================== */
.list-nav-bar {
  padding: 7px 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.list-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  width: 100%;
}

.list-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  cursor: pointer;
  transition: color 110ms ease, background-color 110ms ease;
}

.list-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.list-tab.active {
  color: var(--accent);
  background: var(--bg-active);
  font-weight: 600;
}

.tab-count {
  font-size: 10.5px;
  color: var(--text-muted);
}

.list-tab.active .tab-count {
  color: var(--accent);
}

.dropdown-caret {
  font-size: 9px;
  opacity: 0.7;
}

/* Strategy Dropdown */
.strategy-dropdown {
  position: relative;
}

.strategy-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 176px;
  padding: 5px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pop);
  z-index: 60;
}

.strategy-menu-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strategy-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 5px 4px;
}

.strategy-menu-heading {
  padding: 3px 8px 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.strategy-menu-item {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 100ms ease, color 100ms ease;
}

.strategy-menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.strategy-menu-item.active {
  background: var(--bg-active);
  color: var(--accent);
  font-weight: 600;
}

.strategy-item-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.exp-mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  padding: 0 5px;
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
}

.exp-mini-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warn-dot);
}

.kol-pool-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.kol-pool-switch [aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin: 8px 8px 6px;
  flex-shrink: 0;
}

.search-icon {
  position: absolute;
  left: 9px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 30px;
  padding: 0 52px 0 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  outline: none;
}

.search-kbd {
  position: absolute;
  right: 29px;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  pointer-events: none;
}

.search-add-btn {
  position: absolute;
  right: 4px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease, border-color 110ms ease;
}

.search-add-btn:hover {
  background: var(--bg-active);
  border-color: var(--accent-border);
  color: var(--accent);
}

.list-context {
  margin: 0 10px 6px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  flex-shrink: 0;
}

/* Watchlist Rows */
.ticker-list {
  list-style: none;
  margin: 0;
  padding: 2px 6px 8px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
}

.ticker-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 40px;
  min-height: 40px;
  padding: 0 8px 0 10px;
  margin-bottom: 1px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 100ms ease;
}

.ticker-item:hover {
  background: var(--bg-hover);
}

.ticker-item.active {
  background: var(--bg-active);
}

.ticker-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2.5px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}

.ticker-item-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.ticker-item-sym {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.ticker-item.active .ticker-item-sym {
  color: var(--accent);
}

.ticker-item-tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.holding-pnl.is-up { color: var(--up); }
.holding-pnl.is-down { color: var(--down); }

.ticker-item-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.ticker-item-price {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

.ticker-item-chg {
  font-size: 11.5px;
  font-weight: 600;
  min-width: 6.4ch;
  text-align: right;
}

.row-research-btn {
  appearance: none;
  display: none;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.ticker-item.active .row-research-btn,
.ticker-item:hover .row-research-btn {
  display: inline-flex;
}

.row-research-btn:hover {
  border-color: var(--accent-border);
  background: var(--bg-active);
}

/* Soft Macaron Status Dots on Watchlist Rows */
.watch-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border-strong);
}
.watch-status-dot[data-status="resonance"] { background: var(--up-dot); }
.watch-status-dot[data-status="swing"] { background: var(--accent); }
.watch-status-dot[data-status="holding"] { background: var(--purple-dot); }
.watch-status-dot[data-status="strategy"] { background: var(--warn-dot); }

.watch-drag-handle {
  flex: none;
  margin-left: -4px;
  padding: 4px 3px;
  border: 0;
  background: none;
  color: var(--text-muted);
  opacity: 0.45;
  cursor: grab;
  touch-action: none;
}
.watch-drag-handle:hover,
.watch-drag-handle:focus-visible {
  opacity: 1;
  color: var(--text-primary);
}
.ticker-item.watch-dragging { opacity: 0.5; }
.ticker-item.watch-drop-target { outline: 1px dashed var(--accent); outline-offset: -2px; }

.list-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.signal-group-heading {
  margin: 8px 6px 4px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
}

.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-inset);
}

.quick-research-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 110ms ease, color 110ms ease, background-color 110ms ease;
}

.quick-research-btn:hover {
  border-color: var(--accent-border);
  background: var(--bg-active);
  color: var(--accent);
}

.sidebar-kbd-hint {
  color: var(--text-muted);
  font-size: 10.5px;
}

.sidebar-kbd-hint kbd {
  display: inline-block;
  padding: 0 4px;
  margin-right: 2px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Right Pane 2: Streamlined Stock Research Panel (320px single-column flow)
   ========================================================================== */
.research-empty {
  padding: 36px 16px;
}

.detail-content {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.research-context-bar {
  flex-shrink: 0;
  padding: 8px 12px 6px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-subtle);
}

.research-context-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.research-sym {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.ticker-sector {
  font-size: 10.5px;
  color: var(--text-secondary);
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.research-stamp {
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4 Crisp Sub-Tabs inside Research Panel */
.detail-tabs {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 8px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.detail-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 110ms ease, color 110ms ease;
}

.detail-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.detail-tab.active {
  background: var(--bg-active);
  color: var(--accent);
  font-weight: 600;
}

.detail-tab-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text-muted);
  line-height: 1.5;
}

.detail-tab.active .detail-tab-badge {
  background: var(--bg-surface);
  color: var(--accent);
}

/* Tab visibility routing */
#detailContent[data-detail-tab="vision"] #tickerNewsPanel,
#detailContent[data-detail-tab="vision"] #tickerInformationPanel,
#detailContent[data-detail-tab="vision"] #kolPostsPanel,
#detailContent[data-detail-tab="vision"] #kolActionsPanel,
#detailContent[data-detail-tab="vision"] #kolCounter,
#detailContent[data-detail-tab="vision"] #fundamentalsPanel,
#detailContent[data-detail-tab="vision"] .canslim-panel {
  display: none !important;
}

#detailContent[data-detail-tab="news"] #chartVisionPanel,
#detailContent[data-detail-tab="news"] #strategyPlaybookCard,
#detailContent[data-detail-tab="news"] #strategyPlaybookHint,
#detailContent[data-detail-tab="news"] #poolEvidencePanel,
#detailContent[data-detail-tab="news"] #stockAnalysis,
#detailContent[data-detail-tab="news"] #kolPostsPanel,
#detailContent[data-detail-tab="news"] #kolActionsPanel,
#detailContent[data-detail-tab="news"] #kolCounter,
#detailContent[data-detail-tab="news"] #fundamentalsPanel {
  display: none !important;
}

#detailContent[data-detail-tab="kol"] #chartVisionPanel,
#detailContent[data-detail-tab="kol"] #strategyPlaybookCard,
#detailContent[data-detail-tab="kol"] #strategyPlaybookHint,
#detailContent[data-detail-tab="kol"] #poolEvidencePanel,
#detailContent[data-detail-tab="kol"] #stockAnalysis,
#detailContent[data-detail-tab="kol"] #tickerNewsPanel,
#detailContent[data-detail-tab="kol"] #tickerInformationPanel {
  display: none !important;
}

#detailContent[data-detail-tab="canslim"] #chartVisionPanel,
#detailContent[data-detail-tab="canslim"] #strategyPlaybookCard,
#detailContent[data-detail-tab="canslim"] #strategyPlaybookHint,
#detailContent[data-detail-tab="canslim"] #poolEvidencePanel,
#detailContent[data-detail-tab="canslim"] .verdict-grid,
#detailContent[data-detail-tab="canslim"] .levels-panel,
#detailContent[data-detail-tab="canslim"] #tickerNewsPanel,
#detailContent[data-detail-tab="canslim"] #tickerInformationPanel,
#detailContent[data-detail-tab="canslim"] #kolPostsPanel,
#detailContent[data-detail-tab="canslim"] #kolActionsPanel,
#detailContent[data-detail-tab="canslim"] #kolCounter,
#detailContent[data-detail-tab="canslim"] #fundamentalsPanel {
  display: none !important;
}

/* Scrollable Research Body */
.research-scroll-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-canvas);
}

/* Calm Neutral Cards (ZERO rainbow gradients, ZERO thick colored left bars) */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.panel-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.panel-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.panel-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.panel-empty {
  margin: 0;
  padding: 14px 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.vision-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vision-auto-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
}

.vision-auto-label input {
  margin: 0;
  accent-color: var(--accent);
}

/* Shared Neutral Button */
.fit-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: color 110ms ease, background-color 110ms ease, border-color 110ms ease;
}

.fit-btn:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.fit-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.watch-toggle[aria-pressed="true"],
#chartAiLevelsToggle[aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* Restrained Neutral + Macaron Dot Pills across all panels */
.context-pill,
.radar-relay-pill,
.news-status-badge,
.verdict-badge,
.falsify-level,
.rr-badge,
.canslim-grade,
.action-type-pill,
.news-kind-pill,
.excerpt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.context-pill:empty,
.radar-relay-pill:empty {
  display: none;
}

.context-pill.is-experimental::before,
.excerpt-badge::before,
.news-status-badge[data-status="unavailable"]::before,
.news-status-badge[data-status="error"]::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--warn-dot);
}

.radar-relay-pill::before,
.news-status-badge[data-status="local_only"]::before,
.news-kind-pill[data-kind="news"]::before,
.action-type-pill::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--accent);
}

.news-status-badge[data-status="ok"]::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--up-dot);
}

.news-kind-pill[data-kind="event"]::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--purple-dot);
}

.verdict-badge {
  color: var(--text-primary);
}
.verdict-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.verdict-badge[data-verdict="track"]::before { background: var(--up-dot); }
.verdict-badge[data-verdict="watch"]::before { background: var(--warn-dot); }
.verdict-badge[data-verdict="skip"]::before { background: var(--down-dot); }

.canslim-grade {
  color: var(--text-primary);
}
.canslim-grade::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--text-muted);
}
.canslim-grade[data-grade="A"]::before { background: var(--up-dot); }
.canslim-grade[data-grade="B"]::before { background: var(--accent); }
.canslim-grade[data-grade="C"]::before { background: var(--warn-dot); }
.canslim-grade[data-grade="D"]::before { background: var(--down-dot); }

.rr-badge { color: var(--accent); }
.falsify-level { color: var(--text-primary); }

.context-status {
  font-size: 11px;
  color: var(--text-muted);
}

/* MTF Alignment Strip & Vision Anchor Pills (Neutral Mist + Macaron Dot) */
.mtf-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.mtf-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 110ms ease, background-color 110ms ease, color 110ms ease;
}

.mtf-pill::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--text-muted);
}

.mtf-pill[data-bias="bullish"]::before { background: var(--up-dot); }
.mtf-pill[data-bias="bearish"]::before { background: var(--down-dot); }
.mtf-pill[data-bias="range"]::before { background: var(--warn-dot); }

.mtf-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.mtf-pill.is-active {
  background: var(--bg-active);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

.mtf-takeaway {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.vision-anchors-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 4px 0;
}

.vision-anchor-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.vision-anchor-pill::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--accent);
}
.vision-anchor-pill[data-kind="resistance"]::before { background: var(--down-dot); }
.vision-anchor-pill[data-kind="support"]::before { background: var(--up-dot); }
.vision-anchor-pill[data-kind="pivot"]::before { background: var(--accent); }
.vision-anchor-pill[data-kind="momentum"]::before { background: var(--purple-dot); }

.vision-history {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.vision-history summary {
  cursor: pointer;
  color: var(--text-secondary);
}

.vision-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.vision-history-item {
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Analysis Section inside 320px Research Drawer (Clean Vertical Flow) */
.analysis-section,
.verdict-grid,
.metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.verdict-summary,
.falsification-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.6;
}

/* Risk Guard Box (Neutral surface + 6px apricot dot — NEVER loud orange/red box) */
.risk-guard-box {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.5;
}

.risk-guard-dot {
  margin-top: 5px;
}

.risk-guard-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.risk-guard-tag {
  font-weight: 600;
  color: var(--text-primary);
}

.risk-guard-text {
  color: var(--text-secondary);
}

.risk-guard-details {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.risk-guard-details summary {
  cursor: pointer;
  color: var(--accent);
}

/* Compact 2-Column Key Levels Grid */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.level-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.level-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.level-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.level-dot[data-kind="pivot"] { background: var(--up-dot); }
.level-dot[data-kind="chase"] { background: var(--warn-dot); }
.level-dot[data-kind="stop"] { background: var(--down-dot); }
.level-dot[data-kind="falsify"] { background: var(--purple-dot); }
.level-dot[data-kind="support"] { background: var(--accent); }
.level-dot[data-kind="resistance"] { background: var(--text-muted); }

.level-label {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.level-delta {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.level-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.level-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CAN SLIM 7 Factors */
.canslim-head-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.canslim-total {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.canslim-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-row {
  display: grid;
  grid-template-columns: 92px 1fr 40px;
  align-items: center;
  gap: 7px;
}

.cs-name {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-name strong {
  display: inline-block;
  width: 14px;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.cs-track {
  height: 6px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}

.cs-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 240ms ease;
}
.cs-fill[data-tier="high"] { background: var(--up-dot); }
.cs-fill[data-tier="mid"] { background: var(--accent); }
.cs-fill[data-tier="low"] { background: var(--down-dot); }

.cs-score {
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  color: var(--text-primary);
}

.canslim-notes {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pool Evidence & News & KOL inside Research Drawer */
.pool-evidence-body,
.ticker-news-list,
.kol-posts-list,
#kolActions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.exp-isolation-banner {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.5;
}

.exp-isolation-banner::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn-dot);
  margin-top: 5px;
  flex-shrink: 0;
}

.exp-isolation-banner strong {
  color: var(--text-primary);
  margin-right: 4px;
}

.evidence-callout {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.evidence-callout-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.evidence-grid,
.evidence-grid.cols-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.evidence-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.evidence-label { font-size: 10.5px; color: var(--text-muted); }
.evidence-value { font-size: 12.5px; font-weight: 600; color: var(--text-primary); word-break: break-word; }

.evidence-factors-strip,
.pool-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.evidence-factor-chip,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-secondary);
}

.news-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.news-item-main {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.news-title {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-primary);
  text-decoration: none;
  word-break: break-word;
}
a.news-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.kol-post-card {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kol-post-meta,
.kol-post-meta-left,
.kol-post-meta-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.kol-post-author { font-weight: 600; color: var(--text-primary); }

.kol-post-stance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.kol-post-stance::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}
.kol-post-stance[data-stance="bullish"]::before { background: var(--up-dot); }
.kol-post-stance[data-stance="bearish"]::before { background: var(--down-dot); }

.kol-post-price { font-size: 11px; color: var(--accent); }
.kol-post-time { font-size: 11px; color: var(--text-muted); }
.kol-post-link { font-size: 11px; color: var(--accent); text-decoration: none; }
.kol-post-link:hover { text-decoration: underline; }
.kol-post-body { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.kol-post-body.is-muted { color: var(--text-muted); font-size: 11.5px; }

.signal-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--text-secondary);
  font-size: 11.5px;
}
.signal-reference time { color: var(--text-muted); }
.signal-reference a { color: var(--accent); text-decoration: none; }
.signal-reference a:hover { text-decoration: underline; }

.kol-action-row {
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  align-items: center;
}

.action-kv { color: var(--text-secondary); }
.action-kv strong { color: var(--text-primary); font-weight: 600; }

.kol-counter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.kol-source-mention {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11.5px;
}
.kol-source-mention::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--warn-dot);
  align-self: center;
}
.kol-source-mention strong { color: var(--text-primary); }
.kol-source-mention span { color: var(--text-secondary); }

.notebooklm-link {
  color: var(--accent);
}

/* Sticky Concise Research Footer */
.action-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 10px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-row .btn-sm {
  flex: 1;
}

.orca-row {
  justify-content: space-between;
}

.orca-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.orca-templates {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 110ms ease, border-color 110ms ease, color 110ms ease, opacity 110ms ease;
}

.btn-xs {
  height: 25px;
  padding: 0 8px;
  font-size: 11px;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-inset);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-spinner {
  width: 11px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Daily Market Radar (Clean White/Alabaster Cards + Restrained Macaron Dots)
   ========================================================================== */
.daily-radar-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.daily-radar-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.daily-radar-title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
}

.daily-radar-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
}

.daily-radar-meta-badge[data-state="published"]::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--accent);
}

.daily-radar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.daily-radar-history {
  height: 26px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  max-width: 220px;
}

.daily-radar-nlm-btn {
  color: var(--purple);
}

.daily-radar-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.daily-radar-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.daily-radar-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.daily-radar-sec-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.daily-radar-stamp {
  font-size: 11px;
  color: var(--text-muted);
}

.daily-radar-verdict-text {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-primary);
}

.daily-radar-market-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.daily-radar-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.daily-radar-chip-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.daily-radar-chip-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.daily-radar-chip-chg {
  font-size: 11.5px;
  font-weight: 600;
}

.daily-radar-chip-regime {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.daily-radar-macro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-radar-macro-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.daily-radar-macro-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

/* Neutral Mist Impact Pill + 6px Macaron Semantic Dot */
.daily-radar-impact-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  flex-shrink: 0;
}
.daily-radar-impact-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.daily-radar-impact-pill.is-bullish::before { background: var(--up-dot); }
.daily-radar-impact-pill.is-bearish::before { background: var(--down-dot); }
.daily-radar-impact-pill.is-neutral::before { background: var(--text-muted); }

.daily-radar-macro-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}
a.daily-radar-macro-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.daily-radar-macro-source {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.daily-radar-macro-summary {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* 2x2 4-Sector Grid */
.daily-radar-sectors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.daily-radar-sector-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.daily-radar-sector-head {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.daily-radar-sector-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.daily-radar-sector-note {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.daily-radar-ticker-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.daily-radar-ticker-card {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 110ms ease;
}

.daily-radar-ticker-card:hover {
  border-color: var(--border-strong);
}

.daily-radar-ticker-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.daily-radar-symbol-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background-color 110ms ease, border-color 110ms ease;
}

.daily-radar-symbol-btn:hover {
  background: var(--bg-active);
  border-color: var(--accent-border);
}

.daily-radar-ticker-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.daily-radar-ticker-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple-dot);
}

.daily-radar-ticker-quote {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
}

.daily-radar-ticker-price { font-weight: 600; color: var(--text-primary); }
.daily-radar-ticker-chg { font-weight: 600; }

.daily-radar-ticker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.daily-radar-rs-pill,
.daily-radar-ema-pill {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.daily-radar-ticker-comment {
  margin: 0;
  font-size: 12px;
  line-height: 1.48;
  color: var(--text-secondary);
}

.daily-radar-kol-headline {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.daily-radar-kol-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.daily-radar-kol-item {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.daily-radar-kol-author {
  margin-left: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.daily-radar-kol-link {
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--accent);
  text-decoration: none;
}
.daily-radar-kol-link:hover { text-decoration: underline; }

/* ==========================================================================
   KOL Radar Modal, KOL Activity & Quick Symbol Search Modal
   ========================================================================== */
.kol-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 36px));
  padding: 18px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow: auto;
}
.kol-dialog::backdrop,
.symbol-modal::backdrop {
  background: var(--backdrop-bg);
  backdrop-filter: blur(2px);
}

.kol-dialog-heading,
.kol-dialog-nav,
.kol-source-title,
.kol-source-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.kol-dialog-heading {
  justify-content: space-between;
  align-items: center;
}
.kol-dialog-heading h2 { margin: 0; font-size: 16px; font-weight: 700; }
.kol-dialog-nav { margin-block: 10px 14px; }
.kol-dialog-nav [aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--accent);
  border-color: var(--accent-border);
}

.kol-source-list { display: grid; gap: 9px; }
.kol-group-title { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.kol-table-scroll { overflow-x: auto; }
.kol-source-table { width: 100%; min-width: 480px; border-collapse: collapse; text-align: left; font-size: 12px; }
.kol-source-table th,
.kol-source-table td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.kol-source-table th { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.kol-source-table small { display: block; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }
.kol-source-entry { padding: 9px 0; border-bottom: 1px solid var(--border-subtle); }
.kol-source-entry:last-child { border-bottom: none; }
.kol-source-title time,
.kol-source-meta { color: var(--text-muted); font-size: 11.5px; }
.kol-source-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0; font-size: 12.5px; color: var(--text-primary); }
.kol-source-link { color: var(--accent); text-decoration: none; }
.kol-source-link:hover { text-decoration: underline; }

.kol-ticker-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kol-ticker-pill {
  appearance: none;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.kol-ticker-pill:hover {
  background: var(--bg-active);
  border-color: var(--accent-border);
}

.kol-channel-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kol-channel-toolbar select {
  max-width: 180px;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}

.kol-daily-brief {
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.kol-daily-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(225px, 100%), 1fr));
  gap: 12px;
}
.kol-daily-section { min-width: 0; }
.kol-daily-section h3 { margin: 0 0 6px; font-size: 13px; color: var(--text-primary); }
.kol-daily-point + .kol-daily-point { margin-top: 8px; }
.kol-daily-point p { margin: 0 0 3px; overflow-wrap: anywhere; }
.kol-daily-refs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; }

/* Quick Symbol Search Modal (⌘K) */
.symbol-modal {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  margin-top: 10vh;
}

.symbol-modal-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.symbol-modal-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.symbol-modal-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
}

.symbol-modal-input::placeholder {
  color: var(--text-muted);
}

.symbol-modal-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.symbol-modal-close {
  appearance: none;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  cursor: pointer;
}

.symbol-modal-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.symbol-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 90ms ease;
}

.symbol-modal-item:hover,
.symbol-modal-item.is-focused {
  background: var(--bg-active);
}

.symbol-modal-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.symbol-modal-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.symbol-modal-name {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.symbol-modal-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.symbol-modal-add {
  appearance: none;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.symbol-modal-add:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--bg-active);
}

.symbol-modal-add.is-watched {
  color: var(--up);
  border-color: var(--border-subtle);
}

.symbol-modal-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  font-size: 11px;
  color: var(--text-muted);
}

.symbol-modal-foot kbd {
  padding: 1px 4px;
  margin-right: 3px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* Toast */
.toast-container {
  position: fixed;
  right: 54px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 120;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  box-shadow: var(--shadow-pop);
  animation: toastIn 150ms ease-out;
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.toast[data-type="success"]::before { background: var(--up-dot); }
.toast[data-type="error"]::before { background: var(--down-dot); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Tuning: Rock-Solid Zero-Overflow at 1440px AND 1100px
   ========================================================================== */
@media (max-width: 1360px) {
  .topbar {
    gap: 5px;
    padding: 0 7px;
  }
  .topbar-left,
  .topbar-right {
    gap: 4px;
  }
  .brand-name {
    font-size: 12px;
  }
  .tv-symbol-btn {
    padding: 0 6px;
    font-size: 12px;
    gap: 4px;
  }
  .tv-kbd {
    display: none;
  }
  .interval-btn {
    padding: 0 5px;
    font-size: 11px;
  }
  .tb-btn,
  .tb-nav-btn {
    padding: 0 6px;
    font-size: 11.5px;
  }
  .macro-window {
    max-width: 82px;
    padding: 0 6px;
    font-size: 11px;
  }
  .benchmark {
    padding: 0 5px;
    gap: 3px;
  }
  .status-lamp {
    padding: 0 6px;
    font-size: 11px;
  }
  .status-lamp-score {
    display: none;
  }
  .theme-label {
    display: none;
  }
  .theme-toggle-btn {
    padding: 0 7px;
  }
}

@media (max-width: 1240px) {
  :root {
    --drawer-w: 296px;
  }
  .brand-name {
    display: none;
  }
  .topbar-sep {
    display: none;
  }
  .benchmark:not(.vix-benchmark) .ticker-item-price {
    display: none;
  }
  .quote-name,
  .chart-as-of {
    display: none;
  }
  .quote-bar {
    padding: 6px 10px;
    gap: 6px;
  }
  .quote-bar-left {
    gap: 6px;
  }
}

@media (max-width: 900px) {
  .daily-radar-sectors-grid {
    grid-template-columns: 1fr;
  }
  .benchmark-strip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Watchlist 3-Style Strategy Playbook Card (Restrained TradingView Minimalist)
   ========================================================================== */
.playbook-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playbook-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.playbook-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.playbook-project-btn[aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 600;
}

.playbook-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.playbook-equity-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.playbook-equity-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.playbook-equity-box {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  transition: border-color 110ms ease, background-color 110ms ease;
}

.playbook-equity-box:focus-within {
  border-color: var(--accent-border);
  background: var(--bg-surface);
}

.playbook-equity-prefix {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}

.playbook-equity-input {
  width: 68px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
  outline: none;
  -moz-appearance: textfield;
}

.playbook-equity-input::-webkit-outer-spin-button,
.playbook-equity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.playbook-atr-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.playbook-env-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.playbook-style-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.playbook-style-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  height: 26px;
  padding: 0 4px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 110ms ease, color 110ms ease, border-color 110ms ease;
}

.playbook-style-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.playbook-style-btn.active {
  background: var(--bg-active);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 600;
}

.playbook-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.playbook-loading,
.playbook-empty {
  margin: 0;
  padding: 10px 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}

.playbook-trend-note {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* 3-Column Compact Discipline Metrics */
.playbook-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.playbook-metric-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.playbook-metric-label {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.playbook-metric-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.playbook-metric-val.is-stop {
  color: var(--down);
}

.playbook-metric-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playbook-metric-sub.is-down {
  color: var(--down);
}

/* Tranche Plan Rows */
.playbook-tranches {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
}

.playbook-tranche-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 8px;
}

.playbook-tranche-row + .playbook-tranche-row {
  border-top: 1px solid var(--border-subtle);
}

.playbook-tranche-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.playbook-tranche-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.playbook-tranche-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text-secondary);
}

.playbook-tranche-size {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.playbook-tranche-zone {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
}

.playbook-tranche-trigger {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Targets Strip */
.playbook-targets-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-secondary);
}

.playbook-target-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.playbook-target-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.playbook-stop-note {
  margin: 0;
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Integrated Info & KOL Digest Sub-Blocks */
.playbook-subblock {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.playbook-subblock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.playbook-subblock-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.playbook-subblock-meta {
  font-size: 10px;
  color: var(--text-muted);
}

.playbook-digest-line {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.48;
  word-break: break-word;
}

.playbook-digest-note {
  margin: 0;
  padding: 5px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.48;
}

.playbook-digest-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.playbook-digest-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.playbook-digest-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  min-width: 0;
}

.playbook-digest-title {
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.38;
  word-break: break-word;
}

.playbook-digest-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 10.5px;
  flex-shrink: 0;
}

.playbook-digest-link:hover {
  text-decoration: underline;
}

.playbook-digest-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
}

.playbook-trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  min-width: 0;
}

.playbook-trade-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playbook-trade-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.playbook-nonwatch-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
}

.playbook-hint-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ── Orca / MCP Agent Bridge Pill & Toast ────────────────────────────────── */
.agent-ann-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.agent-toast {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1200;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--tv-panel-bg, #ffffff);
  color: var(--tv-text, #131722);
  border: 1px solid var(--tv-border, #e0e3eb);
  box-shadow: 0 4px 14px rgba(19, 23, 34, 0.12);
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.agent-toast.hidden {
  display: none;
  opacity: 0;
}

/* ── Team Auth Gate, Account Pill & Change Password Modal ────────────────── */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-canvas);
}

.auth-gate.hidden {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  padding: 26px 24px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pop);
}

.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 20px;
}

.auth-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.auth-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-input {
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
}

.auth-error {
  margin: 0;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--down-soft);
  border: 1px solid var(--down-border);
  color: var(--down);
  font-size: 12px;
  line-height: 1.4;
}

.auth-error.hidden {
  display: none;
}

.auth-submit {
  height: 36px;
  margin-top: 2px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.auth-submit:hover:not(:disabled) {
  opacity: 0.92;
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-submit-sm {
  height: 30px;
  padding: 0 14px;
  margin-top: 0;
  font-size: 12px;
}

.auth-user-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.auth-user-wrap.hidden {
  display: none;
}

.auth-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.auth-user-pill:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.auth-user-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up-dot);
  flex-shrink: 0;
}

.auth-user-dot[data-role="admin"] {
  background: var(--accent);
}

.auth-user-menu {
  right: 0;
  min-width: 156px;
  padding: 6px;
}

.auth-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-menu-uid {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-menu-role {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text-secondary);
}

.auth-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.auth-menu-item:hover {
  background: var(--bg-hover);
}

.auth-menu-item.is-danger {
  color: var(--down);
}

.auth-menu-item.is-danger:hover {
  background: var(--down-soft);
}

.auth-dialog {
  width: min(360px, calc(100vw - 32px));
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-pop);
}

.auth-dialog::backdrop {
  background: var(--backdrop-bg);
}

.auth-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.auth-dialog-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 1460px) {
  .brand-name,
  .tv-kbd,
  .theme-label {
    display: none;
  }
  .macro-window {
    max-width: 92px;
  }
  .benchmark {
    padding: 0 5px;
    font-size: 11px;
  }
  .topbar {
    gap: 5px;
  }
  .topbar-left,
  .topbar-right {
    gap: 4px;
  }
}

@media (max-width: 1280px) {
  .benchmark-strip .benchmark[data-benchmark="BTC-USD"],
  .macro-wrap,
  .topbar-nav-group {
    display: none;
  }
}


