/* Plain, fast, readable. System fonts only (no font download). Shell-wide rules only: a
   page's own rules live in a .css file beside the page (see shell/app.js, useStyle). */

/* Rows here get display: flex, which would beat the hidden attribute on every page. */
[hidden] { display: none !important; }
:root {
  --fg: #1d1d1f;
  --muted: #5b5b66;
  --bg: #ffffff;
  --panel: #f5f5f7;
  --line: #d9d9de;
  --passed: #1e7b34;
  --failed: #b3261e;
  --blocked: #8a5300;
  --inconclusive: #4a4a8a;
  --neutral: #5b5b66;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.45;
}

body { margin: 0; }
main { max-width: 64rem; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
h1 { font-size: 1.5rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
a { color: #0b57d0; }
pre { background: var(--panel); padding: 0.75rem; overflow: auto; max-height: 24rem; font-size: 0.85rem; }

.site-header { border-bottom: 1px solid var(--line); padding: 0.6rem 1.25rem; }
.site-name { font-weight: 600; color: var(--fg); text-decoration: none; }

.state { color: var(--muted); padding: 1rem 0; }
.refused, .unavailable, .not-found { max-width: 40rem; }
.button { font: inherit; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 0.4rem; background: var(--panel); cursor: pointer; }

.meta { color: var(--muted); margin: 0 0 1rem; }
.meta span + span::before { content: " · "; }

.chip { display: inline-block; padding: 0.05rem 0.55rem; border-radius: 1rem; font-size: 0.85rem; font-weight: 600; color: #fff; background: var(--neutral); white-space: nowrap; }
.chip-passed { background: var(--passed); }
.chip-failed { background: var(--failed); }
.chip-blocked { background: var(--blocked); }
.chip-inconclusive { background: var(--inconclusive); }
.chip-not-planned, .chip-unknown, .chip-state-queued { background: var(--neutral); }
.chip-state-running { background: #0b57d0; }
.chip-state-finished { background: var(--passed); }
.chip-state-errored { background: var(--failed); }

.counts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.case-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.case-list li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.case-list .title { flex: 1; }
.case-list .reason { color: var(--muted); font-size: 0.9rem; }

.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.compare > div { background: var(--panel); padding: 0.75rem; border-radius: 0.4rem; }
.compare h3 { margin: 0 0 0.25rem; font-size: 0.95rem; }

.filmstrip { display: flex; gap: 0.75rem; overflow-x: auto; padding: 0.25rem 0 0.75rem; list-style: none; margin: 0; }
.filmstrip li { flex: 0 0 14rem; }
.filmstrip img, .shot { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 0.3rem; }
.filmstrip .caption { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 40rem) { .compare { grid-template-columns: 1fr; } }

/* Untrusted text: long words wrap, direction overrides stay inside their own box. */
h1, h2, h3, p, li, pre, .title, .reason, .caption, .meta, .compare > div, .notes {
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}
.title, .reason, .caption, .meta span, h1, p, pre, .compare p { unicode-bidi: isolate; }
pre { white-space: pre-wrap; }
.notice { background: #fff4ce; border: 1px solid #e0c060; padding: 0.4rem 0.75rem; border-radius: 0.3rem; }
.log-block { margin: 0 0 1rem; }
.log-block h3 { margin: 0 0 0.25rem; font-size: 0.95rem; }
.shot-holder { display: block; }
.chip-state-starting, .chip-state-between-cases { background: #0b57d0; }
.chip-step-done { background: var(--neutral); }
.chip-step-passed { background: var(--passed); }
.chip-step-failed { background: var(--failed); }
.live-frame { max-width: 40rem; }
