/* Qorinix Benchmark page — fancy independent leaderboard */

.bench-body {
  background: #0a0a0c;
  color: var(--text);
}

.bench-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 540px at 80% -20%, rgba(255, 77, 0, 0.18), transparent 65%),
    radial-gradient(700px 480px at 0% 110%, rgba(85, 215, 255, 0.10), transparent 65%),
    linear-gradient(180deg, rgba(15, 12, 10, 0.98), rgba(8, 7, 6, 1));
}

.bench-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 28px);
  pointer-events: none;
  mask-image: radial-gradient(circle at 60% 40%, rgba(0, 0, 0, 1), transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 60% 40%, rgba(0, 0, 0, 1), transparent 75%);
}

.bench-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.bench-hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #ffd178 60%, #ff4d00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bench-lede {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
}

.bench-lede strong {
  color: var(--text);
}

.bench-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  background: var(--line);
}

.bench-hero-stats article {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: rgba(12, 10, 8, 0.92);
}

.bench-hero-stats span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bench-hero-stats strong {
  font-family: var(--sans);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.bench-hero-stats strong em {
  font-style: normal;
  font-size: 0.5em;
  font-weight: 600;
  color: var(--dim);
  margin-left: 6px;
}

.bench-hero-stats small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.bench-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bench-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 48px;
}

.bench-section {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--line);
}

.bench-section:last-of-type {
  border-bottom: 0;
}

.bench-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.bench-head h2 {
  margin: 6px 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.01em;
}

.bench-head p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.bench-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.bench-pill {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bench-pill:hover {
  color: var(--text);
}

.bench-pill.is-active {
  background: var(--orange);
  color: #15110a;
  font-weight: 700;
}

/* Pareto frontier plot */
.bench-plot-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
}

.bench-plot-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(600px 360px at 80% 0%, rgba(255, 77, 0, 0.06), transparent 60%),
    rgba(11, 10, 12, 0.86);
}

.bench-plot {
  position: relative;
  height: 440px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 60%),
    rgba(8, 8, 10, 0.96);
  overflow: hidden;
}

.bench-plot-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to top, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 25% 25%;
  pointer-events: none;
}

.bench-plot-axis {
  position: absolute;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bench-plot-axis.x {
  left: 18px;
  bottom: 8px;
}

.bench-plot-axis.y {
  left: 12px;
  top: 12px;
  color: var(--orange);
}

.bench-plot-frontier {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bench-plot-points {
  position: absolute;
  inset: 0;
}

.bench-point {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.95);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
  transform: translate(-50%, 50%);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bench-point::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(85, 215, 255, 0.6);
}

.bench-point.is-qorinix {
  border-color: var(--orange);
  background: linear-gradient(135deg, rgba(255, 77, 0, 0.18), rgba(255, 77, 0, 0.04));
  color: var(--text);
  font-weight: 700;
}

.bench-point.is-qorinix::before {
  background: radial-gradient(circle at 30% 30%, #fff5e6, var(--orange) 60%, #6b2900);
  box-shadow: 0 0 14px rgba(255, 130, 50, 0.85);
}

.bench-point.is-frontier {
  box-shadow: 0 0 0 2px rgba(255, 77, 0, 0.18), 0 8px 22px rgba(0, 0, 0, 0.4);
}

.bench-point:hover,
.bench-point:focus-visible {
  transform: translate(-50%, 50%) scale(1.06);
  border-color: var(--orange);
  outline: none;
  z-index: 3;
}

.bench-point-label {
  font-family: var(--mono);
  font-size: 10px;
}

.bench-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 14px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bench-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bench-legend-sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
}

.bench-legend-sw--qx {
  background: radial-gradient(circle at 30% 30%, #fff5e6, var(--orange) 60%, #6b2900);
}

.bench-legend-sw--frontier {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--orange), transparent 70%, var(--orange));
  box-shadow: 0 0 0 1px rgba(255, 77, 0, 0.2);
}

.bench-callouts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bench-callout {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 10, 8, 0.85);
}

.bench-callout.is-primary {
  border-color: var(--orange);
  background:
    linear-gradient(135deg, rgba(255, 77, 0, 0.12), transparent 65%),
    rgba(20, 12, 6, 0.95);
  box-shadow: 0 12px 36px rgba(255, 77, 0, 0.10);
}

.bench-callout-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(85, 215, 255, 0.16);
  border: 1px solid rgba(85, 215, 255, 0.35);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bench-callout.is-primary .bench-callout-tag {
  background: var(--orange);
  border-color: var(--orange);
  color: #15110a;
  font-weight: 700;
}

.bench-callout h3 {
  margin: 10px 0 6px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.bench-callout p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bench-callout ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.bench-callout ul li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
}

.bench-callout ul strong {
  color: var(--dim);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bench-callout ul span {
  color: var(--text);
  font-weight: 700;
}

/* Bar plots */
.bench-bar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bench-bar-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 10, 12, 0.86);
}

.bench-bar-card h3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.bench-bar-card h3 span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bench-bars {
  display: grid;
  gap: 6px;
}

.bench-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.bench-bar-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bench-bar-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.bench-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #1aa2ff);
  transition: width 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bench-bar-row.is-qorinix .bench-bar-label {
  color: var(--orange);
  font-weight: 700;
}

.bench-bar-row.is-qorinix .bench-bar-fill {
  background: linear-gradient(90deg, var(--orange), #ffd178);
}

.bench-bar-row.is-best .bench-bar-fill {
  box-shadow: 0 0 0 1px rgba(255, 209, 120, 0.5);
}

.bench-bar-value {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  font-weight: 700;
}

.bench-bar-row.is-qorinix .bench-bar-value {
  color: var(--orange);
}

/* Leaderboard table */
.bench-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 10, 12, 0.86);
}

.bench-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13px;
}

.bench-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 18, 16, 0.96);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.bench-table thead th:hover {
  color: var(--text);
}

.bench-table thead th.is-sorted {
  color: var(--orange);
}

.bench-table thead th.is-sorted::after {
  content: " ↓";
  font-size: 10px;
}

.bench-table thead th.is-sorted[aria-sort="ascending"]::after {
  content: " ↑";
}

.bench-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
}

.bench-table tbody tr.is-qorinix {
  background: rgba(255, 77, 0, 0.06);
}

.bench-table tbody tr.is-qorinix:hover {
  background: rgba(255, 77, 0, 0.10);
}

.bench-table tbody tr.is-leader {
  box-shadow: inset 4px 0 0 var(--orange);
}

.bench-table tbody tr.is-qorinix td {
  color: var(--text);
}

.bench-cell-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--sans);
}

.bench-cell-label strong {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
}

.bench-cell-label small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bench-tag-qx {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--orange);
  color: #15110a;
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: max-content;
}

.bench-value-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bench-value-bar {
  display: inline-block;
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.bench-value-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

.bench-table tbody tr.is-qorinix .bench-value-bar > span {
  background: linear-gradient(90deg, var(--orange), #ffd178);
}

.bench-value-cell b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

/* Category cards */
.bench-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bench-category-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 10, 12, 0.86);
}

.bench-category-card.is-qorinix {
  border-color: rgba(255, 77, 0, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 77, 0, 0.10), transparent 65%),
    rgba(15, 10, 8, 0.92);
}

.bench-category-card .eyebrow {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.bench-category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.bench-category-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.bench-category-card small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Methodology */
.bench-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
}

.bench-method-card {
  padding: 18px 20px;
  background: rgba(11, 10, 12, 0.86);
}

.bench-method-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
}

.bench-method-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* CTA */
.bench-cta {
  margin: 24px 0 0;
  padding: 36px 32px;
  border-radius: 16px;
  background:
    radial-gradient(600px 320px at 90% -10%, rgba(255, 77, 0, 0.20), transparent 60%),
    radial-gradient(600px 320px at 0% 110%, rgba(85, 215, 255, 0.10), transparent 60%),
    rgba(15, 12, 10, 0.95);
  border: 1px solid var(--line);
}

.bench-cta-inner {
  max-width: 720px;
}

.bench-cta h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.2vw, 34px);
  letter-spacing: -0.01em;
}

.bench-cta p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
}

.bench-cta div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .bench-plot-grid {
    grid-template-columns: 1fr;
  }
  .bench-method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .bench-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .bench-bar-grid { grid-template-columns: 1fr; }
  .bench-bar-row { grid-template-columns: 96px 1fr 80px; gap: 8px; }
  .bench-category-grid { grid-template-columns: 1fr; }
  .bench-method-grid { grid-template-columns: 1fr; }
  .bench-plot { height: 360px; }
}
