/* Haunted-lab theme. Dark is the default; light via [data-theme=light] or OS preference. */
:root {
  color-scheme: dark;
  --bg: #14101c; --surface: #1e1829; --text: #ece8f4; --muted: #b9b0c9;
  --border: #7a6d94; --accent: #9be08a; --on-accent: #10200c;
  --link: #8fd0ff; --error: #ff9a94; --pass: #9be08a; --fail: #ff9a94;
  --focus: #ffd25e; --glow: 0 0 .75rem rgba(155, 224, 138, .25);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f3ee; --surface: #ffffff; --text: #1d1a24; --muted: #4d4560;
  --border: #7a6f91; --accent: #2d6a1f; --on-accent: #ffffff;
  --link: #0b4f8a; --error: #a00018; --pass: #1f5a14; --fail: #a00018;
  --focus: #7a4b00; --glow: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f6f3ee; --surface: #ffffff; --text: #1d1a24; --muted: #4d4560;
    --border: #7a6f91; --accent: #2d6a1f; --on-accent: #ffffff;
    --link: #0b4f8a; --error: #a00018; --pass: #1f5a14; --fail: #a00018;
    --focus: #7a4b00; --glow: none;
  }
}
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; line-height: 1.5; margin: 0; background: var(--bg); color: var(--text); overflow-wrap: anywhere; }
main { max-width: 60rem; margin: 0 auto; padding: 1rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--border); padding: .5rem 1rem; max-width: 60rem; margin: 0 auto; }
.site-header h1 { margin: 0; font-size: 1.5rem; color: var(--accent); text-shadow: var(--glow); }
h2, h3, h4 { color: var(--accent); }
a { color: var(--link); }
code { background: var(--surface); padding: 0 .25rem; border-radius: .25rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.error { color: var(--error); font-weight: 600; }
#privacy-note { color: var(--muted); border-left: 4px solid var(--accent); padding-left: .75rem; }
.finding, .job, .loaded { background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; padding: .75rem; margin: 1rem 0; box-shadow: var(--glow); }
.finding { border-left: 4px solid var(--focus); }
fieldset { margin: .5rem 0; border: 1px solid var(--border); border-radius: .5rem; min-width: 0; }
label.cell, label.choice { display: inline-block; margin-right: 1rem; }
label.choice { display: block; }
input:not([type=checkbox]):not([type=radio]) { display: block; max-width: 100%; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: .25rem; padding: .4rem; }
button { padding: .5rem 1rem; min-height: 2.75rem; min-width: 2.75rem; cursor: pointer; font: inherit; color: var(--on-accent); background: var(--accent); border: 2px solid var(--accent); border-radius: .5rem; }
button:hover { filter: brightness(1.1); }
button.theme-toggle { color: var(--text); background: transparent; border-color: var(--border); }
ul.samples { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
iframe.report { width: 100%; height: 32rem; border: 1px solid var(--border); background: #fff; }
pre.log { overflow-x: auto; background: var(--bg); border: 1px solid var(--border); padding: .5rem; }
.verdict { font-weight: 700; }
.verdict.pass { color: var(--pass); }
.verdict.fail { color: var(--fail); }
.note, small { color: var(--muted); }
@media (max-width: 40rem) {
  main { padding: .75rem; }
  iframe.report { height: 24rem; }
  button { width: 100%; }
  button.theme-toggle { width: auto; }
  label.cell { display: block; margin-right: 0; }
}
@media (prefers-reduced-motion: no-preference) { button { transition: filter .15s; } }
