/* ═══════════════════════════════════════════════════════════════
   Market Analysis — Modern Dark Theme (v2)
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --ma-bg: #0a0e17;
  --ma-card: #0d1525;
  --ma-card-alt: #111a2e;
  --ma-border: #1e2a3d;
  --ma-border-light: rgba(30,42,61,0.5);
  --ma-text: #e8f1f5;
  --ma-text-muted: #94a3b8;
  --ma-text-dim: #64748b;
  --ma-accent-cyan: #22d3ee;
  --ma-accent-blue: #7283B1;
  --ma-accent-rose: #f43f5e;
  --ma-accent-amber: #c7a86f;
  --ma-accent-emerald: #22c55e;
  --ma-accent-purple: #a855f7;
  --ma-accent-gold: #c7a86f;
  --ma-red: #ef4444;
  --ma-green: #7283B1;
  --ma-yellow: #c7a86f;
  --ma-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ma-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Container ── */
.market-analysis-container,
.market-analysis-content-renderer {
  font-family: var(--ma-font) !important;
  color: var(--ma-text);
  line-height: 1.6;
  background: var(--ma-bg);
}

.market-analysis-container *,
.market-analysis-content-renderer * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.market-analysis-container h1, .market-analysis-container h2,
.market-analysis-container h3, .market-analysis-container h4,
.market-analysis-container h5, .market-analysis-container h6 {
  font-family: var(--ma-font) !important;
  line-height: 1.4;
}

/* ── Top Sections Row (OMAS + Action Plan) ── */
.top-sections-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

/* Equal height: left stretches to match right stack */
.top-sections-equal-height {
  align-items: stretch;
}

.top-section-column {
  flex: 1;
  background: var(--ma-card);
  border: 1px solid var(--ma-border);
  border-radius: 6px;
  padding: 0;
  min-width: 0;
  overflow: hidden;
}

/* Left column: Overnight Summary */
.top-section-left {
  border-top: 3px solid #60A5FA;
  display: flex;
  flex-direction: column;
}

.top-section-left .overnight-market-action-content {
  flex: 1;
}

/* Right column: stacked cards (Action Plan + Flows) */
.top-section-right-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Individual cards inside right stack */
.top-section-right-stack .top-section-card {
  flex: 1;
}

/* Action Plan card border */
.top-section-right-stack .top-section-card:first-child {
  border-top: 3px solid #F97316;
}

/* Flows card border */
.top-section-flows-card {
  border-top: 3px solid #FB7185 !important;
}

.top-section-title {
  font-family: var(--ma-font) !important;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ma-border);
}

.overnight-summary-title {
  color: #60A5FA;
}

.action-plan-title {
  color: #F97316;
}

.overnight-market-action-content,
.action-plan-content {
  font-size: 13px;
  line-height: 1.7;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  padding: 5px;
}

.overnight-market-action-content {
  color: #c7a86f;
}

.action-plan-content {
  color: #8899aa;
}

.overnight-market-action-content p,
.action-plan-content p {
  margin-bottom: 8px;
}
.overnight-market-action-content ul{
  list-style-type:none;
}
/* Session Themes, Trading Strategy, Key Risks styling */
.overnight-market-action-content strong,
.action-plan-content strong {
  color: #7283B1;
}

/* ── Grid Layout ── */
.market-analysis-grid-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.market-analysis-grid-column {
  flex: 1;
  background: var(--ma-card);
  border: 1px solid var(--ma-border);
  border-radius: 6px;
  padding: 0;
  min-width: 0;
  overflow: hidden;
}

/* Stacked column: holds multiple separate cards in one grid column position */
.market-analysis-grid-column-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
}

/* ── Section Titles ── */
.grid-section-title {
  font-family: var(--ma-font) !important;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 12px;
  margin: 0;
  border-bottom: 1px solid var(--ma-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Section heading colors by section type */
.section-type-news { color: #38BDF8; }
.section-type-schedule { color: #c7a86f; }
.section-type-riskcal { color: #FBBF24; }
.section-type-flows { color: #FB7185; }
.section-type-keyprices { color: #34D399; }
.section-type-overnight { color: #60A5FA; }
.section-type-actionplan { color: #F97316; }
.section-type-charts { color: #a855f7; }


/* Section card top borders by type */
/* Section card top borders by type.
 * Originally used :has(.section-type-<X>) on the grid column to detect the
 * inner h3 class. Replaced with direct .ma-col--<X> modifier classes added
 * to the parent by buildCard() in MarketAnalysisRenderer.js — keeps these
 * rules working in Chromium < 105 (e.g. CefSharp 84 embedded browsers
 * which lack :has() support).
 */
.market-analysis-grid-column.ma-col--news       { border-top: 3px solid #38BDF8; }
.market-analysis-grid-column.ma-col--schedule   { border-top: 3px solid #c7a86f; }
.market-analysis-grid-column.ma-col--riskcal    { border-top: 3px solid #FBBF24; }
.market-analysis-grid-column.ma-col--flows      { border-top: 3px solid #FB7185; }
.market-analysis-grid-column.ma-col--keyprices  { border-top: 3px solid #34D399; }
.market-analysis-grid-column.ma-col--overnight  { border-top: 3px solid #60A5FA; }
.market-analysis-grid-column.ma-col--actionplan { border-top: 3px solid #F97316; }
.market-analysis-grid-column.ma-col--charts     { border-top: 3px solid #a855f7; }

/* ── Price History Chart ── */
.price-chart-section {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 8px;
  padding: 14px 16px 10px;
}
.price-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.price-chart-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #94a3b8;
  font-family: var(--ma-font);
}
.price-chart-subtitle {
  font-size: 13px;
  color: #64748b;
  font-family: var(--ma-font-mono);
}
.price-chart-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.price-chart-latest {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: var(--ma-font-mono);
}
.price-chart-change {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ma-font-mono);
}
.price-chart-wrap {
  margin-top: 4px;
}
.price-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  color: #64748b;
  font-size: 13px;
  font-style: italic;
}
.price-chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
  font-family: var(--ma-font-mono);
}
@keyframes price-spinner-spin { to { transform: rotate(360deg); } }
.price-chart-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(59,130,246,0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: price-spinner-spin 0.8s linear infinite;
}

/* Section Title Icons */
.grid-section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
}
.grid-section-title-icon svg { width: 14px; height: 14px; }
.icon-rose { background: rgba(244,63,94,0.15); color: var(--ma-accent-rose); }
.icon-amber { background: rgba(245,158,11,0.15); color: var(--ma-accent-amber); }
.icon-emerald { background: rgba(34,197,94,0.15); color: var(--ma-accent-emerald); }
.icon-purple { background: rgba(168,85,247,0.15); color: var(--ma-accent-purple); }

/* ── Section Content Areas ── */
.grid-section-content,
.schedule-content,
.key-levels-content,
.flows-content,
.risk-calendar-content {
  padding: 0;
  font-size: 13px;
  max-height: none !important;
  min-height: auto !important;
  overflow: visible !important;
  height: auto !important;
}

/* Content inside flows gets padding */
.flows-content {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #8899aa;
}

/* ── Sentiment Gauges ── */
.sentiment-gauges-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px 8px 6px;
  /* min-height instead of fixed height. In Chromium 84, if the SVG
   * children compute a height larger than expected (see .gauge-svg
   * comment), a fixed `height: 140px` parent forces the label to
   * overflow outside the parent card. min-height keeps the visual
   * baseline but allows the container to grow if needed.
   */
  min-height: 140px;
  border-bottom: 1px solid var(--ma-border);
  margin-bottom: 0;
  align-items: center;
}

.sentiment-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 180px;
}

.gauge-svg {
  width: 100%;
  max-width: 180px;
  /* Explicit height instead of `height: auto`.
   * In Chromium < ~90, `height: auto` on an inline SVG inside a flex
   * container doesn't compute the aspect-ratio-derived height correctly —
   * the SVG either falls back to its viewBox height (115px) or grows
   * further, pushing the .gauge-label below it outside the parent card.
   * 100px keeps the gauge proportional (viewBox is 200×115, so the actual
   * arc fits in <100px) and leaves room for the label inside the 140px
   * .sentiment-gauges-container.
   */
  height: 100px;
}

.gauge-label {
  font-size: 13px;
  color: var(--ma-text-muted);
  margin-top: 2px;
  text-align: center;
  font-weight: 500;
}

/* ── Risk Timeline ── */
.risk-timeline-container {
  position: relative;
  height: 140px;
  padding: 0 10px;
  margin-bottom: 0;
  overflow: visible;
}

.tl-label {
  font-family: var(--ma-font);
  letter-spacing: 0.01em;
}

/* ── Clickable timeline label (event has link) ── */
.tl-label-link {
  text-decoration: none;
  transition: color 0.15s ease;
  border-bottom: 1px dotted transparent;
}

.tl-label-link:hover {
  color: #c7a86f !important;
  border-bottom-color: #c7a86f;
  text-decoration: none;
}

.tl-dot:hover {
  transform: translateX(-50%) scale(1.3) !important;
  transition: transform 0.12s ease;
}

/* ── Compact Tooltip — shown on dot hover only ── */
.tl-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 260px;
  background: #141e2e;
  border: 1px solid #2a3a52;
  border-radius: 6px;
  padding: 6px 9px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 3px 12px rgba(0,0,0,0.45);
  font-family: var(--ma-font);
}

.tl-dot:hover .tl-tooltip {
  display: block;
}

/* ── Tooltip alignment for edge-positioned dots ── */
.tl-tooltip.tl-tooltip-align-right {
  left: auto;
  right: 50%;
  transform: translateX(10%);
}

.tl-tooltip.tl-tooltip-align-left {
  transform: translateX(-10%);
}

.tl-tip-title {
  font-size: 11px;
  font-weight: 600;
  color: #e8f1f5;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-tip-line {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.35;
  margin-bottom: 2px;
}

.tl-tip-arrow {
  font-weight: 700;
  font-size: 11px;
}

.tl-tip-label {
  font-weight: 600;
  font-size: 10px;
}

.tl-tip-text {
  color: #94a3b8;
}

.tl-tip-link {
  font-size: 9px;
  color: #c7a86f;
  margin-top: 4px;
  opacity: 0.85;
}

/* ── NOW marker ── */
.tl-now-marker {
  transition: left 0.3s ease;
}

/* ── Cluster: same-time event grouping ── */
.tl-cluster-main {
  transition: transform 0.15s ease;
}

.tl-cluster-main:hover {
  transform: translateX(-50%) scale(1.3) !important;
}

.tl-cluster-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  background: #e8f1f5;
  color: #0d1525;
  font-size: 7px;
  font-weight: 700;
  min-width: 11px;
  height: 11px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
  line-height: 1;
}

.tl-cluster-expand {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  background: #0d1525;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 6px 8px;
}

.tl-cluster-expanded .tl-cluster-expand {
  opacity: 1;
  pointer-events: auto;
}

.tl-cluster-expanded .tl-cluster-badge {
  display: none;
}

.tl-cluster-fan-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.tl-cluster-fan-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
  pointer-events: auto;
}

.tl-cluster-fan-dot:hover {
  transform: scale(1.35);
}

.tl-cluster-fan-dot:hover .tl-tooltip {
  display: block;
}

.tl-cluster-fan-label {
  font-size: 9px;
  color: #8899aa;
  text-decoration: none;
  font-family: var(--ma-font);
}

.tl-cluster-fan-label-link {
  cursor: pointer;
  border-bottom: 1px dotted transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  pointer-events: auto;
}

.tl-cluster-fan-label-link:hover {
  color: #c7a86f;
  border-bottom-color: #c7a86f;
  text-decoration: none;
}

.tl-cluster-link-icon {
  font-size: 8px;
  color: #64748b;
  margin-left: 2px;
}

.tl-cluster-fan-label-link:hover .tl-cluster-link-icon {
  color: #c7a86f;
}

.tl-cluster-hint {
  font-size: 8px;
  color: #64748b;
  margin-top: 2px;
  padding-left: 16px;
}

/* ── Geo Risk Bars ── */
.geo-risk-bars-container {
  padding: 8px 10px;
  height: 140px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.geo-risk-bar-row {
  margin-bottom: 8px;
}

.geo-risk-bar-row:last-child { margin-bottom: 0; }

.geo-risk-bar-labels {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.geo-risk-bar-driver {
  font-size: 11px;
  color: #8899aa;
  background: rgba(30,58,95,0.4);
  padding: 1px 6px;
  border-radius: 10px;
}

/* ── Compact geo risk bar: drivers shown as tags on hover ── */
.geo-risk-bar-compact {
  cursor: pointer;
}

.geo-risk-hover-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #141e2e;
  border: 1px solid #2a3a52;
  border-radius: 6px;
  padding: 8px 10px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 3px 12px rgba(0,0,0,0.45);
}

.geo-risk-hover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.geo-risk-bar-compact:hover .geo-risk-hover-tip {
  display: block;
}

/* geo-risk-bar styles now inline in JS to match React gradient */

/* ── Flows Sentiment Badge ── */
.flows-sentiment-badge {
  display: inline-block;
  font-family: var(--ma-font);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  vertical-align: middle;
}
.flows-sentiment-badge.bullish { background: var(--ma-accent-blue); color: #060b14; }
.flows-sentiment-badge.bearish { background: var(--ma-red); color: #fff; }
.flows-sentiment-badge.neutral { background: var(--ma-accent-gold); color: #060b14; }

/* ── Key Prices Table ── */
.key-prices-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ma-font-mono);
  font-size: 13px;
  padding: 0;
}

.key-levels-content {
  padding: 8px 12px !important;
}

.key-prices-table th {
  color: var(--ma-text-muted);
  font-weight: 500;
  text-align: right;
  padding: 2px 4px;
  border-bottom: 1px solid var(--ma-border);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.key-prices-table th:first-child { text-align: left; }

.key-prices-table td {
  padding: 2px 4px;
  text-align: right;
  color: var(--ma-text);
  border-bottom: 1px solid var(--ma-border-light);
}
.key-prices-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--ma-text-muted);
}

.key-prices-table .price-col { color: var(--ma-accent-gold) !important; }
.key-prices-table .low-col { color: var(--ma-red) !important; }
.key-prices-table .chg-positive { color: var(--ma-green) !important; }
.key-prices-table .chg-negative { color: var(--ma-red) !important; }

/* ── News Accordion ── */
.news-accordion-container { width: 100%; }

.news-accordion-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.news-accordion-item {
  cursor: pointer;
  transition: background 0.15s;
}

.news-accordion-item:hover { background: rgba(255,255,255,0.03); }

.news-accordion-item td {
  padding: 0px 4px;
  font-size: 13px;
  border-bottom: 1px solid rgba(30,58,95,0.35);
  vertical-align: middle;
}

.news-time {
  white-space: nowrap;
  color: #7283B1;
  font-family: var(--ma-font-mono);
  font-size: 13px;
  width: 100px;
  min-width: 100px;
}

.news-severity { width: 20px; text-align: center; }

.news-arrow {
  width: 20px;
  text-align: center;
  padding: 0 2px !important;
}

/* Related News / expanded row: arrow colors (Solarized-style) */
.arrow-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  font-weight: bold;
}

.arrow-indicator svg.arrow-svg {
  width: 12px;
  height: 12px;
  vertical-align: middle;
  flex-shrink: 0;
}

.news-accordion-table .arrow-indicator.up,
.news-accordion-content .arrow-indicator.up,
.news-accordion-content-wrapper .arrow-indicator.up {
  color: #268BD2;
}

.news-accordion-table .arrow-indicator.down,
.news-accordion-content .arrow-indicator.down,
.news-accordion-content-wrapper .arrow-indicator.down {
  color: #DC322F;
}

.news-accordion-table .arrow-indicator.neutral,
.news-accordion-content .arrow-indicator.neutral,
.news-accordion-content-wrapper .arrow-indicator.neutral {
  color: #7283B1;
}

.schedule-accordion-table .arrow-indicator.up,
.schedule-accordion-content .arrow-indicator.up {
  color: #268BD2;
}

.schedule-accordion-table .arrow-indicator.down,
.schedule-accordion-content .arrow-indicator.down {
  color: #DC322F;
}

.schedule-accordion-table .arrow-indicator.neutral,
.schedule-accordion-content .arrow-indicator.neutral {
  color: #7283B1;
}

.news-title {
  color: var(--ma-text);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-link {
  width: 24px;
  text-align: center;
}

.news-accordion-content {
  display: none;
}
.news-accordion-content.active { display: table-row; }

.news-accordion-content td {
  padding: 0 !important;
  border-bottom: 1px solid var(--ma-border);
}

.news-accordion-content-wrapper {
  padding: 4px;
  background: rgba(13,21,32,0.8);
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  max-height: none !important;
  overflow: visible !important;
  border-left: 1px solid #DC322F;
}

.news-full-title { font-weight: 600; margin-bottom: 6px; color: var(--ma-text); }
.news-description { margin-bottom: 4px; color: #c7a86f; }
.news-impact { color: #c7a86f; }

.news-description strong { color: #7283B1; }
.news-impact strong { color: #7283B1; }

/* ── Severity Indicators ── */
.severity-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}
.severity-indicator[data-severity="Red"] { background: #FF0000; }
.severity-indicator[data-severity="Yellow"] { background: #FFBF00; }
.severity-indicator[data-severity="Green"] { background: #008000; }
.severity-red .severity-indicator { background: #FF0000; }
.severity-yellow .severity-indicator { background: #FFBF00; }
.severity-green .severity-indicator { background: #008000; }

/* ── Schedule Accordion ── */
.schedule-accordion-container { width: 100%; }

.schedule-accordion-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.schedule-accordion-table thead th {
  font-size: 13px;
  font-weight: 500;
  color: #6b7b8f;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 4px;
  border-bottom: 1px solid rgba(30,58,95,0.35);
  text-align: right;
  background: #0a1018;
}
.schedule-accordion-table thead th:first-child { text-align: left; }

.schedule-accordion-item {
  cursor: pointer;
  transition: background 0.15s;
}
.schedule-accordion-item:hover { background: rgba(255,255,255,0.03); }

.schedule-accordion-item td {
  padding: 0px 4px;
  font-size: 13px;
  border-bottom: 1px solid rgba(30,58,95,0.35);
  vertical-align: middle;
}

.schedule-time {
  white-space: nowrap;
  color: #7283B1;
  font-family: var(--ma-font-mono);
  font-size: 13px;
  width: 50px;
  min-width: 50px;
}
.schedule-country { color: #c7a86f; width: 40px; min-width: 40px;}
.schedule-severity { width: 20px; min-width: 20px;}
.schedule-link { width: 24px; min-width: 24px;}
.schedule-arrow {
  width: 20px;
  min-width: 20px;
  text-align: center;
  vertical-align: middle;
  padding: 0 2px !important;
}
.schedule-event {
  color: var(--ma-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-actual, .schedule-estimated, .schedule-previous {
  text-align: right;
  font-family: var(--ma-font-mono);
  font-size: 13px;
  width: 70px; 
  min-width: 70px;
}

.schedule-accordion-content-row td { padding:4px; }
.schedule-accordion-content-row,
.schedule-accordion-content-row .schedule-accordion-content,
.schedule-accordion-content-row .schedule-description,
.schedule-accordion-content-row .schedule-guidance,
.schedule-accordion-content-row .schedule-impact {
  color: #c7a86f;
}
.schedule-accordion-content-row strong {
  color:  #7283B1;
}

.schedule-accordion-content {
  padding: 10px 14px;
  background: rgba(13,21,32,0.8);
  font-size: 13px;
  line-height: 1.6;
  color: #7283B1;
  border-left: 1px solid #7283B1;
}

/* ── Risk Calendar ── */
.risk-calendar-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid rgba(30, 58, 95, 0.35);
}

.risk-calendar-row {
  cursor: default;
  transition: background 0.15s;
}
.risk-calendar-row:hover { background: rgba(255,255,255,0.03); }

.risk-calendar-cell {
  padding: 0px 4px;
  font-size:13px;
  border-bottom: 1px solid rgba(30,58,95,0.35);
}

.risk-calendar-time {
  white-space: nowrap;
  color: #7283B1;
  font-family: var(--ma-font-mono);
  font-size: 13px;
  width: 50px;
}

.risk-calendar-country { color: #c7a86f; width: 40px; }
.risk-calendar-event { color: var(--ma-text); font-weight: 500; }

.risk-calendar-signals-cell { display: flex; flex-direction: column; gap: 1px;
  padding: 1px 0px; }
.risk-calendar-signals-bullish { font-size: 13px; line-height: 1.4; background: rgba(114, 131, 177, 0.18); border-radius: .25rem;padding-left: 3px;}
.risk-calendar-signals-bearish { font-size: 13px; line-height: 1.4; background:rgba(220,50,47,0.15); border-radius: .25rem;padding-left: 3px;}

.riskcal-arrow { font-weight: 700; }
.riskcal-arrow-bullish { color: #268BD2; }
.riskcal-arrow-bearish { color: #DC322F; }

.risk-calendar-info-icon {
  color: var(--ma-text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s;
}
.risk-calendar-info-icon:hover { color: var(--ma-accent-cyan); }

/* ── External Links ── */
.external-link-btn {
  color: var(--ma-text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.external-link-btn:hover { color: var(--ma-accent-cyan); }

/* ── Hoverable Rows ── */
.hoverable-row { transition: background 0.15s; }
.hoverable-row:hover { background: rgba(255,255,255,0.03) !important; }

/* ── More Buttons ── */
.more-button-container {
  text-align: center;
  padding: 2px 0;
  font-family: var(--ma-font) !important;
  line-height: 1.5 !important;
}
.more-button-container * {
  font-family: var(--ma-font) !important;
  line-height: 1.5 !important;
}
.more-button {
  background: none;
  border: none;
  color: var(--ma-accent-cyan);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}
.more-button:hover { text-decoration: underline; }
.more-button-container.hidden { display: none; }

/* ── Empty State ── */
.market-analysis-empty {
  text-align: center;
  padding: 30px;
  color: var(--ma-text-dim);
  font-size: 13px;
}

/* ── Footer ── */
.market-analysis-footer {
  padding: 12px 14px;
  margin-top: 12px;
  border-top: 1px solid var(--ma-border);
  font-size: 11px;
  color: var(--ma-text-dim);
  line-height: 1.5;
}
.market-analysis-footer .footer-section {
  margin-bottom: 6px;
}
.market-analysis-footer .footer-section:last-child { margin-bottom: 0; }
.market-analysis-footer strong { color: var(--ma-text-muted); }

/* ── Scrollbar Hiding ── */
.grid-section-content::-webkit-scrollbar,
.schedule-content::-webkit-scrollbar,
.key-levels-content::-webkit-scrollbar,
.flows-content::-webkit-scrollbar,
.risk-calendar-content::-webkit-scrollbar,
.overnight-market-action-content::-webkit-scrollbar,
.action-plan-content::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.grid-section-content,
.schedule-content,
.key-levels-content,
.flows-content,
.risk-calendar-content,
.overnight-market-action-content,
.action-plan-content {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* ── Remove all max-height constraints ── */
.scrollable-section,
.market-analysis-grid-column,
.grid-section-content,
.key-levels-content,
.flows-content,
.schedule-content,
.risk-calendar-content,
.news-accordion-content-wrapper,
.schedule-accordion-content {
  max-height: none !important;
  min-height: auto !important;
  overflow: visible !important;
  height: auto !important;
}

/* Top section columns: remove max-height but allow flex stretch height */
.top-section-column {
  max-height: none !important;
  min-height: auto !important;
  overflow: visible !important;
}

/* ── FLO Sub-sections (bordered cards within Flows section) ── */
.flo-subsection {
  border: 1px solid var(--ma-border);
  border-radius: 6px;
  margin: 5px;
  overflow: hidden;
}

.flo-subsection:last-child {
  margin-bottom: 5px;
}

.flo-subsection-desc {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #8899aa;
}

/* Remove parent flows-content padding when subsections handle their own spacing.
 * Originally used :has(.flo-subsection) but FLO content always renders at least
 * one .flo-subsection (the description block — see renderFloContent in
 * MarketAnalysisRenderer.js), so the condition is always true. Simplified to
 * an unconditional rule for Chromium < 105 compatibility.
 */
.flows-content {
  padding: 0 !important;
}

/* ── FLO Gauge (SVG segmented bar with triangle pointer) ── */
.flo-gauge-container {
  padding: 8px 14px 4px;
}

.flo-gauge-svg {
  display: block;
  max-width: 100%;
}

/* Override global svg text { font-size:14px!important } from dark_latest.css */
.flo-gauge-container .flo-gauge-svg text {
  font-size: 7px !important;
  fill: #64748b !important;
}

/* ── FLO Signal Boxes (5 indicators) ── */
.flo-signal-boxes {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
}

.flo-signal-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: rgba(13,21,37,0.6);
  border: 1px solid var(--ma-border);
  border-radius: 6px;
  min-width: 0;
}

.flo-signal-arrow {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.flo-signal-label {
  font-size: 10px;
  color: var(--ma-text-dim);
  text-align: center;
  white-space: nowrap;
}

.flo-signal-value {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.flo-signal-bullish .flo-signal-arrow { color: #22c55e; }
.flo-signal-bullish .flo-signal-value { color: #22c55e; }
.flo-signal-bearish .flo-signal-arrow { color: #DC322F; }
.flo-signal-bearish .flo-signal-value { color: #DC322F; }
.flo-signal-neutral .flo-signal-arrow { color: var(--ma-text-dim); }
.flo-signal-neutral .flo-signal-value { color: var(--ma-text-muted); }

/* ── COT 12-Week Bar Chart (Chart.js) ── */
.flo-cot-chart,
.flo-etf-chart {
  padding: 10px 14px 8px;
}

.flo-cot-legend {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.flo-cot-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ma-text-muted);
}

.flo-cot-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.flo-cot-legend-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
}

/* Custom tooltip */
.flo-cot-tooltip {
  position: absolute;
  pointer-events: none;
  background: #0d1525;
  border: 1px solid #1e3a5f;
  border-radius: 8px;
  padding: 0;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  font-family: var(--ma-font);
  z-index: 1000; /* FE6 — bumped from 100 so tooltip clears sticky strips and other overlays */
  opacity: 0;
  transition: opacity 0.15s ease;
}
.flo-cot-tooltip.active { opacity: 1; }

.flo-cot-tip-header {
  padding: 8px 12px;
  border-bottom: 1px solid #1e3a5f;
  font-size: 11px;
  font-weight: 600;
  color: #e8f1f5;
  letter-spacing: 0.3px;
}

.flo-cot-tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
}
.flo-cot-tip-row:last-child { padding-bottom: 8px; }

.flo-cot-tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.flo-cot-tip-line {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.flo-cot-tip-label {
  font-size: 11px;
  color: #94a3b8;
  flex: 1;
}

.flo-cot-tip-val {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--ma-font-mono);
}

/* Responsive: signal boxes stack on small screens */
@media (max-width: 500px) {
  .flo-signal-boxes {
    flex-wrap: wrap;
  }
  .flo-signal-box {
    flex: 1 1 calc(33% - 4px);
    min-width: 60px;
  }
}

/* ── 3-Column Layout (Market Prep) ── */
.mi-three-col-layout {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
}

.mi-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Charts placeholder */
.charts-content {
  padding: 0;
  font-size: 13px;
}

/* Sub-heading inside combined geo/schedule section */
.mi-sub-heading {
  font-family: var(--ma-font) !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ma-text-muted);
  padding: 8px 12px 4px;
  margin: 0;
  border-top: 1px solid var(--ma-border);
}

/* ── Responsive ── */
@media (max-width: 1199px) {
  .mi-three-col-layout { flex-wrap: wrap; }
  .mi-col { flex: 1 1 calc(50% - 6px); min-width: 300px; }
  .top-sections-row { flex-direction: column; }
  .top-section-right-stack { flex-direction: column; }
  .market-analysis-grid-row { flex-wrap: wrap; }
  .market-analysis-grid-column,
  .market-analysis-grid-column-stack { flex: 1 1 calc(50% - 3px); min-width: 300px; }
}

@media (max-width: 767px) {
  .mi-three-col-layout { flex-direction: column; }
  .mi-col { flex: 1 1 100%; min-width: 0; }
  .market-analysis-grid-row { flex-direction: column; }
  .market-analysis-grid-column,
  .market-analysis-grid-column-stack { flex: 1 1 100%; min-width: 0; }
  .sentiment-gauges-container { gap: 12px; }
  .sentiment-gauge { width: 90px; }
  .news-time { width: 70px; min-width: 70px; font-size: 13px; }
}

/* Header styles moved to marketprep-header.css */

/* ─── Key Prices Table ─── */
.key-prices-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ma-font-mono);
  font-size: 13px;
}
.key-prices-table th {
  color: #94a3b8;
  font-weight: 500;
  text-align: right;
  border-bottom: 1px solid #1e2a3d;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.key-prices-table th:first-child {
  text-align: left;
}
.key-prices-table td {
  text-align: right;
  color: #e8f1f5;
  border-bottom: 1px solid rgba(30,42,61,0.5);
}
.key-prices-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: #94a3b8;
}
.key-prices-table .price-col {
  color: #c7a86f !important;
}
.key-prices-table .low-col {
  color: #E57373 !important;
}
.key-prices-table .chg-negative {
  color: #E57373 !important;
}

/* ─── Flows Sentiment Badge ─── */
.flows-sentiment-badge {
  display: inline-block;
  font-family: var(--ma-font);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  vertical-align: middle;
}
.flows-sentiment-badge.bullish {
  background: #7283B1;
  color: #060b14;
}
.flows-sentiment-badge.bearish {
  background: #DC322F;
  color: #fff;
}
.flows-sentiment-badge.neutral {
  background: #c7a86f;
  color: #060b14;
}

/* ================================================================
   OPTIONS POSITIONING PANEL + GEX PANEL
   ================================================================ */
.opt-panel { padding: 10px 14px 8px; }
.opt-title-bar {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 8px 0 10px 0; border-bottom: 1px solid rgba(148,163,184,0.12); margin-bottom: 12px;
}
.opt-title { font-size: 13px; font-weight: 700; letter-spacing: 0.5px; font-family: var(--ma-font); }
.opt-subtitle { font-size: 13px; color: #64748b; font-family: var(--ma-font-mono); }
.opt-stat-row { display: flex; gap: 12px; margin-bottom: 14px; }
.opt-stat-box {
    flex: 1; background: rgba(15,23,42,0.5); border: 1px solid rgba(148,163,184,0.1);
    border-radius: 6px; padding: 10px 12px; text-align: center;
}
.opt-stat-label { font-size: 13px; color: #64748b; margin-bottom: 4px; font-family: var(--ma-font); }
.opt-stat-value { font-size: 15px; font-weight: 700; color: #e2e8f0; line-height: 1.2; font-family: var(--ma-font-mono); }
.opt-stat-value.opt-stat-part { font-size: 15px; }
.opt-stat-delta { font-size: 13px; margin-top: 2px; font-family: var(--ma-font-mono); }
.opt-chart-wrap { margin-bottom: 14px; background: rgba(15,23,42,0.5); border: 1px solid rgba(148,163,184,0.1); border-radius: 8px; padding: 12px 14px 10px; }
.opt-walls-row { display: flex; gap: 16px; margin-bottom: 14px; background: rgba(15,23,42,0.5); border: 1px solid rgba(148,163,184,0.1); border-radius: 8px; padding: 12px 14px 10px; }
.opt-wall-col { flex: 1; }
.opt-wall-header { font-size: 13px; font-weight: 600; margin-bottom: 6px; font-family: var(--ma-font); }
.opt-wall-suffix { color: #475569; font-weight: 400; }
.opt-wall-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-family: var(--ma-font-mono); font-size: 13px; color: #cbd5e1; }
.opt-wall-strike { width: 70px; flex-shrink: 0; text-align: right; }
.opt-wall-bar-wrap { flex: 1; height: 16px; background: rgba(15,23,42,0.4); border-radius: 3px; overflow: hidden; }
.opt-wall-bar { display: block; height: 100%; border-radius: 3px; opacity: 0.6; }
.opt-wall-oi { width: 50px; flex-shrink: 0; text-align: right; color: #94a3b8; }
.opt-wall-empty { font-size: 13px; color: #475569; font-style: italic; }
.opt-lean-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; font-family: var(--ma-font); font-size: 13px; }
.opt-lean-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.opt-lean-label { font-weight: 700; }
.opt-lean-reason { color: #64748b; font-size: 13px; }
.gex-chart-subsection {
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(148,163,184,0.1);
    border-radius: 8px;
    padding: 12px 14px 10px;
    margin-bottom: 12px;
}
.gex-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    font-family: var(--ma-font);
}
.gex-chart-title-with-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gex-chart-title-with-controls .gex-zoom-controls {
    margin-left: auto;
    flex-shrink: 0;
}

/* FE8 — chart wraps: fixed 380px, no scroll, no sticky-strip machinery.
   Zoom is a data-filter now (see _applyGexRangeZoom), so the container is
   just a canvas host of stable size. Chart.js draws its own axes visibly. */
.gex-profile-wrap {
    position: relative;
    width: 100%;
    height: 380px;
}
.gex-bar-wrap {
    position: relative;
    width: 100%;
    height: 380px;
}
.gex-panel { margin-top: 16px; padding: 10px 14px 8px; border-top: 1px solid rgba(245,158,11,0.15); }
.gex-panel.gex-panel-visible { display: block; }
.gex-levels-container {
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(148,163,184,0.1);
    border-radius: 8px;
    padding: 14px 16px 12px;
    margin-top: 14px;
}
.gex-levels-title {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
    font-family: var(--ma-font);
}
.gex-levels-row { display: flex; gap: 16px; }
.gex-level-col { flex: 1; }
.gex-level-col .opt-wall-strike { width: 50px; }
.gex-level-col .opt-wall-bar-wrap { min-width: 60px; }
.gex-level-col .opt-wall-oi { width: 45px; }
.gex-level-col .opt-wall-bar { opacity: 0.8; }
.gex-level-header { font-size: 13px; font-weight: 600; margin-bottom: 8px; font-family: var(--ma-font); }
.gex-level-row { display: flex; gap: 8px; font-family: var(--ma-font-mono); font-size: 13px; color: #e2e8f0; margin-bottom: 3px; line-height: 1.5; }
.gex-level-price { color: #e2e8f0; font-weight: 500; }
.gex-level-val { color: #64748b; }
.gex-level-hvl-price { font-size: 15px; font-weight: 700; font-family: var(--ma-font-mono); }
.gex-level-hvl-sub { font-size: 13px; color: #64748b; line-height: 1.6; margin-top: 4px; }
.gex-level-empty { font-size: 13px; color: #475569; }
.opt-download-wrap { margin-top: 14px; text-align: center; }
.opt-download-btn {
    display: inline-block; background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.2);
    color: #94a3b8; font-size: 13px; font-weight: 600; padding: 7px 18px; border-radius: 4px;
    text-decoration: none; transition: background 0.2s, color 0.2s; font-family: var(--ma-font);
}
.opt-download-btn:hover { background: rgba(148,163,184,0.15); color: #e2e8f0; text-decoration: none; }
.opt-download-hint { display: block; color: #475569; font-size: 13px; margin-top: 4px; }

/* ─── Responsive ─── */
@media (max-width: 767px) {
  .opt-stat-row, .opt-walls-row, .gex-levels-row { flex-direction: column; gap: 8px; }
  /* Header responsive styles moved to marketprep-header.css */
}

/* ═══════════════════════════════════════════════════════════════
   FE6 — additions for the new GEX + 12-week payload shape (spec 4.3 / 4.4).
   Adds:
     - MenthorQ per-expiration grid (.gex-exp-grid-*)
     - Active contract chip + as-of badge in the 12-week subtitle
     - Rollover marker for the OI-change stat box
     - Partial-week bar styling vars (read by _initOptionsChart in JS)
     - HVL dashed line marker in the legend
   Append-only — existing classes (.opt-stat-row, .gex-level-col,
   .opt-walls-row, etc.) are untouched.
   ═══════════════════════════════════════════════════════════════ */


/* ── MenthorQ-style per-expiration grid (FE1) ── */

.gex-exp-grid-wrap {
    margin: 14px 0 18px 0;
}

.gex-exp-grid-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    font-family: var(--ma-font);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.gex-exp-grid-title:hover {
    color: #94A3B8;
}

.gex-exp-toggle {
    background: transparent;
    border: 1px solid var(--ma-border-light);
    border-radius: 3px;
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 1px 7px;
    font-family: var(--ma-font-mono);
    /* Click passes through to parent so the whole title bar is the hit target */
    pointer-events: none;
}

.gex-exp-grid-title:hover .gex-exp-toggle {
    border-color: rgba(148,163,184,0.4);
}

.gex-exp-collapsed .gex-exp-grid-scroll {
    display: none;
}

/* ── FE6/FE7: zoom stepper (PROFILE chart title + shared panel-header variant) ── */
.gex-zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-family: var(--ma-font);
}

/* FE7 — panel-header variant lives inside .grid-section-title, right-aligned */
.grid-section-title.section-type-gex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gex-zoom-controls-panel {
    margin-left: auto;
}

.gex-zoom-btn {
    background: transparent;
    border: 1px solid var(--ma-border-light);
    border-radius: 3px;
    color: var(--ma-text-muted);
    cursor: pointer;
    padding: 0px 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--ma-font-mono);
    line-height: 1.4;
    min-width: 24px;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.gex-zoom-btn:hover:not(:disabled) {
    border-color: rgba(148,163,184,0.5);
    color: #cbd5e1;
}

.gex-zoom-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gex-exp-grid-scroll {
    overflow-x: auto;
    border: 1px solid var(--ma-border-light);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.35);
}

.gex-exp-grid {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12px;
    font-family: var(--ma-font-mono);
}

.gex-exp-grid thead {
    background: rgba(15, 23, 42, 0.55);
    position: sticky;
    top: 0;
    z-index: 1;
}

.gex-exp-grid th,
.gex-exp-grid td {
    padding: 6px 10px;
    text-align: right;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    white-space: nowrap;
}

.gex-exp-grid th:first-child,
.gex-exp-grid td:first-child {
    text-align: left;
    padding-left: 12px;
}

.gex-exp-grid th:last-child,
.gex-exp-grid td:last-child {
    padding-right: 12px;
}

.gex-exp-grid th {
    color: var(--ma-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 10px;
    font-family: var(--ma-font);
}

.gex-exp-row {
    color: var(--ma-text);
    transition: background 0.12s ease;
}

.gex-exp-row:hover {
    background: rgba(34, 211, 238, 0.05);
}

/* TOTAL_EXPOSURE row pinned at the top, highlighted gold */
.gex-exp-row-total {
    background: rgba(199, 168, 111, 0.10);
    color: var(--ma-accent-gold);
    font-weight: 600;
    border-bottom: 2px solid rgba(199, 168, 111, 0.30);
}

.gex-exp-row-total td:first-child {
    letter-spacing: 0.6px;
}


/* ── 12-week panel — partial-week + rollover + active contract (FE4) ── */

/* Active contract chip in the subtitle (e.g. "ESM6") */
.opt-active-contract {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    background: rgba(199, 168, 111, 0.12);
    border: 1px solid rgba(199, 168, 111, 0.30);
    color: var(--ma-accent-gold);
    font-size: 11px;
    border-radius: 3px;
    font-weight: 500;
    letter-spacing: 0.3px;
    font-family: var(--ma-font-mono);
    vertical-align: middle;
}

/* "as of <date>" badge — only shown when latest bar is_partial_week */
.opt-asof {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    color: var(--ma-text-muted);
    font-style: italic;
    vertical-align: middle;
}

/* Rollover marker on the OI-change stat box (replaces the delta arrow line) */
.opt-stat-rollover {
    color: var(--ma-text-muted) !important;
    font-size: 11px;
    font-style: italic;
}

/* Partial-week bar — colour variables read by _initOptionsChart in JS to
   style the rightmost bar when latest.is_partial_week is true. The bar
   itself is a Chart.js canvas element so CSS can't target it directly;
   _initOptionsChart reads these via getComputedStyle when configuring
   backgroundColor / borderColor callbacks on the dataset. */
:root {
    --opt-partial-week-fill: rgba(156, 163, 175, 0.55);
    --opt-partial-week-stroke: rgba(156, 163, 175, 0.85);
}


/* ── HVL / GEX-profile markers in chart legends (FE1 / FE2 / FE6) ── */

/* Render as short dashed segments to match the in-chart dashed annotations.
   Prior version used currentColor + transparent background, which stripped
   the inline background: color and rendered invisibly against the dark
   panel. Hardcoded colors below fix that. */
.flo-cot-legend-line[style*="#FBBF24"] {
    height: 2px;
    width: 16px;
    display: inline-block;
    background: repeating-linear-gradient(
        to right,
        #FBBF24 0,
        #FBBF24 4px,
        transparent 4px,
        transparent 7px
    ) !important;
}

.flo-cot-legend-line[style*="#c7a86f"] {
    height: 2px;
    width: 16px;
    display: inline-block;
    background: repeating-linear-gradient(
        to right,
        #c7a86f 0,
        #c7a86f 4px,
        transparent 4px,
        transparent 7px
    ) !important;
}


/* ── Key GEX levels — visible-window subtitle hint (FE1) ── */

/* The levels panel now derives from the visible strike window;
   the title is updated to read "(visible window)". Existing
   .gex-levels-title styling is preserved. */