:root {
  /* Decision Forward palette */
  --df-navy: #224d77;
  --df-blue: #34658c;
  --df-teal: #85bdbb;
  --df-orange: #e78e42;
  --df-ink: #1f2a37;
  --df-mist: #eef4f7;
  --bg: var(--df-mist);
  --card: #ffffff;
  --text: var(--df-ink);
  --muted: #5a6b7b;
  --line: #d7e3ea;
  --brand: var(--df-navy);
  --accent: var(--df-orange);
  --ok: #1f8a4c;
  --warn: #b7791f;
  --bad: #c53030;
  --bar: #e1ebf0;
  --head: var(--df-navy);
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1620;
    --card: #15212d;
    --text: #e6edf3;
    --muted: #93a6b6;
    --line: #253646;
    --brand: #7fb0d9;
    --accent: #f0a462;
    --ok: #3fb974;
    --warn: #e0a83a;
    --bad: #f06363;
    --bar: #22323f;
    --head: #183a5c;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif; }
a { color: var(--brand); }
code, .mono { font-family: var(--mono); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; background: var(--head); color: #fff; border-bottom: 3px solid var(--df-teal); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand .mark, .card .mark { font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 0; }
.brand .mark { color: #fff; font-size: 28px; }
.card .mark { color: var(--brand); font-size: 42px; text-align: center; }
.brand .divider { width: 1px; height: 30px; background: rgba(255, 255, 255, .35); }
.brand .title { font-weight: 700; font-size: 18px; line-height: 1.1; }
.brand .sub { display: block; font-weight: 400; font-size: 12px; color: var(--df-teal); letter-spacing: .04em; text-transform: uppercase; }
.who { display: flex; gap: 14px; align-items: center; color: rgba(255, 255, 255, .8); font-size: 13px; }
.who button.link { color: #fff; border: 1px solid rgba(255, 255, 255, .4); border-radius: 6px; padding: 3px 10px; }
.who button.link:hover { background: var(--df-orange); border-color: var(--df-orange); }
.card-logo { display: block; width: 240px; height: auto; margin: 0 auto 18px; }
@media (prefers-color-scheme: dark) { .card-logo { background: #fff; border-radius: 8px; padding: 8px 12px; } }
main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; }
h1 { font-size: 22px; margin: 0 0 14px; }
h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin: 26px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; box-shadow: 0 1px 2px rgba(31, 42, 55, .05); }
.card.flush { padding: 0; }
.narrow { max-width: 420px; margin: 40px auto; }
.center { text-align: center; padding: 60px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); min-height: 1.2em; margin: 8px 0 0; }
label { display: block; margin: 0 0 12px; font-size: 14px; }
input { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; }
button { background: var(--df-navy); color: #fff; border: 0; border-radius: 7px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
button.link { background: none; color: var(--brand); padding: 0; font-weight: 400; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.secret { font-size: 16px; letter-spacing: .08em; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.summary { display: flex; gap: 12px; flex-wrap: wrap; }
.pill { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--df-teal); border-radius: 10px; padding: 10px 14px; min-width: 150px; }
.pill.bad { border-top-color: var(--bad); } .pill.warn { border-top-color: var(--df-orange); }
.pill b { display: block; font-size: 22px; }
.pill.ok b { color: var(--ok); } .pill.warn b { color: var(--warn); } .pill.bad b { color: var(--bad); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.srv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.srv-head h3 { margin: 0; font-size: 16px; }
.meters { display: grid; gap: 8px; margin: 10px 0 14px; }
.meter { display: grid; grid-template-columns: 70px 1fr 120px; gap: 8px; align-items: center; font-size: 13px; }
.meter .track { height: 8px; background: var(--bar); border-radius: 4px; overflow: hidden; }
.meter .fill { height: 100%; background: var(--brand); }
.meter .fill.warn { background: var(--warn); } .meter .fill.bad { background: var(--bad); }
.meter .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px 14px; font-size: 13px; margin-bottom: 12px; }
.facts span { color: var(--muted); }
details { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.mini td, .mini th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.mini th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
table.sites { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sites th, table.sites td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.sites th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
table.sites tr.group td { background: var(--bg); font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.sites td.num { text-align: right; font-variant-numeric: tabular-nums; }
.spark { display: inline-flex; gap: 1px; align-items: flex-end; height: 14px; }
.spark i { width: 3px; height: 14px; background: var(--ok); border-radius: 1px; opacity: .85; }
.spark i.down { background: var(--bad); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 16px 190px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.checks li:last-child { border-bottom: 0; }
.checks .v { color: var(--muted); word-break: break-word; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 9px; background: var(--bar); color: var(--muted); }
.foot { margin-top: 18px; }
.layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-top: 6px; }
.col { display: grid; gap: 6px; align-content: start; }
.panel { display: grid; gap: 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-bottom: 4px; border-bottom: 2px solid var(--df-teal); }
.panel-head h2 { margin: 0; }
.panel-head h2 a { color: inherit; text-decoration: none; }
.panel-head .more { font-size: 13px; text-decoration: none; }
a.card.short { display: block; color: inherit; text-decoration: none; padding: 12px 14px; }
a.card.short:hover, a.pill:hover { border-color: var(--brand); }
a.pill { color: inherit; text-decoration: none; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.stats b { color: var(--text); }
.issues { margin: 6px 0 0; }
.issues.ok { color: var(--ok); } .issues.warn { color: var(--warn); } .issues.bad { color: var(--bad); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list li.group { display: block; padding: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.list li.site { grid-template-columns: 12px minmax(0, 1fr) 56px 50px auto; }
.list li.check { grid-template-columns: 12px 1fr auto; }
.list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .name a { text-decoration: none; font-weight: 600; }
.list .host { margin-left: 8px; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; }
a.open { font-size: 12px; white-space: nowrap; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
a.open:hover { border-color: var(--brand); }
.crumb { margin: 14px 0 6px; }
.crumb a { text-decoration: none; }
.card h1 { margin: 0; font-size: 20px; }
.card h2 { margin: 18px 0 8px; }
.facts .tag { margin-left: 6px; }
.checks li { grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1fr); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; padding: 10px 14px; font-size: 14px; }
.quick ul { list-style: none; margin: 0; padding: 0; }
.quick li { padding: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick li.sub { padding-left: 18px; font-size: 13px; }
.quick li.sub::before { content: "↳"; color: var(--muted); margin-right: 4px; }
.quick li .dot { width: 8px; height: 8px; margin-right: 7px; vertical-align: 1px; }
.quick a { text-decoration: none; font-weight: 600; }
.quick li.sub a { font-weight: 400; }
.quick a:hover { color: var(--accent); text-decoration: underline; }
.quick .note { color: var(--muted); font-size: 12px; font-weight: 400; }
.summary { justify-content: flex-end; gap: 8px; margin-bottom: 4px; }
.summary .pill { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 5px 11px; border-radius: 8px; border-top-width: 2px; }
.summary .pill b { display: inline; font-size: 16px; }
.summary .pill span { font-size: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pair > a.card.short { height: 100%; }
.acc { padding: 4px 14px; }
.acc details { border-top: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 0; }
.acc details:last-child { border-bottom: 0; }
.acc summary { display: grid; grid-template-columns: 12px 12px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; list-style: none; font-size: 14px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::before { content: "▸"; color: var(--muted); font-size: 12px; transition: transform .15s; grid-column: 1; grid-row: 1; }
.acc details[open] > summary::before { transform: rotate(90deg); }
.acc summary .dot { grid-column: 2; grid-row: 1; }
.acc summary:hover .gname { color: var(--accent); }
.acc .gname { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; color: var(--brand); }
.acc .list { padding: 0 0 8px 44px; }
.list li.site.sub { padding-left: 22px; grid-template-columns: 12px minmax(0, 1fr) 56px 50px auto; }
.list li.site.sub .name::before { content: "↳ "; color: var(--muted); font-weight: 400; }
.list li.subhead { display: block; padding: 10px 0 2px 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 0; }
table.sites tr.sub td:nth-child(2) { padding-left: 30px; }
table.sites tr.subhead td { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 10px 2px 10px; border-bottom: 0; }
.info p { margin: 0 0 6px; max-width: 75ch; }
.info ol { margin: 0; padding-left: 20px; max-width: 75ch; }
.info ol li { margin-bottom: 4px; }
.info .open { margin-right: 8px; }
.cmds { display: grid; gap: 8px; }
.cmdline { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.cmdline code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 13px; }
button.copy { padding: 5px 10px; font-size: 12px; font-weight: 600; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 10px; color: #fff; background: var(--ok); }
.badge.warn { background: var(--warn); } .badge.bad { background: var(--bad); }
a.strong { font-weight: 700; text-decoration: none; }
.list li.check a { text-decoration: none; }
.bars { display: grid; grid-template-columns: repeat(96, 1fr); gap: 1px; height: 34px; }
.bars i { background: var(--ok); border-radius: 1px; }
.bars i.warn { background: var(--warn); } .bars i.down { background: var(--bad); } .bars i.none { background: var(--bar); }
.axis { display: flex; justify-content: space-between; margin-top: 2px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pair { grid-template-columns: 1fr; }
  .list .host { display: none; }
  .list li.site { grid-template-columns: 12px minmax(0, 1fr) 50px auto; }
  .list li.site > .num:nth-of-type(3) { display: none; }
  .checks li { grid-template-columns: 16px 1fr; }
  .checks .v { grid-column: 2; }
  .meter { grid-template-columns: 56px 1fr 96px; }
}

/* audit trail */
.bad-text b { color: var(--bad); }
.segline { margin: 6px 0 0; }
.alist { list-style: none; margin: 8px 0 6px; padding: 0; }
.alist li { display: grid; grid-template-columns: 12px 72px minmax(0, 1fr); gap: 8px; white-space: nowrap; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line); }
.alist li:last-child { border-bottom: 0; }
.alist .ev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-top { align-items: center; margin: 4px 0 12px; }
.head-actions { display: flex; gap: 8px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; align-items: end; margin-bottom: 12px; padding: 12px 14px; }
.filters .f { margin: 0; font-size: 12px; color: var(--muted); }
.filters input, .filters select { margin-top: 3px; padding: 6px 8px; font-size: 14px; }
.filters select { display: block; width: 100%; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.filters .chk { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); padding-bottom: 7px; }
.filters .chk input { width: auto; margin: 0; }
.filters .actions { display: flex; justify-content: flex-end; }
button.ghost { background: none; color: var(--brand); border: 1px solid var(--line); padding: 5px 12px; font-size: 13px; }
button.ghost:hover { border-color: var(--brand); }
button.ghost:disabled { opacity: .5; cursor: default; }
table.audit td { vertical-align: top; white-space: normal; }
table.audit td.nowrap { white-space: nowrap; }
table.audit td.wrap { min-width: 260px; }
table.audit tr.ev-row { cursor: pointer; }
table.audit tr.ev-row:hover td { background: var(--bg); }
table.audit tr.ev-full td { background: var(--bg); }
table.audit .tag { margin-left: 6px; }
.tiny { font-size: 11px; word-break: break-all; }
.more-row { padding: 10px; text-align: center; border-top: 1px solid var(--line); }

/* setup QR code */
.qr { display: flex; justify-content: center; margin: 8px 0 12px; }
.qr svg { display: block; max-width: 100%; height: auto; }
#setup2-form details { margin: 4px 0 14px; }
#setup2-form details summary { cursor: pointer; font-weight: 600; }
