/* ================================================================
   STYLE_DARK.CSS — Dark theme for SFF LP Site (tabbed single-page)
   Extracted from sff-funnel-interactive.html + new tab/methodology/overview styles
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0b1220;
  --navy-mid: #111c2e;
  --navy-light: #172540;
  --gold: #e8b828;
  --gold-light: #f5d54a;
  --gold-dim: rgba(232,184,40,0.15);
  --teal: #3db8a4;
  --teal-dim: rgba(61,184,164,0.12);
  --text: #e8edf5;
  --muted: #8896ab;
  --line: rgba(255,255,255,0.07);
}

body {
  background: var(--navy);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  padding: 0;
}

/* ================================================================
   SIDEBAR NAV
   ================================================================ */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--navy-mid);
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar-brand {
  padding: 28px 24px 6px;
}
.sidebar-brand h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: -0.01em;
  font-weight: 400;
  margin: 0;
}
.sidebar-brand p {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.sidebar-nav {
  list-style: none;
  padding: 16px 12px;
  margin: 0;
  flex: 1;
}
.sidebar-nav li {
  margin-bottom: 2px;
}
.tab-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.tab-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.tab-btn.active {
  color: var(--gold-light);
  background: rgba(232,184,40,0.08);
  border-left-color: var(--gold);
}
.tab-btn-external {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.tab-btn-external:hover {
  color: var(--gold-light);
  background: rgba(255,255,255,0.03);
}
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.sidebar-footer .site-updated {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.main-content {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ================================================================
   TAB CONTENT
   ================================================================ */
.tab-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 48px 24px;
}
.tab-pane {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
}
.tab-pane[style*="display: none"],
.tab-pane[style*="display:none"] {
  /* ensure hidden panes don't take space */
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 10px;
  cursor: pointer;
  line-height: 1;
}
.sidebar-toggle:hover {
  color: var(--text);
  border-color: rgba(232,184,40,0.25);
}

/* ================================================================
   HEADER (Funnel page)
   ================================================================ */
.header {
  text-align: center;
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}
#tab-funnel { padding-top: 16px; }
#tab-funnel .header { margin-bottom: 10px; }
#tab-funnel .connector { height: 10px; }
.header-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.header p {
  margin-top: 12px;
  font-size: 16px;
  color: #a8b8c8;
  font-weight: 400;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ================================================================
   FUNNEL
   ================================================================ */
.funnel-wrap {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  position: absolute;
  left: -10px;
  transform: translateX(-100%);
  white-space: nowrap;
  padding-top: 18px;
}

.funnel-row {
  position: relative;
  display: flex;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}
.lvl-2 { animation-delay: 0.32s; }
.lvl-3 { animation-delay: 0.44s; }
.lvl-4 { animation-delay: 0.56s; }
.lvl-5 { animation-delay: 0.68s; }
.lvl-6 { animation-delay: 0.80s; }
.lvl-7 { animation-delay: 1.0s; }

.bar-outer {
  position: relative;
  width: 100%;
  display: flex;
  align-items: stretch;
}

.bar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  transition: filter 0.2s;
  cursor: default;
  width: 100%;
}
.bar:hover { filter: brightness(1.08); }

.bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1;
}
.bar-number {
  font-family: 'DM Mono', monospace;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
  min-width: 52px;
}
.bar-label {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.bar-sublabel {
  font-size: 14px;
  color: #a0b0c0;
  font-weight: 400;
  margin-top: 3px;
}
.bar-right {
  z-index: 1;
  text-align: right;
  align-self: center;
  padding-left: 12px;
  flex-shrink: 0;
}
.bar-pct {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}

.connector {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 22px;
  position: relative;
  z-index: 2;
}
.connector-line {
  width: 1px;
  height: 100%;
  background: var(--line);
}
.connector-text {
  position: absolute;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #b0c0d0;
  background: var(--navy);
  padding: 0 14px;
  white-space: nowrap;
}

/* Tier breakdown row */
.tier-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  background: var(--navy-mid);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: 0;
}
.tier-row.t-seed { animation: fadeUp 0.5s ease 0.85s forwards; }
.tier-row.t-series { animation: fadeUp 0.5s ease 1.05s forwards; }

.tier-card {
  flex: 1;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tier-card.t1 {
  background: rgba(232,184,40,0.10);
  border: 1px solid rgba(232,184,40,0.25);
}
.tier-card.t2 {
  background: rgba(61,184,164,0.07);
  border: 1px solid rgba(61,184,164,0.18);
}
.tier-card-n {
  font-family: 'DM Mono', monospace;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}
.t1 .tier-card-n { color: var(--gold); }
.t2 .tier-card-n { color: var(--teal); }
.tier-card-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.tier-card-desc {
  font-size: 15px;
  color: #a0b0c0;
  line-height: 1.5;
  margin-top: 3px;
}
.tier-badge {
  display: inline-flex;
  flex-direction: column;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 3px;
  margin-bottom: 8px;
  width: fit-content;
}
.badge-tier {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.badge-sub {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.85;
}
.t1 .tier-badge { background: rgba(232,184,40,0.2); color: var(--gold-light); }
.t2 .tier-badge { background: rgba(61,184,164,0.15); color: var(--teal); }

/* Color themes per level */
.lvl-1 .bar { background: linear-gradient(90deg, #1a2840 0%, #162236 100%); border: 1px solid rgba(255,255,255,0.06); }
.lvl-2 .bar { background: linear-gradient(90deg, #1a2a3f 0%, #162538 100%); border: 1px solid rgba(255,255,255,0.06); }
.lvl-3 .bar { background: linear-gradient(90deg, #172e40 0%, #132a3a 100%); border: 1px solid rgba(255,255,255,0.07); }
.lvl-4 .bar { background: linear-gradient(90deg, #16303e 0%, #122c36 100%); border: 1px solid rgba(255,255,255,0.08); }
.lvl-5 .bar { background: linear-gradient(90deg, #142e30 0%, #122a2c 100%); border: 1px solid rgba(255,255,255,0.09); }
.lvl-6 .bar { background: linear-gradient(90deg, #18342a 0%, #142e24 100%); border: 1px solid rgba(232,184,40,0.12); }
.lvl-7 .bar { background: linear-gradient(90deg, #1c3828 0%, #163020 100%); border: 1px solid rgba(232,184,40,0.2); }

/* Width taper */
.lvl-2 .bar { margin: 0 2%; width: 96%; }
.lvl-3 .bar { margin: 0 5%; width: 90%; }
.lvl-4 .bar { margin: 0 8%; width: 84%; }
.lvl-5 .bar { margin: 0 11%; width: 78%; }
.lvl-6 .bar { margin: 0 14%; width: 72%; }
.lvl-7 .bar { margin: 0 17%; width: 66%; }

.tier-row { margin: 0 18%; width: 64%; }
.tier-row.t-series { margin: 0 20%; width: 60%; }

/* Number colors */
.lvl-1 .bar-number { color: #8896ab; }
.lvl-2 .bar-number { color: #9ba8be; }
.lvl-3 .bar-number { color: #aab8c8; }
.lvl-4 .bar-number { color: #b8c8d8; }
.lvl-5 .bar-number { color: #c8d8e4; }
.lvl-6 .bar-number { color: var(--teal); }
.lvl-7 .bar-number { color: var(--gold); }

/* Section break */
.section-break {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 36px 0 28px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.95s forwards;
}
.section-break-line {
  flex: 1;
  height: 1px;
  background: rgba(232,184,40,0.25);
}
.section-break-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

/* ================================================================
   FUND PORTFOLIO BOX
   ================================================================ */
.fund-box {
  width: 100%;
  background: var(--navy-mid);
  border: 1px solid rgba(232,184,40,0.2);
  border-radius: 10px;
  padding: 24px 28px 20px;
  opacity: 0;
  animation: fadeUp 0.6s ease 1.05s forwards;
}
.fund-section-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.fund-tier-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.tier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}
.tier-headline {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-top: 4px;
}
.t1-hl { color: var(--gold-light); }
.t2-hl { color: var(--teal); }

.fund-connector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.fund-connector-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.fund-connector-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #a0b0c0;
  white-space: nowrap;
}

/* Stats row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  max-width: 900px;
  width: 100%;
  opacity: 0;
  animation: fadeUp 0.6s ease 1.2s forwards;
}
.stat {
  flex: 1;
  padding: 22px 20px;
  text-align: center;
  border-right: 1px solid var(--line);
  background: var(--navy-mid);
}
.stat:last-child { border-right: none; }
.stat-n {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 15px;
  color: #a0b0c0;
  font-weight: 400;
  line-height: 1.5;
}

/* Legend */
.legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  opacity: 0;
  animation: fadeUp 0.5s ease 1.3s forwards;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #a0b0c0;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

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

/* ================================================================
   CONTROLS PANEL
   ================================================================ */
.controls-panel {
  max-width: 1100px;
  width: 100%;
  margin-top: 56px;
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  opacity: 0;
  animation: fadeUp 0.6s ease 1.4s forwards;
}
.controls-title {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

/* Optimizer toggle */
.optimizer-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(232,184,40,0.25);
}
.optimizer-btn {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border-right: 1px solid rgba(232,184,40,0.15);
}
.optimizer-btn:last-child { border-right: none; }
.optimizer-btn.active {
  background: rgba(232,184,40,0.15);
  color: var(--gold-light);
}
.optimizer-btn:hover:not(.active) {
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.optimizer-btn .toggle-sub {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.optimizer-btn .opt-line1,
.optimizer-btn .opt-line2 {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}
.optimizer-btn .opt-line2 {
  font-size: 14px;
}
.optimizer-btn.active .toggle-sub { color: rgba(232,184,40,0.6); }

/* Fund size readout */
.fund-size-readout {
  text-align: center;
  padding: 16px;
  margin-bottom: 20px;
  background: rgba(232,184,40,0.08);
  border: 1px solid rgba(232,184,40,0.2);
  border-radius: 8px;
}
.fund-size-value {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.fund-size-breakdown {
  font-size: 12px;
  color: var(--muted);
}

/* Fund size toggle */
.fund-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(232,184,40,0.25);
}
.fund-toggle-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border-right: 1px solid rgba(232,184,40,0.15);
}
.fund-toggle-btn:last-child { border-right: none; }
.fund-toggle-btn.active {
  background: rgba(232,184,40,0.15);
  color: var(--gold-light);
}
.fund-toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.fund-toggle-btn .toggle-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}
.fund-toggle-btn.active .toggle-sub {
  color: rgba(232,201,106,0.7);
}

/* Scoring mode toggle */
.scoring-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(61,184,164,0.25);
}
.scoring-toggle-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border-right: 1px solid rgba(61,184,164,0.15);
}
.scoring-toggle-btn:last-child { border-right: none; }
.scoring-toggle-btn.active {
  background: rgba(61,184,164,0.15);
  color: var(--teal);
}
.scoring-toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.scoring-toggle-btn .toggle-sub {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}
.scoring-toggle-btn.active .toggle-sub {
  color: rgba(61,184,164,0.7);
}

/* Controls grid */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  margin-bottom: 20px;
}
.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.control-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}
.control-value {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--text);
  min-width: 48px;
  text-align: right;
  display: inline-block;
}
.control-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--navy);
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--navy);
}

.controls-divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.live-summary {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--teal);
  text-align: center;
  padding: 12px;
  background: rgba(61,184,164,0.06);
  border: 1px solid rgba(61,184,164,0.12);
  border-radius: 6px;
  margin-top: 4px;
}

/* ================================================================
   MONTE CARLO RESULTS
   ================================================================ */
.mc-header {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 24px;
}
.mc-section {
  max-width: 1100px;
  width: 100%;
  margin-top: 0;
  opacity: 0;
  animation: fadeUp 0.6s ease 1.5s forwards;
}
.mc-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.mc-title-left {
  flex: 1;
}
.mc-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  text-align: left;
  margin-bottom: 4px;
}
.run-btn-inline {
  margin: 0;
  padding: 10px 24px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}
.mc-subtitle {
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}

/* Histogram */
.histogram-wrap {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.histogram-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.histogram-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 760 / 360;
}

/* Scenario table */
.scenario-table-wrap {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.scenario-table th {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.scenario-table th:first-child { text-align: left; }
.scenario-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-family: 'DM Mono', monospace;
  font-size: 15px;
}
.scenario-table td:first-child {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  color: var(--text);
}
.scenario-table tr.p50-row td {
  color: var(--gold-light);
  font-weight: 500;
}

/* Return probabilities */
.prob-bars-wrap {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.prob-bars-title {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.prob-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.prob-bar-label {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text);
  min-width: 48px;
  text-align: right;
}
.prob-bar-track {
  flex: 1;
  height: 24px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.prob-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 2px;
}
.prob-bar-value {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  min-width: 48px;
}

/* Run button */
.run-btn {
  display: block;
  margin: 20px auto;
  padding: 12px 32px;
  background: rgba(232,184,40,0.15);
  border: 1px solid rgba(232,184,40,0.3);
  border-radius: 6px;
  color: var(--gold-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.run-btn:hover {
  background: rgba(232,184,40,0.25);
  border-color: rgba(232,184,40,0.5);
}
.run-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ================================================================
   ASSUMPTIONS ACCORDION
   ================================================================ */
.assumptions-section {
  max-width: 1200px;
  width: 100%;
  margin-top: 20px;
}
.assumptions-toggle {
  width: 100%;
  padding: 16px 24px;
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}
.assumptions-toggle:hover { border-color: rgba(232,184,40,0.25); }
.assumptions-toggle .arrow { transition: transform 0.3s; }
.assumptions-toggle.open .arrow { transform: rotate(180deg); }
.assumptions-toggle.open { border-radius: 10px 10px 0 0; }
.assumptions-body {
  display: none;
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 20px 24px;
}
.assumptions-body.open { display: block; }

.assumption-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}
.assumption-table th {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.assumption-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: #c0cdd8;
}
.assumption-table td:first-child { color: var(--text); font-weight: 500; }
.provenance-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 500;
}
.prov-db { background: rgba(59,130,246,0.15); color: #60a5fa; }
.prov-industry { background: rgba(156,163,175,0.15); color: #9ca3af; }
.prov-adjustable { background: rgba(232,184,40,0.15); color: var(--gold-light); }

.assumption-section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 16px 0 8px;
}

/* ================================================================
   HEADLINE CONTEXT STATS (Fund Backtest intro)
   ================================================================ */
.context-stats {
  display: flex;
  gap: 12px;
  max-width: 1200px;
  width: 100%;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.context-stat {
  flex: 1;
  min-width: 180px;
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.context-stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.context-stat-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ================================================================
   DARK METHODOLOGY STYLES (Scoring Backtest tab)
   ================================================================ */
.dark-content {
  max-width: 960px;
  width: 100%;
}

.dark-content h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 400;
  color: var(--text);
  border-bottom: none;
  margin-bottom: 0.25rem;
}

.dark-content h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--gold);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(232,184,40,0.2);
}

.dark-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--teal);
  margin-top: 28px;
  margin-bottom: 12px;
}

.dark-content h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 8px;
}

.dark-content p {
  font-size: 16px;
  color: #c0cdd8;
  line-height: 1.7;
  margin-bottom: 12px;
}

.dark-content ul, .dark-content ol {
  font-size: 16px;
  color: #c0cdd8;
  line-height: 1.7;
  padding-left: 24px;
  margin-bottom: 12px;
}

.dark-content li {
  margin-bottom: 6px;
}

.dark-content strong {
  color: var(--text);
}

.dark-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* Opportunity 8-stat grid (About page) */
.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0 24px;
}
.opp-stat {
  padding: 20px 12px;
  text-align: center;
  background: var(--navy-mid);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.opp-stat:nth-child(4n) { border-right: none; }
.opp-stat:nth-child(n+5) { border-bottom: none; }
.opp-value {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.opp-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

/* Dark hero banner */
.dark-hero-banner {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}
.dark-hero-stat {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
  background: var(--navy-mid);
  border-right: 1px solid var(--line);
}
.dark-hero-stat:last-child { border-right: none; }
.dark-hero-value {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.dark-hero-label {
  font-size: 12px;
  color: var(--muted);
}

/* Dark callout box */
.dark-callout {
  background: rgba(232,184,40,0.06);
  border: 1px solid rgba(232,184,40,0.2);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}
.dark-callout p {
  margin: 0;
  font-size: 14px;
  color: #c0cdd8;
  line-height: 1.6;
}

/* Dark tables (tier tables, AUC, features) */
.dark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}
.dark-table thead th {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  text-align: right;
}
.dark-table thead th:first-child { text-align: left; }
.dark-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  text-align: right;
  color: #c0cdd8;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
}
.dark-table tbody td:first-child {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  color: var(--text);
}
.dark-table tr.top-row td {
  color: var(--gold-light);
}
.dark-table .teal-accent {
  color: var(--teal);
  font-weight: 600;
}
.dark-table tr.baseline-row td {
  color: var(--muted);
  font-style: italic;
}

/* Definitions table */
.dark-def-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}
.dark-def-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: top;
}
.dark-def-table td:first-child {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
  width: 120px;
}
.dark-def-table td:last-child {
  color: #c0cdd8;
}

/* Chart frame (white background for PNG charts) */
.chart-frame {
  background: white;
  padding: 8px;
  border-radius: 6px;
  margin: 16px 0;
}
.chart-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.chart-frame .chart-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  padding: 4px 8px 0;
}

/* ================================================================
   DARK OVERVIEW STYLES (About tab)
   ================================================================ */
.dark-tagline {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--gold-light);
  font-style: italic;
  margin-bottom: 24px;
}

.dark-mission-statement {
  margin: 2.5rem 0;
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
}

.dark-mission-statement p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #d4d4d4;
  margin-bottom: 1.25rem;
}

.dark-mission-statement em {
  color: #e8a838;
  font-style: italic;
}

.dark-mission-statement strong {
  color: #ffffff;
}

/* Terms grid */
.dark-terms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0;
}
.dark-terms-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.dark-terms-row:last-child { border-bottom: none; }
.dark-terms-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.dark-terms-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

/* Pipeline cards */
.dark-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.dark-pipeline-card {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.dark-pipeline-card h4 {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--text);
  margin: 0 0 4px;
}
.dark-pipeline-stage {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.dark-pipeline-card p:last-child {
  font-size: 13px;
  color: #a0b0c0;
  line-height: 1.5;
  margin: 0;
}

/* Manager card */
.dark-manager-card {
  background: var(--navy-mid);
  border: 1px solid rgba(232,184,40,0.15);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 16px 0;
}
.dark-manager-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dark-manager-card li {
  padding: 6px 0;
  font-size: 15px;
  color: #c0cdd8;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.dark-manager-card li:last-child { border-bottom: none; }

/* Fund deck button */
.dark-deck-btn {
  display: inline-block;
  padding: 14px 28px;
  background: rgba(232,184,40,0.15);
  border: 1px solid rgba(232,184,40,0.3);
  border-radius: 8px;
  color: var(--gold-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 16px;
}
.dark-deck-btn:hover {
  background: rgba(232,184,40,0.25);
  border-color: rgba(232,184,40,0.5);
}

/* Narrative section */
.dark-narrative {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 28px;
  margin: 24px 0;
}
.dark-narrative h3 {
  margin-top: 0;
}
.dark-narrative p {
  font-size: 14px;
  color: #b0c0d0;
  line-height: 1.7;
  margin-bottom: 8px;
}
.dark-narrative p:last-child { margin-bottom: 0; }

/* ================================================================
   FUND DETAILS: fund box + aside layout
   ================================================================ */
.fund-details-callout {
  width: 100%;
  background: var(--navy-mid);
  border: 1px solid rgba(232,184,40,0.15);
  border-radius: 10px;
  padding: 24px 28px;
  margin-top: 24px;
}
.fund-details-callout h4 {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--gold);
  margin: 0 0 16px;
}
.callout-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.callout-cols p {
  font-size: 14px;
  color: #b0c0d0;
  line-height: 1.6;
  margin: 0;
}
@media (min-width: 800px) {
  .callout-cols {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  }
}

/* ================================================================
   FUND BACKTEST: side-by-side controls + MC results
   ================================================================ */
.backtest-layout {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.backtest-layout .controls-panel {
  margin-top: 0;
}
.backtest-layout .mc-section {
  margin-top: 0;
}

@media (min-width: 1200px) {
  .backtest-layout {
    max-width: 1200px;
    flex-direction: row;
    align-items: stretch;
  }
  .backtest-layout .mc-section {
    display: flex;
    flex-direction: column;
  }
  .backtest-layout .mc-section .prob-bars-wrap {
    flex: 1;
    margin-bottom: 0;
  }
  .backtest-layout .controls-panel {
    flex: 0 0 400px;
  }
  .backtest-layout .mc-section {
    flex: 1;
    min-width: 0;
  }
  /* Widen context stats + assumptions to match */
  #tab-fund-backtest .context-stats {
    max-width: 1200px;
  }
  #tab-fund-backtest .assumptions-section {
    max-width: 1200px;
  }
}

/* ================================================================
   LEGACY FOOTER (kept for backwards compat)
   ================================================================ */
.dark-footer {
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 10px 48px;
  margin-top: 12px;
  text-align: center;
}
.dark-footer p {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.4;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: block;
  }
  .main-content {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .bar { height: 60px; padding: 0 16px; }
  .tier-row { margin: 0 5% !important; width: 90% !important; }
  .lvl-2 .bar, .lvl-3 .bar, .lvl-4 .bar, .lvl-5 .bar, .lvl-6 .bar, .lvl-7 .bar {
    margin: 0 !important; width: 100% !important;
  }
  .stats-row { flex-wrap: wrap; }
  .stat { min-width: 50%; border-bottom: 1px solid var(--line); }
  .section-label { display: none; }
  .controls-grid { grid-template-columns: 1fr; }
  .fund-toggle { flex-direction: column; }
  .fund-toggle-btn { border-right: none; border-bottom: 1px solid rgba(232,184,40,0.15); }
  .fund-toggle-btn:last-child { border-bottom: none; }
  .dark-hero-banner { flex-wrap: wrap; }
  .dark-hero-stat { min-width: 50%; border-bottom: 1px solid var(--line); }
  .context-stats { flex-direction: column; }
  .context-stat { min-width: auto; }
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   INTERACTIVE SCORING CHARTS
   ================================================================ */
.scoring-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0 1rem;
  gap: 12px;
}
.chart-stage-selector {
  display: flex;
  gap: 0;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(232,184,40,0.25);
  width: fit-content;
}
.stage-btn {
  padding: 7px 18px;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(232,184,40,0.15);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.stage-btn:last-child { border-right: none; }
.stage-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.stage-btn.active {
  background: rgba(232,184,40,0.15);
  color: var(--gold-light);
}
.dark-chart-frame {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 1.5rem;
}
.dark-chart-frame svg {
  width: 100%;
  height: auto;
}
.chart-subtitle {
  font-size: 0.85em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* ================================================================
   PORTFOLIO TAB
   ================================================================ */
.portfolio-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0;
}
.portfolio-legend {
  display: flex;
  gap: 12px;
  align-items: center;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.02em;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.portfolio-toggle {
  display: flex;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(232,184,40,0.25);
  width: fit-content;
}
.portfolio-toggle-btn {
  padding: 8px 20px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-right: 1px solid rgba(232,184,40,0.15);
}
.portfolio-toggle-btn:last-child { border-right: none; }
.portfolio-toggle-btn.active {
  background: rgba(0,210,190,0.15);
  color: var(--teal);
  font-weight: 600;
}
.portfolio-toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.portfolio-section {
  margin-bottom: 2rem;
}
.portfolio-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(232,184,40,0.15);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
}
.portfolio-section-count {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.portfolio-card {
  position: relative;
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: default;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
}
.portfolio-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232,184,40,0.12);
  border-color: rgba(232,184,40,0.25);
}
.portfolio-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.portfolio-logo img {
  background: white;
  border-radius: 8px;
  padding: 4px;
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.portfolio-fallback {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  font-weight: 400;
}
.portfolio-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.portfolio-name {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.2;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portfolio-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 500;
  line-height: 1.1;
}
.portfolio-avatars {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
}
.portfolio-avatars .founder-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--navy-light);
  margin-left: -6px;
  border: 2px solid var(--navy-mid);
  letter-spacing: -0.02em;
}
.portfolio-avatars .founder-avatar:first-child {
  margin-left: 0;
}
.portfolio-avatars .founder-avatar.ring-isef {
  background: rgba(61,184,164,0.15);
  color: var(--teal);
}
.portfolio-avatars .founder-avatar.ring-sts {
  background: rgba(232,184,40,0.12);
  color: var(--gold);
}
.portfolio-avatars .founder-avatar.ring-both {
  background: rgba(61,184,164,0.15);
  border: 1.5px solid rgba(232,184,40,0.5);
  color: var(--teal);
}
.portfolio-avatars .founder-avatar-more {
  background: var(--navy-light);
  color: var(--muted);
  font-size: 9px;
}
.badge-unicorn {
  background: rgba(232,184,40,0.15);
  color: var(--gold-light);
}
.badge-large {
  background: rgba(232,184,40,0.08);
  color: var(--gold);
}
.badge-ipo {
  background: rgba(61,184,164,0.1);
  color: var(--teal);
}
.badge-acq {
  background: rgba(136,150,171,0.08);
  color: var(--muted);
}
.badge-sector {
  background: rgba(136,150,171,0.08);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  text-transform: none;
  font-size: 10px;
  letter-spacing: 0;
}

/* Company Detail Overlay */
.company-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 14, 28, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.company-detail-panel {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.detail-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.detail-close:hover { color: var(--text); }
.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.5rem;
}
.detail-logo {
  flex-shrink: 0;
}
.detail-logo-img {
  width: 56px; height: 56px;
  background: white;
  border-radius: 10px;
  padding: 8px;
  object-fit: contain;
}
.detail-logo-fallback {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
}
.detail-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-name {
  margin: 0;
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--text);
}
.detail-sector {
  font-size: 0.8rem;
  color: var(--teal);
  font-family: 'DM Mono', monospace;
}
.detail-status {
  font-size: 0.75rem;
  color: var(--muted);
}
.detail-stats {
  display: flex;
  gap: 1px;
  background: var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.detail-stat {
  flex: 1;
  background: var(--navy);
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detail-stat-val {
  color: var(--gold-light);
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
}
.detail-stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-section {
  margin-bottom: 1.25rem;
}
.detail-section h3 {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px 0;
}
.detail-founders {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.detail-founders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-founder-card {
  background: var(--navy);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.detail-founder-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.detail-founder-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-light);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 2px;
  border: 2px solid transparent;
}
.detail-founder-avatar.ring-isef {
  background: rgba(61,184,164,0.15);
  color: var(--teal);
}
.detail-founder-avatar.ring-sts {
  background: rgba(232,184,40,0.12);
  color: var(--gold);
}
.detail-founder-avatar.ring-both {
  background: rgba(61,184,164,0.15);
  border: 1.5px solid rgba(232,184,40,0.5);
  color: var(--teal);
}
.detail-founder-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.detail-founder-name {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}
.detail-founder-comps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.detail-comp-tag {
  font-size: 0.72rem;
  font-family: 'DM Mono', monospace;
  background: rgba(61,184,164,0.15);
  color: var(--teal);
  padding: 2px 7px;
  border-radius: 3px;
}
.detail-comp-tag.comp-sts {
  background: rgba(232,184,40,0.15);
  color: var(--gold-light);
}
.detail-founder-awards {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.detail-award-tag {
  font-size: 0.72rem;
  font-family: 'DM Mono', monospace;
  background: rgba(232,184,40,0.15);
  color: var(--gold-light);
  padding: 2px 7px;
  border-radius: 3px;
}
.detail-founder-school {
  font-size: 0.75rem;
  color: var(--muted);
}
.detail-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.detail-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.detail-link {
  color: var(--teal);
  text-decoration: none;
  font-size: 0.8rem;
}
.detail-link:hover { text-decoration: underline; }
.portfolio-card { cursor: pointer; }

/* ================================================================
   PIPELINE TAB
   ================================================================ */
/* Pipeline badges */
.pipeline-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  line-height: 1.2;
}
.pipeline-badge-t1 {
  background: rgba(232,184,40,0.18);
  color: var(--gold-light);
}
.pipeline-badge-t2 {
  background: rgba(61,184,164,0.12);
  color: var(--teal);
}
/* Pipeline card avatar (score circle with competition ring) */
.pipeline-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-light);
  border: 2px solid transparent;
}
.pipeline-avatar.ring-isef {
  background: rgba(61,184,164,0.15);
  border-color: var(--teal);
}
.pipeline-avatar.ring-sts {
  background: rgba(232,184,40,0.12);
  border-color: var(--gold);
}
.pipeline-avatar.ring-both {
  background: rgba(61,184,164,0.15);
  border: 2px solid var(--gold);
}
.pipeline-avatar-score {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
/* Pipeline card layout overrides */
.pipeline-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.2;
}
.pipeline-card-stage {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
}
.pipeline-card-check {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Assumption reference indicators */
.asm-ref {
  font-size: 10px;
  color: rgba(136,150,171,0.4);
  cursor: pointer;
  vertical-align: super;
  margin-left: 1px;
  transition: color 0.15s;
}
.asm-ref:hover {
  color: var(--teal);
}
.asm-highlight {
  background: rgba(0,210,190,0.08);
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background 0.6s;
}

/* ================================================================
   FOOTER (public site)
   ================================================================ */
.site-footer {
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 24px 48px 16px;
  margin-top: 24px;
}
.footer-cols {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-col { flex: 1; min-width: 200px; }
.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  text-align: right;
}
.footer-col-links a {
  color: var(--teal);
  text-decoration: none;
  font-size: 13px;
}
.footer-col-links a:hover { text-decoration: underline; }
.footer-newsletter-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.footer-copy {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 16px;
}

/* ================================================================
   NEWSLETTER FORMS
   ================================================================ */
.newsletter-inline {
  text-align: center;
  padding: 20px 0;
  margin-top: 16px;
}
.newsletter-inline-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 360px;
}
.newsletter-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--navy);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}
.newsletter-input:focus {
  outline: none;
  border-color: var(--teal);
}
.newsletter-btn {
  padding: 8px 16px;
  background: rgba(61,184,164,0.15);
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.newsletter-btn:hover {
  background: rgba(61,184,164,0.25);
}
.newsletter-msg {
  font-size: 12px;
  margin-top: 8px;
  color: var(--teal);
}

/* ================================================================
   SIDEBAR INVEST CTA
   ================================================================ */
.sidebar-cta {
  padding: 0 20px;
  margin-top: 12px;
}
.sidebar-invest-link {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: rgba(232,184,40,0.12);
  border: 1px solid rgba(232,184,40,0.3);
  border-radius: 8px;
  color: var(--gold-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.sidebar-invest-link:hover {
  background: rgba(232,184,40,0.2);
}

/* ================================================================
   DECILE PRO CTA BUTTON (gold variant)
   ================================================================ */
.dark-deck-btn-gold {
  background: rgba(232,184,40,0.15) !important;
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
}
.dark-deck-btn-gold:hover {
  background: rgba(232,184,40,0.25) !important;
}

/* ================================================================
   BENCHMARK TABLE
   ================================================================ */
.benchmark-table {
  max-width: 600px;
}

/* ================================================================
   GATED BLUR OVERLAY (Fund Returns)
   ================================================================ */
.gated-section {
  position: relative;
}
.gated-blur-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(11,18,32,0.2) 0%, rgba(11,18,32,0.85) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.gated-blur-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.gated-blur-overlay.hidden {
  display: none;
}
.gate-content {
  text-align: center;
  max-width: 400px;
  padding: 32px;
}
.gate-content h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 400;
}
.gate-content p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.gate-newsletter-fallback {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.gate-newsletter-fallback p {
  font-size: 12px;
  margin-bottom: 8px;
}

/* ================================================================
   LINKEDIN AUTH BUTTON
   ================================================================ */
.linkedin-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #0A66C2;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.linkedin-auth-btn:hover {
  background: #004182;
}
.linkedin-auth-btn svg {
  flex-shrink: 0;
}

/* ================================================================
   PIPELINE DETAIL POPUP
   ================================================================ */
.pipeline-detail-panel {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.pipeline-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.25rem;
}
.pipeline-detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.pipeline-detail-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pipeline-detail-title h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  margin: 0;
  color: var(--text);
  font-weight: 400;
}
.pipeline-detail-teaser {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.pipeline-detail-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.25rem 0;
}
.pipeline-gate-section {
  text-align: center;
  padding: 8px 0;
}
.pipeline-gate-section p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.pipeline-post-auth {
  text-align: center;
  padding: 8px 0;
}
.pipeline-post-auth h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--teal);
  margin-bottom: 12px;
}
.calendly-embed {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-height: 400px;
}

/* ================================================================
   ONBOARDING FORM
   ================================================================ */
.onboard-panel {
  max-width: 400px;
}
.onboard-field {
  margin-bottom: 14px;
}
.onboard-field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  font-family: 'DM Mono', monospace;
}
.onboard-field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--navy);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
}
.onboard-field input[type="text"]:focus {
  outline: none;
  border-color: var(--teal);
}
.onboard-field input[type="checkbox"] {
  margin-right: 6px;
}

/* ================================================================
   FACTS & METHODOLOGY TAB
   ================================================================ */
.facts-content {
  max-width: 800px;
}
.facts-section {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.facts-section:last-of-type {
  border-bottom: none;
}
.facts-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 400;
}
.facts-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}
.sec-disclaimer {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
}
.sec-disclaimer p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 8px;
}
.sec-disclaimer p:last-child {
  margin-bottom: 0;
}

/* ================================================================
   SHARE SIMULATION BUTTON + TOAST
   ================================================================ */
.share-sim-wrap {
  text-align: center;
  margin-top: 20px;
  position: relative;
}
.share-sim-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.share-sim-btn:hover {
  background: var(--gold);
  color: var(--navy);
}
.share-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--teal);
  color: var(--navy);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
}
.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   FOOTER SEC DISCLAIMER
   ================================================================ */
.footer-sec-disclaimer {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  text-align: center;
  max-width: 600px;
  margin: 8px auto 0;
  line-height: 1.5;
}
