:root {
  --bg: #f4f1ea; --card: #fff; --ink: #1f2a24; --muted: #66706a; --line: #ddd8cc;
  --accent: #2f6b4f; --accent-ink: #fff; --ok: #e5f2ea; --err: #fbe7e4; --err-ink: #8a2a1d;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151a17; --card: #1f2622; --ink: #e8ece9; --muted: #9aa49e; --line: #333c37;
          --accent: #5fae86; --accent-ink: #0d1410; --ok: #1d3328; --err: #3a1f1b; --err-ink: #f3b3a8; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; padding: 24px 16px; }
.card { max-width: 520px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card.wide { max-width: 960px; }
h1 { margin: 0; font-size: 1.4rem; }
h2 { font-size: 1.05rem; margin: 20px 0 8px; }
.sub { margin: 0 0 16px; color: var(--muted); }
label { display: block; margin: 12px 0; font-weight: 600; font-size: .92rem; }
label small, .small { font-weight: 400; color: var(--muted); }
input, textarea { width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--line); border-radius: 8px; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button.ghost { background: transparent; color: var(--accent); }
button.danger { color: var(--err-ink); border-color: var(--err-ink); }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.msg { margin-top: 16px; padding: 12px; border-radius: 8px; background: var(--line); }
.msg.ok { background: var(--ok); }
.msg.err { background: var(--err); color: var(--err-ink); }
pre { white-space: pre-wrap; font-size: .9rem; margin: 0 0 8px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td small { color: var(--muted); }
.actions { white-space: nowrap; }
.actions button { padding: 5px 10px; margin: 0 4px 4px 0; font-size: .85rem; }
.pill { font-size: .8rem; padding: 2px 8px; border-radius: 99px; background: var(--line); }
.pill.filled { background: var(--ok); }
.reveal { margin-top: 20px; padding: 16px; border: 2px solid var(--accent); border-radius: 10px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
dt { font-weight: 600; }
dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
dd button { padding: 3px 10px; font-size: .8rem; }
