:root {
  --charcoal: #222222; --charcoal-2: #333333; --lime: #dce85d; --lime-dark: #3d4119;
  --bg: #f6f7f4; --card: #fff; --text: #222222; --muted: #50585e; --border: #d5d9d3;
  --critical: #b3261e; --serious: #c2410c; --moderate: #8a6100; --minor: #3f5f8a;
  --ok: #1c6b3a; --focus: #222222;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181a; --card: #222222; --text: #eef0ec; --muted: #b6bdb8; --border: #3a4044;
    --critical: #ff8a80; --serious: #ffab76; --moderate: #f2c94c; --minor: #9cc3ff; --ok: #7ee2a0;
    --lime-dark: #dce85d; --focus: #dce85d;
  }
}
:root[data-theme="dark"] {
  --bg: #15181a; --card: #222222; --text: #eef0ec; --muted: #b6bdb8; --border: #3a4044;
  --critical: #ff8a80; --serious: #ffab76; --moderate: #f2c94c; --minor: #9cc3ff; --ok: #7ee2a0;
  --lime-dark: #dce85d; --focus: #dce85d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 "Atkinson Hyperlegible", system-ui, sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
.skip { position: absolute; left: 8px; top: -50px; background: var(--lime); color: #222222; padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { top: 8px; }
header.bar { background: var(--charcoal); color: #fff; border-bottom: 4px solid var(--lime); }
header.bar .in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #f7f7f4; font-family: "Outfit", system-ui, sans-serif; }
.brand .word { font-weight: 700; font-size: 24px; letter-spacing: -0.01em; line-height: 1; }
.brand .eleven { background: var(--lime); color: #222222; border-radius: 6px; padding: 1px 3px 2px; margin: 0 1px; }
.brand .for { font-weight: 500; font-size: 17px; color: #d6d6cc; }
header.bar nav { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
header.bar nav a, header.bar nav button { color: #fff; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
h1, h2, h3, .band, .stat { font-family: "Outfit", system-ui, sans-serif; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 22px; margin: 32px 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.btn, button.btn { display: inline-block; font: inherit; font-weight: 700; background: var(--lime); color: #222222; border: 2px solid var(--lime); border-radius: 8px; padding: 9px 18px; text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.small { padding: 4px 10px; font-size: 15px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
form.inline { display: inline; }
label { display: block; font-weight: 700; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; max-width: 480px; font: inherit; padding: 9px 12px; border: 2px solid var(--muted); border-radius: 8px; background: var(--card); color: var(--text);
}
.hint { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.notice { border-left: 5px solid var(--lime-dark); background: var(--card); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.notice.error { border-color: var(--critical); }
.notice.ok { border-color: var(--ok); }
pre.snippet { background: var(--charcoal); color: #eef0ec; padding: 14px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-size: 15px; }
.score { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: var(--charcoal); color: #fff; border-radius: 14px; padding: 22px; }
.ring { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--lime) calc(var(--v) * 1%), #44494d 0); }
.ring span { width: 112px; height: 112px; border-radius: 50%; background: var(--charcoal); display: grid; place-items: center; text-align: center; font-size: 38px; font-weight: 700; line-height: 1; }
.ring small { display: block; font-size: 13px; font-weight: 400; margin-top: 4px; }
.score .band { font-size: 22px; font-weight: 700; color: var(--lime); margin: 0; }
.score .cap { color: #c9cfca; font-size: 15px; margin: 4px 0 0; }
.stat { font-size: 32px; font-weight: 700; display: block; }
.statcard h3 { display: flex; gap: 6px; align-items: center; font-size: 16px; color: var(--muted); }
details.q { display: inline; }
details.q summary { list-style: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid currentColor; font-size: 13px; cursor: pointer; }
details.q summary::-webkit-details-marker { display: none; }
details.q[open] > div { position: absolute; max-width: 320px; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 15px; font-weight: 400; z-index: 5; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; margin: 6px 0; }
.bars .track { background: var(--bg); border: 1px solid var(--border); height: 14px; border-radius: 7px; overflow: hidden; }
.bars .fill { height: 100%; background: var(--charcoal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bars .fill { background: var(--lime); } }
:root[data-theme="dark"] .bars .fill { background: var(--lime); }
.sev { font-weight: 700; text-transform: capitalize; }
.sev.critical { color: var(--critical); } .sev.serious { color: var(--serious); } .sev.moderate { color: var(--moderate); } .sev.minor { color: var(--minor); }
.tag { display: inline-block; font-size: 13px; border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; margin-right: 4px; }
.tag.on { background: var(--lime); color: #222222; border-color: var(--lime); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
td code, li code { font-size: 14px; word-break: break-all; }
.issue > summary { cursor: pointer; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.issue > summary h3 { display: inline; margin: 0; }
.issue ol, .issue ul { padding-left: 22px; }
.fixrow { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding: 14px 0; }
.fixrow:last-child { border-bottom: 0; }
.fixrow p { margin: 4px 0 0; color: var(--muted); max-width: 640px; }
.switch { display: flex; gap: 8px; align-items: center; font-weight: 700; margin: 0; }
.switch input { width: 22px; height: 22px; accent-color: var(--charcoal); }
.muted { color: var(--muted); }
footer.foot { max-width: 1100px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 15px; }
@media (max-width: 600px) {
  .bars li { grid-template-columns: 110px 1fr 40px; }
  h1 { font-size: 26px; }
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--border); padding: 6px 0; }
  table.stack td { display: block; border: 0; padding: 2px 0; }
}
/* Live audit progress */
.progress-box { border: 2px solid var(--lime-dark); }
.progress-box [data-msg]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--lime-dark); animation: ca11y-spin 0.9s linear infinite; flex: none; }
.progress-box.done [data-msg]::before { animation: none; border-color: var(--ok); background: var(--ok); }
@keyframes ca11y-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .progress-box [data-msg]::before { animation: none; } }

/* "hidden" must always win over display rules like .btn */
[hidden] { display: none !important; }
