:root {
  color-scheme: light;
  --ink: #17283a;
  --muted: #4c6070;
  --line: #d5e0e6;
  --paper: #fff;
  --accent: #145b55;
  font: 100%/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: #eef4f5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 75rem; margin: 0 auto; padding: clamp(1rem, 4vw, 3.75rem); }
h1 { font-size: clamp(2.25rem, 6vw, 4.1rem); line-height: 1; letter-spacing: -.055em; margin: 0; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 1.35rem 0 .7rem; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: .16em; }
button, select { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #267d75; outline-offset: 3px; }
.page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem; }
.page-header p { margin-top: .75rem; color: var(--muted); }
.header-actions { display: flex; align-items: center; justify-self: end; gap: .5rem; }
.github-link { display: grid; place-items: center; min-inline-size: 2.75rem; min-block-size: 2.75rem; border: 1px solid #a8bac4; border-radius: .35rem; background: var(--paper); color: var(--ink); }
.github-link:hover { background: #e5eeee; }
.metadata { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; border-top: 1px solid var(--line); margin: 1.5rem 0; padding-top: .75rem; color: var(--muted); font-size: .9rem; }
.metadata a { font-weight: 650; }
@media (max-width: 42rem) {
  .page-header { grid-template-columns: minmax(0, 1fr); }
  .header-actions { grid-row: 1; }
}
.comparison { padding: clamp(1rem, 3vw, 1.75rem); background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; }
.switch { display: inline-flex; flex-wrap: wrap; gap: .25rem; background: #edf3f3; padding: .25rem; border-radius: .6rem; }
.switch a { padding: .45rem .8rem; border-radius: .4rem; color: var(--ink); font-weight: 650; text-decoration: none; }
.switch a[aria-current="location"], .switch a[aria-current="page"] { color: #fff; background: var(--accent); }
.version-switch { margin-block-end: .4rem; }
.version-switch + .description { margin: 0 0 1rem; }
.version-warning { margin: -.4rem 0 1rem; padding: .5rem .7rem; border-inline-start: 3px solid #b88700; background: #fff6d6; color: #4d3800; }
.description { margin: .8rem 0 1.1rem; color: var(--muted); }
.package-results, .summaries + .table-scroll { margin-top: 1rem; }
.package-table tbody th { width: auto; }
.package-table thead th { white-space: normal; }
.package-module { display: block; color: var(--muted); overflow-wrap: anywhere; }
.runtime-note { display: block; font: 400 .75rem ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }
.scenario-title { display: block; color: var(--muted); }
.package-detail > summary { list-style: none; }
.package-detail > summary::-webkit-details-marker { display: none; }
.package-detail > summary .status::after, .package-detail > summary .ratio::after { content: "▸"; margin-inline-start: .35em; }
.package-detail[open] > summary .status::after, .package-detail[open] > summary .ratio::after { content: "▾"; }
.time { font-weight: 650; font-variant-numeric: tabular-nums; }
.ratio { display: block; color: var(--muted); font-size: .85rem; }
.ratio.faster { color: #205536; }
.ratio.slower { color: #832d1a; }
.subheading { margin: 1.1rem 0 .6rem; font-size: 1rem; }
.result-table .package-detail pre { max-inline-size: 18rem; }
.package-detail pre { margin: .45rem 0 0; max-inline-size: 28rem; max-block-size: 12rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.summaries { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .7rem; }
.summary-card { padding: .9rem; border: 1px solid var(--line); border-radius: .65rem; }
.runtime-name { font-weight: 650; }
.score { font-weight: 760; font-size: 1.65rem; font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: .45rem; margin-top: .35rem; accent-color: var(--accent); }
.summary-detail { font-size: .875rem; color: var(--muted); margin-top: .5rem; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1.2rem; margin: 1.4rem 0 .65rem; }
.filters label { display: flex; align-items: center; gap: .45rem; min-inline-size: 0; max-inline-size: 100%; }
/* A select is as wide as its longest option; long contract names must not widen the page. */
.filters select { min-inline-size: 0; max-inline-size: 100%; text-overflow: ellipsis; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%234c6070' stroke-width='1.5'/%3E%3C/svg%3E") right .65rem center / .65rem no-repeat; border: 1px solid #a8bac4; border-radius: .35rem; padding: .3rem 1.65rem .3rem .55rem; }
input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--accent); margin: 0; }
.case-count { margin-inline-start: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The scroll box keeps column headers in view while long tables scroll. */
.table-scroll { overflow: auto; max-block-size: min(75vh, 52rem); border-block-start: 1px solid var(--line); }
thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px var(--line); }
tbody tr { background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: .65rem .55rem; }
thead th { background: #edf3f3; white-space: nowrap; }
tbody th { width: 49%; min-width: 12rem; font-weight: normal; }
tbody tr:nth-child(even) { background: #f7f9fa; }
summary { cursor: pointer; }
summary code { overflow-wrap: anywhere; }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; }
.case-title { display: block; margin-inline-start: 1.15rem; color: var(--muted); }
.case-detail { margin: .6rem .1rem .25rem 1.15rem; }
.case-detail pre { font-size: .84rem; background: #eaf1f2; margin: .3rem 0 .55rem; padding: .5rem; border-radius: .3rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-runtime { margin-top: .65rem; font-weight: 650; }
.contract, .provenance { margin: .45rem 0 0; color: var(--muted); }
.summary-detail.cross-version, .version-note { color: #664500; }
.version-note { display: block; font-size: .8rem; }
.status { display: inline-block; padding: .18rem .45rem; border-radius: .3rem; background: #e8edf2; color: #334860; font-weight: 650; white-space: nowrap; }
.status.passed { background: #deefe5; color: #205536; }
/* Import-only successes prove less than a functional check, so they look lighter. */
.status.passed.import-only { background: transparent; outline: 1px solid #9cc7ad; outline-offset: -1px; }
.status.functionError { background: #fbe7e1; color: #832d1a; }
.check summary, .check-note { font-size: .8rem; color: var(--muted); }
.check-note { display: block; margin-top: .2rem; }
.check pre { font-size: .78rem; background: #eaf1f2; padding: .4rem; border-radius: .3rem; white-space: pre-wrap; max-inline-size: 30rem; }
.status.different, .status.error, .status.installError, .status.importError, .status.crash, .status.internalError { background: #fbe7e1; color: #832d1a; }
.status.missing, .status.noWheel, .status.dependency { background: #fff0ca; color: #664500; }
.status.nativeOnly { background: #eef1f3; color: #4c6070; }
.blocker { display: block; margin-top: .25rem; font-size: .8rem; color: var(--muted); }
.blockers { margin-top: 1rem; }
.blockers summary { font-weight: 650; }
.status.otherAbi, .status.otherPython { background: #e2ecf8; color: #1d4874; }
/* Measurement problems say nothing about conformity, so they look provisional. */
.status.blocked, .status.timeout, .status.installTimeout, .status.installerUnavailable, .status.unverified {
  background: #f2ecf7; color: #573a72; outline: 1px dashed #9f86b8; outline-offset: -1px;
}
.empty { color: var(--muted); padding: 1rem; }
.methodology { margin-top: 1.15rem; padding: .9rem 1rem; background: #e5eeee; border-radius: .6rem; }
.methodology summary { font-weight: 650; }
.methodology p { margin-top: .55rem; max-width: 75ch; }
/* Categorical slots 1 to 5 of the reference palette, validated for adjacent
   pairs. A runtime keeps its color whatever the other series are. */
:root {
  --series-cpython: #257de0;
  --series-pypy: #f47230;
  --series-graalpy: #00b894;
  --series-rustpython: #f2a600;
  --series-freethreaded: #ee7fac;
}
.series-cpython { --series: var(--series-cpython); }
.series-pypy { --series: var(--series-pypy); }
.series-graalpy { --series: var(--series-graalpy); }
.series-rustpython { --series: var(--series-rustpython); }
.series-freethreaded { --series: var(--series-freethreaded); }
.runtime-key, .key { display: inline-block; inline-size: .75rem; block-size: .75rem; border-radius: 50%; background: var(--series, #6a4ce2); margin-inline-end: .5rem; }
.legend .key { inline-size: 1.1rem; block-size: 3px; border-radius: 2px; vertical-align: middle; }
.interpreter-table th[scope="row"] { white-space: nowrap; font-weight: 650; }
.speedup-cell { min-inline-size: 14rem; }
.speedup { display: block; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem; margin-top: 1rem; }
.chart { position: relative; max-inline-size: 46rem; margin: 0; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .65rem; }
.chart figcaption { font-weight: 650; }
.legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .4rem 0 .2rem; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.chart svg { display: block; inline-size: 100%; block-size: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--series, #6a4ce2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .marker { fill: var(--series, #6a4ce2); stroke: var(--paper); stroke-width: 2; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart .hit { fill: transparent; }
.chart .hit:focus-visible { outline: none; fill: rgba(20, 91, 85, .08); }
.tooltip { position: absolute; z-index: 3; min-inline-size: 9rem; padding: .5rem .65rem; background: var(--paper); border: 1px solid #a8bac4; border-radius: .4rem; box-shadow: 0 2px 8px rgba(23, 40, 58, .15); font-size: .85rem; pointer-events: none; }
.tooltip p { color: var(--muted); }
.tooltip div { display: flex; align-items: center; gap: .5rem; margin-top: .2rem; }
.tooltip strong { font-variant-numeric: tabular-nums; margin-inline-start: auto; padding-inline-start: .75rem; }
.tooltip .line-key { inline-size: .9rem; block-size: 2px; background: var(--series, #6a4ce2); }
.chart-table { margin-top: .5rem; font-size: .85rem; }
.chart-table table { margin-top: .4rem; }

@media (max-width: 42rem) {
  table { font-size: .84rem; }
  .package-table .column-rank, .package-table .column-downloads { display: none; }
  .package-table .status { white-space: normal; }
  .package-table tbody th, .package-table thead th:nth-child(2) { position: sticky; left: 0; z-index: 1; background: inherit; }
  .package-table thead th:nth-child(2) { z-index: 3; background: #edf3f3; }
}

/* Row links: visible on hover or focus, and always on touch screens. */
.permalink { float: inline-end; margin-inline-start: .4rem; color: var(--muted); text-decoration: none; opacity: 0; }
tr:hover .permalink, .permalink:focus-visible { opacity: 1; }
@media (hover: none) { .permalink { opacity: .6; } }
tr:target > * { background: #fff6d6; }
.copy-button { display: block; margin: .35rem 0 .2rem; padding: .15rem .5rem; font-size: .78rem; border: 1px solid #a8bac4; border-radius: .3rem; background: var(--paper); }
.copy-button:hover { background: #e5eeee; }
