/* ==========================================================================
   Section E: Quantitative Results & Empirical Benchmark Charts
   ========================================================================== */

/* Model Segmented Switcher */
.segmented {
  display: inline-flex;
  background: var(--bg-surface-sunken);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-pixel-sm);
  padding: 4px;
  gap: 4px;
}

.segmented button {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.segmented button[aria-pressed="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
  box-shadow: 2px 2px 0px var(--border-dark);
}

/* Result Summary Card */
.result-summary {
  background: var(--bg-surface);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-pixel-md);
  padding: 20px 24px;
  margin: 24px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-left: 8px solid var(--accent-green);
}

.result-summary p {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.result-summary p b {
  font-family: var(--font-mono);
  color: var(--accent-green);
  font-size: 1.15rem;
}

.result-summary strong {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Chart Toolbar */
.chart-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-medium);
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.swatch {
  width: 12px;
  height: 12px;
  background-color: var(--color);
  border: 1px solid var(--border-dark);
  display: inline-block;
}

.axis-description {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: center;
}

/* 4 Benchmark Chart Grid - Perfectly Centered */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto 24px;
  justify-content: center;
  align-items: stretch;
  max-width: 1040px;
  width: 100%;
}

.chart-group {
  background: var(--bg-surface);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-pixel-sm);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chart-group:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pixel-md);
}

.chart-group h3 {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  min-height: 2.8em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
}

.chart-group h3 small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
  line-height: 1.3;
}

.benchmark-plot {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  overflow: visible;
}

.plot-tick line {
  stroke: var(--border-subtle);
  stroke-dasharray: 2 2;
}

.plot-tick text {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-muted);
}

.plot-axis {
  stroke: var(--border-dark);
  stroke-width: 1.5;
  fill: none;
}

.plot-bar rect {
  stroke: var(--border-dark);
  stroke-width: 1;
  transition: fill-opacity 0.15s ease;
  cursor: pointer;
}

.plot-bar:hover rect {
  fill-opacity: 1;
}

.plot-bar text {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  fill: var(--text-primary);
}

.plot-strategy-label {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  fill: var(--text-muted);
  transition: fill 0.15s ease;
}

.plot-bar:hover .plot-strategy-label {
  fill: var(--text-primary);
}

.plot-range {
  font-family: var(--font-mono);
  font-size: 8.5px;
  fill: var(--text-muted);
}

.chart-gain {
  font-family: var(--font-mono);
  font-size: clamp(0.6875rem, 0.72vw, 0.75rem);
  font-weight: 700;
  color: var(--accent-green);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-medium);
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

.chart-gain.neutral {
  color: var(--text-secondary);
}

/* Expandable Results Table */
.table-details {
  background: var(--bg-surface);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-pixel-md);
  margin: 28px 0 32px;
  padding: 16px 20px;
}

.table-details summary {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--accent-orange);
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-details summary:hover {
  text-decoration: underline;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 16px;
  padding-bottom: 8px;
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: right;
}

.table-scroll th,
.table-scroll td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.table-scroll thead th {
  background: var(--bg-surface-sunken);
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 2px solid var(--border-dark);
}

.table-scroll tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

.table-scroll tr:hover td {
  background: var(--bg-canvas-subtle);
}

.table-scroll .group-row th {
  background: var(--bg-canvas-subtle);
  color: var(--accent-orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  padding-top: 16px;
  border-top: 1px solid var(--border-medium);
}

.table-scroll .ours-row {
  background: #F0FDF4;
  font-weight: 700;
}

.table-scroll .ours-row th {
  color: var(--accent-green);
}

.table-scroll .std {
  font-size: 0.75em;
  color: var(--text-muted);
  margin-left: 4px;
}

@media (max-width: 1024px) {
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 580px) {
  .chart-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* 3 Pillars of Empirical Proof */
.proof-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0 24px;
}

.proof-pillar {
  background: var(--bg-surface);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-pixel-sm);
  padding: 20px 18px;
  border-top: 4px solid var(--accent-orange);
}

.proof-pillar h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.proof-pillar p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 860px) {
  .proof-pillars {
    grid-template-columns: 1fr;
  }
}

