:root {
  --bg: #f6f6f4;
  --panel: #ffffff;
  --text: #1f2328;
  --muted: #5f6670;
  --line: #dcdcd7;
  --accent: #2f5d50;
  --accent-text: #ffffff;
  --warn-bg: #fbf3e4;
  --warn-line: #e2c58f;
  --warn-text: #6b4a12;
  --bad: #a3322b;
  --ok: #2f6b3c;
  --code-bg: #f0f0ec;
  --radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191b;
    --panel: #1e2124;
    --text: #e4e4e1;
    --muted: #9aa0a6;
    --line: #33373b;
    --accent: #7fb3a2;
    --accent-text: #10201b;
    --warn-bg: #2b2518;
    --warn-line: #6b5a31;
    --warn-text: #e8d3a3;
    --bad: #e08a82;
    --ok: #8cc79a;
    --code-bg: #25292c;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 12px; background: var(--panel); }
.brand { font-weight: 600; padding: 0 8px 16px; }
.navgroup { margin-bottom: 20px; }
.navtitle { color: var(--muted); font-size: 13px; padding: 0 8px 6px; }
.side a { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.side a:hover { background: var(--code-bg); }
.side a.active { background: var(--code-bg); font-weight: 600; }
.num { width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.side a.done .num { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
main { padding: 32px 40px; max-width: 820px; outline: none; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
h2 { font-size: 16px; font-weight: 600; margin: 28px 0 8px; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); margin-bottom: 24px; }
.mode { border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); padding: 8px 12px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
label { display: block; font-weight: 500; margin: 14px 0 4px; }
label:first-child { margin-top: 0; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { min-height: 70px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.err { color: var(--bad); font-size: 13px; margin-top: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.choice { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; cursor: pointer; font-weight: normal; }
.choice:has(input:checked) { border-color: var(--accent); }
.choice input { margin-right: 8px; }
.choice .title { font-weight: 600; }
.choice .sub { color: var(--muted); font-size: 14px; margin-left: 24px; }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; gap: 8px; margin-top: 20px; align-items: center; }
button { font: inherit; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.danger { border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
.status { color: var(--muted); font-size: 14px; }
.warn { border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); padding: 10px 12px; border-radius: var(--radius); margin: 12px 0; font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
tr.small td { color: var(--muted); }
td.price { white-space: nowrap; }
.tag { font-size: 12px; color: var(--accent); font-weight: 600; }
.tag.no { color: var(--bad); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--code-bg); border-radius: 4px; }
code { padding: 1px 5px; }
pre { padding: 12px; overflow: auto; max-height: 420px; border: 1px solid var(--line); }
dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
ol.steps { padding-left: 20px; margin: 0; }
ol.steps li { margin-bottom: 4px; }
.conn { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.conn:last-child { border-bottom: 0; }
.conn .scopes { color: var(--muted); font-size: 13px; }
.switch { display: inline-flex; gap: 6px; align-items: center; font-weight: normal; margin: 0; white-space: nowrap; }
details summary { cursor: pointer; color: var(--muted); }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 20px 16px; }
  .row { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; }
}
.panel > h2:first-child { margin-top: 0; }
.steps li.done { color: var(--muted); }
.steps li.doing { font-weight: 600; }
.steps li.failed { color: #a3322a; font-weight: 600; }
