/* Backd public site. Quiet, precise, the same neutral palette as the widget.
   Fonts: Geist and Geist Mono (Google Fonts, loaded in each page's <head>). */
:root {
  color-scheme: light dark;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #FAFAFA; --card: #FFFFFF; --line: #E2E2E6; --line-strong: #C4C4CB; --text: #0A0A0B; --muted: #3F3F46; --faint: #6E6E77; --soft: #F0F0F2;
  --code-bg: #0C0C0E; --code-line: #232328; --code-text: #E4E4E7; --code-muted: #6E6E78; --code-str: #A5D6A7; --code-key: #C4B5FD; --code-fn: #93C5FD;
  --g1: hsl(0 100% 63%); --g2: hsl(270 100% 63%); --g3: hsl(210 100% 63%); --g4: hsl(195 100% 63%); --g5: hsl(90 100% 63%);
  --fill: #121213; --fill-60: rgba(18,18,19,.6); --fill-0: rgba(18,18,19,0); --on-fill: #fff;
  --ok: #15803D; --warn: #B45309;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -8px rgba(0,0,0,.08);
  --nav-h: 64px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #09090A; --card: #111113; --line: #1F1F23; --line-strong: #2E2E34; --text: #F5F5F6; --muted: #A1A1AA; --faint: #8A8A93; --soft: #141417;
  --code-bg: #0C0C0E; --code-line: #1F1F23;
  --fill: #fff; --fill-60: rgba(255,255,255,.6); --fill-0: rgba(0,0,0,0); --on-fill: #121213;
  --ok: #4ADE80; --warn: #FBBF24; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6); } }
:root[data-theme="dark"] {
  --bg: #09090A; --card: #111113; --line: #1F1F23; --line-strong: #2E2E34; --text: #F5F5F6; --muted: #A1A1AA; --faint: #8A8A93; --soft: #141417;
  --code-bg: #0C0C0E; --code-line: #1F1F23;
  --fill: #fff; --fill-60: rgba(255,255,255,.6); --fill-0: rgba(0,0,0,0); --on-fill: #121213;
  --ok: #4ADE80; --warn: #FBBF24; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--g3) 30%, transparent); }
:focus-visible { outline: 2px solid var(--g3); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.mono { font-family: var(--font-mono); }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 100%; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.logo b { width: 24px; height: 24px; border-radius: 7px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.logo img { height: 26px; width: auto; display: block; }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--text); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav .btn { height: 34px; padding: 0 14px; font-size: 13.5px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text);
  font: 500 15px/1 var(--font-sans); letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s, transform .15s; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.solid:hover { opacity: .88; }
.btn svg { width: 14px; height: 14px; }
.rainbow { --grad: linear-gradient(90deg, var(--g1), var(--g5), var(--g3), var(--g4), var(--g2));
  position: relative; isolation: isolate; border: 1.28px solid transparent; color: var(--on-fill);
  background: linear-gradient(var(--fill), var(--fill)) padding-box,
    linear-gradient(var(--fill) 50%, var(--fill-60) 80%, var(--fill-0)) border-box, var(--grad) border-box;
  background-size: 200%; animation: rb 2s infinite linear; }
.rainbow::before { content: ""; position: absolute; z-index: -1; bottom: -20%; left: 50%; width: 60%; height: 20%;
  transform: translateX(-50%); background: var(--grad); background-size: 200%; filter: blur(12.8px);
  animation: rb 2s infinite linear; pointer-events: none; }
.rainbow:hover { border-color: transparent; }
@keyframes rb { from { background-position: 0%; } to { background-position: 200%; } }
@media (prefers-reduced-motion: reduce) { .rainbow, .rainbow::before { animation: none; background-position: 50%; } }

/* page frame: thin rails down both sides, Vercel/Resend style */
.frame { max-width: 1120px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.frame .wrap { max-width: none; }
body { overflow-x: clip; }
/* sections are split by space alone, no hairlines between them (Tristan 2026-12-04).
   One rhythm: the gap between two sections' content is the same everywhere (144px phones, 160px desktop). */
.band { position: relative; }
.band > .wrap { padding-top: 96px; padding-bottom: 96px; }

/* simple hero (replaced by the hero component when it lands) */
.hero { text-align: center; padding: 112px 0 72px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--font-mono); color: var(--muted);
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; letter-spacing: .01em; }
.chip i { width: 6px; height: 6px; border-radius: 999px; background: #F59E0B; box-shadow: 0 0 0 3px color-mix(in srgb, #F59E0B 20%, transparent); }
h1 { font-size: clamp(42px, 7vw, 80px); line-height: 1; letter-spacing: -.045em; margin: 24px auto 22px; font-weight: 600; max-width: 13em;
  text-wrap: balance; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); margin: 0 auto 36px; max-width: 36em; text-wrap: balance; line-height: 1.55; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.fine { font-size: 13.5px; color: var(--faint); margin-top: 18px; }

/* section heads: no small grey labels above titles (Tristan 2026-12-04); the title says it on its own */
h2 { font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 18px; font-weight: 600; text-wrap: balance; max-width: 16em; }
.sub { color: var(--muted); margin: 0 0 56px; max-width: 34em; font-size: 17px; text-wrap: pretty; }
.head2 { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.head2 .sub { margin: 0; }

/* steps */
/* lifted a touch so the panel reads against the page in light and dark: strong hairline, soft shadow, faint top highlight
   (only visible in dark); contents centred under the centred title (Tristan 2026-12-05) */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: 16px; background: var(--card); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow); }
.steps3 > div { padding: 36px 28px 34px; text-align: center; }
.steps3 > div + div { border-left: 1px solid color-mix(in srgb, var(--line) 50%, var(--line-strong)); }
.icon3d { display: block; width: 88px; height: 88px; margin: 0 0 24px -6px; }
.steps3 .icon3d { margin: 0 auto 24px; }
.steps3 h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.steps3 p { margin: 0 auto; max-width: 30ch; text-wrap: pretty; color: var(--muted); font-size: 15px; line-height: 1.55; }
@media (min-width: 380px) and (max-width: 1023px), (min-width: 1200px) { .steps3 .nw { white-space: nowrap; } .steps3 p:has(.nw) { max-width: none; } } /* keeps "See your supporters…" on its own line; tiny phones and narrow desktops (3 tight columns) just wrap */


/* code */
pre { margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: 12px; padding: 20px 22px; overflow-x: auto;
  font: 13.5px/1.7 var(--font-mono); border: 1px solid var(--code-line); tab-size: 2; }
pre .c { color: var(--code-muted); } pre .s { color: var(--code-str); } pre .k { color: var(--code-key); } pre .f { color: var(--code-fn); }
code { font: .88em var(--font-mono); background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
pre code { background: none; border: 0; padding: 0; font: inherit; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin: 32px 0 0; color: var(--text); }
.tools > span { display: inline-flex; align-items: center; gap: 8px; height: 24px; }
.tools i { display: block; height: 100%; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.tools .ic { width: 22px; height: 22px; } .tools .wm { height: 20px; }
.tools b { font: 600 18px/1 var(--font-sans); letter-spacing: -.02em; }
/* get started: one prompt to copy */
.start { text-align: center; }
/* "Backd" in a title drawn as the logo (website/logo.svg as a mask, follows light/dark).
   The word stays in the text for screen readers, search and copy-paste; only its ink is hidden.
   Sized so the logo's k/d match the title's letters; the logo's baseline sits 3.5% above its box bottom. */
.inline-logo { display: inline-block; height: .86em; aspect-ratio: 435.06 / 134.19; vertical-align: -.03em; margin: 0 .02em;
  color: transparent; overflow: hidden; white-space: nowrap; background: var(--text);
  -webkit-mask: url(/logo.svg) center / contain no-repeat; mask: url(/logo.svg) center / contain no-repeat; }
.start h2, .start .sub { margin-left: auto; margin-right: auto; }
.prompt { display: flex; align-items: center; gap: 16px; width: fit-content; max-width: 100%; margin: 36px auto 0; padding: 14px 14px 14px 22px; text-align: left;
  border: 1px solid var(--line-strong); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.prompt p { margin: 0; flex: 1; min-width: 0; font: 14.5px/1.55 var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.prompt .btn { flex: none; }
.prompt .nw { white-space: nowrap; }
.start .tools { justify-content: center; margin-top: 40px; }
.start .alt { margin: 32px 0 0; font-size: 14.5px; color: var(--muted); }
.start .alt a { color: var(--text); white-space: nowrap; }


/* faq: strong hairlines, roomy rows, a round plus that turns into a minus. The answer eases open (script in index.html). */
.faq { display: grid; grid-template-columns: 1fr; gap: 48px; }
.faq-head { text-align: center; }
.faq-head h2 { margin-left: auto; margin-right: auto; }
.faq-list { width: 100%; max-width: 760px; margin: 0 auto; }
@media (min-width: 901px) {
  /* desktop: title block centered within the left half, questions on the right */
  .faq { grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: center; }
  .faq-list { max-width: none; }
}
.faq-more { margin: 20px 0 0; color: var(--muted); font-size: 16px; }
.faq-more a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.faq-more a:hover { text-decoration-color: currentColor; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0; font-size: 17px; font-weight: 500; letter-spacing: -.02em; line-height: 1.35; border-radius: 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline-offset: 4px; border-radius: 8px; }
.faq-ic { flex: none; position: relative; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-strong);
  transition: background-color .3s ease, border-color .3s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
.faq-ic::before, .faq-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px;
  border-radius: 2px; background: var(--text); transition: transform .45s cubic-bezier(.2,.7,.2,1), background-color .3s ease; }
.faq-ic::after { transform: rotate(90deg); }
.faq summary:hover .faq-ic { border-color: var(--text); }
.faq details[open]:not(.closing) .faq-ic { background: var(--text); border-color: var(--text); transform: rotate(180deg); }
.faq details[open]:not(.closing) .faq-ic::before, .faq details[open]:not(.closing) .faq-ic::after { background: var(--bg); }
.faq details[open]:not(.closing) .faq-ic::after { transform: rotate(0deg); }
.faq-a { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 58px 26px 0; color: var(--muted); max-width: 38em; }
@media (prefers-reduced-motion: reduce) { .faq-ic, .faq-ic::before, .faq-ic::after { transition: none; } }

/* closing call to action */
.cta-band { text-align: center; position: relative; border-bottom: 0; }
.cta-band > .wrap { position: relative; z-index: 1; }
.cta-band h2 { margin-left: auto; margin-right: auto; }
.cta-band .sub { margin-left: auto; margin-right: auto; margin-bottom: 36px; }
.cta-band .status-line { margin: 28px 0 0; font-size: 13.5px; color: var(--faint); }
.cta-band .status-line a { color: var(--muted); }

/* Dot field behind the closing call to action (Tristan 2026-12-04: no hard gap or line above the footer;
   then "centered with the CTA and bigger"). Our own CSS take on the 21st.dev "gradient dots" idea: a hex grid
   of small dots (mask) over our 5 glow colours that drift sideways slowly. Anchored on the two buttons so the
   colour radiates out from them; a wide soft ellipse that holds the title too and fades out on every side
   before the footer. Only transform is animated (no hue-rotate, no repaint); paused off screen; still under
   reduced motion. Home page only. Notes: 08-public-website/footer-dots. */
.cta-dots { position: relative; }
.cta-band { clip-path: inset(-600px -100vw -600px -100vw); } /* no line above any more (2026-12-04): the dots fade out on their own, up and down */
.bk-dots { --dots-a: .55; position: absolute; left: 50%; top: 50%; z-index: -1;
  width: min(1240px, 100vw); height: 780px; transform: translate(-50%, -54%);
  pointer-events: none; overflow: hidden; opacity: var(--dots-a);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 1.3px, transparent 1.9px), radial-gradient(circle at 50% 50%, #000 1.3px, transparent 1.9px);
          mask-image: radial-gradient(circle at 50% 50%, #000 1.3px, transparent 1.9px), radial-gradient(circle at 50% 50%, #000 1.3px, transparent 1.9px);
  -webkit-mask-size: 14px 24.25px; mask-size: 14px 24.25px;
  -webkit-mask-position: 0 0, 7px 12.12px; mask-position: 0 0, 7px 12.12px; }
.bk-dots > i { position: absolute; inset: 0; display: block;
  -webkit-mask-image: radial-gradient(closest-side, rgba(0,0,0,.55), #000 30%, rgba(0,0,0,.6) 55%, rgba(0,0,0,.18) 78%, transparent);
          mask-image: radial-gradient(closest-side, rgba(0,0,0,.55), #000 30%, rgba(0,0,0,.6) 55%, rgba(0,0,0,.18) 78%, transparent); }
.bk-dots > i > b { position: absolute; top: 0; bottom: 0; left: 0; width: 200%; display: block;
  background: linear-gradient(90deg, var(--g1), var(--g2), var(--g3), var(--g4), var(--g5), var(--g1),
    var(--g2), var(--g3), var(--g4), var(--g5), var(--g1));
  animation: bk-dots 40s linear infinite; will-change: transform; }
.bk-dots.off > i > b { animation-play-state: paused; }
@keyframes bk-dots { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .bk-dots > i > b { animation: none; transform: translateX(-20%); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bk-dots { --dots-a: .6; } }
:root[data-theme="dark"] .bk-dots { --dots-a: .6; }
@media (max-width: 720px) { .bk-dots { height: 600px; transform: translate(-50%, -56%); } }

/* footer: one shared footer on every page (tools/site-footer.mjs). Centred with even margins (Tristan 2026-12-04:
   "center margins for footer, clean and neat"), then a calm band of drifting wave lines at the very foot of the page. */
footer { position: relative; padding: 72px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
footer > .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 44px; }
footer .about { display: flex; flex-direction: column; align-items: center; }
footer .about p { margin: 14px auto 0; max-width: 24em; color: var(--faint); text-wrap: balance; }
.foot-links { display: grid; grid-template-columns: repeat(3, 176px); justify-content: center; gap: 32px; }
footer h4 { margin: 0 0 14px; font: 500 12.5px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
footer a { text-decoration: none; } footer a:hover { color: var(--text); }

/* Footer waves (Tristan 2026-12-04: bring back the wave lines in the footer, "taller, blend in as a background").
   Full-bleed backdrop behind the whole footer, decoration only. Our own canvas version of the 21st.dev
   "wave background" idea; the script sits inside the footer. Lines in the five glow colours (left to right) at --wave-a, 1.6px.
   Fades in from the top (no edge with the page above) and stays soft behind the logo and links so they read
   cleanly, strongest at the very foot. Hidden until the script runs. Notes: 08-public-website/footer-waves. */
footer { padding-bottom: 200px; }
.bk-waves { --wave-a: .45; color: var(--text); display: none;
  position: absolute; left: 50%; bottom: 0; z-index: 0; width: 100vw; height: calc(100% - 140px); transform: translateX(-50%);
  overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.45) 30%, rgba(0,0,0,.7) 60%, #000);
          mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.45) 30%, rgba(0,0,0,.7) 60%, #000); }
.bk-waves.on { display: block; }
.bk-waves canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bk-waves { --wave-a: .5; } }
:root[data-theme="dark"] .bk-waves { --wave-a: .5; }
@media (max-width: 640px) {
  footer { padding-top: 56px; padding-bottom: 150px; }
  footer > .wrap { gap: 36px; }
  .foot-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 380px; }
}

/* docs */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; padding-top: 56px; padding-bottom: 80px; }
.toc { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.toc::before { content: "On this page"; font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 10px; }
.toc a { text-decoration: none; color: var(--muted); padding: 5px 0 5px 12px; border-left: 1px solid var(--line); }
.toc a:hover { color: var(--text); border-left-color: var(--text); }
.doc { min-width: 0; max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5vw, 48px); margin: 0 0 20px; text-align: left; max-width: none; }
.doc h2 { font-size: 28px; margin: 80px 0 14px; letter-spacing: -.03em; }
.doc h3 { font-size: 18px; margin: 36px 0 10px; letter-spacing: -.02em; font-weight: 600; }
.doc p, .doc li { color: var(--muted); }
.doc p b, .doc li b { color: var(--text); font-weight: 600; }
.doc a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.doc pre { margin: 14px 0 24px; }
.doc ul, .doc ol { padding-left: 20px; } .doc li { margin: 6px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 14px 0 24px; display: block; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 12px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); white-space: nowrap; background: var(--soft); }
td { color: var(--muted); } td:first-child { color: var(--text); white-space: nowrap; }
.note { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 14.5px; color: var(--muted); }

/* reveal on scroll (only when JS is on and motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .head2 { grid-template-columns: 1fr; gap: 32px; }
  .faq { gap: 36px; }
  .steps3 { grid-template-columns: 1fr; }
  .steps3 > div + div { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--line) 50%, var(--line-strong)); }
  .docs { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 4px; padding-bottom: 0; margin-bottom: 40px; }
  .toc::before { width: 100%; }
  .toc a { border-left: 0; padding: 4px 10px 4px 0; }
}
@media (max-width: 1150px) { .frame { border-left: 0; border-right: 0; } }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .band > .wrap { padding-top: 72px; padding-bottom: 72px; }
  .nav nav .hide-sm, .tools .hide-sm { display: none; }
  .start .tools { gap: 16px 22px; } .tools .ic { width: 20px; height: 20px; } .tools .wm { height: 18px; } .tools b { font-size: 16.5px; }
  .nav .wrap { gap: 18px; }
  .nav .right .btn:not(.solid):not(.rainbow) { display: none; }
  .hero { padding: 72px 0 56px; }
  .prompt { flex-direction: column; align-items: stretch; width: auto; padding: 18px; }
}

/* wordmark: website/logo.svg used as a mask so it takes the text colour in light and dark */
.wordmark { display: block; height: 27.5px; aspect-ratio: 435.06 / 134.19; background: currentColor;
  -webkit-mask: url(/logo.svg) center / contain no-repeat; mask: url(/logo.svg) center / contain no-repeat; }
.head2 > *, .faq > *, .steps3 > * { min-width: 0; }


/* Desktop sizing (Tristan 2026-12-02: "make sure all the text and UI is big enough", no squinting).
   One step bigger on screens 1024px and up; phones keep the sizes above.
   Guidance: WCAG 2.2 contrast 4.5:1 and target size, 50-75 characters a line.
   Notes: 08-public-website/desktop-sizing (library). */
@media (min-width: 1024px) {
  :root { --nav-h: 72px; }
  .wrap, .frame { max-width: 1200px; }
  .nav nav { font-size: 15.5px; gap: 30px; }
  .nav .btn { height: 40px; padding: 0 18px; font-size: 15px; }
  .nav .wordmark { height: 31px; }
  .btn { height: 48px; padding: 0 24px; font-size: 16.5px; }
  .band > .wrap { padding-top: 80px; padding-bottom: 80px; }
  .fine, .cta-band .status-line { font-size: 15px; color: var(--muted); }
  .lede { font-size: 21px; }
  .sub { font-size: 19px; margin-bottom: 44px; }
  .steps3 h3 { font-size: 20px; }
  .steps3 p { font-size: 17px; }
  .start .alt { font-size: 16px; }
  .faq summary { font-size: 21px; padding: 30px 0; }
  .faq-a p { font-size: 18px; padding-bottom: 32px; }
  .faq-more { font-size: 17px; }
  footer { font-size: 15.5px; }
  footer h4 { font-size: 13.5px; }
  /* docs and "Is Backd safe?": bigger text, shorter lines (~70 characters) */
  .toc { font-size: 15.5px; }
  .doc { max-width: 720px; font-size: 18px; line-height: 1.65; }
  .doc h1 { font-size: 56px; }
  .doc h2 { font-size: 32px; max-width: none; }
  .doc h3 { font-size: 21px; }
  .doc pre { font-size: 15px; }
  .note { font-size: 16px; }
  table { font-size: 15.5px; }
  th { font-size: 13px; }
}

/* How it works as one swipeable card deck on phones (Tristan 2026-12-03).
   Our own code, same idea as 21st.dev "blur reveal deck" (no licence given there, so not copied).
   Without JS, or on wider screens, the three steps stay a plain stacked list. Notes: 08-public-website/how-deck. */
@media (max-width: 640px) {
  .steps3.deck { position: relative; display: grid; border: 0; background: none; overflow: visible; border-radius: 0;
    margin-bottom: 26px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
  .deck > .card { grid-area: 1 / 1; border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 16px; background: var(--card);
    box-shadow: var(--shadow); padding: 28px 24px 108px; transform-origin: 50% 100%;
    transition: transform .6s cubic-bezier(.22,.61,.36,1), opacity .6s cubic-bezier(.22,.61,.36,1); }
  .deck > .card > * { transition: opacity .25s ease; }
  .deck > .card:not(.on):not(.out) > * { opacity: 0; }
  #how { overflow-x: clip; }
  /* title and card read as one group: a bit more room above the title, a snug gap under it (Tristan 2026-12-04) */
  #how > .wrap { padding-top: 96px; }
  #how .head2 { margin-bottom: 44px; }
  #how h2 { margin-bottom: 0; }
  /* the Support widget's card glow behind the deck: static rainbow, 16px blur, 0.7 opacity (src/widget, card-glow="static") */
  .steps3.deck { isolation: isolate; }
  .steps3.deck::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: 16px;
    background: linear-gradient(to right, var(--g1), var(--g2), var(--g3), var(--g4), var(--g5)); filter: blur(16px); opacity: .7; }
  .deck > .card[data-o="0"] { z-index: 3; }
  .deck > .card[data-o="1"] { z-index: 2; transform: translateY(12px) scale(.95); opacity: .7; }
  .deck > .card[data-o="2"] { z-index: 1; transform: translateY(24px) scale(.9); opacity: .4; }
  .deck > .card.out { z-index: 4; transform-origin: 50% 0; transform: translateY(115%) rotate(6deg) scale(.96); opacity: 0;
    transition: transform .42s cubic-bezier(.4,0,.7,1), opacity .36s ease-out; pointer-events: none; }
  .deck > .card.snap { transition: none; }
  .deck .icon3d { width: 80px; height: 80px; margin: 0 auto 20px; }
  .deck h3 { font-size: 20px; }
  .deck p { font-size: 16px; }
  /* the controls live inside the front card, under a hairline */
  .deck-nav { position: absolute; z-index: 5; left: 1px; right: 1px; bottom: 1px; height: 80px; padding: 0 18px;
    display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
  .deck-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; cursor: pointer; padding: 0;
    border: 1px solid var(--line-strong); background: var(--card); color: var(--text); transition: background .15s, border-color .15s, transform .15s; }
  .deck-btn.next { background: var(--text); border-color: var(--text); color: var(--bg); }
  .deck-btn:active { transform: translateY(1px); }
  .deck-btn:focus-visible, .deck-dot:focus-visible { outline: 2px solid var(--g3); outline-offset: 3px; }
  .deck-btn svg { width: 22px; height: 22px; }
  .deck-dots { display: flex; gap: 4px; }
  .deck-dot { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .deck-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--line-strong); transition: width .4s cubic-bezier(.22,.61,.36,1), background .4s; }
  .deck-dot[aria-current="true"]::before { width: 22px; background: var(--text); }
  .deck .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* words come in from a blur, one after another */
  .deck .w { display: inline-block; }
  .deck .card.play .w { animation: deck-blur .38s cubic-bezier(.22,.61,.36,1) both; animation-delay: var(--d); }
  .deck .card.play .icon3d { animation: deck-blur .5s cubic-bezier(.22,.61,.36,1) both; }
}
@keyframes deck-blur { from { opacity: 0; filter: blur(8px); transform: translateY(8px); } to { opacity: 1; filter: none; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .deck > .card, .deck > .card.out, .deck-dot::before { transition: none !important; }
  .deck .card.play .w, .deck .card.play .icon3d { animation: none !important; }
}

/* articles (08-public-website/articles): one reading column, no contents list, quiet byline */
.docs.article { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.docs.article .doc { width: 100%; }
.byline { color: var(--faint) !important; font-size: 15px; margin: -4px 0 40px; }
.art-hero { margin: -8px 0 48px; border-radius: 16px; overflow: hidden; background: #0B0B0C; outline: 1px solid var(--line); outline-offset: -1px; aspect-ratio: 16 / 9; }
.art-hero img, .art-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art-thumb { display: block; margin: 48px 0 18px; border-radius: 14px; overflow: hidden; background: #0B0B0C; outline: 1px solid var(--line); outline-offset: -1px; aspect-ratio: 21 / 9; }
.art-thumb + h2 { margin-top: 0 !important; }
.doc h2 a { text-decoration: none; }
.doc h2 a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
@media (max-width: 1023px) { .docs.article { padding-top: 48px; } }

/* Articles card stack (Tristan 2026-12-05, from a 21st.dev "animated card stack", rebuilt without React):
   three cards stacked, the front one slides down and out, the next rises, the old one returns at the back.
   Sits between the closing call to action and the footer. Notes: 08-public-website/article-cards (library). */
.articles-band { text-align: center; }
.articles-band h2, .articles-band .sub { margin-left: auto; margin-right: auto; }
.articles-band .sub { margin-bottom: 40px; }
/* the rails run unbroken from the closing call to action through Articles, and a hairline closes the frame
   under "Next article" before the footer, like the hero's (Tristan 2026-12-05). Only where the rails show. */
@media (min-width: 1151px) { .frame > .articles-band { border-bottom: 1px solid var(--line); } }
.art-stack { position: relative; height: 360px; max-width: 644px; margin: 0 auto; overflow: hidden; }
.art-card { --y: 12px; --s: 1; position: absolute; left: 50%; bottom: 0; width: min(512px, calc(100% - 32px)); height: 290px;
  display: flex; flex-direction: column; gap: 12px; padding: 5px; text-align: left; background: var(--card);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -8px rgba(0,0,0,.08);
  transform: translateX(-50%) translateY(var(--y)) scale(var(--s)); transform-origin: 50% 0;
  transition: transform .75s cubic-bezier(.22,1,.36,1); will-change: transform; }
.art-card[data-pos="0"] { z-index: 3; }
.art-card[data-pos="1"] { --y: -16px; --s: .95; z-index: 2; }
.art-card[data-pos="2"] { --y: -44px; --s: .9; z-index: 1; }
.art-card[data-pos="out"] { --y: 380px; z-index: 4; }
.art-card[data-pos="in"] { --y: -16px; --s: .9; z-index: 0; transition: none; }
.art-pic { position: relative; flex: 0 0 196px; display: block; overflow: hidden; border-radius: 12px;
  background: #0B0B0C; outline: 1px solid var(--line); outline-offset: -1px; }
/* Photos (Tristan 2026-12-05): black and white, grain and scan lines baked in; same file on the card, the article page and /articles. */
.art-pic img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.art-pic::after { content: ""; position: absolute; inset: auto 0 0; height: 56px; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.55), transparent); }
.art-pic span { position: absolute; z-index: 1; left: 12px; bottom: 10px; font: 500 12px var(--font-mono); color: #E4E4E7; letter-spacing: .02em; }
.art-txt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 12px; }
.art-txt > div { min-width: 0; }
.art-txt h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-txt p { margin: 2px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.art-read { height: 40px; padding: 0 12px 0 16px; gap: 2px; font-size: 14.5px; flex: none; }
.art-read svg { width: 16px; height: 16px; }
.art-bar { position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 22px;
  max-width: 644px; margin: -1px auto 0; padding-top: 20px; border-top: 1px solid var(--line); }
.art-bar .btn { height: 40px; padding: 0 14px 0 18px; font-size: 14.5px; gap: 6px; }
.art-all { font-size: 14.5px; color: var(--muted); }
.art-all:hover { color: var(--text); }
.art-next { display: none !important; } .js .art-next { display: inline-flex !important; }
@media (max-width: 560px) {
  .art-stack { height: 340px; }
  .art-card { height: 278px; }
  .art-pic { flex-basis: 172px; }
  .art-txt p { font-size: 14px; }
}
@media (min-width: 1024px) {
  .art-txt h3 { font-size: 19px; } .art-txt p { font-size: 16px; }
  .art-bar .btn, .art-read { height: 44px; font-size: 15.5px; } .art-all { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .art-card { transition: none; } }

/* How it works title: centred over the card, more room above it (Tristan 2026-12-05) */
#how .head2 { justify-items: center; text-align: center; }
#how h2 { margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) {
  #how > .wrap { padding-top: 128px; }
  #how .head2 { margin-bottom: 56px; }
  #how h2 { margin-bottom: 0; max-width: none; }
}
@media (max-width: 640px) { #how > .wrap { padding-top: 120px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the changing rainbow word at the end of that title (Tristan 2026-12-05, after the DiaText component he sent).
   The slot is as wide as the longest word, so nothing on the line moves. Each word rises in with a short blur
   while the 5 glow colours sweep across it, then it settles in the text colour. */
.dia { display: inline-grid; vertical-align: bottom; text-align: left; white-space: nowrap; }
.dia > * { grid-area: 1 / 1; }
.dia.on { overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.dia__size { visibility: hidden; }
/* Order (Tristan 2026-12-05): each word rises in plain (text colour), then the rainbow wipes across it
   left to right and stays until the word leaves. Motion is on the outer layer, colour on the inner one.
   Blur only while the word is plain: Safari repaints background-clip text badly under a filter.
   Movement uses a spring curve (starts from rest, settles without bounce), like the original component. */
.dia.on .dia__w { display: inline-block; }
.dia__t { display: inline-block; }
.dia { --d1: hsl(0 85% 50%); --d2: hsl(270 85% 52%); --d3: hsl(210 90% 46%); --d4: hsl(195 90% 38%); --d5: hsl(100 70% 34%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dia { --d1: var(--g1); --d2: var(--g2); --d3: var(--g3); --d4: var(--g4); --d5: var(--g5); } }
:root[data-theme="dark"] .dia { --d1: var(--g1); --d2: var(--g2); --d3: var(--g3); --d4: var(--g4); --d5: var(--g5); }
/* light mode: the same five hues, deeper, so the word stays readable on the pale page (dark mode uses the glow colours as is) */
.dia__t.lit { background-image: linear-gradient(90deg, var(--d1), var(--d2), var(--d3), var(--d4), var(--d5) 47%, currentColor 53%);
  background-size: 250% 100%; background-position: 0 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: dia-wipe .9s cubic-bezier(.45,0,.2,1) both; }
.dia__w.out { animation: dia-up .35s var(--dia-spring) forwards, dia-fade-out .22s ease-out forwards; }
.dia__w.in { animation: dia-rise .7s var(--dia-spring) both, dia-fade-in .25s ease-out both; }
.dia { --dia-spring: cubic-bezier(.25,.8,.3,1); }
@supports (animation-timing-function: linear(0, 1)) { .dia { --dia-spring: linear(0, .067 4%, .208 8%, .367 12%, .516 17%, .643 21%, .744 25%, .822 29%, .879 33%, .920 38%, .949 42%, .968 46%, .981 50%, .989 54%, .994 58%, .997 62%, .999 67%, 1); } }
@keyframes dia-up { to { transform: translateY(-100%); } }
@keyframes dia-fade-out { to { opacity: 0; } }
@keyframes dia-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes dia-fade-in { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: blur(0); } }
@keyframes dia-wipe { from { background-position: 100% 0; } to { background-position: 0 0; } }
/* phones: the changing word sits on its own line, so centre it in its slot */
@media (max-width: 640px) { .dia > * { justify-self: center; } }
