/* Auripath opt-in benchmarks infographic – vertical, CSS-only interactive layout */

.ap-bench-wrap {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 1.75rem;
  border-radius: 1.5rem;
  background: #eff6ff;
  color: #0f172a;
  border: 1px solid #dbeafe;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ap-bench-heading {
  font-size: 1.45rem;
  margin: 0 0 0.75rem;
  color: #0f172a;
}

.ap-bench-intro {
  font-size: 0.94rem;
  color: #4b5563;
  margin: 0 0 1.1rem;
}

/* Scenario controls */

.ap-bench-controls {
  margin-top: 0.2rem;
  position: relative;
}

/* Hide radio inputs but keep them accessible */
.ap-bench-scenario-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ap-bench-scenarios {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.ap-bench-scenarios-label {
  font-size: 0.82rem;
  color: #374151;
  margin-right: 0.35rem;
}

.ap-bench-scenario-pill {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 0.25rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: #111827;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Active pill states via radio :checked */

#ap-bench-scenario-conservative:checked ~ .ap-bench-scenarios label[for="ap-bench-scenario-conservative"],
#ap-bench-scenario-typical:checked      ~ .ap-bench-scenarios label[for="ap-bench-scenario-typical"],
#ap-bench-scenario-optimistic:checked   ~ .ap-bench-scenarios label[for="ap-bench-scenario-optimistic"] {
  background: #2563eb;
  color: #f9fafb;
  border-color: #1d4ed8;
}

.ap-bench-scenario-pill:hover {
  background: #e5e7eb;
}

/* Scenario explanatory note */

.ap-bench-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

/* Panels */

.ap-bench-panels {
  margin-top: 0.9rem;
}

/* Hide all panels by default */
.ap-bench-panel {
  display: none;
}

/* Show only the selected scenario panel */
#ap-bench-scenario-conservative:checked ~ .ap-bench-panels [data-scenario-panel="conservative"],
#ap-bench-scenario-typical:checked      ~ .ap-bench-panels [data-scenario-panel="typical"],
#ap-bench-scenario-optimistic:checked   ~ .ap-bench-panels [data-scenario-panel="optimistic"] {
  display: block;
}

.ap-bench-card {
  margin-top: 0.8rem;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.ap-bench-card + .ap-bench-card {
  margin-top: 0.85rem;
}

.ap-bench-subheading {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  color: #0f172a;
}

.ap-bench-chart-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0 0 0.7rem;
}

/* Summary row above chart */

.ap-bench-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.ap-bench-summary {
  padding: 0.5rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.ap-bench-summary-format {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 0.1rem;
}

.ap-bench-summary-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
}

.ap-bench-summary-caption {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #6b7280;
}

/* Chart */

.ap-bench-chart {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: flex-end;
}

.ap-bench-axis-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px;
  font-size: 0.75rem;
  color: #6b7280;
}

.ap-bench-axis-y span {
  position: relative;
}

.ap-bench-axis-y span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2.4rem;
  right: -0.5rem;
  height: 1px;
  background: #e5e7eb;
  opacity: 0.6;
}

/* Bars */

.ap-bench-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: flex-end;
  padding: 0 0.3rem;
}

.ap-bench-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.ap-bench-bar-inner {
  width: 100%;
  height: 200px;
  border-radius: 0.9rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 0 0.6rem;
}

.ap-bench-bar-fill {
  width: 100%;
  border-radius: 0.75rem 0.75rem 0.3rem 0.3rem;
  background: #2563eb;
}

/* Per-format colours */
.ap-bench-bar-fill-pdf {
  background: #2563eb;
}

.ap-bench-bar-fill-audio {
  background: #22c55e;
}

.ap-bench-bar-fill-combo {
  background: #8b5cf6;
}

/* Legend */

.ap-bench-legend {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.8rem;
  color: #374151;
}

.ap-bench-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ap-bench-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  display: inline-block;
}

.ap-bench-dot-pdf {
  background: #2563eb;
}

.ap-bench-dot-audio {
  background: #22c55e;
}

.ap-bench-dot-combo {
  background: #8b5cf6;
}

/* Table */

.ap-bench-card-table .ap-bench-subheading {
  margin-bottom: 0.6rem;
}

.ap-bench-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.ap-bench-table th,
.ap-bench-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.ap-bench-table thead th {
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
}

/* Footnote */

.ap-bench-footnote {
  margin-top: 0.95rem;
  font-size: 0.78rem;
  color: #6b7280;
}

/* Responsive */

@media (max-width: 640px) {
  .ap-bench-wrap {
    margin: 1.8rem auto;
    padding: 1.3rem 1.1rem;
  }
  .ap-bench-summary-row {
    grid-template-columns: 1fr;
  }
  .ap-bench-chart {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ap-bench-bars {
    gap: 0.6rem;
  }
}
