:root {
  --bg: #fbfbf9; --fg: #1d1f21; --muted: #666a6e; --line: #dcdcd6; --accent: #0b6e5a;
  --ok: #1d7a3e; --err: #b3261e; --late: #fff1ee; --us: #eef7f4;
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141617; --fg: #e8e8e4; --muted: #9aa0a4; --line: #33383b; --accent: #5ccfb0;
          --ok: #6fd39a; --err: #ff8a80; --late: #3a2220; --us: #17302a; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: 15px; line-height: 1.45; }
main { max-width: 1200px; margin: 0 auto; padding: 1rem 1rem 4rem; }
.top { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between;
       padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--fg); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
a { color: var(--accent); }
h1 small { color: var(--muted); font-weight: 400; font-size: .6em; }
.meta, .note, small { color: var(--muted); }
.ok { color: var(--ok); } .error { color: var(--err); }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: .5rem 0 1rem; }
th, td { border-bottom: 1px solid var(--line); padding: .35rem .5rem; text-align: left; vertical-align: top; }
th { font-weight: 600; white-space: nowrap; }
table.dense td, table.dense th { font-size: 13px; padding: .25rem .4rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.us { background: var(--us); } tr.late { background: var(--late); }
.wrap { word-break: break-all; max-width: 18rem; }
form.inline { display: inline; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.stack { display: grid; gap: .75rem; max-width: 22rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; align-items: end; }
.grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: .2rem; font-size: 13px; color: var(--muted); }
label.check { display: flex; gap: .4rem; align-items: center; }
input, select, button { font: inherit; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px;
                        background: var(--bg); color: var(--fg); min-width: 0; }
button, .button { background: var(--accent); color: var(--bg); border: 0; cursor: pointer; border-radius: 6px;
                  padding: .45rem .8rem; text-decoration: none; display: inline-block; }
button.link { background: none; color: var(--accent); padding: 0; }
button.cell { background: none; color: var(--muted); padding: 0 .4rem; border: 1px solid var(--line); }
button.cell.signed { color: var(--ok); border-color: var(--ok); font-weight: 700; }
code { background: var(--line); padding: .05rem .3rem; border-radius: 4px; }
.narrow { max-width: 26rem; }
ul.findings { padding-left: 1.2rem; }
form.upload input[type=file] { font-size: 12px; max-width: 14rem; padding: .15rem; border-style: dashed; }
.result { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; margin: 1rem 0; }
.result .total { font-size: 1.2em; font-weight: 700; }
