:root {
  --bg: #f4f1ea;
  --ink: #1a1a18;
  --muted: #666662;
  --border: #e7e7e1;
  --card: #fffdf8;
  --accent: #1f57c7;
  --accent-soft: #eef4ff;
  --ok: #157347;
  --bad: #b42318;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 10% -10%, #dfe9ff 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, #f3e4c8 0%, transparent 50%),
    var(--bg);
  line-height: 1.5;
}

a { color: inherit; }
.wrap {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  padding: 28px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.brand {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 14px;
  font-size: 0.92rem;
}
.nav a:hover { color: var(--ink); }

.hero {
  padding: 36px 0 18px;
}
.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 14px 0 10px;
}
.lead { color: var(--muted); font-size: 1.05rem; max-width: 38rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin: 18px 0;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

label { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; }
input, textarea, button {
  font: inherit;
}
input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row button { flex: 0 0 auto; }

button, .btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 11px 16px;
  cursor: pointer;
}
button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
button:disabled { opacity: 0.55; cursor: not-allowed; }

.msg {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}
.msg.ok { color: var(--ok); }
.msg.err { color: var(--bad); }

.note-list { list-style: none; padding: 0; margin: 0; }
.note-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.note-list li:first-child { border-top: 0; }
.note-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.live-line {
  font-size: 0.92rem;
  color: var(--ok);
  font-weight: 650;
  min-height: 1.4em;
}

.engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.engine {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.engine strong { display: block; margin-bottom: 4px; }
.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.pill.on { background: #e8f6ee; color: var(--ok); }
.pill.off { background: #f4f4f0; color: var(--muted); }

.site-footer {
  margin-top: 48px;
  padding: 38px 0 46px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.site-footer__credit { margin: 0; }
.site-footer__link {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}
.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .row { flex-direction: column; align-items: stretch; }
}
