/*
File          font-weight
Thin          100
ExtraLight    200
Light         300
Regular       400
Medium        500
SemiBold      600
Bold          700
ExtraBold     800
Black         900
*/
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    src: url("/fonts/montserrat.woff2") format("woff2");
}

@font-face {
    font-family: 'Montserrat';
    font-style: italic;
    font-weight: 100 900;
    src: url("/fonts/montserrat-italic.woff2") format("woff2");
}

:root {
    color-scheme: dark;
    --bg: #181a1e;
    --surface: #1b1d24;
    --surface-2: #171b24;
    --raised: #1e2330;
    --line: #242a36;
    --line-strong: #353d4d;
    --text: #eef1f6;
    --muted: #a1aabb;
    --faint: #6f798b;
    --accent: #6485a5;
    --accent-ink: #0a1122;
    --setup: #e8c467;
    --free: #6fcf97;
    --gold: #e8c467;
    --silver: #c9d0dc;
    --bronze: #d9a47c;
    --sans: Montserrat, "Segoe UI", sans-serif;
    --mono: ui-monospace, monospace;
    --radius: .25rem;
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1 {
    margin: 0;
    font-size: clamp(2.25rem, 5.4vw, 3.125rem);
    line-height: 1.02;
    letter-spacing: -.04em;
    font-weight: 500;
    text-wrap: balance;
}

h2 {
    font-weight: 600;
}

button, input, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.wrap, .constrain {
    max-width: 73.75rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.num, .clock {
    font-variant-numeric: tabular-nums;
}

.tenths {
    color: var(--muted);
}

/* page width: bands bleed full width, content constrained (replaces .wrap) */
.constrain {
    @media (min-width: 1440px) {
        max-width: 97.5rem;
    }
    @media (max-width: 760px) {
        padding: 0 1rem;
    }
}

.header {
    background: #0c1114;
    box-shadow: 0px 0px 400px #02152c;;
    border-bottom: 1px solid #0b78b3;
    .header__bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
        min-height: 4rem;
        @media (max-width: 760px) {
            flex-direction: column;
            align-items: stretch;
            gap: .625rem;
            padding-top: .75rem;
            padding-bottom: .875rem;
        }
    }
    .header__brand {
        display: flex;
        align-items: center;
        gap: .625rem;
        color: var(--text);
        font-weight: 500;
        text-decoration: none;
        font-size: 1.5rem;
    }
    .header__logo {
        flex: none;
        display: block;
        width: 32px;
        height: 32px;
    }
    .header__nav {
        display: flex;
        gap: .25rem;
    }
    .header__link {
        padding: .375rem .75rem;
        border-radius: .5rem;
        color: var(--muted);
        font-size: .875rem;
        font-weight: 600;
        text-decoration: none;
        &:hover {
            color: var(--text);
        }
        &[aria-current="page"] {
            background: var(--raised);
            color: var(--text);
        }
    }
}

.site-switch {
    margin: 0 0 1.875rem;
    padding: 1.125rem 0 1.25rem;
}

.filter-title {
    margin: 0 0 .875rem;
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: 0;
}

/* One field per line: its label, then its choices. */
.filter-body, .filter-options, .site-fields, .filter-fields {
    display: grid;
    gap: .625rem;
    align-content: start;
}

/* Options left, crawlers right; one column on phones. */
.filter-body.split {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0 2.25rem;
}

.crawler-fold {
    padding-left: 2.25rem;
    border-left: 1px solid var(--line);
}

.selector-field, .crawler-checks {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.selector-field {
    display: grid;
    grid-template-columns: 6rem auto;
    align-items: center;
    justify-content: start;
    & legend {
        float: left;
        margin: 0;
        padding: 0;
    }
}

/* The crawlers' label with Select All and Clear All beside it, then the boxes. */
.crawler-checks legend {
    float: left;
    margin: 0 1rem .625rem 0;
    padding: 0;
    line-height: 1.125rem;
}

/* Filters and crawlers: open on larger screens; each folded behind a summary on phones. */
.fold > summary {
    display: none;
}

.filters {
    min-width: 0;
}

.selector-label {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.segmented {
    display: inline-flex;
    gap: .125rem;
    padding: .1875rem;
    border: 1px solid var(--line);
    border-radius: .625rem;
    background: var(--surface);
}

/* Toggles are buttons (in-page choices) or links (other pages: site, server); .off is an unavailable link. */
.segmented label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented label {
    position: relative;
    cursor: pointer;
    &:has(input:focus-visible) {
        outline: 2px solid var(--accent);
        outline-offset: .0625rem;
    }
}

.segmented button, .segmented a, .segmented label, .segmented .off {
    padding: .375rem .75rem;
    border: 0;
    border-radius: .4375rem;
    background: transparent;
    color: var(--muted);
    font-size: .875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.segmented button:hover:not(:disabled), .segmented a:hover, .segmented label:hover:not(.off) {
    color: var(--text);
}

.segmented button.on, .segmented a.on, .segmented label.on {
    background: var(--raised);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.segmented button:disabled, .segmented .off {
    opacity: .35;
    cursor: not-allowed;
}

.check-actions {
    display: flex;
    gap: .75rem;
    line-height: 1.125rem;
}

button.link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: .8125rem;
    font-weight: 400;
    line-height: inherit;
    cursor: pointer;
    &:hover:not(:disabled) {
        text-decoration: underline;
        text-underline-offset: .1875rem;
    }
    &:disabled {
        color: var(--faint);
        cursor: default;
    }
}

.checks {
    display: grid;
    gap: .5rem;
    clear: both;
}

/* one crawler per line */
.checks label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    color: var(--text);
    font-size: .875rem;
    line-height: 1.25rem;
    cursor: pointer;
    &.off {
        color: var(--faint);
        cursor: not-allowed;
    }
}

.checks input {
    flex: none;
    width: 1rem;
    height: 1rem;
    margin: .125rem 0 0;
    accent-color: var(--accent);
}

/* centred on the first line */
.segmented.small button {
    padding: .25rem .625rem;
    font-size: .8125rem;
}

/* Hero */
.hero {
    padding: 1.75rem 0 0;
}

.wrap > section.hero {
    margin-bottom: 2rem;
}

.dek {
    max-width: 64ch;
    margin: 1.125rem 0 0;
    color: var(--muted);
    line-height: 1.55;
    text-wrap: pretty;
}

/* crawls: filter form, then title and description */
.crawl-filters {
    padding-top: 1.75rem;
    @media (max-width: 760px) {
        padding-top: 1.25rem;
    }
}

.crawl-description {
    padding-bottom: 2.5rem;
    @media (max-width: 760px) {
        padding-bottom: 2rem;
    }
    /* title spans; text and cards share the next row; one column when narrow */
    .crawl-description__layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "title title" "text cards";
        gap: 1.125rem 2.5rem;
        align-items: start;
        @media (max-width: 980px) {
            grid-template-columns: minmax(0, 1fr);
            grid-template-areas: "title" "text" "cards";
            gap: 1.125rem;
        }
    }
    .crawl-description__title {
        grid-area: title;
        font-size: clamp(1.875rem, 4vw, 2.75rem);
        letter-spacing: -.03em;
    }
    .crawl-description__text {
        grid-area: text;
        max-width: 64ch;
        margin: 0;
        color: var(--muted);
        line-height: 1.55;
        text-wrap: pretty;
        @media (max-width: 760px) {
            font-size: 1.0625rem;
        }
    }
    .highlights {
        grid-area: cards;
        @media (max-width: 980px) {
            margin-top: .375rem;
        }
        @media (max-width: 520px) {
            grid-template-columns: minmax(0, 1fr);
        }
    }
}

.missing {
    padding: 1.125rem 1.25rem;
    border: 1px solid var(--line-strong);
    border-radius: .75rem;
    background: var(--surface);
    color: var(--muted);
}

body.empty .needs-data, body.empty .highlights {
    display: none;
}

body.empty .crawl-description__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "text";
}

/* Highlight cards */
.highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .875rem;
}

.crawler-site-crawls .highlights {
    margin-top: 1.5rem;
}

@media (max-width: 520px) {
    .highlights {
        gap: .625rem;
    }
    .card {
        padding: .875rem .875rem .75rem;
    }
    .card-value {
        font-size: 1.75rem;
        & small {
            font-size: .875rem;
        }
    }
    .card-who {
        align-items: flex-start;
        font-size: .875rem;
        & .dot {
            margin-top: .375rem;
        }
    }
    .card-note {
        font-size: .75rem;
    }
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    padding: 1.125rem 1.25rem 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: left;
    transition: border-color .15s, transform .15s;
    &::before {
        content: '';
        position: absolute;
        inset: 0 0 auto;
        height: .1875rem;
        background: var(--c);
    }
    &:hover {
        border-color: var(--line-strong);
        transform: translateY(-.0625rem);
    }
}

.card-kicker {
    color: var(--muted);
    font-size: .8125rem;
    font-weight: 600;
}

.card-value {
    margin: .125rem 0 .375rem;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    & small {
        margin-left: .1875rem;
        color: var(--muted);
        font-size: 1.125rem;
        font-weight: 600;
        letter-spacing: 0;
    }
}

.card-who {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9375rem;
    font-weight: 650;
}

.card-note {
    color: var(--faint);
    font-size: .8125rem;
}

.dot {
    flex: none;
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c);
}

/* Section titles */
.section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .375rem 1.25rem;
    margin: 0 0 1rem;
    & h2 {
        margin: 0;
        font-size: 1.625rem;
        letter-spacing: -.025em;
    }
    & p {
        margin: 0;
        color: var(--muted);
        font-size: .9375rem;
    }
}

.wrap > section, .board > section {
    margin-bottom: 4rem;
}

/* Camera wall */
.wall {
    --cols: 4;
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: .625rem;
    padding: .875rem;
    border: 1px solid var(--line-strong);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #050608;
    box-shadow: inset 0 0 60px #0f1520;
}

.tile {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #2a3140;
    border-radius: .5rem;
    background: #000;
    text-align: left;
    cursor: zoom-in;
    transition: border-color .2s, box-shadow .2s, opacity .2s;
    & video {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    &:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: .125rem;
    }
}

.tile-bar {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem .5rem;
    padding: 1.375rem .5625rem .5rem;
    background: linear-gradient(to top, #000000e6 30%, transparent);
    pointer-events: none;
}

.tile-name {
    display: flex;
    align-items: center;
    gap: .4375rem;
    min-width: 0;
    font-size: .75rem;
    font-weight: 650;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap;
    & span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.tile-status {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .125rem .5rem;
    border: 1px solid #ffffff2e;
    border-radius: 6.1875rem;
    background: #0b0d12cc;
    color: #c9d0dc;
    font-size: .6875rem;
    font-weight: 650;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tile.state-setup .tile-status {
    border-color: #e8c46788;
    color: var(--setup);
}

.tile.state-crawling {
    border-color: var(--c);
    & .tile-status {
        border-color: var(--c);
        color: #fff;
    }
    & .tile-status::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--c);
        animation: pulse 1s ease-in-out infinite;
    }
}

.tile.state-done .tile-status {
    border-color: #fff;
    background: #fff;
    color: #0b0d12;
}

.tile.state-stopped .tile-status {
    border-color: #545c6b;
    background: #2a2f39;
    color: #d3d8e1;
}

@keyframes pulse {
    50% {
        opacity: .2;
    }
}

.wall-close {
    position: absolute;
    z-index: 3;
    top: 1.625rem;
    right: 1.625rem;
    padding: .4375rem .75rem;
    border: 1px solid #ffffff55;
    border-radius: .5rem;
    background: #000000cc;
    color: #fff;
    font-size: .8125rem;
    font-weight: 650;
    &:hover {
        background: #1e2638;
    }
}

.wall.focused {
    grid-template-columns: repeat(var(--others), minmax(0, 1fr));
    & .tile {
        cursor: pointer;
    }
    & .tile.is-focused {
        grid-column: 1 / -1;
        order: -1;
        aspect-ratio: auto;
        height: min(66vh, 41.25rem);
        cursor: zoom-out;
    }
    & .tile:not(.is-focused) .tile-bar {
        padding: .875rem .375rem .3125rem;
    }
    & .tile:not(.is-focused) .tile-status {
        display: none;
    }
    & .tile:not(.is-focused) .tile-name {
        font-size: .6875rem;
    }
    & .tile.is-focused .tile-bar {
        padding: 2.5rem 1rem .875rem;
    }
    & .tile.is-focused .tile-name {
        font-size: 1rem;
    }
    & .tile.is-focused .tile-status {
        padding: .25rem .6875rem;
        font-size: .8125rem;
    }
}

/* Transport: heads the wall, then pinned while the page scrolls */
.transport-sentinel {
    height: 1px;
    margin-bottom: -.0625rem;
}

/* Sticks to whichever viewport edge its place in the page is beyond: a player bar
at the bottom while reading results above the race, at the top below it. */
.transport {
    position: sticky;
    top: .625rem;
    bottom: .625rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .625rem .875rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--surface-2);
    transition: border-radius .15s, box-shadow .15s, background .15s;
    &.stuck {
        border-radius: var(--radius);
        background: #171b24e6;
        box-shadow: 0 14px 40px #000a;
        backdrop-filter: blur(.875rem);
        -webkit-backdrop-filter: blur(.875rem);
    }
}

.play {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.625rem;
    height: 2.625rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: var(--accent);
    color: var(--accent-ink);
    & svg {
        width: 1.75rem;
        height: 1.75rem;
        fill: currentColor;
    }
    &:hover {
        filter: brightness(1.1);
    }
    & .icon-pause, &.playing .icon-play {
        display: none;
    }
    &.playing .icon-pause {
        display: inline;
    }
}

.clock {
    flex: none;
    font-family: var(--mono);
    font-size: .875rem;
}

.clock-of {
    color: var(--faint);
}

.scrubber {
    --p: 0;
    position: relative;
    flex: 1;
    min-width: 7.5rem;
    height: 1.875rem;
    & input {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 1.875rem;
        margin: 0;
        background: transparent;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }
    & input::-webkit-slider-runnable-track {
        height: .25rem;
        border-radius: 6.1875rem;
        background: linear-gradient(to right, var(--accent) calc(var(--p) * 100%), #2c3342 0);
    }
    & input::-moz-range-track {
        height: .25rem;
        border-radius: 6.1875rem;
        background: #2c3342;
    }
    & input::-moz-range-progress {
        height: .25rem;
        border-radius: 6.1875rem;
        background: var(--accent);
    }
    & input::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
        margin-top: -.3125rem;
        border: 0;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0 0 4px #8fb0ff40;
        -webkit-appearance: none;
        appearance: none;
    }
    & input::-moz-range-thumb {
        width: .875rem;
        height: .875rem;
        border: 0;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0 0 4px #8fb0ff40;
    }
    & input:focus-visible {
        outline: none;
    }
    & input:focus-visible::-webkit-slider-thumb {
        box-shadow: 0 0 0 4px var(--accent);
    }
}

.ticks {
    position: absolute;
    inset: 0 .4375rem;
    z-index: 2;
    pointer-events: none;
}

.tick {
    position: absolute;
    top: 50%;
    left: calc(var(--x) * 100%);
    width: 3px;
    height: 12px;
    border-radius: .125rem;
    background: var(--c);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1.5px var(--surface-2);
    &.start {
        width: 2px;
        height: 18px;
        background: #ffffffb0;
    }
}

.ghost-button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .4375rem .6875rem;
    border: 1px solid var(--line-strong);
    border-radius: .5625rem;
    background: transparent;
    color: var(--muted);
    font-size: .8125rem;
    font-weight: 600;
    & svg {
        width: 15px;
        height: 15px;
        fill: currentColor;
    }
    &:hover {
        color: var(--text);
        border-color: #4a5467;
    }
}

.speed {
    flex: none;
    display: inline-flex;
    padding: .125rem;
    border: 1px solid var(--line);
    border-radius: .5625rem;
    & button {
        padding: .25rem .5625rem;
        border: 0;
        border-radius: .4375rem;
        background: transparent;
        color: var(--faint);
        font-size: .8125rem;
        font-weight: 650;
        font-variant-numeric: tabular-nums;
    }
    & button.on {
        background: var(--raised);
        color: var(--text);
    }
}

/* Results */
.results {
    --cols: minmax(0, 1.5fr) minmax(180px, 1.75fr) 84px 76px 80px 118px;
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.results-row {
    display: grid;
    grid-template-columns: var(--cols);
    align-items: center;
    gap: 1rem;
    padding: .875rem 1.25rem;
    border-top: 1px solid var(--line);
    transition: background .15s, opacity .15s;
}

/* Table headings: one style for results, summary, and setups. */
.results-head, .summary thead th, .setup thead th {
    color: var(--faint);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.results-head {
    padding-top: .75rem;
    padding-bottom: .75rem;
    border-top: 0;
}

.results .num {
    text-align: right;
    font-size: .9375rem;
}

.results-head .num {
    font-size: .75rem;
}

/* Sortable headings: chevrons to the right; the lit pair shows the direction. */
.sort {
    display: inline-flex;
    align-items: center;
    gap: .3125rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: inherit;
    cursor: pointer;
}

.results-head .num .sort {
    justify-content: flex-end;
}

.sort:hover, [aria-sort=ascending] > .sort, [aria-sort=descending] > .sort {
    color: var(--text);
}

.chevrons {
    flex: none;
    width: 12px;
    height: 18px;
    margin-left: 0.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    & polyline {
        opacity: .35;
        transition: opacity .15s;
    }
}

[aria-sort=ascending] .chevrons .u1, [aria-sort=ascending] .chevrons .u2,
[aria-sort=descending] .chevrons .d1, [aria-sort=descending] .chevrons .d2 {
    opacity: 1;
}

[aria-sort=ascending] .chevrons .d1, [aria-sort=ascending] .chevrons .d2,
[aria-sort=descending] .chevrons .u1, [aria-sort=descending] .chevrons .u2 {
    opacity: .15;
}

/* A crawler page's placing: 1st, 2nd, and 3rd by crawl time stand out. */
.place.top {
    font-weight: 800;
}

.place.top-1 {
    color: var(--gold);
}

.place.top-2 {
    color: var(--silver);
}

.place.top-3 {
    color: var(--bronze);
}

/* Pages and assets get one combined column only where space is tight (see .board below). */
.results .counts {
    display: none;
}

.who {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .125rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
}

.who-name {
    display: flex;
    align-items: center;
    gap: .5rem;
    max-width: 100%;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.who:hover .who-name span {
    text-decoration: underline;
    text-underline-offset: .1875rem;
}

.who-meta {
    display: flex;
    align-items: center;
    gap: .4375rem;
    max-width: 100%;
    color: var(--muted);
    font-size: .8125rem;
    white-space: nowrap;
}

/* name column is the same width every row, so timelines line up; text ends in an ellipsis only when it doesn't fit */
.who-name span, .who-meta span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.who-meta .tag {
    flex: none;
}

.tag {
    padding: .0625rem .375rem;
    border: 1px solid #e8c46770;
    border-radius: .3125rem;
    color: var(--setup);
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    &.free {
        border-color: #6fcf9770;
        color: var(--free);
    }
}

.track {
    position: relative;
    height: .625rem;
    border-radius: 6.1875rem;
    background: #1e232d;
    cursor: pointer;
    &::before {
        content: '';
        position: absolute;
        inset: -.5rem 0;
    }
    & > span {
        position: absolute;
        top: 0;
        height: 100%;
        border-radius: 6.1875rem;
    }
    & .span {
        left: calc(var(--s) * 100%);
        width: calc((var(--e) - var(--s)) * 100%);
        background: var(--c);
        opacity: .2;
    }
    & .fill {
        left: calc(var(--s) * 100%);
        width: calc((var(--f) - var(--s)) * 100%);
        background: var(--c);
    }
    & .prep {
        top: .1875rem;
        left: calc(var(--cs) * 100%);
        width: calc((var(--ce) - var(--cs)) * 100%);
        min-width: .1875rem;
        height: .25rem;
        background: var(--setup);
        opacity: .7;
    }
    & .end {
        top: 50%;
        left: calc(var(--e) * 100%);
        width: .875rem;
        height: .875rem;
        border: 2px solid var(--surface);
        border-radius: 50%;
        background: #fff;
        opacity: 0;
        transform: translate(-50%, -50%) scale(.4);
        transition: opacity .15s, transform .15s;
    }
}

.results-row.done .track .end {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* JavaScript rendering: hatched bars, so the brand color stays the crawler's. */
.results-row.js .track .span, .results-row.js .track .fill {
    background: repeating-linear-gradient(-45deg, var(--c) 0 4px, transparent 4px 7px);
}

.results-row.stopped .track .fill {
    background: #7d8697;
}

.results-row.stopped .track .end {
    display: grid;
    place-items: center;
    background: #7d8697;
    color: #10131a;
    font-size: .6875rem;
    font-weight: 900;
    line-height: 1;
    &::after {
        content: '×';
    }
}

.time.num {
    font-weight: 700;
}

.stopped-note {
    grid-column: span 3;
    color: var(--muted);
    font-size: .875rem;
    text-align: right;
}

.results-cursor {
    --p: 0;
    position: absolute;
    top: 2.75rem;
    bottom: .625rem;
    left: calc(var(--tl, 0px) + var(--p) * var(--tw, 0px));
    width: 1px;
    background: #ffffffa0;
    pointer-events: none;
}

/* Chart */
.chart-card {
    padding: 1rem 1.25rem .875rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.chart-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .625rem;
    margin-bottom: .75rem;
}

.chart-shell {
    position: relative;
    height: 27.5rem;
}

#chart {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.chart-cursor {
    position: absolute;
    width: 1px;
    background: #ffffffb0;
    pointer-events: none;
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    color: var(--muted);
}

/* Method */
.notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.375rem 3rem;
    margin: 0;
    & dt {
        margin-bottom: .1875rem;
        color: var(--faint);
        font-size: .75rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    & dd {
        margin: 0;
        color: #cfd5df;
        font-size: .9375rem;
        line-height: 1.6;
    }
}

/* Sites: each mirror's homepage thumbnail (4:3), host, and size. */
.site-list {
    display: grid;
    gap: .75rem;
    margin: .375rem 0 0;
    padding: 0;
    list-style: none;
    & li {
        display: flex;
        align-items: center;
        gap: .875rem;
    }
    & img {
        flex: none;
        width: 96px;
        height: 72px;
        border: 1px solid var(--line);
        border-radius: .375rem;
        object-fit: cover;
        object-position: top;
        background: #fff;
    }
    & li:not(.current) img {
        opacity: .55;
    }
}

.site-text {
    display: grid;
    gap: .0625rem;
    min-width: 0;
    line-height: 1.4;
}

.site-name {
    color: var(--text);
    font-size: .9375rem;
    font-weight: 650;
}

.site-host {
    overflow: hidden;
    color: var(--muted);
    font-size: .8125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    & a {
        color: inherit;
        text-decoration: underline;
        text-decoration-color: var(--line-strong);
        text-underline-offset: .1875rem;
    }
    & a:hover {
        color: var(--text);
    }
}

.site-counts {
    display: flex;
    gap: .875rem;
    margin-top: .1875rem;
    color: var(--faint);
    font-size: .75rem;
    & b {
        margin-right: .1875rem;
        color: var(--text);
        font-size: .875rem;
        font-weight: 650;
        font-variant-numeric: tabular-nums;
    }
}

.site-served {
    margin: .75rem 0 0;
    color: var(--muted);
    font-size: .875rem;
}

/* test machines: like the site list, quieter (small OS icon in a tile) */
.machines {
    display: grid;
    gap: .625rem;
    margin: .375rem 0 0;
    padding: 0;
    list-style: none;
    .machines__item {
        display: flex;
        align-items: center;
        gap: .75rem;
    }
    .machines__icon {
        flex: none;
        display: grid;
        place-items: center;
        width: 2.5rem;
        height: 2.5rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        img {
            display: block;
            width: 22px;
            height: 22px;
            opacity: .85;
        }
    }
    .machines__text {
        display: grid;
        gap: .0625rem;
        min-width: 0;
        line-height: 1.4;
    }
    .machines__name {
        color: var(--text);
        font-size: .9375rem;
        font-weight: 650;
    }
    .machines__specs {
        color: var(--muted);
        font-size: .8125rem;
    }
}

.more {
    margin: 1.375rem 0 0;
    color: var(--muted);
    font-size: .9375rem;
}

.notes .more {
    margin: .75rem 0 0;
    font-size: .875rem;
}

/* Long-form pages: How It’s Measured, Add a Crawler */
.prose {
    display: grid;
    gap: 2.5rem;
    max-width: 72ch;
    margin-bottom: 4rem;
    & h2 {
        margin: 0 0 .625rem;
        font-size: 1.375rem;
        letter-spacing: -.02em;
    }
    & p, & li {
        color: #cfd5df;
        font-size: 1rem;
        line-height: 1.65;
    }
    & p {
        margin: 0 0 .75rem;
    }
    & ul {
        margin: 0 0 .75rem;
        padding-left: 1.25rem;
    }
}

/* row rules run edge to edge; the inset lives on the outer cells */
.setup {
    padding: .25rem 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow-x: auto;
    & table {
        width: 100%;
        border-collapse: collapse;
        font-size: .875rem;
    }
    & th {
        padding: .75rem 1rem .625rem 0;
        text-align: left;
        white-space: nowrap;
    }
    & td {
        padding: .6875rem 1rem .6875rem 0;
        border-top: 1px solid var(--line);
        color: #cfd5df;
        vertical-align: top;
    }
    & :is(th, td):first-child {
        padding-left: 1.25rem;
    }
    & :is(th, td):last-child {
        padding-right: 1.25rem;
    }
    & td:first-child {
        color: var(--text);
        font-weight: 600;
        white-space: nowrap;
    }
    & td:nth-child(2), & td:nth-child(3), & td:nth-child(4) {
        white-space: nowrap;
    }
    & td:first-child .dot {
        margin-right: .5rem;
    }
}

/* Footer */
/* mirrors .header: full-bleed band, border on the inside edge */
.footer {
    background: #0c1114;
    border-top: 1px solid #0b78b3;
    color: var(--faint);
    font-size: .8125rem;
    .footer__inner {
        padding-top: 1.75rem;
        padding-bottom: 3rem;
    }
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
    gap: 1.25rem 3rem;
    margin-bottom: 1.75rem;
}

.footer-head {
    margin: 0;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    & a {
        color: var(--faint);
        text-decoration: none;
    }
}

.footer-links ul {
    display: grid;
    gap: .375rem;
    margin: .625rem 0 0;
    padding: 0;
    list-style: none;
}

.footer-links li a {
    color: var(--muted);
    font-size: .875rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-disclosure {
    max-width: 44ch;
    margin: 1.125rem 0 0;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.6;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .625rem 1.5rem;
}

kbd {
    display: inline-block;
    min-width: 1.25rem;
    padding: 0 .3125rem;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: .3125rem;
    color: var(--muted);
    font: 600 .6875rem/1.125rem var(--sans);
    text-align: center;
}

/* Links in running text and tables */
/* Link underlines are the text's own color. */
.setup td a, .facts a, .blurb a, .summary a, .more a, .prose a, .footer-disclosure a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .1875rem;
}

.setup td a:hover, .facts a:hover, .blurb a:hover, .summary a:hover, .more a:hover, .prose a:hover, .footer-disclosure a:hover {
    text-decoration-thickness: 2px;
}

/* Crawler pages */
.crawler-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.5rem 3rem;
    align-items: start;
    margin-top: 1.875rem;
}

/* Vendor's words: a hanging quote mark, set in light italic, credited below. */
.blurb {
    --mark: 2.5rem;
    position: relative;
    margin: 0;
    padding: .125rem 0 0 calc(var(--mark) + 1.125rem);
    /* quote.svg as a mask, so the mark takes the accent gradient */
    &::before {
        content: "";
        position: absolute;
        top: -0.6rem;
        left: -0.125rem;
        width: var(--mark);
        aspect-ratio: 1;
        background: linear-gradient(150deg, #c4d4ff 0%, var(--accent) 40%, #4f6fd6 100%);
        -webkit-mask: url("/images/icons/quote.svg") center / contain no-repeat;
        mask: url("/images/icons/quote.svg") center / contain no-repeat;
    }
    & blockquote {
        margin: 0;
    }
    & p {
        margin: 0;
        color: var(--text);
        font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem);
        font-style: italic;
        font-weight: 350;
        line-height: 1.42;
        letter-spacing: -.012em;
        text-wrap: pretty;
    }
    & figcaption {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .375rem .75rem;
        margin-top: 1.125rem;
        color: var(--muted);
        font-size: .875rem;
        /* a short rule leads into the credit */
        &::before {
            content: "";
            width: 0.75rem;
            height: 2px;
            border-radius: 1px;
            background: linear-gradient(90deg, var(--accent), transparent);
        }
    }
    & .blurb-credit {
        color: var(--faint);
        font-size: .6875rem;
        font-weight: 700;
        letter-spacing: .12em;
        text-transform: uppercase;
    }
}

.facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0;
    margin: 0;
    font-size: .9375rem;
    & > div {
        display: contents;
    }
    & dt, & dd {
        padding: .5rem 0;
    }
    & dt {
        padding-right: 1.5rem;
        color: var(--faint);
        font-size: .75rem;
        font-weight: 700;
        letter-spacing: .08em;
        line-height: 1.375rem;
        text-transform: uppercase;
    }
    & dd {
        margin: 0;
        color: #cfd5df;
    }
}

.wrap > section.crawler-summary, .wrap > section.crawler-site-crawls {
    margin-bottom: 2.5rem;
}

.lead {
    max-width: 72ch;
    margin: 0 0 1.125rem;
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.55;
}

.summary-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.summary {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    & th, & td {
        padding: .75rem 1rem;
        border-top: 1px solid var(--line);
        text-align: left;
        vertical-align: top;
    }
    & thead th {
        border-top: 0;
        white-space: nowrap;
    }
    & tbody th {
        color: var(--text);
        font-weight: 600;
        white-space: nowrap;
    }
    & tbody th .dot {
        margin-right: .5rem;
    }
    & tbody th small {
        display: block;
        margin: .125rem 0 0 1.0625rem;
        color: var(--faint);
        font-weight: 500;
    }
    & td .time {
        display: block;
        font-size: .9375rem;
        font-variant-numeric: tabular-nums;
    }
    & td .place {
        color: var(--faint);
        font-size: .75rem;
    }
    & td.none {
        color: var(--faint);
    }
}

.crawler-site-crawls .site-switch {
    margin: 1.125rem 0 0;
}

.crawler-site-crawls .dek {
    margin-top: 0;
}

.crawler-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21.25rem, 1fr));
    gap: .875rem;
    margin: 0 0 4rem;
    padding: 0;
    list-style: none;
    & a {
        display: flex;
        flex-direction: column;
        gap: .375rem;
        height: 100%;
        padding: 1.25rem 1.375rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        color: inherit;
        text-decoration: none;
        transition: border-color .15s;
        &:hover {
            border-color: var(--line-strong);
        }
    }
    & .name {
        font-size: 1.25rem;
        font-weight: 600;
        letter-spacing: -.015em;
    }
    & .meta {
        color: var(--faint);
        font-size: .8125rem;
    }
    & .blurb-line {
        color: #cfd5df;
        font-size: .9375rem;
        line-height: 1.5;
    }
    & .card-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        margin-top: auto;
        padding-top: .375rem;
        /* On the card's bottom edge */
    }
    & .price-tags {
        display: flex;
        gap: .375rem;
    }
}

.platforms {
    display: flex;
    align-items: center;
    gap: .5rem;
    & img {
        display: block;
        width: 16px;
        height: 16px;
    }
}

/* Wide screens: a wider page, with the results beside the chart; the chart
stays in view while the table scrolls. */
@media (min-width: 1440px) {
    .wrap {
        max-width: 97.5rem;
    }
    .board {
        display: grid;
        grid-template-columns: minmax(0, 1.55fr) minmax(27.5rem, 1fr);
        gap: 1.5rem;
        align-items: start;
        & > .resources {
            position: sticky;
            top: 1.25rem;
        }
    }
    /* Beside the chart the table has ~830px: pages and assets share one column. */
    .board .results {
        --cols: minmax(0, 1.3fr) minmax(120px, 1.1fr) 80px 132px 126px;
    }
    .board .results-row {
        gap: .75rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .board .results .pages, .board .results .assets {
        display: none;
    }
    .board .results .counts {
        display: block;
    }
    .board .results .stopped-note {
        grid-column: span 2;
    }
    .wall {
        grid-template-columns: repeat(var(--cols-wide, var(--cols)), minmax(0, 1fr));
    }
    .board .chart-shell {
        height: 25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tile.state-crawling .tile-status::before {
        animation: none;
    }
    .card, .card:hover {
        transform: none;
    }
}

@media (max-width: 980px) {
    .results {
        --cols: minmax(0, 1.2fr) minmax(140px, 1fr) 80px 70px 74px 108px;
    }
    .results-row {
        gap: .75rem;
        padding-left: .875rem;
        padding-right: .875rem;
    }
    .notes {
        grid-template-columns: 1fr;
    }
    .crawler-intro {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .wrap {
        padding: 0 1rem;
    }
    .site-switch {
        padding: .875rem;
    }
    .filter-body.split {
        grid-template-columns: 1fr;
        gap: .75rem;
    }
    .selector-field {
        grid-template-columns: 4.75rem minmax(0, 1fr);
    }
    .crawler-fold {
        padding-left: 0;
        border-left: 0;
    }
    .site-switch .segmented {
        display: flex;
    }
    .fold > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .625rem .875rem;
        border: 1px solid var(--line);
        border-radius: .625rem;
        background: var(--surface);
        color: var(--text);
        font-size: .875rem;
        font-weight: 650;
        cursor: pointer;
        list-style: none;
        &::-webkit-details-marker {
            display: none;
        }
        & .count {
            margin-right: auto;
            margin-left: .375rem;
            color: var(--accent);
            font-weight: 600;
        }
        &::after {
            content: "";
            width: .5rem;
            height: .5rem;
            border-right: 2px solid var(--muted);
            border-bottom: 2px solid var(--muted);
            transform: translateY(-.125rem) rotate(45deg);
            transition: transform .15s;
        }
    }
    .fold[open] > summary::after {
        transform: translateY(.125rem) rotate(-135deg);
    }
    .fold[open] > summary {
        margin-bottom: .75rem;
    }
    .site-switch .segmented label, .site-switch .segmented a, .site-switch .segmented .off {
        flex: 1;
        padding: .375rem .375rem;
        font-size: .8125rem;
    }
    .hero {
        padding: 1.25rem 0 0;
    }
    .wrap > section.hero {
        margin-bottom: 1.5rem;
    }
    .dek {
        font-size: 1.0625rem;
    }
    .card-value {
        font-size: 2.125rem;
    }
    .wrap > section {
        margin-bottom: 3rem;
    }
    .wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
        padding: .5rem;
        &.focused {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
        &.focused .tile.is-focused {
            height: auto;
            aspect-ratio: 4 / 3;
        }
    }
    .wall-close {
        top: .875rem;
        right: .875rem;
    }
    .transport {
        bottom: auto;
        flex-wrap: wrap;
        gap: .5rem .75rem;
    }
    /* no bottom bar on phones */
    .scrubber {
        order: 5;
        flex-basis: 100%;
    }
    .ghost-button span {
        display: none;
    }
    .speed {
        margin-left: auto;
    }
    .results-head {
        display: none;
    }
    .results-cursor {
        display: none;
    }
    .results-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "who time" "track track" "stats stats";
        gap: .625rem .625rem;
        & > .who {
            grid-area: who;
        }
        & > .track {
            grid-area: track;
        }
        & > .time, & > .stopped-note {
            grid-area: time;
            align-self: start;
        }
        & > .stat {
            display: none;
        }
        & > .stats {
            grid-area: stats;
            display: flex;
            flex-wrap: wrap;
            gap: .25rem .875rem;
            color: var(--muted);
            font-size: .8125rem;
        }
        &.stopped {
            grid-template-areas: "who who" "track track" "note note" "stats stats";
        }
        &.stopped > .stopped-note {
            grid-area: note;
            font-size: .8125rem;
            text-align: left;
        }
    }
    .chart-shell {
        height: 20rem;
    }
    .chart-card {
        padding: .75rem .75rem .625rem;
    }
    /* setups: one block per run, each value under its label */
    .setup {
        padding: .25rem 0;
        & table, & tbody, & tr, & td {
            display: block;
        }
        & thead {
            display: none;
        }
        & tr {
            padding: .75rem 1rem;
            border-top: 1px solid var(--line);
        }
        & tr:first-child {
            border-top: 0;
        }
        & td {
            display: grid;
            grid-template-columns: 4.75rem minmax(0, 1fr);
            gap: .75rem;
            padding: .125rem 0;
            border-top: 0;
            font-size: .8125rem;
            white-space: normal;
        }
        & td:is(:first-child, :last-child) {
            padding-left: 0;
            padding-right: 0;
        }
        & td::before {
            content: attr(data-label);
            color: var(--faint);
            font-size: .75rem;
            font-weight: 600;
        }
        & td:first-child {
            display: block;
            padding-bottom: .375rem;
            font-size: .9375rem;
        }
        & td:first-child::before {
            content: none;
        }
    }
}

@media (min-width: 761px) {
    .results-row > .stats {
        display: none;
    }
}

/* Phones: fact labels sit above their values instead of squeezing them. */
@media (max-width: 520px) {
    .selector-field {
        grid-template-columns: minmax(0, 1fr);
        gap: .375rem;
    }
    /* mark above the words, not beside them */
    .blurb {
        --mark: 3rem;
        padding: calc(var(--mark) - .25rem) 0 0;
    }
    /* label above its choices */
    .facts {
        grid-template-columns: 1fr;
        & dt {
            padding-bottom: 0;
            line-height: 1.125rem;
        }
        & dd {
            padding-top: .125rem;
            border-top: 0;
        }
    }
}
