/* ════════════════════════════════════════════════════════════════════════
   Multi-chart layouts
   A grid of independent LightweightCharts cells (each its own symbol +
   interval) overlaid inside #charts. Toolbar control = #btn-layout, popover
   = .mcl-panel (matches .cmp-panel / .iv-menu language). Built by the
   MultiChart module in app.js.
   ════════════════════════════════════════════════════════════════════════ */
.chart-grid{
  position:absolute; inset:0; z-index:7;
  display:grid; gap:2px; padding:2px; background:var(--chart-bg);
}
.chart-grid[hidden]{ display:none; }
/* Layout templates. "single" never shows the grid (it stays [hidden]). */
.chart-grid[data-layout="2h"]{ grid-template-columns:1fr 1fr; grid-template-rows:1fr; }
.chart-grid[data-layout="2v"]{ grid-template-columns:1fr;     grid-template-rows:1fr 1fr; }
.chart-grid[data-layout="4"]{  grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; }
/* "3" = one tall cell on the left, two stacked on the right (TradingView style). */
.chart-grid[data-layout="3"]{ grid-template-columns:1.5fr 1fr; grid-template-rows:1fr 1fr; }
.chart-grid[data-layout="3"] > .mc-cell:nth-child(1){ grid-row:1 / span 2; grid-column:1; }
.chart-grid[data-layout="3"] > .mc-cell:nth-child(2){ grid-row:1; grid-column:2; }
.chart-grid[data-layout="3"] > .mc-cell:nth-child(3){ grid-row:2; grid-column:2; }

.mc-cell{
  position:relative; display:flex; flex-direction:column;
  min-width:0; min-height:0; overflow:hidden;
  background:var(--chart-bg); border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default);
}
.mc-cell.active{ box-shadow: inset 0 0 0 1px var(--accent); }

.mc-head{
  flex:0 0 auto; display:flex; align-items:center; gap:.5rem;
  height:1.75rem; padding:0 .5rem; background:var(--bg-elevated);
  box-shadow: inset 0 -1px 0 0 var(--border-default); user-select:none;
}
.mc-sym{
  flex:0 0 auto; padding:2px 6px; font-family:var(--font-mono);
  font-size:.74rem; font-weight:700; letter-spacing:.02em;
  color:var(--text-primary); background:none; border:none; cursor:pointer;
  border-radius:var(--radius-sm);
}
.mc-sym:hover{ background:var(--bg-hover); }
.mc-sym-input{
  flex:0 0 auto; width:5.5rem; padding:2px 6px; font-family:var(--font-mono);
  font-size:.74rem; font-weight:700; text-transform:uppercase;
  color:var(--text-primary); background:var(--bg-tertiary); border:none;
  border-radius:var(--radius-sm); box-shadow: inset 0 0 0 1px var(--accent); outline:none;
}
.mc-iv{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:3px;
  padding:2px 6px; font-family:var(--font-mono); font-size:max(.66rem, var(--fs-floor)); font-weight:700;
  color:var(--text-secondary); background:none; border:none; cursor:pointer;
  border-radius:var(--radius-sm);
}
.mc-iv:hover{ background:var(--bg-hover); color:var(--text-primary); }
.mc-iv svg{ width:8px; height:8px; }
.mc-last{ flex:0 0 auto; margin-left:auto; font-family:var(--font-mono); font-size:.72rem; font-weight:600; color:var(--text-primary); }
.mc-last.up{ color:var(--green); }
.mc-last.down{ color:var(--red); }
.mc-host{ flex:1 1 auto; position:relative; min-height:0; }
.mc-host .tv-lightweight-charts{ background:transparent!important; }
.mc-state{
  position:absolute; inset:0; display:none; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-size:.72rem; color:var(--text-muted);
  pointer-events:none; text-align:center; padding:1rem;
}
.mc-cell.loading .mc-state,
.mc-cell.error   .mc-state{ display:flex; }
.mc-cell.error   .mc-state{ color:var(--red); }

/* Per-cell interval flyout — body-appended, mirrors .iv-menu surface. */
.mcl-flyout{
  position:fixed; z-index:10001; padding:.5rem;
  background:var(--bg-elevated); border-radius:var(--radius);
  box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-rail);
}
.mcl-flyout[hidden]{ display:none; }

/* Layout button is just a .chart-type-btn; this only colors the active state. */
#btn-layout.active{ color:var(--accent); }

/* Toolbar popover — layout grid picker, sync toggles, saved layouts. */
.mcl-panel{
  position:fixed; z-index:10000; width:288px; padding:8px; background:var(--bg-elevated);
  border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-menu);
}
.mcl-panel[hidden]{ display:none; }
.mcl-head{ display:flex; align-items:center; justify-content:space-between; padding:2px 4px 8px; }
.mcl-head span{ font-size:.78rem; font-weight:600; color:var(--text-secondary); }
.mcl-close{ color:var(--text-muted); background:none; border:none; cursor:pointer; font-size:.95rem; line-height:1; padding:2px 4px; border-radius:var(--radius-sm); }
.mcl-close:hover{ color:var(--text-primary); background:var(--bg-hover); }
.mcl-sec-lbl{ margin:8px 2px 5px; font-family:var(--font-mono); font-size:max(.5rem, var(--fs-floor)); font-weight:700;
  letter-spacing:normal; text-transform:none; color:var(--text-muted); }
.mcl-opts{ display:flex; gap:5px; }
.mcl-opt{ flex:1 1 0; display:flex; align-items:center; justify-content:center; height:2.25rem;
  background:var(--bg-tertiary); border:none; border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default); cursor:pointer; color:var(--text-muted); }
.mcl-opt:hover{ color:var(--text-secondary); background:var(--bg-hover); }
.mcl-opt.active{ color:var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mcl-opt svg{ width:18px; height:18px; }
.mcl-syncs{ display:flex; flex-wrap:wrap; gap:5px; }
.mcl-sync-btn{ flex:1 1 calc(50% - 5px); padding:5px 8px; font-size:max(.7rem, var(--fs-floor)); font-weight:600;
  color:var(--text-secondary); background:var(--bg-tertiary); border:none; border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default); cursor:pointer; text-align:center; }
.mcl-sync-btn:hover{ color:var(--text-primary); }
.mcl-sync-btn.active{ color:var(--on-accent); background:var(--accent); box-shadow:none; }
.mcl-sync-btn[disabled]{ opacity:.4; cursor:default; pointer-events:none; }
.mcl-save{ display:flex; gap:6px; }
.mcl-save-input{ flex:1 1 auto; min-width:0; padding:6px 9px; font-size:.78rem;
  color:var(--text-primary); background:var(--bg-tertiary); border:none; border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default); }
.mcl-save-input::placeholder{ color:var(--text-muted); }
.mcl-save-input:focus{ outline:none; box-shadow: inset 0 0 0 1px var(--accent); }
.mcl-save-btn{ flex:0 0 auto; padding:6px 12px; font-size:.76rem; font-weight:600; color:var(--on-accent);
  background:var(--accent); border:none; border-radius:var(--radius-sm); cursor:pointer; }
.mcl-save-btn:hover{ filter:brightness(1.08); }
.mcl-saved{ margin-top:8px; display:flex; flex-direction:column; gap:1px; max-height:180px; overflow-y:auto; }
.mcl-empty{ padding:7px 6px; font-size:.74rem; color:var(--text-muted); }
.mcl-saved-row{ display:flex; align-items:center; gap:8px; padding:6px; border-radius:var(--radius-sm); cursor:pointer; }
.mcl-saved-row:hover{ background:var(--bg-row-hover); }
.mcl-saved-name{ flex:1 1 auto; font-size:.78rem; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mcl-saved-meta{ flex:0 0 auto; font-family:var(--font-mono); font-size:max(.62rem, var(--fs-floor)); color:var(--text-muted); }
.mcl-saved-del{ flex:0 0 auto; color:var(--text-muted); background:none; border:none; cursor:pointer; font-size:.82rem; line-height:1; padding:2px 4px; }
.mcl-saved-del:hover{ color:var(--red); }
/* The left drawing rail acts on the single chart only; hide it in grid mode. */
body.mc-grid-active .draw-rail{ display:none!important; }

/* ════════════════════════════════════════════════════════════════════════
   Corporate-event + calendar overlays
   Earnings / dividend / split / news markers on the chart time axis, a
   toolbar category menu, and the hover tooltip. Self-contained block.
   ════════════════════════════════════════════════════════════════════════ */
.events-cv{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:4;}

/* ════════════════════════════════════════════════════════════════════════
   Trade from chart: position + working-order tag pills.
   The container is click-through; only the pills capture pointer events, so the
   chart crosshair / drawing tools keep working. Pills sit above #draw-cv so they
   stay grabbable even while a drawing tool is armed. Inset rings, no 1px borders.
   ════════════════════════════════════════════════════════════════════════ */
.trade-lines{position:absolute;inset:0;pointer-events:none;z-index:6;overflow:hidden;}
.tl-pill{
  position:absolute;right:70px;transform:translateY(-50%);
  display:inline-flex;align-items:center;gap:0.34rem;
  padding:0.16rem 0.4rem;border-radius:var(--radius-sm);
  background:var(--bg-elevated);color:var(--text-primary);
  font:600 11px/1.1 var(--font-mono);white-space:nowrap;
  pointer-events:auto;box-shadow:var(--shadow-hairline);
  user-select:none;
}
.tl-pill .tl-dot{width:7px;height:7px;border-radius:50%;flex:none;}
.tl-pill .tl-name{color:var(--text-secondary);}
.tl-pill .tl-qty{color:var(--text-primary);}
.tl-pill .tl-px{color:var(--text-primary);font-weight:700;}
.tl-entry{box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--slate) 55%, transparent),var(--shadow-hairline);}
.tl-entry .tl-pnl{font-weight:700;}
.tl-entry .tl-pnl.up{color:var(--green);}
.tl-entry .tl-pnl.down{color:var(--red);}
.tl-entry .tl-acts{display:inline-flex;gap:0.2rem;margin-left:0.15rem;}
.tl-add{
  pointer-events:auto;cursor:pointer;border:none;border-radius:3px;
  background:var(--bg-tertiary);color:var(--text-secondary);
  font:600 10px/1 var(--font-mono);padding:0.2rem 0.34rem;
  box-shadow:inset 0 0 0 1px var(--border-default);transition:background .12s var(--ease-out),color .12s var(--ease-out);
}
.tl-add:hover{background:var(--bg-hover);color:var(--text-primary);}
/* "Close" flattens the position from the entry pill: a garnet danger tint so
   it reads apart from the neutral "+ Stop / + Target" adds, and a solid fill
   once armed ("Confirm close") so the confirm state is unmistakable. */
.tl-close{color:var(--red);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 32%, transparent);}
.tl-close:hover{background:var(--red-dim);color:var(--red);}
.tl-close.tl-close-armed,
.tl-close.tl-close-armed:hover{background:var(--red);color:var(--on-accent-bright);box-shadow:inset 0 0 0 1px var(--red);}
.tl-order{box-shadow:inset 0 0 0 1px var(--tl-col,color-mix(in srgb, var(--text-primary) 25%, transparent)),var(--shadow-hairline);cursor:grab;}
.tl-order.tl-dragging{cursor:grabbing;box-shadow:inset 0 0 0 1px var(--tl-col),var(--shadow-pop);}
.tl-order .tl-grip{display:inline-flex;color:var(--text-muted);cursor:grab;margin-right:-0.1rem;}
.tl-order.tl-dragging .tl-grip{cursor:grabbing;}
.tl-x{
  pointer-events:auto;cursor:pointer;border:none;background:transparent;
  color:var(--text-muted);font-size:13px;line-height:1;padding:0 0.1rem;margin-left:0.05rem;
  border-radius:3px;transition:color .12s var(--ease-out),background .12s var(--ease-out);
}
.tl-x:hover{color:var(--red);background:var(--bg-hover);}

/* Category + adjust menu — reuses .iv-menu surface; rows mirror .ps-row. */
.ev-trigger{gap:0.2rem;min-width:auto;padding:0 0.375rem;}
.ev-menu{min-width:12.5rem;}
.ev-menu .ev-head{
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  letter-spacing:normal;text-transform:none;color:var(--text-muted);
  padding:0.125rem 0.5rem 0.375rem;
}
.ev-row{
  display:flex;align-items:center;gap:0.5rem;width:100%;
  height:1.75rem;padding:0 0.5rem;
  border:none;border-radius:var(--radius-sm);
  background:transparent;color:var(--text-secondary);
  font-family:var(--font-mono);font-size:max(0.625rem, var(--fs-floor));font-weight:600;
  letter-spacing:0.02em;text-transform:none;text-align:left;
  cursor:pointer;white-space:nowrap;
  transition:background .12s var(--ease-out),color .12s var(--ease-out);
}
.ev-row + .ev-row{margin-top:0.0625rem;}
.ev-row:hover{background:var(--bg-row-hover);color:var(--text-primary);}
.ev-row .ev-dot{
  width:1.0625rem;height:1.0625rem;border-radius:0.25rem;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:max(0.625rem, var(--fs-floor));font-weight:800;
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 8%, transparent);
}
.ev-row .ev-name{flex:1;}
.ev-row .ev-check{display:inline-flex;align-items:center;justify-content:center;
  width:0.875rem;height:0.875rem;flex-shrink:0;color:var(--accent);opacity:0;}
.ev-row.on .ev-check{opacity:1;}
.ev-row.on .ev-name{color:var(--text-primary);}
.ev-sep{height:1px;margin:0.375rem 0;background:color-mix(in srgb, var(--text-primary) 6%, transparent);}

/* Hover tooltip extras layered on the .spike-tip shell. */
.event-tip .et-head{
  display:flex;align-items:center;gap:0.5rem;
  padding:0.625rem 0.875rem 0.5rem;
  border-bottom:1px solid color-mix(in srgb, var(--text-primary) 4%, transparent);
}
.event-tip .et-badge{
  width:1.375rem;height:1.375rem;border-radius:0.3125rem;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  font-size:0.75rem;font-weight:800;
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 8%, transparent);
}
.event-tip .et-title{
  font-family:var(--font-sans);font-size:0.8125rem;font-weight:700;
  color:var(--text-primary);letter-spacing:-.01em;
}
.event-tip .et-date{margin-left:auto;font-family:var(--font-mono);
  font-size:max(0.6875rem, var(--fs-floor));color:var(--text-muted);}
.event-tip .et-body{padding:0.5rem 0.875rem 0.625rem;}
.event-tip .et-row{
  display:flex;justify-content:space-between;align-items:center;gap:1.25rem;
  padding:2px 0;font-family:var(--font-mono);font-size:0.75rem;color:var(--text-muted);
}
.event-tip .et-val{color:var(--text-secondary);font-weight:600;}
.event-tip .et-val.up{color:var(--green);}
.event-tip .et-val.down{color:var(--red);}
.event-tip .et-pill{
  margin-left:auto;font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  padding:2px 0.4375rem;border-radius:0.25rem;
}
.event-tip .et-pill.up{background:color-mix(in srgb, var(--green) 12%, transparent);color:var(--green);}
.event-tip .et-pill.down{background:color-mix(in srgb, var(--red) 12%, transparent);color:var(--red);}
.event-tip .et-pill.flat{background:color-mix(in srgb, var(--champagne) 12%, transparent);color:var(--champagne);}
.event-tip .et-headline{
  font-family:var(--font-sans);font-size:0.8125rem;line-height:1.45;
  color:var(--text-primary);font-weight:600;
}
/* Machine-written note on a news flag marker. Same treatment as the news dot
   tooltip's .tt-ai: inset surface + purple attribution rail + mono tag, so the
   model's sentence never reads as part of .et-headline. */
.event-tip .et-ai{
  margin:0.375rem 0 0;padding:0.375rem 0.5rem;
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--text-primary) 5%, transparent);
}
/* 55/45 toward --text-primary — see the note on .tt-ai-tag (raw --orchid is
   only 3.2:1 on the cream tooltip). */
.event-tip .et-ai-tag{
  font-family:var(--font-mono);font-size:max(0.625rem, var(--fs-floor));font-weight:700;
  letter-spacing:0.08em;
  color:color-mix(in srgb, var(--orchid) 55%, var(--text-primary));
}
.event-tip .et-ai-src{
  margin-left:0.375rem;font-family:var(--font-mono);font-size:max(0.625rem, var(--fs-floor));
  color:var(--text-muted);
}
.event-tip .et-ai-body{
  margin-top:0.1875rem;font-family:var(--font-sans);font-size:0.75rem;
  line-height:1.45;color:var(--text-secondary);font-weight:400;
}
.event-tip .et-hint{
  margin-top:0.375rem;font-family:var(--font-mono);font-size:max(0.625rem, var(--fs-floor));
  color:var(--accent);letter-spacing:0.02em;
}

/* ── Options: ticket mode + chain modal ─────────────────────────────────── */
.trade-opt-open{
  margin-left:auto;margin-right:0.375rem;padding:0.1875rem 0.5625rem;
  border:none;border-radius:var(--radius-sm);cursor:pointer;
  background:transparent;box-shadow:0 0 0 1px var(--border-default) inset;
  color:var(--text-secondary);font-family:var(--font-sans);
  font-size:max(0.6875rem, var(--fs-floor));font-weight:700;letter-spacing:.02em;transition:all .15s;
}
.trade-opt-open:hover{color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset;}
.trade-opt-note{
  margin:0.375rem 0.875rem 0;padding:0.5rem 0.625rem;
  background:var(--bg-secondary);border-radius:var(--radius-sm);
  box-shadow:0 0 0 1px var(--border-default) inset;
}
.trade-opt-name{
  font-family:var(--font-mono);font-size:0.75rem;font-weight:700;
  color:var(--text-primary);margin-bottom:0.1875rem;
}
.trade-opt-sub{font-size:max(0.625rem, var(--fs-floor));color:var(--text-muted);line-height:1.45;}
.trade-opt-clear{
  margin-top:0.375rem;padding:0.1875rem 0.5rem;border:none;cursor:pointer;
  border-radius:var(--radius-sm);background:transparent;
  box-shadow:0 0 0 1px var(--border-default) inset;
  color:var(--text-secondary);font-size:max(0.625rem, var(--fs-floor));font-weight:700;transition:all .15s;
}
.trade-opt-clear:hover{color:var(--text-primary);box-shadow:0 0 0 1px var(--text-muted) inset;}

.oc-overlay{
  position:fixed;inset:0;z-index:200;display:none;
  align-items:center;justify-content:center;
  background:var(--scrim-sheet);backdrop-filter:blur(2px);
}
.oc-overlay.open{display:flex;}
.oc-modal{
  width:min(30rem,calc(100vw - 2rem));max-height:min(34rem,calc(100vh - 4rem));
  display:flex;flex-direction:column;background:var(--bg-elevated);
  border-radius:var(--radius-lg);padding:1rem 1rem 0.75rem;
  box-shadow:0 0 0 1px var(--border-strong) inset, var(--shadow-modal);
}
.oc-head{display:flex;align-items:baseline;gap:0.625rem;margin-bottom:0.625rem;}
.oc-head h3{margin:0;flex:1;font-size:0.9375rem;font-weight:700;color:var(--text-primary);}
/* Underlying live price anchors the chain header. */
.oc-underlying{
  font-family:var(--font-mono);font-size:1rem;font-weight:700;
  color:var(--text-primary);letter-spacing:-.02em;
}
/* Native select kept for a11y/keyboard, visually hidden; pills are the control. */
.oc-expiry-select{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0;
}
.oc-x{
  align-self:center;background:none;border:none;color:var(--text-muted);
  font-size:1.25rem;line-height:1;cursor:pointer;padding:0 0.25rem;transition:color .15s;
}
.oc-x:hover{color:var(--text-primary);}
/* Expiry pills: horizontal scrollable strip of tabs. */
.oc-expiry-strip{margin-bottom:0.625rem;}
.oc-pills{
  display:flex;gap:0.375rem;overflow-x:auto;padding-bottom:0.25rem;
  scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent;
}
.oc-pills::-webkit-scrollbar{height:0.25rem;}
.oc-pills::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:2px;}
.oc-pill{
  flex:none;padding:0.3125rem 0.625rem;border:none;cursor:pointer;
  border-radius:1rem;background:var(--bg-secondary);
  box-shadow:inset 0 0 0 1px var(--border-default);
  color:var(--text-muted);font-family:var(--font-sans);font-size:max(0.6875rem, var(--fs-floor));font-weight:600;
  white-space:nowrap;transition:color .12s,box-shadow .12s,background .12s;
}
.oc-pill:hover{color:var(--text-secondary);box-shadow:inset 0 0 0 1px var(--text-muted);}
.oc-pill.active{
  background:var(--accent-dim);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);
}
.oc-pill:focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--accent);}
.oc-cols{
  display:grid;grid-template-columns:1fr 4.5rem 1fr;text-align:center;
  font-size:max(0.625rem, var(--fs-floor));font-weight:700;letter-spacing:normal;text-transform:none;
  color:var(--text-muted);padding-bottom:0.375rem;
  border-bottom:1px solid var(--border-subtle);
}
.oc-body{flex:1;overflow-y:auto;min-height:8rem;}
.oc-row{
  display:grid;grid-template-columns:1fr 4.5rem 1fr;align-items:stretch;
  border-bottom:1px solid var(--border-subtle);
}
.oc-row.oc-atm{background:var(--bg-secondary);}
/* Live-price divider: a champagne hairline flanking the underlying price so
   ITM / OTM reads instantly. The flanking rules are borders, not text dashes. */
.oc-divider{
  display:flex;align-items:center;gap:0.625rem;padding:0.4375rem 0.5rem;
}
.oc-divider::before,.oc-divider::after{
  content:'';flex:1;height:1px;background:var(--champagne-ring);
}
.oc-divider span{
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  color:var(--champagne);letter-spacing:-.01em;
}
.oc-strike{
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-mono);font-size:0.75rem;font-weight:700;color:var(--text-primary);
}
.oc-prem{
  display:flex;align-items:baseline;justify-content:center;gap:0.375rem;
  padding:0.4375rem 0.25rem;border:none;background:transparent;cursor:pointer;
  font-family:var(--font-mono);font-size:0.75rem;color:var(--text-secondary);
  border-radius:var(--radius-sm);
  transition:background .12s, color .12s, box-shadow .12s;
}
/* ITM side gets a barely-there wash so moneyness reads at a glance. */
.oc-prem.oc-itm{background:color-mix(in srgb, var(--text-primary) 2.8%, transparent);color:var(--text-primary);}
/* Interactive premium chip: hover ring is an inset box-shadow, not a 1px
   border (the app's known bowtie rasterization trap on rounded borders). */
.oc-prem:not(.oc-none):hover{
  color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);
}
.oc-prem:not(.oc-none):focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--accent);}
.oc-prem.oc-none{cursor:default;color:var(--text-muted);}
.oc-prem.oc-none:hover{background:transparent;color:var(--text-muted);}
.oc-oi{font-size:max(0.5625rem, var(--fs-floor));color:var(--text-muted);}
.oc-loading{padding:1.5rem 0;text-align:center;font-size:0.75rem;color:var(--text-muted);}
.oc-note{
  padding-top:0.5rem;font-size:max(0.625rem, var(--fs-floor));color:var(--text-muted);line-height:1.5;
}

/* ── Futures: picker modal + ticket button ──────────────────────────────── */
.trade-fut-open{margin-left:0;}  /* Options carries the margin-left:auto push */

.fp-overlay{
  position:fixed;inset:0;z-index:200;display:none;
  align-items:center;justify-content:center;
  background:var(--scrim-sheet);backdrop-filter:blur(2px);
}
.fp-overlay.open{display:flex;}
.fp-modal{
  width:min(30rem,calc(100vw - 2rem));max-height:min(34rem,calc(100vh - 4rem));
  display:flex;flex-direction:column;background:var(--bg-elevated);
  border-radius:var(--radius-lg);padding:1rem 1rem 0.75rem;
  box-shadow:0 0 0 1px var(--border-strong) inset, var(--shadow-modal);
}
.fp-head{display:flex;align-items:center;gap:0.625rem;margin-bottom:0.625rem;}
.fp-head h3{margin:0;flex:1;font-size:0.9375rem;font-weight:700;color:var(--text-primary);}
.fp-x{
  background:none;border:none;color:var(--text-muted);font-size:1.25rem;line-height:1;
  cursor:pointer;padding:0 0.25rem;transition:color .15s;
}
.fp-x:hover{color:var(--text-primary);}
.fp-cols{
  display:grid;grid-template-columns:1fr auto;
  font-size:max(0.625rem, var(--fs-floor));font-weight:700;letter-spacing:normal;text-transform:none;
  color:var(--text-muted);padding-bottom:0.375rem;
  border-bottom:1px solid var(--border-subtle);
}
.fp-cols span:nth-child(2){text-align:right;}
.fp-body{flex:1;overflow-y:auto;min-height:8rem;}
.fp-row{
  display:grid;grid-template-columns:1fr auto;align-items:center;gap:0.75rem;
  width:100%;padding:0.625rem 0.25rem;border:none;background:transparent;
  cursor:pointer;text-align:left;
  border-bottom:1px solid var(--border-subtle);
  transition:background .12s;
}
.fp-row:hover{background:var(--bg-row-hover);}
.fp-row.fp-dead{cursor:default;opacity:0.55;}
.fp-row.fp-dead:hover{background:transparent;}
.fp-name{
  display:flex;flex-direction:column;gap:0.1875rem;min-width:0;
}
.fp-name-row{
  display:flex;align-items:center;gap:0.4375rem;
  font-size:0.8125rem;font-weight:600;color:var(--text-primary);
}
/* Contract code as a quiet chip (inset shadow, not a 1px border). */
.fp-code{
  flex:none;padding:0.0625rem 0.375rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-default);
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:600;
  color:var(--text-muted);letter-spacing:.02em;
}
.fp-unit{font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));color:var(--text-muted);}
.fp-quote{display:flex;flex-direction:column;align-items:flex-end;gap:0.125rem;}
.fp-last{
  font-family:var(--font-mono);font-size:0.875rem;font-weight:700;
  color:var(--text-primary);letter-spacing:-.01em;
}
/* Margin figure carries the champagne accent (the money fact for futures). */
.fp-margin{
  font-family:var(--font-mono);font-size:max(0.625rem, var(--fs-floor));color:var(--champagne);
}
.fp-loading{padding:1.5rem 0;text-align:center;font-size:0.75rem;color:var(--text-muted);}
.pf-sym-plain{color:var(--text-primary);font-weight:600;}

/* ── Composited dock glide ────────────────────────────────────────────────
   Owner report 2026-07-25: "when I open the trade panel or the key stats, the
   charts and graph panels on their left are not fully synced ... not smooth at
   all while moving."

   Root cause (measured, not guessed): `.charts{margin-right:var(--dock-r)}`
   (05-chart-panels.css) used to be TRANSITIONED (09-graphs-drawer.css), so the
   chart block re-laid out on every frame of the .22s dock toggle. Each of those
   layouts woke four independent ResizeObserver families — LightweightCharts'
   own per-chart RO, recalcMinBarSpacing, and the eight pane ROs — producing
   ~65 layouts, ~75 style recalcs, 20 LWC canvas resizes and 30 pane canvas
   paints per single toggle. The main thread delivered only 5-7 frames in that
   220ms (median 48-58ms/frame), so the chart's right edge moved in 5-7 lurches
   of up to 185px, while the panel next to it slid on a COMPOSITED transform at
   full refresh rate. Two different clocks — hence "not synced".

   Fix: the reservation now snaps (exactly one layout + one resize per toggle,
   at the end for an opening dock, at the start for a closing one — where it is
   hidden under the panel that is still covering that strip), and the motion the
   user sees is a compositor-only translate driven from here. This is
   pixel-faithful because a chart resize IS a translate: narrowing the block by
   N px shifts every candle left by exactly N px at constant barSpacing
   (verified against timeToCoordinate).

   js/chart/dock-glide.js owns --dg-x and the two classes. It sets the start
   value under .dg-arm (transition suppressed), forces a reflow, then drops
   .dg-arm and writes the end value so `transform` — and only `transform` —
   interpolates.

   Selector notes:
   • LightweightCharts is translated as ONE unit, at its ROOT. Its internal
     canvases must NOT be translated individually: the price-axis canvas lives
     in its own ~56px-wide clipping cell, so a -267px translate pushed it
     entirely out of that cell and the price scale VANISHED for the whole glide
     (caught in a mid-transition screenshot, 2026-07-25). The plot canvas
     survived only because its cell is full-width.
   • The `!important` on the LWC root's transition is load-bearing, not
     laziness. app.js's reveal wipe (_revealPrice, ~line 5284) writes an INLINE
     `transition: clip-path .45s ...` on that root and never clears it, and an
     inline declaration outranks any normal stylesheet rule — without
     !important the transform applied but never interpolated (it snapped). The
     override is scoped to the 220ms the dock-glide class exists, and the wipe
     is a load-time/stock-switch effect, so the two never meaningfully overlap.
   • `.cp > canvas` / `.indicator-pane > canvas` are the app's OWN overlay
     canvases — DIRECT children only, so LWC's nested ones can't match here and
     get double-shifted. Each is inset:0 inside a full-size pane, so it has room
     to slide.
   • .cp-value / .cp-toggle / .sent-slider-wrap / .pane-axis (the indicator
     panes' HTML price scale, added 2026-10-05: it stayed put mid glide) are `right:`-anchored pane
     chrome, so they must ride the same clock as the axis they line up with.
   • .replay-bar is deliberately absent: it is centred via its own
     transform:translateX(-50%) and only exists during bar replay.
   • GestureX writes INLINE transforms on the pane canvases during a pan and
     clears them (to '') on settle, so it cleanly overrides and then releases
     this rule. A pan and a dock toggle cannot be in flight at once. */
:root{ --dg-x: 0px; }
body.dock-glide #charts .cp > canvas,
body.dock-glide #charts .indicator-pane > canvas,
body.dock-glide #charts .cp-value,
body.dock-glide #charts .cp-toggle,
body.dock-glide #charts .sent-slider-wrap,
body.dock-glide #charts .pane-axis,
body.dock-glide #charts .trade-lines{
  transform: translate3d(var(--dg-x), 0, 0);
  transition: transform .22s var(--ease-glide);
  will-change: transform;
}
body.dock-glide #charts .tv-lightweight-charts{
  transform: translate3d(var(--dg-x), 0, 0);
  transition: transform .22s var(--ease-glide) !important;   /* beats the inline clip-path transition */
  will-change: transform;
}
/* Arming frame: park the layers at the start offset with no interpolation. */
body.dock-glide.dg-arm #charts .cp > canvas,
body.dock-glide.dg-arm #charts .indicator-pane > canvas,
body.dock-glide.dg-arm #charts .cp-value,
body.dock-glide.dg-arm #charts .cp-toggle,
body.dock-glide.dg-arm #charts .sent-slider-wrap,
body.dock-glide.dg-arm #charts .pane-axis,
body.dock-glide.dg-arm #charts .trade-lines{ transition: none; }
body.dock-glide.dg-arm #charts .tv-lightweight-charts{ transition: none !important; }
/* The Chat Bot panel's slide (DockGlide.slide, 2026-10-05) runs on the MAIN
   thread: the panel, the .main margin and the fixed right column all move by
   main thread interpolation there (44-research-chat.css), and a compositor
   transform would lead them by up to a frame or two (measured ~90px mid
   slide in headless Chrome). So under .dg-sync each layer interpolates its
   own --dg-o (registered, not inherited: only these few elements restyle per
   frame) toward --dg-x, on the chat's clock (--rch-slide / --rch-ease, which
   equal this file's .22s glide). */
@property --dg-o{syntax:'<length>';inherits:false;initial-value:0px;}
body.dock-glide.dg-sync #charts .cp > canvas,
body.dock-glide.dg-sync #charts .indicator-pane > canvas,
body.dock-glide.dg-sync #charts .cp-value,
body.dock-glide.dg-sync #charts .cp-toggle,
body.dock-glide.dg-sync #charts .sent-slider-wrap,
body.dock-glide.dg-sync #charts .pane-axis,
body.dock-glide.dg-sync #charts .trade-lines{
  --dg-o: var(--dg-x);
  transform: translate3d(var(--dg-o), 0, 0);
  transition: --dg-o var(--rch-slide, .22s) var(--rch-ease, var(--ease-glide));
}
body.dock-glide.dg-sync #charts .tv-lightweight-charts{
  --dg-o: var(--dg-x);
  transform: translate3d(var(--dg-o), 0, 0);
  transition: --dg-o var(--rch-slide, .22s) var(--rch-ease, var(--ease-glide)) !important;
}
body.dock-glide.dg-sync.dg-arm #charts .cp > canvas,
body.dock-glide.dg-sync.dg-arm #charts .indicator-pane > canvas,
body.dock-glide.dg-sync.dg-arm #charts .cp-value,
body.dock-glide.dg-sync.dg-arm #charts .cp-toggle,
body.dock-glide.dg-sync.dg-arm #charts .sent-slider-wrap,
body.dock-glide.dg-sync.dg-arm #charts .pane-axis,
body.dock-glide.dg-sync.dg-arm #charts .trade-lines{ transition: none; }
body.dock-glide.dg-sync.dg-arm #charts .tv-lightweight-charts{ transition: none !important; }
/* Reduced motion: dock-glide.js never arms the glide, but belt-and-braces. */
@media (prefers-reduced-motion: reduce){
  body.dock-glide #charts .cp > canvas,
  body.dock-glide #charts .indicator-pane > canvas,
  body.dock-glide #charts .cp-value,
  body.dock-glide #charts .cp-toggle,
  body.dock-glide #charts .sent-slider-wrap,
  body.dock-glide #charts .pane-axis,
  body.dock-glide #charts .trade-lines{ transition: none; transform: none; }
  body.dock-glide #charts .tv-lightweight-charts{ transition: none !important; transform: none; }
}
