:root {
    color-scheme: dark;
    --bg: #0b0d12;
    --surface: #11141b;
    --surface-2: #171b24;
    --surface-3: #202631;
    --line: #292f3a;
    --line-soft: #20252e;
    --text: #f2f4f8;
    --muted: #8e98a8;
    --accent: #b7f34a;
    --accent-soft: rgba(183, 243, 74, .12);
    --cyan: #68d8ef;
    --cyan-soft: rgba(104, 216, 239, .12);
    --danger: #ff6b70;
    --warning: #f4bd50;
    /* Four steps, one per level of the interface: the block that sits on the page,
       the card inside it, anything you click, and the small labels. Every rounded
       corner picks one of these, so a new component has nothing to invent. */
    --radius: 18px;
    --radius-card: 12px;
    --radius-control: 9px;
    --radius-chip: 7px;
    /* The three nesting levels of the layout: the page, the block on it, and the
       card inside the block. On a phone the three side paddings together cost a
       third of the screen, so they are redeclared once at the bottom of this file
       rather than tuned rule by rule. */
    --pad-page: clamp(16px, 4vw, 64px);
    --pad-block: 24px;
    --pad-inner: 20px;
    --topbar-height: 76px;
    font-family: 'Manrope', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

body {
    min-width: 320px;
}

button, select, input {
    font: inherit;
}

button, a, select, input {
    outline-color: var(--accent);
    /* One rule for every hover/focus/active state swap in the file, so a control
       answers a pointer instead of snapping between colors. Properties that never
       change on a given element cost nothing by being listed here. */
    transition: background-color .15s ease, color .15s ease, border-color .15s ease,
        box-shadow .15s ease;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
}

/* A minimum rather than a fixed height: on a narrow tablet the release picker and
   the links no longer fit beside the brand and move to a second row, which a fixed
   76px would clip. Wrapping happens on the bar, not inside the group, so the
   picker, the chip and the links always travel together. */
.topbar {
    min-height: 76px;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 12px 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 13, 18, .9);
    backdrop-filter: blur(18px);
}

.topbar-default {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
}

/* Once the page itself moves, the persistent bar becomes a compact account of
   what the visitor is looking at. Full selections are deliberately omitted: the
   category already says what "all" means, while a narrowed selection changes the
   result and therefore deserves space here. */
.topbar-context {
    display: none;
    width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 18px;
}

.page-scrolled .topbar-default {
    display: none;
}

.page-scrolled .topbar-context {
    display: flex;
}

.context-category,
.context-selection > summary {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}

.context-category {
    flex: 0 1 220px;
}

.context-selection {
    position: relative;
    min-width: 0;
    flex: 1 1 360px;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.context-selection > summary {
    cursor: pointer;
    list-style: none;
}

.context-selection > summary::-webkit-details-marker {
    display: none;
}

.context-category span,
.context-selection > summary span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.context-category strong {
    font-size: 18px;
    letter-spacing: -.025em;
    line-height: 1.3;
}

.context-selection > summary strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: normal;
}

.context-selection > summary:hover strong,
.context-selection > summary:focus-visible strong,
.context-selection[open] > summary strong {
    color: var(--accent);
}

.context-selection-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 30;
    width: min(360px, calc(100vw - 32px));
    max-height: min(460px, 60vh);
    overflow-y: auto;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-2);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .36);
}

.context-selection-menu > strong,
.context-selection-menu > small {
    display: block;
}

.context-selection-menu > small,
.context-selection-menu p {
    color: var(--muted);
    font-size: 11px;
}

.context-selection-menu ul {
    display: grid;
    gap: 7px;
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--text);
    font-size: 12px;
}

.brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: block;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    letter-spacing: -.03em;
}

.brand small {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar-end {
    display: flex;
    min-width: 0;
    align-items: center;
    margin-left: auto;
    gap: 10px 18px;
}

/* A fixed box rather than a cap. A date label changes width from one release to the
   next, so without this the picker — and the links beside it — shift on every choice.
   210px covers the longest label the list can produce, a two-digit day with a long
   month name. */
.release-trigger {
    width: 210px;
    max-width: 100%;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-link {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: var(--radius-control);
    color: var(--muted);
}

.icon-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.icon-link svg {
    display: block;
    width: 18px;
    height: 18px;
}

.release-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Holds the list: the trigger alone would make the list as wide as one date. The
   z-index keeps the trigger and the list above the backdrop below. */
.release-switch {
    position: relative;
    z-index: 26;
    min-width: 0;
}

/* An open choice closes on the next click anywhere else, and that click must not also
   land on whatever the visitor aimed at — a row of the report would open a library
   dialog instead of the release they wanted. This layer catches it.
   Fixed rather than absolute only because it has to cover the whole viewport, while the
   bar itself creates a containing block for fixed children through its blur; the bar is
   sticky at the top and spans the full width, so its origin is the top-left of the
   viewport and an explicit viewport-sized box covers exactly what inset:0 would have.
   Transparent rather than dimmed: nothing is being confirmed here, so the page should
   not look blocked. */
.release-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 25;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

/* The trigger stays above the backdrop, so a click on it reaches the button that
   closes the list rather than the transparent layer behind it. */
.release-trigger {
    position: relative;
    z-index: 26;
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 11px 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-2);
    cursor: pointer;
    font-size: 13px;
    list-style: none;
}

.release-trigger::-webkit-details-marker,
.release-trigger::marker {
    display: none;
    content: '';
}

.release-trigger:hover,
.release-switch[open] > .release-trigger {
    border-color: var(--muted);
}

.release-chevron {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: var(--muted);
    transition: transform .15s ease;
}

.release-switch[open] .release-chevron {
    transform: rotate(180deg);
}

/* Five rows, then a scroll. A release list grows by one tag at a time and soon runs
   past a screen; a fixed window keeps the choice at two rows of eye movement while
   the older releases stay one wheel away. The height is computed from the row and
   gap below rather than measured, so changing those cannot silently change this.
   Border-box counts the padding and the border inside the limit, hence the 14px: the
   6px above and below the rows plus the 1px frame on each side. Without it the fifth
   row would be clipped by exactly the frame. */
.release-list {
    --release-row: 34px;
    --release-gap: 2px;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    display: grid;
    width: max-content;
    min-width: 100%;
    max-width: min(280px, calc(100vw - 32px));
    max-height: calc(5 * var(--release-row) + 4 * var(--release-gap) + 14px);
    gap: var(--release-gap);
    margin: 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-2);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .36);
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--line) var(--surface-2);
    scrollbar-width: thin;
}

.release-list::-webkit-scrollbar {
    width: 10px;
}

.release-list::-webkit-scrollbar-track {
    background: var(--surface-2);
}

.release-list::-webkit-scrollbar-thumb {
    border: 3px solid var(--surface-2);
    border-radius: 999px;
    background: var(--line);
}

.release-option {
    display: flex;
    height: var(--release-row);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 9px;
    border: 0;
    border-radius: var(--radius-chip);
    background: none;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.release-option:hover,
.release-option:focus-visible {
    background: var(--surface-3);
}

.release-option.is-selected {
    background: var(--accent-soft);
    color: var(--accent);
}

.release-option svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.release-caption,
.scenario-heading {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.commit-link {
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    text-decoration: none;
}

.workspace {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    min-height: calc(100vh - var(--topbar-height));
}

/* The left column as one piece: the category picker, which is never folded away,
   and the filters that narrow the comparison inside it. */
.sidebar {
    position: sticky;
    top: var(--topbar-height);
    align-self: start;
    height: calc(100vh - var(--topbar-height));
    overflow: auto;
    padding: 28px 22px;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

/* The panel is always open on a wide screen, so its control is not merely hidden
   but absent: an invisible tab stop would be worse than no control at all. */
.filters-toggle,
.filters-summary {
    display: none;
}

.filters-heading,
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.filters-heading h2,
.section-heading h2,
.library-card h2,
.environment-card h3 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.filter-section {
    margin-top: 30px;
}

.filter-section h3 {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.filter-section-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}

.filter-section-head h3 {
    flex: 1;
    margin: 0;
}

.filter-count {
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-align: right;
}

/* A line break is allowed before this phrase, never inside it — "1 not" on one
   line and "rated" alone on the next reads worse than the wrap it was meant to
   fix. */
.filter-count-note {
    white-space: nowrap;
}

/* Matches the native checkboxes of the rows it commands. */
.select-all {
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--muted);
    border-radius: 4px;
    background: none;
    color: transparent;
    cursor: pointer;
}

.select-all svg {
    display: block;
    width: 12px;
    height: 12px;
}

.select-all:hover {
    border-color: var(--accent);
}

.select-all.is-all,
.select-all.is-some {
    border-color: var(--accent);
    background: var(--accent);
    color: #10140a;
}

.filter-search {
    width: 100%;
    min-height: 34px;
    margin-bottom: 12px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-2);
    color: var(--text);
    font-size: 13px;
}

.filter-search::placeholder {
    color: var(--muted);
}

.filter-search:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    cursor: pointer;
    font-size: 13px;
}

.check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.check-row small {
    display: block;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
}

/* The checkbox label and the details button are siblings, so a click on one is
   never a click on the other. */
.library-row {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
}

.library-row .check-row {
    min-width: 0;
    flex: 1;
    gap: 8px;
}

.library-row .check-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scenario-group {
    margin-bottom: 22px;
}

/* A scenario name is short and there are never many, so the rows stay a single
   column on the wide sidebar and gain columns only where the panel gets wide. */
.scenario-filter {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0 18px;
}

.scenario-filter .scenario-row {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 32px;
}

.scenario-filter .check-row {
    flex: 1;
    min-width: 0;
}

.scenario-filter .check-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Not an error, so not the failed-state color: the same muted tone the order
   number already uses elsewhere in this row. */
.scenario-row.is-not-rated .check-row {
    color: var(--muted);
}

.scenario-filter .feature-order {
    margin-right: 8px;
    font-size: 11px;
}

.library-group {
    margin-bottom: 22px;
}

.muted {
    color: var(--muted);
    font-size: 12px;
}

.content {
    min-width: 0;
    padding: 42px var(--pad-page) 80px;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 38px;
}

.hero h1 {
    max-width: none;
    margin: 0;
    font-size: clamp(24px, 5.2vw, 78px);
    line-height: .98;
    letter-spacing: -.065em;
    white-space: nowrap;
}

.hero-copy {
    max-width: 660px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.tabs-summary {
    display: grid;
    flex: 0 0 auto;
    grid-auto-flow: column;
    gap: 18px;
    margin-left: auto;
    padding: 2px 14px 2px 20px;
    border-left: 1px solid var(--line);
}

.tabs-summary span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .02em;
    text-align: center;
    text-transform: uppercase;
}

.tabs-summary strong {
    display: block;
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: 16px;
    line-height: 1.2;
}

/* Wrapping rather than scrolling sideways: at the widths where the five tabs and
   the summary do not fit on one line, the summary drops to a line of its own and
   the tabs keep the strip to themselves, so they stay equal. A scrollbar here would
   hide the last tabs the way it used to hide them on a phone. */
/* Pinned under the top bar rather than scrolling away with the hero: switching
   views is something a visitor reaches for from anywhere on a report, not only
   at the top of the page. */
.tabs {
    position: sticky;
    top: var(--topbar-height);
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
}

/* Equal boxes that share the strip between them. Sized by the label, the five tabs
   came out five different widths and left a hole between the last one and the
   summary; flex-basis 0 spreads that space evenly instead. The automatic minimum
   size still applies, so a label is never squeezed narrower than its text. */
.tab {
    display: inline-flex;
    min-height: 40px;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Side padding only decides the smallest a tab may become, since the width comes
       from the share. Keeping it modest widens the range where the shares are all
       reachable and the boxes come out exactly equal. */
    padding: 0 14px;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}

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

/* The glyph never shrinks with the share the tab was given: a squeezed icon reads
   as a different shape, whereas the label can wrap into its own line. */
.tab-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.tab.active {
    background: var(--accent);
    color: #10140a;
    font-weight: 800;
}

.panel,
.library-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}

.overview-report {
    margin-bottom: 36px;
    padding: var(--pad-block);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

/* Live counterpart of the readme charts: same layout and palette, but driven by
   the current library selection and rendered as text rather than a scaled image. */
.overview-chart {
    container: overview-chart / inline-size;
    margin: 0 0 16px;
    padding: var(--pad-inner);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: var(--bg);
}

.overview-chart:last-child {
    margin-bottom: 0;
}

/* Every block heading has the same shape: the title on the left, its note and the
   explanation control as one group at the right edge. Built differently, the note
   drifted to the middle of one block and the control fell onto its own line in
   the other. */
.overview-chart-head,
.rating-board-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 18px;
}

.section-head-end {
    display: flex;
    min-width: 0;
    align-items: center;
    margin-left: auto;
    gap: 12px;
}

.section-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.overview-chart-head h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.03em;
}

/* The score keeps the column the standings share; the medal takes the last
   track after it, as in the standings. */
.overview-chart-row {
    display: grid;
    grid-template-columns: minmax(0, 29fr) minmax(0, 32fr) minmax(0, 32fr) 58px 20px;
    align-items: center;
    gap: 24px;
    padding: 7px 10px;
    border-radius: var(--radius-control);
}

.overview-chart-points {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    text-align: right;
    cursor: help;
}

.overview-panel-head.is-points {
    text-align: right;
}

.overview-chart-label small.is-partial {
    color: var(--warning);
    cursor: help;
}

.overview-chart-row.is-striped {
    background-color: var(--surface);
}

/* Same split fill as the standings table: cyan up to the time share, lime up to
   the combined share, nothing after. The header row carries neither custom
   property, so it keeps its own border and stays unfilled. */
.overview-chart-row:not(.overview-chart-columns) {
    background-image: linear-gradient(
        to right,
        var(--cyan-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points, 0%),
        transparent var(--points, 0%));
    background-repeat: no-repeat;
}

.overview-chart-columns {
    align-items: end;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.overview-panel-head strong,
.overview-panel-head small {
    display: block;
}

.overview-panel-head strong {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.overview-panel-head small {
    color: var(--muted);
    font-size: 11px;
}

/* Fixed rank column keeps every logo and name on one vertical. */
.overview-chart-label {
    display: grid;
    grid-template-columns: 22px auto minmax(0, 1fr);
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.overview-chart-label > div {
    min-width: 0;
}

.overview-chart-label strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-chart-label small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-chart-rank {
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-align: right;
}

.overview-metric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: center;
    gap: 12px;
}

.overview-bar {
    display: flex;
    height: 22px;
    overflow: hidden;
    border-radius: var(--radius-chip);
    background: var(--surface-2);
}

/* A scenario that measures next to nothing beside one that dominates the total
   would otherwise round away to nothing: min-width keeps every segment with a
   share above zero visible, even if the true share is a fraction of a pixel. */
.overview-bar span {
    flex: 0 0 auto;
    min-width: 2px;
    height: 100%;
}

.overview-bar-zero {
    width: 8px;
    border-radius: 50%;
    align-self: center;
    height: 8px;
    margin-left: 4px;
}

.overview-metric strong {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
}

/* The column headings name the two metrics wherever the row is laid out in
   columns, so the per-bar caption only appears once the row stacks. */
.overview-metric-label {
    display: none;
}

.overview-chart-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 26px 0 0;
    padding: 0;
    gap: 9px 20px;
    color: var(--muted);
    font-size: 12px;
    list-style: none;
}

.overview-chart-legend li {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.overview-chart-legend li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-chart-swatch {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 3px;
}

/* The three-column row also runs out of room well above the phone width the
   media query below targets: the sidebar or the filter panel can leave this
   card the width of a phone screen on an otherwise wide window. Bound to the
   card's own width rather than the viewport, so it stacks whenever it — not
   the window — is squeezed. */
@container overview-chart (max-width: 760px) {
    .overview-chart-row {
        gap: 10px;
        grid-template-columns: minmax(0, 1fr);
        padding: 12px 10px;
    }

    .overview-chart-row + .overview-chart-row {
        border-top: 1px solid var(--line-soft);
        border-radius: 0;
    }

    .overview-chart-columns {
        display: none;
    }

    .overview-chart-points {
        text-align: left;
    }

    .overview-metric {
        grid-template-columns: 52px minmax(0, 1fr) 78px;
        gap: 10px;
    }

    .overview-metric-label {
        display: block;
        color: var(--muted);
        font-size: 10px;
        letter-spacing: .05em;
        text-transform: uppercase;
    }
}

.library-card {
    min-height: 220px;
    padding: var(--pad-block);
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
}

.card-heading-end {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Medals: gold, silver and bronze for the first three places of every overview. */
.rating-icon {
    display: block;
    width: 14px;
    height: 14px;
}

.rating-gold {
    color: #f5cf6e;
}

.rating-silver {
    color: #c3ccda;
}

.rating-bronze {
    color: #ab6f40;
}

.rating-unrated {
    color: #59616f;
}

/* A fixed box whether or not it holds an icon, so a medal never moves the
   controls beside it in a list of rows. */
.rating-badge {
    display: grid;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    place-items: center;
}

.rating-badge.is-unrated {
    cursor: help;
}

/* Same fixed box and the same crossed-star as .rating-badge.is-unrated, for a
   scenario instead of a library: one visual language for "outside the rating"
   wherever it appears. */
.not-rated-badge {
    display: inline-grid;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    place-items: center;
    margin-left: 6px;
    cursor: help;
    color: var(--muted);
}

/* The score and, when it is not the maximum, what the library did not run. The
   pair explains a low number without a legend. */
.rating-points {
    min-width: 42px;
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    text-align: right;
}

.rating-coverage {
    color: var(--muted);
    cursor: help;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    white-space: nowrap;
}

.rating-board {
    margin-bottom: 18px;
    padding: var(--pad-inner);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: var(--bg);
}


.rating-board-head h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.03em;
}

.rating-table {
    overflow: hidden;
    overflow-x: auto;
}

/* Fixed layout: the numeric columns keep their width on every row, so a medal
   appearing on the podium or a partial-coverage note cannot move them. */
.rating-table table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.rating-table th {
    padding: 0 10px 8px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: right;
    text-transform: uppercase;
}

.rating-table td {
    padding: 6px 10px;
    font-family: 'DM Mono', monospace;
    text-align: right;
    vertical-align: middle;
}

.rating-table tbody tr:nth-child(odd) {
    background-color: var(--surface);
}

/* How much of the maximum the row actually holds. Below the leaders the points
   fall to a few percent and the place number implies a difference the numbers do
   not carry; the fill is what shows that two adjacent ranks are both nowhere.
   Split in two, cyan for time and lime for memory — the same two colours the
   meter bars use — so the fill also says which of the two a row leans on.
   Background only, so no cell moves and the stacked phone layout is unaffected. */
.rating-table tbody tr {
    background-image: linear-gradient(
        to right,
        var(--cyan-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points, 0%),
        transparent var(--points, 0%));
    background-repeat: no-repeat;
}

.rating-table th:first-child,
.rating-table td:first-child {
    padding-left: 12px;
}

.rating-table th:last-child,
.rating-table td:last-child {
    padding-right: 12px;
}

.rating-column-place {
    width: 34px;
    text-align: right;
}

.rating-table th.rating-column-name,
.rating-table td.rating-column-name {
    width: auto;
    font-family: 'Manrope', system-ui, sans-serif;
    text-align: left;
}

.rating-table th:not(.rating-column-place):not(.rating-column-name):not(.rating-column-badge) {
    width: 74px;
}

.rating-column-badge {
    width: 30px;
}

.rating-table td.rating-column-badge {
    text-align: center;
}

.rating-table td.is-partial {
    color: var(--warning);
    cursor: help;
}

/* Every points cell carries its own arithmetic; the cursor is what says so. */
.rating-table td.rating-column-score,
.rating-table td.rating-column-total {
    cursor: help;
}

.rating-column-total {
    color: var(--text);
    font-weight: 500;
}

.rating-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    font-weight: 600;
}

.rating-name .library-open {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rating-label {
    display: none;
}

.overview-chart-medal {
    display: grid;
    width: 14px;
    height: 14px;
    justify-self: center;
    place-items: center;
}

.category-chip,
.section-meta {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-chip);
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(183, 243, 74, .08);
}

.status-dot.ok {
    background: var(--accent);
}

.status-dot.bad {
    background: var(--danger);
}

/* Sized to sit beside .rating-badge and .status-dot in the same heading row, unlike
   .feature-status which carries its own 28px background box for the table grids. A
   button rather than a span: the tooltip alone never reaches a touch screen or a
   keyboard, so the same click that opens the dialog elsewhere on the card opens it
   here too, landing on the detail the tooltip only summarises. */
.deployment-badge {
    display: grid;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-chip);
    background: none;
    place-items: center;
    cursor: pointer;
}

.deployment-badge:hover,
.deployment-badge:focus-visible {
    background: var(--surface-2);
}

.deployment-badge .status-icon {
    width: 12px;
    height: 12px;
}

.deployment-badge.supported {
    color: rgba(183, 243, 74, .85);
}

.deployment-badge.unsupported {
    color: #aab3c1;
}

.deployment-badge.not-applicable {
    color: rgba(104, 216, 239, .8);
}

.deployment-badge.failed {
    color: var(--danger);
}

.deployment-badge.missing {
    color: #4a515f;
}

.library-card h2 {
    font-size: 25px;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.library-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.library-identity > div {
    min-width: 0;
}

.library-logo {
    display: block;
    width: var(--logo-size, 48px);
    height: var(--logo-size, 48px);
    flex: 0 0 auto;
    border-radius: calc(var(--logo-size, 48px) / 4.4);
    object-fit: contain;
}

.library-logo.is-fallback {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: calc(var(--logo-size, 48px) * .42);
    line-height: 1;
    text-transform: uppercase;
}

.library-logo-sm {
    --logo-size: 26px;
}

.library-logo-xs {
    --logo-size: 20px;
}

.package {
    margin: 5px 0 0;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.library-description {
    min-height: 63px;
    margin: 18px 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.library-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--cyan);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    text-decoration: none;
}

.library-link:hover {
    text-decoration: underline;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}

.metric-row strong,
.metric-row span {
    display: block;
}

.metric-row strong {
    font-family: 'DM Mono', monospace;
    font-size: 20px;
}

.metric-row span {
    color: var(--muted);
    font-size: 10px;
}

.report-section {
    margin-bottom: 18px;
    padding: var(--pad-block);
}

.section-heading {
    align-items: center;
    margin-bottom: 22px;
}

/* The vertical scroll has to happen inside this box rather than on the page.
   `overflow-x: auto` already makes it the nearest scroll container, so a sticky
   header inside it had no vertical range to travel and the column of library
   names scrolled off while the body stayed: exactly what the sticky header was
   added to prevent. Bounding the box to what is left of the viewport under the
   top bar gives the header that range; the first column keeps sticking on the
   axis it always did. Chaining is contained on the horizontal axis only, so the
   wheel still hands the page back once the table is scrolled to its end. */
.table-scroll {
    max-height: calc(100vh - var(--topbar-height) - 32px);
    max-height: calc(100dvh - var(--topbar-height) - 32px);
    overflow: auto;
    overscroll-behavior-x: contain;
    scrollbar-color: var(--line) var(--surface-2);
    scrollbar-width: thin;
    /* Edge shadow that fades out at the end of the scroll: the horizontal
       scrollbar can sit below the fold, so scrollability needs to be visible. */
    background-image:
        linear-gradient(to right, var(--surface), rgba(17, 20, 27, 0)),
        linear-gradient(to left, var(--surface), rgba(17, 20, 27, 0)),
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
    background-attachment: local, local, scroll, scroll;
    background-position: 0 0, 100% 0, 0 0, 100% 0;
    background-repeat: no-repeat;
    background-size: 44px 100%, 44px 100%, 18px 100%, 18px 100%;
}

.table-scroll::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.table-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--surface-2);
}

.table-scroll::-webkit-scrollbar-thumb {
    border: 3px solid var(--surface-2);
    border-radius: 999px;
    background: var(--line);
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

.table-scroll::-webkit-scrollbar-corner {
    background: var(--surface-2);
}

/* Mobile browsers are free to hide native scrollbars, which makes a tall feature
   matrix look finite until its very bottom. Script positions this supplementary
   rail over the visible table and keeps its thumb in sync with table-scroll. */
.feature-scroll-dock {
    display: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    border-top: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
}

thead th {
    border-top: 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

thead th small {
    display: block;
    margin-top: 3px;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
}

/* Separate borders keep the sticky header and the sticky first column painting
   their edges, which collapsed borders drop while scrolling. */
.feature-table {
    border-collapse: separate;
    border-spacing: 0;
}

.feature-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px 6px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    text-align: center;
}

.feature-table tbody td {
    padding: 12px 6px;
    text-align: center;
    vertical-align: middle;
}

/* A star takes the checkmark's own place rather than sitting above it, so the
   matrix stays exactly as tall with or without medals in it. */
.feature-status.is-medal {
    cursor: help;
}

.feature-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.feature-table thead th:first-child,
.feature-table tbody th {
    padding-right: 15px;
    padding-left: 15px;
    text-align: left;
}

.feature-table thead th:first-child {
    left: 0;
    z-index: 3;
    border-right: 1px solid var(--line);
    vertical-align: bottom;
}

.feature-table thead th .column-library {
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
}

/* A hard width is what actually sizes the column: the status glyph is narrower
   than the caption, so the library name would otherwise set the column width. */
.feature-table thead th .column-library-name {
    display: -webkit-box;
    width: 48px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 10px;
    letter-spacing: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-transform: none;
}

tbody th {
    min-width: 180px;
    font-size: 13px;
}

.feature-order {
    margin-right: 10px;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
}

/* The scenario name doubles as the control that reveals what it measures. */
.feature-toggle {
    display: flex;
    width: 100%;
    align-items: baseline;
    gap: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.feature-toggle:hover .feature-toggle-mark,
.feature-toggle[aria-expanded="true"] .feature-toggle-mark {
    border-color: var(--accent);
    color: var(--accent);
}

.feature-toggle > span:nth-child(2) {
    flex: 1;
}

.feature-toggle-mark {
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    place-items: center;
    margin-left: 8px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    line-height: 1;
}

/* Spans the whole matrix, so it must opt out of the sticky first column. */
.feature-table .feature-description-row th {
    position: static;
    width: auto;
    min-width: 0;
    padding: 4px 15px 16px;
    border-right: 0;
    background: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
}

.scenario-description {
    max-width: 90ch;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.feature-note {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}

.feature-status {
    position: relative;
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: var(--radius-control);
}

/* Drawn rather than typed: Manrope covers only some of the glyphs a status set
   needs, so the rest would come from a per-OS fallback font. */
.status-icon {
    display: block;
    width: 16px;
    height: 16px;
}

/* A corner dot marks the cells whose tooltip carries an explanation. */
.feature-status.has-reason {
    cursor: help;
}

.feature-status.has-reason::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .8;
}

.feature-legend {
    display: flex;
    margin: 0 0 20px;
    padding: 0;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: var(--muted);
    font-size: 11px;
    list-style: none;
}

.feature-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Weights are deliberately uneven: "Supported" fills most of the matrix, so it
   stays quiet and the states worth acting on carry the visual weight. */
.feature-status.supported {
    color: rgba(183, 243, 74, .55);
}

.feature-status.unsupported {
    background: rgba(142, 152, 168, .14);
    color: #aab3c1;
}

.feature-status.not-applicable {
    color: rgba(104, 216, 239, .6);
}

.feature-status.failed {
    background: var(--danger);
    color: #2a0b0d;
}

.feature-status.missing {
    color: #4a515f;
}


.benchmark-toolbar {
    display: grid;
    gap: 13px;
    margin-bottom: 16px;
    padding: var(--pad-block);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
}

.benchmark-toolbar-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.scenario-heading {
    margin: 0;
}

/* All scenarios stay visible; the content column is wide enough for columns. */
.scenario-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 0 20px;
}

.scenario-list .check-row {
    min-height: 30px;
    padding-right: 6px;
}

.scenario-list .check-row input {
    accent-color: var(--accent);
}

.scenario-list .feature-order {
    margin-right: 8px;
    font-size: 11px;
}

.evidence-status {
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.evidence-card {
    padding: var(--pad-inner);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: var(--bg);
}

.evidence-card-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.evidence-card-heading h3 {
    margin-top: 4px;
    font-size: 15px;
}

.evidence-status.is-available {
    color: var(--accent);
}

.evidence-status.is-reported,
.evidence-status.is-smoke {
    color: var(--warning);
}

.evidence-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 13px 0 0;
}

.evidence-card dl div {
    min-width: 0;
}

.evidence-card dt {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.evidence-card dd {
    margin: 2px 0 0;
    overflow: hidden;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidence-primary-action {
    display: inline-flex;
    gap: 7px;
    margin-top: 16px;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 800;
}

.evidence-section {
    display: grid;
    gap: 18px;
}

.evidence-heading {
    margin-bottom: 0;
}

.section-description {
    max-width: 650px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.evidence-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: var(--surface-2);
}

.evidence-summary div {
    display: grid;
    gap: 3px;
    padding: 14px 16px;
}

.evidence-summary div + div {
    border-left: 1px solid var(--line-soft);
}

.evidence-summary strong {
    font-family: 'DM Mono', monospace;
    font-size: 15px;
}

.evidence-summary span {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.evidence-local-path {
    display: grid;
    gap: 4px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    color: var(--warning);
    font-size: 10px;
}

.evidence-local-path span {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
}

.benchmark-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.benchmark-split-column {
    min-width: 0;
}

.split-heading {
    margin-bottom: 14px;
}

.split-heading h2 {
    margin: 0;
    font-size: 24px;
}

.benchmark-split-column .report-section {
    padding: 18px;
}

.benchmark-split-column .benchmark-row {
    grid-template-columns: minmax(105px, .8fr) minmax(72px, 1fr) minmax(92px, auto);
    gap: 10px;
    padding: 12px 8px;
}

.benchmark-split-column .benchmark-name {
    gap: 7px;
}

.benchmark-split-column .library-logo-sm {
    --logo-size: 20px;
}

.benchmark-toolbar-row > div {
    display: grid;
    gap: 6px;
}

.direction-note {
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
}

.benchmark-list {
    display: grid;
    gap: 6px;
}

.benchmark-environment {
    margin-top: 8px;
    padding: 8px 14px;
    border-top: 1px solid var(--line-soft);
    color: var(--cyan);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.benchmark-row {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(120px, 1fr) 150px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius-control);
}

.benchmark-row:hover {
    background: var(--surface-2);
}

.benchmark-row.baseline {
    opacity: .62;
}

.benchmark-name {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.benchmark-name > div {
    min-width: 0;
}

.benchmark-name strong,
.benchmark-name span,
.benchmark-value strong,
.benchmark-value span,
.benchmark-value small {
    display: block;
}

.benchmark-name strong {
    font-size: 13px;
}

.benchmark-name span,
.benchmark-value span,
.benchmark-value small {
    color: var(--muted);
    font-size: 10px;
}

.meter {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-3);
}

/* Same two colours the readme charts use: cyan for time, lime for memory.
   Length follows MatrixMetrics.Scale, so a longer bar always means a worse result. */
.meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--cyan);
}

.meter span.is-memory {
    background: var(--accent);
}

.benchmark-value {
    text-align: right;
}

.benchmark-value strong {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
}

.notice {
    margin-bottom: 16px;
    padding: 12px 15px;
    border-radius: var(--radius-card);
    font-size: 12px;
    line-height: 1.5;
}

.notice.warning {
    border: 1px solid rgba(244, 189, 80, .3);
    background: rgba(244, 189, 80, .08);
    color: #ffd985;
}

.environment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.environment-card {
    padding: var(--pad-inner);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: var(--bg);
}

.environment-id {
    display: inline-block;
    margin-bottom: 13px;
    padding: 4px 7px;
    border-radius: var(--radius-chip);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
}

.environment-card h3 {
    font-size: 15px;
}

.environment-card dl {
    margin: 18px 0 0;
}

.environment-card dl div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--line-soft);
}

.environment-card dt,
.environment-card dd {
    margin: 0;
    font-size: 11px;
}

.environment-card dt {
    color: var(--muted);
}

.environment-card dd {
    overflow-wrap: anywhere;
}

.center-state,
.empty-state,
.loading-panel,
.boot,
.empty-page {
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
}

.center-state {
    min-height: calc(100vh - 76px);
    padding: 30px;
}

.center-state h1,
.empty-state h2 {
    margin-bottom: 5px;
}

.center-state p,
.empty-state p {
    max-width: 520px;
    color: var(--muted);
}

.empty-state,
.loading-panel {
    min-height: 300px;
    padding: 40px;
}

.state-icon {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--accent);
    font-family: 'DM Mono', monospace;
}

.error-state .state-icon {
    color: var(--danger);
}

.loader {
    width: 26px;
    height: 26px;
    border: 2px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

/* A filter or category change recomputes and redraws the whole comparison on the
   same synchronous handler that reacted to the click, so the freeze already owns
   the frame by the time it would show anything. The overlay is a sibling of the
   content rather than a wrapper around it, so dimming the content cannot dim the
   overlay along with it. */
#view-panel {
    position: relative;
}

#view-panel.is-recomputing > :not(.recompute-overlay) {
    opacity: .45;
    pointer-events: none;
}

#view-panel > :not(.recompute-overlay) {
    transition: opacity .15s ease;
}

.recompute-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
}

.boot {
    min-height: 100vh;
    gap: 10px;
    color: var(--muted);
}

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

.empty-page {
    min-height: 100vh;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    padding: 14px;
    border: 1px solid var(--danger);
    border-radius: var(--radius-card);
    background: var(--surface);
}

#blazor-error-ui .dismiss {
    margin-left: 8px;
}

/* The release notice stands where the error box stands, in the accent colour rather than
   the danger one: a newer build waiting to be installed means nothing went wrong. */
#update-ui {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    padding: 14px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-card);
    background: var(--surface);
    color: var(--text);
}

#update-ui button {
    margin-left: 8px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
}

#update-ui #update-reload {
    border-color: var(--accent);
    background: var(--accent-soft);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* A library name is a button wherever it appears: it opens the library dialog and
   keeps the typography of whatever element it stands in for. */
.library-open {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    text-align: inherit;
}

/* The name used to be plain text that its container ellipsised; as a button it has
   to truncate itself, or a long name is cut off mid-letter instead. */
.overview-chart-label .library-open,
.benchmark-name .library-open {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-open:hover,
.library-open:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.library-info {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius-chip);
    background: none;
    color: var(--muted);
    cursor: pointer;
    place-items: center;
}

.library-info:hover,
.library-info:focus-visible {
    background: var(--surface-2);
    color: var(--accent);
}

.library-info svg {
    width: 15px;
    height: 15px;
}

/* The single explanation affordance. Deliberately quiet: it sits beside a
   heading and must not compete with it. */
.help-button {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius-chip);
    background: none;
    color: var(--muted);
    cursor: pointer;
    place-items: center;
}

.help-button:hover,
.help-button:focus-visible {
    background: var(--surface-2);
    color: var(--accent);
}

.help-button svg {
    width: 16px;
    height: 16px;
}

.copy-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-chip);
    background: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}

.copy-link:hover,
.copy-link:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.copy-link svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.copy-link.is-icon {
    padding: 5px;
    border-color: transparent;
}

/* The dialog dims the application behind it rather than replacing it: the visitor
   keeps their place in the matrix while reading about one library. */
.modal-backdrop {
    position: fixed;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: rgba(6, 7, 10, .72);
    backdrop-filter: blur(6px);
    inset: 0;
}

.modal-panel {
    display: flex;
    width: min(920px, 100%);
    max-height: 100%;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    outline: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* An explanation is prose, and prose past sixty characters a line stops being
   readable. */
.modal-panel.is-narrow {
    width: min(560px, 100%);
}

.help-body p,
.help-body li {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.help-rule {
    margin: 0;
    padding: 14px 16px;
    border-left: 2px solid var(--accent);
    background: var(--surface-2);
    color: var(--text);
}

.help-body ul {
    margin: 16px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.help-source {
    margin: 20px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 12px;
}

.help-source code {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
}

.modal-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(17, 20, 27, .94);
    backdrop-filter: blur(14px);
}

.modal-identity {
    min-width: 0;
    flex: 1;
}

.modal-identity h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}

.modal-package {
    display: flex;
    margin: 3px 0 0;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
}

.modal-head-end {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.modal-close {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: none;
    color: var(--muted);
    cursor: pointer;
    place-items: center;
}

.modal-close:hover,
.modal-close:focus-visible {
    border-color: var(--danger);
    color: var(--danger);
}

.modal-close svg {
    width: 15px;
    height: 15px;
}

.modal-body {
    padding: 22px;
}

.modal-description {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.modal-links {
    display: flex;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 12px;
}

.modal-links a {
    color: var(--cyan);
    text-decoration: none;
}

.modal-links a:hover {
    text-decoration: underline;
}

.modal-metrics {
    display: grid;
    margin-top: 20px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.modal-metrics div {
    padding: 12px 14px;
    border-radius: var(--radius-card);
    background: var(--surface-2);
}

/* The tile and every row of the breakdown carry their own arithmetic. */
.modal-metrics div.is-explained,
.modal-rating li[title] {
    cursor: help;
}

/* The same split fill as the standings row this tile summarises. */
.modal-metrics div.is-explained {
    background-image: linear-gradient(
        to right,
        var(--cyan-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points, 0%),
        transparent var(--points, 0%));
    background-repeat: no-repeat;
}

.modal-metrics strong {
    display: block;
    font-size: 22px;
    letter-spacing: -.03em;
}

.modal-metrics small {
    color: var(--muted);
    font-size: 13px;
}

.modal-metrics span {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.modal-section {
    margin-top: 28px;
}

.modal-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.modal-section-head h3 {
    margin: 0;
    font-size: 15px;
}

/* An itemised bill: what each metric earned, what an unsupported scenario
   forfeited, and the sum. */
.modal-rating {
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    list-style: none;
    overflow: hidden;
}

.modal-rating li {
    display: grid;
    align-items: baseline;
    grid-template-columns: minmax(0, 1fr) 64px 76px;
    gap: 12px;
    padding: 9px 16px;
    font-size: 13px;
}

.modal-rating li + li {
    border-top: 1px solid var(--line-soft);
}

.modal-rating strong,
.modal-rating small {
    font-family: 'DM Mono', monospace;
    text-align: right;
}

.modal-rating small {
    color: var(--muted);
    font-size: 11px;
}

.modal-rating .is-missing span,
.modal-rating .is-missing strong {
    color: var(--warning);
}

/* Each metric row fills in its own colour — cyan for time, lime for memory —
   and the total row splits between the two, all against the same --points
   custom property the standings row uses. */
.modal-rating li.is-time {
    background-image: linear-gradient(
        to right,
        var(--cyan-soft) var(--points, 0%),
        transparent var(--points, 0%));
    background-repeat: no-repeat;
}

.modal-rating li.is-memory {
    background-image: linear-gradient(
        to right,
        var(--accent-soft) var(--points, 0%),
        transparent var(--points, 0%));
    background-repeat: no-repeat;
}

.modal-rating .is-total {
    background-color: var(--surface-2);
    background-image: linear-gradient(
        to right,
        var(--cyan-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points, 0%),
        transparent var(--points, 0%));
    background-repeat: no-repeat;
}

.modal-rating .is-total strong {
    font-size: 15px;
}

.modal-standing {
    padding: var(--pad-inner);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.modal-standing + .modal-standing {
    margin-top: 10px;
}

.modal-standing-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
}

.modal-standing-head span {
    color: var(--muted);
    font-size: 11px;
}

.modal-standing-row {
    display: grid;
    align-items: center;
    grid-template-columns: 84px minmax(0, 1fr) 56px;
    gap: 12px;
}

.modal-standing-row + .modal-standing-row {
    margin-top: 8px;
}

.modal-standing-metric {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.modal-standing-score {
    cursor: help;
}

.modal-standing-ratio {
    color: var(--muted);
    cursor: help;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-align: right;
}

/* Support and cost in one table: the row of a scenario the library does not
   support carries the reason where its numbers would have been. */
.modal-scenarios {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
    overflow-x: auto;
}

/* Fixed layout: the two metric columns are the same width on every row, and the
   scenario name takes whatever is left instead of setting the table width. */
.modal-scenarios table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

/* Wide enough for the longest value and the longest ratio a slow library can
   produce, so no row alone widens the table. */
.modal-scenarios th:nth-child(2),
.modal-scenarios th:nth-child(3) {
    width: 200px;
}

.modal-scenarios th {
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: right;
    text-transform: uppercase;
}

.modal-scenarios th:first-child {
    text-align: left;
}

.modal-scenarios td {
    padding: 8px 14px;
    vertical-align: middle;
}

.modal-scenarios tbody tr + tr td {
    border-top: 1px solid var(--line-soft);
}

.modal-scenarios tr.is-quiet .modal-scenario-name {
    color: var(--muted);
}

.modal-scenario-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

/* The longest scenario name is wider than its column once the points column
   takes its share; wrapping costs a line, truncating would cost the name. */
.modal-scenario-name > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.modal-scenario-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* One row per deployment capability — one today, Native AOT — so a bordered list reads
   better here than the fixed-width scenario table built for two numeric columns. */
.modal-deployment {
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    list-style: none;
    overflow: hidden;
}

.modal-deployment li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
}

.modal-deployment li + li {
    border-top: 1px solid var(--line-soft);
}

.modal-deployment-name {
    flex: 0 0 auto;
    font-weight: 600;
}

.modal-deployment-detail {
    flex: 1;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.modal-scenario-metric {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) 72px 62px;
    gap: 8px;
}

.modal-scenario-metric strong {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-align: right;
}

/* A library five orders of magnitude behind prints a ratio wider than its track;
   clipping it keeps one row from setting the width of the whole table. */
.modal-scenario-metric small {
    overflow: hidden;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    text-align: right;
    text-overflow: ellipsis;
}

.modal-scenario-metric small.is-best {
    color: var(--accent);
}

/* The rating scenario by scenario, printed rather than hinted: a tooltip never
   opens on a touch screen, and this card is where the score is the subject. */
/* Wide enough for the split of a library far behind, where both halves carry
   three decimals: `2.823 + 6.296` is the longest this line gets. */
.modal-scenarios th.modal-scenario-points {
    width: 112px;
}

.modal-scenarios td.modal-scenario-points {
    font-family: 'DM Mono', monospace;
    text-align: right;
}

/* The same split fill as the standings row, but spanning the whole scenario
   row rather than just the points cell — the name and the meters explain the
   number this fills in behind, so the fill reads against all of them. */
.modal-scenarios tbody tr,
.modal-scenarios tfoot tr {
    background-image: linear-gradient(
        to right,
        var(--cyan-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points-time, 0%),
        var(--accent-soft) var(--points, 0%),
        transparent var(--points, 0%));
    background-repeat: no-repeat;
}

.modal-scenario-points strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
}

/* The split, because time and memory are separate columns in the standings. */
.modal-scenario-points small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.modal-scenarios tfoot td {
    border-top: 1px solid var(--line);
    background-color: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
}

.modal-scenarios tfoot td.modal-scenario-points {
    color: var(--text);
}

.modal-scenarios tfoot strong {
    font-size: 15px;
}

@media (max-width: 980px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    /* The column stops being a column: it is a band across the top of the page, and
       the padding moves to the blocks inside it so the Filter row and the panel can
       each carry their own and still reach both edges. */
    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
        padding: 0;
        border-right: 0;
    }

    /* "Scope · Compare" heads a column that no longer exists here, and the space it
       would take is space above the reports. */
    .sidebar > .filters-heading {
        display: none;
    }

    /* The category picker stays out of the fold. Its rows flow into as many columns
       as fit — two on a phone held upright, more sideways — so the block stays a few
       lines tall whatever the catalog holds. */
    .categories {
        padding: 12px clamp(16px, 4vw, 32px);
        border-bottom: 1px solid var(--line);
    }

    .categories .filter-section {
        display: grid;
        width: auto;
        margin-top: 0;
        padding-right: 0;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0 14px;
    }

    .categories .filter-section h3 {
        margin-bottom: 4px;
        grid-column: 1 / -1;
    }

    .categories .check-row {
        min-height: 32px;
    }

    /* The panel is a screen and a half tall here; folded away, the reports are the
       first thing on the page in both orientations. */
    .filters {
        display: none;
        padding: 28px 22px;
        border-bottom: 1px solid var(--line);
    }

    /* Out of the grid flow but still reachable from the keyboard: the label is its
       visible face. */
    .filters-toggle {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

    /* Bounded the way the desktop sidebar is bounded, so the panel scrolls inside
       itself instead of pushing the page down by a screen and a half. The control
       that closes it therefore stays a flick away, and no second one is needed. */
    .filters-toggle:checked ~ .filters {
        display: block;
        max-height: 60vh;
        overflow: auto;
        overscroll-behavior: contain;
    }

    .filters-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px clamp(16px, 4vw, 32px);
        border-bottom: 1px solid var(--line);
        background: var(--surface);
        cursor: pointer;
    }

    .filters-summary strong {
        display: block;
        font-size: 15px;
        letter-spacing: -.02em;
    }

    .filters-summary small {
        color: var(--muted);
        font-size: 11px;
    }

    .filters-summary-action {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 7px;
        padding: 7px 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius-control);
        color: var(--muted);
        font-size: 12px;
    }

    .filters-summary-action svg {
        width: 15px;
        height: 15px;
    }

    .filters-toggle:checked ~ .filters-summary .filters-summary-action {
        border-color: var(--accent);
        color: var(--accent);
    }

    .filters-toggle:focus-visible ~ .filters-summary .filters-summary-action {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    /* Five tabs and the summary come to two pixels more than a phone held sideways
       has; a little less padding removes the scroll instead of hiding it. */
    .tab {
        padding: 0 14px;
    }

    .filter-section {
        display: inline-block;
        width: min(49%, 420px);
        padding-right: 24px;
        vertical-align: top;
    }

    /* Categories and scenarios pair up on the first row and leave the libraries —
       the one list that runs to twenty rows — the full width of the folded panel,
       instead of a half-width column with a phone screen of nothing beside it. */
    .filter-section-wide {
        width: 100%;
        padding-right: 0;
    }

    /* And the width it gains goes into columns rather than into longer rows: the
       panel is bounded at 60vh, so twenty-three libraries in a single column is
       most of its scroll on a phone held sideways. */
    /* A name long enough to wrap makes its grid row taller than the rows beside
       it; aligned to the top, the short ones keep their own height instead of
       floating in the middle of it. */
    .library-group {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 0 18px;
        align-items: start;
    }

    .hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    /* The top bar goes static below, so --topbar-height no longer names a height
       anything is pinned under; a sticky strip here would float over Categories
       at whatever the top bar's wrapped height happens to be instead of stopping
       under it. */
    .tabs {
        position: static;
    }

    /* The mobile bar belongs to the document rather than to the viewport: it leaves
       the screen with Categories and the rest of the page, without changing its
       contents halfway through the gesture. */
    .page-scrolled .topbar-default {
        display: flex;
    }

    .page-scrolled .topbar-context {
        display: none;
    }

    .topbar {
        position: static;
        height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 18px;
    }

    .topbar-context {
        gap: 10px;
    }

    .context-category,
    .context-selection {
        width: 100%;
        flex-basis: auto;
    }

    .context-selection {
        padding-top: 10px;
        padding-left: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .topbar-end {
        width: 100%;
        justify-content: space-between;
    }

    /* The sticky feature column would otherwise take half of a phone screen. */
    .table-scroll {
        width: 100%;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .feature-scroll-dock.is-visible {
        position: fixed;
        z-index: 19;
        bottom: max(8px, env(safe-area-inset-bottom));
        display: block;
        height: 24px;
        padding: 8px 6px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(17, 20, 27, .94);
        box-shadow: 0 5px 18px rgba(0, 0, 0, .38);
        backdrop-filter: blur(10px);
    }

    .feature-scroll-dock-track {
        position: relative;
        height: 6px;
        border-radius: 999px;
        background: var(--surface-3);
        touch-action: none;
    }

    .feature-scroll-dock-thumb {
        position: absolute;
        top: -4px;
        left: 0;
        height: 14px;
        border: 0;
        border-radius: 999px;
        background: var(--muted);
        cursor: grab;
        touch-action: none;
    }

    .feature-scroll-dock-thumb:active {
        cursor: grabbing;
    }

    .feature-scroll-dock-thumb:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    /* Width:100% lets the table algorithm squeeze a large library set into the
       viewport. Its intrinsic width keeps every status column tappable and makes
       the existing table-scroll container the horizontal swipe surface. */
    .feature-table {
        width: max-content;
        min-width: 100%;
    }

    .feature-table thead th:not(:first-child),
    .feature-table tbody td {
        min-width: 56px;
    }

    .feature-table thead th:first-child,
    .feature-table tbody th {
        min-width: 136px;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 12px;
    }

    .release-picker {
        width: 100%;
    }

    /* The caption sits in front of the picker, so the picker itself takes what the
       row has left instead of overflowing it. */
    .release-switch {
        flex: 1;
        min-width: 0;
    }

    .workspace {
        min-height: auto;
    }

    .filters {
        padding: 22px 18px;
    }

    .filter-section {
        display: block;
        width: 100%;
    }

    /* Only the vertical part: the side padding is fluid and needs no step here. */
    .content {
        padding-top: 32px;
        padding-bottom: 60px;
    }

    .evidence-summary {
        grid-template-columns: 1fr;
    }

    .evidence-summary div + div {
        border-top: 1px solid var(--line-soft);
        border-left: 0;
    }

    .evidence-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero h1 {
        font-size: clamp(24px, 8vw, 40px);
    }

    /* The split-column selector outranks a bare .benchmark-row, so this rule has to
       match it too or the stacked layout never applies — which is what happened. */
    .benchmark-row,
    .benchmark-split-column .benchmark-row {
        grid-template-columns: 1fr 90px;
        gap: 9px;
    }

    .meter {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .benchmark-value {
        grid-column: 2;
        grid-row: 1;
    }

    /* On a phone the dialog is the screen: a floating panel would leave a strip of
       dimmed application that is too narrow to be worth keeping. */
    .modal-backdrop {
        padding: 0;
    }

    .modal-panel {
        width: 100%;
        max-height: 100%;
        height: 100%;
        border: 0;
        border-radius: 0;
    }

    .modal-head {
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .modal-head-end {
        width: 100%;
        justify-content: flex-end;
    }

    .modal-body {
        padding: 16px;
    }

    /* The standings stack too: place and library share the first line, and
       scenarios and points share a second line below it — the count and the
       number it earned, side by side — each carrying the heading it lost. */
    .rating-table table {
        min-width: 0;
    }

    .rating-table thead {
        display: none;
    }

    .rating-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 10px;
        padding: 8px 12px;
    }

    /* A generic `th, td` rule elsewhere on the page draws a border above every
       cell, meant for a row of table cells sitting side by side. Here each cell
       is a flex item that can start a wrapped line of its own — Scenarios, or
       Points behind a long name — and that border was drawing a stray seam
       above whichever cell wrapped, not just above the row as a whole. */
    .rating-table td {
        padding: 0;
        flex: 1 1 auto;
        border-top: 0;
        text-align: left;
    }

    .rating-table td.rating-column-place {
        width: auto;
        flex: 0 0 auto;
    }

    /* Wide enough to keep the numbers off this line, narrow enough to leave room
       for the place cell and the gap beside it. */
    .rating-table td.rating-column-name {
        min-width: 0;
        flex: 1 1 calc(100% - 60px);
    }

    /* Time and memory are the breakdown, not the headline: on a phone only the
       total they add up to is worth the width. The figures stay one tap away,
       in the same breakdown the library's own overview shows. */
    .rating-table td.rating-column-score {
        display: none;
    }

    /* Scenarios and points share the second line: scenarios grows to hold its
       place at the left, points rides the auto margin to the right edge, and
       neither claims the full line for itself the way the name does above. */
    .rating-table td.rating-column-scenarios {
        order: 2;
        flex: 1 1 auto;
    }

    .rating-table td.rating-column-total {
        order: 3;
        flex: 0 0 auto;
        margin-left: auto;
        text-align: right;
    }

    /* Rides in beside the points it follows on desktop too, right after the
       auto margin that pushes the total to the row's edge. */
    .rating-table td.rating-column-badge {
        order: 4;
        flex: 0 0 auto;
    }

    .rating-label {
        display: inline;
        margin-right: 5px;
        color: var(--muted);
        font-family: 'Manrope', system-ui, sans-serif;
        font-size: 10px;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    /* The table becomes a stack: the scenario takes a row of its own and the two
       metrics stay a pair below it, rather than scrolling sideways on a phone. */
    .modal-scenarios table {
        min-width: 0;
    }

    .modal-scenarios thead {
        display: none;
    }

    .modal-scenarios tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 12px;
        padding: 8px 12px;
    }

    .modal-scenarios tbody tr + tr {
        border-top: 1px solid var(--line-soft);
    }

    .modal-scenarios tbody tr + tr td {
        border-top: 0;
    }

    .modal-scenarios td {
        padding: 0;
        flex: 1 1 calc(50% - 6px);
    }

    .modal-scenarios tbody td:first-child,
    .modal-scenario-note {
        flex: 1 0 100%;
    }

    .modal-scenario-metric {
        grid-template-columns: minmax(0, 1fr) 66px 50px;
    }

    /* Stacked, the points sit on their own line under the pair of metrics. Time
       and memory are told apart by their units; points have none, so the heading
       the stack dropped comes back as a label. */
    .modal-scenarios tbody td.modal-scenario-points {
        display: flex;
        flex: 1 0 100%;
        align-items: baseline;
        justify-content: flex-end;
        gap: 8px;
    }

    .modal-scenarios tbody td.modal-scenario-points::before {
        content: 'Points';
        margin-right: auto;
        color: var(--muted);
        font-family: 'Manrope', system-ui, sans-serif;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    /* The footer keeps its own label, so it stays a two-cell row rather than
       taking the stacked layout of the body. */
    .modal-scenarios tfoot tr {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 12px;
    }

    .modal-scenarios tfoot td {
        padding: 0;
        flex: 0 1 auto;
    }

    .modal-standing-row {
        grid-template-columns: 64px minmax(0, 1fr) 48px;
        gap: 8px;
    }

    .overview-chart-legend {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .benchmark-split {
        grid-template-columns: 1fr;
    }
}

/* A phone held upright. The threshold sits well below the 829 px a phone reports in
   landscape, so nothing here reaches the horizontal orientation, where the columns
   still have room. */
@media (max-width: 560px) {
    :root {
        --pad-block: 14px;
        --pad-inner: 12px;
    }

    /* A block as wide as the screen is not a card: its side border separates it
       from nothing, and its side padding stacks on top of the page padding. Every
       one of them is bled out to the edges and given the page padding back as its
       own, so the surfaces reach the screen while their contents — and the headings
       that stand outside any block — all begin on the same vertical line. */
    .overview-report,
    .report-section,
    .benchmark-toolbar,
    .library-card,
    .notice {
        margin-right: calc(var(--pad-page) * -1);
        margin-left: calc(var(--pad-page) * -1);
        padding-right: var(--pad-page);
        padding-left: var(--pad-page);
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    /* The narrow-column padding is a two-class selector and outranks the rule above;
       on one column there is no narrow column to compensate for anyway. */
    .benchmark-split-column .report-section {
        padding-right: var(--pad-page);
        padding-left: var(--pad-page);
    }

    /* Padding comes from the tokens above; only the desktop-sized floor goes. */
    .library-card {
        min-height: 0;
    }

    /* Three columns leave 59 px for the name and 65 px for a bar that needs 96 px
       for its value alone, so the row becomes a stack: who, then how long, then
       how much. */
    .overview-chart-row {
        gap: 10px;
        grid-template-columns: minmax(0, 1fr);
        padding: 12px 10px;
    }

    .overview-chart-row + .overview-chart-row {
        border-top: 1px solid var(--line-soft);
        border-radius: 0;
    }

    .overview-chart-columns {
        display: none;
    }

    .overview-chart-points {
        text-align: left;
    }

    .overview-metric {
        grid-template-columns: 52px minmax(0, 1fr) 78px;
        gap: 10px;
    }

    .overview-metric-label {
        display: block;
        color: var(--muted);
        font-size: 10px;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .overview-metric strong {
        font-size: 12px;
        text-align: right;
    }

    .overview-bar {
        height: 18px;
    }

    /* The dialog names the metric in its own column already. */
    .modal-standing-row .overview-metric-label {
        display: none;
    }

    .modal-standing-row .overview-metric {
        grid-template-columns: minmax(0, 1fr) 78px;
    }


    .tab {
        min-height: 36px;
        padding: 0 10px;
        gap: 6px;
    }

    /* Out of the strip and onto its own line, where it stops stealing 167 px. */
    .tabs-summary {
        width: 100%;
        justify-content: start;
        margin-left: 0;
        padding: 8px 6px 2px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .tabs-summary span {
        text-align: left;
    }

    /* Two columns halve the run of radios above the numbers, and every scenario
       still stays on screen. */
    .scenario-list {
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
        gap: 0 12px;
    }

    /* A hard width, not a minimum: the longest scenario name would otherwise set
       the column and eat the room the library columns need. */
    .feature-table thead th:first-child,
    .feature-table tbody th {
        width: 112px;
        min-width: 112px;
        max-width: 112px;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 11px;
        line-height: 1.35;
    }

    .feature-table thead th,
    .feature-table tbody td {
        padding-right: 3px;
        padding-left: 3px;
    }

    .feature-table thead th .column-library-name {
        width: 40px;
    }

    .feature-table thead th .library-logo-sm {
        --logo-size: 20px;
    }

    /* Keeping the picker, the chip and the links on one line is right on a tablet,
       where the bar wraps around them; on a phone that line is wider than the
       screen. Letting the picker shrink instead of wrap keeps the header two rows
       tall — it is sticky, and a third row would cost a fifth of the screen. */
    .topbar {
        gap: 10px;
        padding: 12px 16px;
    }

    .topbar-end {
        flex-wrap: wrap;
        gap: 10px 12px;
    }

    /* Not allowed to claim the whole row: the repository links share it. The wider
       breakpoint gives it width:100%, which has to be undone here. */
    .release-picker {
        width: auto;
        min-width: 0;
        flex: 0 1 auto;
    }

    /* Hidden from the eye, kept for the accessible name: a picker of releases needs
       no caption beside it, and the caption costs a row. */
    .release-picker > .release-caption {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .release-trigger {
        width: auto;
        min-width: 0;
        max-width: 160px;
        flex: 0 1 160px;
    }

    /* The pitch is not what a phone screen is for. */
    .hero {
        margin-bottom: 22px;
    }

    .hero-copy {
        display: none;
    }
}

/* Touch input only. A pointer lands on an 18px line of text without trying; a
   fingertip does not, and the library name is the way into the card from every
   table on the page. The hit area grows and nothing moves: the negative margin
   returns exactly what the padding took. Rows here are 90px apart in the
   standings and 140px in the charts, so no two targets can overlap. */
@media (hover: none) {
    .library-open {
        padding-block: 13px;
        margin-block: -13px;
    }

    /* A fixed-size icon button cannot take padding without shrinking its glyph,
       so the hit area is an overlay instead of a box change. */
    .help-button,
    .library-info,
    .copy-link,
    .modal-close,
    .deployment-badge,
    .select-all {
        position: relative;
    }

    .help-button::after,
    .library-info::after,
    .copy-link::after,
    .modal-close::after,
    .deployment-badge::after,
    .select-all::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        min-width: 40px;
        height: 40px;
        transform: translate(-50%, -50%);
    }
}

/* A visitor who asked the OS for less motion gets none, the loading ring included:
   a still ring still reads as "loading" next to its own text, and forcing every
   transition and animation to near-zero here is simpler than tracking down each
   one this file gains. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
