:root {
  /* Colors */
  --bg-color: #0b0f19;
  --bg-gradient: radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.08), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(168, 85, 247, 0.06), transparent 45%),
    radial-gradient(circle at top left, #1a233a, #0b0f19 70%);

  /* Surfaces */
  --surface-panel: rgba(22, 30, 46, 0.65);
  --surface-panel-hover: rgba(30, 41, 59, 0.65);
  --surface-input: rgba(15, 23, 42, 0.6);
  --surface-pill: rgba(15, 23, 42, 0.5);
  --surface-kpi: rgba(15, 23, 42, 0.4);
  --surface-kpi-hover: rgba(30, 41, 59, 0.6);
  --surface-active: rgba(56, 189, 248, 0.15);
  --surface-hover: rgba(255, 255, 255, 0.05);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-main: rgba(255, 255, 255, 0.08);
  --border-input: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(56, 189, 248, 0.3);

  /* Text */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-highlight: #38bdf8;
  --text-inverse: #ffffff;

  /* Accents & Status */
  --accent-primary: #3b82f6;
  --accent-glow: rgba(56, 189, 248, 0.4);
  --accent-hover: #60a5fa;
  --treatment-color: #38bdf8;
  --control-color: #f59e0b;
  --danger-color: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --warning-color: #faad14;
  --warning-bg: rgba(250, 173, 20, 0.1);

  /* Shadows */
  --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.2);

  /* Layout Variables */
  --panel-padding: 24px;

  /* Typography */
  --font-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 1120px;
  min-height: 100vh;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-anchor: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: var(--text-inverse);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

h2 {
  color: var(--text-main);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 0;
}

h3 {
  color: var(--text-main);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 8px;
}

p {
  color: var(--text-muted);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--text-highlight);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.flex-1 {
  flex: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.gap-8 {
  gap: 8px;
}

.gap-10 {
  gap: 10px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-32 {
  margin-top: 32px;
}

.my-16 {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}

.pb-16 {
  padding-bottom: 16px !important;
}

.pb-24 {
  padding-bottom: 24px !important;
}

.pt-24 {
  padding-top: 24px !important;
}

.py-4 {
  padding-top: 4px;
  padding-bottom: 4px;
}

.mx-24 {
  margin-left: 24px !important;
  margin-right: 24px !important;
}

.px-24 {
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Custom Utilities for Refactoring */
.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.inset-0 {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.gap-6 {
  gap: 6px;
}

.mb-4 {
  margin-bottom: 4px;
}

.opacity-80 {
  opacity: 0.8;
}

.p-0 {
  padding: 0 !important;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.items-start {
  align-items: flex-start !important;
}

.items-end {
  align-items: flex-end !important;
}

.gap-16 {
  gap: 16px !important;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-main {
  color: var(--text-main) !important;
}

.text-treatment {
  color: var(--treatment-color) !important;
}

.text-control {
  color: var(--control-color) !important;
}

.text-highlight {
  color: var(--text-highlight) !important;
}

.text-success {
  color: #10b981 !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

.font-normal {
  font-weight: 400 !important;
}

.font-medium {
  font-weight: 500 !important;
}

.font-bold {
  font-weight: 700 !important;
}

.font-extrabold {
  font-weight: 800 !important;
}

.pos-sticky {
  position: sticky;
}

.pos-static {
  position: static;
}

.top-0 {
  top: 0;
}

.top-16 {
  top: 16px;
}

.z-10 {
  z-index: 10;
}

.z-30 {
  z-index: 30;
}

.z-35 {
  z-index: 35;
}

.z-100 {
  z-index: 100;
}

.bg-transparent {
  background: transparent !important;
}

.border-none {
  border: none !important;
}

.border-bottom-main {
  border-bottom: 1px solid var(--border-main) !important;
}

.col-w-14 {
  width: 14%;
}

.col-w-25 {
  width: 25%;
}

.col-w-7 {
  width: 7%;
}

.col-w-9 {
  width: 9%;
}

.col-w-5 {
  width: 5%;
}

.col-w-10 {
  width: 10%;
}

.sticky-boundary {
  position: relative;
}

/* ==========================================================================
   APP STRUCTURE
   ========================================================================== */
.app-shell {
  width: min(1480px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.dashboard-header {
  margin-bottom: 40px;
}

.hero-grid,
.investment-grid,
.section-heading {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
}

.section-heading {
  margin-bottom: 16px;
  align-items: center;
}

/* Centralized Flex Layout for Dashboard Sections */
#dashboardContent,
#dashboardContent > .sticky-boundary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#investmentSectionBody {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Remove individual margins to rely purely on flex gap */
.section-block {
  margin-top: 0;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
/* Panels (Glassmorphism) */
.panel,
.media-board,
.flow-board,
.compact-table-shell {
  position: relative;
  background: var(--surface-panel);
  padding: var(--panel-padding);
  border: 1px solid var(--border-main);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-panel);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, z-index 0s;
}

.panel:hover,
.media-board:hover,
.flow-board:hover,
.compact-table-shell:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.15);
  z-index: 10;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Unified flush borders for panel headings */
.panel-heading.flush-border {
  margin: calc(var(--panel-padding) * -1) calc(var(--panel-padding) * -1) var(--panel-padding) calc(var(--panel-padding) * -1);
  padding: var(--panel-padding) var(--panel-padding) 16px var(--panel-padding);
  border-bottom: 1px solid var(--border-main);
}

/* Equalize top/bottom gaps when warning banner is present */
.panel-heading.flush-border:has(+ .density-source-note-container .warning-banner) {
  margin-bottom: 0 !important;
}

.panel.px-0 .panel-heading.flush-border,
.panel.p-0 .panel-heading.flush-border,
.chart-panel .panel-heading.flush-border,
.compact-table-shell .panel-heading.flush-border,
.media-board .panel-heading.flush-border {
  margin: 0 0 var(--panel-padding) 0;
}

.chart-panel,
.media-board,
.compact-table-shell {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.chart-panel .panel-heading {
  border-bottom: 1px solid var(--border-main);
  padding: var(--panel-padding) var(--panel-padding) 16px var(--panel-padding);
}

/* Source Pill */
.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-main);
  border-radius: 8px;
  background: var(--surface-pill);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.source-pill span {
  color: var(--text-highlight);
}

/* Inputs & Labels */
label,
.segmented-wrap>span,
.control-label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.control-label {
  display: block;
}

.date-input,
input[type="number"] {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background: var(--surface-input);
  color: var(--text-main);
  box-shadow: var(--shadow-inner);
  transition: all 0.2s;
  color-scheme: dark;
}

.date-input {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.date-input:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--text-highlight);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.short-input {
  max-width: 86px;
}

.medium-input {
  max-width: 130px;
}

.margin-label {
  justify-self: start;
  width: max-content;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  background: var(--surface-input);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  outline: none;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-inner);
  transition: background-color 0.3s, border-color 0.3s;
  margin: 0;
}

input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background-color 0.3s;
}

input[type="checkbox"]:checked {
  background: var(--surface-active);
  border-color: var(--border-focus);
}

input[type="checkbox"]:checked::after {
  transform: translateX(20px);
  background: var(--text-highlight);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Segmented Control */
.segmented-wrap {
  display: grid;
  gap: 6px;
}

.segmented-control {
  display: flex;
  background: var(--surface-input);
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-inner);
  border-radius: 8px;
  padding: 4px;
  gap: 2px;
  height: 38px;
  box-sizing: border-box;
}

.segmented-control button {
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 0 14px;
  transition: all 0.2s;
  flex: 1;
  white-space: nowrap;
}

.segmented-control button.active {
  background: var(--surface-active);
  color: var(--text-highlight);
  box-shadow: inset 0 0 0 1px var(--border-focus);
  font-weight: 800;
}

.segmented-control button:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text-main);
}

.segmented-control.inline-segmented {
  margin: 0;
}

/* Light Tabs */
.light-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.light-tabs button {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.light-tabs button:hover {
  color: var(--text-main);
}

.light-tabs button.active {
  color: var(--text-highlight);
}

.tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  background: transparent;
  /* Spring-like bezier for a premium snappy feel */
  transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1),
    width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  z-index: 2;
  pointer-events: none;
}

/* The actual visible line, stretched slightly wider than the container */
.tab-indicator::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -8px;
  right: -8px;
  height: 100%;
  background: var(--text-highlight);
  box-shadow: 0 -2px 10px rgba(56, 189, 248, 0.4);
  border-radius: 3px 3px 0 0;
}

.tab-indicator::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 24px;
  background: radial-gradient(ellipse at bottom, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
  pointer-events: none;
}


.hero-title {
  margin: 0;
}

.helper-text {
  margin-top: 4px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.hero-actions-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-tabs {
  margin-bottom: -17px;
  gap: 20px;
  margin-right: -6px;
}

.hero-tabs button {
  padding: 12px 6px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* Series Toggles */
.series-toggles {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 38px;
}

.series-toggles label {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-transform: none;
  font-size: 13px;
}

/* Reset Button */
.reset-anim-btn.tooltip-icon {
  display: grid;
  place-items: center;
  width: 38px !important;
  height: 38px !important;
  margin-left: 0;
  background: transparent !important;
  border: 1px solid transparent;
  color: var(--text-muted) !important;
  border-radius: 50% !important;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8) rotate(-45deg);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reset-anim-btn.tooltip-icon.is-dirty {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) rotate(0);
}

.reset-anim-btn.tooltip-icon svg {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reset-anim-btn.tooltip-icon:hover {
  color: var(--danger-color) !important;
  background: rgba(244, 63, 94, 0.1) !important;
  border-color: rgba(244, 63, 94, 0.2);
  backdrop-filter: blur(8px);
}

.reset-anim-btn.tooltip-icon:hover svg {
  transform: rotate(-360deg);
}

/* Tooltips */
.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  cursor: help;
  position: relative;
  color: var(--text-muted);
  font-size: 14px;
  vertical-align: text-bottom;
  transition: color 0.2s;
}

.info-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  mask-repeat: no-repeat;
}

.tooltip-icon:hover {
  color: var(--text-highlight);
}

.with-tooltip {
  position: relative;
  cursor: help;
}

button.with-tooltip {
  cursor: pointer;
}

span.with-tooltip {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.12);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

span.with-tooltip:hover {
  text-decoration-color: rgba(255, 255, 255, 0.5);
  color: var(--text-main);
}

.settings-btn.active::before,
.settings-btn.active::after {
  display: none !important;
}

.tooltip-icon[data-tooltip]::before,
.with-tooltip[data-tooltip]::before,
.with-tooltip .tooltip-popup {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(8px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f1f5f9;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  text-align: left;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  line-height: 1.5;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.tooltip-icon[data-tooltip]:hover::before,
.with-tooltip[data-tooltip]:hover::before,
.with-tooltip:hover .tooltip-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(2px);
}

.tooltip-popup ul.tooltip-list {
  margin: 6px 0 0 0;
  padding-left: 18px;
  list-style: disc;
  color: var(--text-muted);
}

.tooltip-popup ul.tooltip-list li {
  margin-bottom: 4px;
}

.tooltip-popup ul.tooltip-list li:last-child {
  margin-bottom: 0;
}

/* Tooltip Alignment Modifiers */
.tooltip-icon.tooltip-start[data-tooltip]::before,
.with-tooltip.tooltip-start[data-tooltip]::before {
  right: auto;
  left: 24px;
  transform: translateY(8px);
}

.tooltip-icon.tooltip-start[data-tooltip]:hover::before,
.with-tooltip.tooltip-start[data-tooltip]:hover::before {
  transform: translateY(2px);
}

/* Section Toggle */
.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.section-toggle-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border-main);
  border-radius: 8px;
  background: var(--surface-input);
  color: var(--text-highlight);
  font-size: 15px;
  font-weight: 900;
  box-shadow: var(--shadow-inner);
  transition: transform 140ms ease;
}

.section-toggle[aria-expanded="true"] .section-toggle-icon {
  transform: rotate(90deg);
}

.section-title {
  display: block;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

/* KPI Panel & Tiles */
.kpi-panel {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  align-content: start;
}

.kpi {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 13px 12px;
  border: 1px solid var(--border-main);
  border-radius: 10px;
  background: var(--surface-kpi);
  transition: background 0.2s;
}

.kpi:hover {
  background: var(--surface-kpi-hover);
}

.kpi.treatment {
  border-left-color: var(--treatment-color);
}

.kpi.control {
  border-left-color: var(--control-color);
}

.kpi.treatment strong {
  color: var(--treatment-color);
}

.kpi.control strong {
  color: var(--control-color);
}

.kpi span,
.kpi-subline,
.kpi-subline b,
.kpi-main-row strong,
.period-lift-grid strong,
.period-lift-grid em {
  color: var(--text-muted);
}

.kpi span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.kpi strong {

  color: var(--text-main);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.kpi-main-row,
.kpi-subline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.kpi-main-row strong {
  font-size: 13px;
  white-space: nowrap;
  text-shadow: none;
  font-weight: normal;
}

.kpi-subline {
  padding-top: 3px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-subline b {
  font-size: 12px;
  font-weight: normal;
}

.period-lift-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 8px;
  padding-top: 4px;
  font-size: 11px;
  font-weight: 800;
}

.period-lift-grid strong,
.period-lift-grid em {
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  justify-self: end;
  font-weight: normal;
  text-shadow: none;
}

.metric-tile {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas: "icon label" "icon value";
  gap: 8px 12px;
  align-items: center;
  padding: 16px 20px;
  min-height: 84px;
  border: 1px solid var(--border-main);
  border-radius: 10px;
  background: var(--surface-kpi);
  transition: background 0.2s;
}

.metric-tile:hover {
  background: var(--surface-kpi-hover);
}

.metric-icon {
  grid-area: icon;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-main);
  color: var(--text-highlight);
  font-weight: 900;
}

.metric-icon svg {
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.metric-tile span:not(.metric-icon) {
  grid-area: label;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-tile strong {
  grid-area: value;
  color: var(--text-main);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
}

.metric-tile.total-investment {
  border-left: 4px solid var(--text-main);
}

.rollup-panel {
  align-content: start;
  display: grid;
  gap: 10px;
  position: sticky;
  top: 24px;
}

/* Control Strip Redesign */
.control-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  position: sticky;
  top: 16px;
  z-index: 100;
}

.time-analysis-group {
  display: flex;
  gap: 24px;
  align-items: flex-end;
}

.date-label {
  width: 130px;
}

.settings-group {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.series-toggles {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 38px;
}

.series-toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-transform: none;
  font-weight: 500;
}

.settings-dropdown {
  position: relative;
}

.settings-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-btn svg {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-btn:hover,
.settings-btn.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-highlight);
  backdrop-filter: blur(8px);
}

.settings-btn:hover svg {
  transform: rotate(90deg);
}

.settings-popover {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  background: rgb(15, 23, 42);
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-panel);
  border-radius: 8px;
  z-index: 50;
  flex-direction: column;
  padding: 16px 16px 4px 16px;
  min-width: 280px;
  animation: fadeInPopover 0.2s ease-out;
}

.settings-popover.show {
  display: flex;
}

@keyframes fadeInPopover {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.settings-popover h4 {
  margin: 0 -16px 0 -16px;
  padding: 0 16px 16px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-main);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.settings-divider {
  height: 1px;
  background: var(--border-main);
  margin: 0 -16px;
}



/* Tables */
.table-panel {
  padding: var(--panel-padding) 0 0 0;
}

.table-panel>.panel-heading {
  padding-left: var(--panel-padding);
  padding-right: var(--panel-padding);
}

.compact-table-shell .panel-heading>div:first-child {
  min-width: 0;
}

.compact-table-shell .panel-heading .segmented-control {
  flex-shrink: 0;
}

.compact-table-shell .panel-heading h3 {
  margin: 0;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border-main);
  text-align: right;
  font-size: 13px;
  color: var(--text-main);
}

th,
.text-col-header {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

th {
  background: rgb(15, 23, 42);
  position: sticky;
  top: 0;
  z-index: 20;
}

td:first-child,
th:first-child {
  text-align: left;
  padding-left: var(--panel-padding);
}

td:nth-child(2),
th:nth-child(2) {
  text-align: left;
}

td:last-child,
th:last-child {
  padding-right: var(--panel-padding);
}

td {
  background: rgba(15, 23, 42, 0.2);
  font-variant-numeric: tabular-nums;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

tr.detail-row td {
  background: transparent;
}

tr.group-row td {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.detail-row td:first-child {
  color: var(--text-muted);
}

.group-toggle {
  display: inline-flex;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  color: var(--text-main);
  font-weight: 900;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.group-toggle span {
  display: inline-grid;
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s, transform 0.2s;
}

.group-toggle:hover span {
  color: var(--text-highlight);
}

/* Pct Badge */
.pct-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--surface-hover);
  color: var(--text-muted);
  transition: all 0.2s;
}

.audience-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.audience-tabs button.active .pct-badge {
  background: var(--accent-primary);
  color: #fff;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-main);
  line-height: 1;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.status-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.status-badge.status-included {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.2);
}

/* Charts */
.chart-wrap {
  position: relative;
  height: 510px;
  margin-top: 10px;
  padding: 0 12px 8px 0;
}

.hero-chart-wrap {
  height: 360px;
  flex: 1;
  padding: 16px var(--panel-padding) var(--panel-padding);
  box-sizing: border-box;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.axis-label {
  fill: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.legend-label,
.label-dark {
  fill: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.phase-label {
  fill: var(--text-highlight);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.phase-post,
.lift-label {
  fill: var(--text-highlight);
}

.lift-label {
  font-size: 14px;
  font-weight: 900;
}

.stat-label {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-value {
  fill: var(--text-main);
  font-size: 11px;
  font-weight: 900;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: var(--text-muted);
  font-weight: 800;
  text-align: center;
}

.empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 400px;
  padding: 0 24px;
}

.empty-state-icon {
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 4px;
}

.empty-state-content h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.kpi-diff-value {
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
  letter-spacing: inherit;
}

.kpi-na {
  color: var(--text-muted);
  font-weight: 500;
}

.empty-state-content p {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  color: var(--text-highlight);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.btn-retry:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
}

.btn-retry svg {
  opacity: 0.8;
}

.chart-loading-msg {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Animations */
.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 24px;
}

.wave-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  animation: bealls-bounce 1.4s infinite ease-in-out both;
}

.wave-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.wave-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bealls-bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.3;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}


/* Timeline & Media Pacing */
.timeline-head {
  padding-top: 24px;
  padding-bottom: 16px;
  padding-left: 24px;
  padding-right: 24px;
}

.calendar-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(15, 23, 42);
  border-top: 1px solid var(--border-main);
  border-bottom: 1px solid var(--border-main);
  padding-right: 24px;
}

.calendar-side {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-right: 1px solid var(--border-main);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(17, minmax(42px, 1fr));
}

.month-row {
  min-height: 36px;
  background: transparent;
}

.month-row span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
}

.month-row span:last-child {
  border-right: none;
}

.month-row em {
  color: var(--text-muted);
  font-style: normal;
  font-family: var(--font-base);
  font-weight: 500;
}

.week-row {
  min-height: 32px;
  background: transparent;
  border-top: 1px solid var(--border-main);
  position: relative;
}

.week-row::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -24px;
  width: 24px;
  height: 1px;
  background: var(--border-main);
}

.week-row span {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.week-row span.today-week,
th.current-month {
  color: #fbbf24 !important;
  font-weight: 700 !important;
  background: linear-gradient(rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.15)), rgb(15, 23, 42) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  border-bottom: none !important;
  border-radius: 4px 4px 0 0 !important;
  margin-top: 2px;
}

.timeline-channel-row,
.density-channel {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 56px;
  border-bottom: 1px solid var(--border-main);
  background: transparent;
  padding-right: 24px;
}

.density-channel {
  grid-template-rows: auto auto;
}

.channel-label {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px 24px;
  border-right: 1px solid var(--border-main);
  color: var(--text-muted);
  grid-column: 1;
  grid-row: 1;
}

.channel-label>span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
  margin-top: 4px;
}

.channel-label strong {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.channel-label b {
  position: relative;
  display: block;
  text-align: right;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  padding-bottom: 18px;
}

.avg-marker {
  position: absolute;
  right: -6px;
  bottom: 0;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--surface-input);
  color: var(--text-muted);
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  z-index: 1;
}

.density-lane,
.flight-lane,
.density-grid {
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 17 - 1px), rgba(0, 0, 0, 0.4) calc(100% / 17 - 1px), rgba(0, 0, 0, 0.4) calc(100% / 17));
}

.density-lane {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-column: 1 / -1;
  min-height: 38px;
  border-top: 1px solid var(--border-main);
  padding-right: 24px;
}

.density-grid {
  align-items: end;
  padding: 0 2px 7px;
  min-height: 54px;
  position: relative;
}

.density-grid i {
  display: block;
  align-self: end;
  margin: 0 2px;
  border-radius: 2px 2px 0 0;
  cursor: crosshair;
  position: relative;
  transition: filter 0.2s;
}

.density-grid i:hover {
  filter: brightness(1.2);
  z-index: 40;
}

.global-marker-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  background: transparent;
  border: none !important;
  z-index: 5;
}

.global-today-line,
td.current-month {
  position: relative;
  height: 100%;
  background: rgba(251, 191, 36, 0.08) !important;
  border-left: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-right: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.global-today-line {
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0 0 4px 4px;
}

td.current-month {
  color: #fbbf24;
  font-weight: 600;
  border-bottom: none !important;
  border-top: none !important;
}

tr.group-row td.current-month {
  background: rgba(251, 191, 36, 0.25) !important;
}

tbody tr:last-child td.current-month {
  border-bottom: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 0 0 4px 4px;
}

.global-today-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.95);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-footer {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--surface-kpi) !important;
  border-top: 1px solid var(--border-main) !important;
  border-radius: 0 0 12px 12px !important;
}

.timeline-footer div {
  padding: 16px 24px 24px;
  border-right: 1px solid var(--border-main);
}

.timeline-footer div:last-child {
  border-right: none;
}

.timeline-footer span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-footer strong {
  display: block;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
}

/* Density Tooltip */
.density-grid i[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-panel);
  border: 1px solid var(--border-subtle);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
}

.density-grid i[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
}

.density-grid i[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

.density-grid i[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}

/* Future Panels (Base Grid) */
.future-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.future-panel {
  min-height: 150px;
}

.future-panel p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Prospects */
.prospects-section {
}

.prospects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.prospect-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.prospect-card-eyebrow {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prospect-kpi-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.prospect-kpi-val {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
}

.prospect-kpi-desc {
  margin: 0;
}

.prospect-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-main);
}

.prospect-split-label {
  margin: 0 0 4px;
  font-size: 13px;
}

.prospect-split-val {
  font-size: 18px;
  font-weight: 700;
}

.prospect-chart-wrap {
  height: 240px;
  margin-top: 32px;
  position: relative;
}

/* Flatpickr Theme Overrides */
.flatpickr-calendar {
  background: var(--surface-panel) !important;
  border: 1px solid var(--border-main) !important;
  box-shadow: var(--shadow-panel) !important;
  backdrop-filter: blur(16px) !important;
  border-radius: 12px !important;
  padding: 16px !important;
  font-family: var(--font-base) !important;
  color: var(--text-main) !important;
  width: 320px !important;
}

/* Hide the arrow */
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
  display: none !important;
}

/* Months Container */
.flatpickr-months {
  position: relative !important;
  display: block !important;
  margin-bottom: 24px !important;
  height: 48px !important;
  overflow: visible !important;
}

.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--text-main) !important;
  fill: var(--text-main) !important;
  height: 48px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  padding: 0 44px !important;
  box-sizing: border-box !important;
}

.flatpickr-current-month {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  position: static !important;
  transform: none !important;
  left: auto !important;
  width: 100% !important;
  height: 34px !important;
}

/* Month Dropdown & Year Input */
.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--surface-input) !important;
  border: 1px solid var(--border-main) !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  height: 34px !important;
  line-height: 32px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  appearance: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: border-color 0.2s !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  border-color: var(--border-focus) !important;
}

.flatpickr-current-month .numInputWrapper,
.custom-spinner-wrapper {
  display: inline-block !important;
  position: relative !important;
  height: 34px !important;
  width: 86px !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown,
.custom-spinner-wrapper span.arrowUp,
.custom-spinner-wrapper span.arrowDown {
  display: flex !important;
  position: absolute !important;
  right: 2px !important;
  border: none !important;
  width: 20px !important;
  opacity: 0.6 !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp,
.custom-spinner-wrapper span.arrowUp {
  top: 0 !important;
  bottom: 50% !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown,
.custom-spinner-wrapper span.arrowDown {
  top: 50% !important;
  bottom: 0 !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:hover,
.flatpickr-current-month .numInputWrapper span.arrowDown:hover,
.custom-spinner-wrapper span.arrowUp:hover,
.custom-spinner-wrapper span.arrowDown:hover {
  opacity: 1 !important;
}

/* Base custom arrows */
.flatpickr-current-month .numInputWrapper span.arrowUp::after,
.custom-spinner-wrapper span.arrowUp::after {
  content: "";
  display: block !important;
  position: static !important;
  border-left: 4px solid transparent !important;
  border-right: 4px solid transparent !important;
  border-bottom: 4px solid var(--text-muted) !important;
  margin-top: 6px !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown::after,
.custom-spinner-wrapper span.arrowDown::after {
  content: "";
  display: block !important;
  position: static !important;
  border-left: 4px solid transparent !important;
  border-right: 4px solid transparent !important;
  border-top: 4px solid var(--text-muted) !important;
  margin-bottom: 6px !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:hover::after,
.custom-spinner-wrapper span.arrowUp:hover::after {
  border-bottom-color: var(--text-highlight) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:hover::after,
.custom-spinner-wrapper span.arrowDown:hover::after {
  border-top-color: var(--text-highlight) !important;
}

.flatpickr-current-month input.cur-year,
.custom-spinner-wrapper input {
  background: var(--surface-input) !important;
  border: 1px solid var(--border-main) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 0 24px 0 12px !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  height: 34px !important;
  text-align: left !important;
  line-height: 32px !important;
  transition: border-color 0.2s !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.flatpickr-current-month input.cur-year::-webkit-inner-spin-button,
.flatpickr-current-month input.cur-year::-webkit-outer-spin-button,
.custom-spinner-wrapper input::-webkit-inner-spin-button,
.custom-spinner-wrapper input::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}

.flatpickr-current-month input.cur-year:hover,
.flatpickr-current-month input.cur-year:focus,
.custom-spinner-wrapper input:hover,
.custom-spinner-wrapper input:focus {
  border-color: var(--border-focus) !important;
}

/* Arrows */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: 34px !important;
  width: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  fill: var(--text-muted) !important;
  border-radius: 6px !important;
  padding: 0 !important;
  background: var(--surface-input) !important;
  border: 1px solid var(--border-main) !important;
  z-index: 10 !important;
}

.flatpickr-months .flatpickr-prev-month {
  left: 0 !important;
}

.flatpickr-months .flatpickr-next-month {
  right: 0 !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: var(--text-muted) !important;
  width: 14px !important;
  height: 14px !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  border-color: var(--border-focus) !important;
  background: var(--surface-hover) !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--text-highlight) !important;
}

/* Weekdays */
.flatpickr-weekdays {
  background: transparent !important;
  height: 28px !important;
  border-bottom: 1px solid var(--border-main) !important;
  margin-bottom: 8px !important;
}

.flatpickr-weekdaycontainer {
  display: flex !important;
  justify-content: space-between !important;
}

span.flatpickr-weekday {
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  flex: 1 !important;
  text-align: center !important;
  background: transparent !important;
}

/* Days */
.flatpickr-innerContainer {
  border: none !important;
  overflow: visible !important;
  display: block !important;
}

.flatpickr-days {
  border: none !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 4px !important;
  justify-items: center !important;
}

.flatpickr-day {
  background: transparent !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  margin: 0 !important;
  width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  line-height: 32px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: var(--surface-hover) !important;
  border-color: var(--border-main) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  border-radius: 4px !important;
}

.flatpickr-day.inRange {
  background: var(--surface-active) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.flatpickr-day.today {
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.notAllowed,
.flatpickr-day.notAllowed.prevMonthDay,
.flatpickr-day.notAllowed.nextMonthDay {
  color: var(--text-muted) !important;
  opacity: 0.4 !important;
}

/* Custom Action Container (Reset/Today) */
.flatpickr-action-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-main);
}

.flatpickr-action-btn {
  background: var(--surface-input);
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-inner);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.flatpickr-action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-focus);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--surface-kpi);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  border: 2px solid rgba(15, 23, 42, 0.8);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Other utils */
.media-controls-horizontal {
  border-bottom: 1px solid var(--border-main);
  padding: 16px 24px;
}

.media-controls-panel .segmented-control button {
  padding: 6px 8px;
  font-size: 12px;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.control-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-muted);
}

.control-divider {
  width: 1px;
  height: 32px;
  background: var(--border-main);
  margin-top: 18px;
}

/* Mini Pill */
.mini-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border-main);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mini-pill i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-primary);
}

/* Missing elements referenced in HTML */
.error-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--danger-bg);
  border-radius: 8px;
  background: var(--surface-input);
  color: var(--danger-color);
  font-weight: 700;
}

.warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(250, 173, 20, 0.2);
  border-radius: 6px;
  background: var(--warning-bg);
  color: var(--warning-color);
  font-size: 13px;
  font-weight: 500;
}

/* Missing Timeline & Flow specific components */
.flight-bar {
  position: absolute;
  display: flex;
  height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.flight-bar em {
  font-style: normal;
  opacity: 0.78;
}

.today-marker {
  position: absolute;
  top: -26px;
  bottom: 0;
  left: 0;
  width: 2px;
  border-left: 1px dashed rgba(239, 68, 68, 0.6);
  pointer-events: none;
}

.today-marker b {
  position: absolute;
  top: 5px;
  left: 4px;
  padding: 2px 5px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 2px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-color);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.today-marker.positioned {
  grid-column: 9 / 10;
}

.flow-controls {
  display: grid;
  grid-template-columns: 2fr 0.9fr 0.9fr 1.5fr;
  gap: 18px;
  margin-bottom: 28px;
}

.select-chip,
.add-campaign {
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid var(--border-main);
  border-radius: 8px;
  background: var(--surface-input);
  color: var(--text-main);
  font-size: 20px;
}

.select-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.select-chip span {
  color: var(--text-muted);
}



.prospect-split-val.empty {
  color: var(--text-muted);
}

.prospect-split-val.treatment {
  color: var(--treatment-color);
}

.prospect-split-val.control {
  color: var(--control-color);
}

.add-campaign {
  border-color: var(--accent-primary);
  background: var(--surface-active);
  color: var(--text-main);
  font-weight: 850;
}

.flow-tabs {
  display: grid;
  grid-template-columns: 64px 128px 288px repeat(9, 1fr);
  min-height: 44px;
  background: var(--surface-kpi);
}

.flow-tabs span,
.flow-tabs strong {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border-main);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 600;
}

.flow-tabs strong {
  background: var(--surface-active);
  color: var(--text-highlight);
  font-size: 20px;
  font-weight: 700;
}

.flow-row {
  display: grid;
  grid-template-columns: 64px 128px 288px 1fr;
  min-height: 58px;
  border-bottom: 1px solid var(--border-main);
}

.flow-muted-row {
  background: var(--surface-hover);
}

.flow-edit,
.flow-name {
  display: flex;
  align-items: center;
}

.flow-edit {
  justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
}

.flow-name {
  gap: 12px;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 750;
}

.flow-name small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.switch {
  align-self: center;
  width: 50px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-input);
  border: 1px solid var(--border-main);
}

.switch.on {
  background: var(--accent-primary);
  border-color: var(--border-focus);
}

.switch i {
  display: block;
  width: 26px;
  height: 26px;
  margin-left: 0;
  border-radius: 999px;
  background: var(--text-main);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: margin-left 0.2s;
}

.switch.on i {
  margin-left: 24px;
}

.campaign-bar,
.optimization-window {
  align-self: center;
  height: 28px;
  background: var(--accent-primary);
}

.campaign-bar.alt {
  background: var(--accent-hover);
}

.optimization-window {
  position: relative;
  height: 58px;
  border-left: 3px solid var(--warning-color);
  border-right: 3px solid var(--warning-color);
  background: var(--warning-bg);
}

.optimization-note {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 34px 20px 10px;
  color: var(--text-muted);
  text-align: center;
}

.optimization-note strong {
  color: var(--warning-color);
  font-size: 22px;
}

.optimization-note p {
  max-width: 1080px;
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

/* Grid specific layout helpers used in index.html */
.col-1-row-2 {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.col-2-row-2 {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.col-2-row-1 {
  grid-column: 2;
  grid-row: 1;
}

.row-span-full {
  grid-row: 1 / -1;
}

.col-9 {
  grid-column: 9 / 10;
}

.min-h-54 {
  min-height: 54px;
}

.timeline-sticky-head {
  position: sticky;
  top: 0;
  z-index: 35;
  background: rgb(15, 23, 42);
  border-top: 1px solid var(--border-main);
  border-bottom: 1px solid var(--border-main);
}

/* Tree guide */
.audience-label-wrap {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 48px;
  height: 100%;
  border-right: 1px solid var(--border-main);
  grid-column: 1;
  grid-row: 2;
}

.tree-guide {
  position: absolute;
  left: 22px;
  top: -12px;
  width: 18px;
  height: calc(50% + 12px);
  border-left: 2px solid var(--border-main);
  border-bottom: 2px solid var(--border-main);
  border-bottom-left-radius: 4px;
}

.audience-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-kpi);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-main);
}

/* Elegant empty state for inapplicable KPIs */
.kpi-empty {
  color: var(--text-muted);
  opacity: 0.5;
  font-weight: 400;
  user-select: none;
}

/* Settings Dropdown */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom HTML Legend */
.custom-chart-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 26px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  overflow: hidden;
  box-sizing: border-box;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #94a3b8;
  /* Highly readable slate-400 */
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.2s, color 0.2s;
  user-select: none;
}

.legend-item:hover {
  color: var(--text-main);
}

.legend-item.active {
  color: var(--text-main);
}

.legend-toggle {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: var(--surface-input);
  position: relative;
  transition: all 0.2s ease;
  border: 1px solid var(--border-input);
}

.legend-item.active .legend-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-main);
}

.legend-toggle::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.legend-item.active .legend-toggle::after {
  transform: translateX(12px);
  background: var(--thumb-color, #fff);
  box-shadow: 0 0 6px var(--thumb-color, transparent);
}

/* ==========================================================================
   AMBIENT GLOWS & STAGGERED ENTRANCE
   ========================================================================== */

@keyframes staggeredFadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-header {
  animation: staggeredFadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.05s;
}

.control-strip {
  animation: staggeredFadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.15s;
}

.hero-grid .chart-panel {
  animation: staggeredFadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.25s;
}

.hero-grid .kpi-panel {
  animation: staggeredFadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.35s;
}

.prospects-section,
.ctrl-section,
.future-panel {
  animation: staggeredFadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.45s;
}

#investmentSection {
  animation: staggeredFadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.55s;
}

.rollup-panel,
.table-panel {
  animation: staggeredFadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.65s;
}

.global-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: calc(100vh - 200px);
  padding: 40px;
}

/* Premium Sidebar Summary Metrics */
.ctrl-summary-metric {
  padding: 16px var(--panel-padding);
  margin: 0 calc(var(--panel-padding) * -1);
  border-bottom: 1px solid var(--border-main);
}
.ctrl-summary-metric:first-of-type {
  border-top: 1px solid var(--border-main);
}
.ctrl-summary-metric:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.ctrl-metric-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.ctrl-metric-row:last-child {
  margin-bottom: 0;
}
.ctrl-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  width: 32px;
  flex-shrink: 0;
}
.ctrl-metric-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  min-width: 40px;
}
.ctrl-metric-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.ctrl-metric-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
  width: 72px;
  flex-shrink: 0;
}


.global-overlay .empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes errorPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.1);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.global-overlay.is-error .empty-state-icon {
  color: var(--danger-color);
  background: rgba(239, 68, 68, 0.05);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.03);
  animation: errorPulse 2.5s infinite;
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.global-overlay.is-error .empty-state-icon svg {
  width: 32px;
  height: 32px;
  opacity: 0.9;
}

.global-overlay.is-error .empty-state-content {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 48px 64px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.global-overlay.is-error .empty-state-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  color: var(--text-inverse);
}

.global-overlay.is-error .empty-state-content p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.global-overlay.is-error .btn-retry {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--text-highlight);
  transition: all 0.2s ease;
}

.global-overlay.is-error .btn-retry:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}
/* Refactored Utility Classes */
.d-none { display: none !important; }
.m-0 { margin: 0; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 2px; }
.px-10 { padding-left: 10px; padding-right: 10px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }
.opacity-0 { opacity: 0; }
.relative { position: relative; }
.sticky { position: sticky; }
.top-panel { top: var(--panel-padding); }
.self-start { align-self: flex-start; }
.min-h-480 { min-height: 480px; }
.min-w-260 { min-width: 260px; }
.right-0 { right: 0; }
.text-xs { font-size: 12px; }
.text-xxs { font-size: 10px; }
.text-11 { font-size: 11.5px; }
.tracking-wide { letter-spacing: 0.5px; }
.lh-snug { line-height: 1.4; }
.uppercase { text-transform: uppercase; }
.dl-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; }
.cursor-help { cursor: help; }
.d-block { display: block; }
.min-w-0 { min-width: 0; }
