:root {
    color-scheme: light dark;
    --background: #f6f7fc;
    --surface: #fff;
    --bar: #edf0f8;
    --text: #222438;
    --muted: #545a73;
    --line: #cbd0e2;
    --accent: #4b43a3;
    --selected: #ebebfd;
    --good: #18634d;
    --bad: #a32446;
    --pending: #715412;
    font: 100%/1.55 system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #161723;
        --surface: #1c1e2c;
        --bar: #1a1b28;
        --text: #f0effc;
        --muted: #adb1ca;
        --line: #41445d;
        --accent: #bcb9ff;
        --selected: #303250;
        --good: #8bddb8;
        --bad: #ff9faf;
        --pending: #f4ce81;
    }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: .125rem solid var(--accent); outline-offset: .1875rem; }
code, pre, .ref, time, input { font-family: ui-monospace, monospace; }
code, .ref, th, td, dd { overflow-wrap: anywhere; }
.shell { width: min(74rem, 100% - 3rem); margin-inline: auto; }
.top { background: var(--bar); border-bottom: .0625rem solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.brand { color: var(--text); text-decoration: none; font-size: 1.125rem; font-weight: 700; white-space: nowrap; }
.top-links, .top nav, .top form { display: flex; align-items: center; gap: .75rem; }
.top nav { gap: .6rem; font-size: .875rem; }
.top nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.top nav a:hover, .top nav [aria-current] { color: var(--text); text-decoration: underline; }
.top form { gap: .5rem; }
button, input, .control {
    border: .0625rem solid var(--line);
    border-radius: .1875rem;
    padding: .5rem .75rem;
    background: var(--surface);
    color: var(--text);
    font-size: .875rem;
}
input { width: min(24vw, 18rem); }
button, .control { cursor: pointer; white-space: nowrap; }
.control { color: var(--accent); text-decoration: none; }
button:hover, .control:hover, .steps a:hover { background: var(--selected); }
main { padding-block: 2.5rem 4rem; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1.2; overflow-wrap: anywhere; }
h2 { margin-block: 1.75rem .75rem; font-size: 1.125rem; }
h1 + .table-wrap, h1 + .empty { margin-top: 1.25rem; }
.heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; }
.heading code { display: inline-block; margin-top: .5rem; color: var(--muted); }
.table-wrap, .facts, .empty, .output { border: .0625rem solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
th, td { padding: .75rem 1rem; text-align: left; vertical-align: middle; }
thead th { background: var(--bar); color: var(--muted); font-weight: 600; }
tbody tr { border-top: .0625rem solid var(--line); }
tbody th { font-weight: 500; }
.numeric { text-align: right; white-space: nowrap; }
time { white-space: nowrap; color: var(--muted); font-size: .8125rem; }
.status { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; font-size: .875rem; }
.status::before { content: ""; background: currentColor; width: .5rem; height: .5rem; border-radius: 50%; }
.success { color: var(--good); }
.failure { color: var(--bad); }
.neutral { color: var(--muted); }
.pending { color: var(--pending); }
.empty { padding: 1rem; color: var(--muted); }
.pager { margin-top: 1rem; display: flex; justify-content: flex-end; }
.crumb { margin-bottom: .6rem; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 2rem; margin-top: 1.25rem; padding: 1rem; }
dt { color: var(--muted); font-size: .8125rem; }
dd { margin-top: .15rem; }
.output { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); }
.steps { border-right: .0625rem solid var(--line); }
.steps a { display: grid; gap: .15rem; padding: .625rem .875rem; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.steps a + a { border-top: .0625rem solid var(--line); }
.steps [aria-current] { background: var(--selected); box-shadow: inset .1875rem 0 var(--accent); }
.step-state { color: var(--muted); font-size: .75rem; }
.output pre, .output .empty { margin: 0; padding: 1rem; border: 0; }
pre { overflow: auto; max-height: 34rem; font-size: .8125rem; }
.skip:not(:focus) { position: absolute; clip-path: inset(50%); }
.skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 1; padding: .5rem; background: var(--surface); }
.instructions { max-width: 55ch; }
.instructions li + li { margin-top: .5rem; }
.sr-only { position: absolute; width: .0625rem; height: .0625rem; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 44rem) {
    .shell { width: calc(100% - 1.5rem); }
    main { padding-top: 1.5rem; }
    .top-row { align-items: stretch; flex-direction: column; gap: .65rem; }
    input { flex: 1 1 auto; min-width: 0; width: auto; }
    table, tbody { display: block; }
    thead { position: absolute; width: .0625rem; height: .0625rem; overflow: hidden; clip-path: inset(50%); }
    tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem .75rem; padding: .75rem; }
    tbody tr:first-child { border-top: 0; }
    tbody td, tbody th { display: block; padding: 0; text-align: left; }
    tbody td::before, tbody th::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: .75rem;
    }
    .with-repository tbody td:last-child { grid-column: 1 / -1; }
    time { white-space: normal; }
    .facts { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
    .output { grid-template-columns: minmax(0, 1fr); }
    .steps { display: flex; overflow-x: auto; border: 0; border-bottom: .0625rem solid var(--line); }
    .steps a { flex: 0 0 auto; min-width: 6rem; max-width: 13rem; }
    .steps a + a { border-top: 0; border-left: .0625rem solid var(--line); }
    .steps [aria-current] { box-shadow: inset 0 -.1875rem var(--accent); }
    .steps a:focus-visible { outline-offset: -.125rem; }
}

@media (max-width: 23rem) {
    tbody td:last-child { grid-column: 1 / -1; }
}
