/* Bench Easy */
@font-face {
  font-family: Archivo;
  src: url('./assets/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #F6D3DB;     /* pink results paper: the page */
  --lane: #EFC0CB;      /* lane surface */
  --lane-line: #FFFFFF; /* white lane lines */
  --ink: #000000;       /* all text and marks */
  --ink-soft: #5E3A44;  /* secondary text only */
  --red: #E30613;       /* finish line: leader and photo finish only */
  --label-col: minmax(10rem, 15rem);
  --value-col: 6.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 Archivo, system-ui, sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure { margin: 0; }
button, select, input { font: inherit; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

.shell { width: min(100% - 3rem, 78rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
.skip-link { position: fixed; z-index: 5; top: .5rem; left: .5rem; padding: .75rem 1rem; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* Header */
.site-header { border-bottom: 2px solid var(--ink); }
.header-inner { min-height: 4.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; }
.brand { margin-right: auto; display: inline-flex; align-items: center; gap: .55rem; font-size: 1.625rem; font-weight: 900; font-stretch: 62%; line-height: 1; text-decoration: none; white-space: nowrap; }
.brand img { width: 2rem; height: 2rem; }
.brand span { margin-left: -.25rem; }
.edition { color: var(--ink-soft); font-size: .875rem; }
.edition time { color: var(--ink); font-weight: 650; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.site-nav a { display: inline-block; padding-block: .75rem; font-weight: 650; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .4em; }
.back-home { font-weight: 650; }
.language-switch { display: flex; gap: .25rem; }
.language-switch a { display: grid; place-items: center; min-width: 2.5rem; min-height: 2.5rem; padding-inline: .5rem; border-radius: 999px; font-size: .8125rem; font-weight: 750; text-decoration: none; }
.language-switch a:hover { text-decoration: underline; }
.language-switch a[aria-current="true"] { background: var(--ink); color: var(--paper); }

/* Big type */
.ranking-intro h1 { font-size: clamp(3.25rem, 7.4vw, 7rem); font-weight: 900; font-stretch: 62%; line-height: .9; text-wrap: balance; }
.ranking-intro p { max-width: 58ch; margin-top: 1.25rem; color: var(--ink-soft); font-size: 1.125rem; line-height: 1.5; }

/* Home */
.home-page .ranking-intro { margin-top: clamp(2rem, 5vw, 3.5rem); }
.home-page .ranking-intro h1 { max-width: 16ch; }
.workflows-section { margin-block: 2.5rem 4rem; }
.workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.workflow-card { position: relative; min-width: 0; border-bottom: 2px solid var(--ink); }
.workflow-art { width: 100%; filter: grayscale(1); mix-blend-mode: multiply; }
.workflow-card h3 { padding: .8rem 0; font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 900; font-stretch: 62%; line-height: 1; }
.workflow-card h3 a { text-decoration: none; }
.workflow-card h3 a:hover { text-decoration: underline; }
.workflow-card h3 a::after { content: ''; position: absolute; inset: 0; }
.workflow-card:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Detail page intro */
.detail-intro { margin-top: clamp(2rem, 5vw, 3.5rem); }
.detail-intro h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
.detail-intro .test-nav { margin-top: 1rem; }

/* Category links between tests */
.test-nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.test-nav a { padding: .55rem .95rem; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: .9375rem; text-decoration: none; }
.test-nav a:hover { background: var(--ink); color: var(--paper); }

/* Benchmark sections */
.benchmark-section { margin-top: clamp(3.5rem, 8vw, 6rem); scroll-margin-top: 1rem; }
.section-heading { margin-bottom: 1.5rem; }
.section-heading h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 900; font-stretch: 62%; line-height: .92; text-wrap: balance; }
.source-meta { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .6rem; color: var(--ink-soft); font-size: .875rem; }
.source-meta span:first-child { color: var(--ink); font-weight: 700; }
#benchmark-charts { padding-bottom: 2rem; }

/* Benchmark charts */
.data-graph + .data-graph { margin-top: 2.5rem; }
.data-graph figcaption { margin-bottom: 1rem; }
.data-graph figcaption strong { font-size: 1.125rem; font-weight: 750; }
.data-graph figcaption p { max-width: 75ch; margin-top: .2rem; color: var(--ink-soft); font-size: .9375rem; }
.graph-rows { list-style: none; margin: 0; padding: 0; }
.graph-row, .graph-axis { display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr) var(--value-col); align-items: center; gap: .35rem 1.25rem; }
.graph-row { min-height: 3.25rem; padding-block: .45rem; border-top: 2px solid var(--lane-line); }
.graph-model { display: grid; gap: .1rem; line-height: 1.3; overflow-wrap: anywhere; }
.graph-model strong { font-weight: 700; }
.graph-model span { color: var(--ink-soft); font-size: .8125rem; }
.graph-track { position: relative; height: .73rem; background: var(--lane); border-radius: .25rem; }
.graph-bar { position: absolute; inset: 0 auto 0 0; width: var(--position); background: var(--ink); border-radius: inherit; }
.dot-track { height: .22rem; }
.graph-range, .graph-dot { position: absolute; top: 50%; translate: 0 -50%; }
.graph-range { left: var(--low); width: var(--range); height: 2px; background: var(--ink-soft); }
.graph-dot { left: var(--position); translate: -50% -50%; width: .75rem; height: .75rem; border-radius: 50%; background: var(--ink); }
.graph-value { justify-self: end; font-weight: 750; font-stretch: 75%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.graph-axis { margin-top: .45rem; color: var(--ink-soft); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.graph-axis span:first-child { grid-column: 2; grid-row: 1; }
.graph-axis span:last-child { grid-column: 2; grid-row: 1; justify-self: end; }

/* Price chart: input solid, output hatched */
.price-graph { --value-col: 8.5rem; }
.price-tracks { display: grid; gap: .25rem; }
.output-bar, .price-legend span + span::before { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 5px); }
.price-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .5rem; color: var(--ink-soft); font-size: .875rem; }
.price-legend span { display: flex; align-items: center; gap: .4rem; }
.price-legend span::before { content: ''; width: 1.1rem; height: .7rem; background: var(--ink); }

/* Order of arrival */
.practical-panel { margin-top: 3rem; }
.practical-panel h3 { margin-bottom: 1rem; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 900; font-stretch: 62%; line-height: .95; }
.rank-list { margin: 0; padding: 0; list-style: none; }
.rank-row { display: grid; grid-template-columns: 3.5rem minmax(0, .8fr) minmax(0, 1.4fr); align-items: start; gap: 1.25rem; padding-block: 1rem; border-top: 2px solid var(--lane-line); }
.rank-row:last-child { border-bottom: 2px solid var(--lane-line); }
.rank-position { font-size: 2.5rem; font-weight: 900; font-stretch: 62%; line-height: .85; font-variant-numeric: tabular-nums; }
.rank-row:first-child .rank-position { color: var(--red); }
.rank-model { display: grid; gap: .15rem; line-height: 1.3; overflow-wrap: anywhere; }
.rank-model strong { font-size: 1.0625rem; font-weight: 700; }
.rank-model span { color: var(--ink-soft); font-size: .8125rem; }
.rank-note { max-width: 62ch; color: var(--ink-soft); }
.rank-row:first-child .rank-note { color: var(--ink); font-weight: 600; }

/* Sources */
.source-details { margin-top: 4.5rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.source-details summary { cursor: pointer; font-size: 1.3125rem; font-weight: 800; font-stretch: 75%; }
.source-details > p { margin-top: .75rem; color: var(--ink-soft); }
.source-entry { margin-top: 1.25rem; padding-top: 1rem; border-top: 2px solid var(--lane-line); }
.source-entry h3 { font-size: 1.125rem; font-weight: 750; }
.source-entry p { max-width: 70ch; margin-top: .3rem; color: var(--ink-soft); font-size: .9375rem; }
.context-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: .6rem; font-size: .9375rem; font-weight: 650; }

/* Footer */
.site-footer { margin-top: 3rem; border-top: 2px solid var(--ink); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.25rem; padding-block: 1.25rem; font-size: .9375rem; }
.footer-inner strong { font-weight: 750; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.site-footer a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; }
.site-footer a:hover { background: var(--ink); color: var(--paper); }
.site-footer svg { width: 1.15rem; height: 1.15rem; }

/* Tablet */
@media (max-width: 60rem) {
  .detail-page .site-nav { order: 5; flex-basis: 100%; }
  .detail-page .site-nav a { padding-block: .25rem .75rem; }
}

@media (max-width: 57rem) {
  .graph-row { grid-template-columns: minmax(0, 1fr) auto; }
  .graph-model { grid-column: 1; grid-row: 1; }
  .graph-value { grid-column: 2; grid-row: 1; }
  .graph-track, .price-tracks { grid-column: 1 / -1; grid-row: 2; }
  .graph-axis { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .graph-axis span:first-child { grid-column: 1; }
  .graph-axis span:last-child { grid-column: 2; }
}

/* Phone */
@media (max-width: 43rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.75rem; gap: .25rem .75rem; }
  .brand { font-size: 1.375rem; }
  .brand img { width: 1.75rem; height: 1.75rem; }
  .back-home { font-size: .875rem; }
  .language-switch a { min-width: 2.25rem; min-height: 2.25rem; }
  .edition-label { display: none; }
  .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .workflow-tools { grid-column: 1 / -1; }
  .workflow-tools .workflow-art { max-width: 50%; }
  .rank-row { grid-template-columns: 2.5rem minmax(0, 1fr); gap: .35rem 1rem; }
  .rank-note { grid-column: 2; }
}

@media (max-width: 24rem) {
  .home-page .edition { display: none; }
  .detail-page .back-home { order: 4; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
