/* ==========================================================
   panels.css — Phase 5 Panel Styles
   AnalysisBro Portfolio Terminal
   All Phase 5 panel styles: KPI cards, sidebar, empty states,
   tables, chart containers, risk bars, guide panel
   ========================================================== */

/* --- KPI Row --- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

/* --- KPI Card --- */
.kpi-card {
  background: rgba(7, 22, 40, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 4px;
  border: 1px solid rgba(30, 58, 95, 0.6);
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(245, 166, 35, 0.04);
  border-left: 3px solid; /* color set inline per card */
}

.kpi-card .kpi-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #9aabb8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.kpi-card .kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-card .kpi-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #9aabb8;
  margin-top: 4px;
}

/* --- Section Heading --- */
.section-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #f5a623;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(245, 166, 35, 0.2);
  padding-bottom: 4px;
  margin-bottom: 8px;
  margin-top: 24px;
}

/* --- Panel Content Wrapper --- */
.panel-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- Panel Main (scrollable area) --- */
.panel-main {
  padding: 16px;
  padding-bottom: 32px; /* extra room — ensures last chart is fully reachable */
  margin-left: 40px; /* always clear the 32px toggle — margin shifts the whole box so chart libs measure correctly */
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0; /* required: flex children need min-height:0 to scroll correctly */
  box-sizing: border-box;
  transition: margin-left 200ms ease;
}

/* When sidebar is open, push content past the 264px sidebar + 32px toggle */
.panel-content.sidebar-open .panel-main {
  margin-left: 304px;
}

/* Empty state also needs left clearance */
.panel-content .empty-state {
  left: 40px;
  transition: left 200ms ease;
}

.panel-content.sidebar-open .empty-state {
  left: 304px;
}

/* --- Sidebar --- */
.sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  overflow: hidden;
  background: #040f20;
  border-right: 1px solid #1e3a5f;
  z-index: 10;
  padding: 0;
  transition: width 200ms ease;
  box-sizing: border-box;
}

.sidebar.open {
  width: 264px;
  padding: 14px 14px 24px;
  overflow-y: auto;
}

/* --- Sidebar Toggle Button --- */
.sidebar-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 64px;
  background: rgba(4, 15, 32, 0.95);
  border: none;
  border-right: 1px solid #1e3a5f;
  border-radius: 0 4px 4px 0;
  z-index: 12;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #9aabb8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 150ms ease, left 200ms ease;
}

.sidebar-toggle:hover {
  background: rgba(245, 166, 35, 0.08);
  color: var(--accent, #f5a623);
}

/* --- Sidebar Section Label --- */
.sidebar-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #c8cdd4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  margin-top: 12px;
}

.sidebar-section-label:first-child {
  margin-top: 0;
}

/* --- Sidebar Divider --- */
.sidebar-divider {
  border: none;
  border-top: 1px solid #1e3a5f;
  margin: 10px 0;
}

/* --- Sidebar Preset Buttons --- */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.sidebar .preset-btn {
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #c8cdd4;
  cursor: pointer;
  text-align: center;
  transition: background 150ms ease, border-color 150ms ease;
}

.sidebar .preset-btn:hover {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.4);
  color: var(--accent, #f5a623);
}

/* --- Sidebar Textarea --- */
.sidebar textarea {
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 8px;
  width: 100%;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 150ms ease;
}

.sidebar textarea:focus {
  border-color: rgba(96, 165, 250, 0.6);
  outline: none;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

.sidebar textarea.invalid {
  border-color: #ff4444;
}

.ticker-error {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #ff4444;
  margin-top: 4px;
  display: none;
}

.ticker-error.visible {
  display: block;
}

/* --- Sidebar Select --- */
.sidebar select {
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 8px;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.sidebar select:focus {
  border-color: rgba(96, 165, 250, 0.6);
  outline: none;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

/* --- Sidebar Two-Column Layout --- */
.sidebar .two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* --- Sidebar Range Slider --- */
.sidebar input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 4px 0;
}

.sidebar input[type=range]::-webkit-slider-runnable-track {
  background: #2a2a2a;
  height: 4px;
  border-radius: 4px;
}

.sidebar input[type=range]::-moz-range-track {
  background: #2a2a2a;
  height: 4px;
  border-radius: 4px;
}

.sidebar input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: var(--accent, #f5a623);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: -4px;
  cursor: pointer;
}

.sidebar input[type=range]::-moz-range-thumb {
  background: var(--accent, #f5a623);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.sidebar .slider-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #f5a623;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Ticker Lookup --- */
.ticker-lookup-wrap {
  position: relative;
}

.ticker-lookup-input {
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 150ms ease;
}

.ticker-lookup-input:focus {
  border-color: rgba(96, 165, 250, 0.6);
  outline: none;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

.ticker-lookup-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.ticker-lookup-results.visible {
  display: block;
}

.ticker-lookup-hint {
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #9aabb8;
  text-align: center;
}

.ticker-lookup-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 100ms ease;
}

.ticker-lookup-result:hover {
  background: rgba(245, 166, 35, 0.08);
}

.ticker-lookup-result .tlr-symbol {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
}

.ticker-lookup-result .tlr-name {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #9aabb8;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

/* --- Sidebar Run Button --- */
.sidebar .run-btn {
  background: var(--accent, #f5a623);
  color: #020c18;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  padding: 10px;
  width: 100%;
  cursor: pointer;
  margin-top: 12px;
  transition: background 150ms ease;
}

.sidebar .run-btn:hover {
  background: #ffc04d;
}

.sidebar .run-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* --- Empty State --- */
.empty-state {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  box-sizing: border-box;
  background: rgba(2, 12, 24, 0.72);
  z-index: 5;
}

.empty-state .es-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  color: rgba(245, 166, 35, 0.3);
  line-height: 1;
}

.empty-state .es-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #f5a623;
  text-align: center;
}

.empty-state .es-body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #9aabb8;
  text-align: center;
  max-width: 320px;
  line-height: 1.6;
}

.empty-state .es-chip {
  display: inline-block;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 4px;
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent, #f5a623);
  cursor: pointer;
  margin-top: 8px;
  transition: background 150ms ease, border-color 150ms ease;
}

.empty-state .es-chip:hover {
  background: rgba(245, 166, 35, 0.15);
  border-color: rgba(245, 166, 35, 0.5);
}

/* --- Config Chip Row (replaces strategy bar) --- */
.config-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  min-height: 26px;
}
.config-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(245, 166, 35, 0.08);
  color: #f5a623;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 4px;
  padding: 3px 10px;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.config-chip:empty { display: none; }

/* --- Ticker Chip Input --- */
.chip-input-wrap {
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  background: #071628;
  padding: 6px;
  min-height: 58px;
  cursor: text;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
  align-items: flex-start;
  align-content: flex-start;
  transition: border-color 150ms ease;
}
.chip-input-wrap:focus-within {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}
.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #f5a623;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-chip--invalid {
  background: rgba(255, 68, 68, 0.1);
  border-color: rgba(255, 68, 68, 0.4);
  color: #ff4444;
}
.ticker-chip-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 10px;
  line-height: 1;
  padding: 0 1px;
  color: inherit;
}
.ticker-chip-remove:hover { opacity: 1; }
.chip-text-input {
  background: transparent;
  border: none;
  outline: none;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  min-width: 80px;
  flex: 1;
  padding: 2px 4px;
  text-transform: uppercase;
  caret-color: #f5a623;
}
.chip-text-input::placeholder {
  color: #3a5068;
  text-transform: none;
}

/* --- Chart Containers --- */
.chart-container {
  position: relative;
  width: 100%;
}

.frontier-container {
  height: 320px;
}

.equity-container {
  height: 340px;
}

.drawdown-container {
  height: 200px;
}

/* --- Data Table --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  color: #9aabb8;
  text-align: left;
  padding: 8px 4px;
  border-bottom: 1px solid #1e3a5f;
  letter-spacing: 0.05em;
}

.data-table th.numeric {
  text-align: right;
}

.data-table td {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #c8cdd4;
  padding: 8px 4px;
  border-bottom: 1px solid #1e3a5f;
}

.data-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table tr:nth-child(even) {
  background: rgba(4, 15, 32, 0.5);
}

.data-table td.positive {
  color: #39d353;
}

.data-table td.negative {
  color: #ff4444;
}

.data-table td.ticker {
  font-weight: 700;
}

/* --- Risk Attribution Bars --- */
.risk-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.risk-bar-label {
  width: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #c8cdd4;
  flex-shrink: 0;
}

.risk-bar-track {
  flex: 1;
  height: 20px;
  background: rgba(4, 15, 32, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.risk-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0; /* animated via GSAP */
}

.risk-bar-value {
  width: 48px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #c8cdd4;
  text-align: right;
  flex-shrink: 0;
}

/* --- Heatmap Placeholder --- */
.heatmap-placeholder {
  margin-top: 24px;
  background: rgba(4, 15, 32, 0.5);
  border: 1px dashed rgba(30, 58, 95, 0.6);
  border-radius: 4px;
  padding: 24px 16px;
  text-align: center;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* --- GUIDE Panel --- */
.guide-panel {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px;
}

.guide-shortcut-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #5a6b78;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(96, 165, 250, 0.04);
  border-left: 2px solid rgba(96, 165, 250, 0.2);
  border-radius: 0 4px 4px 0;
}

.guide-key-fn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #8a9baa;
  background: rgba(30, 58, 95, 0.4);
  border: 1px solid rgba(30, 58, 95, 0.6);
  border-radius: 3px;
  padding: 2px 5px;
  margin-right: 0;
}

.guide-key-sep {
  color: #5a6b78;
  font-size: 9px;
  margin-right: 2px;
}

.guide-shortcut-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

kbd {
  background: #040f20;
  border: 1px solid #1e3a5f;
  border-bottom: 2px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #c8cdd4;
  margin-right: 8px;
}

.guide-tab-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #f5a623;
  font-weight: 700;
  min-width: 80px;
}

.guide-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #9aabb8;
}

.guide-step {
  background: #040f20;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 16px 12px;
  margin-bottom: 8px;
}

.guide-step-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: rgba(245, 166, 35, 0.25);
  line-height: 1.2;
}

.guide-step-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.guide-step-body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #9aabb8;
  line-height: 1.8;
}

/* --- Guide rich content --- */
.guide-h {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 18px 0 8px;
}
.guide-body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #9aabb8;
  line-height: 1.85;
  margin-bottom: 12px;
}
.guide-body strong { color: #c8cdd4; font-weight: 600; }
.guide-body em { color: #c8cdd4; font-style: italic; }
.guide-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 1px 5px;
  color: #60a5fa;
}
.guide-body ul { margin: 8px 0 8px 18px; padding: 0; }
.guide-body li { margin-bottom: 5px; }
.guide-note {
  background: #071628;
  border-left: 3px solid rgba(245, 166, 35, 0.55);
  border-radius: 4px;
  padding: 10px 14px;
  margin: 12px 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #c8cdd4;
  line-height: 1.8;
}
.guide-note strong { font-weight: 600; }
.guide-note code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(96, 165, 250, 0.1);
  border-radius: 4px;
  padding: 1px 5px;
  color: #60a5fa;
}
.guide-formula {
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 14px 16px;
  margin: 12px 0;
}
.guide-formula-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.guide-formula-expr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #60a5fa;
  margin-bottom: 10px;
  line-height: 1.55;
}
.guide-formula-body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #9aabb8;
  line-height: 1.8;
}
.guide-formula-body strong { color: #c8cdd4; font-weight: 600; }
.guide-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin: 10px 0 14px;
}
.guide-tbl th {
  background: #040f20;
  color: #f5a623;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid #1e3a5f;
  text-align: left;
}
.guide-tbl td {
  padding: 6px 10px;
  border: 1px solid #1e3a5f;
  color: #9aabb8;
  background: #040f20;
}
.guide-tbl td code {
  color: #60a5fa;
  font-family: 'JetBrains Mono', monospace;
}
.guide-footer {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #2a3a50;
  text-align: center;
  margin-top: 32px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  padding-bottom: 8px;
}

/* --- Section Divider (Backtest chart group separator) --- */
.section-divider {
  border-top: 1px solid #1e3a5f;
  margin-top: 24px;
  margin-bottom: 16px;
}

/* --- Monte Carlo KPI Cards Row --- */
.mc-kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

/* --- Monte Carlo Controls --- */
.mc-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mc-controls-label {
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: #9aabb8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 4px;
}

.mc-btn-group {
  display: flex;
  gap: 4px;
}

.mc-btn {
  background: #040f20;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #9aabb8;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.mc-btn:hover {
  background: rgba(96, 165, 250, 0.1);
  color: #c8cdd4;
}

.mc-btn--active {
  background: var(--accent, #f5a623);
  border-color: var(--accent, #f5a623);
  color: #020c18;
  font-weight: 700;
}

/* --- Allocation Bars (OPTIMIZER) --- */
.alloc-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  height: 28px;
}

.alloc-bar-label {
  width: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #c8cdd4;
  flex-shrink: 0;
}

.alloc-bar-track {
  flex: 1;
  height: 20px;
  background: rgba(4, 15, 32, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.alloc-bar-fill {
  height: 100%;
  border-radius: 4px;
}

.alloc-bar-value {
  width: 48px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #c8cdd4;
  text-align: right;
  flex-shrink: 0;
}

/* ==========================================================
   P&L Sub-tab Navigation (Plan 02)
   ========================================================== */

/* P&L Sub-tab strip */
.sub-tab-strip {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid #1e3a5f;
  display: flex;
  gap: 0;
}
.sub-tab-btn {
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #9aabb8;
  transition: color 150ms ease, border-bottom-color 150ms ease;
}
.sub-tab-btn:hover {
  color: #c8cdd4;
  background: rgba(255,255,255,0.04);
}
.sub-tab-btn.active {
  color: #f5a623;
  border-bottom: 2px solid #f5a623;
  background: rgba(245,166,35,0.06);
  margin-bottom: -1px;
}
.sub-tab-content {
  padding-top: 16px;
  min-height: 200px;
  position: relative;
}

/* CSV download button */
.csv-btn {
  background: transparent;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #9aabb8;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.csv-btn:hover {
  color: #c8cdd4;
  border-color: #9aabb8;
}

/* Export dropdown (B3-3) */
.export-dropdown {
  position: fixed;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  z-index: 999;
  min-width: 90px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.export-item {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  padding: 7px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #9aabb8;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}
.export-item:hover {
  color: #c8cdd4;
  background: #0d2240;
}

/* FX unavailable inline badge (B2-5) */
.fx-badge {
  display: none;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: #f5a623;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.4;
}
.fx-badge.visible {
  display: block;
}

/* Session Restore Banner (B7-1) */
.restore-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(245, 166, 35, 0.06);
  border-bottom: 1px solid rgba(245, 166, 35, 0.2);
  flex-shrink: 0;
}
.rb-icon {
  font-size: 14px;
  color: rgba(245, 166, 35, 0.6);
  flex-shrink: 0;
}
.rb-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.rb-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rb-meta {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #9aabb8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-cta {
  flex-shrink: 0;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 4px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent, #f5a623);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 150ms ease;
}
.rb-cta:hover {
  background: rgba(96, 165, 250, 0.22);
}
.rb-dismiss {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #9aabb8;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color 150ms ease;
}
.rb-dismiss:hover {
  color: #c8cdd4;
}

/* Sharpe Ratio Comparison bars (HOLD-02) */
.sharpe-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sharpe-bar-label {
  width: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #c8cdd4;
  flex-shrink: 0;
}
.sharpe-bar-track {
  flex: 1;
  height: 20px;
  background: rgba(4,15,32,0.5);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.sharpe-bar-fill {
  height: 100%;
  border-radius: 4px;
}
.sharpe-bar-value {
  width: 48px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #c8cdd4;
  text-align: right;
  flex-shrink: 0;
}

/* Rebalancing Drift bars (HOLD-03) */
.drift-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.drift-bar-label {
  width: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #c8cdd4;
  flex-shrink: 0;
}
.drift-bar-track {
  flex: 1;
  height: 20px;
  background: rgba(4,15,32,0.5);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
}
.drift-bar-half {
  width: 50%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.drift-bar-half-left {
  display: flex;
  justify-content: flex-end;
}
.drift-bar-fill-left {
  height: 100%;
  border-radius: 4px 0 0 4px;
}
.drift-bar-fill-right {
  height: 100%;
  border-radius: 0 4px 4px 0;
}
.drift-bar-value {
  width: 64px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #c8cdd4;
  text-align: right;
  flex-shrink: 0;
}

/* Action badges (HOLD-04) */
.action-badge {
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}
.action-badge--buy {
  background: rgba(57,211,83,0.15);
  color: #39d353;
  border: 1px solid rgba(57,211,83,0.4);
}
.action-badge--sell {
  background: rgba(255,68,68,0.15);
  color: #ff4444;
  border: 1px solid rgba(255,68,68,0.4);
}
.action-badge--hold {
  background: rgba(245,166,35,0.15);
  color: #f5a623;
  border: 1px solid rgba(245,166,35,0.4);
}

/* === PHASE 6: Shimmer Skeleton === */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes sn-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.skeleton-container {
  position: absolute;
  top: 0; left: 40px; right: 0; bottom: 0;
  padding: 16px;
  z-index: 5;
  background: #020c18;
  transition: none;
}

.panel-content.sidebar-open .skeleton-container {
  left: 304px;
}

.skeleton-block {
  background: linear-gradient(90deg, #0d1e33 25%, #142840 50%, #0d1e33 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-kpi-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.skeleton-kpi {
  height: 80px;
  flex: 1;
}

.skeleton-chart {
  height: 280px;
  width: 100%;
}

.skeleton-table {
  height: 200px;
  width: 100%;
}

/* --- Loading status card (shown after 3 s) --- */
.slow-note {
  margin-top: 20px;
  padding: 14px 18px;
  background: #071628;
  border: 1px solid rgba(245, 166, 35, 0.22);
  border-left: 3px solid rgba(245, 166, 35, 0.55);
  border-radius: 4px;
}
.sn-header {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  animation: sn-pulse 1.4s ease-in-out infinite;
}
.sn-steps {
  margin-bottom: 10px;
}
.sn-step {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  color: #9aabb8;
  margin-bottom: 5px;
  letter-spacing: 0.03em;
}
.sn-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #4a6878;
  padding-top: 9px;
  border-top: 1px solid rgba(30, 58, 95, 0.5);
  line-height: 1.55;
}

/* --- Section info captions (hidden — replaced by info-icon tooltips) --- */
.section-info {
  display: none;
}

/* --- Info Icon Tooltip --- */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: rgba(245, 166, 35, 0.06);
  color: #f5a623;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
  flex-shrink: 0;
  position: relative;
  margin-left: 6px;
  vertical-align: middle;
  transition: background 150ms ease, border-color 150ms ease;
}
.info-icon:hover {
  background: rgba(245, 166, 35, 0.15);
  border-color: rgba(245, 166, 35, 0.6);
}
.info-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  background: #0a1929;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  color: #c8cdd4;
  line-height: 1.6;
  width: 320px;
  max-width: 90vw;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  white-space: normal;
}
.info-icon:hover .info-tooltip {
  display: block;
}
/* Flip tooltip to show above if near bottom */
.info-icon--flip .info-tooltip {
  top: auto;
  bottom: calc(100% + 8px);
}

/* --- KPI Card Tooltip --- */
.kpi-card {
  position: relative;
  cursor: default;
}
/* Per-card .kpi-tooltip divs are hidden; the shared #kpi-tooltip-global is used instead */
.kpi-tooltip {
  display: none !important;
}
#kpi-tooltip-global {
  display: none;
  position: fixed;
  background: #071628;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #c8cdd4;
  line-height: 1.6;
  width: 300px;
  max-width: 90vw;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  white-space: normal;
}
#kpi-tooltip-global strong {
  color: #f5a623;
  font-weight: 600;
}

/* === PHASE 6: Error Banner === */
.error-banner {
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 4px;
  padding: 8px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.warning-banner {
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.35);
  border-radius: 4px;
  padding: 8px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.warning-dot {
  color: #ffb400;
  font-size: 8px;
  flex-shrink: 0;
}

.warning-msg {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #c8cdd4;
  flex: 1;
}

.error-dot {
  color: #ff4444;
  font-size: 8px;
  flex-shrink: 0;
}

.error-msg {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #c8cdd4;
  flex: 1;
}

.retry-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f5a623;
  background: transparent;
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.retry-btn:hover {
  border-color: #f5a623;
  background: rgba(245, 166, 35, 0.06);
}

/* === PHASE 6: Correlation Heatmap === */
#heatmap-container {
  width: 100%;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.chart-tooltip {
  background: rgba(4, 15, 32, 0.95);
  border: 1px solid #1e3a5f;
  border-top: 2px solid #f5a623;
  border-radius: 4px;
  padding: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #c8cdd4;
  pointer-events: none;
  z-index: 9999;
  line-height: 1.5;
}

#heatmap-tooltip {
  font-size: 12px;
}

/* === PHASE 6: Trade Log === */
#trades-table td[contenteditable="true"] {
  outline: none;
  cursor: text;
}

#trades-table td[contenteditable="true"]:focus {
  outline: 1px solid rgba(96, 165, 250, 0.4);
}

#trades-table td[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: #9aabb8;
}

.trade-delete-btn {
  color: #9aabb8;
  font-family: Inter, sans-serif;
  font-size: 11px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 6px;
}

.trade-delete-btn:hover {
  color: #ff4444;
}

.trades-empty-state {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #9aabb8;
  text-align: center;
  padding: 24px 0;
}

/* === B1-1: Guide About Collapsible === */
.guide-about-details {
  margin-top: 24px;
  margin-bottom: 8px;
}

.guide-about-summary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent, #f5a623);
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
  list-style: none;
}

.guide-about-summary::-webkit-details-marker { display: none; }

.guide-about-details[open] .guide-about-summary {
  color: #ffc04d;
}

/* === PHASE 6: Guide Panel Dynamic Classes === */
.guide-section { padding: 0 16px; }
.guide-shortcuts { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.guide-shortcut { display: flex; align-items: center; gap: 12px; }
.guide-shortcut kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 8px;
  color: #c8cdd4;
  flex-shrink: 0;
}
.guide-shortcut span { font-family: Inter, sans-serif; font-size: 14px; color: #c8cdd4; }
.guide-steps { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
.guide-step-num { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; color: #f5a623; flex-shrink: 0; width: 28px; }
.guide-step-content { flex: 1; }
.guide-step-title { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: #f5a623; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.guide-step-body { font-family: Inter, sans-serif; font-size: 14px; color: #c8cdd4; line-height: 1.55; }

/* --- BL Investor Views Panel --- */
.bl-views-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 250ms ease, opacity 200ms ease;
}
.bl-views-panel.visible {
  max-height: 1000px;
  opacity: 1;
}
.bl-views-hint {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #3a5068;
  line-height: 1.4;
  margin-bottom: 6px;
}
.bl-views-col-headers {
  display: grid;
  grid-template-columns: 38px 58px 1fr;
  gap: 4px;
  margin-bottom: 4px;
}
.bl-views-col-headers span {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  color: #3a5068;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}
.bl-views-col-headers span:first-child { text-align: left; }
.bl-view-row {
  display: grid;
  grid-template-columns: 38px 58px 1fr;
  gap: 4px;
  align-items: center;
  margin-bottom: 6px;
}
.bl-view-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bl-view-ret-wrap {
  display: flex;
  align-items: center;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 5px;
  gap: 2px;
  transition: border-color 150ms ease;
}
.bl-view-ret-wrap:focus-within {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}
.bl-view-ret {
  background: transparent;
  border: none;
  outline: none;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  width: 30px;
  text-align: right;
  -moz-appearance: textfield;
}
.bl-view-ret::-webkit-outer-spin-button,
.bl-view-ret::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bl-view-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #9aabb8;
  flex-shrink: 0;
}
.bl-view-conf-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bl-view-conf-wrap input[type=range] {
  flex: 1;
  min-width: 0;
}
.bl-views-empty {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #3a5068;
  text-align: center;
  padding: 8px 0;
}

/* --- F1: Portfolio Size Input --- */
.portfolio-size-input {
  width: 100%;
  box-sizing: border-box;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 6px 10px;
  outline: none;
  -moz-appearance: textfield;
}
.portfolio-size-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}
.portfolio-size-input::-webkit-inner-spin-button,
.portfolio-size-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- F1: Current Holdings Section --- */
.holdings-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.holdings-toggle:hover {
  color: #f5a623;
}
.holdings-caret {
  font-size: 9px;
  color: #9aabb8;
}
.holdings-inputs {
  margin-top: 4px;
}
.holdings-hint {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #9aabb8;
  margin-bottom: 8px;
  line-height: 1.4;
}
.holdings-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.holdings-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #c8cdd4;
  font-weight: 700;
  width: 60px;
  flex-shrink: 0;
}
.holdings-amount-input {
  flex: 1;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
  -moz-appearance: textfield;
  min-width: 0;
}
.holdings-amount-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}
.holdings-amount-input::-webkit-inner-spin-button,
.holdings-amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- F1: Allocation bar dollar sub-label --- */
.risk-bar-dollar {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #9aabb8;
}

/* ==========================================================
   F6 — AI Research Panel
   ========================================================== */

/* Override global .empty-state absolute positioning for the research panel */
#research-empty.empty-state {
  position: static;
  background: transparent;
  z-index: auto;
  margin-top: 40px;
}

/* Restore landing background for research panel (base rule sets transparent) */
#research-empty.panel-landing {
  background: rgba(2, 12, 24, 0.92);
}

/* Research panel scrolls via .panel-content (matching other data panels) */
#panel-f6 .panel-content {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
}

.research-panel-content {
  padding: 20px 16px;
  max-width: none;
  margin: 0;
}

/* Search bar */
.research-search-bar {
  margin-bottom: 20px;
}

.research-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(7, 22, 40, 0.7);
  border: 1px solid rgba(30, 58, 95, 0.8);
  border-radius: 4px;
  padding: 10px 14px;
}

.research-search-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.research-ticker-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #e8f4fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.research-ticker-input::placeholder {
  color: rgba(154, 171, 184, 0.4);
  font-weight: 400;
  text-transform: none;
}

.research-analyse-btn {
  background: #f5a623;
  color: #050e1a;
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.research-analyse-btn:hover {
  background: #ffb84d;
}

.research-hint {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(154, 171, 184, 0.6);
  margin-top: 6px;
}

/* Loading note */
.research-loading-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #f5a623;
  margin-top: 16px;
  text-align: center;
  animation: pulse-opacity 1.5s ease-in-out infinite;
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Header */
.research-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.5);
}

.research-name-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.research-ticker-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #f5a623;
}

.research-company {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #e8f4fd;
}

.research-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.research-meta-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #9aabb8;
  background: rgba(30, 58, 95, 0.4);
  border: 1px solid rgba(30, 58, 95, 0.6);
  border-radius: 3px;
  padding: 2px 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.research-cached-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #4fc3f7;
  background: rgba(79, 195, 247, 0.08);
  border: 1px solid rgba(79, 195, 247, 0.25);
  border-radius: 3px;
  padding: 2px 7px;
  letter-spacing: 0.06em;
  align-items: center;
  gap: 4px;
}

.research-data-as-of {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(154, 171, 184, 0.5);
  letter-spacing: 0.06em;
}

/* Data grid */
.research-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.research-grid-cell {
  background: rgba(7, 22, 40, 0.5);
  border: 1px solid rgba(30, 58, 95, 0.5);
  border-radius: 4px;
  padding: 10px 12px;
}

.research-grid-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #9aabb8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.research-grid-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: #e8f4fd;
}

/* Narrative blocks */
.research-narrative-block {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: #c8dae8;
  background: rgba(7, 22, 40, 0.4);
  border: 1px solid rgba(30, 58, 95, 0.4);
  border-radius: 4px;
  padding: 14px 16px;
  margin-top: 10px;
  white-space: pre-wrap;
  min-height: 48px;
}

.research-narrative-block.research-risk {
  border-left: 3px solid rgba(239, 83, 80, 0.6);
}

/* Verdict block */
.research-verdict-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 10px;
  background: rgba(7, 22, 40, 0.5);
  border: 1px solid rgba(30, 58, 95, 0.5);
  border-radius: 4px;
  padding: 16px;
}

.research-verdict-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-radius: 3px;
  white-space: nowrap;
  border: 2px solid;
}

.research-verdict--attractive {
  color: #81c784;
  border-color: #81c784;
  background: rgba(129, 199, 132, 0.08);
}

.research-verdict--neutral {
  color: #f5a623;
  border-color: #f5a623;
  background: rgba(245, 166, 35, 0.08);
}

.research-verdict--avoid {
  color: #ef5350;
  border-color: #ef5350;
  background: rgba(239, 83, 80, 0.08);
}

.research-verdict-meta {
  flex: 1;
}

.research-verdict-consensus {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #9aabb8;
  margin-bottom: 6px;
}

.research-verdict-narrative {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #c8dae8;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* News */
.research-news-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.research-news-item {
  background: rgba(7, 22, 40, 0.4);
  border: 1px solid rgba(30, 58, 95, 0.4);
  border-radius: 4px;
  padding: 10px 14px;
}

.research-news-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #f5a623;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 8px;
}

.research-news-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #9aabb8;
}

.research-news-headline {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #c8dae8;
  margin-top: 4px;
  line-height: 1.5;
}

.research-no-news {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(154, 171, 184, 0.5);
  padding: 10px 0;
}

/* Footer */
.research-footer {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(154, 171, 184, 0.4);
  text-align: center;
  margin-top: 32px;
  padding-top: 12px;
  border-top: 1px solid rgba(30, 58, 95, 0.3);
  letter-spacing: 0.04em;
}

/* ==========================================================
   Extracted Inline Styles (U13)
   ========================================================== */

/* Section heading + export button row */
.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.section-heading-row > .section-heading {
  margin-top: 0;
}

/* Sidebar slider/input row (label + value inline) */
.sidebar-row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tighter variant for weight constraint sliders */
.sidebar-row-inline--tight {
  gap: 4px;
}

/* Sidebar number input (slippage, etc.) */
.sidebar-number-input {
  width: 58px;
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
  -moz-appearance: textfield;
}

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

/* Sidebar hint label (secondary text next to inputs) */
.sidebar-hint-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #9aabb8;
}

/* No top margin variant (first item in a section / inside two-col) */
.sidebar-section-label--flush,
.section-heading--flush {
  margin-top: 0;
}

/* Currency select wrapper for fx-badge positioning */
.fx-badge-wrap {
  position: relative;
}

/* Benchmark header bar */
.benchmark-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(245, 166, 35, 0.2);
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.benchmark-header-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.benchmark-header-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #9aabb8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.benchmark-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.benchmark-select {
  background: #071628;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #c8cdd4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

/* ==========================================================
   Responsive Breakpoints (U6)
   ========================================================== */
@media (max-width: 700px) {
  /* KPI cards: 2 per row at narrow widths */
  .kpi-row,
  .mc-kpi-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reduce chart min-heights ~20% */
  .frontier-container { height: 256px; }
  .equity-container   { height: 272px; }
  .drawdown-container  { height: 160px; }

  /* Sidebar: collapse to overlay */
  .panel-main {
    margin-left: 0;
  }

  .panel-content.sidebar-open .panel-main {
    margin-left: 0;
  }

  .sidebar.open {
    width: 100%;
  }

  .panel-content .empty-state {
    left: 0;
  }

  .panel-content.sidebar-open .empty-state {
    left: 0;
  }

  .sidebar-toggle {
    z-index: 15;
  }

  /* Reduce fixed paddings */
  .panel-main {
    padding: 10px;
    padding-bottom: 24px;
    margin-left: 32px;
  }

  .guide-panel {
    max-width: 100%;
    padding: 16px 8px;
  }

  /* Monte Carlo controls: wrap tighter */
  .mc-controls {
    gap: 8px;
  }

  /* Risk/alloc bar labels: narrower */
  .risk-bar-label,
  .alloc-bar-label {
    width: 48px;
    font-size: 11px;
  }

  /* KPI value: smaller font */
  .kpi-card .kpi-value {
    font-size: 20px;
  }
}

/* ============================================================
   AI ANALYST — sidebar + results
   ============================================================ */
.ai-analyst-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 250ms ease, opacity 200ms ease;
}
.ai-analyst-panel.visible {
  max-height: 600px;
  opacity: 1;
}
.thesis-input {
  width: 100%;
  background: #0a1929;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #e0e6ed;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 6px 8px;
  resize: vertical;
  min-height: 40px;
  max-height: 120px;
}
.thesis-input::placeholder {
  color: #3a5068;
}
.thesis-input:focus {
  outline: none;
  border-color: #4ea8de;
}

/* AI Explanation section in F1 results */
.ai-explanation-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #c8d6e0;
  line-height: 1.7;
  padding: 14px 16px;
  background: #0a1929;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  margin: 10px 0;
}
.ai-explanation-text p { margin: 0 0 8px; }
.ai-explanation-text p:last-child { margin-bottom: 0; }
.ai-explanation-text strong { color: #f5a623; font-weight: 600; }
.ai-explanation-text em { color: #c8cdd4; font-style: italic; }
.ai-explanation-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 3px;
  padding: 1px 5px;
  color: #f5a623;
}
.ai-explanation-text ul { margin: 6px 0 6px 18px; padding: 0; }
.ai-explanation-text li { margin-bottom: 4px; }
.ai-regime-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 3px;
  margin: 8px 0;
}
.ai-regime-badge.expansion   { background: rgba(57,211,83,0.15); color: #39d353; border: 1px solid #39d353; }
.ai-regime-badge.late_cycle  { background: rgba(245,166,35,0.15); color: #f5a623; border: 1px solid #f5a623; }
.ai-regime-badge.contraction { background: rgba(255,68,68,0.15);  color: #ff4444; border: 1px solid #ff4444; }
.ai-regime-badge.recovery    { background: rgba(78,168,222,0.15); color: #4ea8de; border: 1px solid #4ea8de; }
.ai-regime-badge.unknown     { background: rgba(154,171,184,0.1); color: #9aabb8; border: 1px solid #3a5068; }

.ai-risk-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}
.ai-risk-flag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(255,68,68,0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255,68,68,0.3);
}

#ai-views-table {
  font-size: 13px;
}
#ai-views-table th:last-child,
#ai-views-table td:last-child {
  text-align: left;
  font-size: 12px;
  color: #9aabb8;
  max-width: 320px;
  white-space: normal;
  line-height: 1.5;
}

/* ETF Overlap Detection */
.ai-etf-overlap {
  margin: 8px 0 12px;
  padding: 10px 14px;
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 4px;
}
.ai-overlap-row {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 0;
  color: #c8d6e0;
  border-bottom: 1px solid rgba(58, 80, 104, 0.3);
}
.ai-overlap-row:last-child { border-bottom: none; }
.ai-overlap-row.ai-overlap-severe { color: #ff6b6b; }
.ai-overlap-stock {
  color: #f5a623;
  font-weight: 600;
}
.ai-overlap-via { color: #9aabb8; }
.ai-overlap-etf { color: #4ea8de; }
.ai-overlap-pct { color: #f5a623; }

/* Committee Discussion (Optimizer brief) */
.ai-committee-discussion { margin: 8px 0 12px; }
.ai-committee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.ai-committee-case {
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid rgba(58, 80, 104, 0.4);
}
.ai-committee-bull {
  background: rgba(57, 211, 83, 0.04);
  border-color: rgba(57, 211, 83, 0.2);
}
.ai-committee-bear {
  background: rgba(255, 68, 68, 0.04);
  border-color: rgba(255, 68, 68, 0.2);
}
.ai-committee-critique,
.ai-committee-decision {
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid rgba(58, 80, 104, 0.4);
  margin-bottom: 10px;
}
.ai-committee-critique {
  background: rgba(245, 166, 35, 0.04);
  border-color: rgba(245, 166, 35, 0.2);
}
.ai-committee-decision {
  background: rgba(78, 168, 222, 0.04);
  border-color: rgba(78, 168, 222, 0.2);
}
.ai-committee-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ai-committee-bull .ai-committee-label { color: #39d353; }
.ai-committee-bear .ai-committee-label { color: #ff6b6b; }
.ai-committee-critique .ai-committee-label { color: #f5a623; }
.ai-committee-decision .ai-committee-label { color: #4ea8de; }
.ai-committee-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #c8d6e0;
}

/* Research Committee Styles */
.research-committee-bull {
  border-left: 3px solid rgba(57, 211, 83, 0.5);
  padding-left: 12px;
}
.research-committee-bear {
  border-left: 3px solid rgba(255, 68, 68, 0.5);
  padding-left: 12px;
}
.research-verdict-confidence {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #4ea8de;
  margin-bottom: 4px;
}
.research-verdict-sided {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #9aabb8;
  margin-bottom: 8px;
}
.research-verdict-risk {
  font-size: 13px;
  line-height: 1.5;
}
.research-verdict-directional {
  font-size: 13px;
  color: #c8d6e0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .ai-committee-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   Optimization Loading Overlay
   ========================================================== */
.optim-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg, #020c18);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: optimLoaderFadeIn 0.3s ease forwards;
}

@keyframes optimLoaderFadeIn {
  to { opacity: 1; }
}

.optim-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 420px;
  width: 90%;
}

.optim-loader-icon {
  animation: optimLoaderSpin 1.5s linear infinite;
}

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

.optim-loader-arc {
  stroke-dasharray: 60 100;
}

.optim-loader-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent, #f5a623);
  letter-spacing: 0.5px;
}

.optim-loader-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border, #1e3a5f);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.optim-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent, #f5a623), var(--action, #60a5fa));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.optim-loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: optimBarShimmer 1.5s ease infinite;
}

@keyframes optimBarShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.optim-loader-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #c8cdd4);
  margin-top: -8px;
}

.optim-loader-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted, #9aabb8);
  text-align: center;
  min-height: 18px;
  animation: optimMsgFade 0.3s ease;
}

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

.optim-loader-done .optim-loader-icon {
  animation: none;
}

.optim-loader-done .optim-loader-title {
  color: var(--green, #39d353);
}

.optim-loader-done .optim-loader-bar {
  background: var(--green, #39d353);
}

/* ==========================================================
   Research Loading Screen
   ========================================================== */
.research-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
}
.research-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 420px;
  width: 90%;
}
.research-loader-icon {
  animation: optimLoaderSpin 1.5s linear infinite;
}
.research-loader-arc {
  stroke-dasharray: 60 100;
}
.research-loader-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent, #f5a623);
  letter-spacing: 0.5px;
}
.research-loader-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border, #1e3a5f);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.research-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent, #f5a623), var(--action, #60a5fa));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.research-loader-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: optimBarShimmer 1.5s ease infinite;
}
.research-loader-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #c8cdd4);
  margin-top: -8px;
}
.research-loader-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted, #9aabb8);
  text-align: center;
  min-height: 18px;
  animation: optimMsgFade 0.3s ease;
}
.research-loader-done .research-loader-icon {
  animation: none;
}
.research-loader-done .research-loader-title {
  color: var(--green, #39d353);
}
.research-loader-done .research-loader-bar {
  background: var(--green, #39d353);
}

/* ==========================================================
   Home Panel (hp- prefix to avoid conflicts)
   ========================================================== */
.home-panel {
  padding: 0 !important;
}

.home-scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Background effects */
.hp-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(30, 58, 95, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, 0.12) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: hpGridDrift 25s linear infinite;
  pointer-events: none;
}

@keyframes hpGridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  z-index: 0;
  animation: hpOrbFloat 10s ease-in-out infinite;
  pointer-events: none;
}

.hp-orb-1 { width: 500px; height: 500px; background: var(--accent); top: -150px; right: -150px; animation-duration: 12s; }
.hp-orb-2 { width: 350px; height: 350px; background: var(--action); bottom: -100px; left: -100px; animation-duration: 15s; animation-delay: -5s; }
.hp-orb-3 { width: 250px; height: 250px; background: var(--green); top: 40%; left: 60%; animation-duration: 18s; animation-delay: -9s; opacity: 0.1; }

@keyframes hpOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -15px) scale(1.04); }
  66% { transform: translate(-15px, 20px) scale(0.96); }
}

/* Scroll reveal */
.hp-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-reveal.hp-visible {
  opacity: 1;
  transform: translateY(0);
}

.hp-delay-1 { transition-delay: 0.1s; }
.hp-delay-2 { transition-delay: 0.2s; }
.hp-delay-3 { transition-delay: 0.3s; }
.hp-delay-4 { transition-delay: 0.4s; }

/* Internal nav */
.hp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(2, 12, 24, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30, 58, 95, 0.4);
}

.hp-nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.hp-nav-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  margin-left: 5px;
  animation: hpPulse 2s ease-in-out infinite;
}

@keyframes hpPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hp-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hp-nav-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.hp-nav-link:hover { color: #fff; }

.hp-nav-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);
  padding: 7px 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hp-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.3);
}

/* Content container */
.hp-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Hero */
.hp-hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hp-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hp-hero-title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 18px;
  color: #fff;
  letter-spacing: -1.5px;
}

.hp-highlight {
  background: linear-gradient(135deg, var(--accent), var(--action));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


.hp-hero-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hp-hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, var(--accent), #e8941a);
  color: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 13px 26px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(245, 166, 35, 0.25);
}

.hp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 166, 35, 0.35);
}

.hp-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 13px 22px;
  border: 1px solid var(--border);
  border-radius: 7px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.hp-btn-secondary:hover {
  border-color: var(--action);
  background: rgba(96, 165, 250, 0.05);
}

/* Ticker Tape */
.hp-ticker-tape {
  overflow: hidden;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 80px;
}

.hp-ticker-tape-inner {
  display: flex;
  gap: 44px;
  white-space: nowrap;
  animation: hpTickerScroll 35s linear infinite;
}

.hp-ticker-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hp-ticker-item .up { color: var(--green); }
.hp-ticker-item .down { color: var(--red); }

@keyframes hpTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Sections */
.hp-section {
  margin-bottom: 80px;
}

.hp-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.hp-section-heading {
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hp-section-sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* Problem Grid */
.hp-problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hp-problem-card {
  padding: 20px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color 0.3s;
}

.hp-problem-card:hover { border-color: rgba(245, 166, 35, 0.4); }

.hp-tool-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.hp-tool-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--red);
  margin-bottom: 7px;
}

.hp-problem-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.hp-punchline {
  margin-top: 24px;
  padding: 18px 22px;
  background: rgba(245, 166, 35, 0.05);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 9px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.hp-punchline strong { color: var(--accent); }

/* Capabilities Grid */
.hp-cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.hp-cap-card {
  padding: 24px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.3s, box-shadow 0.3s;
}

.hp-cap-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.hp-cap-header {
  margin-bottom: 10px;
}

.hp-cap-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--action);
  background: rgba(96, 165, 250, 0.1);
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.hp-key-fn {
  font-family: inherit;
  font-size: 9px;
  color: rgba(96, 165, 250, 0.6);
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 2px;
  padding: 0 3px;
  line-height: 1.4;
}

.hp-key-sep {
  color: rgba(96, 165, 250, 0.35);
  font-size: 8px;
}

.hp-cap-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.hp-cap-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.hp-cap-card ul {
  list-style: none;
  margin-top: 10px;
}

.hp-cap-card ul li {
  font-size: 12px;
  color: var(--muted);
  padding: 3px 0 3px 14px;
  position: relative;
}

.hp-cap-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* AI Section */
.hp-ai-wrap {
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.04), rgba(245, 166, 35, 0.04));
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

.hp-ai-wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.06), transparent 70%);
  border-radius: 50%;
  animation: hpAiGlow 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes hpAiGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.5; }
  100% { transform: scale(1.2) translate(-20px, 20px); opacity: 1; }
}

.hp-ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
}

.hp-ai-item {
  padding: 16px;
  background: rgba(4, 15, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.3s;
}

.hp-ai-item:hover { border-color: var(--action); }

.hp-ai-item h4 {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}

.hp-ai-item p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Stats Bar */
.hp-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 80px;
}

.hp-stat-item {
  background: var(--panel);
  padding: 24px 16px;
  text-align: center;
}

.hp-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.hp-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Steps */
.hp-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hp-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color 0.3s;
}

.hp-step:hover { border-color: var(--action); }

.hp-step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--action);
  background: rgba(96, 165, 250, 0.1);
  min-width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
}

.hp-step-text h4 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.hp-step-text p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* Disclaimer */
.hp-disclaimer {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 26px;
}

.hp-disclaimer-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.hp-disclaimer p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 10px;
}

.hp-disclaimer p:last-child { margin-bottom: 0; }
.hp-disclaimer strong { color: var(--text); }

/* Footer */
.hp-footer {
  text-align: center;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.hp-footer p {
  font-size: 12px;
  color: var(--muted);
}

.hp-footer a { color: var(--action); text-decoration: none; }
.hp-footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
  .hp-nav-links { gap: 14px; }
  .hp-nav-link { display: none; }
  .hp-problem-grid { grid-template-columns: 1fr; }
  .hp-cap-grid { grid-template-columns: 1fr; }
  .hp-ai-grid { grid-template-columns: 1fr; }
  .hp-stats-bar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hp-stats-bar { grid-template-columns: 1fr; }
  .hp-hero-buttons { flex-direction: column; }
}

/* ==========================================================
   GHOST PREVIEW — Empty State Previews
   ========================================================== */

/* Container: override plain empty-state with preview layout */
.ghost-state {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  background: rgba(2, 12, 24, 0.55);
  overflow-y: auto;
  overflow-x: hidden;
}

.ghost-preview-content {
  padding: 20px 24px 80px;
  opacity: 0.38;
  filter: saturate(0.6);
  pointer-events: none;
  position: relative;
}

/* Diagonal watermark */
.ghost-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 64px;
  font-weight: 800;
  color: rgba(245, 166, 35, 0.06);
  letter-spacing: 16px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  user-select: none;
}

/* CTA overlay — centered floating card */
.ghost-cta-overlay {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 28px;
  background: linear-gradient(to top, rgba(2, 12, 24, 0.95) 0%, rgba(2, 12, 24, 0.85) 60%, rgba(2, 12, 24, 0) 100%);
  z-index: 6;
  pointer-events: auto;
}

.ghost-cta-overlay--research {
  position: sticky;
}

.ghost-cta-card {
  background: rgba(10, 20, 36, 0.92);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 8px;
  padding: 20px 28px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 166, 35, 0.06);
}

.ghost-cta-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.ghost-cta-body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #9aabb8;
  line-height: 1.6;
  margin-bottom: 14px;
}

.ghost-cta-btn {
  display: inline-block;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 4px;
  padding: 10px 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #f5a623;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.ghost-cta-btn:hover {
  background: rgba(245, 166, 35, 0.22);
  border-color: rgba(245, 166, 35, 0.6);
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.15);
}

/* --- Panel Landing Pages --- */
.panel-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  background: rgba(2, 12, 24, 0.92);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Reuse HOME-style background grid */
.pl-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(30, 58, 95, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: hpGridDrift 25s linear infinite;
  pointer-events: none;
}

/* Floating ambient orbs — matching HOME orbs */
.pl-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0;
  z-index: 0;
  animation: hpOrbFloat 10s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.panel-landing.pl-active .pl-orb {
  opacity: 0.15;
}

.pl-orb-1 { width: 450px; height: 450px; background: var(--accent, #f5a623); top: -120px; right: -100px; animation-duration: 12s; }
.pl-orb-2 { width: 320px; height: 320px; background: var(--action, #60a5fa); bottom: -80px; left: -80px; animation-duration: 16s; animation-delay: -5s; }
.pl-orb-3 { width: 220px; height: 220px; background: var(--green, #39d353); top: 50%; left: 55%; animation-duration: 20s; animation-delay: -9s; opacity: 0; }

.panel-landing.pl-active .pl-orb-3 { opacity: 0.08; }

.panel-landing-content {
  max-width: 820px;
  width: 100%;
  padding: 48px 32px 64px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Preview chart container — mimics real chart output */
.pl-preview {
  margin: 32px 0 40px;
  position: relative;
}

.pl-preview-frame {
  background: rgba(4, 15, 32, 0.8);
  border: 1px solid rgba(30, 58, 95, 0.5);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.pl-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.3);
  background: rgba(7, 22, 40, 0.6);
}

.pl-preview-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pl-preview-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #5a6b78;
  background: rgba(30, 58, 95, 0.3);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.pl-preview-chart {
  height: 220px;
  position: relative;
  padding: 12px;
}

.pl-preview-caption {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #5a6b78;
  text-align: center;
  padding: 8px 14px 12px;
  border-top: 1px solid rgba(30, 58, 95, 0.2);
}

/* Section divider for landing pages */
.pl-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 58, 95, 0.4), transparent);
  margin: 8px 0 32px;
}

/* 3-column feature grid variant */
.pl-features-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 40px;
}

/* Highlight card variant (for AI/premium features) */
.pl-feature-card--highlight {
  border-color: rgba(245, 166, 35, 0.15);
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.04), rgba(10, 20, 36, 0.7));
}

.pl-feature-card--highlight::before {
  color: rgba(245, 166, 35, 0.12) !important;
}

/* Two-column layout: text + preview */
.pl-hero-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.pl-hero-text {
  flex: 1;
  min-width: 0;
}

.pl-hero-preview {
  flex: 0 0 340px;
  min-width: 0;
}

/* KPI preview row */
.pl-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.pl-kpi-card {
  background: rgba(7, 22, 40, 0.7);
  border: 1px solid rgba(30, 58, 95, 0.4);
  border-radius: 4px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent, #f5a623);
}

.pl-kpi-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  color: #5a6b78;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.pl-kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #e8edf2;
}

/* Scroll-reveal animation classes */
.pl-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.pl-reveal.pl-visible {
  opacity: 1;
  transform: translateY(0);
}

.pl-reveal-d1 { transition-delay: 0.08s; }
.pl-reveal-d2 { transition-delay: 0.16s; }
.pl-reveal-d3 { transition-delay: 0.24s; }
.pl-reveal-d4 { transition-delay: 0.32s; }

/* Keyboard shortcut badge */
.pl-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 1.5px;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 4px;
  padding: 5px 10px;
  margin-bottom: 16px;
  animation: plBadgePulse 3s ease-in-out infinite;
}

.pl-shortcut kbd {
  display: inline-block;
  font-family: inherit;
  font-size: 10px;
  color: #cdb87a;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
}

.pl-shortcut .pl-shortcut-sep {
  color: #5a6b78;
  font-size: 9px;
}

@keyframes plBadgePulse {
  0%, 100% { border-color: rgba(245, 166, 35, 0.2); box-shadow: none; }
  50% { border-color: rgba(245, 166, 35, 0.4); box-shadow: 0 0 12px rgba(245, 166, 35, 0.06); }
}

.pl-heading {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #e8edf2;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.pl-subheading {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #9aabb8;
  line-height: 1.7;
  margin: 0 0 36px;
  max-width: 640px;
}

/* Subtle animated underline accent on heading */
.pl-heading::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #f5a623, rgba(96, 165, 250, 0.5));
  border-radius: 1px;
  margin-top: 8px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.pl-reveal.pl-visible .pl-heading::after {
  width: 80px;
}

.pl-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.pl-feature-card {
  background: rgba(10, 20, 36, 0.7);
  border: 1px solid rgba(79, 195, 247, 0.08);
  border-radius: 8px;
  padding: 20px 22px;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.pl-feature-card:hover {
  border-color: rgba(245, 166, 35, 0.25);
  background: rgba(10, 20, 36, 0.95);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(245, 166, 35, 0.06);
}

/* Number accent on feature cards */
.pl-feature-card::before {
  content: attr(data-index);
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  color: rgba(245, 166, 35, 0.08);
  margin-bottom: 4px;
  line-height: 1;
  transition: color 0.3s ease;
}

.pl-feature-card:hover::before {
  color: rgba(245, 166, 35, 0.15);
}

.pl-feature-card h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #f5a623;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.pl-feature-card p {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: #8a9baa;
  line-height: 1.65;
  margin: 0;
}

.pl-cta {
  text-align: center;
  padding-top: 8px;
}

.pl-cta-btn {
  display: inline-block;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 4px;
  padding: 12px 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #f5a623;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.pl-cta-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(245, 166, 35, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.pl-cta-btn:hover {
  background: rgba(245, 166, 35, 0.22);
  border-color: rgba(245, 166, 35, 0.6);
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.pl-cta-btn:hover::after {
  width: 300px; height: 300px;
}

.pl-cta-hint {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #5a6b78;
  margin: 0;
}

/* Scan-line breathing overlay */
.pl-scanline {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(96, 165, 250, 0.008) 2px,
    rgba(96, 165, 250, 0.008) 4px
  );
  animation: plScanDrift 8s linear infinite;
}

@keyframes plScanDrift {
  0% { background-position: 0 0; }
  100% { background-position: 0 40px; }
}

@media (max-width: 600px) {
  .panel-landing-content {
    padding: 32px 18px 48px;
  }
  .pl-heading {
    font-size: 22px;
  }
  .pl-features, .pl-features-3 {
    grid-template-columns: 1fr;
  }
  .pl-hero-row {
    flex-direction: column;
  }
  .pl-hero-preview {
    flex: none;
    width: 100%;
  }
  .pl-orb { display: none; }
}

/* --- Real-Layout Landing Page Components --- */

/* Wider content for real-layout landings */
.pl-real-layout {
  max-width: 960px;
}

/* Section container */
.pl-section {
  margin-bottom: 28px;
}

/* Section heading — matches real .section-heading style */
.pl-section-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pl-section-heading .pl-preview-badge {
  margin-left: auto;
}

.pl-section-info {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: #6a7b88;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Config chips row */
.pl-config-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.pl-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #9aabb8;
  background: rgba(30, 58, 95, 0.25);
  border: 1px solid rgba(30, 58, 95, 0.4);
  border-radius: 3px;
  padding: 4px 10px;
  letter-spacing: 0.08em;
}

/* Mock allocation/risk bars */
.pl-mock-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pl-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #9aabb8;
  width: 50px;
  flex-shrink: 0;
}

.pl-bar-track {
  flex: 1;
  height: 18px;
  background: rgba(30, 58, 95, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.pl-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.pl-bar-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #e8edf2;
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* Mock data table */
.pl-mock-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.pl-mock-table thead th {
  font-size: 9px;
  font-weight: 700;
  color: #5a6b78;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.4);
  text-align: left;
}

.pl-mock-table thead th.numeric {
  text-align: right;
}

.pl-mock-table tbody td {
  padding: 7px 10px;
  color: #9aabb8;
  border-bottom: 1px solid rgba(30, 58, 95, 0.15);
}

.pl-mock-table tbody td.numeric {
  text-align: right;
  color: #e8edf2;
}

/* Stress test scenario cards */
.pl-stress-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.pl-stress-card {
  background: rgba(7, 22, 40, 0.7);
  border: 1px solid rgba(30, 58, 95, 0.4);
  border-radius: 6px;
  padding: 14px 16px;
  text-align: center;
}

.pl-stress-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #9aabb8;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pl-stress-impact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pl-stress--severe .pl-stress-impact { color: #ff6b6b; }
.pl-stress--moderate .pl-stress-impact { color: #f5a623; }
.pl-stress--mild .pl-stress-impact { color: #39d353; }

.pl-stress-desc {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #5a6b78;
}

/* Correlation heatmap table */
.pl-heatmap {
  overflow-x: auto;
}

.pl-corr-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.pl-corr-table thead th {
  font-size: 9px;
  font-weight: 700;
  color: #5a6b78;
  padding: 6px 8px;
  text-align: center;
  letter-spacing: 0.05em;
}

.pl-corr-label {
  font-weight: 700;
  color: #9aabb8;
  padding: 6px 8px;
  text-align: left;
}

.pl-corr-cell {
  text-align: center;
  padding: 8px 6px;
  color: #e8edf2;
  font-weight: 600;
  border-radius: 2px;
}

/* Monte Carlo controls (mock) */
.pl-mc-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.pl-mc-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pl-mc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #5a6b78;
  letter-spacing: 0.1em;
}

.pl-mc-btns {
  display: flex;
  gap: 4px;
}

.pl-mc-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #5a6b78;
  background: rgba(30, 58, 95, 0.2);
  border: 1px solid rgba(30, 58, 95, 0.3);
  border-radius: 3px;
  padding: 4px 10px;
}

.pl-mc-btn--active {
  color: #f5a623;
  background: rgba(245, 166, 35, 0.1);
  border-color: rgba(245, 166, 35, 0.35);
}

/* Sub-tab strip (mock) */
.pl-subtab-strip {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(30, 58, 95, 0.4);
  margin-bottom: 20px;
}

.pl-subtab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #5a6b78;
  padding: 8px 14px;
  letter-spacing: 0.1em;
  border-bottom: 2px solid transparent;
}

.pl-subtab--active {
  color: #f5a623;
  border-bottom-color: #f5a623;
}

/* Drift bars — bidirectional */
.pl-drift-track {
  position: relative;
  background: rgba(30, 58, 95, 0.15);
}

.pl-drift-track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(245, 166, 35, 0.4);
}

.pl-drift-pos {
  background: #39d353;
}

.pl-drift-neg {
  background: #ff6b6b;
}

/* Override chart container padding for real-layout */
.pl-real-layout .pl-preview-chart {
  height: auto;
  padding: 4px 0;
  background: rgba(4, 15, 32, 0.4);
  border: 1px solid rgba(30, 58, 95, 0.3);
  border-radius: 6px;
}

/* --- Research Landing — Report Mock Components --- */

.pl-research-header {
  margin-bottom: 16px;
}

.pl-research-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  color: #f5a623;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 4px;
  padding: 4px 12px;
  margin-right: 10px;
}

.pl-research-company {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #e8edf2;
}

.pl-research-meta {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* Narrative blocks (bull/bear/critique) */
.pl-narrative {
  background: rgba(7, 22, 40, 0.6);
  border: 1px solid rgba(30, 58, 95, 0.4);
  border-radius: 6px;
  padding: 16px 18px;
  border-left: 3px solid rgba(30, 58, 95, 0.5);
}

.pl-narrative p {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: #9aabb8;
  line-height: 1.7;
  margin: 0;
}

.pl-narrative--bull { border-left-color: #39d353; }
.pl-narrative--bear { border-left-color: #ff6b6b; }
.pl-narrative--risk { border-left-color: #f5a623; }

/* Data grid (financials / valuation) */
.pl-data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pl-data-cell {
  background: rgba(7, 22, 40, 0.6);
  border: 1px solid rgba(30, 58, 95, 0.3);
  border-radius: 4px;
  padding: 10px 12px;
}

.pl-data-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  color: #5a6b78;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.pl-data-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #e8edf2;
}

/* Verdict block */
.pl-verdict-block {
  background: rgba(7, 22, 40, 0.7);
  border: 1px solid rgba(30, 58, 95, 0.4);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.pl-verdict-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 4px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.pl-verdict--attractive {
  color: #39d353;
  background: rgba(57, 211, 83, 0.1);
  border: 1px solid rgba(57, 211, 83, 0.3);
}

.pl-verdict--neutral {
  color: #f5a623;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
}

.pl-verdict--avoid {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.pl-verdict-details {
  flex: 1;
}

.pl-verdict-row {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #9aabb8;
  margin-bottom: 6px;
  line-height: 1.5;
}

.pl-verdict-label {
  font-weight: 600;
  color: #5a6b78;
  margin-right: 6px;
}

.pl-verdict-val {
  color: #e8edf2;
}

/* News list */
.pl-news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-news-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(7, 22, 40, 0.5);
  border: 1px solid rgba(30, 58, 95, 0.2);
  border-radius: 4px;
}

.pl-news-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #5a6b78;
  white-space: nowrap;
  flex-shrink: 0;
}

.pl-news-title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #9aabb8;
}

/* --- Ghost KPI Cards --- */
.ghost-kpi-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ghost-kpi-card {
  flex: 1;
  min-width: 120px;
  background: var(--card, rgba(10, 20, 36, 0.6));
  border: 1px solid var(--border, rgba(41, 69, 106, 0.35));
  border-left: 3px solid #f5a623;
  border-radius: 6px;
  padding: 12px 14px;
}

.ghost-kpi-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #7a8a96;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ghost-kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #f5a623;
}

/* --- Ghost Config Chips --- */
.ghost-config-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.ghost-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #7a8a96;
  background: rgba(41, 69, 106, 0.15);
  border: 1px solid rgba(41, 69, 106, 0.25);
  border-radius: 3px;
  padding: 3px 8px;
  letter-spacing: 0.5px;
}

/* --- Ghost Section Heading --- */
.ghost-section-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: rgba(154, 171, 184, 0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 16px 0 8px;
}

/* --- Ghost Charts (SVG) --- */
.ghost-frontier-svg,
.ghost-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

.ghost-chart-sm {
  max-height: 130px;
}

/* --- Ghost Allocation Bars --- */
.ghost-alloc-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.ghost-alloc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-alloc-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #9aabb8;
  width: 48px;
  text-align: right;
  flex-shrink: 0;
}

.ghost-alloc-track {
  flex: 1;
  height: 14px;
  background: rgba(41, 69, 106, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.ghost-alloc-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 300ms ease;
}

.ghost-alloc-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #7a8a96;
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}

/* --- Ghost Tables --- */
.ghost-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-bottom: 8px;
}

.ghost-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: #7a8a96;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(41, 69, 106, 0.25);
}

.ghost-table th.numeric {
  text-align: right;
}

.ghost-table td {
  padding: 5px 8px;
  color: #9aabb8;
  border-bottom: 1px solid rgba(41, 69, 106, 0.1);
}

.ghost-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Ghost Sub-tabs (P&L) --- */
.ghost-sub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(41, 69, 106, 0.25);
}

.ghost-sub-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #5a6a76;
  padding: 8px 14px;
  letter-spacing: 0.5px;
}

.ghost-sub-tab.active {
  color: #f5a623;
  border-bottom: 2px solid #f5a623;
}

/* --- Ghost Stress Cards (Risk) --- */
.ghost-stress-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ghost-stress-card {
  flex: 1;
  min-width: 140px;
  background: rgba(10, 20, 36, 0.6);
  border: 1px solid rgba(41, 69, 106, 0.25);
  border-radius: 6px;
  padding: 14px 16px;
  text-align: center;
}

.ghost-stress-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #7a8a96;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.ghost-stress-impact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
}

/* --- Ghost Heatmap (Risk Correlation) --- */
.ghost-heatmap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 500px;
  margin-bottom: 8px;
}

.ghost-hm-row {
  display: flex;
  gap: 1px;
}

.ghost-hm-cell {
  width: 56px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  border-radius: 2px;
}

.ghost-hm-label {
  font-weight: 700;
  color: #7a8a96;
  background: transparent;
  justify-content: flex-end;
  padding-right: 6px;
}

.ghost-hm-header-cell {
  font-weight: 700;
  color: #7a8a96;
  background: transparent;
  font-size: 9px;
}

/* --- Ghost Research Panel --- */
.ghost-research-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.ghost-research-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  color: #f5a623;
  background: rgba(245, 166, 35, 0.1);
  border-radius: 4px;
  padding: 2px 10px;
}

.ghost-research-company {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #c8d6df;
  font-weight: 500;
}

.ghost-research-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.ghost-meta-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #7a8a96;
  background: rgba(41, 69, 106, 0.15);
  border: 1px solid rgba(41, 69, 106, 0.2);
  border-radius: 3px;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.ghost-narrative {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #9aabb8;
  line-height: 1.7;
  margin-bottom: 8px;
}

.ghost-data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.ghost-grid-item {
  background: rgba(10, 20, 36, 0.5);
  border: 1px solid rgba(41, 69, 106, 0.15);
  border-radius: 4px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ghost-grid-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #5a6a76;
  letter-spacing: 0.5px;
}

.ghost-grid-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #c8d6df;
}

.ghost-verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.ghost-verdict-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 800;
  color: #81c784;
  background: rgba(129, 199, 132, 0.1);
  border: 1px solid rgba(129, 199, 132, 0.3);
  border-radius: 4px;
  padding: 6px 14px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.ghost-verdict-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #9aabb8;
  line-height: 1.6;
}

/* --- Responsive Ghost --- */
@media (max-width: 768px) {
  .ghost-kpi-row {
    flex-direction: column;
  }
  .ghost-kpi-card {
    min-width: unset;
  }
  .ghost-watermark {
    font-size: 36px;
    letter-spacing: 8px;
  }
  .ghost-data-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ghost-stress-grid {
    flex-direction: column;
  }
  .ghost-hm-cell {
    width: 40px;
    height: 22px;
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .ghost-data-grid {
    grid-template-columns: 1fr;
  }
  .ghost-watermark {
    font-size: 24px;
    letter-spacing: 4px;
  }
}

/* --- Save & Share Bar --- */
.save-share-bar {
  display: none;
  background: rgba(7, 22, 40, 0.85);
  border: 1px solid var(--border, #1e3a5f);
  border-left: 3px solid var(--accent, #00d4aa);
  padding: 10px 16px;
  margin: 8px 12px 0;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.save-share-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.save-share-label {
  color: var(--text-secondary, #8ba4c4);
  white-space: nowrap;
}
.save-share-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.save-share-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, #1e3a5f);
  color: var(--text-primary, #e8f0fe);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 3px;
  width: 200px;
  outline: none;
  transition: border-color 0.2s;
}
.save-share-input:focus {
  border-color: var(--accent, #00d4aa);
}
.save-share-btn {
  background: var(--accent, #00d4aa);
  color: #0a1628;
  border: none;
  padding: 6px 14px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.save-share-btn:hover { opacity: 0.85; }
.save-share-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.save-share-success {
  color: var(--accent, #00d4aa);
  font-weight: 600;
}
.save-share-result {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Shared Session Banner --- */
.shared-session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.25);
  padding: 8px 16px;
  margin: 8px 12px 0;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary, #8ba4c4);
}
.shared-session-run {
  background: transparent;
  border: 1px solid var(--accent, #00d4aa);
  color: var(--accent, #00d4aa);
  padding: 4px 10px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.shared-session-run:hover {
  background: rgba(0, 212, 170, 0.1);
}

@media (max-width: 600px) {
  .save-share-inner { flex-direction: column; align-items: flex-start; }
  .save-share-input { width: 160px; }
}
