/* ============================================================================
   Foluka waitlist: About, What's coming and the small pages (confirm, confirmed, unsubscribe, unsubscribed, 404), in the app's own
   look, as Home and Tools have it (the owner, 2026-10-24: "yes continue"). Loaded by those seven pages only, after waitlist.css, so
   the home page's first load does not carry them. Tokens only: no colour is written here.
   ============================================================================ */

/* ---- About: three beliefs and where we are, between hairlines, each with a small mark drawn in dots (the Tools page's list) ---- */

.about__rows {
  margin-top: var(--s-2);
  border-top: 1px solid var(--line);
}

.about__rows > section {
  position: relative;
  padding: var(--s-5) 0 var(--s-5) 44px;
  border-bottom: 1px solid var(--line);
}

.about__rows > section::before {
  content: '';
  position: absolute;
  top: calc(var(--s-5) + 1px);
  left: 0;
  width: 28px;
  height: 28px;
  background: var(--ink-2);
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}

/* A plain face: two eyes and a level mouth. */
.about__rows > :nth-child(1) {
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='9.5' cy='10' r='2.6'/%3E%3Ccircle cx='18.5' cy='10' r='2.6'/%3E%3Ccircle cx='8' cy='19' r='1.3'/%3E%3Ccircle cx='12' cy='19' r='1.3'/%3E%3Ccircle cx='16' cy='19' r='1.3'/%3E%3Ccircle cx='20' cy='19' r='1.3'/%3E%3C/svg%3E");
}

/* One dot held in a ring. */
.about__rows > :nth-child(2) {
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='3.3'/%3E%3Ccircle cx='23' cy='14' r='1.4'/%3E%3Ccircle cx='20.4' cy='20.4' r='1.4'/%3E%3Ccircle cx='14' cy='23' r='1.4'/%3E%3Ccircle cx='7.6' cy='20.4' r='1.4'/%3E%3Ccircle cx='5' cy='14' r='1.4'/%3E%3Ccircle cx='7.6' cy='7.6' r='1.4'/%3E%3Ccircle cx='14' cy='5' r='1.4'/%3E%3Ccircle cx='20.4' cy='7.6' r='1.4'/%3E%3C/svg%3E");
}

/* A slow wave. */
.about__rows > :nth-child(3) {
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='3' cy='14' r='1.8'/%3E%3Ccircle cx='7.5' cy='11.2' r='1.8'/%3E%3Ccircle cx='12' cy='12.2' r='1.8'/%3E%3Ccircle cx='16.5' cy='15.8' r='1.8'/%3E%3Ccircle cx='21' cy='16.8' r='1.8'/%3E%3Ccircle cx='25.5' cy='14' r='1.8'/%3E%3C/svg%3E");
}

/* A small globe of dots, lit on one side. */
.about__rows > :nth-child(4) {
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='4' r='1.3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.6'/%3E%3Ccircle cx='14' cy='8.5' r='1.9'/%3E%3Ccircle cx='19.5' cy='8.5' r='1.3'/%3E%3Ccircle cx='4' cy='14' r='1.6'/%3E%3Ccircle cx='9' cy='14' r='2.2'/%3E%3Ccircle cx='14' cy='14' r='2'/%3E%3Ccircle cx='19' cy='14' r='1.5'/%3E%3Ccircle cx='24' cy='14' r='1'/%3E%3Ccircle cx='8.5' cy='19.5' r='1.6'/%3E%3Ccircle cx='14' cy='19.5' r='1.6'/%3E%3Ccircle cx='19.5' cy='19.5' r='1.1'/%3E%3Ccircle cx='14' cy='24' r='1.1'/%3E%3C/svg%3E");
}

.page .about__rows h2 {
  margin-top: 0;
  font: 700 1.1875rem / 1.3 var(--font-display);
  letter-spacing: -0.01em;
}

.page .about__rows p {
  max-width: 46ch;
  margin-top: 6px;
}

/* The questions: the app's question card. The question as its title, with one of the home's dot faces beside it (tools/buddy.js),
   then each question a flat row that opens in place; an open row lies flat on the card, edged in a hairline. A native disclosure, so
   every answer opens without JavaScript. */
.page .faq {
  margin-top: var(--s-7);
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.faq__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 2px 4px 0;
}

.faq__buddy {
  flex: none;
  width: 64px;
  height: 64px;
  margin: -6px -4px -6px -6px;
}

.faq__buddy canvas {
  display: block;
}

.page .faq h2 {
  margin-top: 0;
  font: 700 1.1875rem / 1.3 var(--font-display);
  letter-spacing: -0.01em;
}

.page .faq__head p {
  margin-top: 2px;
  font-size: max(12px, 0.9375rem);
}

.qa {
  display: grid;
  gap: 6px;
  margin-top: var(--s-3);
}

.qa details {
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.qa details:not([open]):hover {
  background: color-mix(in srgb, var(--surface-2) 92%, var(--ink));
}

.qa details[open] {
  border-color: var(--line);
  background: var(--surface);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 48px;
  padding: 10px 14px;
  border-radius: calc(var(--r-md) - 1px);
  color: var(--ink);
  font: 600 1rem / 1.35 var(--font-body);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.qa summary:focus-visible {
  border-radius: var(--r-md);
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: '';
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat;
  transition: transform var(--dur) var(--ease), color var(--dur-fast) var(--ease);
}

.qa summary:hover::after,
.qa details[open] summary::after {
  color: var(--ink);
}

.qa details[open] summary::after {
  transform: rotate(45deg);
}

.qa__body {
  padding: 0 14px 14px;
}

.page .qa__body p {
  max-width: 60ch;
  margin-top: 0;
  line-height: 1.6;
}

/* A window under 200px wide (a phone at 200 or 300%): the face stands above the title, and a long word or the address breaks
   instead of pushing the card out of the window. */
@media (max-width: 199px) {
  .faq__head {
    flex-wrap: wrap;
  }

  .page .faq {
    padding: var(--s-2);
  }

  .page .faq h2,
  .page .faq p,
  .qa summary {
    overflow-wrap: anywhere;
  }

  .qa summary {
    gap: var(--s-2);
  }

  .qa summary,
  .qa__body {
    padding-inline: 10px;
  }
}

/* ---- What's coming: the order of things as a path of dots; where things stand now is the one lit step ---- */

.road {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-2);
  --mid: calc(var(--s-4) + 0.625rem);
}

.road li {
  position: relative;
  padding: var(--s-4) var(--s-5) var(--s-4) 56px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
}

/* A planned step's dot is an open ring on the page; the path runs between the dots, drawn in dots itself. */
.road li::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: calc(var(--mid) - 7px);
  left: 21px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid var(--control-line);
  border-radius: 50%;
  background: var(--bg);
}

.road li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: var(--mid);
  bottom: calc(-1 * (var(--s-3) + var(--mid)) - 2px);
  left: 27px;
  width: 2px;
  background: radial-gradient(circle, var(--control-line) 0.9px, transparent 1.3px) center top / 2px 7px repeat-y;
}

.road li:first-child {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.road li:first-child::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Where a step stands: a plain word, set like the words around it; the lit step's in the accent's text colour. */
.page .road__tag {
  color: var(--ink-3);
  font: 600 max(12px, 0.875rem) / 1.25rem var(--font-body);
}

.page li:first-child .road__tag {
  color: var(--accent-text);
}

.road h3 {
  margin-top: 2px;
  font: 700 1.1875rem / 1.3 var(--font-display);
  letter-spacing: -0.01em;
}

.page .road p:not(.road__tag) {
  margin-top: var(--s-1);
}

@media (max-width: 479px) {
  .road li {
    padding-right: var(--s-4);
  }
}

/* ---- the small pages: confirm, confirmed, unsubscribe, unsubscribed, 404 ---- */

.panel > * {
  max-width: 35rem;
}

.panel .title {
  max-width: none;
}

.panel .lede {
  margin-top: var(--s-4);
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.panel__actions .btn {
  margin-top: 0;
}

.panel .done {
  margin-top: var(--s-5);
}

/* The one thing a page asks for sits on the app's card: confirming (its line, its button and its small print) and the optional
   question after it, set as the app sets a question (the question as the card's title, a box to type in, then Send or No thanks). */
.panel__card,
.panel form {
  margin-top: var(--s-5);
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel .panel__card .lede {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.125rem;
}

.panel__card .fine {
  padding-inline: 0;
}

.panel form label {
  margin-bottom: var(--s-3);
  font: 700 1.1875rem / 1.3 var(--font-display);
  letter-spacing: -0.01em;
}

.panel form .panel__actions {
  margin-top: var(--s-4);
}

@media (max-width: 479px) {
  .panel__card,
  .panel form {
    padding: var(--s-4);
  }
}

/* ---- arrival: the app's settle-in (home-in, the home's own), one part just after another, within half a second ---- */

@media (prefers-reduced-motion: no-preference) {
  .page__head > *,
  .page > :not(.page__head, .road),
  .road li,
  .panel > * {
    animation: home-in var(--dur-slow) var(--ease-out) backwards;
  }

  .page__head > :nth-child(2),
  .panel > :nth-child(2) {
    animation-delay: 40ms;
  }

  .panel > :nth-child(3),
  .page > :nth-child(2),
  .road li:nth-child(1) {
    animation-delay: 80ms;
  }

  .panel > :nth-child(n + 4),
  .page > :nth-child(3),
  .road li:nth-child(2) {
    animation-delay: 120ms;
  }

  .page > :nth-child(n + 4),
  .road li:nth-child(3) {
    animation-delay: 160ms;
  }

  /* The lit step switches on as it lands. */
  .road li:first-child::before {
    animation: check-pop var(--dur-slow) var(--ease-out) 220ms both;
  }

  /* An answer settles in as its question opens. */
  .qa details[open] .qa__body {
    animation: rise var(--dur) var(--ease-out);
  }
}

/* ---- a big monitor (waitlist.css scales the root type from 1921px): a finger's rows in rem ---- */

@media (min-width: 1921px) {
  .qa summary {
    min-height: 3rem;
  }
}

/* ---- forced colours ---- */

@media (forced-colors: active) {
  .page .faq,
  .qa details,
  .panel__card,
  .panel form,
  .road li:first-child {
    border-color: CanvasText;
  }

  .about__rows > section::before {
    forced-color-adjust: none;
    background: CanvasText;
  }

  .road li::before {
    border-color: CanvasText;
    background: Canvas;
  }

  .road li:first-child::before {
    forced-color-adjust: none;
    background: CanvasText;
  }

  /* The plus and minus of the questions are drawn as background images, which this mode drops; draw them as text. */
  .qa summary::after {
    width: auto;
    height: auto;
    background: none;
    color: CanvasText;
    content: '+';
    font-size: 1.25rem;
    line-height: 1;
  }

  .qa details[open] summary::after {
    content: '−';
    transform: none;
  }
}
