/* The look of a Stampdrill test report. The report carries the numbers; this
   file and report.js beside it carry everything about how they look.

   Copyright 2026 Siamand Maroufi. This Source Code Form is subject to the terms
   of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
   distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */
:root {
  color-scheme: light dark;
  --ink: #17181c; --dim: #5d6270; --faint: #8a8f9c; --line: #e4e5ea;
  --page: #ffffff; --panel: #f6f6f8; --accent: #e85a2e;
  --ok: #1f9d55; --bad: #d63031; --ok-soft: rgba(31,157,85,.12); --bad-soft: rgba(214,48,49,.1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceef3; --dim: #a3a9b7; --faint: #767c8a; --line: #272a32;
    --page: #101114; --panel: #17191e; --accent: #f8734a;
    --ok: #4ad07f; --bad: #ff6b6b; --ok-soft: rgba(74,208,127,.14); --bad-soft: rgba(255,107,107,.13);
  }
}
* { box-sizing: border-box; }
/* The report lives in these elements, so they have to be blocks to hold a page. */
stamp-report, stamp-plan, stamp-load { display: block; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 64rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 .4rem; }
h2 { font-size: 1.1rem; margin: 0; letter-spacing: -.01em; }
.meta { color: var(--faint); font-size: .88rem; margin: 0 0 1.75rem; }
.meta code { color: var(--dim); }
.verdict {
  display: inline-block; border-radius: 999px; padding: .15rem .7rem; margin-right: .5rem;
  font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; vertical-align: 2px;
}
.passed > .verdict, .verdict.passed { background: var(--ok-soft); color: var(--ok); }
.failed > .verdict, .verdict.failed { background: var(--bad-soft); color: var(--bad); }
.totals { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 0 0 2.5rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.totals div { min-width: 5.5rem; }
.totals dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; }
.totals dd { margin: .1rem 0 0; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.totals dd.bad { color: var(--bad); }
.plan { border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem; margin: 0 0 1.25rem; }
.plan.failed { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.plan > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.file { color: var(--faint); font-size: .85rem; }
.counts { color: var(--dim); font-size: .88rem; margin: .35rem 0 .5rem; }
details { border-top: 1px solid var(--line); }
summary { cursor: pointer; display: flex; align-items: center; gap: .55rem; padding: .55rem 0; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "›"; color: var(--faint); font-size: 1.1rem; line-height: 1; transition: transform .12s; }
details[open] > summary::before { transform: rotate(90deg); }
summary .time { margin-left: auto; font-weight: 400; color: var(--faint); font-size: .85rem; font-variant-numeric: tabular-nums; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); flex: none; }
.failed > summary .dot, li.failed > .dot { background: var(--bad); }
.dims { color: var(--faint); font-size: .8rem; font-weight: 400; }
ul { list-style: none; margin: .2rem 0 .8rem; padding-left: 1.15rem; }
li { padding: .12rem 0; }
li::before { font-weight: 700; margin-right: .45rem; }
li.passed::before { content: "✓"; color: var(--ok); }
li.failed::before { content: "✗"; color: var(--bad); }
li.note::before { content: "·"; color: var(--faint); }
li.note { color: var(--dim); }
code { font: .83rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.status { color: var(--faint); font-size: .83rem; margin-left: .35rem; font-variant-numeric: tabular-nums; }
.message { color: var(--bad); font-size: .85rem; white-space: pre-wrap; }
.step { font-weight: 650; }
table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .35rem .6rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
th { color: var(--faint); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
td:not(:first-child), th:not(:first-child) { text-align: right; }
.section-title { margin: 1.1rem 0 .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .6rem 1rem; margin: .9rem 0 1.1rem; }
.metrics dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; }
.metrics dd { margin: .1rem 0 0; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.metrics dd.bad { color: var(--bad); }
.charts { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: .4rem 0 1rem; }
.chart { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem .4rem; }
.chart h3 { margin: 0 0 .1rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; }
.chart .peak { font-size: .8rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.chart svg { display: block; width: 100%; height: 92px; }
.chart-scale { display: flex; justify-content: space-between; margin: .25rem 0 0; color: var(--faint); font-size: .72rem; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 10px; font-family: inherit; }
.bars { margin: .4rem 0 .6rem; }
.bar-row { display: grid; grid-template-columns: minmax(5rem, 11rem) 1fr auto; gap: .6rem; align-items: center; padding: .18rem 0; font-size: .86rem; }
.bar-track { background: var(--panel); border-radius: 4px; height: .55rem; position: relative; overflow: hidden; }
.bar { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; min-width: 2px; }
.bar.second { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.bar-value { color: var(--dim); font-variant-numeric: tabular-nums; font-size: .82rem; }
.lanes { margin: .5rem 0 .2rem; }
.lane { display: grid; grid-template-columns: 4.5rem 1fr; gap: .6rem; align-items: center; padding: .12rem 0; font-size: .82rem; }
.lane-name { color: var(--faint); font-variant-numeric: tabular-nums; }
.lane-track { position: relative; height: .62rem; background: var(--panel); border-radius: 4px; }
.lane-bar { position: absolute; top: 0; bottom: 0; background: var(--ok); border-radius: 4px; min-width: 3px; }
.lane-bar.failed { background: var(--bad); }
.lane-scale { display: flex; justify-content: space-between; color: var(--faint); font-size: .74rem; margin: .2rem 0 .6rem 5.1rem; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; border-radius: 999px; padding: .05rem .5rem; font-size: .74rem; font-weight: 650; }
.pill.passed { background: var(--ok-soft); color: var(--ok); }
.pill.failed { background: var(--bad-soft); color: var(--bad); }
footer { margin-top: 2.5rem; color: var(--faint); font-size: .83rem; }
footer a { color: var(--accent); }
