:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --text: #1f2430;
  --muted: #5c6470;
  --border: #e3e6ea;
  --accent: #2f6fed;
  --max-width: 800px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --surface: #171b23;
    --text: #e6e9ef;
    --muted: #9aa4b2;
    --border: #262c37;
    --accent: #5b8cff;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

.site-header .inner,
main,
.site-footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

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

.app-name {
  font-size: 0.9rem;
  color: var(--muted);
}

main { padding-top: 2rem; padding-bottom: 3rem; }

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 0.25rem;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
}

p, li { color: var(--text); }

a { color: var(--accent); }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 1.5rem 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--surface);
}

.card h3 { margin: 0 0 0.75rem; font-size: 1.05rem; }

.card ul { margin: 0; padding-left: 1.1rem; }
