/* Homepage comparison: layout, controls, metrics and throughput flow. */
section:has(> #pseudopath-benchmark) > h1 {
  max-width: none;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -.055em;
  margin-bottom: .85rem;
  margin: .2rem 0 .5rem;
}
.pseudopath-benchmark {
  margin: 1rem 0 2rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--color-background-border);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--color-background-secondary), var(--color-background-primary));
  --pseudopath-loss: #995521;
}
.pseudopath-benchmark-header h2 {
  margin: 0 0 .3rem;
  font-size: 1rem;
}
.pseudopath-benchmark-header p {
  margin: 0;
  color: var(--color-foreground-secondary);
  font-size: .85rem;
}
.pseudopath-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: .55rem 0 .8rem;
}
.pseudopath-stat {
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.pseudopath-stat-value {
  color: var(--color-brand-primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: 3.6rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -.065em;
}
.pseudopath-stat-recall {
  font-size: 2.2rem;
}
.pseudopath-stat-label {
  margin-top: .1rem;
  font-size: .72rem;
  color: var(--color-foreground-secondary);
}
.pseudopath-controls {
  display: grid;
  gap: .8rem;
  margin-bottom: .8rem;
  grid-template-columns: 1.15fr 1fr;
}
.pseudopath-control {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.pseudopath-control legend {
  padding: 0;
  margin-bottom: .25rem;
  font-size: .7rem;
  font-weight: 650;
  color: var(--color-foreground-secondary);
}
.pseudopath-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.pseudopath-choice {
  position: relative;
  cursor: pointer;
  flex: 1 1 auto;
}
.pseudopath-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pseudopath-choice span {
  display: block;
  padding: .45rem .5rem;
  border: 1px solid var(--color-background-border);
  border-radius: 9px;
  color: var(--color-foreground-primary);
  background: var(--color-background-primary);
  text-align: center;
  font-size: .7rem;
  font-weight: 550;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.pseudopath-choice:hover span {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgb(75 70 166 / 12%);
}
.pseudopath-choice input:checked + span {
  background: #4b46a6;
  border-color: #4b46a6;
  color: #fff;
  box-shadow: 0 3px 10px rgb(75 70 166 / 18%);
}
.pseudopath-choice input:focus-visible + span {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 3px;
}
.pseudopath-panels {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: .7rem;
}
.pseudopath-panel {
  display: grid;
  grid-template-rows: subgrid;
  gap: 0;
  padding: .55rem 1rem;
  border: 1px solid var(--color-background-border);
  border-radius: 16px;
  min-width: 0;
  background: var(--color-background-primary);
}
.pseudopath-baseline {
  grid-column: 1;
}
.pseudopath-candidate {
  grid-column: 2;
  color: #fff;
  background: linear-gradient(145deg, #5d50bd, #383480);
  border-color: transparent;
  box-shadow: 0 12px 28px rgb(54 45 128 / 20%);
}
.pseudopath-benchmark .pseudopath-panel h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}
.pseudopath-candidate h3 {
  color: #fff;
}
.pseudopath-panel-description {
  margin: .2rem 0 .3rem;
  min-height: 0;
  font-size: .72rem;
  color: var(--color-foreground-secondary);
}
.pseudopath-candidate .pseudopath-panel-description {
  color: #ddd9ff;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .5rem;
}
.pseudopath-pipeline-label {
  display: block;
  margin-top: .15rem;
  font-size: .65rem;
  color: #ddd9ff;
}
.pseudopath-model-name { font-weight: 650; }
.pseudopath-routing-badge {
  padding: .1rem .4rem;
  border-radius: 5px;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font-size: .65rem;
  line-height: 1.4;
}
.pseudopath-metric {
  line-height: 1.35;
  margin-top: .35rem;
  position: relative;
}
.pseudopath-metric-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .5rem;
  font-size: .73rem;
}
.pseudopath-metric-value {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pseudopath-bar-track {
  height: .4rem;
  background: var(--color-background-secondary);
  border-radius: 20px;
  margin-top: .3rem;
  overflow: hidden;
}
.pseudopath-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #9290a6;
  transition: width var(--pseudopath-duration, 650ms) cubic-bezier(.22, 1, .36, 1);
}
.pseudopath-candidate .pseudopath-bar-track {
  background: rgb(255 255 255 / 14%);
}
.pseudopath-candidate .pseudopath-bar {
  background: linear-gradient(90deg, #beb4ff, #eeebff);
  box-shadow: 0 0 10px rgb(225 218 255 / 25%);
}
.pseudopath-delta {
  line-height: 1.3;
  margin-top: .15rem;
  color: #e8e4ff;
  font-size: .7rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pseudopath-candidate .pseudopath-delta[data-direction="lower"] {
  color: #ffd9a8;
}
.pseudopath-baseline-delta {
  visibility: hidden;
}
.pseudopath-benchmark-note, .pseudopath-method {
  font-size: .72rem;
  color: var(--color-foreground-secondary);
}
.content .pseudopath-method {
  margin: .35rem 0 0;
  line-height: 1.5;
}
.pseudopath-method summary {
  cursor: pointer;
  color: var(--color-brand-content);
}
.content .pseudopath-method-caption {
  margin: .35rem 0 0;
  line-height: 1.5;
}
.pseudopath-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.pseudopath-benchmark[data-ready="true"] {
  animation: pseudopath-reveal 600ms ease both;
}
body:has(#pseudopath-benchmark) .main {
  flex-grow: 1;
  max-width: 68rem;
}
body:has(#pseudopath-benchmark) .content {
  width: auto;
  max-width: none;
}
section:has(> #pseudopath-benchmark) > h1 + p {
  margin: 0 0 1rem;
  font-size: .95rem;
}
.pseudopath-benchmark-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .2rem 1rem;
}
.pseudopath-benchmark-header > p:empty {
  display: none;
}
.pseudopath-benchmark-header #pseudopath-dataset {
  grid-column: 2;
  grid-row: 1 / 3;
}
#pseudopath-dataset legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#pseudopath-dataset .pseudopath-choice span {
  font-size: .67rem;
  padding: .4rem .6rem;
}
.pseudopath-benchmark-note {
  margin: .6rem 0 .3rem;
}
.pseudopath-metric[data-metric="speed"] {
  margin: .6rem 0 .3rem;
}
.pseudopath-metric[data-metric="speed"] .pseudopath-metric-value {
  font-size: 1.05rem;
}
.pseudopath-metric[data-metric="speed"] .pseudopath-bar-track {
  height: 1.4rem;
  border-radius: 6px;
}
.pseudopath-metric[data-metric="speed"] .pseudopath-bar {
  border-radius: 6px;
}
.pseudopath-metric[data-metric="speed"] .pseudopath-delta {
  line-height: 1.3;
  font-size: 1rem;
}
.pseudopath-candidate .pseudopath-metric[data-metric="speed"] .pseudopath-bar {
  background: linear-gradient(90deg, #9aa1ff, #b3f0ff);
}
.pseudopath-speed-flow {
  position: relative;
  overflow: hidden;
}
.pseudopath-particles {
  position: absolute;
  left: calc(-1 * var(--pseudopath-particle-tile));
  right: 0;
  top: 0;
  bottom: 0;
  background-repeat: repeat-x;
  background-size: var(--pseudopath-particle-tile) 100%;
  opacity: var(--pseudopath-particle-opacity, .25);
  transition: opacity var(--pseudopath-duration, 650ms) ease;
  animation: pseudopath-particle-flow var(--pseudopath-flow-duration) linear infinite;
}
@keyframes pseudopath-reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pseudopath-particle-flow { from { transform: translateX(0); } to { transform: translateX(var(--pseudopath-particle-tile)); } }
@media (max-width: 700px) {
  .pseudopath-benchmark-header { grid-template-columns: 1fr; gap: .5rem; }
  .pseudopath-benchmark-header #pseudopath-dataset { grid-column: 1; grid-row: auto; }
  .pseudopath-controls { grid-template-columns: 1fr; gap: .5rem; }
  .pseudopath-stat-value { font-size: 2.8rem; }
  .pseudopath-stat-recall { font-size: 1.75rem; }
  .pseudopath-benchmark { padding: .85rem; border-radius: 18px; }
  .pseudopath-panel { padding: .7rem; }
}
@media (max-width: 480px) {
  .pseudopath-benchmark { margin-inline: -.5rem; }
  .pseudopath-benchmark .pseudopath-panel h3 { font-size: 1rem; }
  .pseudopath-panel-description { min-height: 2rem; font-size: .67rem; }
  .pseudopath-metric-heading { font-size: .66rem; display: grid; justify-content: start; }
  .pseudopath-metric[data-metric="speed"] .pseudopath-metric-value { font-size: .85rem; }
  .pseudopath-metric[data-metric="speed"] .pseudopath-bar-track { height: 1.1rem; }
  .pseudopath-choice span { font-size: .67rem; padding: .45rem .4rem; }
  .pseudopath-stat-label { font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pseudopath-benchmark[data-ready="true"], .pseudopath-particles { animation: none; }
  .pseudopath-bar, .pseudopath-choice span, .pseudopath-particles { transition: none; }
  .pseudopath-choice:hover span { transform: none; }
}
@media print {
  .pseudopath-controls, .pseudopath-method { display: none; }
  .pseudopath-particles { animation: none; }
  .pseudopath-candidate { background: #fff; color: #25263c; box-shadow: none; }
  .pseudopath-candidate h3, .pseudopath-candidate .pseudopath-panel-description, .pseudopath-candidate .pseudopath-delta { color: #25263c; }
}


/* Animated nine-position configuration slider. */
.pseudopath-route-rail { position: relative; height: 24px; margin: .2rem 0 0; }
.pseudopath-route-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 18px; clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 68%); background: var(--color-background-border); }
.pseudopath-route-fill { position: absolute; left: 0; top: 3px; width: 100%; height: 18px; clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 68%); overflow: hidden; }
.pseudopath-route-fill::before { content: ""; display: block; width: var(--pseudopath-route-progress); height: 100%; background: var(--color-brand-primary); transition: width var(--pseudopath-routing-duration, 350ms) cubic-bezier(.22, 1, .36, 1); }
.pseudopath-route-fill::after { content: ""; position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pseudopath-route-progress)) 0 0); background: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / 55%) 50%, transparent 80%); animation: pseudopath-route-light 2s linear infinite; }
.pseudopath-route-thumb { position: absolute; left: var(--pseudopath-route-progress); top: 1px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid #4b46a6; box-sizing: border-box; transform: translateX(-50%); box-shadow: 0 2px 6px rgb(75 70 166 / 25%); transition: left var(--pseudopath-routing-duration, 350ms) cubic-bezier(.22, 1, .36, 1); }
.pseudopath-route-range { position: absolute; inset: 0; width: 100%; height: 24px; margin: 0; opacity: 0; cursor: pointer; }
.pseudopath-route-rail:has(.pseudopath-route-range:focus-visible) { outline: 2px solid var(--color-brand-primary); outline-offset: 4px; border-radius: 6px; }
.pseudopath-route-ticks { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.pseudopath-route-ticks button { border: 0; padding: .2rem .2rem; border-radius: 5px; background: transparent; color: var(--color-foreground-secondary); font: inherit; font-size: .65rem; cursor: pointer; white-space: nowrap; }
.pseudopath-route-ticks button[aria-pressed="true"] { color: var(--color-brand-primary); font-weight: 700; }
.pseudopath-route-ticks button:hover { background: var(--color-background-secondary); }
.pseudopath-summary { padding: .2rem 0 .3rem; }
.pseudopath-stat-value { font-size: 3rem; }
.pseudopath-stat-recall { font-size: 2rem; }
@keyframes pseudopath-route-light { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (max-width: 480px) {
  .pseudopath-stat-value { font-size: 2.7rem; }
  .pseudopath-stat-recall { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pseudopath-route-fill::after { animation: none; }
  .pseudopath-route-fill::before, .pseudopath-route-thumb { transition: none; }
}


/* Model groups behind the configuration slider. */
.pseudopath-controls { grid-template-columns: 1fr; margin-bottom: .7rem; }
#pseudopath-configuration { position: relative; padding: .5rem 0 .35rem; margin: .15rem 0 .25rem; }
#pseudopath-configuration legend, .pseudopath-configuration-selected {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.pseudopath-model-zones { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; pointer-events: none; }
.pseudopath-model-zone { border: 0; border-radius: 8px; background: color-mix(in srgb, var(--color-brand-primary) 4%, var(--color-background-primary)); transition: background 250ms ease; }
.pseudopath-model-zone[data-active="true"] { background: color-mix(in srgb, var(--color-brand-primary) 10%, var(--color-background-primary)); }
.pseudopath-configuration-groups { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; text-align: center; font-family: "Space Grotesk", sans-serif; font-size: .73rem; font-weight: 500; color: var(--color-foreground-secondary); }
.pseudopath-configuration-groups span { padding: .05rem .35rem; line-height: 1.35; }
.pseudopath-configuration-groups [data-active="true"] { color: var(--color-brand-primary); font-weight: 650; }
.pseudopath-route-rail { margin: .35rem 0 .25rem; }
#pseudopath-configuration .pseudopath-route-thumb { left: clamp(11px, var(--pseudopath-route-progress), calc(100% - 11px)); }
#pseudopath-configuration .pseudopath-route-ticks { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); height: 1.25rem; margin: .3rem 0 0; }
#pseudopath-configuration .pseudopath-route-ticks button { position: static; transform: none; min-width: 0; padding: .1rem .25rem; line-height: 1.3; font-size: .65rem; margin: 0 10px; }
#pseudopath-configuration .pseudopath-route-ticks button:first-child { transform: none; padding-left: 0; }
#pseudopath-configuration .pseudopath-route-ticks button:last-child { transform: none; padding-right: 0; }
#pseudopath-configuration .pseudopath-route-ticks button[aria-pressed="true"] { font-weight: 700; color: var(--color-brand-primary); background: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
@media (max-width: 480px) {
  .pseudopath-model-zones, .pseudopath-configuration-groups { gap: .3rem; }
  .pseudopath-configuration-groups { font-size: .6rem; }
  #pseudopath-configuration .pseudopath-route-ticks { height: 1.9rem; margin-top: .3rem; }
  #pseudopath-configuration .pseudopath-route-ticks button { font-size: .58rem; padding: .15rem 0; transform: rotate(-40deg); }
  #pseudopath-configuration .pseudopath-route-ticks button:first-child { transform: rotate(-40deg); transform-origin: left center; padding-left: .15rem; }
  #pseudopath-configuration .pseudopath-route-ticks button:last-child { transform: rotate(-40deg); transform-origin: right center; padding-right: .15rem; }
}
@media (prefers-reduced-motion: reduce) { .pseudopath-model-zone { transition: none; } }

/* Align the range input and visible thumb with the label centers. */
#pseudopath-configuration .pseudopath-route-range {
  left: calc(100% / 18 - 8px);
  right: auto;
  width: calc(100% * 8 / 9 + 16px);
  appearance: none;
}
#pseudopath-configuration .pseudopath-route-range::-webkit-slider-thumb {
  appearance: none; width: 16px; height: 24px;
}
#pseudopath-configuration .pseudopath-route-range::-moz-range-thumb {
  width: 16px; height: 24px; border: 0;
}
#pseudopath-configuration .pseudopath-route-thumb { left: var(--pseudopath-route-progress); }
@media (max-width: 480px) {
  #pseudopath-configuration .pseudopath-route-ticks button,
  #pseudopath-configuration .pseudopath-route-ticks button:first-child,
  #pseudopath-configuration .pseudopath-route-ticks button:last-child {
    transform-origin: center; padding-left: 0; padding-right: 0;
  }
}

.pseudopath-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pseudopath-stat-precision { font-size: 2rem; }
@media (max-width: 480px) {
  .pseudopath-summary { gap: .5rem; }
  .pseudopath-summary .pseudopath-stat-value { font-size: 2rem; }
  .pseudopath-summary .pseudopath-stat-recall, .pseudopath-summary .pseudopath-stat-precision { font-size: 1.25rem; }
  .pseudopath-stat-label { font-size: .6rem; line-height: 1.35; }
}
