:root {
  color-scheme: light dark;
  --line: #dcdce1;
  --muted: #6b6b72;
  --accent: #1565c0;
  --bg-soft: rgba(127, 127, 140, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  padding: 28px 16px 64px;
  max-width: 860px;
  font: 15px/1.55 -apple-system, system-ui, "Segoe UI", sans-serif;
}
h1 { font-size: 21px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
a { color: var(--accent); }

input, select, button, textarea {
  font: inherit;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
}
button { cursor: pointer; font-weight: 600; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { font-weight: 500; }
button.danger { border-color: #c62828; color: #c62828; font-weight: 500; }
button:disabled { opacity: 0.5; cursor: default; }

.card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid { display: grid; gap: 8px; }
.muted { color: var(--muted); font-size: 13px; }
.note { font-size: 13px; color: var(--muted); min-height: 19px; }
.error { color: #c62828; }
.ok { color: #2e7d32; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

nav.tabs { display: flex; gap: 4px; margin: 20px 0; border-bottom: 1px solid var(--line); }
nav.tabs button {
  border: none; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; color: var(--muted); padding: 8px 12px;
}
nav.tabs button[aria-selected="true"] { color: inherit; border-bottom-color: var(--accent); }
.hidden { display: none !important; }
