:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --max-width: 760px;
  --page-width: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  color: var(--primary-dark);
}

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

.site-header-inner,
.site-footer-inner,
.page-shell {
  width: min(var(--page-width), calc(100% - 2rem));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary);
}

main {
  padding: 2.5rem 0 4rem;
}

.page-shell {
  max-width: var(--max-width);
}

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

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

.card h2,
.card h3,
.prose h2,
.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.card h2:first-child,
.card h3:first-child,
.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.card ul,
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.muted {
  color: var(--text-muted);
}

.callout {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.875rem;
  padding: 1rem 1.125rem;
  margin: 1.25rem 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
}

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

.prose strong {
  color: var(--text);
}

.meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .prose {
    padding: 1.25rem;
  }
}
