:root {
  --bg: #fafaf7;
  --fg: #1d1d1b;
  --muted: #6b6b66;
  --accent: #c8102e;
  --card: #ffffff;
  --border: #e3e3dd;
  --code-bg: #f1f1ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --fg: #f1f1ec;
    --muted: #9a9a93;
    --accent: #ff5a70;
    --card: #1f1f1f;
    --border: #333;
    --code-bg: #101010;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); }
.wrap { width: min(980px, 100% - 32px); margin: 0 auto; }

/* Header and footer */
.site-header, .site-footer { padding: 20px 0; }
.site-header .wrap, .site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: -.01em; color: var(--fg); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
nav a, .site-footer a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover, .site-footer a:hover, nav a[aria-current] { color: var(--accent); }
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

/* Buttons */
.btn {
  font: inherit;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn[aria-disabled="true"] { opacity: .65; cursor: default; }
.btn[aria-disabled="true"]:hover { border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Hero */
.hero { text-align: center; padding: 40px 0 16px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(34px, 6vw, 56px); line-height: 1.1; letter-spacing: -.02em; }
.hero .lead { margin: 0 auto 28px; max-width: 560px; font-size: 19px; color: var(--muted); }
.tidbit {
  width: min(680px, 100%);
  margin: 0 auto 20px;
  padding: 36px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.tag { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.tidbit h2 { margin: 0 0 12px; font-size: 28px; line-height: 1.2; }
.tidbit p { margin: 0; font-size: 18px; }
.tidbit .source { margin-top: 18px; font-size: 13px; color: var(--muted); }
.demo-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* Wall of cards */
section { padding: 36px 0 0; }
h2.section-title { margin: 0 0 6px; font-size: 24px; }
.section-lead { margin: 0 0 20px; color: var(--muted); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-flow: dense; gap: 12px; }
.card { padding: 18px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.card.wide { grid-column: span 2; }
.card h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.25; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
@media (max-width: 520px) { .card.wide { grid-column: auto; } }

/* Feature points */
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.point { padding: 20px; border: 1px solid var(--border); border-radius: 14px; }
.point h3 { margin: 0 0 6px; font-size: 17px; }
.point p { margin: 0; color: var(--muted); font-size: 15px; }
.cta-band { margin-top: 40px; padding: 28px; text-align: center; border: 1px dashed var(--border); border-radius: 16px; }
.cta-band h2 { margin: 0 0 6px; font-size: 22px; }
.cta-band p { margin: 0 0 16px; color: var(--muted); }

/* Docs page */
.doc { max-width: 720px; margin: 0 auto; padding-top: 24px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
.doc .lead { font-size: 19px; color: var(--muted); margin: 0 0 8px; }
.doc h2 { margin: 40px 0 8px; font-size: 24px; }
.doc p, .doc li { font-size: 17px; }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
code { background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.code { position: relative; margin: 12px 0 18px; }
pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.copy { position: absolute; top: 8px; right: 8px; padding: 4px 12px; font-size: 13px; background: var(--card); }
.table-scroll { overflow-x: auto; margin: 12px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.callout { margin: 16px 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; }
.callout p { margin: 0; font-size: 16px; }

/* Faint generated maze behind the page (see maze.js). Fades towards the middle so text stays calm. */
.maze {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, .35) 0%, #000 75%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, .35) 0%, #000 75%);
}
@media print { .maze { display: none; } }
