:root {
  --bg: #ffffff;
  --fg: #1b1f24;
  --muted: #5b6672;
  --rule: #e3e8ee;
  --accent: #1f6feb;
  --danger: #b3261e;
  --card: #f7f9fb;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --fg: #e6edf3;
    --muted: #9aa7b2;
    --rule: #232b33;
    --accent: #58a6ff;
    --danger: #f2857c;
    --card: #161c22;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header.site {
  border-bottom: 1px solid var(--rule);
}

header.site .wrap {
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.brand {
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.925rem;
}

nav a:hover, a:hover { text-decoration: underline; }

a { color: var(--accent); }

h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.5rem;
  letter-spacing: -0.01em;
}

h3 { font-size: 1rem; margin: 1.5rem 0 0.35rem; }

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

.lead { font-size: 1.05rem; }

ul { padding-left: 1.25rem; }
li { margin: 0.3rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.925rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th { font-weight: 600; }

.scroll { overflow-x: auto; }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}

.card.warn { border-color: var(--danger); }
.card.warn strong { color: var(--danger); }

button {
  font: inherit;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6rem 1rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

button.secondary {
  background: transparent;
  border-color: var(--rule);
  color: var(--fg);
}

button.danger { background: var(--danger); }

button[disabled] { opacity: 0.5; cursor: not-allowed; }

input[type="text"] {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  width: 100%;
  max-width: 18rem;
}

.status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--rule);
  display: none;
}

.status.show { display: block; }
.status.ok { border-color: var(--accent); }
.status.err { border-color: var(--danger); }

.hidden { display: none !important; }

footer.site {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site .wrap { padding: 1.5rem 1.25rem; }

code {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
  font-size: 0.9em;
}

/* delete-account: kept out of inline style= so the page needs no 'unsafe-inline' CSP */
.spaced { margin-top: 1rem; }

button.tiny {
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
}
