:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --border: #2d3a4d;
  --text: #e7ecf3;
  --muted: #9aa8bc;
  --accent: #5b9fd4;
  --accent2: #3d8b6e;
  --danger: #c45c5c;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 1.5rem; width: 100%; }
main.wrap { flex: 1; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--panel); flex-wrap: wrap;
}
.brand { font-weight: 700; letter-spacing: 0.02em; color: var(--text); font-size: 1.15rem; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
nav.row a { margin-right: 0.35rem; }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem;
}
.grid { display: grid; gap: 1rem; }
@media (min-width: 800px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .doc-layout { grid-template-columns: 1.35fr 1fr; }
}
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
input, textarea, select, button, .btn {
  font: inherit; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); padding: 0.55rem 0.75rem;
}
input, textarea, select { width: 100%; margin-bottom: 0.75rem; }
textarea { min-height: 120px; resize: vertical; }
button, .btn {
  cursor: pointer; background: var(--accent); color: #0b1220;
  border: none; font-weight: 600; padding: 0.55rem 1rem;
  display: inline-block; text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.05); text-decoration: none; }
button.secondary, .btn.secondary { background: var(--border); color: var(--text); }
button.good, .btn.good { background: var(--accent2); color: #fff; }
button.danger, .btn.danger { background: var(--danger); color: #fff; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.inline { display: inline; margin: 0; }
.muted { color: var(--muted); font-size: 0.9rem; }
.error { color: #ffb4b4; font-size: 0.95rem; margin: 0.5rem 0; }
.ok { color: #9ddeb8; font-size: 0.95rem; margin: 0.5rem 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  padding: 0.75rem 0; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.badge {
  font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px;
  background: var(--border); color: var(--muted);
}
.badge.credits { background: #243b2f; color: #9ddeb8; }
pre.result {
  white-space: pre-wrap; background: var(--bg); padding: 0.75rem;
  border-radius: 8px; border: 1px solid var(--border); font-size: 0.88rem;
  margin-top: 0.5rem; max-height: 320px; overflow: auto;
}
.hero { padding: 3rem 0.5rem; text-align: center; }
.hero h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
.auth-card { max-width: 420px; margin: 1rem auto; }
.job-item { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.job-item:last-child { border-bottom: none; }
blockquote {
  margin: 0 0 0.35rem; padding: 0.4rem 0.65rem;
  border-left: 3px solid var(--accent); background: var(--bg); font-size: 0.9rem;
}
.footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1rem 0; }
code { font-size: 0.85em; background: var(--bg); padding: 0.1rem 0.35rem; border-radius: 4px; }
h1, h2 { margin-top: 0; }

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 8px 0 16px;
}
.preset {
  text-align: left;
  background: #0a1224;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.preset strong { display: block; margin-bottom: 4px; }
.preset span { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; font-weight: 400; }
.preset.active, .preset:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}
.preset.active { background: color-mix(in srgb, var(--accent) 12%, #0a1224); }
