:root {
  --paper: #e9eef2;
  --surface: #f6f8fa;
  --ink: #17222c;
  --quiet: #4f5f6d;
  --line: #bcc8d2;
  --bertha: #8e2a6b;
  --silver: #4d6a82;
  --bad: #b3202c;
  --field: #ffffff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #18212a;
    --surface: #212c37;
    --ink: #eef2f5;
    --quiet: #a9b7c3;
    --line: #455462;
    --bertha: #d783bc;
    --silver: #93b3cc;
    --bad: #f0838b;
    --field: #18212a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.5 "Avenir Next", Avenir, "Segoe UI", Candara, "Noto Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}
main { max-width: 56rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
main.narrow { max-width: 26rem; padding-top: 18vh; }
h1 { font-size: 2.25rem; line-height: 1.1; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 .75rem; }
p { margin: .5rem 0; max-width: 65ch; }
a { color: inherit; }
.quiet { color: var(--quiet); }
.notice { color: var(--bad); }

label { display: block; margin: 1.5rem 0 .25rem; font-weight: 600; }
input[type=email] {
  width: 100%; padding: .65rem .75rem; font: inherit; color: inherit;
  background: var(--field); border: 1px solid var(--quiet); border-radius: 4px;
}
button {
  font: inherit; font-weight: 600; cursor: pointer; margin-top: 1rem;
  padding: .65rem 1rem; color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 4px;
}
button.plain { margin: 0; padding: .2rem .5rem; font-weight: 400; color: var(--quiet); background: none; border-color: transparent; text-decoration: underline; }
:focus-visible { outline: 3px solid var(--bertha); outline-offset: 2px; }

.top { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; margin-bottom: 2.5rem; }
.top-right { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.machines { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.machines li { display: flex; align-items: center; gap: .4rem; }
.machines .down { color: var(--bad); font-weight: 600; }
.chip { width: .8rem; height: .8rem; border-radius: 2px; flex: none; }
.host-bertha { --host: var(--bertha); }
.host-silver { --host: var(--silver); }
.chip { background: var(--host); }

.batch { margin-bottom: 2.75rem; }
.batch-head { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.batch-head h2 { font-size: 1.5rem; margin: 0; }
.tally { font-size: 1.125rem; }

.rows { display: grid; grid-template-columns: max-content 1fr; gap: .4rem .75rem; align-items: center; }
.row-name { color: var(--quiet); text-align: right; }
.cells { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.cell {
  width: clamp(1.5rem, 7.5vw, 2.75rem); aspect-ratio: 1;
  border: 2px solid var(--line); border-radius: 3px; position: relative;
}
.cell.done { background: var(--host); border-color: var(--host); }
.cell.running { border-color: var(--host); background: repeating-linear-gradient(135deg, var(--host) 0 3px, transparent 3px 8px); }
.cell.failed { border-color: var(--bad); }
.cell.failed::before, .cell.failed::after {
  content: ""; position: absolute; left: 10%; right: 10%; top: calc(50% - 1px); height: 2px; background: var(--bad);
}
.cell.failed::before { transform: rotate(45deg); }
.cell.failed::after { transform: rotate(-45deg); }

.legend { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 1rem 0 .25rem; padding: 0; list-style: none; color: var(--quiet); }
.legend li { display: flex; align-items: center; gap: .4rem; }
.legend .cell { width: 1rem; border-width: 1.5px; }
.result { margin-top: .5rem; }
.result.bad { color: var(--bad); font-weight: 600; }
details { margin-top: .75rem; }
summary { cursor: pointer; color: var(--quiet); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--quiet); padding: .35rem .75rem .35rem 0; border-bottom: 1px solid var(--line); }
td { padding: .45rem .75rem .45rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; vertical-align: top; }
td.num, th.num { text-align: right; padding-right: 0; }
.state-failed, .state-lost { color: var(--bad); font-weight: 600; }
.state-running { font-weight: 600; }
td .chip { display: inline-block; margin-right: .4rem; }
