/* Guide page. Same dark theme and 6px radius as the studio and the demo; one accent, taken from the
   seed-to-tree sculpture in the hero. Sections are a label column beside a reading column. */
:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: #111113;
  --raised: #18181b;
  --hover: #202024;
  --line: #242428;
  --edge: #6c6b72;
  --text: #eeede8;
  --muted: #a8a7a0;
  --accent: #7bd389;
  --r: 6px;
  --pad: clamp(16px, 4vw, 48px);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font: 15px/1.6 var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--edge); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 2px; }
code, pre { font-family: var(--mono); font-size: 0.87em; }
code { padding: 1px 5px; background: var(--raised); border-radius: 4px; overflow-wrap: anywhere; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--pad);
  background: rgb(11 11 12 / 0.92);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand svg { width: 20px; height: 20px; }
.bar nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.bar nav a {
  padding: 6px 10px; border-radius: var(--r);
  color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 14px;
}
.bar nav a:hover { color: var(--text); background: var(--raised); }
.bar nav a[aria-current="page"] { color: var(--text); }

main { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(32px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
}
.hero h1 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.06; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.hero-copy p { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-stage { position: relative; height: clamp(320px, 52vh, 520px); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.hero-stage particle-sculpture { height: 100%; }
.stage-hint { position: absolute; left: 14px; top: 10px; color: var(--muted); font-size: 12px; pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px;
  font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none;
  color: var(--text); background: var(--raised);
  border: 1px solid var(--edge); border-radius: var(--r);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), transform 0.1s var(--ease);
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--text); color: #0b0b0c; border-color: var(--text); }
.btn.primary:hover { background: #ffffff; }
.btn.copy { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.copy[data-state="done"] { border-color: var(--accent); color: var(--accent); }

/* On this page */
.toc {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  padding: 14px 0; border-block: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.toc a { text-decoration: none; }
.toc a:hover { color: var(--text); }

/* Sections */
.block {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(20px, 4vw, 64px);
  padding: clamp(36px, 6vw, 72px) 0;
  border-bottom: 1px solid var(--line);
}
.block h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
.body { min-width: 0; }
.body > * + * { margin-top: 18px; }
.body > p { max-width: 68ch; }
.note { color: var(--muted); font-size: 14px; }

.steps { list-style: none; counter-reset: step; display: grid; gap: 14px; max-width: 68ch; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; display: grid; place-items: center;
  font: 600 13px/1 var(--mono); color: var(--accent);
  border: 1px solid var(--edge); border-radius: 50%;
}

.copyable { position: relative; max-width: 68ch; }
.copyable pre {
  margin: 0; padding: 16px 84px 16px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow-x: auto; line-height: 1.7;
}
.copyable .copy { position: absolute; top: 10px; right: 10px; }

/* Prompts */
.prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.prompt {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.prompt h3 { font-size: 15px; font-weight: 600; }
.prompt p { flex: 1; color: var(--muted); font-size: 14px; line-height: 1.55; }
.prompt .copy { align-self: flex-start; }

/* Licence table */
.table-wrap { max-width: 68ch; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; }
thead th { color: var(--muted); font-weight: 500; background: var(--surface); }
tbody tr { border-top: 1px solid var(--line); }
tbody th { font-weight: 600; white-space: nowrap; }

/* Questions */
.faq { max-width: 72ch; }
.faq > * + * { margin-top: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; min-height: 48px;
  font-weight: 500; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: #ffffff; }
.faq details p { padding: 0 28px 16px 0; color: var(--muted); }

.foot { max-width: 1240px; margin: 0 auto; padding: 28px var(--pad) 48px; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .hero, .block { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { height: 56vh; min-height: 320px; }
  .brand span { display: none; }
  .steps li { padding-left: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq summary::after { transition: none; }
}
