:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5d6879;
  --line: #dde1e7;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --good: #1d7a46;
  --bad: #b3261e;
  --warn-bg: #fff4e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #1c2027;
    --text: #e6e9ee;
    --muted: #9aa4b2;
    --line: #2e343e;
    --accent: #6b9ff0;
    --accent-text: #0e1420;
    --good: #5cc28a;
    --bad: #f07a72;
    --warn-bg: #3a2f1a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
header.top {
  display: flex; align-items: center; gap: 24px; padding: 12px 24px;
  background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
header.top .brand { font-weight: 650; color: var(--text); text-decoration: none; }
header.top nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
header.top nav a { text-decoration: none; color: var(--muted); }
header.top nav a.on { color: var(--text); font-weight: 600; }
header.top .who { color: var(--muted); font-size: 14px; display: flex; gap: 12px; align-items: center; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
main.narrow { max-width: 420px; padding-top: 10vh; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 28px 0 10px; }
p.lead { color: var(--muted); margin-top: -8px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat .n { font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.when { white-space: nowrap; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
form.stack { display: grid; gap: 12px; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 10px; width: 100%;
}
input[type=checkbox] { width: auto; }
textarea { min-height: 160px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
button, .button {
  font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-text);
  border: 0; border-radius: 7px; padding: 9px 16px; cursor: pointer; text-decoration: none;
  display: inline-block;
}
button.link { background: none; color: var(--muted); padding: 0; font-weight: 400; }
.msg { background: var(--warn-bg); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.error { color: var(--bad); }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.tag.good { color: var(--good); border-color: currentColor; }
.tag.bad { color: var(--bad); border-color: currentColor; }
.muted { color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters a { text-decoration: none; }
details summary { cursor: pointer; }

/* --- friendlier pages ------------------------------------------------------ */
h2.section { margin-top: 32px; }
section.card { margin-bottom: 16px; }
section.card h2 { margin-top: 0; }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.hint { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.roles .card { padding: 14px; }
.setup-head { display: flex; justify-content: space-between; align-items: baseline; }
.progress { height: 4px; background: var(--line); border-radius: 99px; margin: 10px 0 14px; overflow: hidden; }
.progress > div { height: 100%; background: var(--good); }
ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ol.steps li { display: flex; gap: 12px; align-items: flex-start; }
ol.steps li.done strong { color: var(--muted); font-weight: 500; }
ol.steps .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 12px; color: var(--muted); }
ol.steps li.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
dl.status { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; }
dl.status dt { color: var(--muted); font-size: 14px; }
dl.status dd { margin: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.dot.good { background: var(--good); } .dot.bad { background: var(--bad); } .dot.warn { background: #c98a1b; }
.copy { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  user-select: all; margin: 8px 0 12px; overflow-wrap: anywhere; }
button.secondary, .button.secondary { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
label.check span strong { font-weight: 600; }
details summary { color: var(--accent); margin-top: 6px; }
details[open] summary { margin-bottom: 10px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
@media print {
  header.top, .no-print { display: none; }
  body { background: #fff; }
  .card, table { border-color: #ccc; }
}
