/* ==========================================================================
   Perspective Lenses Workspace (body.ec-layout-lenses)
   Inspired by Linear, Koyfin, Stripe, and TradingView:
   - Crisp 1px hairlines, calm flat surfaces, zero nested gradient clutter
   - 2-Row Compact Control Deck (1-line ticker ribbon + expandable tray)
   - Left Vertical "Perspective Lenses" Rail (collapsible to icon rail)
   - Single focused Active Lens Stage
   ========================================================================== */

/* Hide Lenses-only DOM elements when in Classic mode */
body:not(.ec-layout-lenses) #ec-compact-ticker-ribbon,
body:not(.ec-layout-lenses) #perspective-lenses-rail,
body:not(.ec-layout-lenses) #ec-table-nav-toolbar,
body:not(.ec-layout-lenses) #ec-table-column-filter,
body:not(.ec-layout-lenses) #ec-tray-close-bar,
body:not(.ec-layout-lenses) #ec-timeframe-readout,
body:not(.ec-layout-lenses) #ec-briefing-jump-pill,
body:not(.ec-layout-lenses) #xy-lens-section {
  display: none !important;
}

/* ==========================================================================
   1. Header Switcher: [Classic | Perspective Lenses]
   ========================================================================== */
.ec-layout-switcher[hidden] {
  display: none !important;
}

.ec-layout-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-right: 4px;
}

[data-theme="dark"] .ec-layout-switcher {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.ec-layout-switcher__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.ec-layout-switcher__btn:hover {
  color: #0f172a;
}

[data-theme="dark"] .ec-layout-switcher__btn {
  color: #94a3b8;
}

[data-theme="dark"] .ec-layout-switcher__btn:hover {
  color: #f8fafc;
}

.ec-layout-switcher__btn.is-active {
  background: #ffffff;
  color: #3b5bdb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(59, 91, 219, 0.14);
}

[data-theme="dark"] .ec-layout-switcher__btn.is-active {
  background: #1e293b;
  color: #93c5fd;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(147, 197, 253, 0.22);
}

.ec-layout-switcher__icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ==========================================================================
   2. App Shell & Top-Level De-Cluttering in Perspective Lenses Mode
   ========================================================================== */
body.ec-layout-lenses {
  background: #f8fafc;
}

[data-theme="dark"] body.ec-layout-lenses {
  background: #0b0f17;
}

body.ec-layout-lenses .app-shell {
  padding-top: 0.65rem;
  gap: 0.65rem;
}

/* Streamline header: hide newsletter bar, tagline tour pills, hint rotator,
   results overview strip, and redundant bottom utility bar so the workspace
   starts immediately at the top of the screen. */
body.ec-layout-lenses .qc-nl-sliver--ec-app,
body.ec-layout-lenses .hint-rotator,
body.ec-layout-lenses #results-overview,
body.ec-layout-lenses #utility-bar {
  display: none !important;
}

body.ec-layout-lenses .app-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  flex-wrap: nowrap !important;
  padding: 0.45rem 0 0.55rem !important;
  margin-bottom: 0 !important;
}

/* Three-Column Brand & Center Pills Layout:
   Left:   [Mark Icon (54×44)]  EasyCompare (23px)
                                In-depth visual and quantitative perspective for your investments (13.5px)
   Center: [▶ Feature Tour ↗] [📖 Tutorial ↗] */
body.ec-layout-lenses .title-stack {
  display: grid !important;
  grid-template-columns: auto auto 1fr !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 14px !important;
  row-gap: 3px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body.ec-layout-lenses .app-logo.ec-brand-logo {
  display: contents !important;
  height: auto !important;
  min-height: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  background-image: none !important;
}

body.ec-layout-lenses .app-logo.ec-brand-logo .ec-brand-logo__mark {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 54px !important;
  height: 44px !important;
  align-self: center !important;
}

body.ec-layout-lenses .app-logo.ec-brand-logo .ec-brand-logo__word {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 23px !important;
  font-weight: 800 !important;
  letter-spacing: -0.032em !important;
  line-height: 1.08 !important;
  align-self: end !important;
}

body.ec-layout-lenses .app-tagline {
  display: contents !important;
}

body.ec-layout-lenses .app-tagline-lead {
  grid-column: 2 !important;
  grid-row: 2 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: #334155 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  align-self: start !important;
}

[data-theme="dark"] body.ec-layout-lenses .app-tagline-lead {
  color: #94a3b8 !important;
}

body.ec-layout-lenses .tagline-pills {
  grid-column: 3 !important;
  grid-row: 1 / span 2 !important;
  justify-self: center !important;
  align-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

body.ec-layout-lenses .app-tagline .tagline-tour-pill {
  height: 30px !important;
  font-size: 12.5px !important;
  padding: 0 12px 0 10px !important;
  margin-left: 0 !important;
}

body.ec-layout-lenses .app-tagline .tagline-tour-pill svg,
body.ec-layout-lenses .app-tagline .tagline-tour-pill i {
  width: 13.5px !important;
  height: 13.5px !important;
}

/* Compact Right-Side Header Controls:
   - Server status shows only the glowing green/amber/red dot (details on hover)
   - Share button is a clean icon-only button (details on hover) */
body.ec-layout-lenses .header-controls {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
  --header-control-height: 32px;
}

body.ec-layout-lenses .header-controls .server-status {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  cursor: help !important;
}

body.ec-layout-lenses .header-controls .server-status .server-status-text {
  display: none !important;
}

body.ec-layout-lenses .header-controls .server-status .server-status-dot {
  width: 8px !important;
  height: 8px !important;
}

body.ec-layout-lenses #share-button {
  width: 32px !important;
  padding: 0 !important;
}

body.ec-layout-lenses #share-button > span {
  display: none !important;
}

@media (max-width: 1220px) {
  body.ec-layout-lenses .app-header {
    flex-wrap: wrap !important;
  }
  body.ec-layout-lenses .app-tagline-lead {
    display: none !important;
  }
}

/* ==========================================================================
   3. Compact 2-Row Control Deck (.controls-panel)
   ========================================================================== */
body.ec-layout-lenses .controls-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02) !important;
  padding: 0 !important;
  margin-bottom: 0.25rem !important;
  overflow: visible !important;
}

[data-theme="dark"] body.ec-layout-lenses .controls-panel {
  background: #111622 !important;
  border-color: #232b3b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

/* Hide legacy Essentials | Configuration tab bar & collapse button */
body.ec-layout-lenses .controls-panel > .controls-tabs,
body.ec-layout-lenses .controls-collapse-btn,
body.ec-layout-lenses .controls-collapsed-summary {
  display: none !important;
}

/* Row 1: Watchlist Selector + Compact 1-Line Ticker Ribbon + Benchmark/Config */
body.ec-layout-lenses .comparison-sets-row {
  margin: 0 !important;
  padding: 8px 12px !important;
  border: none !important;
  border-bottom: 1px solid #eef2f6 !important;
  background: transparent !important;
  border-radius: 12px 12px 0 0 !important;
}

[data-theme="dark"] body.ec-layout-lenses .comparison-sets-row {
  border-bottom-color: #1e2636 !important;
}

body.ec-layout-lenses .comparison-sets-container {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
}

body.ec-layout-lenses .comparison-sets-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  margin: 0 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

body.ec-layout-lenses .comparison-sets-label .help-icon {
  display: none !important;
}

body.ec-layout-lenses .comparison-sets-controls {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-wrapper {
  width: 265px !important;
  min-width: 220px !important;
  max-width: 300px !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-control {
  min-height: 32px !important;
  height: 32px !important;
  padding: 2px 26px 2px 10px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-control .comparison-set-item {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-control .comparison-set-item .set-name,
body.ec-layout-lenses .comparison-sets-controls .ts-control .comparison-set-item > span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-control input {
  font-size: 12.5px !important;
  min-width: 2px !important;
}

/* Make the Comparison List dropdown popover much wider than the compact input
   control so long list names fit on one clean line with ticker count beside them */
body.ec-layout-lenses .comparison-sets-controls .ts-dropdown {
  width: 380px !important;
  min-width: 380px !important;
  max-width: min(440px, 92vw) !important;
  max-height: 440px !important;
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="dark"] body.ec-layout-lenses .comparison-sets-controls .ts-dropdown {
  border-color: #2e384d !important;
  background: #111622 !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .ts-dropdown-content {
  max-height: 432px !important;
  padding: 4px !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .option {
  padding: 0 !important;
  border-radius: 7px !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .comparison-set-option:not(.collection-option) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 7px 10px !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .comparison-set-option .set-row {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .comparison-set-option .set-name {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .comparison-set-option .set-info {
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

[data-theme="dark"] body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .comparison-set-option .set-info {
  color: #94a3b8 !important;
}

body.ec-layout-lenses .comparison-sets-controls .ts-dropdown .optgroup-header {
  padding: 6px 10px 4px !important;
  font-size: 10.5px !important;
  letter-spacing: 0.06em !important;
}

[data-theme="dark"] body.ec-layout-lenses .comparison-sets-controls .ts-control {
  border-color: #2e384d !important;
  background: #161d2b !important;
}

body.ec-layout-lenses .set-menu-btn {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 7px !important;
}

body.ec-layout-lenses .collections-browse-btn {
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

/* Compact 1-Line Ticker Ribbon inside Row 1 */
.ec-ticker-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid #e2e8f0;
}

[data-theme="dark"] .ec-ticker-ribbon {
  border-left-color: #232b3b;
}

.ec-ribbon-add-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(59, 91, 219, 0.28);
  background: rgba(59, 91, 219, 0.06);
  color: #3b5bdb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

.ec-ribbon-add-btn:hover {
  background: rgba(59, 91, 219, 0.12);
  border-color: rgba(59, 91, 219, 0.45);
}

[data-theme="dark"] .ec-ribbon-add-btn {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

/* Single-line horizontal chip viewport with right fade mask */
.ec-ribbon-chips-viewport {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}

.ec-ribbon-chips-viewport::-webkit-scrollbar {
  display: none;
}

.ec-ribbon-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 14px 2px 0;
  white-space: nowrap;
}

.ec-ribbon-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px 0 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.ec-ribbon-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.ec-ribbon-chip.is-highlighted {
  background: rgba(59, 91, 219, 0.1);
  border-color: #3b5bdb;
  color: #1e3a8a;
  box-shadow: 0 0 0 1px rgba(59, 91, 219, 0.2);
}

[data-theme="dark"] .ec-ribbon-chip {
  background: #182030;
  border-color: #283248;
  color: #e2e8f0;
}

[data-theme="dark"] .ec-ribbon-chip:hover {
  background: #1f293d;
  border-color: #384663;
}

[data-theme="dark"] .ec-ribbon-chip.is-highlighted {
  background: rgba(96, 165, 250, 0.18);
  border-color: #60a5fa;
  color: #f8fafc;
}

.ec-ribbon-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ec-ribbon-chip__sym {
  letter-spacing: 0.01em;
}

.ec-ribbon-chip__rm {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 1px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 100ms ease, background 100ms ease, color 100ms ease;
}

.ec-ribbon-chip:hover .ec-ribbon-chip__rm {
  opacity: 1;
}

.ec-ribbon-chip__rm:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* Right cluster inside Row 1 */
.ec-ribbon-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ec-ribbon-apply-pill {
  appearance: none;
  height: 28px;
  padding: 0 11px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.ec-ribbon-apply-pill:hover {
  background: #1d4ed8;
}

.ec-ribbon-expand-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ec-ribbon-expand-btn:hover,
.ec-ribbon-expand-btn.is-open {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3b5bdb;
}

[data-theme="dark"] .ec-ribbon-expand-btn {
  background: #161d2b;
  border-color: #2a3449;
  color: #cbd5e1;
}

[data-theme="dark"] .ec-ribbon-expand-btn:hover,
[data-theme="dark"] .ec-ribbon-expand-btn.is-open {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

.ec-ribbon-count {
  font-variant-numeric: tabular-nums;
}

.ec-ribbon-expand-label {
  color: #3b5bdb;
  font-weight: 700;
}

[data-theme="dark"] .ec-ribbon-expand-label {
  color: #93c5fd;
}

.ec-ribbon-caret {
  transition: transform 150ms ease;
}

.ec-ribbon-expand-btn.is-open .ec-ribbon-caret,
.ec-deck-bench-btn.is-open .ec-ribbon-caret {
  transform: rotate(180deg);
}

.ec-ribbon-divider {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
}

[data-theme="dark"] .ec-ribbon-divider {
  background: #232b3b;
}

.ec-deck-bench-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease;
}

.ec-deck-bench-btn:hover,
.ec-deck-bench-btn.is-open {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3b5bdb;
}

[data-theme="dark"] .ec-deck-bench-btn {
  background: #161d2b;
  border-color: #2a3449;
  color: #cbd5e1;
}

.ec-deck-bench-prefix {
  color: #64748b;
  font-size: 11px;
}

.ec-deck-bench-ticker {
  font-weight: 700;
  color: #0f172a;
}

[data-theme="dark"] .ec-deck-bench-ticker {
  color: #f8fafc;
}

/* ==========================================================================
   Expandable Ticker Tray & Config Drawer (Hidden by default in Lenses mode)
   ========================================================================== */
body.ec-layout-lenses #tab-content-essentials {
  display: block !important;
  padding: 0 !important;
}

body.ec-layout-lenses .control-section-tickers {
  display: none !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  background: #f8fafc !important;
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

[data-theme="dark"] body.ec-layout-lenses .control-section-tickers {
  background: #0e131d !important;
  border-bottom-color: #1e2636 !important;
}

body.ec-layout-lenses .controls-panel.is-ticker-tray-open .control-section-tickers {
  display: block !important;
}

.ec-tray-close-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

[data-theme="dark"] .ec-tray-close-bar {
  border-top-color: #232b3b;
}

.ec-tray-close-hint {
  font-size: 11.5px;
  color: #64748b;
}

.ec-tray-close-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10.5px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.ec-tray-close-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ec-tray-close-btn:hover {
  background: #f1f5f9;
}

/* Config Tray (#tab-content-configuration) */
body.ec-layout-lenses #tab-content-configuration {
  display: none !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="dark"] body.ec-layout-lenses #tab-content-configuration {
  background: #0e131d !important;
  border-bottom-color: #1e2636 !important;
}

body.ec-layout-lenses .controls-panel.is-config-tray-open #tab-content-configuration {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 14px !important;
}

/* ==========================================================================
   Row 2: Timeframe & Scenarios Bar (.control-section-timeframe)
   ========================================================================== */
body.ec-layout-lenses .control-section-timeframe {
  margin: 0 !important;
  padding: 6px 12px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.ec-layout-lenses .timeframe-line {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

body.ec-layout-lenses .control-section-timeframe .scenario-select-wrap {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
}

body.ec-layout-lenses .control-section-timeframe .scenario-select-wrap #important-period-select {
  width: 122px !important;
  min-width: 0 !important;
  height: 30px !important;
  line-height: 28px !important;
  padding: 0 24px 0 28px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #f8fafc !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  color: #334155 !important;
  box-shadow: none !important;
  outline: none !important;
}

body.ec-layout-lenses .control-section-timeframe .scenario-select-wrap #important-period-select:hover {
  background-color: #eef2ff !important;
  border-color: #a5b4fc !important;
  color: #3b5bdb !important;
}

body.ec-layout-lenses .control-section-timeframe .scenario-select-wrap #important-period-select:focus-visible {
  border-color: #3b5bdb !important;
  box-shadow: 0 0 0 2px rgba(59, 91, 219, 0.15) !important;
}

body.ec-layout-lenses .control-section-timeframe .scenario-select-wrap.is-active #important-period-select {
  background-color: #3b5bdb !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  border-color: #3b5bdb !important;
  color: #ffffff !important;
}

[data-theme="dark"] body.ec-layout-lenses .control-section-timeframe .scenario-select-wrap #important-period-select {
  background-color: #161d2b !important;
  border-color: #2a3449 !important;
  color: #cbd5e1 !important;
}

body.ec-layout-lenses .control-section-timeframe .scenario-select-icon {
  position: absolute !important;
  left: 9px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 14px !important;
  height: 14px !important;
  color: #3b5bdb !important;
  pointer-events: none !important;
}

body.ec-layout-lenses .control-section-timeframe .scenario-select-wrap.is-active .scenario-select-icon {
  color: #ffffff !important;
}

body.ec-layout-lenses .preset-buttons {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  gap: 1px !important;
  padding: 2px 3px !important;
  border-radius: 8px !important;
}

body.ec-layout-lenses .preset-buttons::-webkit-scrollbar {
  display: none !important;
}

body.ec-layout-lenses .preset-button {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 6.5px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  font-variant-numeric: tabular-nums !important;
  flex-shrink: 0 !important;
}

body.ec-layout-lenses .control-section-timeframe .custom-range-toggle {
  width: 30px !important;
  height: 30px !important;
  border-radius: 7px !important;
}

body.ec-layout-lenses .control-section-timeframe .custom-range-toggle svg {
  width: 15px !important;
  height: 15px !important;
}

/* Active Period Readout on the right side of Row 2 */
.ec-timeframe-readout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="dark"] .ec-timeframe-readout {
  background: #161d2b;
  border-color: #263147;
  color: #94a3b8;
}

.ec-timeframe-readout__badge {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(59, 91, 219, 0.1);
  color: #3b5bdb;
  font-weight: 700;
  font-size: 11px;
}

[data-theme="dark"] .ec-timeframe-readout__badge {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

.ec-timeframe-readout__dates {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ==========================================================================
   4. Workspace Grid: Left Vertical "Perspective Lenses" Rail + Active Stage
   ========================================================================== */
body.ec-layout-lenses main.content {
  display: grid !important;
  grid-template-columns: 248px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
}

body.ec-layout-lenses.ec-lens-rail-collapsed main.content {
  grid-template-columns: 56px minmax(0, 1fr) !important;
}

/* Left Vertical Rail */
.ec-lens-rail {
  position: sticky;
  top: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02);
  user-select: none;
  transition: width 150ms ease, padding 150ms ease;
}

[data-theme="dark"] .ec-lens-rail {
  background: #111622;
  border-color: #232b3b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.ec-lens-rail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

[data-theme="dark"] .ec-lens-rail__header {
  border-bottom-color: #1e2636;
}

.ec-lens-rail__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3b5bdb;
  white-space: nowrap;
}

.ec-lens-rail__eyebrow .help-icon {
  margin-left: 1px;
  vertical-align: middle;
}

[data-theme="dark"] .ec-lens-rail__eyebrow {
  color: #93c5fd;
}

.ec-lens-rail__collapse-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 150ms ease;
}

.ec-lens-rail__collapse-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="dark"] .ec-lens-rail__collapse-btn:hover {
  background: #1e293b;
  color: #f8fafc;
}

.ec-lens-rail.is-collapsed .ec-lens-rail__collapse-btn svg {
  transform: rotate(180deg);
}

.ec-lens-rail__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ec-lens-group[hidden],
.ec-lens-item[hidden],
.ec-lens-item__badge[hidden],
.ec-ribbon-apply-pill[hidden],
.ec-timeframe-readout[hidden] {
  display: none !important;
}

.ec-lens-group__title {
  padding: 2px 8px 5px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

[data-theme="dark"] .ec-lens-group__title {
  color: #94a3b8;
}

.ec-lens-group__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ec-lens-item {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ec-lens-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

[data-theme="dark"] .ec-lens-item {
  color: #cbd5e1;
}

[data-theme="dark"] .ec-lens-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;
}

.ec-lens-item.is-active {
  background: rgba(59, 91, 219, 0.07);
  border-color: rgba(59, 91, 219, 0.2);
  color: #1e3a8a;
}

.ec-lens-item.is-active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #3b5bdb;
}

[data-theme="dark"] .ec-lens-item.is-active {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.3);
  color: #f8fafc;
}

[data-theme="dark"] .ec-lens-item.is-active::before {
  background: #60a5fa;
}

.ec-lens-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #475569;
  flex-shrink: 0;
  transition: background 120ms ease, color 120ms ease;
}

.ec-lens-item__icon svg {
  width: 15px;
  height: 15px;
}

[data-theme="dark"] .ec-lens-item__icon {
  background: #1a2234;
  color: #94a3b8;
}

.ec-lens-item.is-active .ec-lens-item__icon {
  background: #3b5bdb;
  color: #ffffff;
}

[data-theme="dark"] .ec-lens-item.is-active .ec-lens-item__icon {
  background: #3b82f6;
  color: #ffffff;
}

.ec-lens-item__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.ec-lens-item__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ec-lens-item__title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ec-lens-item.is-active .ec-lens-item__title {
  font-weight: 700;
}

.ec-lens-item__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ec-lens-item.is-active .ec-lens-item__badge {
  background: rgba(59, 91, 219, 0.16);
  color: #3b5bdb;
}

[data-theme="dark"] .ec-lens-item__badge {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.ec-lens-item__subtitle {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

[data-theme="dark"] .ec-lens-item__subtitle {
  color: #94a3b8;
}

/* Collapsed Icon-Only Rail State */
.ec-lens-rail.is-collapsed {
  padding: 10px 6px;
}

.ec-lens-rail.is-collapsed .ec-lens-rail__brand,
.ec-lens-rail.is-collapsed .ec-lens-group__title,
.ec-lens-rail.is-collapsed .ec-lens-item__body {
  display: none !important;
}

.ec-lens-rail.is-collapsed .ec-lens-rail__header {
  justify-content: center;
  padding: 2px 0 8px;
}

.ec-lens-rail.is-collapsed .ec-lens-item {
  justify-content: center;
  padding: 6px;
}

/* Instant Popover Tooltip for Collapsed Lens Icons */
.ec-lens-rail-tooltip {
  position: fixed;
  z-index: 9500;
  pointer-events: none;
  min-width: 190px;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 9px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25), 0 2px 6px rgba(15, 23, 42, 0.14);
}

.ec-lens-rail-tooltip[hidden] {
  display: none !important;
}

.ec-lens-rail-tooltip::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(-50%) rotate(45deg);
}

.ec-lens-rail-tooltip__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ec-lens-rail-tooltip__title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.ec-lens-rail-tooltip__badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.22);
  color: #93c5fd;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ec-lens-rail-tooltip__subtitle {
  margin-top: 3px;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

/* ==========================================================================
   5. Active Lens Stage (Right Column)
   ========================================================================== */
body.ec-layout-lenses .ec-lens-hidden {
  display: none !important;
}

/* Clean flat institutional surfaces for the active stage cards */
body.ec-layout-lenses .chart-section,
body.ec-layout-lenses .table-section,
body.ec-layout-lenses .briefing-card,
body.ec-layout-lenses .xy-lens-section {
  grid-column: 2 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02) !important;
}

body.ec-layout-lenses .table-section {
  overflow: hidden !important;
}

body.ec-layout-lenses .table-scroll-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}

[data-theme="dark"] body.ec-layout-lenses .chart-section,
[data-theme="dark"] body.ec-layout-lenses .table-section,
[data-theme="dark"] body.ec-layout-lenses .briefing-card,
[data-theme="dark"] body.ec-layout-lenses .xy-lens-section {
  background: #111622 !important;
  border-color: #232b3b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

/* Hide redundant horizontal chart-tabs bar & duplicate period badges inside stage */
body.ec-layout-lenses #chart-tabs,
body.ec-layout-lenses #chart-period-chip,
body.ec-layout-lenses #table-period-chip {
  display: none !important;
}

/* Keep both Dashboard rows (Basic + Quant metrics) visible and collapsible */
body.ec-layout-lenses #chart-dashboard {
  margin: 4px 0 12px 0 !important;
}

body.ec-layout-lenses #chart-dashboard-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 6px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

body.ec-layout-lenses #chart-dashboard-toggle:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3b5bdb;
}

[data-theme="dark"] body.ec-layout-lenses #chart-dashboard-toggle {
  background: #161d2b;
  border-color: #2e384d;
  color: #cbd5e1;
}

/* Warning Callout Banner for Late-Starting Tickers (#status-section) */
.status-section {
  margin: 10px 0 6px !important;
}

.alignment-note.alignment-note--warning {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 8px 13px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(217, 119, 6, 0.06);
}

[data-theme="dark"] .alignment-note.alignment-note--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.alignment-note.alignment-note--warning .alignment-note-icon {
  color: #d97706;
}

[data-theme="dark"] .alignment-note.alignment-note--warning .alignment-note-icon {
  color: #fbbf24;
}

.alignment-note.alignment-note--warning .alignment-note-icon i,
.alignment-note.alignment-note--warning .alignment-note-icon svg {
  width: 15px;
  height: 15px;
}

.alignment-note.alignment-note--warning .alignment-note-summary {
  font-weight: 600;
  color: #78350f;
  text-decoration-color: rgba(180, 83, 9, 0.45);
}

[data-theme="dark"] .alignment-note.alignment-note--warning .alignment-note-summary {
  color: #fef3c7;
  text-decoration-color: rgba(253, 230, 138, 0.45);
}

.alignment-note-hint {
  color: #92400e;
  opacity: 0.9;
}

[data-theme="dark"] .alignment-note-hint {
  color: #fde68a;
}

.alignment-note.alignment-note--warning .alignment-note-action {
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.28);
  color: #92400e;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.alignment-note.alignment-note--warning .alignment-note-action:hover {
  background: rgba(217, 119, 6, 0.2);
  border-color: rgba(217, 119, 6, 0.45);
  text-decoration: none;
}

[data-theme="dark"] .alignment-note.alignment-note--warning .alignment-note-action {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fef3c7;
}

/* Hide visual version chip; version is shown as native tooltip on hover of Comparison List */
#account-version-chip {
  display: none !important;
}

body.ec-layout-lenses .chart-section {
  padding: 14px 18px !important;
}

body.ec-layout-lenses .chart-header {
  margin-bottom: 8px !important;
}

body.ec-layout-lenses .chart-header-titlerow {
  gap: 6px !important;
}

/* Streamline Quantitative Rankings Lens Header & Table */
body.ec-layout-lenses .table-section {
  padding: 16px 18px !important;
}

body.ec-layout-lenses .table-section .table-title-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

body.ec-layout-lenses .table-section .table-title-left {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
}

body.ec-layout-lenses #rankings-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.ec-layout-lenses .table-section .rankings-subtitle,
body.ec-layout-lenses .table-section .table-category-toggles,
body.ec-layout-lenses #ranking-table thead tr.explanation-row {
  display: none !important;
}

body.ec-layout-lenses #ranking-table.has-column-explanations thead tr:not(.explanation-row) > th {
  border-bottom: 2px solid #e2e8f0 !important;
}

[data-theme="dark"] body.ec-layout-lenses #ranking-table.has-column-explanations thead tr:not(.explanation-row) > th {
  border-bottom-color: #263147 !important;
}

/* Darker, crisper column header names + semantic column icons */
#ranking-table thead th,
.sticky-thead-clone-cell {
  color: #1e293b !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em;
}

[data-theme="dark"] #ranking-table thead th,
[data-theme="dark"] .sticky-thead-clone-cell {
  color: #f1f5f9 !important;
}

.ec-col-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
  color: #4c6ef5;
  opacity: 0.88;
  flex-shrink: 0;
}

.ec-col-header-icon svg {
  width: 13.5px;
  height: 13.5px;
}

[data-theme="dark"] .ec-col-header-icon {
  color: #93c5fd;
}

/* Give Quant Risk columns a subtle violet/emerald icon tint to distinguish signal families */
#ranking-table thead th[data-category="special"] .ec-col-header-icon,
.sticky-thead-clone-cell[data-category="special"] .ec-col-header-icon {
  color: #4f46e5;
}

[data-theme="dark"] #ranking-table thead th[data-category="special"] .ec-col-header-icon,
[data-theme="dark"] .sticky-thead-clone-cell[data-category="special"] .ec-col-header-icon {
  color: #a5b4fc;
}

/* ==========================================================================
   VIP Core 5 Quant Zone (Net ATH %, Volatility, Sharpe, Drawdown, SPY Corr)
   - Top indigo spanner banner ("⚡ CORE 5 QUANT RISK & QUALITY SIGNALS")
   - Elevated indigo-tinted header background + 2px left/right zone borders
   - Direction cues ("trend ↑", "risk ↓", "reward/risk ↑", "max loss ↓", "diversifier ↓")
   ========================================================================== */
#ranking-table thead th.is-vip-quant-col,
.sticky-thead-clone-cell.is-vip-quant-col {
  position: relative;
  padding-top: 25px !important;
  padding-bottom: 24px !important;
  background: linear-gradient(180deg, #eef2ff 0%, #f5f3ff 100%) !important;
  border-top: 2.5px solid #4f46e5 !important;
  border-bottom: 2px solid #818cf8 !important;
  color: #1e1b4b !important;
}

[data-theme="dark"] #ranking-table thead th.is-vip-quant-col,
[data-theme="dark"] .sticky-thead-clone-cell.is-vip-quant-col {
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.22) 0%, rgba(99, 102, 241, 0.12) 100%) !important;
  border-top-color: #818cf8 !important;
  border-bottom-color: #6366f1 !important;
  color: #e0e7ff !important;
}

/* Top Spanner Label across the VIP Quant Zone (anchored on the first visible VIP header) */
#ranking-table thead th.is-vip-quant-first::before,
.sticky-thead-clone-cell.is-vip-quant-first::before {
  content: "⚡ CORE 5 QUANT SIGNALS · RISK & QUALITY";
  position: absolute;
  top: 4px;
  left: 10px;
  z-index: 3;
  padding: 1px 7px;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

[data-theme="dark"] #ranking-table thead th.is-vip-quant-first::before,
[data-theme="dark"] .sticky-thead-clone-cell.is-vip-quant-first::before {
  background: #6366f1;
  color: #ffffff;
}

/* Left & Right VIP Zone Vertical Borders (Headers + Body Cells) */
#ranking-table thead th.is-vip-quant-first,
.sticky-thead-clone-cell.is-vip-quant-first,
#ranking-table tbody td.is-vip-quant-first {
  border-left: 2px solid rgba(79, 70, 229, 0.42) !important;
}

#ranking-table thead th.is-vip-quant-last,
.sticky-thead-clone-cell.is-vip-quant-last,
#ranking-table tbody td.is-vip-quant-last {
  border-right: 2px solid rgba(79, 70, 229, 0.42) !important;
}

/* Directionality Micro-Pill under each VIP Quant Column Title */
.ec-quant-dir-cue {
  position: absolute;
  bottom: 5px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  pointer-events: none;
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
}

.ec-quant-dir-cue--up {
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}

.ec-quant-dir-cue--down {
  background: rgba(79, 70, 229, 0.11);
  color: #4338ca;
}

[data-theme="dark"] .ec-quant-dir-cue--up {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}

[data-theme="dark"] .ec-quant-dir-cue--down {
  background: rgba(129, 140, 248, 0.2);
  color: #c7d2fe;
}

/* ==========================================================================
   Table Navigation Toolbar: Section Jump Pills + Horizontal Pan Slider
   ========================================================================== */
.ec-table-nav-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.ec-table-jump-cluster {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .ec-table-jump-cluster {
  background: #161d2b;
  border-color: #263147;
}

.ec-table-jump-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-right: 2px;
  white-space: nowrap;
}

.ec-table-jump-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ec-table-jump-btn:hover {
  background: #ffffff;
  color: #0f172a;
}

.ec-table-jump-btn.is-active {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ec-table-jump-btn--vip {
  color: #4338ca;
  font-weight: 700;
}

.ec-table-jump-btn--vip.is-active,
.ec-table-jump-btn--vip:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.ec-table-jump-vip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #4f46e5;
}

.ec-table-scroll-slider {
  width: 84px;
  height: 5px;
  margin-left: 6px;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* Compact [All Columns | Performance | Quant Only] pill filter in Rankings header */
.ec-table-column-filter {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .ec-table-column-filter {
  background: #161d2b;
  border-color: #263147;
}

.ec-table-filter-btn {
  appearance: none;
  padding: 5px 11px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.ec-table-filter-btn:hover {
  color: #0f172a;
}

.ec-table-filter-btn.is-active {
  background: #ffffff;
  color: #3b5bdb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .ec-table-filter-btn {
  color: #94a3b8;
}

[data-theme="dark"] .ec-table-filter-btn.is-active {
  background: #1e293b;
  color: #93c5fd;
}

/* ==========================================================================
   6. Smart Insights Lens (Executive Briefing Bento Grid)
   ========================================================================== */
body.ec-layout-lenses .briefing-card {
  padding: 20px 22px !important;
}

body.ec-layout-lenses .briefing-card .briefing-headline {
  font-size: 16.5px !important;
  line-height: 1.65 !important;
  padding: 14px 18px !important;
  margin: 12px 0 18px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(59, 91, 219, 0.05) 0%, rgba(14, 165, 233, 0.04) 100%) !important;
  border: 1px solid rgba(59, 91, 219, 0.14) !important;
  color: #1e293b !important;
}

[data-theme="dark"] body.ec-layout-lenses .briefing-card .briefing-headline {
  background: rgba(59, 91, 219, 0.1) !important;
  border-color: rgba(96, 165, 250, 0.22) !important;
  color: #f1f5f9 !important;
}

body.ec-layout-lenses .briefing-card .briefing-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
  gap: 14px !important;
  border-top: none !important;
  margin-top: 0 !important;
}

body.ec-layout-lenses .briefing-card .briefing-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
  padding: 16px 18px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  color: #475569 !important;
  transition: border-color 120ms ease, box-shadow 120ms ease !important;
}

body.ec-layout-lenses .briefing-card .briefing-item:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04) !important;
}

body.ec-layout-lenses .briefing-card .briefing-item.is-active {
  border-color: #3b5bdb !important;
  background: rgba(59, 91, 219, 0.03) !important;
}

[data-theme="dark"] body.ec-layout-lenses .briefing-card .briefing-item {
  background: #151c2b !important;
  border-color: #242e42 !important;
  color: #cbd5e1 !important;
}

body.ec-layout-lenses .briefing-card .briefing-tag {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  background: rgba(15, 23, 42, 0.04) !important;
}

body.ec-layout-lenses .briefing-card .briefing-tag--risk_adjusted { background: rgba(4, 120, 87, 0.08) !important; }
body.ec-layout-lenses .briefing-card .briefing-tag--risk { background: rgba(194, 65, 12, 0.08) !important; }
body.ec-layout-lenses .briefing-card .briefing-tag--diversification { background: rgba(124, 58, 237, 0.08) !important; }
body.ec-layout-lenses .briefing-card .briefing-tag--benchmark { background: rgba(59, 91, 219, 0.08) !important; }
body.ec-layout-lenses .briefing-card .briefing-tag--consistency { background: rgba(67, 56, 202, 0.08) !important; }
body.ec-layout-lenses .briefing-card .briefing-tag--trend,
body.ec-layout-lenses .briefing-card .briefing-tag--highs { background: rgba(14, 116, 144, 0.08) !important; }

body.ec-layout-lenses .briefing-card .briefing-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 4px !important;
}

[data-theme="dark"] body.ec-layout-lenses .briefing-card .briefing-title {
  color: #f8fafc !important;
}

body.ec-layout-lenses .briefing-card .briefing-points {
  gap: 7px !important;
}

body.ec-layout-lenses .briefing-card .briefing-point {
  padding-left: 14px !important;
}

body.ec-layout-lenses .briefing-card .briefing-point::before {
  top: 0.65em !important;
  width: 5px !important;
  height: 5px !important;
  background: #94a3b8 !important;
}

/* Soft Light-Blue Ticker Pill Badge with Subtle Bottom Accent (Replaces Dashed Underline) */
.briefing-ticker {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  border-radius: 5px;
  background: rgba(59, 91, 219, 0.075);
  border-bottom: 1.5px solid rgba(59, 91, 219, 0.28);
  color: #1e3a8a;
  font-size: 0.92em;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.briefing-ticker.is-good {
  background: rgba(59, 91, 219, 0.08);
  border-bottom-color: rgba(22, 163, 74, 0.45);
}

.briefing-ticker.is-bad {
  background: rgba(59, 91, 219, 0.08);
  border-bottom-color: rgba(220, 38, 38, 0.45);
}

.briefing-ticker:hover {
  background: rgba(59, 91, 219, 0.16);
  border-bottom-color: #3b5bdb;
  color: #1d4ed8;
}

[data-theme="dark"] .briefing-ticker {
  background: rgba(96, 165, 250, 0.14);
  border-bottom-color: rgba(96, 165, 250, 0.4);
  color: #dbeafe;
}

[data-theme="dark"] .briefing-ticker:hover {
  background: rgba(96, 165, 250, 0.24);
  color: #ffffff;
}

.briefing-num {
  font-weight: 600;
  color: #1e293b;
}

[data-theme="dark"] .briefing-num {
  color: #e2e8f0;
}

.briefing-num.is-up {
  color: #15803d;
}

.briefing-num.is-down {
  color: #b91c1c;
}

[data-theme="dark"] .briefing-num.is-up {
  color: #4ade80;
}

[data-theme="dark"] .briefing-num.is-down {
  color: #f87171;
}

body.ec-layout-lenses .briefing-card .briefing-more {
  padding: 6px 14px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #3b5bdb !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
}

body.ec-layout-lenses .briefing-card .briefing-more:hover {
  background: #eef2ff !important;
  border-color: #a5b4fc !important;
}

.ec-briefing-jump-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(59, 91, 219, 0.3);
  background: rgba(59, 91, 219, 0.07);
  color: #1e3a8a;
  font-size: 13px;
  cursor: pointer;
}

.ec-briefing-jump-pill__cta {
  font-weight: 700;
  color: #3b5bdb;
}

/* ==========================================================================
   7. Responsive Collapse (< 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  body.ec-layout-lenses .comparison-sets-container {
    flex-wrap: wrap !important;
  }

  body.ec-layout-lenses .ec-ticker-ribbon {
    width: 100%;
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    padding-top: 6px;
    border-top: 1px solid #eef2f6;
  }

  body.ec-layout-lenses main.content,
  body.ec-layout-lenses.ec-lens-rail-collapsed main.content {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.ec-layout-lenses .ec-lens-rail {
    position: static;
    padding: 8px;
  }

  body.ec-layout-lenses .ec-lens-rail__header,
  body.ec-layout-lenses .ec-lens-group__title,
  body.ec-layout-lenses .ec-lens-item__subtitle {
    display: none !important;
  }

  body.ec-layout-lenses .ec-lens-rail__nav,
  body.ec-layout-lenses .ec-lens-group__list {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }

  body.ec-layout-lenses .ec-lens-item {
    width: auto;
    white-space: nowrap;
    padding: 6px 10px;
  }

  body.ec-layout-lenses .chart-section,
  body.ec-layout-lenses .table-section,
  body.ec-layout-lenses .briefing-card,
  body.ec-layout-lenses .xy-lens-section {
    grid-column: 1 !important;
  }
}

/* ==========================================================================
   8. X vs Y Lens (1:1 Multi-Period Matchup Stage — Unified Hero Bar)
   ========================================================================== */
.xy-lens-section {
  padding: 16px 18px;
}

.ec-xy-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .ec-xy-hero-bar {
  background: #151c2b;
  border-color: #242e42;
}

/* Left: Compact X vs Y Matchup Pickers */
.ec-xy-hero-pickers {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.ec-xy-picker-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 148px;
  flex: 0 0 148px;
}

.ec-xy-picker-slot__head {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ec-xy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.ec-xy-badge--x {
  background: #3b5bdb;
}

.ec-xy-badge--y {
  background: #475569;
}

.ec-xy-slot-meta {
  font-size: 10.5px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  cursor: help;
}

.ec-xy-meta-tooltip::before {
  display: none;
}

.ec-xy-meta-tooltip__sector {
  margin-top: 2px;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.3;
}

[data-theme="dark"] .ec-xy-slot-meta {
  color: #94a3b8;
}

.ec-xy-default-tag {
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.ec-xy-default-tag[hidden] {
  display: none !important;
}

.ec-xy-default-tag.is-leader {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.ec-xy-default-tag.is-bench {
  background: rgba(59, 91, 219, 0.12);
  color: #3b5bdb;
}

.ec-xy-picker-slot .ts-wrapper {
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
}

.ec-xy-picker-slot .ts-control {
  min-height: 31px !important;
  height: 31px !important;
  padding: 2px 8px !important;
  border-radius: 7px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

[data-theme="dark"] .ec-xy-picker-slot .ts-control {
  background: #0f1522 !important;
  border-color: #2e384d !important;
}

.ec-xy-swap-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ec-xy-swap-btn:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3b5bdb;
}

[data-theme="dark"] .ec-xy-swap-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

/* Center: Inline Verdict + Period Dots */
.ec-xy-hero-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.ec-xy-hero-summary .sparkline-summary-content {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  gap: 16px !important;
}

.ec-xy-hero-summary .summary-verdict {
  padding: 6px 12px !important;
  border-radius: 8px !important;
}

.ec-xy-hero-summary .verdict-text {
  font-size: 13.5px !important;
}

.ec-xy-hero-summary .verdict-ratio {
  font-size: 11.5px !important;
}

.ec-xy-hero-summary .summary-label {
  font-size: 10px !important;
  margin-bottom: 4px !important;
}

.ec-xy-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.ec-xy-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .ec-xy-hero-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .ec-xy-toolbar {
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   9. Anonymous Scratchpad & "Sign in to Save List" Conversion Flow
   ========================================================================== */

/* When signed out, hide the multi-set dropdown & ⋮ menu so saving/naming
   lists is a clear free-account value proposition. Keep Curated Lists visible! */
body.ec-is-signed-out .comparison-sets-label,
body.ec-is-signed-out .comparison-sets-controls > .ts-wrapper,
body.ec-is-signed-out .comparison-sets-controls > select#comparison-set-selector,
body.ec-is-signed-out .comparison-sets-controls > .set-menu-container {
  display: none !important;
}

.ec-anon-save-cluster {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.ec-anon-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 120ms ease, background 120ms ease;
}

.ec-anon-status-pill:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

[data-theme="dark"] .ec-anon-status-pill {
  background: #161d2b;
  border-color: #334155;
  color: #e2e8f0;
}

.ec-anon-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.ec-anon-save-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #3b5bdb;
  background: linear-gradient(180deg, #4c6ef5 0%, #3b5bdb 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(59, 91, 219, 0.25);
  transition: transform 100ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.ec-anon-save-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 3px 8px rgba(59, 91, 219, 0.32);
}

.ec-anon-nudge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 6px 0 10px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  font-size: 11.5px;
  color: #312e81;
  white-space: nowrap;
  animation: ec-nudge-fade 220ms ease-out;
}

.ec-anon-nudge[hidden] {
  display: none !important;
}

[data-theme="dark"] .ec-anon-nudge {
  background: rgba(59, 91, 219, 0.18);
  border-color: rgba(129, 140, 248, 0.35);
  color: #e0e7ff;
}

@keyframes ec-nudge-fade {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ec-anon-nudge__cta {
  appearance: none;
  padding: 0;
  border: none;
  background: none;
  color: #3b5bdb;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.ec-anon-nudge__cta:hover {
  text-decoration: underline;
}

[data-theme="dark"] .ec-anon-nudge__cta {
  color: #93c5fd;
}

.ec-anon-nudge__dismiss {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6366f1;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.ec-anon-nudge__dismiss:hover {
  background: rgba(99, 102, 241, 0.14);
}

/* Save List Modal */
.ec-save-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ec-save-modal[hidden] {
  display: none !important;
}

.ec-save-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.ec-save-modal__dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 24px 26px 22px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  color: #0f172a;
}

[data-theme="dark"] .ec-save-modal__dialog {
  background: #111622;
  border-color: #263147;
  color: #f8fafc;
}

.ec-save-modal__close {
  appearance: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ec-save-modal__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ec-save-modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 91, 219, 0.08);
  color: #3b5bdb;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

[data-theme="dark"] .ec-save-modal__badge {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

.ec-save-modal__title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.ec-save-modal__subtitle {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
}

[data-theme="dark"] .ec-save-modal__subtitle {
  color: #94a3b8;
}

.ec-save-modal__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.ec-save-modal__input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  box-sizing: border-box;
}

.ec-save-modal__input:focus {
  outline: none;
  border-color: #3b5bdb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.14);
}

[data-theme="dark"] .ec-save-modal__input {
  background: #161d2b;
  border-color: #2e384d;
  color: #f8fafc;
}

.ec-save-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0 16px;
}

.ec-save-modal__chip {
  padding: 2px 8px;
  border-radius: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
}

.ec-save-modal__chip--more {
  background: transparent;
  border-style: dashed;
  color: #64748b;
}

[data-theme="dark"] .ec-save-modal__chip {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.ec-save-modal__perks {
  margin: 0 0 18px;
  padding: 12px 14px;
  list-style: none;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: #334155;
}

[data-theme="dark"] .ec-save-modal__perks {
  background: #161d2b;
  border-color: #242e42;
  color: #cbd5e1;
}

.ec-save-modal__perks kbd {
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 11px;
}

.ec-save-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ec-save-modal__cancel {
  appearance: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ec-save-modal__cancel:hover {
  background: #f1f5f9;
}

.ec-save-modal__submit {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(180deg, #4c6ef5 0%, #3b5bdb 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(59, 91, 219, 0.3);
}

.ec-save-modal__submit:hover {
  filter: brightness(1.06);
}
