:root {
  --bg: #f4f4f1; --fg: #111113; --muted: #6b6b70; --line: #d9d9d4; --card: #ffffff;
  --accent: #d71921; --accent-fg: #ffffff; --ok: #1a7f4b;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0b0c; --fg: #f2f2f0; --muted: #9a9aa0; --line: #2a2a2e; --card: #151517; --ok: #4cc38a; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: max(24px, env(safe-area-inset-top)) 16px 48px;
}
main { max-width: 560px; margin: 0 auto; }
header { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; }
header img { width: 28px; height: 28px; border-radius: 7px; }
header b { font-family: var(--mono); letter-spacing: .04em; }
h1 { font-size: clamp(30px, 8vw, 42px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; }
.lede { color: var(--muted); margin: 0 0 28px; font-size: 17px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 8px; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.card p:last-child { margin-bottom: 0; }
button, .btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 13px 22px; min-height: 48px;
  background: var(--fg); color: var(--bg); cursor: pointer; width: 100%;
}
button.primary { background: var(--accent); color: var(--accent-fg); }
button.quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.code {
  font: 13px/1.5 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin: 0 0 12px; overflow-x: auto; white-space: pre; word-break: normal;
}
.code.wrap { white-space: pre-wrap; word-break: break-all; }
input[type=text] {
  font: 14px var(--mono); width: 100%; padding: 13px 12px; border-radius: 10px; margin-bottom: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
input.plain, textarea, select, input[type=datetime-local] {
  font: inherit; width: 100%; padding: 12px; border-radius: 10px; margin: 0 0 10px; min-height: 48px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
textarea { resize: vertical; display: block; }
form .row { align-items: stretch; }
form .row > * { margin-bottom: 10px; }
h3 { font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
#pending-list { list-style: none; margin: 0; padding: 0; }
#pending-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
#pending-list .what { flex: 1; min-width: 0; }
#pending-list .what b, #pending-list .what span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pending-list .what span { color: var(--muted); }
#pending-list button { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }
details { margin-top: 14px; color: var(--muted); font-size: 15px; }
summary { cursor: pointer; padding: 6px 0; }
details > div { padding-top: 10px; }
ol { margin: 0 0 14px; padding-left: 22px; color: var(--muted); font-size: 15px; }
ol li { margin-bottom: 6px; }
.status { min-height: 22px; font-size: 14px; color: var(--muted); margin: 12px 2px 0; }
.status.ok { color: var(--ok); }
.status.err { color: var(--accent); }
.how { display: grid; gap: 14px; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: n; }
.how li { counter-increment: n; display: grid; grid-template-columns: 30px 1fr; color: var(--muted); font-size: 15px; }
.how li::before { content: counter(n); font: 13px var(--mono); color: var(--fg); padding-top: 2px; }
.how b { color: var(--fg); font-weight: 600; }
footer { margin-top: 40px; font-size: 13px; color: var(--muted); }
footer a { color: inherit; }
code { font: 13px var(--mono); }
[hidden] { display: none !important; }
a.btn { display: block; text-align: center; text-decoration: none; margin-bottom: 10px; }

.tag { font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 1px; }
#acct-hooks { list-style: none; margin: 14px 0; padding: 0; }
#acct-hooks li { border-top: 1px solid var(--line); padding: 14px 0; }
#acct-hooks li:last-child { border-bottom: 1px solid var(--line); }
#acct-hooks .name { font-weight: 600; }
#acct-hooks .meta { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
#acct-hooks .actions { display: flex; flex-wrap: wrap; gap: 8px; }
#acct-hooks .actions button { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }
#acct-claim { margin-bottom: 4px; }
