/* Tokens follow DESIGN.md (Ciao Console). Dark is the default, light follows the OS. */
:root {
  --primary: #ff4d6d;
  --primary-strong: #ff2e54;
  --secondary: #6a47b8;
  --bg: #1a1a2e;
  --surface: #1f2240;
  --surface-2: #23264a;
  --surface-3: #2a2e54;
  --text: #e8e8f0;
  --muted: #b4b4c4;
  --subtle: #7a7a90;
  --border: #2e3258;
  --border-strong: #3a3f70;
  --success: #4caf50;
  --warning: #ff9800;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  /* A small lift for a single object resting on a surface, e.g. the demo note. */
  --shadow-note: 0 3px 10px rgba(0, 0, 0, 0.24);
  --radius: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Fira Code", "Cascadia Code", Menlo, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --primary: #d81b60;
    --primary-strong: #b00d46;
    --secondary: #512da8;
    --bg: #f4f4fa;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --surface-3: #e6e8f4;
    --text: #1a1a2e;
    --muted: #5f607d;
    --subtle: #7a7b95;
    --border: #d2d4e3;
    --border-strong: #b9bcd3;
    --shadow: 0 10px 30px rgba(26, 26, 46, 0.1);
    --shadow-note: 0 3px 10px rgba(26, 26, 46, 0.14);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-strong); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

code, kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover { color: var(--text); background: var(--surface-3); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }

/* Layout */
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 64px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
section { padding: 48px 0 8px; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 12px; }
h3 { font-size: 20px; margin: 24px 0 8px; }

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}
.lead { font-size: 20px; color: var(--muted); max-width: 720px; }

/* Hero */
.hero { padding: 40px 0 16px; text-align: center; }
.hero .lead { margin: 0 auto 24px; }
.hero-image { width: 100%; max-width: 880px; height: auto; border-radius: var(--radius); margin: 8px auto 24px; display: block; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
}
.btn:hover { color: var(--text); background: var(--surface-3); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); color: #fff; }

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 28px; line-height: 1; margin-bottom: 8px; display: block; }

/* Comparison */
.compare { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.compare .card ul { padding-left: 20px; margin: 8px 0 0; }
.compare .card li { margin-bottom: 6px; }
.compare .old { opacity: 0.85; }
.compare .new { border-color: var(--primary); }

/* Callout */
.callout {
  border: 1px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 24px 0;
}
.callout strong:first-child { color: var(--primary); }
.callout p { margin: 0.4em 0; }
.note {
  border-left: 3px solid var(--secondary);
  background: var(--surface);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
  color: var(--muted);
}

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 52px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps > li h3 { margin-top: 4px; }

/* Figures */
figure { margin: 24px 0; }
figure img, figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}
figcaption { color: var(--subtle); font-size: 14px; margin-top: 10px; text-align: center; }

/* Example chips */
.examples { display: flex; flex-wrap: nowrap; gap: 8px; margin: 12px 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.examples::-webkit-scrollbar { display: none; }
.examples li {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 15px;
  white-space: nowrap;
  flex: none;
}

/* Prompt examples */
.prompt {
  font-family: var(--mono);
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  margin: 8px 0;
}

/* Diagrams */
.diagram { width: 100%; height: auto; display: block; margin: 16px 0; }
.diagram text { font-family: var(--sans); fill: var(--text); }
.diagram .muted { fill: var(--muted); }
.diagram .box { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.diagram .box-accent { fill: color-mix(in srgb, var(--primary) 14%, var(--surface)); stroke: var(--primary); stroke-width: 1.5; }
.diagram .box-secondary { fill: color-mix(in srgb, var(--secondary) 18%, var(--surface)); stroke: var(--secondary); stroke-width: 1.5; }
.diagram .chat { fill: var(--surface-3); stroke: var(--border); stroke-width: 1; }
.diagram .line { stroke: var(--border-strong); stroke-width: 2; fill: none; }
.diagram .arrow { stroke: var(--primary); stroke-width: 2.5; fill: none; }
.diagram .arrow-head { fill: var(--primary); }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* Page footer nav */
.next-page {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 14px;
}
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 24px 16px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  section { padding-top: 36px; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav a { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Install one-liner */
.install {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: left;
}
.install-label { color: var(--muted); font-size: 14px; margin: 0 0 6px; text-align: center; }
.install-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin: 0 0 6px;
}
.install-head .install-label { margin: 0; }
.install-os select {
  min-height: 44px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text);
  font: 600 14px var(--sans);
  cursor: pointer;
}
.install-os select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.install-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
}
.install-box code {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
  font-size: 14px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.install-box code::-webkit-scrollbar { display: none; }
.install-box button {
  min-width: 72px;
  min-height: 44px;
  border: 0;
  border-left: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
  font: 600 14px var(--sans);
  cursor: pointer;
}
.install-box button:hover { background: var(--primary); color: #fff; }
.install-note { color: var(--subtle); font-size: 14px; margin: 8px 0 0; text-align: center; }

/* Big product screenshot under the hero */
.shot { margin: 32px auto 0; max-width: 1080px; }
.shot img, .shot video { border-radius: 14px; }

/* Feature rows: text beside a screenshot, stacking on narrow screens */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
  align-items: center;
  padding: 40px 0 8px;
  scroll-margin-top: 80px;
}
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature figure { margin: 0; }
.feature h2 { font-size: clamp(22px, 3vw, 28px); }
.feature .how { font-size: 15px; color: var(--muted); }
.feature .how strong { color: var(--text); }
.feature.phone { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.phone figure { max-width: 300px; justify-self: center; }
@media (max-width: 820px) {
  .feature, .feature.flip, .feature.phone { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .feature.flip .feature-text { order: 0; }
}

/* In-page table of contents */
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}
.toc a:hover { border-color: var(--primary); color: var(--text); }

/* Labelled pills for built-in assets */
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.pill-list li {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 10px;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 14%, var(--surface));
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}
@media (prefers-color-scheme: dark) { .tag { color: #b49cf0; } }

figure > a { display: block; border-radius: 12px; }

/* Whole-card links */
.card-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.card-link p { color: var(--muted); }
.card-link h3::after {
  content: "→";
  display: inline-block;
  margin-left: 8px;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.card-link:hover, .card-link:focus-visible {
  color: var(--text);
  transform: translateY(-3px);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 18%, transparent);
}
.card-link:hover h3::after, .card-link:focus-visible h3::after { opacity: 1; transform: none; }
.card-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--radius); }
@media (prefers-reduced-motion: reduce) {
  .card-link, .card-link h3::after { transition: none; }
  .card-link:hover { transform: none; }
}

/* Example prompts copy on click */
.prompt {
  position: relative;
  cursor: pointer;
  padding-right: 72px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.prompt::after {
  content: "Copy";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 12px var(--sans);
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.prompt:hover, .prompt:focus-visible {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
  transform: translateX(3px);
}
.prompt:hover::after, .prompt:focus-visible::after { opacity: 1; }
.prompt.copied::after { content: "Copied ✓"; opacity: 1; }
.prompt:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (hover: none) { .prompt::after { opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .prompt, .prompt::after { transition: none; } .prompt:hover { transform: none; } }

.repo-stats { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; font-size: 14px; color: var(--subtle); }
.repo-stats[hidden] { display: none; }
.repo-stats .stat { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.repo-stats strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Home: one-line "built on" note inside the big idea */
.built-on {
  border-left: 3px solid var(--secondary);
  padding: 4px 0 4px 14px;
  color: var(--muted);
}

/* Home: a three-beat, visitor-controlled memory story */
.memory-demo { padding-top: 64px; }
.memory-demo .narrow { text-align: center; }
.memory-demo .narrow p { color: var(--muted); margin: 0 auto 24px; }
.memory-board {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.memory-board-top, .memory-board-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}
.memory-board-top { border-bottom: 1px solid var(--border); }
.memory-board-label, .memory-board-count, .memory-scene-label, .memory-paper-title, .memory-scene-foot {
  font-family: var(--mono);
  font-size: 13px;
}
.memory-board-label { color: var(--muted); }
.memory-board-count { color: var(--primary); font-variant-numeric: tabular-nums; }
.memory-scenes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.memory-scene {
  min-width: 0;
  min-height: 252px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background-color 240ms ease;
}
.memory-scene + .memory-scene { border-left: 1px solid var(--border); }
.memory-scene-label { color: var(--muted); }
.memory-scene-foot { display: block; margin-top: auto; color: var(--muted); line-height: 1.5; }
.memory-board[data-step="0"] .memory-scene-chat,
.memory-board[data-step="1"] .memory-scene-note,
.memory-board[data-step="2"] .memory-scene-recall { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.memory-bubble {
  max-width: 260px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-3);
  line-height: 1.45;
}
.memory-paper {
  position: relative;
  min-height: 112px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: var(--shadow-note);
  line-height: 1.45;
}
.memory-paper-title { display: block; color: var(--primary); margin-bottom: 10px; overflow-wrap: anywhere; }
.memory-paper-line, .memory-answer { display: none; }
.memory-paper-empty, .memory-answer-empty { color: var(--muted); }
.memory-board[data-step="1"] .memory-paper-line,
.memory-board[data-step="2"] .memory-paper-line,
.memory-board[data-step="2"] .memory-answer { display: block; }
.memory-board[data-step="1"] .memory-paper-empty,
.memory-board[data-step="2"] .memory-paper-empty,
.memory-board[data-step="2"] .memory-answer-empty { display: none; }
.memory-answer { color: var(--text); padding: 10px 14px; border-left: 1px solid var(--primary); line-height: 1.45; }
.memory-board[data-step="1"] .memory-paper-line { animation: note-arrive 440ms cubic-bezier(.16, 1, .3, 1) both; }
.memory-board[data-step="2"] .memory-answer { animation: answer-arrive 360ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes note-arrive {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0); }
}
@keyframes answer-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.memory-board-bottom { border-top: 1px solid var(--border); }
.memory-board-status { color: var(--muted); margin: 0; font-size: 15px; }
.memory-action {
  flex: none;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--primary);
  color: var(--bg);
  font: 700 15px var(--sans);
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}
.memory-action:hover { background: var(--primary-strong); transform: translateY(-2px); }
.memory-action:active { transform: none; }
.memory-board[data-step="2"] .memory-action { background: transparent; color: var(--primary); }
.memory-board[data-step="2"] .memory-action:hover { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
@media (max-width: 760px) {
  .memory-scenes { grid-template-columns: 1fr; }
  .memory-scene { min-height: 0; padding: 16px 20px; gap: 10px; }
  .memory-scene + .memory-scene { border-left: 0; border-top: 1px solid var(--border); }
  .memory-board-top, .memory-board-bottom { padding: 14px 20px; }
  .memory-board-bottom { align-items: stretch; flex-direction: column; }
  .memory-action { width: 100%; }
  .memory-paper { min-height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .memory-scene, .memory-action { transition: none; }
  .memory-action:hover { transform: none; }
  .memory-board[data-step="1"] .memory-paper-line,
  .memory-board[data-step="2"] .memory-answer { animation: none; }
}

/* Home: workspace -> project -> chat cascade */
.cascade {
  margin: 24px 0 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr);
  column-gap: 0;
}
.cascade-col { display: flex; flex-direction: column; min-width: 0; }
.cascade-head { height: 64px; display: flex; flex-direction: column; }
.cascade-head strong { font-size: 19px; }
.cascade-head span { font-family: var(--mono); font-size: 14px; color: var(--subtle); }
.cascade-opts { display: flex; flex-direction: column; gap: 12px; height: 228px; }
.c-opt {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 16px;
  color: var(--muted);
  line-height: 1.3;
}
.c-opt small { display: block; font-size: 13px; color: var(--subtle); margin-top: 2px; }
.c-opt.on {
  border: 2px solid var(--primary);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}
.c-opt.on small { color: var(--muted); font-weight: 400; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--dot); flex: none; }
.c-note {
  margin-top: 18px;
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.c-note-accent { color: var(--primary); }
.c-note-ok { color: var(--success); }
.c-archive {
  display: inline-block;
  font: 600 12px var(--sans);
  padding: 1px 9px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  animation: c-pulse 2.4s ease-in-out infinite;
}
@keyframes c-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 0%, transparent); }
}
.cascade-link { padding-top: 64px; }
.cascade-link svg { display: block; }
.c-dim { stroke: var(--border-strong); stroke-width: 1.5; fill: none; }
.c-on { stroke: var(--primary); stroke-width: 2; fill: none; }
.c-head { fill: var(--primary); }
.c-head-dim { fill: var(--border-strong); }
@media (max-width: 820px) {
  .cascade { grid-template-columns: 1fr; padding: 16px; }
  .cascade-head { height: auto; margin-bottom: 10px; }
  .cascade-opts { height: auto; gap: 8px; }
  .c-opt { height: auto; min-height: 48px; padding: 8px 14px; }
  .c-note { margin-top: 10px; }
  .cascade-link { padding: 6px 0; text-align: center; }
  .cascade-link svg { display: none; }
  .cascade-link::before { content: "↓"; color: var(--primary); font-size: 24px; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) { .c-archive { animation: none; } }

/* Home: collapsible worked example */
.example {
  margin-top: 28px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
.example summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  font-weight: 600;
}
.example summary::-webkit-details-marker { display: none; }
.example summary::before {
  content: "▸";
  color: var(--primary);
  transition: transform 0.18s ease;
}
.example[open] summary::before { transform: rotate(90deg); }
.example summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--radius); }
.example-body { padding: 0 18px 18px; }
.example-body figure { margin-top: 4px; }
.prompt-inline { font-family: var(--mono); font-size: 0.9em; background: var(--surface-3); border-radius: 6px; padding: 0.1em 0.4em; }

/* Home: responsive three-column feature grid */
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .grid-3 { grid-template-columns: 1fr; } }
/* Built-in page: names link to their source file on GitHub */
td a code, .pill-list a { color: var(--primary); }
.pill-list a { text-decoration: none; }
.pill-list a:hover { text-decoration: underline; }
