/* 3Columns landing page. Every value resolves through the tokens below. */

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour: the app's paper, ink and three tiles */
  --paper: #f3f2ee;
  --panel: #e5e4e0;
  --card: #fbfaf7;
  --ink: #0c0c0c;
  --muted: #5c5b58;
  --line: #cfcdc7;
  --yellow: #fff07a;
  --orange: #db7329;
  --cyan: #66ddd5;
  --green: #3e8b2e;
  --red: #b3261e;
  --tint-yellow: #fbf3b0;
  --tint-cyan: #c5efeb;
  --tint-green: #d5e8cf;
  /* The dark band (How it works), from the skill's dark palette */
  --night: #131209;
  --night-raised: #1f1f1f;
  --night-hover: #272727;
  --night-line: #313131;
  --night-muted: #a3a199;

  /* Spacing scale */
  --s-0: 0;
  --s-25: 2px;
  --s-50: 4px;
  --s-75: 8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  /* Radius (Tailwind steps) */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-3xl: 24px;
  --r-full: 9999px;

  /* Motion */
  --curve: cubic-bezier(0.22, 1, 0.36, 1);
  --t-move: 500ms;
  --t-tone: 300ms;
  --t-reveal: 700ms;

  --font: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--s-900); -webkit-text-size-adjust: 100%; }

body {
  margin: var(--s-0);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: var(--s-0); }
ul, ol { padding: var(--s-0); list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
em, i, cite, address { font-style: normal; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

/* ---------- Text styles ---------- */
.heading-1 { font-size: 3.75rem; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.heading-2 { font-size: 3rem; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.heading-3 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; letter-spacing: -0.02em; }
.heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: -0.02em; }
.heading-5 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.01em; }
.heading-6 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; letter-spacing: -0.01em; }
.title-1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; }
.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.title-4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.title-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 500; }
.body-1 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.body-2 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
.body-4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.body-5 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
/* Added per the skill's rule for new styles: the next number in the Body group, on the text-lg step */
.body-7 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 400; }
.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.button-sm { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.caption-1 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: 0.75rem; line-height: 1rem; font-weight: 600; }
.caption-4 { font-size: 0.75rem; line-height: 1rem; font-weight: 500; }
.caption-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 400; }

.muted { color: var(--muted); }
.label { text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--s-300); }
.section { padding-block: var(--s-900); }
.section-head { max-width: 680px; display: grid; gap: var(--s-200); margin-bottom: var(--s-700); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip {
  position: fixed; top: var(--s-200); left: var(--s-200); z-index: 100;
  padding: var(--s-75) var(--s-100); border-radius: var(--r-lg);
  background: var(--ink); color: var(--paper); text-decoration: none;
  transform: translateY(-96px); opacity: 0;
  transition: transform var(--t-move) var(--curve), opacity var(--t-tone) var(--curve);
}
.skip:focus { transform: translateY(0); opacity: 1; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  border: 1px solid var(--ink); border-radius: var(--r-lg);
  background: var(--ink); color: var(--paper);
  text-decoration: none; cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: background-color var(--t-tone) var(--curve), color var(--t-tone) var(--curve),
    opacity var(--t-tone) var(--curve), transform var(--t-move) var(--curve);
}
.btn:hover { background: #2b2b2a; transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { cursor: progress; }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--panel); }
.btn .icon { transition: transform var(--t-move) var(--curve); }
.btn:hover .icon { transform: translateX(2px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: var(--s-200); left: 50%; z-index: 50;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s-300);
  width: max-content; max-width: calc(100vw - var(--s-400));
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  border: 1px solid var(--line); border-radius: var(--r-2xl);
  background: rgba(243, 242, 238, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-75); text-decoration: none; }
.brand img { display: block; width: auto; height: 18px; }
.footer .brand img { height: 16px; }
.nav-links { display: flex; align-items: center; gap: var(--s-50); }
.nav-links a {
  padding: var(--s-50) var(--s-100); border-radius: var(--r-lg); white-space: nowrap;
  color: var(--muted); text-decoration: none;
  transition: color var(--t-tone) var(--curve), background-color var(--t-tone) var(--curve);
}
.nav-links a:hover { color: var(--ink); background: var(--panel); }
.nav-links a[aria-current="true"],
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--panel); }
.menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.nav .btn { border-radius: var(--r-lg); padding: var(--s-75) var(--s-100); }
.nav-signin {
  margin-right: calc(var(--s-300) * -1 + var(--s-50));
  padding: var(--s-50) var(--s-100); border-radius: var(--r-lg);
  color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-tone) var(--curve);
}
.nav-signin:hover { background: var(--panel); }

.nav-toggle {
  display: none; width: 40px; height: 40px; padding: var(--s-0);
  border: 0; border-radius: var(--r-lg); background: transparent; cursor: pointer;
  position: relative; color: var(--ink);
  transition: background-color var(--t-tone) var(--curve);
}
.nav-toggle:hover { background: var(--panel); }
.nav-toggle span {
  position: absolute; left: 11px; width: 18px; height: 2px; border-radius: var(--r-full);
  background: currentColor; transition: transform var(--t-move) var(--curve);
}
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; gap: var(--s-75);
  padding: var(--s-900) var(--s-300) var(--s-400);
  background: rgba(243, 242, 238, 0.94);
  -webkit-backdrop-filter: blur(32px); backdrop-filter: blur(32px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-tone) var(--curve), visibility 0s linear var(--t-tone);
}
.menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.menu a:not(.btn) { padding: var(--s-100) var(--s-0); text-decoration: none; }
.menu > * {
  opacity: 0; transform: translateY(var(--s-300));
  transition: opacity var(--t-move) var(--curve), transform var(--t-move) var(--curve);
}
.menu.is-open > * { opacity: 1; transform: translateY(0); }
.menu.is-open > *:nth-child(1) { transition-delay: 0ms; }
.menu.is-open > *:nth-child(2) { transition-delay: 60ms; }
.menu.is-open > *:nth-child(3) { transition-delay: 120ms; }
.menu.is-open > *:nth-child(4) { transition-delay: 180ms; }
.menu.is-open > *:nth-child(5) { transition-delay: 240ms; }
.menu.is-open > *:nth-child(6) { transition-delay: 300ms; }
.menu.is-open > *:nth-child(7) { transition-delay: 360ms; }
.menu .btn { margin-top: var(--s-300); padding: var(--s-100) var(--s-200); }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--s-900) + var(--s-800)); padding-bottom: var(--s-900); text-align: center; }
.hero-copy { display: grid; justify-items: center; gap: var(--s-300); }
.hero h1, .hero-sub { max-width: 680px; }
.hero h1 {
  background: linear-gradient(to right, #000000, #666666);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-bottom: var(--s-50);
}
.hero-sub { color: var(--muted); }

.download { display: grid; justify-items: center; gap: var(--s-100); }
.final-copy .download { justify-items: start; }

.proof { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-100) var(--s-400); color: var(--muted); margin-top: var(--s-200); }
.proof li { display: inline-flex; align-items: center; gap: var(--s-75); }

/* ---------- App window (drawn from the app's own views) ---------- */
.window {
  margin-top: var(--s-800); text-align: left;
  padding: var(--s-75); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--panel);
}
.window-bar { display: flex; align-items: center; gap: var(--s-200); padding: var(--s-75) var(--s-100) var(--s-200); }
.dots { display: flex; gap: var(--s-75); }
.dots i { width: 12px; height: 12px; border-radius: var(--r-full); background: var(--line); }
.window-title { flex: 1; text-align: center; color: var(--muted); }
.mcp { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--muted); }
.mcp i { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--green); }
.window-body { display: grid; grid-template-columns: 232px minmax(0, 1fr) 264px; gap: var(--s-75); }
.pane { border-radius: var(--r-lg); background: var(--paper); padding: var(--s-200); display: grid; gap: var(--s-300); align-content: start; }
.pane.editor { background: var(--card); padding: var(--s-500) var(--s-600); gap: var(--s-200); }
.pane-group { display: grid; gap: var(--s-75); }
.row { display: flex; align-items: center; gap: var(--s-75); padding: var(--s-50) var(--s-75); border-radius: var(--r-sm); }
.row.is-current { background: var(--panel); }
.row.indent { margin-left: var(--s-200); }
.tile { width: 12px; height: 12px; border-radius: var(--r-xs); flex: none; }
.tile.yellow { background: var(--yellow); }
.tile.orange { background: var(--orange); }
.tile.cyan { background: var(--cyan); }
.tile.green { background: var(--green); }
.row .icon { color: var(--muted); width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-50);
  padding: var(--s-25) var(--s-75); border: 1px solid var(--line); border-radius: var(--r-full); background: var(--card);
}
.chip .icon { width: 14px; height: 14px; color: var(--muted); }
.chip.solid { background: var(--panel); border-color: var(--panel); }

.prose { max-width: 560px; }
.name-c { background: var(--tint-yellow); border-radius: var(--r-xs); padding-inline: var(--s-25); }
.name-l { background: var(--tint-cyan); border-radius: var(--r-xs); padding-inline: var(--s-25); }

.suggestion {
  display: grid; gap: var(--s-100); max-width: 560px;
  padding: var(--s-200); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--paper);
}
.suggestion-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-100); }
.suggestion-head .label { white-space: nowrap; }
.del { text-decoration: line-through; color: var(--muted); }
.ins { background: var(--tint-green); border-radius: var(--r-xs); padding-inline: var(--s-25); }
.actions { display: flex; gap: var(--s-75); }
.pill {
  display: inline-flex; align-items: center; gap: var(--s-50);
  padding: var(--s-50) var(--s-100); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card);
}
.pill.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill .icon { width: 14px; height: 14px; }
.scene-break { text-align: center; color: var(--muted); letter-spacing: 0.3em; }
.note {
  max-width: 560px; padding: var(--s-100) var(--s-200);
  border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted);
}
.comment { display: grid; gap: var(--s-50); padding: var(--s-100); border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); }
.log { display: grid; gap: var(--s-100); }
.log li { display: flex; gap: var(--s-75); color: var(--muted); }
.log .icon { width: 16px; height: 16px; margin-top: var(--s-25); }

/* ---------- Breather: video band ---------- */
.breather { padding-block: var(--s-0) var(--s-900); }
.media { border-radius: var(--r-3xl); overflow: hidden; background: var(--panel); }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.breather .media { aspect-ratio: 21 / 9; }

/* ---------- Tagline reveal ---------- */
.tagline { padding-block: var(--s-900); }
.tagline p { max-width: 880px; margin-inline: auto; text-align: center; text-wrap: balance; }
.tagline .w { opacity: 0.3; transition: opacity var(--t-move) var(--curve); }
.tagline .w.on { opacity: 1; }

/* ---------- Problem ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-700); align-items: center; }
.split .media { aspect-ratio: 4 / 3; }
.pairs { display: grid; gap: var(--s-400); }
.pair { display: grid; gap: var(--s-75); }
.pair .before { display: flex; gap: var(--s-75); color: var(--muted); }
.pair .after { display: flex; gap: var(--s-75); }
.pair .icon { margin-top: var(--s-25); }
.pair .after .icon { color: var(--green); }

/* ---------- Benefits ---------- */
.benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-300); }
.benefit {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 2; gap: var(--s-400);
  padding: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--card);
  transition: transform var(--t-move) var(--curve);
}
.benefit:hover { transform: translateY(-4px); }
.benefit.wide { grid-column: 1 / -1; grid-row: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; align-items: center; gap: var(--s-700); }
.benefit-copy { display: grid; gap: var(--s-100); align-content: start; }
.benefit-copy p { color: var(--muted); }
.stage {
  min-height: 264px; display: grid; align-content: center; gap: var(--s-100);
  padding: var(--s-300); border-radius: var(--r-lg); background: var(--paper);
}
.sheet { display: grid; gap: var(--s-100); padding: var(--s-200); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.kv { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-50) var(--s-100); }
.kv dt { color: var(--muted); }
.relation { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-75); }
.stage .ferry { border-radius: var(--r-sm); aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 72%; width: 100%; }
.formats { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.format { padding: var(--s-75) var(--s-200); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.format.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- How it works: the one dark band ---------- */
/* An inset slab in the warm dark, with the app's paper pieces laid on it. A thread runs down the
   step numbers (see main.js) and each number takes its tile colour as the thread reaches it. */
.how {
  margin-inline: var(--s-200); border-radius: var(--r-3xl);
  padding-block: calc(var(--s-900) + var(--s-700));
  background: var(--night); color: var(--paper);
}
.how .label { color: var(--night-muted); }
.how :focus-visible { outline-color: var(--paper); }
.how .btn { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.how .btn:hover { background: var(--panel); }

.how-head { max-width: 680px; display: grid; gap: var(--s-200); margin-bottom: var(--s-900); }
.how-head .body-7 { color: var(--night-muted); }

.how-track { position: relative; }
.how-thread { position: absolute; top: var(--s-0); bottom: var(--s-0); left: calc(var(--how-rail) / 2); width: 1px; background: var(--night-line); }
.how-thread span {
  position: absolute; inset: var(--s-0); background: var(--paper);
  transform-origin: top; transform: scaleY(0);
  transition: transform var(--t-move) var(--curve);
}

.how-steps { display: grid; gap: var(--s-900); }
.how-track { --how-rail: 120px; }
.how-step {
  display: grid; grid-template-columns: var(--how-rail) minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-600); align-items: start;
}
.how-n {
  position: relative; justify-self: center; padding-block: var(--s-200);
  background: var(--night); color: var(--night-line);
  transition: color var(--t-tone) var(--curve);
}
.how-step:nth-child(1) { --tile: var(--yellow); }
.how-step:nth-child(2) { --tile: var(--cyan); }
.how-step:nth-child(3) { --tile: var(--green); }
.how-step.is-lit .how-n { color: var(--tile); }

.how-copy { display: grid; gap: var(--s-200); padding-top: var(--s-200); }
.how-copy > .body-3 { color: var(--night-muted); }
.how-facts { display: grid; gap: var(--s-100); margin-top: var(--s-100); }
.how-facts li { display: flex; gap: var(--s-75); }
.how-facts .icon { width: 16px; height: 16px; margin-top: var(--s-25); color: var(--tile); }

.how-stage {
  display: grid; gap: var(--s-200); align-content: start;
  padding: var(--s-400); border: 1px solid var(--night-line); border-radius: var(--r-3xl); background: var(--night-raised);
}
.js .how-stage.reveal { transition-delay: 120ms; }

/* Step 1: four ways in */
.connect { display: grid; gap: var(--s-200); }
.connect-tabs { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.connect-tab {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100); border: 1px solid var(--night-line); border-radius: var(--r-lg);
  background: transparent; color: var(--night-muted); font-family: inherit; cursor: pointer;
  transition: background-color var(--t-tone) var(--curve), color var(--t-tone) var(--curve), transform var(--t-move) var(--curve);
}
.connect-tab .icon { width: 16px; height: 16px; }
.connect-tab:hover { background: var(--night-hover); color: var(--paper); }
.connect-tab:active { transform: scale(0.98); }
.connect-tab[aria-selected="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.connect-panel { display: grid; gap: var(--s-100); }
.connect-panel[hidden] { display: none; }
.connect-panel > .muted { color: var(--night-muted); }
.connect-panel .sheet { justify-items: start; }
.term {
  margin: var(--s-0); padding: var(--s-200); overflow-x: auto; white-space: pre;
  border: 1px solid var(--night-line); border-radius: var(--r-xl); background: var(--night); color: var(--paper);
}
.term-prompt { color: var(--yellow); }
.connect-status { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--night-muted); }
.connect-status i { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--green); }

/* Step 2: a kind, then a bible */
.kinds { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.kind { padding: var(--s-50) var(--s-100); border: 1px solid var(--night-line); border-radius: var(--r-full); color: var(--night-muted); }
.kind.on { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.bible { color: var(--ink); gap: var(--s-75); }
.bible-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: var(--s-100); padding: var(--s-75); border-radius: var(--r-sm); }
.bible-row.is-new { background: var(--tint-green); }
.added { display: inline-flex; align-items: center; gap: var(--s-50); color: var(--green); }
.added .icon { width: 14px; height: 14px; }
.bible .log { margin-top: var(--s-100); padding: var(--s-100) var(--s-75) var(--s-0); }

/* Step 3: a question, an answer, a file */
.ask {
  justify-self: end; max-width: 400px; display: grid; gap: var(--s-50);
  padding: var(--s-100) var(--s-200); border-radius: var(--r-xl); background: var(--night-hover); color: var(--paper);
}
.how-stage .suggestion { color: var(--ink); }
.exported {
  justify-self: end; display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-75);
  padding: var(--s-100) var(--s-200); border-radius: var(--r-xl); background: var(--card); color: var(--ink);
}
.exported .icon { width: 16px; height: 16px; }
.exported .done { color: var(--green); }

.how-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-300); margin-top: var(--s-900); }

/* ---------- Facts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-300); }
.fact { display: grid; gap: var(--s-75); align-content: start; }
.fact p { color: var(--muted); }
.extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-200) var(--s-700); margin-top: var(--s-700); }
.extras li { display: flex; gap: var(--s-100); color: var(--muted); }
.extras .icon { color: var(--ink); margin-top: var(--s-25); }
.extras strong { color: var(--ink); font-weight: 500; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-300); max-width: 880px; margin-inline: auto; }
.plan {
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-400);
  padding: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--card);
}
.plan.featured { border-color: var(--ink); }
.plan-head { display: grid; gap: var(--s-75); }
.plan-head .heading-5 { margin-top: var(--s-50); }
.plan-price { display: flex; align-items: baseline; gap: var(--s-75); margin-block: var(--s-100); }
.plan-list { display: grid; gap: var(--s-200); align-content: start; }
.plan-list li { display: flex; gap: var(--s-100); color: var(--muted); }
.plan-list .icon { color: var(--green); margin-top: var(--s-25); width: 16px; height: 16px; }
.plan-list strong { color: var(--ink); font-weight: 500; }
.plan-cta { display: grid; justify-items: start; gap: var(--s-100); }

.credits {
  display: grid; gap: var(--s-200); max-width: 880px; margin: var(--s-300) auto 0;
  padding: var(--s-400); border-radius: var(--r-3xl); background: var(--panel);
}
.credit-table { width: 100%; border-collapse: collapse; }
.credit-table caption { text-align: left; padding-bottom: var(--s-100); }
.credit-table th, .credit-table td { padding: var(--s-100) var(--s-0) var(--s-100) var(--s-200); text-align: right; vertical-align: top; }
.credit-table th:first-child { padding-left: var(--s-0); text-align: left; }
.credit-table thead th { padding-top: var(--s-0); }
.credit-table tbody tr { border-top: 1px solid var(--line); }
.credit-table tbody th { font-weight: 400; }
.credit-table td { white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--s-100); max-width: 800px; margin-inline: auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--card); transition: background-color var(--t-tone) var(--curve); }
.faq details:hover { background: #ffffff; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-200); padding: var(--s-300); cursor: pointer; list-style: none; border-radius: var(--r-2xl); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--t-move) var(--curve); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .answer { padding: var(--s-0) var(--s-300) var(--s-300); color: var(--muted); max-width: 680px; }
.faq .answer a, .page-body a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Final CTA ---------- */
.final { padding-block: var(--s-900); }
.final-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-3xl); overflow: hidden; background: var(--card); }
.final-copy { display: grid; gap: var(--s-300); align-content: center; padding: var(--s-700); }
.final-card .media { border-radius: var(--s-0); min-height: 400px; }

/* ---------- Topic pages (features, connect, story bible, novels, children's books, pricing) ---------- */
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-75); color: var(--muted); }
.crumbs a { text-decoration: none; transition: color var(--t-tone) var(--curve); }
.crumbs a:hover { color: var(--ink); }
.topic-media { margin-top: var(--s-800); aspect-ratio: 21 / 9; }
.topic-media img { object-position: 50% 60%; }

.blocks { display: grid; }
.block {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-700);
  padding-block: var(--s-600); border-top: 1px solid var(--line);
}
.block:last-child { padding-bottom: var(--s-0); }
.block-head { display: grid; gap: var(--s-200); align-content: start; }
.block-head p { color: var(--muted); }
.block-head a, .prose-link { color: var(--ink); text-underline-offset: 3px; }
.how .prose-link { color: var(--paper); }
.after-cards { margin-top: var(--s-400); }
.ticks { display: grid; gap: var(--s-200); align-content: start; }
.ticks li { display: flex; gap: var(--s-100); color: var(--muted); }
.ticks strong { color: var(--ink); font-weight: 500; }
.ticks .icon { color: var(--green); width: 16px; height: 16px; margin-top: var(--s-25); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-300); counter-reset: step; }
.step {
  display: grid; gap: var(--s-100); align-content: start;
  padding: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--card);
}
.step-n { color: var(--muted); }
.step p { color: var(--muted); }
.step .term { margin-top: var(--s-100); background: var(--night); color: var(--paper); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-300); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  display: grid; gap: var(--s-100); align-content: start;
  padding: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--card);
  text-decoration: none; color: var(--ink);
  transition: transform var(--t-move) var(--curve), background-color var(--t-tone) var(--curve);
}
.card:hover { transform: translateY(-4px); background: #ffffff; }
.card:active { transform: scale(0.98); }
.card p { color: var(--muted); }
.card .more { display: inline-flex; align-items: center; gap: var(--s-75); margin-top: var(--s-100); }
.card .more .icon { width: 16px; height: 16px; transition: transform var(--t-move) var(--curve); }
.card:hover .more .icon { transform: translateX(2px); }

/* ---------- Footer ---------- */
.footer { padding-block: var(--s-700) var(--s-600); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s-500) var(--s-300); margin-bottom: var(--s-600); }
.footer-about { display: grid; gap: var(--s-200); align-content: start; color: var(--muted); max-width: 320px; }
.footer-col { display: grid; gap: var(--s-100); align-content: start; color: var(--muted); }
.footer-col .label { margin-bottom: var(--s-50); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-200); color: var(--muted); }
.footer-links { display: flex; gap: var(--s-300); }
.footer a { text-decoration: none; transition: color var(--t-tone) var(--curve); }
.footer a:hover { color: var(--ink); }

/* ---------- Plain pages (legal, 404) ---------- */
.page { padding-top: calc(var(--s-900) + var(--s-700)); padding-bottom: var(--s-900); }
.page-body { max-width: 680px; margin-inline: auto; display: grid; gap: var(--s-300); }
.page-body h2 { margin-top: var(--s-300); }
.page-body p, .page-body li { color: var(--muted); }
.page-body ul { display: grid; gap: var(--s-75); list-style: disc; padding-left: var(--s-300); }
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: var(--s-300); }
.lost-body { display: grid; gap: var(--s-300); justify-items: center; max-width: 480px; }
.lost-body img { width: 96px; height: 96px; }

/* ---------- Scroll reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(var(--s-400)); transition: opacity var(--t-reveal) var(--curve), transform var(--t-reveal) var(--curve); }
.js .reveal.is-in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .window-body { grid-template-columns: 208px minmax(0, 1fr); }
  .pane.inspector { display: none; }
  .pane.editor { padding: var(--s-400); }
  .split { gap: var(--s-500); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-500) var(--s-300); }
  .how-track { --how-rail: 80px; }
  .how-step { grid-template-columns: var(--how-rail) minmax(0, 1fr); gap: var(--s-400) var(--s-300); }
  .how-stage { grid-column: 2; }
  .benefit.wide { gap: var(--s-400); }
  .final-copy { padding: var(--s-500); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .block { gap: var(--s-500); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}

/* The bar holds five section links, Sign in and the button only from 900px up */
@media (max-width: 899px) {
  .nav { left: var(--s-200); right: var(--s-200); width: auto; max-width: none; transform: none; justify-content: space-between; padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200); }
  .nav-links, .nav:has(.nav-toggle) > .btn, .nav:has(.nav-toggle) > .nav-signin { display: none; }
  .nav-signin { margin-left: auto; }
  .nav-toggle { display: block; }
}

@media (max-width: 767px) {
  .container { padding-inline: var(--s-200); }
  .section, .tagline, .final { padding-block: var(--s-700); }
  .section-head { margin-bottom: var(--s-500); }
  .heading-1 { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.02em; }
  .heading-2 { font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.02em; }
  .heading-3 { font-size: 1.5rem; line-height: 2rem; letter-spacing: -0.01em; }
  .body-7 { font-size: 1rem; line-height: 1.5rem; }
  .br-wide { display: none; }


  .hero { padding-top: calc(var(--s-900) + var(--s-400)); padding-bottom: var(--s-700); }
  .proof { flex-direction: column; align-items: center; }
  .window { margin-top: var(--s-600); }
  .window-body { grid-template-columns: minmax(0, 1fr); }
  .pane.sidebar { display: none; }
  .pane.editor { padding: var(--s-300) var(--s-200); }
  .mcp span { display: none; }

  .breather { padding-bottom: var(--s-700); }
  .breather .media { aspect-ratio: 4 / 3; border-radius: var(--r-2xl); }
  .split, .benefits, .extras { grid-template-columns: minmax(0, 1fr); }
  .benefit { padding: var(--s-300); border-radius: var(--r-2xl); }
  .how { margin-inline: var(--s-75); border-radius: var(--r-2xl); padding-block: var(--s-900); }
  .how-head { margin-bottom: var(--s-700); }
  .how-steps { gap: var(--s-700); }
  .how-track { --how-rail: 48px; }
  .how-step { gap: var(--s-200); }
  .how-copy { padding-top: var(--s-100); }
  .how-n { padding-block: var(--s-75); }
  .how-stage { grid-column: 1 / -1; padding: var(--s-200); border-radius: var(--r-2xl); }
  .how-end { margin-top: var(--s-700); }
  .how-end .btn { padding: var(--s-100) var(--s-200); }
  .how-copy .heading-4 { font-size: 1.5rem; line-height: 2rem; letter-spacing: -0.01em; } /* Heading 5 on phones, like the other headings step down */
  .exported .muted { display: none; }
  .benefit.wide { grid-template-columns: minmax(0, 1fr); gap: var(--s-300); }
  .benefit { gap: var(--s-300); }
  .stage { min-height: 0; padding: var(--s-200); }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .final-card { grid-template-columns: minmax(0, 1fr); border-radius: var(--r-2xl); }
  .final-card .media { min-height: 0; aspect-ratio: 16 / 9; order: -1; }
  .final-copy { padding: var(--s-300); }
  .faq summary { padding: var(--s-200); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan { padding: var(--s-300); border-radius: var(--r-2xl); gap: var(--s-300); }
  .plan-cta .btn { justify-self: stretch; padding: var(--s-100) var(--s-200); }
  .download .btn { padding: var(--s-100) var(--s-200); }
  .credits { padding: var(--s-300); border-radius: var(--r-2xl); }
  .credit-table th, .credit-table td { padding-left: var(--s-100); }
  .faq .answer { padding: var(--s-0) var(--s-200) var(--s-200); }
  .block { grid-template-columns: minmax(0, 1fr); gap: var(--s-300); padding-block: var(--s-500); }
  .cards, .cards.two { grid-template-columns: minmax(0, 1fr); }
  .card, .step { padding: var(--s-300); border-radius: var(--r-2xl); }
  .topic-media { margin-top: var(--s-600); aspect-ratio: 4 / 3; border-radius: var(--r-2xl); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; }
  .menu > * { transform: none; }
  .tagline .w { opacity: 1; transition: none; }
  .how-thread span { transform: scaleY(1); transition: none; }
  .connect-tab:active { transform: none; }
  .btn:hover, .benefit:hover, .btn:hover .icon, .card:hover, .card:hover .more .icon, .card:active { transform: none; }
}
