:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #59636e;
  --line: #d1d9e0;
  --bar: #f6f8fa;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #9198a1;
    --line: #3d444d;
    --bar: #151b23;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.bar {
  background: var(--bar);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.brand { font-weight: 600; }
.page { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.foot {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
h1 { font-size: 24px; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 24px 0 8px; }
.bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.who { color: var(--muted); }
a { color: inherit; }
.form { display: grid; gap: 6px; max-width: 360px; }
.form button { margin-top: 10px; justify-self: start; }
input[type=text], input[type=password] {
  font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg); color: var(--fg);
}
button {
  font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--bar); color: var(--fg); cursor: pointer;
}
button.link { border: 0; background: none; padding: 0; text-decoration: underline; }
form.inline { display: inline; }
.error { border-left: 3px solid var(--fg); padding: 4px 10px; }
.notice { border-left: 3px solid var(--line); padding: 4px 10px; }
.muted { color: var(--muted); }
.secret code { font-size: 20px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; user-select: all; }
.grid { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.grid th, .grid td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.demos { list-style: none; padding: 0; margin: 0; }
.demo-row { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.demo-name { font-size: 20px; font-weight: 600; }
.demo-status.yours { font-weight: 600; }
.wizard { display: grid; gap: 16px; }
.step-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.step-demo { font-weight: 600; font-size: 18px; }
.step-pos { color: var(--muted); }
.menu { margin-left: auto; }
.menu summary { cursor: pointer; font-weight: 600; }
.menu .acts { padding-left: 20px; }
.menu .current { font-weight: 700; }
.label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.say-text { font-size: 20px; line-height: 1.5; margin: 0; }
.do-text { font-size: 18px; margin: 0 0 8px; overflow-wrap: anywhere; }
.surface { border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; text-transform: none; letter-spacing: 0; }
.note { display: grid; gap: 4px; margin-top: 12px; }
.note textarea { font: inherit; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); }
.note button { justify-self: start; }
.type-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; }
.type-label { font-weight: 600; }
.type-value { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere; }
.shot { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.shot .target { fill: none; stroke: #d1242f; stroke-width: 6; }
.no-shot { border: 1px dashed var(--line); border-radius: 4px; padding: 32px 16px; text-align: center; color: var(--muted); margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; }
a.big, button.big { display: inline-block; font-size: 20px; padding: 12px 28px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; background: var(--bar); color: var(--fg); }
.primary { font-weight: 700; border-width: 2px; }
.warn { border-left: 3px solid #d1242f; padding: 4px 10px; }
.log, .joberr { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 4px; padding: 8px; max-height: 60vh; overflow: auto; font-size: 13px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-item { border: 1px solid var(--line); border-left-width: 6px; border-radius: 4px; padding: 8px 12px; }
.check-item p { margin: 4px 0; }
.check-item.level-green { border-left-color: #1a7f37; }
.check-item.level-amber { border-left-color: #bf8700; }
.check-item.level-red { border-left-color: #d1242f; }
.badge { font-size: 13px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); }
.badge.level-green { color: #1a7f37; }
.badge.level-amber { color: #9a6700; }
.badge.level-red { color: #d1242f; font-weight: 700; }
.check-fix { font-weight: 600; }
.check-details code { overflow-wrap: anywhere; }
button[disabled] { cursor: not-allowed; opacity: 0.5; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; }
dialog#idle { border: 2px solid var(--fg); border-radius: 8px; background: var(--bg); color: var(--fg); max-width: 420px; }
