/* Multiplayer playtest checklist. Plant palette: steel, hazard yellow, and plain pass/fail colours. */
:root {
  --ground: #eceef1;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --ink: #1b1f24;
  --muted: #5a636e;
  --line: #d3d8de;
  --hazard: #d9a300;
  --hazard-ink: #1b1f24;
  --pass: #2f8a52;
  --fail: #c23a2f;
  --skip: #7a828c;
  --focus: #2b6cb0;
  --stripe-dark: #1b1f24;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #15181c;
    --surface: #1f242a;
    --surface-2: #262c33;
    --ink: #e9ecef;
    --muted: #9aa3ad;
    --line: #353c45;
    --hazard: #f2b705;
    --hazard-ink: #15181c;
    --pass: #4cb87a;
    --fail: #ef6b5f;
    --skip: #8b949e;
    --focus: #7fb3ea;
    --stripe-dark: #0d0f12;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  padding-inline: 16px;
}
.wrap { max-width: 980px; margin: 0 auto; padding-block: 0 96px; }
h1, h2, h3, .display {
  font-family: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* The hazard band that heads the page and each section. */
.tape {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--stripe-dark) 14px 28px);
}

.masthead { padding-block: 28px 18px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; justify-content: space-between; }
.masthead h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.masthead .sub { color: var(--muted); margin: 6px 0 0; max-width: 60ch; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; }
.who strong { color: var(--ink); }

/* Sticky status bar. */
.bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  margin-inline: -16px; padding: 10px 16px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
}
.bar .count { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .9rem; font-variant-numeric: tabular-nums; }
.bar .count b { font-weight: 600; }
.bar .fails { color: var(--fail); }
.bar .state { color: var(--muted); font-size: .9rem; margin-left: auto; }
.meter { flex: 1 1 160px; height: 8px; background: var(--surface-2); border: 1px solid var(--line); min-width: 120px; }
.meter i { display: block; height: 100%; width: 0; background: var(--hazard); transition: width .2s; }

.card { background: var(--surface); border: 1px solid var(--line); padding: 18px; }
.intro { margin-block: 18px; }
.intro p { margin: 0 0 8px; max-width: 70ch; }
.intro ul { margin: 6px 0 0; padding-left: 20px; }

.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; margin-top: 12px; }
label.field { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
input[type=text], input[type=password], textarea {
  font: inherit; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 10px; width: 100%;
}
textarea { min-height: 64px; resize: vertical; }

section.block { margin-top: 28px; }
section.block > header { display: flex; align-items: baseline; gap: 12px; padding-block: 10px 6px; }
section.block > header h2 { font-size: 1.6rem; }
section.block > header .tag { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--hazard-ink); background: var(--hazard); padding: 0 8px; font-weight: 600; }
section.block > .lead { color: var(--muted); margin: 0 0 10px; max-width: 70ch; }

.item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--line);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  margin-top: 8px;
}
.item[data-status=pass] { border-left-color: var(--pass); }
.item[data-status=fail] { border-left-color: var(--fail); }
.item[data-status=skip] { border-left-color: var(--skip); }
.item .meta { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); }
.item .id { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--ink); font-weight: 600; }
.item .role { border: 1px solid var(--line); padding: 0 6px; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
.item .do { margin: 4px 0 2px; font-weight: 500; }
.item .expect { margin: 0; color: var(--muted); }
.item .expect b { color: var(--ink); font-weight: 600; }
.item .note { grid-column: 1 / -1; }
.item .note[hidden] { display: none; }
.item .note-toggle { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; justify-self: start; grid-column: 1 / -1; }

.status { display: flex; align-self: start; border: 1px solid var(--line); }
.status button {
  font: 600 .85rem/1 "IBM Plex Sans", system-ui, sans-serif;
  padding: 9px 12px; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.status button + button { border-left: 1px solid var(--line); }
.status button[aria-pressed=true][data-v=pass] { background: var(--pass); color: #fff; }
.status button[aria-pressed=true][data-v=fail] { background: var(--fail); color: #fff; }
.status button[aria-pressed=true][data-v=skip] { background: var(--skip); color: #fff; }

.btn {
  font: 700 1.05rem/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .06em; text-transform: uppercase;
  background: var(--hazard); color: var(--hazard-ink); border: 0; padding: 12px 20px; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
.submit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.muted { color: var(--muted); }
.error { color: var(--fail); }

/* Sign-in */
.signin { max-width: 440px; margin: 12vh auto 0; }
.signin form { display: grid; gap: 12px; margin-top: 16px; }

/* Results */
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; font-size: .9rem; }
th { background: var(--surface-2); font-weight: 600; }
td.num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.cell-pass { color: var(--pass); font-weight: 600; }
.cell-fail { color: var(--fail); font-weight: 600; }
.cell-skip { color: var(--skip); }

@media (max-width: 560px) {
  .item { grid-template-columns: 1fr; }
  .status { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .meter i { transition: none; } }
