:root {
    --bg: #000;
    --ink: #f2f2f0;
    --muted: #9a9a9f;
    --quiet: #7c7c83;
    --hairline: rgba(255, 255, 255, 0.15);
    --hairline-strong: rgba(255, 255, 255, 0.28);
    --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --container: 1240px;

    /* Runsheet's own dark theme. The page shell never uses these: they belong
       to the product, so they appear only inside the sheet. */
    --sheet-canvas: #0f1114;
    --sheet-panel: #16191d;
    --sheet-field: #2c323a;
    --sheet-field-line: #7a889b;
    --sheet-grid: #2f353e;
    --sheet-rule: #707c8b;
    --sheet-fg: #f8fafc;
    --sheet-fg-2: #cfd6e0;
    --sheet-muted: #b0b9c7;
    --sheet-computed: #5ed5c8;
    --sheet-best: #c77dff;
    --sheet-ref: #60a5fa;
    --sheet-live: #052e16;
    --sheet-live-line: #16a34a;
    --sheet-control: #3e4651;
    --sheet-hover: #292e34;
    --sheet-selected: #373d45;
    --sheet-action: #e8002d;
    --sheet-ok: #4ade80;
    --sheet-warn: #fbbf24;
    --sheet-warn-bg: #451a03;
    --sheet-over: #f87171;
    --sheet-over-bg: #450a0a;
    --sheet-over-line: #dc2626;
    --sheet-info-bg: #172554;
    --sheet-info-line: #2563eb;
    --sheet-pit: #fbbf24;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--ink);
    color: var(--bg);
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #3a3a3e;
}

.wrap {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    transform: translateY(-160%);
    padding: 12px 16px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skip-link:focus {
    transform: translateY(0);
}

.label {
    color: var(--quiet);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.unit {
    text-transform: none;
}

/* ---------- hero ---------- */

.hero {
    border-bottom: 1px solid var(--hairline);
}

.hero-shell {
    padding: 32px 0 88px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.wordmark {
    display: inline-flex;
    flex: 0 0 auto;
    width: 285px;
}

.wordmark svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Set in the units of the mark: the capitals are as tall as the MSS letters. */
.wordmark-name {
    fill: #fff;
    font-family: var(--display);
    font-size: 125px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.page-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    color: var(--quiet);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.page-nav a {
    transition: color 160ms ease;
}

.page-nav a:hover,
.page-nav .page-nav-go {
    color: var(--ink);
}

.hero-head {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(40px, 6vw, 96px);
    padding: clamp(56px, 7vh, 96px) 0 48px;
}

.hero h1,
.phase h2,
.section-copy h2 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: 0.002em;
    text-wrap: balance;
}

.hero h1 {
    font-size: clamp(4.2rem, 6.6vw, 6.6rem);
    line-height: 0.91;
}

.hero h1 span {
    display: block;
    white-space: nowrap;
}

.hero-side > p {
    max-width: 46ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.button {
    min-height: 54px;
    padding: 0 26px;
    border: 1px solid var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.13em;
    line-height: 1;
    text-transform: uppercase;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary {
    background: var(--ink);
    color: var(--bg);
}

.button-primary:hover {
    border-color: #cfcfcd;
    background: #cfcfcd;
}

.button-secondary {
    border-color: #38383d;
    background: transparent;
    color: var(--ink);
}

.button-secondary:hover {
    border-color: var(--ink);
}

.button[aria-disabled="true"] {
    border-color: #38383d;
    background: transparent;
    color: var(--quiet);
    pointer-events: none;
}

.hero-side .availability {
    margin-top: 20px;
    color: var(--quiet);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- the sheet ---------- */

.sheet-frame {
    border: 1px solid var(--hairline-strong);
    background: var(--sheet-canvas);
    color: var(--sheet-fg-2);
    font-size: 12px;
}

.sheet-bar,
.sheet-summary,
.sheet-run {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 32px;
    padding: 0 20px;
    border-bottom: 1px solid var(--sheet-grid);
}

.sheet-bar {
    min-height: 44px;
    justify-content: space-between;
    background: var(--sheet-panel);
    color: var(--sheet-muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sheet-event {
    display: flex;
    flex-wrap: wrap;
    gap: 0 12px;
}

.sheet-event span + span::before {
    content: "·";
    margin-right: 12px;
    color: var(--sheet-rule);
}

.sheet-event span:first-child {
    color: var(--sheet-fg);
    font-weight: 600;
}

.sheet-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.sheet-state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sheet-rule);
}

.sheet.is-running .sheet-state {
    color: var(--sheet-ok);
}

.sheet.is-running .sheet-state::before {
    background: var(--sheet-ok);
}

.sheet-summary {
    min-height: 46px;
}

.sheet-summary div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.sheet-summary dt,
.sheet-key {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.sheet-summary dt {
    color: var(--sheet-computed);
}

.sheet-summary dd {
    color: var(--sheet-fg);
    font-size: 14px;
    font-weight: 600;
}

.sheet-summary .sheet-note {
    color: var(--sheet-muted);
    font-size: 11px;
    font-weight: 400;
}

/* What belongs to a driver takes the colour of the driver. */
.sheet .is-owned {
    color: var(--c, var(--driver));
}

.sheet-run {
    min-height: 54px;
    color: var(--sheet-fg-2);
}

.sheet-run-name {
    color: var(--sheet-fg);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sheet-key {
    margin-right: 8px;
    color: var(--sheet-muted);
}

.sheet-field {
    display: inline-flex;
    align-items: center;
}

.sheet-field input {
    width: 72px;
}

.sheet input,
.sheet select {
    height: 26px;
    padding: 0 4px;
    border: 1px solid var(--sheet-field-line);
    border-radius: 3px;
    background: var(--sheet-field);
    color: var(--sheet-fg);
    font-family: var(--mono);
    font-size: 12px;
    text-align: center;
    outline: none;
    transition: border-color 100ms ease;
}

.sheet select {
    width: 100%;
    max-width: 132px;
    text-align-last: center;
    cursor: pointer;
}

/* Where the sheet is only for reading, a choice is shown as a plain value. */
.sheet select:disabled {
    opacity: 1;
    cursor: default;
    -webkit-appearance: none;
    appearance: none;
}

.sheet.is-editable input:hover,
.sheet.is-editable select:hover {
    border-color: var(--sheet-fg-2);
}

.sheet input:focus-visible,
.sheet select:focus-visible {
    border-color: var(--sheet-fg);
    box-shadow: 0 0 0 1px var(--sheet-fg);
}

.sheet-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sheet-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sheet-switch i {
    position: relative;
    width: 26px;
    height: 14px;
    border-radius: 7px;
    background: var(--sheet-control);
    transition: background-color 120ms ease;
}

.sheet-switch i::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sheet-fg-2);
    transition: transform 120ms ease;
}

.sheet-switch[aria-pressed="true"] i {
    background: var(--sheet-action);
}

.sheet-switch[aria-pressed="true"] i::after {
    background: #fff;
    transform: translateX(12px);
}

.sheet-button,
.sheet-tabs button {
    height: 26px;
    padding: 0 12px;
    border: 1px solid var(--sheet-control);
    border-radius: 6px;
    background: transparent;
    color: var(--sheet-fg);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 100ms ease, border-color 100ms ease;
}

.sheet-button:hover {
    background: var(--sheet-hover);
}

.sheet-button[aria-pressed="true"] {
    border-color: var(--sheet-rule);
    background: var(--sheet-selected);
}

/* In the app red is kept for the action that creates something. */
.sheet-button-go {
    border-color: transparent;
    background: var(--sheet-action);
    color: #fff;
}

.sheet-button-go:hover {
    background: #c0001f;
}

.sheet-button:disabled {
    border-color: var(--sheet-control);
    background: #1f2328;
    color: var(--sheet-rule);
    cursor: not-allowed;
}

.sheet-button:focus-visible,
.sheet-tabs button:focus-visible {
    outline: 2px solid var(--sheet-fg);
    outline-offset: 2px;
}

.sheet-title {
    color: var(--sheet-fg-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---------- the session view: graph and run ---------- */

.sheet-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}

.sheet-graph {
    padding: 16px 20px 10px;
    border-right: 1px solid var(--sheet-grid);
}

.sheet-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    min-height: 28px;
}

.sheet-tabs {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--sheet-control);
    border-radius: 6px;
}

.sheet-tabs button {
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    color: var(--sheet-muted);
}

.sheet-tabs button:hover {
    color: var(--sheet-fg);
}

.sheet-tabs button[aria-pressed="true"] {
    background: var(--sheet-selected);
    color: var(--sheet-fg);
}

.sheet-tools .sheet-button {
    margin-left: auto;
}

/* A control that needs the script is shown once the script is there. */
.sheet:not(.is-ready) .sheet-tabs,
.sheet:not(.is-ready) .sheet-tools .sheet-button {
    visibility: hidden;
}

/* The relative adjustments act on what is typed: where nothing can be typed, they are not offered. */
.sheet:not(.is-editable) .sheet-switch {
    display: none;
}

.sheet-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin-top: 14px;
    color: var(--sheet-fg-2);
    font-size: 11px;
}

.sheet-keys span::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 8px;
    margin-right: 8px;
    border-radius: 2px;
    background: var(--c);
}

/* The box is set here and the graph is drawn to fit it, one unit to the pixel. */
.sheet-graph svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 10 / 7;
    margin-top: 6px;
}

.graph-grid {
    stroke: var(--sheet-grid);
    stroke-width: 1;
}

.graph-label {
    fill: var(--sheet-muted);
    font-family: var(--mono);
    font-size: 10.5px;
}

/* Where two lines cross, the one above stays apart from the one below. */
.graph-halo {
    fill: none;
    stroke: var(--sheet-canvas);
    stroke-linejoin: round;
    stroke-width: 4;
}

.graph-line {
    fill: none;
    stroke: var(--c);
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.graph-dot {
    fill: var(--c);
}

.graph-best {
    stroke: var(--sheet-best);
    stroke-dasharray: 5 5;
    stroke-width: 1;
    opacity: 0.8;
}

/* ---------- the race view: strip and laps ---------- */

.race-strip {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--sheet-grid);
}

.race-strip > div {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 12px 20px;
    border-right: 1px solid var(--sheet-grid);
}

.race-strip > div:last-child {
    border-right: 0;
}

.race-strip dt {
    color: var(--sheet-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.race-strip dd {
    color: var(--sheet-fg);
    font-size: 14px;
    font-weight: 600;
}

.race-strip .race-big {
    font-size: 21px;
    letter-spacing: 0.02em;
}

.race-strip .sheet-note {
    color: var(--sheet-muted);
    font-size: 11px;
    font-weight: 400;
}

.race-block.is-ok {
    background: var(--sheet-live);
}

.race-block.is-ok dd:not(.sheet-note),
.sheet tbody td.is-ok {
    color: var(--sheet-ok);
}

.race-block.is-warn {
    background: var(--sheet-warn-bg);
}

.race-block.is-warn dd:not(.sheet-note),
.sheet tbody td.is-warn,
.race-driving.is-warn {
    color: var(--sheet-warn);
}

.race-block.is-over {
    background: var(--sheet-over-bg);
}

.race-block.is-over dd:not(.sheet-note),
.race-big.is-over,
.sheet tbody td.is-over,
.sheet tbody td.is-slower,
.sheet tbody td.is-overrun,
.race-driving.is-over {
    color: var(--sheet-over);
}

.race-big.is-warn {
    color: var(--sheet-warn);
}

.race-block.is-info {
    background: var(--sheet-info-bg);
}

.race-block.is-info dd:not(.sheet-note) {
    color: var(--sheet-ref);
}

.sheet tbody td.is-faster {
    color: var(--sheet-ok);
}

.race-driving {
    display: block;
    font-size: 12px;
    line-height: 1.6;
}

.race-strip b {
    color: var(--c);
    font-weight: 700;
}

.race-driving i {
    margin-left: 6px;
    color: var(--sheet-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    white-space: nowrap;
}

.sheet-badge {
    display: inline-flex;
    justify-content: center;
    min-width: 58px;
    padding: 2px 6px;
    border: 1px solid var(--sheet-control);
    border-radius: 3px;
    background: var(--sheet-panel);
    color: var(--sheet-fg);
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* The window is open: the car may stop. */
.sheet-badge.is-open {
    border-color: var(--sheet-live-line);
    background: var(--sheet-live);
    color: var(--sheet-ok);
}

.sheet-badge.is-closed {
    border-color: var(--sheet-over-line);
    background: var(--sheet-over-bg);
    color: var(--sheet-over);
}

.sheet-badge.is-fuel {
    border-color: #b45309;
    background: var(--sheet-warn-bg);
    color: var(--sheet-warn);
}

.sheet-badge.is-time {
    border-color: var(--sheet-info-line);
    background: var(--sheet-info-bg);
    color: var(--sheet-ref);
}

.sheet tbody td.is-ok {
    background: var(--sheet-live);
}

.sheet tbody td.is-warn {
    background: var(--sheet-warn-bg);
}

.sheet tbody td.is-over {
    background: var(--sheet-over-bg);
}

/* A lap that has not been driven: nothing in it can be typed, and nothing in it is saved. */
.sheet tbody tr.is-forecast th,
.sheet tbody tr.is-forecast td {
    border-bottom-style: dashed;
    border-bottom-color: rgba(96, 165, 250, 0.4);
    background: rgba(96, 165, 250, 0.07);
    color: var(--sheet-ref);
}

.sheet tbody tr.is-forecast b {
    font-weight: 600;
}

.forecast-tag,
.sheet-legend .key-forecast {
    padding: 0 3px;
    border: 1px solid var(--sheet-info-line);
    border-radius: 2px;
    background: var(--sheet-info-bg);
    color: var(--sheet-ref);
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 12px;
}

.forecast-tag {
    margin-right: 5px;
}

.sheet-race thead th,
.sheet-plan thead th {
    height: 52px;
}

.sheet-race tbody th,
.sheet-race tbody td,
.sheet-plan tbody th,
.sheet-plan tbody td {
    height: 34px;
}

.sheet .col-stint {
    width: 56px;
    color: var(--sheet-muted);
}

.sheet-scroll {
    overflow-x: auto;
}

.sheet table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.sheet caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.sheet thead th {
    height: 42px;
    padding: 4px 6px;
    border-bottom: 2px solid var(--sheet-rule);
    background: var(--sheet-panel);
    color: var(--sheet-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
    line-height: 1.25;
    text-transform: uppercase;
}

.sheet thead .is-computed {
    color: var(--sheet-computed);
}

.sheet tbody th,
.sheet tbody td {
    height: 36px;
    padding: 0 6px;
    border-bottom: 1px solid var(--sheet-grid);
    text-align: center;
}

.sheet th + th,
.sheet th + td,
.sheet td + td {
    border-left: 1px solid var(--sheet-grid);
}

.sheet tbody tr:last-child th,
.sheet tbody tr:last-child td {
    border-bottom: 0;
}

.sheet .col-lap {
    width: 64px;
}

.sheet tbody th {
    color: var(--sheet-muted);
    font-weight: 400;
    white-space: nowrap;
}

.lap-number {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
}

.sheet .lap-tag {
    margin-left: 3px;
    color: var(--sheet-ref);
    font-size: 10px;
    font-style: italic;
}

/* Faster or slower than the lap before. The arrow keeps its room when it is not there. */
.trend {
    flex: 0 0 auto;
    width: 9px;
    margin-left: 2px;
    font-size: 10px;
    line-height: 1;
    text-align: center;
}

.trend.is-faster {
    color: var(--sheet-ok);
}

.trend.is-slower {
    color: var(--sheet-over);
}

.trend.is-behind {
    color: var(--sheet-warn);
}

.cell-field {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-field input {
    flex: 1 1 auto;
    min-width: 0;
}

.sheet tbody tr.is-waiting th {
    color: var(--sheet-rule);
}

.sheet tbody input {
    width: 100%;
    max-width: 132px;
}

.sheet tbody .is-computed,
.sheet tbody .col-pit {
    color: var(--sheet-fg);
    font-weight: 600;
}

.sheet tbody .is-missing {
    color: var(--sheet-rule);
    font-weight: 400;
}

.sheet tbody .is-ref {
    color: var(--sheet-ref);
    font-size: 10px;
    font-weight: 500;
}

.sheet tbody input.is-best {
    color: var(--sheet-best);
    font-weight: 600;
}

/* The best of a run or of a stint, where it is not the best of all. */
.sheet tbody input.is-run-best {
    color: var(--driver);
    font-weight: 600;
}

.sheet tbody select {
    font-weight: 600;
}

.sheet tbody input.is-marker,
.sheet tbody input::placeholder {
    color: var(--sheet-muted);
    font-style: italic;
}

.sheet tbody input::placeholder {
    font-weight: 600;
    opacity: 1;
}

.sheet tbody tr.is-live {
    background: var(--sheet-live);
    box-shadow: inset 3px 0 0 0 var(--sheet-live-line);
}

.sheet figcaption {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 40px;
    padding-top: 18px;
    color: var(--quiet);
    font-size: 10px;
    letter-spacing: 0.1em;
    line-height: 1.7;
    text-transform: uppercase;
}

.sheet-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sheet-legend li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sheet-legend i {
    flex: 0 0 auto;
    width: 18px;
    height: 12px;
    border-radius: 2px;
}

.sheet-legend .key-typed {
    border: 1px solid var(--sheet-field-line);
    background: var(--sheet-field);
}

.sheet-legend .key-computed {
    background: var(--sheet-computed);
}

.sheet-legend .key-best {
    background: var(--sheet-best);
}

.sheet-legend .key-forecast,
.sheet-legend .key-inherited,
.sheet-legend .key-limit {
    width: auto;
    height: auto;
}

.sheet-legend .key-inherited {
    color: var(--sheet-muted);
    font-style: italic;
    font-weight: 600;
    text-transform: none;
}

.sheet-legend .key-limit {
    color: var(--sheet-muted);
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0;
    white-space: pre;
}

.sheet-legend .key-out {
    border: 1px solid var(--sheet-over-line);
    background: var(--sheet-over-bg);
}

.sheet-hint {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    gap: 28px;
    white-space: nowrap;
}

.sheet.is-ready .sheet-hint {
    display: inline-flex;
}

.sheet-hint span {
    display: none;
}

.sheet.is-editable .sheet-hint span {
    display: inline;
}

.sheet-replay {
    padding: 0 0 2px;
    border: 0;
    border-bottom: 1px solid var(--quiet);
    background: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease;
}

.sheet-replay:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* ---------- the runplan: totals, timeline and runs ---------- */

.plan-summary {
    gap: 6px 28px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.plan-timeline {
    --lane: 0;
    --lane-height: 68px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--sheet-grid);
    background: var(--sheet-panel);
}

.plan-timeline .sheet-keys {
    margin-top: 0;
}

.sheet-keys .is-pit::before {
    border: 1px dashed var(--sheet-pit);
    background: repeating-linear-gradient(-45deg, rgba(251, 191, 36, 0.5) 0 1px, transparent 1px 4px);
}

.plan-scroll {
    margin-top: 14px;
    overflow-x: auto;
}

.plan-chart {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0 16px;
    min-width: 900px;
}

.plan-names {
    display: grid;
    grid-auto-rows: var(--lane-height);
}

/* A name sits beside the bar of its lane, not beside the labels above and below it. */
.plan-names span {
    align-self: start;
    margin-top: 16px;
    color: var(--c);
    font-size: 11px;
    font-weight: 700;
    line-height: 36px;
    white-space: nowrap;
}

.plan-plot {
    position: relative;
    height: calc(var(--lanes) * var(--lane-height) + 22px);
    overflow: hidden;
}

.plan-tick {
    position: absolute;
    top: 0;
    bottom: 22px;
    width: 1px;
    background: var(--sheet-grid);
}

.plan-lane {
    position: absolute;
    top: calc(var(--lane) * var(--lane-height) + 16px);
    right: 0;
    left: 0;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
}

.plan-pit {
    position: absolute;
    top: calc(var(--from) * var(--lane-height) + 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc((var(--to) - var(--from)) * var(--lane-height) + 36px);
    overflow: hidden;
    border: 1px dashed rgba(251, 191, 36, 0.6);
    background: repeating-linear-gradient(-45deg, rgba(251, 191, 36, 0.18) 0 1px, transparent 1px 6px);
    container-type: inline-size;
}

.plan-pit span {
    padding: 1px 3px;
    background: var(--sheet-panel);
    color: var(--sheet-pit);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

/* A label is shown where it has the room to be read. */
@container (max-width: 56px) {
    .plan-pit span {
        display: none;
    }
}

.plan-run {
    position: absolute;
    top: calc(var(--lane) * var(--lane-height));
    display: grid;
    grid-template-rows: 16px 36px 16px;
    height: var(--lane-height);
    container-type: inline-size;
}

.plan-bar .plan-short {
    display: none;
}

@container (max-width: 172px) {
    .plan-bar .plan-long {
        display: none;
    }

    .plan-bar .plan-short {
        display: block;
    }
}

@container (max-width: 112px) {
    .plan-fuel span:first-child {
        display: none;
    }
}

.plan-fuel,
.plan-times {
    overflow: hidden;
    color: var(--sheet-muted);
    font-size: 10px;
    line-height: 16px;
    white-space: nowrap;
}

.plan-fuel {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.plan-fuel span:first-child {
    color: var(--sheet-computed);
}

.plan-times {
    text-overflow: ellipsis;
}

.plan-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
    overflow: hidden;
    border: 1px solid var(--c);
    border-radius: 3px;
    background: color-mix(in srgb, var(--c) 62%, var(--sheet-canvas));
    line-height: 1.3;
}

.plan-bar b,
.plan-bar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-bar b {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.plan-bar span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
}

.plan-axis {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 14px;
    margin: 0;
    padding: 0;
    color: var(--sheet-rule);
    font-size: 10px;
    line-height: 14px;
    list-style: none;
}

.plan-axis li {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.plan-axis li:first-child {
    transform: none;
}

.plan-axis li:last-child {
    transform: translateX(-100%);
}

.sheet .col-laps {
    width: 64px;
}

.sheet-plan .col-driver {
    width: 132px;
}

.sheet-plan .col-clock,
.sheet-plan .col-time {
    width: 94px;
}

.sheet-plan .col-set {
    width: 88px;
}

/* A value the run takes from its driver is shown in the place of the one it could state. */
.sheet tbody input.is-inherited::placeholder {
    font-weight: 400;
}

/* ---------- the setup: values corner by corner, and the scales ---------- */

.setup-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 316px;
}

.setup-main {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 20px;
    overflow-x: auto;
    border-right: 1px solid var(--sheet-grid);
}

.setup-table {
    min-width: 640px;
    border: 1px solid var(--sheet-grid);
    border-radius: 4px;
}

.setup-table.is-columns {
    min-width: 560px;
}

.setup-corners {
    display: flex;
    justify-content: space-between;
    padding: 7px 14px;
    border-bottom: 1px solid var(--sheet-grid);
    background: var(--sheet-panel);
    color: var(--sheet-fg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.setup-table table + .setup-corners {
    border-top: 2px solid var(--sheet-control);
}

.sheet-setup thead th {
    height: 28px;
    border-bottom-width: 1px;
    border-bottom-color: var(--sheet-grid);
    background: transparent;
    text-align: center;
}

.sheet-setup tbody th,
.sheet-setup tbody td {
    height: 38px;
    padding: 4px 6px;
}

.sheet-setup th + th,
.sheet-setup th + td,
.sheet-setup td + td,
.sheet-setup td + th {
    border-left: 0;
}

.sheet-setup tbody tr:last-child th,
.sheet-setup tbody tr:last-child td {
    border-bottom: 0;
}

/* The last line of an item that has several closes the item. */
.sheet-setup tbody th[rowspan] {
    border-bottom: 1px solid var(--sheet-grid);
}

.sheet-setup .setup-item {
    width: 15%;
    padding-left: 14px;
    color: var(--sheet-fg-2);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    white-space: normal;
}

.sheet-setup .setup-field {
    width: 17%;
    color: var(--sheet-muted);
    font-size: 11px;
    text-align: left;
}

.sheet-setup .setup-unit {
    width: 9%;
    color: var(--sheet-muted);
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}

/* The second wing mirrors the first: values in the middle, names on the outside. */
.sheet-setup .setup-unit.col-wing {
    text-align: left;
}

.sheet-setup .setup-field.col-wing,
.sheet-setup .setup-item.col-wing {
    padding-right: 14px;
    padding-left: 6px;
    text-align: right;
}

.sheet-setup .is-columns .setup-item {
    width: 18%;
}

.sheet-setup .is-columns .setup-field {
    width: 22%;
}

.sheet-setup tbody input {
    max-width: none;
    height: 26px;
    font-size: 13px;
}

.setup-value.is-shared > div {
    width: 50%;
    margin: 0 auto;
}

.setup-mid {
    position: relative;
    width: 34px;
}

.sheet-setup tbody .setup-mid {
    padding: 0;
}

.sheet-setup tbody .setup-mid::before,
.sheet-setup .is-wings tbody .setup-value.is-shared::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--sheet-control);
}

.sheet-setup tbody .setup-value.is-shared {
    position: relative;
}

.sheet-setup tbody .setup-value.is-shared > div {
    position: relative;
}

.setup-copy {
    position: relative;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: var(--sheet-canvas);
    color: var(--sheet-muted);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 100ms ease, color 100ms ease;
}

.setup-copy:hover {
    background: var(--sheet-hover);
    color: var(--sheet-fg);
}

.setup-copy:disabled {
    visibility: hidden;
}

.setup-copy:focus-visible {
    outline: 2px solid var(--sheet-fg);
    outline-offset: 1px;
}

.setup-limit {
    margin-top: 2px;
    color: var(--sheet-muted);
    font-size: 9px;
    line-height: 11px;
    white-space: pre;
}

.setup-limit i {
    display: none;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    border-radius: 50%;
    background: var(--sheet-over);
    color: var(--sheet-over-bg);
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 11px;
    text-align: center;
}

.setup-limit.is-out {
    color: var(--sheet-over);
}

.setup-limit.is-out i {
    display: inline-block;
}

.sheet input.is-out {
    border-color: var(--sheet-over-line);
    background: var(--sheet-over-bg);
    color: var(--sheet-over);
}

.sheet input.is-out:focus-visible {
    border-color: var(--sheet-over);
    box-shadow: 0 0 0 1px var(--sheet-over);
}

.setup-side {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 20px;
}

.setup-scales {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 44px;
}

.setup-scales::after {
    content: "kg";
    position: absolute;
    top: 50%;
    left: 50%;
    color: var(--sheet-muted);
    font-size: 11px;
    transform: translate(-50%, -50%);
}

.setup-scales label {
    display: grid;
    justify-items: center;
    gap: 5px;
}

.setup-scales span {
    color: var(--sheet-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
}

.setup-scales input {
    width: 100%;
    height: 32px;
    font-size: 13px;
}

.setup-stats {
    display: grid;
    gap: 8px;
    padding: 14px 0;
    border-top: 1px solid var(--sheet-grid);
    border-bottom: 1px solid var(--sheet-grid);
}

.setup-stats div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.setup-stats dt {
    color: var(--sheet-computed);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.setup-stats dd {
    color: var(--sheet-fg);
    font-size: 13px;
    font-weight: 600;
}

.setup-stats .is-missing {
    color: var(--sheet-rule);
    font-weight: 400;
}

.setup-note {
    display: grid;
    gap: 8px;
}

.setup-note textarea {
    width: 100%;
    min-height: 66px;
    padding: 8px 10px;
    border: 1px solid var(--sheet-field-line);
    border-radius: 3px;
    background: var(--sheet-field);
    color: var(--sheet-fg);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    outline: none;
    resize: vertical;
}

.setup-note textarea:focus-visible {
    border-color: var(--sheet-fg);
    box-shadow: 0 0 0 1px var(--sheet-fg);
}

/* ---------- proof rail ---------- */

.proof-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--hairline);
}

.proof-rail p {
    padding: 22px 0;
    color: #c9c9cc;
    font-size: 11px;
    letter-spacing: 0.07em;
    line-height: 1.7;
    text-transform: uppercase;
}

.proof-rail p + p {
    padding-left: 28px;
    border-left: 1px solid var(--hairline);
}

.proof-rail span {
    display: block;
    color: var(--quiet);
}

/* ---------- the weekend ---------- */

.phase {
    padding: 72px 0 80px;
    border-bottom: 1px solid var(--hairline);
}

.phase-head {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(40px, 6vw, 96px);
    margin-bottom: 36px;
}

.phase-head .label {
    margin-bottom: 12px;
}

.phase h2 {
    max-width: 14ch;
    font-size: clamp(3rem, 4.8vw, 4.8rem);
    line-height: 0.98;
}

.phase-head > p {
    max-width: 50ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.ledger {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ledger div {
    padding: 26px 28px 0 0;
}

.ledger div + div {
    padding-left: 28px;
    border-left: 1px solid var(--hairline);
}

.ledger dt {
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ledger dd {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.ledger-ruled {
    margin-top: 40px;
    border-top: 1px solid var(--hairline);
}

.phase-head + .ledger-ruled {
    margin-top: 0;
}

.sheet ~ .ledger-ruled {
    margin-top: 32px;
}

.latest {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(40px, 6vw, 96px);
}

.latest h3 {
    max-width: 18ch;
    font-family: var(--display);
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.002em;
    line-height: 1.02;
    text-wrap: balance;
}

.latest p {
    max-width: 50ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

/* ---------- capabilities, questions, download ---------- */

.section {
    padding: 72px 0 80px;
    border-bottom: 1px solid var(--hairline);
}

.section-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(48px, 7vw, 96px);
}

.section-copy {
    position: sticky;
    top: 92px;
}

.section-copy .label {
    margin-bottom: 12px;
}

.section-copy h2 {
    max-width: 9ch;
    font-size: clamp(3rem, 4.7vw, 4.8rem);
    line-height: 0.98;
}

.section-copy > p:last-child {
    max-width: 34ch;
    margin-top: 26px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.rows {
    border-top: 1px solid var(--hairline);
}

.rows-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0 56px;
    border-top: 0;
}

.rows-split > div {
    border-top: 1px solid var(--hairline);
}

.rows details {
    border-bottom: 1px solid var(--hairline);
}

.rows summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 60px;
    padding: 14px 0;
    list-style: none;
    cursor: pointer;
}

.rows summary::-webkit-details-marker {
    display: none;
}

.rows summary::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--quiet);
    font-size: 16px;
    line-height: 1;
}

.rows details[open] summary::after {
    content: "\2212";
}

.rows summary:focus-visible {
    outline-offset: 0;
}

.rows h3 {
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    transition: color 160ms ease;
}

.rows summary:hover h3 {
    color: #fff;
}

.rows details > p {
    max-width: 68ch;
    padding: 0 40px 24px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.closing-body > p {
    max-width: 58ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.closing-body strong {
    color: var(--ink);
    font-weight: 500;
}

.closing-body .button {
    min-width: 264px;
    margin-top: 36px;
}

.closing-body .closing-status {
    margin-top: 16px;
    color: var(--quiet);
    font-size: 11px;
    line-height: 1.7;
}

.closing-body .proof-rail {
    margin-top: 48px;
    border-top: 1px solid var(--hairline);
}

.closing-body .closing-privacy {
    margin-top: 24px;
    font-size: 11px;
}

.closing-privacy a {
    border-bottom: 1px solid var(--quiet);
    color: var(--muted);
    transition: color 160ms ease, border-color 160ms ease;
}

.closing-privacy a:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.closing {
    border-bottom: 0;
}

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--hairline);
}

.footer-inner {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    color: var(--quiet);
    font-size: 9px;
    letter-spacing: 0.1em;
    line-height: 1.7;
    text-transform: uppercase;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-inner a {
    transition: color 160ms ease;
}

.footer-inner a:hover {
    color: var(--ink);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
    .hero-head {
        animation: rise-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .sheet {
        animation: rise-in 900ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .sheet tbody tr {
        transition: background-color 220ms ease, box-shadow 220ms ease;
    }

    .sheet .is-landing {
        animation: land 320ms ease-out both;
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes land {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ---------- narrower screens ---------- */

@media (max-width: 1040px) {
    .hero-head,
    .phase-head,
    .latest {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 28px;
    }

    .sheet-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .sheet-graph {
        border-right: 0;
        border-bottom: 1px solid var(--sheet-grid);
    }

    .sheet-graph svg {
        height: 380px;
        aspect-ratio: auto;
    }

    .sheet .col-a {
        display: none;
    }

    .setup-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .setup-main {
        border-right: 0;
        border-bottom: 1px solid var(--sheet-grid);
    }

    .setup-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 28px;
    }

    .setup-side .sheet-title,
    .setup-side .setup-note {
        grid-column: 1 / -1;
    }

    .setup-stats {
        align-content: center;
        border: 0;
    }

    .hero h1 span {
        white-space: normal;
    }

    .sheet .col-tyre {
        display: none;
    }

    .ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ledger div:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    .ledger div:nth-child(n + 3) {
        margin-top: 26px;
        border-top: 1px solid var(--hairline);
    }

    .section-layout {
        grid-template-columns: minmax(190px, 0.3fr) minmax(0, 1fr);
        gap: 42px;
    }

    .rows-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .rows-split > div + div {
        border-top: 0;
    }
}

@media (max-width: 800px) {
    .wrap {
        width: min(var(--container), calc(100% - 32px));
    }

    .hero-shell {
        padding: 26px 0 64px;
    }

    .page-nav a:not(.page-nav-go) {
        display: none;
    }

    .hero-head {
        padding: 56px 0 44px;
    }

    .hero h1 {
        font-size: clamp(3.7rem, 9vw, 4.3rem);
    }

    .sheet .col-sector {
        display: none;
    }

    .sheet .col-b,
    .sheet .col-wing {
        display: none;
    }

    .setup-table,
    .setup-table.is-columns {
        min-width: 0;
    }

    .sheet-setup .setup-item {
        width: 24%;
    }

    .sheet-setup .setup-field {
        width: 26%;
    }

    .sheet-setup .setup-unit {
        width: 14%;
    }

    .plan-timeline,
    .setup-main,
    .setup-side {
        padding-right: 14px;
        padding-left: 14px;
    }

    .race-strip > div {
        flex-basis: 50%;
        padding: 10px 14px;
    }

    .race-strip > div:nth-child(even) {
        border-right: 0;
    }

    .race-strip > div:nth-child(n + 3) {
        border-top: 1px solid var(--sheet-grid);
    }

    .sheet-graph {
        padding-right: 14px;
        padding-left: 14px;
    }

    .ledger-ruled {
        margin-top: 48px;
    }

    .sheet-bar,
    .sheet-summary,
    .sheet-run {
        gap: 8px 20px;
        padding: 10px 14px;
    }

    .sheet figcaption {
        flex-direction: column;
    }

    .sheet-hint {
        flex-wrap: wrap;
        gap: 10px 28px;
        white-space: normal;
    }

    .proof-rail {
        grid-template-columns: minmax(0, 1fr);
    }

    .proof-rail p + p {
        padding-left: 0;
        border-top: 1px solid var(--hairline);
        border-left: 0;
    }

    .phase,
    .section {
        padding: 52px 0 60px;
    }

    .phase-head {
        margin-bottom: 28px;
    }

    .section-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .section-copy {
        position: static;
    }

    .section-copy h2 {
        max-width: 12ch;
    }

    .footer-inner {
        padding: 26px 0;
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .wordmark {
        width: 224px;
    }

    .hero h1 {
        font-size: clamp(3.3rem, 14vw, 3.85rem);
    }

    .hero-side > p,
    .phase-head > p,
    .closing-body > p {
        font-size: 12px;
    }

    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .phase h2,
    .section-copy h2 {
        font-size: clamp(2.8rem, 14vw, 4rem);
    }

    /* A phone shows fewer columns, each wide enough for its longest value. */
    .sheet table {
        min-width: 326px;
    }

    .sheet thead th {
        padding: 4px 3px;
        letter-spacing: 0.06em;
    }

    .sheet thead .unit {
        display: block;
        font-size: 9px;
        letter-spacing: 0;
    }

    .sheet tbody th,
    .sheet tbody td {
        padding: 0 3px;
        font-size: 11px;
    }

    .sheet tbody input,
    .sheet tbody select {
        padding: 0 2px;
        font-size: 11px;
    }

    .sheet .col-lap {
        width: 44px;
    }

    .trend {
        width: 7px;
        margin-left: 1px;
        font-size: 9px;
    }

    .sheet .col-time {
        width: 66px;
    }

    .sheet .col-driver {
        width: 48px;
    }

    /* On a phone the plan keeps what is typed for a run, and when the run starts. */
    .sheet-plan .col-lap {
        width: 28px;
    }

    .sheet-plan .col-driver {
        width: 94px;
    }

    .sheet-plan .col-laps {
        width: 34px;
    }

    .sheet-plan .col-clock {
        width: 64px;
    }

    .sheet-plan .col-time {
        width: 68px;
    }

    .sheet-plan .col-start {
        width: 60px;
    }

    /* Narrower than this, a sheet is scrolled sideways rather than squeezed. */
    .sheet-plan table {
        min-width: 348px;
    }

    .sheet-session table,
    .sheet-race table {
        min-width: 346px;
    }

    .sheet-plan .col-fuel {
        display: none;
    }

    .sheet-setup .setup-item {
        width: 20%;
        padding-left: 8px;
        font-size: 11px;
    }

    .sheet-setup .setup-field {
        width: 24%;
        font-size: 10px;
    }

    .sheet-setup .setup-unit {
        width: 12%;
        font-size: 10px;
    }

    .sheet-setup tbody th,
    .sheet-setup tbody td {
        padding: 4px 3px;
    }

    .setup-limit {
        font-size: 8.5px;
    }

    .sheet-setup .is-columns .setup-item,
    .sheet-setup .is-columns .setup-field {
        width: 19%;
    }

    .sheet-setup .is-columns .setup-unit {
        display: none;
    }

    .sheet-setup tbody input {
        font-size: 12px;
    }

    .setup-mid {
        width: 28px;
    }

    .setup-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .setup-stats {
        border-top: 1px solid var(--sheet-grid);
        border-bottom: 1px solid var(--sheet-grid);
    }

    .sheet .col-pit,
    .sheet .col-c {
        display: none;
    }

    .sheet-badge {
        min-width: 0;
        padding: 2px 3px;
        font-size: 9px;
    }

    .sheet-graph svg {
        height: 260px;
    }

    .sheet-tools .sheet-button {
        margin-left: 0;
    }

    .ledger {
        grid-template-columns: minmax(0, 1fr);
    }

    .ledger div {
        padding-right: 0;
    }

    .ledger div + div {
        margin-top: 26px;
        padding-left: 0;
        border-top: 1px solid var(--hairline);
        border-left: 0;
    }

    .closing-body .button {
        min-width: 0;
    }

    .footer-inner nav {
        gap: 18px;
    }
}

@media (max-width: 340px) {
    .wordmark {
        width: 190px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
