/* Deliberately small and dependency-free: no CDN, no build step, no font
   fetch. The portal is one form and two tables. */

:root {
  --ink: #1a1d21;
  --muted: #5b6470;
  --line: #d7dce2;
  --bg: #ffffff;
  --panel: #f6f8fa;
  --accent: #0b5fff;
  --ok: #1a7f43;
  --bad: #b3261e;
  --warn: #8a6100;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaed; --muted: #9aa4b2; --line: #333a44;
    --bg: #16191d; --panel: #1d2126; --accent: #6aa3ff;
    --ok: #5cc98a; --bad: #ff8a80; --warn: #e0b44a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: 8px; top: 8px; z-index: 10;
  background: var(--bg); padding: 8px 12px; border: 2px solid var(--accent);
}

.topbar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
.topbar nav { display: flex; gap: 16px; }
.topbar .who { margin-left: auto; color: var(--muted); font-size: 14px; }
.topbar a { color: var(--accent); }

main { max-width: 860px; margin: 0 auto; padding: 32px 24px 64px; }
footer {
  max-width: 860px; margin: 0 auto; padding: 0 24px 40px;
  color: var(--muted); font-size: 13px;
}

h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 32px 0 10px; }
.lede { color: var(--muted); margin: 0 0 24px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 10px 18px; border: 0; border-radius: 6px; cursor: pointer;
  font: inherit; font-weight: 600; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

fieldset {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 20px; margin: 0 0 22px;
}
legend { font-weight: 600; padding: 0 6px; }

.field { margin: 0 0 14px; }
.field label { display: inline-block; font-weight: 500; margin-bottom: 4px; }
.field input[type=checkbox] + label { font-weight: 400; }
.field input[type=text], .field input[type=number], .field select {
  display: block; width: 100%; max-width: 320px;
  padding: 8px 10px; font: inherit;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink);
}
input[type=file] { font: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

table.runs { width: 100%; border-collapse: collapse; margin: 12px 0; }
table.runs th, table.runs td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line);
}
table.runs th { font-size: 13px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }

dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0; }
dl.meta dt { color: var(--muted); font-size: 14px; }
dl.meta dd { margin: 0; }

.state {
  display: inline-block; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; font-size: 14px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
}
.state-succeeded { color: var(--ok);   border-color: var(--ok); }
.state-failed    { color: var(--bad);  border-color: var(--bad); }
.state-running,
.state-pending   { color: var(--warn); border-color: var(--warn); }
.state-unknown   { color: var(--muted); }

.error {
  border: 1px solid var(--bad); border-left-width: 5px;
  background: var(--panel); padding: 12px 16px; border-radius: 6px;
  margin: 0 0 20px;
}
.error p { margin: 6px 0 0; }
.empty { color: var(--muted); }
.models { line-height: 1.9; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
