/* Threadbear's landing page, copied from Quick Ask's site (~/dev/me/quick-ask/web/src/styles.css)
   and moved into Threadbear's look: a warm paper white like the workbench picture's, greys for
   structure, and the bear's honey brown (the iPhone app's AccentColor, #9A6B2F) only where it
   means something: the main button and the bear. Mike's rule for the app, kept here: colour only
   when it's important, never over the top.

   The look follows Elaya's landing-page-design skill (github.com/elayadesign/ai-design-skills at
   5e57840). Its rules, as plain CSS since the site has no Tailwind:
   - one typeface, Geist (self hosted in public/fonts), Geist Mono only for code, no italics,
     nothing heavier than 600;
   - every font size and line height is a step of Tailwind's default type scale;
   - every margin, padding and gap is one of the skill's spacing tokens (--s-*);
   - every radius is a Tailwind radius, and nested radii are outer minus gap;
   - flat backgrounds only, no gradients (the hero heading's grey gradient went on 5 Nov: it
     read as an inactive state);
   - every transition on one curve (--ease), 500 ms for movement, 300 ms for colour. */

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

:root {
  --page: #faf8f3; --card: #fff; --well: #f1eee7; --line: #e7e2d7;
  --ink: #1f1c18; --body: #46413a; --ink-soft: #6b645a; --ink-faint: #968e82;
  /* The bear's honey brown, and a darker one for hover and for text on the page. */
  --honey: #9a6b2f; --honey-d: #7f5725; --honey-tint: #f4ecdf;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --display: var(--sans);
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --lift: 0 1px 2px rgba(31, 28, 24, .05), 0 8px 28px rgba(60, 45, 20, .07);

  /* The skill's spacing tokens (B2). Nothing between them. */
  --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;
  /* Tailwind's radii (B3). */
  --r-sm: 2px; --r: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;
  /* The one motion curve (B7). */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}


* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s-900); }
body {
  font-family: var(--sans); color: var(--ink); background-color: var(--page);
  -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh;
  position: relative; display: flex; flex-direction: column;
}
/* Clears the floating nav. */
main { flex: 1; width: 100%; padding-top: var(--s-800); }
a { color: var(--ink); text-decoration-color: var(--ink-faint); text-underline-offset: 3px; transition: color 300ms var(--ease); }
a:hover { color: var(--honey-d); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; border-radius: var(--r-md); }
.icon { width: 1em; height: 1em; flex: none; display: block; }
code { font-family: var(--mono); font-size: .875em; }

/* ---------- background patches ---------- */
/* Big, faint patches behind everything (layout.html), half off the page's edges, still and
   barely there: light browns and a warm grey, each the cloth colour at a few percent, with the
   running stitch drawn in the page colour so it reads as a gap in the cloth. Mike, 28 Oct:
   "They're big patches", lighter, light brown, not all grey. */
.patch-shapes { position: absolute; width: 0; height: 0; overflow: hidden; }
.bg-patches { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-patch { position: absolute; display: block; }
.tone-b { color: #9a6b2f; opacity: .06; }
.tone-h { color: #b98a4e; opacity: .055; }
.tone-g { color: #6b645a; opacity: .04; }
.bp1 { top: 2%; left: calc(-4% - 210px); width: 420px; height: 420px; transform: rotate(-8deg); }
.bp2 { top: 9%; left: calc(96% - 180px); width: 360px; height: 360px; transform: rotate(10deg); }
.bp3 { top: 22%; left: calc(-6% - 230px); width: 460px; height: 460px; transform: rotate(6deg); }
.bp4 { top: 31%; left: calc(99% - 200px); width: 400px; height: 400px; transform: rotate(0deg); }
.bp5 { top: 43%; left: calc(-3% - 190px); width: 380px; height: 380px; transform: rotate(-10deg); }
.bp6 { top: 53%; left: calc(97% - 220px); width: 440px; height: 440px; transform: rotate(7deg); }
.bp7 { top: 64%; left: calc(-2% - 170px); width: 340px; height: 340px; transform: rotate(-6deg); }
.bp8 { top: 74%; left: calc(100% - 240px); width: 480px; height: 480px; transform: rotate(-12deg); }
.bp9 { top: 84%; left: calc(0% - 180px); width: 360px; height: 360px; transform: rotate(0deg); }
.bp10 { top: 93%; left: calc(94% - 200px); width: 400px; height: 400px; transform: rotate(12deg); }
/* Smaller on a phone so they don't fill the screen. */
@media (max-width: 860px) { .bg-patch { scale: .55; } }

/* ---------- skip link ---------- */
.skip {
  position: fixed; left: var(--s-200); top: var(--s-200); z-index: 60; padding: var(--s-75) var(--s-100);
  border-radius: var(--r-lg); background: var(--ink); color: #fff; font: 600 14px/20px var(--sans); text-decoration: none;
  transform: translateY(-200%); transition: transform 500ms var(--ease);
}
.skip:focus { transform: none; color: #fff; }

/* ---------- the floating nav (B7) ---------- */
.nav-wrap { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; justify-content: center; padding: var(--s-200) var(--s-200) 0; pointer-events: none; }
.nav {
  position: relative; z-index: 1; pointer-events: auto; display: flex; align-items: center; gap: var(--s-75);
  padding: var(--s-75); border-radius: var(--r-2xl); border: 1px solid rgba(31, 28, 24, .08);
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 8px 24px rgba(60, 45, 20, .08);
}
/* Inside the bar's 16 px radius with 8 px of padding, everything is 16 - 8 = 8 px (B3). */
.brand { display: flex; align-items: center; gap: var(--s-75); padding: 0 var(--s-75) 0 0; border-radius: var(--r-lg); color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: var(--r-lg); }
.brand b { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.nav-links { display: flex; gap: var(--s-25); }
.nav-links a {
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-soft); text-decoration: none;
  padding: var(--s-75) var(--s-100); border-radius: var(--r-lg);
  transition: background-color 300ms var(--ease), color 300ms var(--ease), transform 500ms var(--ease);
}
.nav-links a:hover { background: rgba(31, 28, 24, .05); color: var(--ink); }
.nav-links a:active { transform: scale(.98); }
.nav-links a[aria-current="page"] { background: var(--well); color: var(--ink); }

/* Buttons (B1, B2): 8 px by 12 px, 16 px semibold, or 14 px in the header. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); border: 0;
  background: var(--honey); color: #fff; font: 600 16px/24px var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color 300ms var(--ease), transform 500ms var(--ease);
}
.btn:hover { background: var(--honey-d); color: #fff; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn-sm { font-size: 14px; line-height: 20px; }

/* The menu button: two lines that turn into a cross (B7), drawn rather than swapped. */
.menu-toggle {
  display: none; width: 40px; height: 40px; border: 0; border-radius: var(--r-lg); background: transparent; cursor: pointer;
  position: relative; transition: background-color 300ms var(--ease);
}
.menu-toggle:hover { background: rgba(31, 28, 24, .05); }
.menu-toggle span {
  position: absolute; left: var(--s-100); right: var(--s-100); height: 2px; border-radius: var(--r-full); background: var(--ink);
  transition: transform 500ms var(--ease);
}
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { transform: translateY(4px); }
.menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: rotate(-45deg); }

/* The phone menu: a full height panel of the page colour over a strong blur. */
.menu {
  position: fixed; inset: 0; z-index: 0; display: none; padding: calc(var(--s-900) + var(--s-200)) var(--s-300) var(--s-400);
  background: rgba(250, 248, 243, .92); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  /* Its own scrolling, so every link is reachable on a short screen (a phone on its side). */
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 500ms var(--ease), visibility 0s var(--ease) 500ms;
}
.menu ul { list-style: none; display: flex; flex-direction: column; gap: var(--s-75); }
.menu li { opacity: 0; transform: translateY(var(--s-300)); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.menu a:not(.btn) {
  display: block; padding: var(--s-75) var(--s-100); border-radius: var(--r-lg);
  font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); text-decoration: none;
}
.menu a:not(.btn):hover { background: rgba(31, 28, 24, .05); }
.menu a[aria-current="page"] { color: var(--honey-d); }
.menu .btn { margin-top: var(--s-300); width: 100%; }
.menu-open .menu { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 500ms var(--ease); }
/* One after another, 60 ms apart, all in within 400 ms (seven links: 0 to 360 ms). */
.menu-open .menu li { opacity: 1; transform: none; }
.menu-open .menu li:nth-child(2) { transition-delay: 60ms; }
.menu-open .menu li:nth-child(3) { transition-delay: 120ms; }
.menu-open .menu li:nth-child(4) { transition-delay: 180ms; }
.menu-open .menu li:nth-child(5) { transition-delay: 240ms; }
.menu-open .menu li:nth-child(6) { transition-delay: 300ms; }
.menu-open .menu li:nth-child(n + 7) { transition-delay: 360ms; }
@media (max-width: 860px) {
  /* The page stays put behind the open menu. Only here, so it can never lock a desktop page. */
  .menu-open, .menu-open body { overflow: hidden; }
  .nav-links, .nav-cta { display: none; }
  .nav { width: 100%; justify-content: space-between; }
  .menu-toggle { display: block; }
  .menu { display: block; }
}

/* The GitHub corner triangle (layout.html), off while the repo's private. */
.corner { position: absolute; top: 0; z-index: 60; width: 72px; height: 72px; display: block; }
.corner svg { width: 100%; height: 100%; display: block; fill: var(--ink); }
.corner.github { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.corner.github .octo { fill: var(--page); }
.corner.github:hover .arm { animation: octo-wave 560ms var(--ease); transform-origin: 130px 106px; }
@keyframes octo-wave { 0%, 100% { transform: rotate(0) } 20%, 60% { transform: rotate(-25deg) } 40%, 80% { transform: rotate(10deg) } }

.footer {
  max-width: 1080px; width: 100%; margin: 0 auto; text-align: center;
  padding: var(--s-400) var(--s-300) max(var(--s-400), env(safe-area-inset-bottom)); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-soft);
}
.footer p { max-width: 540px; margin: 0 auto; }
.footer a { color: var(--ink-soft); }
.footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-75) var(--s-300); margin-top: var(--s-75); }
.footer nav a { text-decoration: none; }
.footer a:hover { color: var(--honey-d); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-weight: 600; font-size: 36px; line-height: 40px; letter-spacing: -.025em; }
.lede { font-size: 18px; line-height: 28px; color: var(--body); max-width: 600px; margin-top: var(--s-100); }
.muted { color: var(--ink-soft); font-size: 14px; line-height: 20px; font-weight: 500; }
p, li { text-wrap: pretty; }

.card { background: var(--card); border-radius: var(--r-3xl); box-shadow: var(--lift); }

/* ---------- the App Store badge, after Apple's black one ---------- */
.appstore {
  display: inline-flex; align-items: center; gap: var(--s-75); height: 56px; padding: 0 var(--s-200) 0 var(--s-100); border-radius: var(--r-xl);
  background: #000; color: #fff; border: 1px solid #a6a6a6; text-decoration: none; white-space: nowrap;
  font-family: var(--sans); box-shadow: 0 6px 16px rgba(31, 28, 24, .18);
  transition: background-color 300ms var(--ease), transform 500ms var(--ease);
}
.appstore-logo { width: 32px; height: 32px; margin-top: calc(var(--s-50) * -1); flex: none; fill: currentColor; }
.appstore span { display: flex; flex-direction: column; align-items: flex-start; }
.appstore small { font-size: 12px; line-height: 16px; font-weight: 500; }
.appstore b { font-size: 24px; line-height: 24px; font-weight: 600; letter-spacing: -.025em; }
a.appstore:hover { background: #1f1f1f; color: #fff; transform: translateY(-1px); }
a.appstore:active { transform: scale(.98); }
/* Not out yet, so it's visibly not a button (B9: no dead links, or visibly disabled). */
.appstore.soon { cursor: not-allowed; opacity: .72; }

/* ---------- the home page ("Watch It Work", 5 Nov) ---------- */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Each icon is a little patch sewn on: a running stitch 4 px in, so 12 - 4 = 8 px (B3). */
.badge-icon {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: var(--r-xl);
  background: #ebe5d8; color: var(--ink-soft); font-size: 24px;
}
.badge-icon::after {
  content: ""; position: absolute; inset: var(--s-50); border-radius: var(--r-lg);
  border: 1.5px dashed rgba(255, 255, 255, .95); pointer-events: none; box-shadow: 0 0 0 1px rgba(60, 45, 20, .06);
}

/* Buttons a size up (the copy buttons), a quiet white one beside them, and a text link one. */
.btn-lg { padding: var(--s-100) var(--s-300); border-radius: var(--r-xl); gap: var(--s-100); min-height: 56px; }
.btn-lg .icon { font-size: 20px; }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--well); color: var(--ink); }
.link-btn { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--ink-soft); text-decoration-color: var(--ink-faint); padding: var(--s-50); }
.link-btn:hover { color: var(--ink); }

/* The copy button: hidden without JavaScript (the prompt can be selected by hand instead). Once
   it's copied it goes dark, swaps its copy icon for a tick and says where to paste (site.js). */
.copy-prompt { display: none; }
.js .copy-prompt { display: inline-flex; }
.copy-prompt .icon:nth-of-type(2), .copy-prompt.copied .icon:nth-of-type(1) { display: none; }
.copy-prompt.copied .icon:nth-of-type(2) { display: block; }
.copy-prompt.copied, .copy-prompt.copied:hover { background: var(--ink); }

/* The prompt, on the code colours. */
.prompt-box {
  margin: 0; padding: var(--s-200) var(--s-300); border-radius: var(--r-xl); text-align: left; background: #1f1c18; color: #efe9de;
  font: 14px/20px var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all;
}
.prompt-box code { font-size: inherit; }

/* hero: one line, the copy button, then the player, all inside the first 900 px on a laptop */
.hero { max-width: 1240px; margin: 0 auto; padding: var(--s-300) var(--s-300) 0; text-align: center; }
.hero-title { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -.035em; }
.hero-sub { font-size: 18px; line-height: 28px; color: var(--body); max-width: 700px; margin: var(--s-100) auto 0; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s-100) var(--s-300); margin-top: var(--s-300); }
.risk { margin-top: var(--s-100); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-soft); }
.peek { max-width: 640px; margin: var(--s-200) auto 0; }
.peek .prompt-box { box-shadow: var(--lift); }

/* The player: the features down the left, the clip on the right (scripts/build.mjs's SLIDES,
   site.js plays it). */
.player { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: var(--s-400); align-items: center; max-width: 1120px; margin: var(--s-300) auto 0; text-align: left; }
.feats { list-style: none; display: flex; flex-direction: column; gap: var(--s-50); }
.feat button {
  position: relative; overflow: hidden; width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: var(--s-100); align-items: center;
  padding: var(--s-75) var(--s-100); border: 0; border-radius: var(--r-xl); background: transparent; cursor: pointer; text-align: left;
  font: 500 16px/24px var(--sans); color: var(--ink-soft);
  transition: background-color 300ms var(--ease), color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.feat button:hover { background: rgba(31, 28, 24, .04); color: var(--ink); }
.feat-icon { grid-row: span 2; align-self: start; width: 36px; height: 36px; border-radius: var(--r-lg); display: grid; place-items: center; background: #ebe5d8; color: var(--ink-soft); font-size: 20px; transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.feat-title { position: relative; z-index: 1; min-height: 36px; display: flex; align-items: center; }
.feat-text { grid-column: 2; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--body); max-height: 0; opacity: 0; overflow: hidden; transition: max-height 500ms var(--ease), opacity 300ms var(--ease); }
/* The bar: a hairline along the foot of the playing feature, filled to how far through its clip
   it is (--p, set every frame from the clip's own currentTime, so it's the clip's real length
   and it stops when the clip does). */
.feat-bar { position: absolute; left: var(--s-100); right: var(--s-100); bottom: var(--s-75); height: 3px; border-radius: var(--r-full); background: var(--line); opacity: 0; overflow: hidden; }
.feat-bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }
.feat.on button { background: var(--card); box-shadow: var(--lift); color: var(--ink); font-weight: 600; padding-bottom: var(--s-200); }
/* The honey here means "this one's playing". */
.feat.on .feat-icon { background: var(--honey-tint); color: var(--honey); }
.feat.on .feat-text { max-height: 80px; opacity: 1; }
.feat.on .feat-bar { opacity: 1; }

/* The clips are the window alone, square cornered with black where its round corners were, so
   the page rounds them again: 12 px in the 1600 px recording is 0.75% of the width (cqw). They
   share one grid cell and crossfade. */
.stage { position: relative; display: grid; container-type: inline-size; }
video.slide {
  grid-area: 1 / 1; display: block; width: 100%; height: auto; aspect-ratio: 1600 / 1058; border-radius: .75cqw; background: #1e1e1e;
  box-shadow: 0 30px 60px -20px rgba(40, 30, 15, .35), 0 2px 6px rgba(40, 30, 15, .08), 0 0 0 1px rgba(0, 0, 0, .35);
  opacity: 0; transition: opacity 600ms var(--ease);
}
video.slide.on { opacity: 1; }
.player-ctrls { position: absolute; right: var(--s-100); bottom: var(--s-100); z-index: 2; display: flex; gap: var(--s-75); }
.player-ctrl {
  width: 36px; height: 36px; border-radius: var(--r-full); border: 0; display: grid; place-items: center; cursor: pointer; font-size: 16px;
  background: rgba(20, 18, 16, .62); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: .55; transition: opacity 300ms var(--ease);
}
.stage:hover .player-ctrl, .player-ctrl:focus-visible { opacity: 1; }
.player-ctrl svg { fill: currentColor; }
.player-toggle .play, .player.paused .player-toggle .pause { display: none; }
.player.paused .player-toggle .play { display: block; }
.player-full, .player-caption { display: none; }
@media (prefers-reduced-motion: reduce) { video.slide, .feat-text { transition: none; } }

/* Sections after the hero. */
.block { max-width: 1180px; margin: 0 auto; padding: 0 var(--s-300); }
.section-title { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -.025em; text-align: center; margin: 120px auto var(--s-400); max-width: 680px; }
.section-lede { font-size: 18px; line-height: 28px; color: var(--body); text-align: center; max-width: 620px; margin: calc(var(--s-300) * -1) auto var(--s-500); }

/* Four tiles, one line each, the rest behind the (i). */
.tiles { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-200); }
.tiles li { position: relative; background: var(--card); border-radius: var(--r-2xl); box-shadow: var(--lift); padding: var(--s-300); }
.tiles .badge-icon { width: 44px; height: 44px; font-size: 22px; margin-bottom: var(--s-200); }
.tiles h3 { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; padding-right: var(--s-400); }
.tip-btn {
  position: absolute; top: var(--s-300); right: var(--s-300); width: 28px; height: 28px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--page);
  color: var(--ink-soft); font: 600 14px/1 Georgia, serif; cursor: pointer; transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.tip-btn:hover, .tip-btn[aria-expanded="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tip {
  position: absolute; left: var(--s-100); right: var(--s-100); top: calc(100% - var(--s-75)); z-index: 5; padding: var(--s-100) var(--s-200); border-radius: var(--r-xl);
  background: var(--ink); color: #efe9de; font-size: 14px; line-height: 20px; box-shadow: 0 18px 40px -12px rgba(40, 30, 15, .45);
}
.tip code { color: #fff; }

/* Where your stuff lives: three cards joined by a sewn thread. */
.flow { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-500); max-width: 980px; margin: 0 auto; }
.flow li { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-200); align-items: center; padding: var(--s-300) var(--s-200); background: var(--card); border-radius: var(--r-2xl); box-shadow: var(--lift); }
.flow li + li::before { content: ""; position: absolute; left: calc(var(--s-500) * -1); top: 50%; width: var(--s-500); border-top: 2px dashed #cdbd9f; }
.flow .badge-icon { grid-row: span 2; }
.flow b { font-size: 16px; line-height: 24px; font-weight: 600; }
.flow span:not(.badge-icon) { font-size: 14px; line-height: 20px; color: var(--ink-soft); }

/* The launch video beside the commit count. */
.proof { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-700); align-items: center; margin-top: 120px; }
.proof h2, .install-section h2 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -.025em; }
.proof p { font-size: 18px; line-height: 28px; color: var(--body); margin-top: var(--s-200); }
.proof p b { color: var(--ink); font-weight: 600; }
.proof .more { margin-top: var(--s-300); font-size: 16px; font-weight: 500; }
.video-card { position: relative; display: block; border-radius: var(--r-3xl); overflow: hidden; box-shadow: var(--lift), 0 0 0 1px var(--line); background: #efe9de; aspect-ratio: 16 / 9; }
.video-card img, .video-card iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 76px; height: 76px; border-radius: var(--r-full); display: grid; place-items: center;
  background: rgba(31, 28, 24, .82); color: #fff; font-size: 28px; box-shadow: 0 12px 30px rgba(31, 28, 24, .3); transition: scale 500ms var(--ease);
}
.video-play svg { fill: currentColor; margin-left: var(--s-50); }
a.video-card:hover .video-play { scale: 1.06; }
.video-len { position: absolute; right: var(--s-200); bottom: var(--s-200); padding: var(--s-50) var(--s-100); border-radius: var(--r-lg); background: rgba(31, 28, 24, .82); color: #fff; font-size: 14px; line-height: 20px; font-weight: 600; }
.video-card.playing .video-play, .video-card.playing .video-len { display: none; }

/* Install: the steps beside the prompt. */
.install-section { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-700); align-items: start; margin-top: 120px; }
.install-section .intro { font-size: 18px; line-height: 28px; color: var(--body); margin-top: var(--s-200); }
.needs { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-75); margin-top: var(--s-300); }
.needs li { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); padding: var(--s-75) var(--s-100); border-radius: var(--r-full); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.install-steps { list-style: none; counter-reset: step; margin-top: var(--s-400); display: flex; flex-direction: column; gap: var(--s-300); }
.install-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; column-gap: var(--s-200); }
.install-steps li::before { content: counter(step); grid-row: span 2; width: 32px; height: 32px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.install-steps b { font-size: 18px; line-height: 32px; font-weight: 600; }
.install-steps span { font-size: 16px; line-height: 24px; color: var(--body); }
/* 24 px card, 12 px in, so the prompt inside gets 24 - 12 = 12 px (B3). */
.prompt-card { background: var(--card); border-radius: var(--r-3xl); box-shadow: var(--lift); padding: var(--s-100); }
.prompt-card figcaption { display: flex; align-items: center; gap: var(--s-75); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-soft); padding: var(--s-50) var(--s-75) var(--s-100); }
.prompt-card figcaption .icon { font-size: 16px; }
.prompt-card .prompt-box { padding: var(--s-300); line-height: 24px; }
.prompt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-100); padding: var(--s-100) var(--s-50) var(--s-50); }
.send-mac[hidden] { display: none; }
.phone-row { display: flex; align-items: center; gap: var(--s-200); margin-top: var(--s-300); padding: 0 var(--s-50); }
.phone-row p { font-size: 16px; line-height: 24px; color: var(--body); }
.phone-row .appstore { flex: none; }

/* FAQ, as an accordion. */
.faq-list { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); padding: var(--s-200) var(--s-50); font-size: 18px; line-height: 28px; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
/* A chevron drawn from two borders, turning up when it's open. */
.faq-item summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); rotate: 45deg; translate: 0 -3px; transition: rotate 300ms var(--ease), translate 300ms var(--ease); }
.faq-item[open] summary::after { rotate: -135deg; translate: 0 3px; }
.faq-item summary:hover { color: var(--honey-d); }
.faq-item p { font-size: 16px; line-height: 24px; color: var(--body); padding: 0 var(--s-50) var(--s-300); max-width: 680px; }

/* closing: the waving bear, Mike's line and the copy button again */
.closing { text-align: center; display: flex; flex-direction: column; align-items: center; margin-top: 120px; padding-bottom: var(--s-800); }
.bear-wave { display: block; width: 120px; height: auto; margin-bottom: var(--s-300); }
.closing-title { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -.03em; max-width: 760px; }
.closing-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-200); margin-top: var(--s-400); }

/* Scroll reveals (B7): up 32 px and in, once, on the base curve. Only once site.js has run, so
   nothing is hidden without JavaScript. */
.js .reveal { opacity: 0; transform: translateY(var(--s-400)); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Movement becomes a plain fade. */
  .js .reveal { transform: none; }
  .menu li, .menu-toggle span, .btn, .appstore, .skip { transition-property: opacity, background-color, color; }
  .menu li { transform: none; }
}

@media (max-width: 1080px) {
  .player { grid-template-columns: 256px minmax(0, 1fr); gap: var(--s-300); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones and narrow windows: the list folds into chips over the clip (all seven still in view,
   the playing one filling as its clip runs), and its line moves under the clip. */
@media (max-width: 860px) {
  /* The corner sat on the nav pill; the menu links the code instead. */
  .corner.github { display: none; }
  .hero { padding: var(--s-300) var(--s-200) 0; }
  .hero-title { font-size: 36px; line-height: 40px; }
  .hero-sub { font-size: 16px; line-height: 24px; }
  .hero-cta { margin-top: var(--s-300); gap: var(--s-50) var(--s-200); }
  .risk { margin-top: var(--s-50); }
  .player { grid-template-columns: 1fr; gap: var(--s-200); margin-top: var(--s-400); }
  .feats { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: var(--s-75); }
  .feat button { display: block; padding: var(--s-75) var(--s-200); border-radius: var(--r-full); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 20px; }
  .feat-icon, .feat-text { display: none; }
  .feat-title { min-height: 0; display: inline; }
  /* The chip itself fills, behind its title. */
  .feat-bar { inset: 0; height: auto; border-radius: 0; background: transparent; }
  .feat-bar::after { background: var(--honey-tint); }
  .feat.on button { padding: var(--s-75) var(--s-200); box-shadow: inset 0 0 0 1px var(--ink-faint); }
  .player-caption { display: block; margin-top: var(--s-100); text-align: center; font-size: 16px; line-height: 24px; color: var(--body); min-height: 48px; }
  .player-ctrl { opacity: .85; }
  .player-full { display: grid; }
  .block { padding: 0 var(--s-200); }
  .section-title { font-size: 30px; line-height: 36px; margin-top: var(--s-800); }
  .section-lede { font-size: 16px; line-height: 24px; margin-bottom: var(--s-400); }
  .tiles { grid-template-columns: 1fr; gap: var(--s-100); }
  .tiles li { display: flex; align-items: center; gap: var(--s-200); padding: var(--s-200) var(--s-600) var(--s-200) var(--s-200); }
  .tiles .badge-icon { margin: 0; width: 40px; height: 40px; font-size: 20px; }
  .tiles h3 { font-size: 16px; padding: 0; }
  .tip-btn { top: 50%; translate: 0 -50%; right: var(--s-200); }
  .flow { grid-template-columns: 1fr; gap: var(--s-300); max-width: 420px; }
  .flow li + li::before { left: 47px; top: calc(var(--s-300) * -1); width: 0; height: var(--s-300); border-top: 0; border-left: 2px dashed #cdbd9f; }
  .proof, .install-section { grid-template-columns: 1fr; gap: var(--s-400); margin-top: var(--s-800); }
  .proof h2, .install-section h2 { font-size: 30px; line-height: 36px; }
  .proof p, .install-section .intro { font-size: 16px; line-height: 24px; }
  .prompt-card .prompt-box { padding: var(--s-200); font-size: 12px; line-height: 20px; }
  .prompt-actions .btn-lg { width: 100%; }
  .phone-row { flex-direction: column; align-items: flex-start; }
  .faq-item summary { font-size: 16px; line-height: 24px; padding: var(--s-200) var(--s-25); }
  .closing { margin-top: var(--s-800); }
  .closing-title { font-size: 30px; line-height: 36px; }
}


/* The privacy page: one readable column on a card. */
.legal { max-width: 720px; margin: var(--s-700) auto var(--s-900); padding: var(--s-600); background: var(--card); border-radius: var(--r-3xl); box-shadow: var(--lift); }
.legal h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin-top: var(--s-400); }
.legal p:not(.lede) { font-size: 16px; line-height: 24px; color: var(--body); margin-top: var(--s-75); }
@media (max-width: 860px) { .legal { margin: var(--s-500) var(--s-200) var(--s-700); padding: var(--s-400) var(--s-300); } }

/* The docs (/docs, made from docs/guide.md by scripts/docs.mjs): the list of pages down the left,
   sticky under the nav, and the page on a card like the privacy page's. On a phone the list goes
   above the page. */
.docs { max-width: 1080px; margin: var(--s-700) auto var(--s-900); padding: 0 var(--s-300); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-400); align-items: start; }
.docs .legal { margin: 0; max-width: 760px; }
.docs-nav { position: sticky; top: var(--s-900); font-size: 14px; line-height: 20px; }
.docs-nav ol { list-style: none; display: flex; flex-direction: column; gap: var(--s-25); margin-top: var(--s-75); }
.docs-nav a { display: block; padding: var(--s-50) var(--s-100); border-radius: var(--r-lg); color: var(--ink-soft); text-decoration: none; transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.docs-nav a:hover { background: rgba(31, 28, 24, .05); color: var(--ink); }
.docs-nav a[aria-current="page"] { background: var(--well); color: var(--ink); font-weight: 500; }
.docs-nav .docs-home { font-weight: 600; color: var(--ink); }
/* Each docs page's icon (docs-icons.json): in the list down the left, the index and the title. */
.docs-nav a { display: flex; align-items: center; gap: var(--s-100); }
.docs-nav .icon { font-size: 16px; color: var(--ink-faint); }
.docs-nav a[aria-current="page"] .icon, .docs-nav a:hover .icon { color: var(--honey); }
.doc .doc-index a { display: flex; align-items: center; gap: var(--s-100); }
.doc-index .icon { font-size: 20px; color: var(--honey); }
.doc-title { display: flex; align-items: center; gap: var(--s-200); }
.doc-title-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--honey-tint); color: var(--honey-d); font-size: 26px; }
/* A picture in a docs page (docs.mjs, "picture:" comments in the guide), with its caption. */
.docs-shot { margin: var(--s-300) 0; }
.docs-shot img, .docs-shot video { display: block; width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: 0 1px 2px rgba(31, 28, 24, .08), 0 12px 32px rgba(60, 45, 20, .14); }
.docs-shot.phone img { width: auto; max-height: 560px; margin: 0 auto; border-radius: 28px; }
.docs-shot.tall img { width: auto; max-height: 600px; margin: 0 auto; }
.docs-shot.bear img { width: auto; max-height: 240px; margin: 0 auto; border-radius: 0; box-shadow: none; }
.docs-shot figcaption { margin-top: var(--s-100); font-size: 14px; line-height: 20px; color: var(--ink-soft); text-align: center; }
/* A video in a docs page (docs.mjs, "video:" comments in the guide). */
.docs-video { margin: var(--s-300) 0; }
.docs-video video { display: block; width: 100%; height: auto; border-radius: var(--r-lg); background: #1a1511; }
.doc h3 { font-size: 18px; line-height: 28px; font-weight: 600; margin-top: var(--s-300); }
.doc > p, .doc-intro p { font-size: 16px; line-height: 24px; color: var(--body); margin-top: var(--s-100); }
.doc h1 + p { margin-top: var(--s-200); }
.doc ul, .doc ol:not(.doc-index) { margin-top: var(--s-100); padding-left: var(--s-300); color: var(--body); font-size: 16px; line-height: 24px; }
.doc li + li { margin-top: var(--s-75); }
.doc strong { font-weight: 600; color: var(--ink); }
.doc code { background: var(--well); border-radius: var(--r); padding: 0 var(--s-25); }
.doc pre { margin-top: var(--s-100); padding: var(--s-100) var(--s-200); background: var(--well); border-radius: var(--r-lg); overflow-x: auto; }
.doc pre code { background: none; padding: 0; font-size: 14px; line-height: 20px; }
.doc-index { list-style: none; margin-top: var(--s-400); display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.doc-index li + li { margin-top: 0; }
.doc-index a { display: block; padding: var(--s-100) 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 24px; font-weight: 500; text-decoration: none; }
.doc-next { margin-top: var(--s-500); padding-top: var(--s-200); border-top: 1px solid var(--line); font-size: 16px; line-height: 24px; font-weight: 500; }
.doc-next a { text-decoration: none; }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); margin: var(--s-500) auto var(--s-700); padding: 0 var(--s-200); gap: var(--s-300); }
  .docs-nav { position: static; }
  .docs-nav ol { flex-direction: row; flex-wrap: wrap; }
}

/* The 404 */
.lost { max-width: 560px; margin: var(--s-700) auto var(--s-900); padding: 0 var(--s-300); text-align: center; display: flex; flex-direction: column; align-items: center; }
.lost img { width: 120px; height: auto; margin-bottom: var(--s-300); }
.lost .lede { margin-left: auto; margin-right: auto; }
.lost .btn { margin-top: var(--s-400); }

/* What's new (/changelog, made from site/changelog/ by scripts/changelog.mjs): Mike's pick of
   10 Nov, after Wayne Sutton's bearfooding changelog. A running stitch down the left is the
   thread, with a sewn button at each release; the release's main changes are cards with a clip
   or a picture, and the rest plain lines under Added, Changed and Fixed. */
.changelog { max-width: 920px; margin: var(--s-700) auto var(--s-900); padding: 0 var(--s-300); }
.cl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-300); }
.cl-head img { width: 120px; height: auto; flex: none; }
.cl-thread { position: relative; margin-top: var(--s-600); padding-left: var(--s-700); }
.cl-thread::before { content: ""; position: absolute; left: 10px; top: var(--s-100); bottom: 0; border-left: 3px dashed var(--honey); opacity: .5; }
.cl-release { position: relative; padding-bottom: var(--s-800); }
.cl-button {
  position: absolute; left: calc(var(--s-700) * -1 - 1px); top: var(--s-50); width: 24px; height: 24px; border-radius: var(--r-full);
  background: var(--honey); box-shadow: inset 0 0 0 3px #b98a4c, 0 1px 2px rgba(31, 28, 24, .2);
}
/* The button's four holes. */
.cl-button::before {
  content: ""; position: absolute; top: 8px; left: 8px; width: 3px; height: 3px; border-radius: var(--r-full);
  background: #5c3f18; box-shadow: 5px 0 #5c3f18, 0 5px #5c3f18, 5px 5px #5c3f18;
}
.cl-release h2 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; }
.cl-release h2 a { color: var(--ink); text-decoration: none; }
.cl-release h2 a:hover { color: var(--honey-d); }
.cl-year { color: var(--ink-faint); font-weight: 500; }
.cl-when { margin-top: var(--s-25); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-faint); }
.cl-when a { color: var(--ink-soft); }
.cl-kind { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cl-kind.added { color: #3f7a4f; }
.cl-kind.changed { color: var(--honey-d); }
.cl-kind.fixed { color: #456a8f; }
.cl-feature { margin-top: var(--s-300); padding: var(--s-300); background: var(--card); border-radius: var(--r-2xl); box-shadow: var(--lift); }
.cl-feature h3 { margin-top: var(--s-50); font-size: 20px; line-height: 28px; font-weight: 600; }
.cl-feature p:not(.cl-kind) { margin-top: var(--s-50); font-size: 16px; line-height: 24px; color: var(--body); }
.cl-credit { color: var(--ink-faint); font-size: 14px; }
.cl-credit a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.cl-credit a:hover { color: var(--ink); }
.cl-media { margin-top: var(--s-200); }
/* A tall picture or clip would fill the whole card, so they stop at 520 points high, centred. */
.cl-shot { width: auto; max-width: 100%; max-height: 520px; margin: 0 auto; }
.cl-shot { display: block; height: auto; border-radius: var(--r-lg); background: #1a1511; box-shadow: 0 1px 2px rgba(31, 28, 24, .08), 0 12px 32px rgba(60, 45, 20, .14); }
.cl-lists { display: grid; gap: var(--s-300); margin-top: var(--s-400); }
.cl-lists ul { list-style: none; margin-top: var(--s-75); }
.cl-lists li { position: relative; padding: var(--s-50) 0 var(--s-50) var(--s-200); font-size: 16px; line-height: 24px; color: var(--body); }
.cl-lists li::before { content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; border-radius: var(--r-full); background: var(--line); }
.cl-lists code, .cl-feature code { font-family: var(--mono); font-size: .875em; background: var(--well); border-radius: var(--r); padding: 0 var(--s-25); }
@media (max-width: 860px) {
  .changelog { margin: var(--s-500) auto var(--s-700); padding: 0 var(--s-200); }
  .cl-head img { width: 72px; }
  .cl-thread { padding-left: var(--s-500); }
  .cl-button { left: calc(var(--s-500) * -1 - 1px); }
  .cl-feature { padding: var(--s-200); }
  .cl-year { display: none; }
}
