:root {
  --bg: #f6f6f3; --surface: #ffffff; --text: #1d1d1b; --muted: #66665f; --line: #e2e2dc;
  --accent: #2f5bd3; --accent-text: #ffffff; --ok: #1f7a4d; --warn: #9a6400; --bad: #b3261e;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141414; --surface: #1d1d1d; --text: #ececea; --muted: #a0a09a; --line: #333331;
          --accent: #7d9cff; --accent-text: #0d0d0d; --ok: #5fc48f; --warn: #e2b04a; --bad: #ff8a80; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .brand { font-weight: 700; text-decoration: none; color: var(--text); }
header.top nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
header.top form { margin: 0; }
main { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
main.narrow { max-width: 420px; }
h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.1rem; margin: 28px 0 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
button, .button { display: inline-block; padding: 9px 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 400; }
button.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); padding: 4px 10px; font-weight: 400; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); }
.flash.ok { border-color: var(--ok); }
.flash.error { border-color: var(--bad); color: var(--bad); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .8rem; border: 1px solid currentColor; }
.badge.ok { color: var(--ok); } .badge.bad { color: var(--bad); }
.key { display: flex; gap: 8px; align-items: center; }
.key code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
progress { width: 100%; height: 8px; margin-top: 6px; appearance: none; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
ul.domains { list-style: none; padding: 0; margin: 6px 0 0; }
ul.domains li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
ul.domains form { margin: 0; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px 16px; }
