/* Well Behaved Agents — site styles.

   Plain on purpose. One typeface, black on white, tables instead of cards.
   Colour is used for links and for verdicts, and for nothing else.
   There are no web fonts, no shadows, no gradients and no rounded corners. */

:root {
  --bg: #fff;
  --fg: #111;
  --muted: #595959;
  --line: #c9c9c9;
  --faint: #f3f3f3;
  --link: #1a3fd0;
  --pass: #0a7a3b;
  --fail: #c8321a;
  --warn: #9a5b00;
  --noted: #1a3fd0;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --fg: #f2f2f2;
    --muted: #a8a8a8;
    --line: #444;
    --faint: #1d1d1d;
    --link: #8fb0ff;
    --pass: #5fd08c;
    --fail: #ff8a75;
    --warn: #f0b75a;
    --noted: #8fb0ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 18px/1.55 var(--sans); }
.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.25rem); letter-spacing: -.02em; line-height: 1.06; margin-bottom: 1.25rem; max-width: 20ch; }
h2 { font-size: 1.65rem; letter-spacing: -.01em; margin: 3.25rem 0 .75rem; }
h3 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
h4 { font-size: .95rem; margin: 0 0 .35rem; }
p, ul, ol, dl, blockquote, table, pre { margin: 0 0 1rem; }
main p, main li, main dd, main blockquote { max-width: 44rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .45rem; }
.lede { font-size: 1.3rem; line-height: 1.45; max-width: 40rem; }
.small { font-size: .92rem; }
.muted { color: var(--muted); }
code, pre, kbd { font-family: var(--mono); font-size: .86em; }
code { background: var(--faint); padding: .1em .3em; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem .75rem; z-index: 10; }

/* ---------------------------------------------------------------- header, footer */
.head { border-bottom: 3px solid var(--fg); }
.head .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; white-space: nowrap; }
.head nav { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.head nav a { color: var(--fg); text-decoration: none; }
.head nav a:hover, .head nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .35em; }
main.wrap { padding-top: 3.25rem; padding-bottom: 4rem; }
.foot { border-top: 1px solid var(--line); padding: 1.5rem 0 3rem; font-size: .92rem; color: var(--muted); }
.foot p { max-width: 48rem; }
.foot strong { color: var(--fg); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-block; font: inherit; font-weight: 700; line-height: 1.2; padding: .7rem 1.15rem; background: var(--fg); color: var(--bg); border: 2px solid var(--fg); border-radius: 0; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--bg); color: var(--fg); }
.btn.plain { background: var(--bg); color: var(--fg); }
.btn.plain:hover { background: var(--fg); color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 1.5rem 0; }
.after-report { margin-top: 2.5rem; }

/* ---------------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: .65rem 1rem .65rem 0; border-bottom: 1px solid var(--line); }
th:last-child, td:last-child { padding-right: 0; }
thead th { border-bottom: 2px solid var(--fg); font-size: .92rem; padding-top: 0; }
tfoot td { border-bottom: 0; border-top: 2px solid var(--fg); }
td.n { color: var(--muted); font-variant-numeric: tabular-nums; width: 3.5rem; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.facts { max-width: 34rem; margin: 2rem 0; border-top: 1px solid var(--line); }
.facts th { font-weight: 400; color: var(--muted); width: 9.5rem; }
@media (max-width: 640px) { .opt { display: none; } }

/* ---------------------------------------------------------------- verdicts */
.result { font-weight: 700; white-space: nowrap; }
.result::before { content: ""; display: inline-block; width: .62em; height: .62em; margin-right: .42em; background: currentColor; }
.result.pass, .legend .pass b { color: var(--pass); }
.result.fail, .legend .fail b { color: var(--fail); }
.result.incomplete, .legend .incomplete b { color: var(--warn); }
.result.noted, .legend .noted b { color: var(--noted); }
.result.pending { color: var(--muted); font-weight: 400; }
.result.pending::before { background: none; border: 1px solid currentColor; }

/* ---------------------------------------------------------------- small pieces */
.crumbs { color: var(--muted); font-size: .95rem; }
.notice { border-left: 4px solid var(--fg); padding: .15rem 0 .15rem 1rem; margin: 1.5rem 0; }
.quote { border-left: 4px solid var(--line); margin-left: 0; padding: .15rem 0 .15rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.ph { font-family: var(--mono); font-size: .86em; color: var(--muted); }
.code { background: var(--faint); border: 1px solid var(--line); padding: .9rem 1rem; overflow-x: auto; line-height: 1.6; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; } }
.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 3.5rem; max-width: none; }
section[id], h2[id] { scroll-margin-top: 1rem; }

/* ---------------------------------------------------------------- forms */
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 1.5rem 0 .75rem; min-width: 0; }
fieldset:first-of-type { margin-top: 2rem; }
legend { float: left; width: 100%; padding: 0; font-size: 1.3rem; font-weight: 700; margin-bottom: .3rem; }
legend + * { clear: both; }
.hint { color: var(--muted); }
.hint.spaced { margin-top: 1.5rem; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 2rem; margin-bottom: 1rem; }
.checks.inline { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; }
@media (max-width: 640px) { .checks { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; flex: none; accent-color: var(--fg); }
input[type="text"], input[type="number"] { font: inherit; color: var(--fg); background: var(--bg); border: 2px solid var(--fg); border-radius: 0; padding: .45rem .6rem; }
input[type="text"] { width: 100%; max-width: 28rem; }
input[type="number"] { width: 5.5rem; }
.count-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.count-row label { font-weight: 700; }
.presets { display: inline-flex; gap: .4rem; }
.presets button { font: inherit; font-size: .92rem; padding: .35rem .75rem; background: var(--bg); color: var(--fg); border: 1px solid var(--fg); border-radius: 0; cursor: pointer; }
.presets button:hover { background: var(--fg); color: var(--bg); }

/* ---------------------------------------------------------------- run page */
.tabs { display: flex; flex-wrap: wrap; gap: 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs button { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: .5rem 0; color: var(--link); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--fg); font-weight: 700; border-bottom-color: var(--fg); }
.prompt-pane[hidden] { display: none; }
.prompt-text { background: var(--faint); border: 1px solid var(--line); padding: 1rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow-y: auto; }

.bignum { font-size: 4.5rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; margin: 1.25rem 0 .75rem; max-width: none; }
.bignum span { font-size: .36em; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.bar { display: flex; height: .8rem; background: var(--faint); border: 1px solid var(--line); margin-bottom: .6rem; }
.bar i { display: block; height: 100%; }
.bar .pass { background: var(--pass); }
.bar .fail { background: var(--fail); }
.bar .incomplete { background: var(--warn); }
.legend { max-width: none; }
.legend span { margin-right: 1.1rem; white-space: nowrap; }
.remarks { font-size: 1.15rem; }
.subjects { margin-top: 1.5rem; }
.subjects .minibar { width: 34%; }
.subjects .bar { height: .55rem; margin: .5rem 0 0; }

.task { border-top: 1px solid var(--line); }
.tasks { border-bottom: 1px solid var(--line); }
.task > summary { padding: .75rem 0; cursor: pointer; }
.task-row { display: inline-grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; width: calc(100% - 1.6rem); vertical-align: top; }
.task-row .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.task-row .t strong { display: block; }
.task-row .t span { color: var(--muted); font-size: .92rem; }
.task > summary:hover .t strong { text-decoration: underline; }
.task-body { display: grid; gap: 1.25rem; padding: .25rem 0 1.5rem 1.6rem; }
.task-body > * { min-width: 0; }
.task-body p, .task-body blockquote { margin-bottom: 0; }
.findings { list-style: none; padding: 0; margin: 0; }
.findings li { border-left: 4px solid var(--line); padding: .3rem 0 .3rem .75rem; margin-bottom: .4rem; }
.findings .violation { border-color: var(--fail); }
.findings .violation::before { content: "✗ "; color: var(--fail); font-weight: 700; }
.findings .goal { border-color: var(--pass); }
.findings .goal::before { content: "✓ "; color: var(--pass); font-weight: 700; }
.findings .missed { border-color: var(--warn); }
.findings .missed::before { content: "○ "; color: var(--warn); font-weight: 700; }
.timeline-wrap { max-height: 20rem; overflow: auto; border: 1px solid var(--line); background: var(--faint); padding: .4rem .75rem; }
.timeline { font: .8rem/1.5 var(--mono); margin: 0; }
.timeline td { padding: .25rem .75rem .25rem 0; border-bottom: 1px solid var(--line); }
.timeline tr:last-child td { border-bottom: 0; }
.timeline .what { white-space: nowrap; }
.timeline .data { color: var(--muted); overflow-wrap: anywhere; word-break: break-word; }
.timeline .sig { font-weight: 700; }
.timeline .sig.violation { color: var(--fail); }
.timeline .sig.goal { color: var(--pass); }

.prize { border-top: 3px solid var(--fg); margin-top: 2.5rem; padding-top: 1rem; }
.prize p { margin-bottom: .35rem; }
.prize-line { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
