:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --line: #e2e5ea;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --danger: #dc2626;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101318;
    --card: #181c23;
    --text: #e5e7eb;
    --muted: #8b93a1;
    --line: #262c36;
    --accent: #3b82f6;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.size { color: var(--muted); font-size: .85em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── public: single centered card ─────────────────────────────── */
body.public {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}
body.public .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 26rem;
  text-align: center;
}
body.public .muted { margin-top: 0; }
.actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn.primary .size { color: color-mix(in srgb, var(--accent-text) 75%, transparent); }
.btn.small { padding: .25rem .6rem; font-size: .85em; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.copied { border-color: var(--accent); color: var(--accent); }
ul.alt {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
}
ul.alt li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
ul.alt li a { flex: 1; overflow-wrap: anywhere; }

/* ── admin: page layout with tables ───────────────────────────── */
body.admin { padding: 2rem 1rem; }
body.admin .page { max-width: 52rem; margin: 0 auto; }
body.admin header.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--line);
}
tr:last-child td { border-bottom: none; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.actions-cell { text-align: right; white-space: nowrap; }
.badge {
  display: inline-block;
  padding: .05rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.badge.dev { border-color: var(--muted); color: var(--muted); }
.danger-zone { margin-top: 2rem; }
footer.version {
  margin-top: 2.5rem;
  font-size: .8rem;
  color: var(--muted);
}
