:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #16212e;
  --muted: #5b6b7d;
  --line: #dde5ee;
  --accent: #1f6feb;
  --accent-soft: #e3edfb;
  --ok: #1a9e5c;
  --ok-soft: #e2f5eb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 33, 46, 0.05), 0 10px 30px rgba(22, 33, 46, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1420;
    --surface: #141d2c;
    --surface-2: #1a2537;
    --text: #e8eef6;
    --muted: #8ea0b5;
    --line: #253349;
    --accent: #4d96ff;
    --accent-soft: #17273f;
    --ok: #3ecf8e;
    --ok-soft: #122b21;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-name span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(48px, 9vw, 96px) 0 clamp(36px, 6vw, 64px);
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 158, 92, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(26, 158, 92, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot {
    animation: none;
  }
}

.hero h1 {
  margin: 22px auto 14px;
  max-width: 18ch;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(15px, 2.3vw, 18px);
}

/* ---------- feature cards ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  padding-bottom: clamp(36px, 6vw, 64px);
}

.feature {
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h2 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- content pages / panels ---------- */

.page {
  flex: 1;
  padding: clamp(36px, 6vw, 64px) 0;
}

.page-narrow {
  width: min(100% - 40px, 720px);
  margin-inline: auto;
}

.page h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4.5vw, 36px);
  letter-spacing: -0.02em;
}

.page .lead {
  margin: 0 0 32px;
  color: var(--muted);
}

.panel {
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel h2 {
  margin: 0;
  padding: 16px 20px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.panel .panel-body {
  padding: 6px 20px 18px;
}

.settings {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.settings th,
.settings td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.settings tr:last-child th,
.settings tr:last-child td {
  border-bottom: none;
}

.settings th {
  width: 38%;
  color: var(--muted);
  font-weight: 500;
}

.settings code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
}

/* ---------- 404 ---------- */

.center-page {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 0;
}

.center-page .code {
  font-size: clamp(60px, 14vw, 110px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.center-page h1 {
  margin: 12px 0 8px;
  font-size: clamp(20px, 3.5vw, 28px);
}

.center-page p {
  margin: 0 0 26px;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.button:hover {
  filter: brightness(1.08);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 18px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--muted);
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav {
    margin-left: -12px;
  }

  .hero {
    text-align: left;
  }

  .hero h1,
  .hero p {
    margin-inline: 0;
  }

  .settings th {
    width: 44%;
  }
}
