:root {
  --bg: #0e1014;
  --panel: #161a21;
  --border: #262b35;
  --text: #e6e8eb;
  --muted: #8a93a3;
  --accent: #6ea8ff;
  --accent-hover: #8cbbff;
  --ok: #5ed28a;
  --err: #ff7a7a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ─── Home page ─────────────────────────────────────────────── */
body.home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
body.home main {
  width: 100%;
  max-width: 480px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
body.home h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
body.home .tagline {
  margin: 0 0 24px;
  color: var(--muted);
}
.field { display: block; margin-bottom: 18px; }
.field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.row { display: flex; gap: 8px; }
input[type="text"], select {
  width: 100%;
  background: #0b0d12;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
input[type="text"]:focus, select:focus {
  border-color: var(--accent);
}
button {
  background: #1f2530;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}
button:hover { background: #262d3a; }
button.primary {
  width: 100%;
  background: var(--accent);
  color: #0b0d12;
  border: none;
  font-weight: 600;
  margin-top: 4px;
}
button.primary:hover { background: var(--accent-hover); }

.footnote {
  margin: 22px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Pad page ──────────────────────────────────────────────── */
body.pad {
  display: flex;
  flex-direction: column;
}
body.pad header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }
.slug {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.spacer { flex: 1; }
header select, header button {
  padding: 6px 10px;
  font-size: 13px;
}
.status {
  font-size: 12px;
  color: var(--muted);
  min-width: 70px;
  text-align: right;
}
.status.ok  { color: var(--ok); }
.status.err { color: var(--err); }

textarea#pad {
  flex: 1;
  width: 100%;
  resize: none;
  background: var(--bg);
  border: none;
  outline: none;
  padding: 16px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
}
body.pad footer {
  padding: 6px 14px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  font-size: 12px;
  color: var(--muted);
}
