/* ─────────────────────────────────────────────────────────────────────────
   pages.css — shared shell (nav + footer + prose) for /docs, /legal, /blog
   All visual decisions follow DESIGN.md (HeroUI semantic tokens, light mode).
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Foundation */
  --background: #F4F5F6;
  --background-secondary: #EAEBEC;
  --foreground: #18181B;
  --muted: #717274;
  --surface: #FFFFFF;
  --surface-secondary: #EEEFF1;
  --surface-tertiary: #E9EAEC;
  --surface-hover: #EAEAEA;

  /* Accent / status */
  --accent: #0485F7;
  --accent-foreground: #FCFCFC;
  --accent-hover: #3592F9;
  --accent-soft: rgba(4, 133, 247, 0.15);
  --accent-soft-foreground: #0485F7;
  --danger: #FF383C;
  --danger-soft: rgba(255, 56, 60, 0.15);
  --success: #17C964;
  --success-soft: rgba(23, 201, 100, 0.15);
  --warning: #F5A524;

  /* Borders & separators */
  --border: #DDDEDF;
  --border-secondary: #C6C6C7;
  --separator: #E4E4E5;

  /* Shape & elevation */
  --radius: 8px;
  --field-radius: 12px;
  --surface-shadow: 0 2px 4px 0 rgba(0,0,0,0.04), 0 1px 2px 0 rgba(0,0,0,0.06), 0 0 1px 0 rgba(0,0,0,0.06);
  --overlay-shadow: 0 2px 8px 0 rgba(0,0,0,0.06), 0 -6px 12px 0 rgba(0,0,0,0.03), 0 14px 28px 0 rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--background); color: var(--foreground); }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* Material Symbols base — fonts are loaded by the page <head>. */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  font-variation-settings: 'opsz' 24, 'wght' 400, 'FILL' 0, 'GRAD' 0;
  -webkit-font-smoothing: antialiased;
}

/* ── Top nav (matches the landing page) ──────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
}
.top-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.top-nav-wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--foreground);
}
.top-nav-links {
  display: none;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}
@media (min-width: 760px) { .top-nav-links { display: flex; } }
.top-nav-links a { text-decoration: none; transition: color .15s; }
.top-nav-links a:hover { color: var(--foreground); }
.top-nav-spacer { flex: 1; }
.top-nav-actions { display: inline-flex; align-items: center; gap: 12px; }
.top-nav-text { font-size: 14px; color: var(--muted); text-decoration: none; }
.top-nav-text:hover { color: var(--foreground); }
.top-nav-login {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.top-nav-login:hover { background: var(--surface-hover); border-color: var(--border-secondary); }

/* ── Page shell ──────────────────────────────────────────────────────────── */
.page {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}
.page-inner {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  padding: 56px 24px 96px;
  flex: 1;
}
@media (max-width: 720px) {
  .page-inner { padding: 32px 16px 64px; }
}

/* ── Headings & prose ────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}
.page-h1 {
  font-size: 36px;        /* spec 4xl */
  line-height: 40px;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin-bottom: 12px;
}
.page-sub {
  font-size: 18px;
  line-height: 28px;
  color: var(--muted);
  margin-bottom: 48px;
  max-width: 640px;
}
@media (max-width: 720px) {
  .page-h1 { font-size: 28px; line-height: 32px; }
  .page-sub { font-size: 15px; line-height: 22px; margin-bottom: 32px; }
  .section { margin-bottom: 40px; }
  .section h2 { font-size: 20px; line-height: 26px; }
  .section h3 { font-size: 16px; line-height: 22px; }
  .section p, .section ul, .section ol { font-size: 14px; line-height: 22px; }
  .surface-block { padding: 16px; }
  .surface-block pre { font-size: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ft-cols { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .top-nav-inner { padding: 0 16px; gap: 10px; }
  .top-nav-wordmark { font-size: 16px; }
  .top-nav-text { display: none; }
}
.section { margin-bottom: 56px; }
.section h2 {
  font-size: 24px;        /* spec 2xl */
  line-height: 32px;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 16px;
  scroll-margin-top: 80px;
}
.section h3 {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.section p {
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 720px;
}
.section p strong { color: var(--foreground); }
.section ul, .section ol {
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
  padding-left: 24px;
  margin-bottom: 16px;
}
.section ul li, .section ol li { margin-bottom: 6px; }
.section code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  background: var(--surface-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--foreground);
}
.section a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.section a:hover { border-bottom-color: var(--accent); }

/* Card-style surface for code blocks and grouped content */
.surface-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--field-radius);
  padding: 20px 24px;
  box-shadow: var(--surface-shadow);
  margin-bottom: 16px;
}
.surface-block pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--foreground);
  overflow-x: auto;
  white-space: pre;
}

/* ── Tool/source grid (used on /docs) ────────────────────────────────────── */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--field-radius);
  padding: 18px 20px;
  box-shadow: var(--surface-shadow);
}
.kit-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--foreground);
}
.kit-card-body { font-size: 14px; color: var(--muted); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-pill-primary {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}
.btn-pill-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-pill-ghost {
  background: var(--surface);
  color: var(--foreground);
  border-color: var(--border);
}
.btn-pill-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-secondary);
}

/* ── Footer (same multi-column layout as the landing page) ──────────────── */
.ft {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 28px;
}
.ft-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.ft-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (min-width: 900px) {
  .ft-top { grid-template-columns: 1fr 2fr; gap: 64px; }
}
.ft-brand { display: flex; flex-direction: column; gap: 12px; }
.ft-wordmark {
  color: var(--foreground);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}
.ft-tagline { font-size: 14px; color: var(--muted); line-height: 1.5; max-width: 260px; }
.ft-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}
.ft-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  display: inline-block;
  flex-shrink: 0;
}
.ft-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (min-width: 720px) {
  .ft-cols { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
.ft-col-h {
  font-size: 14px;
  color: var(--foreground);
  font-weight: 600;
  margin-bottom: 14px;
}
.ft-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ft-col a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color .15s;
}
.ft-col a:hover { color: var(--foreground); }
.ft-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--separator);
}
@media (min-width: 720px) {
  .ft-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
.ft-copy { font-size: 13px; color: var(--muted); }
.ft-region {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

