:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #141414;
  --muted: #6b6b66;
  --line: #e2e0da;
  --accent: #141414;
  --accent-text: #ffffff;
  --ok: #1f6b3a;
  --ok-bg: #e7f3ea;
  --error: #9b1c1c;
  --error-bg: #fbeaea;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1b1b1a;
    --text: #f1f0ec;
    --muted: #a3a29c;
    --line: #2d2d2b;
    --accent: #f1f0ec;
    --accent-text: #121211;
    --ok: #8fd4a5;
    --ok-bg: #16301f;
    --error: #f2a3a3;
    --error-bg: #3a1717;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; }

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.top nav { display: flex; gap: 18px; flex: 1; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--text); }
.brand { font-weight: 700; letter-spacing: 0.02em; text-decoration: none; }
.top form { margin: 0; }

main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; }
.narrow { max-width: 460px; margin: 8vh auto 0; }

h1 { font-size: 28px; margin: 0 0 16px; }
h2 { font-size: 20px; margin: 40px 0 8px; }
h3 { font-size: 16px; margin: 24px 0 8px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

.notice { padding: 10px 14px; border-radius: 8px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.error { background: var(--error-bg); color: var(--error); }

button, .button {
  display: inline-block;
  font: inherit;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
}
button.small { padding: 6px 12px; font-size: 14px; }
button.link { background: none; color: var(--muted); padding: 0; text-decoration: underline; }

input, select {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; }
.stack.row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; font-size: 14px; }

.table { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; font-weight: 600; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

code.secret { font-size: 17px; letter-spacing: 0.04em; user-select: all; word-break: break-all; }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  main { padding: 24px 16px 48px; }
}
