
/* ===========================================================================
   Confluence — Options Scanner
   Aesthetic: modern fintech, airy, friendly cards. Bold accent moves on the
   confluence spectrum, ticker treatments, and payoff visualisation.
   ========================================================================= */

:root {
  /* Type */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale — 8 steps, used everywhere instead of raw px values.
     Anything outside this scale is by design (icon-button squares, SVG
     axis labels), not by accident. */
  --fs-xxs:  10px;   /* SVG axis ticks, swatch chips, smallest tags */
  --fs-xs:   11px;   /* eyebrow labels (uppercase), chip-counts, sub-meta */
  --fs-sm:   12px;   /* secondary labels, kv-keys, modal sub */
  --fs-md:   13px;   /* table body, body text — most common */
  --fs-base: 14px;   /* body default, ticker symbol, brand, kv-val */
  --fs-lg:   16px;   /* greek-val, modal title, ring info, drawer ticker fallback */
  --fs-xl:   22px;   /* section title, ring-text, diff number */
  --fs-display: 28px; /* group ticker */
  --fs-hero: 56px;   /* hero number */
  --fs-drawer-ticker: 24px; /* drawer header ticker symbol */

  /* Letter-spacing scale — standardized so all uppercase eyebrows
     match and all display sizes have consistent negative tracking. */
  --ls-tighter: -0.04em; /* hero only */
  --ls-tight:   -0.02em; /* display + section titles */
  --ls-snug:    -0.01em; /* ticker symbol */
  --ls-body:    -0.005em;/* body */
  --ls-tag:     0.06em;  /* short uppercase tags (cr/db, NEW) */
  --ls-eyebrow: 0.08em;  /* uppercase eyebrow labels — standardized */

  /* Light palette (default) */
  --bg:           #F4F5F7;
  --bg-elev:     #FFFFFF;
  --surface:     #FFFFFF;
  --surface-2:   #F7F8FA;
  --surface-3:   #EEF0F4;
  --border:      #E6E8EE;
  --border-2:    #EDEFF3;
  --text:        #0B0E14;
  --text-2:      #5B6573;
  --text-3:      #99A2B0;
  --text-inv:    #FFFFFF;

  /* Brand + signals */
  --brand:       #5B6CF9;     /* indigo */
  --brand-soft:  #E6E9FF;
  --bull:        #00A878;
  --bear:        #F43F5E;
  --warn:        #F59E0B;

  /* Strategy hues — saturated dot, soft pill bg, deep ink for label */
  --lc:    #FF6B35;   --lc-bg:  #FFE9DD;   --lc-ink:  #8A2D00;
  --csp:   #3B82F6;   --csp-bg: #DCEAFE;   --csp-ink: #0B3D91;
  --pcs:   #10B981;   --pcs-bg: #D6F5E8;   --pcs-ink: #035C3F;
  --cds:   #8B5CF6;   --cds-bg: #E8DFFB;   --cds-ink: #3D1C82;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(11,14,20,0.04), 0 1px 1px rgba(11,14,20,0.03);
  --shadow-md: 0 1px 2px rgba(11,14,20,0.04), 0 8px 24px -8px rgba(11,14,20,0.08);
  --shadow-lg: 0 20px 60px -20px rgba(11,14,20,0.18), 0 8px 24px -12px rgba(11,14,20,0.12);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;

  --maxw: 1440px;
  --gutter: 28px;
}

[data-theme="dark"] {
  --bg:          #07080B;
  --bg-elev:    #0E1116;
  --surface:    #11141A;
  --surface-2:  #161A21;
  --surface-3:  #1D222B;
  --border:     #1F242E;
  --border-2:   #262C37;
  --text:       #F2F4F7;
  --text-2:     #95A0B0;
  --text-3:     #5C6776;
  --text-inv:   #07080B;

  --brand:      #8B97FF;
  --brand-soft: #171B40;
  --bull:       #2EE6A8;
  --bear:       #FF5277;
  --warn:       #FBBF24;

  --lc:    #FF8C5A;   --lc-bg:  #2A1408;   --lc-ink:  #FFB590;
  --csp:   #5FA0FF;   --csp-bg: #0E1F38;   --csp-ink: #B5D2FF;
  --pcs:   #34D8A1;   --pcs-bg: #0D2A21;   --pcs-ink: #9FF0CD;
  --cds:   #A78BFA;   --cds-bg: #1B1338;   --cds-ink: #D6C6FF;

  --shadow-sm: 0 1px 1px rgba(0,0,0,0.4);
  --shadow-md: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px -8px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 60px -24px rgba(0,0,0,0.7), 0 8px 24px -8px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: var(--ls-body);
  min-height: 100vh;
}

/* utilities */
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.tnum { font-variant-numeric: tabular-nums; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* =================== TOP BAR ============================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: var(--ls-tight); font-size: var(--fs-lg); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in oklab, var(--brand) 60%, #1ED2C5 40%) 100%);
  display: grid; place-items: center; color: var(--text-inv);
  box-shadow: 0 4px 14px -2px color-mix(in oklab, var(--brand) 40%, transparent);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-meta { color: var(--text-3); font-weight: 500; font-size: var(--fs-sm); margin-left: 4px; }
.scan-pill {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bull);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--bull) 60%, transparent);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   color-mix(in oklab, var(--bull) 60%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in oklab, var(--bull) 0%,  transparent); }
  100% { box-shadow: 0 0 0 0   color-mix(in oklab, var(--bull) 0%,  transparent); }
}
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-2);
  transition: all 0.15s ease;
}
.icon-btn:hover { border-color: var(--text-3); color: var(--text); transform: translateY(-1px); }
.icon-btn svg { width: 16px; height: 16px; }

/* =================== HERO ================================================ */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter); }
.hero { display: grid; grid-template-columns: 1.4fr 2fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card-label {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
}
.card-label-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* Scan summary */
.summary-stat {
  display: flex; align-items: baseline; gap: 8px; margin-top: 14px;
}
.summary-num {
  font-size: var(--fs-hero); font-weight: 800; letter-spacing: var(--ls-tighter); line-height: 1;
}
.summary-unit { font-size: var(--fs-md); color: var(--text-2); font-weight: 500; }
.summary-sub { font-size: var(--fs-md); color: var(--text-2); margin-top: 8px; }
.strat-mix { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.strat-mix-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--surface-2);
  border-radius: 999px; font-size: var(--fs-sm);
  border: 1px solid var(--border-2);
}
.strat-mix-dot { width: 7px; height: 7px; border-radius: 50%; }

/* Confluence spectrum */
.spectrum-card { position: relative; overflow: hidden; }
.spectrum-head {
  display: flex; justify-content: space-between; align-items: center;
}
.spectrum-stage {
  margin-top: 18px;
  position: relative;
  height: 110px;
}
.spectrum-axis {
  position: absolute; left: 0; right: 0; bottom: 28px;
  height: 1px; background: var(--border);
}
.spectrum-axis::before, .spectrum-axis::after {
  content: ""; position: absolute; top: -3px; width: 1px; height: 7px; background: var(--border);
}
.spectrum-axis::before { left: 0; }
.spectrum-axis::after  { right: 0; }
.spectrum-tick {
  position: absolute; bottom: 2px;
  font-size: var(--fs-xxs); color: var(--text-3); font-family: var(--font-mono);
  transform: translateX(-50%);
}
.spectrum-dot {
  position: absolute;
  bottom: 28px;
  width: 10px; height: 10px;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  cursor: pointer;
  transition: transform 0.18s ease;
  border: 2px solid var(--surface);
}
.spectrum-dot:hover { transform: translate(-50%, 50%) scale(1.6); z-index: 4; }
.spectrum-dot.is-top {
  width: 16px; height: 16px;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand) 50%, transparent);
  animation: pulseRing 2.4s ease-out infinite;
  z-index: 3;
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0   color-mix(in oklab, var(--brand) 50%, transparent); }
  70%  { box-shadow: 0 0 0 14px color-mix(in oklab, var(--brand) 0%, transparent); }
  100% { box-shadow: 0 0 0 0   color-mix(in oklab, var(--brand) 0%, transparent); }
}
.spectrum-label-top {
  position: absolute;
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--text); color: var(--text-inv);
  padding: 4px 8px; border-radius: 6px;
  transform: translate(-50%, 0);
  white-space: nowrap;
}
.spectrum-label-top::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  border: 4px solid transparent; border-top-color: var(--text);
  transform: translateX(-50%);
}

/* Diff card */
.diff-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.diff-row:last-child { border-bottom: none; }
.diff-num { font-size: var(--fs-xl); font-weight: 700; letter-spacing: var(--ls-tight); font-family: var(--font-mono); }
.diff-num.added { color: var(--bull); }
.diff-num.removed { color: var(--bear); }
.diff-num.sustained { color: var(--text-2); }
.diff-label { font-size: var(--fs-sm); color: var(--text-2); }

/* =================== FILTER ROW ========================================== */
.toolbar {
  margin-top: 22px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-md); font-weight: 600;
  color: var(--text-2);
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.active {
  background: var(--text); color: var(--text-inv); border-color: var(--text);
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; }
.chip-count {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  padding: 1px 6px; border-radius: 6px;
  background: color-mix(in oklab, currentColor 12%, transparent);
}
.chip.active .chip-count { background: rgba(255,255,255,0.18); }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  width: 220px;
  margin-left: auto;
}
.search input {
  flex: 1; border: none; outline: none; background: transparent;
  font: inherit; color: var(--text);
}
.search svg { width: 14px; height: 14px; color: var(--text-3); }

.view-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.view-toggle button {
  border: none; background: transparent;
  padding: 6px 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  border-radius: 7px;
  display: inline-flex; align-items: center; gap: 6px;
}
.view-toggle button.active {
  background: var(--bg); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.view-toggle svg { width: 13px; height: 13px; }

/* =================== TABLE / IDEAS LIST ================================== */
.ideas-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.ideas-table {
  width: 100%; border-collapse: collapse;
}
.ideas-table thead th {
  text-align: left; font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase; color: var(--text-3);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
/* Click-to-sort headers — hover hints affordance, active state shows arrow.
   Non-sortable headers (Strikes, Trend) skip these and stay plain. */
.ideas-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease, background 0.12s ease;
}
.ideas-table thead th.sortable:hover { color: var(--text-2); background: var(--surface-3); }
.ideas-table thead th.is-sorted { color: var(--text); }
/* Arrow sits in a fixed-width span so column widths don't jitter when the
   sort moves between columns. Empty when inactive, ↑/↓ when active. */
.sort-arrow {
  display: inline-block;
  width: 1em; margin-left: 4px;
  font-size: 0.95em;
  color: var(--brand);
  text-align: center;
  letter-spacing: 0;
}
.ideas-table tbody tr {
  border-bottom: 1px solid var(--border-2);
  transition: background 0.12s ease;
  cursor: pointer;
}
.ideas-table tbody tr:hover { background: var(--surface-2); }
.ideas-table tbody tr.selected {
  background: color-mix(in oklab, var(--brand) 6%, transparent);
}
.ideas-table tbody tr:last-child { border-bottom: none; }
.ideas-table td {
  padding: 14px 16px;
  font-size: var(--fs-md);
  vertical-align: middle;
}

.ticker-cell { display: flex; align-items: center; gap: 10px; }
.ticker-symbol {
  font-weight: 800; font-size: var(--fs-base); letter-spacing: var(--ls-snug);
}
/* Ticker symbol → TradingView Supercharts. Inherits typography from
   .ticker-symbol / .group-ticker / .drawer-ticker; this rule only adds
   the link affordance (subtle underline + brand-colored hover). The
   row's drawer-onClick is suppressed via stopPropagation in the JSX. */
.ticker-link {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.ticker-link:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.new-pip {
  font-size: var(--fs-xxs); font-weight: 700; padding: 2px 6px;
  background: var(--brand); color: var(--text-inv);
  border-radius: 4px; letter-spacing: var(--ls-tag);
}

.strat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-tag);
  font-family: var(--font-mono);
}
.strat-pill.LC  { background: var(--lc-bg);  color: var(--lc-ink); }
.strat-pill.CSP { background: var(--csp-bg); color: var(--csp-ink); }
.strat-pill.PCS { background: var(--pcs-bg); color: var(--pcs-ink); }
.strat-pill.CDS { background: var(--cds-bg); color: var(--cds-ink); }

.dte-chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  padding: 3px 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--text-2);
}

.credit-cell.credit { color: var(--bull); font-weight: 600; }
.credit-cell.debit  { color: var(--lc); font-weight: 600; }
.credit-tag {
  font-size: var(--fs-xxs); font-weight: 700; letter-spacing: var(--ls-eyebrow);
  margin-left: 4px;
  padding: 2px 5px; border-radius: 4px;
  background: color-mix(in oklab, currentColor 12%, transparent);
}

/* Confluence bar */
.conf-cell { min-width: 140px; }
.conf-bar {
  position: relative;
  height: 22px;
  background: var(--surface-3);
  border-radius: 6px;
  overflow: hidden;
}
.conf-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--brand) 40%, transparent) 0%,
    var(--brand) 100%);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.2,0.8,0.2,1);
}
.conf-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 8px;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  color: var(--text);
  mix-blend-mode: normal;
}

/* Sparkline cell */
.spark-cell { width: 80px; }
.spark-svg { width: 80px; height: 28px; display: block; }

/* =================== GROUPED VIEW ======================================== */
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  margin-top: 12px;
  overflow: hidden;
}
.group-head {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.group-ticker {
  font-size: var(--fs-display); font-weight: 800; letter-spacing: var(--ls-tight);
  font-family: var(--font-mono);
}
.group-meta { display: flex; flex-direction: column; gap: 2px; }
.group-price { font-size: var(--fs-base); font-weight: 600; }
.group-price-sub { font-size: var(--fs-xs); color: var(--text-3); }
.group-spark { margin-left: auto; }
.group-best {
  margin-left: 16px;
  display: flex; flex-direction: column; align-items: flex-end;
  font-size: var(--fs-xs); color: var(--text-3); letter-spacing: var(--ls-tag); text-transform: uppercase; font-weight: 700;
}
.group-best-num { font-size: var(--fs-xl); font-weight: 800; color: var(--text); letter-spacing: var(--ls-tight); font-family: var(--font-mono); margin-top: 2px; }

.group-body { padding: 4px 0; }

/* =================== DRAWER ============================================== */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--text) 30%, transparent);
  backdrop-filter: blur(4px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(560px, 100vw);
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 14px;
}
.drawer-close {
  margin-left: auto;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-2);
}
.drawer-body {
  flex: 1; overflow-y: auto; padding: 22px 26px 40px;
  display: flex; flex-direction: column; gap: 26px;
}
.drawer-section-title {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text-3);
  margin-bottom: 12px;
}
.kv-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
}
.kv {
  display: flex; flex-direction: column; gap: 3px;
}
.kv-key { font-size: var(--fs-xs); color: var(--text-3); letter-spacing: var(--ls-tag); text-transform: uppercase; font-weight: 600; }
.kv-val { font-size: var(--fs-base); font-weight: 600; font-family: var(--font-mono); letter-spacing: var(--ls-snug); }
.kv-val.up { color: var(--bull); }
.kv-val.down { color: var(--bear); }

/* Confluence ring */
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring {
  position: relative; width: 96px; height: 96px;
  flex-shrink: 0;
}
.ring svg { transform: rotate(-90deg); }
.ring-text {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 700; letter-spacing: var(--ls-tight);
}
.ring-info { display: flex; flex-direction: column; gap: 4px; }
.ring-info-title { font-size: var(--fs-md); font-weight: 600; }
.ring-info-sub { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }

/* Payoff diagram */
.payoff-card {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 16px;
}
.payoff-svg { width: 100%; height: 180px; display: block; }
.payoff-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-2); margin-top: 10px; }
.payoff-legend span { display: inline-flex; align-items: center; gap: 6px; }
.payoff-legend .swatch { width: 10px; height: 3px; border-radius: 2px; }

/* greeks tiny chart */
.greeks-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.greek {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px;
}
.greek-key { font-size: var(--fs-xxs); color: var(--text-3); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; font-weight: 700; }
.greek-val { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 600; margin-top: 4px; }

/* underlying chart */
.under-card {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 16px;
  position: relative;
}
.under-svg { width: 100%; height: 100px; display: block; }
.under-strike-label {
  position: absolute;
  font-family: var(--font-mono); font-size: var(--fs-xxs); font-weight: 600;
  padding: 1px 5px; border-radius: 3px;
  color: var(--text-inv);
}

/* Notes */
.notes {
  background: color-mix(in oklab, var(--brand) 6%, var(--surface-2));
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: var(--fs-md); color: var(--text);
  line-height: 1.55;
  border-left: 3px solid var(--brand);
}
.notes-label {
  font-size: var(--fs-xxs); font-weight: 700; letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: var(--brand); margin-bottom: 6px;
}

/* Tooltip */
.glossary {
  position: relative;
  border-bottom: 1px dotted var(--text-3);
  cursor: help;
}
.glossary:hover .glossary-pop { opacity: 1; visibility: visible; transform: translate(-50%, -8px); }
.glossary-pop {
  position: absolute; bottom: 100%; left: 50%;
  transform: translate(-50%, 0);
  background: var(--text); color: var(--text-inv);
  padding: 10px 12px; border-radius: 8px;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0;
  width: 240px;
  text-transform: none;
  text-align: left;
  line-height: 1.45;
  opacity: 0; visibility: hidden;
  transition: all 0.18s ease;
  z-index: 60;
  box-shadow: var(--shadow-md);
}
.glossary-pop strong { display: block; margin-bottom: 4px; }
.glossary-pop::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  border: 5px solid transparent; border-top-color: var(--text);
  transform: translateX(-50%);
}

/* =================== SECTION HEADER ====================================== */
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 36px 0 4px;
}
.section-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: var(--ls-tight); }
.section-sub { font-size: var(--fs-md); color: var(--text-2); }

/* =================== FOOTER ============================================== */
.foot {
  text-align: center; padding: 60px 0 30px;
  font-size: var(--fs-xs); color: var(--text-3);
  letter-spacing: var(--ls-tag);
}

/* =================== NEW INDICATOR ====================================== */
tr.is-new td:first-child { position: relative; }
tr.is-new td:first-child::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--brand); border-radius: 0 2px 2px 0;
}

/* ===== Help modal — centralizes all column/strategy definitions ============= */
.help-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-md);
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  display: flex; flex-direction: column;
  z-index: 60;
}
.help-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.help-modal-title { font-size: var(--fs-lg); font-weight: 700; }
.help-modal-sub { font-size: var(--fs-sm); color: var(--text-3); margin-top: 2px; }
.help-modal-body { padding: 14px 22px 22px; overflow-y: auto; }
.help-section + .help-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-2); }
.help-section-title {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-tag); text-transform: uppercase;
  color: var(--text-3); margin-bottom: 12px;
}
.help-row { display: flex; gap: 14px; margin-bottom: 12px; align-items: flex-start; }
.help-row-key {
  flex: 0 0 110px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  padding-top: 1px;
}
.help-row-title { font-size: var(--fs-md); font-weight: 600; }
.help-row-body { font-size: var(--fs-md); color: var(--text-2); line-height: 1.5; }
.help-row-body strong { color: var(--text); font-weight: 600; }
.help-row-body em { color: var(--text); font-style: normal; font-weight: 600; }
.help-row-body code { font-family: var(--font-mono); font-size: var(--fs-sm); background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }

/* Confluence breakdown bars (drawer) */
.scoring-grid { display: grid; gap: 10px; margin-top: 4px; }
.scoring-row {
  display: grid; grid-template-columns: 130px 1fr 56px 48px; align-items: center;
  gap: 10px; font-size: var(--fs-sm);
}
.scoring-name { color: var(--text-2); font-weight: 600; }
.scoring-bar-track { background: var(--surface-3); border-radius: 999px; height: 6px; overflow: hidden; }
.scoring-bar-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .25s ease; }
.scoring-score { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.scoring-weight { font-family: var(--font-mono); color: var(--text-3); text-align: right; font-size: var(--fs-xs); }
.scoring-total {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border-2);
  font-size: var(--fs-md);
}
.scoring-total strong { font-family: var(--font-mono); }

/* ===== Typography polish: classes that replace inline-style overrides ===== */

/* Drawer title row — company name + strategy pill + NEW pip in one line.
   flex-wrap so long company names ("Berkshire Hathaway Inc.") don't push
   the badges off the edge on narrower drawers. */
.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Company name as drawer title — Manrope (the company name is prose, not
   a numeric/symbol), tight tracking, slightly smaller than the original
   24px ticker since names run longer. */
.drawer-company {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: var(--ls-tight);
  line-height: 1.15;
}

/* Inline ticker chip in the drawer subtitle — small mono pill so the
   operator can still see the symbol at a glance for cross-reference. */
.drawer-ticker-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: var(--ls-tag);
  color: var(--text);
}

.drawer-meta {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Legacy .drawer-ticker class kept for backwards-compat (tests, etc) but
   no longer used by the live drawer header. */
.drawer-ticker {
  font-size: var(--fs-drawer-ticker);
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: var(--ls-tight);
}

/* Sparkline placeholder when history is too short for a real trend line */
.spark-placeholder {
  color: var(--text-3);
  font-size: var(--fs-xs);
}

/* Confluence-spectrum sub-meta on the right side of the card */
.spectrum-meta {
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* Strat-mix code label (was inline fontFamily override) */
.strat-mix-code {
  font-family: var(--font-mono);
}
/* Count to the right of the strategy code (e.g. "5") — was a colored
   inline span at weight 400. Bumping to 500 closes the visual gap with
   the bolded code without making it shout. */
.strat-mix-count {
  color: var(--text-3);
  font-weight: 500;
}

/* Payoff cursor readout — three pieces with their own emphasis levels */
.payoff-readout-label { font-weight: 700; color: var(--text); }
.payoff-readout-value { font-weight: 700; }
.payoff-readout-hint  { color: var(--text-3); margin-left: auto; font-size: var(--fs-xs); }

/* Help-modal disclaimer — small grey footer text */
.help-disclaimer { color: var(--text-3); font-size: var(--fs-sm); }

/* ===== Refresh banner — shown during a running refresh ==================== */
.refresh-banner {
  position: sticky;
  top: 60px;       /* sits below the topbar */
  z-index: 40;
  background: color-mix(in oklab, var(--brand-soft) 80%, var(--bg) 20%);
  border-bottom: 1px solid color-mix(in oklab, var(--brand) 25%, transparent);
}
.refresh-banner.is-error {
  background: color-mix(in oklab, var(--bear) 12%, var(--bg) 88%);
  border-bottom-color: color-mix(in oklab, var(--bear) 30%, transparent);
}
.refresh-banner-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.refresh-banner-text {
  font-size: var(--fs-md);
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.refresh-banner-text strong { font-weight: 700; }
.refresh-banner-elapsed {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.refresh-banner-bar {
  position: relative;
  height: 4px;
  background: color-mix(in oklab, var(--brand) 15%, transparent);
  border-radius: 2px;
  overflow: hidden;
}
.refresh-banner-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg,
    var(--brand) 0%,
    color-mix(in oklab, var(--brand) 70%, white) 100%);
  transition: width 0.4s ease;
  border-radius: 2px;
}
/* Indeterminate state (between stages, before total is known) — slides
   a 30%-wide pill across the bar. Lets the operator know the system is
   alive even when there's no countable total to anchor the bar to. */
.refresh-banner-bar.indeterminate .refresh-banner-fill {
  width: 30%;
  animation: refresh-slide 1.4s ease-in-out infinite;
}
@keyframes refresh-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(335%); }
}

/* Refresh buttons reuse .icon-btn but get a disabled state while a
   refresh is mid-flight. */
.refresh-btn:disabled {
  opacity: 0.4;
  cursor: progress;
  pointer-events: none;
}

/* ===== Diff card hover popover ============================================ */
.diff-row-popover { position: relative; }
.diff-row-popover .diff-row-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  cursor: default;
}
.diff-row-popover.has-details .diff-row-content { cursor: help; }

/* The popover slides out to the LEFT of the diff card so it doesn't
   collide with the spectrum card to the right of the hero. */
.diff-popover {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  min-width: 220px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 30;
}
.diff-row-popover:hover .diff-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(-4px);
}
/* Accent bar on the left edge — green for added, red for dropped */
.diff-popover-bull { border-left: 3px solid var(--bull); }
.diff-popover-bear { border-left: 3px solid var(--bear); }

.diff-popover-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.diff-popover-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.diff-popover-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: var(--fs-md);
}
.diff-popover-list li.is-clickable { cursor: pointer; }
.diff-popover-list li.is-clickable:hover { background: var(--surface-2); }
.diff-popover-ticker { font-weight: 700; min-width: 56px; }
.diff-popover-conf {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-2);
}
.diff-popover-empty {
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-style: italic;
}

/* ===== Drop-reason tags inside the diff popover ============================ */
.diff-popover-list li {
  flex-direction: column;   /* stack ticker line above reason tag */
  align-items: stretch;
  gap: 2px;
}
.diff-popover-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.diff-popover-reason {
  font-size: var(--fs-xxs);
  font-weight: 600;
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  padding-left: 64px;       /* aligned under the ticker text */
  margin-top: 1px;
}
.diff-popover-reason.reason-rotated_out { color: var(--text-3); }
.diff-popover-reason.reason-gate_failed { color: var(--warn); }

/* ===== Auto-refresh toggle ================================================ */
.auto-refresh-btn { position: relative; }
.auto-refresh-btn.is-on { color: var(--brand); border-color: var(--brand); }
.auto-refresh-btn .auto-refresh-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--surface);
  animation: pulse-dot 2.4s ease-out infinite;
}
@keyframes pulse-dot {
  0%   { opacity: 1; }
  50%  { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ===== Confluence trend (24h) ============================================= */
/* `.conf-cell` was `min-width: 140px` (plain table cell). To park the
   trend arrow alongside the bar we switch to flex, but the bar must be
   told to fill the row — otherwise a flex item with no width collapses
   to zero and the bar disappears. `flex: 1 1 auto` on .conf-bar fixes
   that; the trend arrow shrinks to its natural size. */
.conf-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 140px;
}
.conf-cell .conf-bar { flex: 1 1 auto; }
.conf-trend {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
}
.conf-trend-up   { color: var(--bull); }
.conf-trend-down { color: var(--bear); }
.conf-trend-flat { color: var(--text-3); }

/* Drawer sparkline */
.conf-trend-spark { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-2); }
.conf-trend-spark-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.conf-trend-spark-range {
  font-weight: 600;
  color: var(--text-2);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-xs);
}
.conf-trend-spark-svg {
  width: 100%;
  height: 36px;
  display: block;
}

/* ===== Tab toggle (Ideas | Positions) ===================================== */
.tab-toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin-left: 12px;
}
.tab-toggle button {
  border: none; background: transparent;
  padding: 6px 14px;
  font-size: var(--fs-md); font-weight: 600;
  color: var(--text-2);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}
.tab-toggle button:hover { color: var(--text); }
.tab-toggle button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.tab-count {
  font-size: var(--fs-xxs);
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in oklab, currentColor 15%, transparent);
  font-family: var(--font-mono);
}

/* ===== Positions view ==================================================== */
.positions-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px;
}
.positions-hero { margin-bottom: 8px; }
.positions-mover-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
  font-size: var(--fs-md);
}
.positions-mover-pct {
  margin-left: auto;
  font-weight: 700;
}
.positions-table .positive { color: var(--bull); font-weight: 600; }
.positions-table .negative { color: var(--bear); font-weight: 600; }
.positions-table tr.is-near-exp {
  background: color-mix(in oklab, var(--warn) 6%, transparent);
}
.dte-chip.warn { background: color-mix(in oklab, var(--warn) 20%, var(--surface-3)); color: var(--warn); }

.summary-num.positive { color: var(--bull); }
.summary-num.negative { color: var(--bear); }

/* "+ Add position" button */
.add-position-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: var(--brand);
  color: var(--text-inv);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--fs-md);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.add-position-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -2px color-mix(in oklab, var(--brand) 40%, transparent);
}
.add-position-btn svg { width: 14px; height: 14px; }

/* Track button on idea rows + close button on position rows */
.track-cell { width: 36px; text-align: center; }
.track-btn {
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-3);
  display: inline-grid; place-items: center;
  cursor: pointer;
  transition: all 0.12s ease;
}
.track-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: color-mix(in oklab, var(--brand) 8%, transparent);
}
.track-btn svg { width: 12px; height: 12px; }

/* Closed history */
.closed-history { margin-top: 22px; }
.closed-history-toggle {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 8px;
}
.closed-history-toggle:hover { color: var(--text); }

/* ===== Position modals (Add + Close) ===================================== */
.position-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  display: flex; flex-direction: column;
  z-index: 80;
}
.position-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.position-modal-title { font-size: var(--fs-lg); font-weight: 700; }
.position-modal-sub { font-size: var(--fs-sm); color: var(--text-3); margin-top: 4px; }

.position-form {
  padding: 18px 24px 24px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.form-row {
  display: flex; flex-direction: column; gap: 6px;
}
.form-row > span {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-3);
}
.form-row input,
.form-row select {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: var(--fs-md);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "tnum";
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
}
.form-error {
  background: color-mix(in oklab, var(--bear) 10%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--bear) 30%, transparent);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--bear);
  font-size: var(--fs-sm);
}
.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 6px;
}
.form-actions button {
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: var(--fs-md);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
}
.form-actions button:hover { background: var(--surface-2); }
.form-actions button.primary {
  background: var(--brand);
  color: var(--text-inv);
  border-color: var(--brand);
}
.form-actions button.primary:hover {
  filter: brightness(1.05);
}
.form-actions button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Cost column on the positions table — same green/orange convention as
   the ideas table's credit/debit cell so credits and debits visually
   read the same throughout the dashboard. */
.cost-cell.credit { color: var(--bull); font-weight: 600; }
.cost-cell.debit  { color: var(--lc);  font-weight: 600; }

/* ===== History tab ======================================================= */
.history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.history-toolbar .sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: var(--fs-md);
  color: var(--text);
  font-family: var(--font-sans);
}

/* ===== PositionDrawer ===================================================== */

/* DTE chips inline with drawer-meta — matches table tint */
.dte-warn { color: var(--warn); font-weight: 700; }
.dte-critical { color: var(--bear); font-weight: 700; }

/* Health block: three rows of label / horizontal-bar / value */
.health-block { display: flex; flex-direction: column; gap: 14px; }
.health-row {
  display: grid;
  grid-template-columns: 140px 1fr 64px;
  gap: 12px;
  align-items: center;
  font-size: var(--fs-md);
}
.health-label {
  color: var(--text-2);
  font-weight: 500;
  font-size: var(--fs-sm);
}
.health-bar-track {
  position: relative;
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: visible;
}
.health-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
/* The target tick — vertical mark at 50% (close zone for credits, stop
   zone for debits). Sits ON the bar. */
.health-bar-target {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: var(--text);
  opacity: 0.55;
  transform: translateX(-1px);
  cursor: help;
}
.health-value {
  text-align: right;
  font-weight: 700;
}
.health-flag {
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-top: -8px;
  padding-left: 152px;     /* aligned under the bar (140 + 12) */
}
.health-distance {
  display: flex;
  align-items: baseline;
  font-size: var(--fs-md);
  font-weight: 700;
}
.health-distance-hint {
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-weight: 500;
  margin-left: 6px;
}
.health-distance .positive { color: var(--bull); }
.health-distance .negative { color: var(--bear); }

/* Greeks block — extra "hint" line under the row */
.greeks-hint {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-top: 8px;
  line-height: 1.5;
}
.greek-val.positive { color: var(--bull); }
.greek-val.negative { color: var(--bear); }

/* kv-grid — small "/share" suffix style */
.kv-unit {
  font-size: var(--fs-xs);
  color: var(--text-3);
  font-weight: 500;
}

/* Bottom CTA in the position drawer */
.position-drawer-actions {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.position-drawer-actions button {
  padding: 10px 18px;
  font-size: var(--fs-md);
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-sans);
}
.position-drawer-actions button.primary.danger {
  background: var(--bear);
  color: var(--text-inv);
  border-color: var(--bear);
}
.position-drawer-actions button.primary.danger:hover {
  filter: brightness(1.06);
}
