:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --text: #211f1b;
  --muted: #6f6a61;
  --line: #e6e1d8;
  --accent: #0f6b62;
  --accent-text: #ffffff;
  --accent-soft: #e3f0ed;
  --good: #1b7a5a;
  --bad: #b3362b;
  --bad-soft: #fbeae7;
  --on-bad: #ffffff;
  --amber: #a86a12;
  --amber-soft: #fbf0db;
  --side: #1d1c19;
  --side-text: #efece6;
  --side-muted: #9c978c;
  --side-on: #2f2d28;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1f1e1b;
    --text: #edeae4;
    --muted: #a39e94;
    --line: #33312c;
    --accent: #4db6a6;
    --accent-text: #0d1614;
    --accent-soft: #1d2f2b;
    --good: #5cc29e;
    --bad: #ee8a7f;
    --bad-soft: #3a211e;
    --on-bad: #2a1210;
    --amber: #e0a94f;
    --amber-soft: #36291a;
    --side: #100f0e;
    --side-on: #26241f;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.with-nav { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
a { color: var(--accent); }

/* sidebar */
.side {
  background: var(--side); color: var(--side-text); padding: 20px 14px 14px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px;
  color: inherit; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.mark { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 15px; }
.mark.big { width: 48px; height: 48px; border-radius: 12px; font-size: 22px; margin: 0 auto 14px; }
.side nav { display: grid; gap: 2px; flex: 1; align-content: start; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
  color: var(--side-muted); text-decoration: none; font-size: 14px; }
.side nav a:hover { color: var(--side-text); }
.side nav a.on { background: var(--side-on); color: var(--side-text); font-weight: 550; }
.nav-label { margin: 16px 10px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--side-muted); }
.who { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 8px 0; border-top: 1px solid var(--side-on); font-size: 13px; }
.who strong { display: block; font-weight: 550; }
.who span { color: var(--side-muted); font-size: 12px; }
.who button.link { color: var(--side-muted); font-size: 12px; white-space: nowrap; }
.who button.link:hover { color: var(--side-text); }
.powered { padding: 0 8px; font-size: 11px; color: var(--side-muted); }

/* page */
main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 36px 36px 72px; }
main.narrow { max-width: 400px; padding: 12vh 16px 48px; }
main.public-page { max-width: 820px; padding: 8vh 24px 48px; }
.welcome.left { text-align: left; }
.welcome.left .mark.big { margin: 0 0 14px; }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.downloads section.card { margin: 0; }
.downloads .button { margin-right: 8px; }
.powered-public { margin-top: 32px; }
section.card ol { margin: 8px 0; padding-left: 20px; }
section.card ol li { margin-bottom: 4px; }
header.page { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 16px; font-weight: 620; letter-spacing: -.01em; margin: 0 0 8px; }
h2.section { margin: 32px 0 6px; }
p.lead { color: var(--muted); margin: 0; max-width: 62ch; }
.welcome { text-align: center; margin-bottom: 20px; }
.center { text-align: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
section.card { margin-bottom: 16px; }
.card.empty { color: var(--muted); font-size: 14px; padding: 14px 16px; }
.card.danger { margin-top: 24px; border-color: var(--bad); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.split aside { margin-top: 32px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; }
.stat .n { font-size: 30px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .n.amber { color: var(--amber); } .stat .n.red { color: var(--bad); }
.stat .l { color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; white-space: nowrap; font-size: 13px; font-weight: 550;
  padding: 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 550; }
tr:last-child td { border-bottom: 0; }
td strong { font-weight: 550; }
td.when { white-space: nowrap; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
td.right { text-align: right; }

/* forms */
form.stack { display: grid; gap: 14px; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
form.inline { display: flex; gap: 8px; }
label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 14px; margin-top: 10px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 11px; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
input[type=checkbox] { width: auto; margin-top: 3px; accent-color: var(--accent); }
textarea { min-height: 170px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
button, .button {
  font: inherit; font-size: 14px; font-weight: 550; background: var(--accent); color: var(--accent-text);
  border: 1px solid transparent; border-radius: 8px; padding: 8px 15px; cursor: pointer;
  text-decoration: none; display: inline-block; white-space: nowrap;
}
button.secondary, .button.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
button.danger { background: var(--bad); color: var(--on-bad); }
.button.small { padding: 4px 11px; font-size: 13px; }
button.link { background: none; border: 0; color: var(--muted); padding: 0; font-weight: 400; }
.msg { background: var(--amber-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; font-size: 14px; }
.error { color: var(--bad); }
.tag { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; color: var(--muted); text-decoration: none; }
.tag.good { color: var(--good); border-color: currentColor; }
.tag.bad { color: var(--bad); border-color: currentColor; }
.tag.amber { color: var(--amber); border-color: currentColor; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.hint { font-size: 12px; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
details summary { cursor: pointer; color: var(--accent); margin-top: 6px; font-size: 14px; }
details[open] summary { margin-bottom: 10px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.roles .card { padding: 14px 16px; }

/* setup and status */
.setup-head { display: flex; justify-content: space-between; align-items: baseline; }
.progress { height: 4px; background: var(--line); border-radius: 99px; margin: 8px 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 strong { font-weight: 550; }
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: 1fr auto; gap: 8px 12px; margin: 8px 0 0; font-size: 14px; }
dl.status dt { color: var(--muted); }
dl.status dd { margin: 0; text-align: right; }
.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: var(--amber); }
.copy { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  user-select: all; overflow-wrap: anywhere; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

@media (max-width: 900px) {
  body.with-nav { display: block; }
  .side { position: static; height: auto; gap: 12px; padding: 14px 16px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-label, .powered { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split aside { margin-top: 8px; }
  main { padding: 24px 16px 56px; }
  header.page { flex-direction: column; }
}
@media print {
  .side, .no-print { display: none; }
  body, body.with-nav { background: #fff; display: block; }
  .card, table, .table-wrap { border-color: #ccc; }
}
