/* Static pages: blog, legal documents, 404 (built by scripts/build-site.ts) */
:root {
  color-scheme: dark;
  --bg: #09090b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: rgb(255 255 255 / 0.1);
  --card: rgb(255 255 255 / 0.03);
  --accent: #3b6ef5;
  --accent-hover: #2457e8;
  --link: #93b4fd;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(50% 40% at 50% 0%, rgb(36 87 232 / 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; padding: max(12px, env(safe-area-inset-top)) 12px 0; }
.site-header__bar {
  display: flex; align-items: center; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 8px 8px 8px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgb(9 9 11 / 0.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 17px; letter-spacing: 0.01em; }
.brand span { font-weight: 400; }
.brand b { font-weight: 800; }
.site-nav { display: flex; gap: 24px; margin-left: auto; font-size: 14px; }
.site-nav a { color: #d4d4d8; text-decoration: none; }
.site-nav a:hover { color: #fff; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
  transition: background-color 160ms;
}
.button:hover { background: var(--accent-hover); }
.button--ghost { background: rgb(255 255 255 / 0.06); border: 1px solid var(--line); box-shadow: none; }
.button--ghost:hover { background: rgb(255 255 255 / 0.12); }

/* Content */
.site-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 56px 20px 80px; }
.page-head h1, .article h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; }
.page-head p { margin: 16px 0 0; color: var(--muted); font-size: 1.125rem; }
.page-head--center { text-align: center; padding-top: 8vh; }
.page-head--center .cta__actions { justify-content: center; }
.meta { color: var(--faint); font-size: 14px; }
.article > .meta { margin: 16px 0 0; }
.crumbs { margin-bottom: 20px; font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }

.post-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 12px; }
.post-card a {
  display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); color: inherit; text-decoration: none;
  transition: border-color 160ms, background-color 160ms;
}
.post-card a:hover { border-color: rgb(96 144 250 / 0.4); background: rgb(255 255 255 / 0.05); }
.post-card h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.post-card p { margin: 8px 0 12px; color: var(--muted); }

/* Article text */
.prose { margin-top: 32px; font-size: 1.0625rem; color: #e4e4e7; }
.prose h2 { margin: 2.2em 0 0.6em; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.015em; color: #fff; }
.prose h3 { margin: 1.8em 0 0.5em; font-size: 1.2rem; color: #fff; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--faint); }
.prose strong { color: #fff; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgb(255 255 255 / 0.08); font-size: 0.9em; }
.prose table { display: block; width: 100%; overflow-x: auto; margin: 1.5em 0; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: #fff; font-weight: 600; white-space: nowrap; }

.cta { margin-top: 56px; padding: 28px; border: 1px solid rgb(96 144 250 / 0.3); border-radius: 24px; background: linear-gradient(180deg, rgb(36 87 232 / 0.16), rgb(36 87 232 / 0.04)); }
.cta h2 { margin: 0; font-size: 1.375rem; }
.cta p { margin: 8px 0 0; color: var(--muted); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.related { margin-top: 64px; }
.related > h2 { margin: 0; font-size: 1.375rem; }
.related .post-list { margin-top: 20px; }

/* Footer */
.site-footer { border-top: 1px solid rgb(255 255 255 / 0.06); padding: 28px 20px max(28px, env(safe-area-inset-bottom)); color: var(--faint); font-size: 13px; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.site-footer a { color: var(--faint); text-decoration: none; }
.site-footer a:hover { color: #d4d4d8; }
.site-footer p { margin: 14px 0 0; }

@media (max-width: 640px) {
  .site-nav { display: none; }
  .site-header__bar { justify-content: space-between; padding-left: 14px; }
  .site-main { padding-top: 36px; }
  .post-card a { padding: 18px; }
  .cta { padding: 22px; }
}
