/* Shared stylesheet for the static documentation pages.
   Self-contained: these pages are copied verbatim out of demo/public/ by Vite
   and are never processed by the bundler, so no variables from the app's
   index.css are available here. Palette is duplicated intentionally. */

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

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #263347;
  --border: #334155;
  --border2: #475569;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --safe: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
}

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

body {
  background: var(--bg);
  color: var(--text-muted);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0.9rem 1.5rem;
}
.topbar-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.98rem;
}
.brand:hover { color: var(--accent-hover); }
.topbar-links { display: flex; gap: 1.1rem; font-size: 0.88rem; }
.topbar-links a { color: var(--text-dim); text-decoration: none; }
.topbar-links a:hover { color: var(--text); }

main { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.crumbs { font-size: 0.83rem; color: var(--text-dim); margin-bottom: 1.5rem; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--text-muted); }

h1 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}
.lede { font-size: 1.08rem; color: var(--text-muted); margin-bottom: 2.25rem; }

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.9rem;
  padding-top: 0.5rem;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.85rem 0 0.6rem;
}

p { margin-bottom: 1.05rem; }
strong { color: var(--text); font-weight: 600; }
em { color: var(--text); }

a { color: var(--accent-hover); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--accent-hover); }

ul, ol { margin: 0 0 1.15rem 1.35rem; }
li { margin-bottom: 0.45rem; }

code {
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.12em 0.38em;
  color: var(--text);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.845rem;
  line-height: 1.7;
  color: var(--text-muted);
  white-space: pre;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.35rem;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}
th, td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { color: var(--text); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }

blockquote {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.25rem;
}
blockquote p:last-child { margin-bottom: 0; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.35rem;
  font-size: 0.94rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--warn); }

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.65rem 1.15rem;
  font-weight: 500;
  font-size: 0.94rem;
  margin: 0.35rem 0 1.5rem;
}
.cta:hover { background: var(--accent-hover); border-bottom-color: transparent; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.14em 0.5em;
  border-radius: 4px;
  border: 1px solid var(--border2);
  color: var(--text-dim);
  white-space: nowrap;
}
.tag-danger { color: var(--danger); border-color: rgba(239,68,68,0.4); }
.tag-safe { color: var(--safe); border-color: rgba(34,197,94,0.4); }
.tag-warn { color: var(--warn); border-color: rgba(245,158,11,0.4); }

.related {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.related h2 { margin-top: 0; font-size: 1.1rem; }
.related ul { list-style: none; margin-left: 0; }
.related li { padding: 0.35rem 0; font-size: 0.94rem; color: var(--text-dim); }

footer.page-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  html { font-size: 15px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  main { padding: 1.75rem 1.15rem 3rem; }
}
