.wordmark img, .brand img {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  vertical-align: -.15em;
}
.wordmark:not(.landing .wordmark, .mission-page .wordmark) img { margin-right: .45em; }

:root {
  color-scheme: light;
  --bg: #fbf9f6;
  --ink: #1c1917;
  --ink-muted: #6b6560;
  /* Brand red: AA on --bg (6.7:1) and under white button text (7.0:1). */
  --red: #b0161c;
  --red-6: #8e1116;
  --chat-surface: #fffefd;
  --chat-chrome: #f2efeb;
  --chat-code: #f5f3f0;
  --chat-refusal: #faf3f1;
  --chat-shadow: 0 2px 6px #1c191708, 0 16px 40px -12px #1c19171f, 0 40px 80px -32px #1c19172b;
  /* ASCII aurora ramp, faint to dense; index matches the character ramp in aurora.js. */
  --aurora-1: #f2dddb;
  --aurora-2: #e8c0c0;
  --aurora-3: #dfa4a4;
  --aurora-4: #d68889;
  --aurora-5: #cc6b6e;
  --aurora-6: #c34f52;
  --aurora-7: #b93237;
  --aurora-8: #b0161c;
  --aurora-9: #921217;
  --aurora-10: #780f13;
  --aurora-11: #5f0c0f;
  --rule: color-mix(in srgb, var(--ink-muted) 35%, transparent);
  --announcement-height: 2.25rem;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  --topbar-height: 4rem;
}

/* The public pages are dark-only, in neutral blacks so translucent cards stay black over the aurora. */
:root.dark {
  color-scheme: dark;
  --bg: #0a0a0a;
  --ink: #f5f5f5;
  --ink-muted: #a3a3a3;
  --red: #ef4b4b;
  --red-6: #ff6b66;
  --chat-surface: #0d0d0d;
  --chat-chrome: #141414;
  --chat-code: #1a1a1a;
  --chat-refusal: #26111266;
  --chat-shadow: 0 0 0 1px #ffffff12, 0 24px 60px -20px #000000e6, 0 0 120px -30px #ef4b4b33;
  --rule: #ffffff1f;
  /* Dense glyphs brighten toward a warm white core, so the folds read as light. */
  --aurora-1: #241011;
  --aurora-2: #341214;
  --aurora-3: #4a1518;
  --aurora-4: #63181c;
  --aurora-5: #801b21;
  --aurora-6: #9e1f26;
  --aurora-7: #bc242b;
  --aurora-8: #d82e34;
  --aurora-9: #ee4643;
  --aurora-10: #ff7360;
  --aurora-11: #ffb39a;
}

/* Geist and Geist Mono, latin subset, variable weight; SIL OFL (web/fonts/OFL.txt). */
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap; src: url(/static/fonts/geist.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap; src: url(/static/fonts/geist-mono.woff2) format("woff2"); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
main { max-width: 38rem; padding: 3.5rem 2rem 5rem; margin: 0 auto; }
a, .wordmark { color: var(--red); }
a { text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
.wordmark { display: inline-block; margin: 0 0 2.5rem; font-weight: 650; letter-spacing: -.01em; text-decoration: none; }
h1 { font-size: 1.65rem; line-height: 1.3; font-weight: 550; letter-spacing: -.015em; margin: 0 0 1.5rem; }
p { margin: 0 0 1.25rem; }
section { margin-top: 3rem; }
nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: -1rem 0 2.5rem; }
nav span { color: var(--ink-muted); }
label { display: block; margin: 1.25rem 0 .4rem; }
input, button { font: inherit; }
input { width: 100%; color: inherit; background: transparent; border: 1px solid var(--ink-muted); border-radius: 2px; padding: .6rem .7rem; }
button { color: var(--bg); background: var(--red); border: 1px solid var(--red); border-radius: 2px; padding: .55rem 1rem; cursor: pointer; }
button:hover { background: var(--red-6); border-color: var(--red-6); }
button:disabled { opacity: .6; cursor: default; }
form > button { margin-top: 1.5rem; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
[hidden] { display: none !important; }
.status { margin-top: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.error { color: var(--red); }
ul { padding-left: 1.25rem; }
li { margin-bottom: .75rem; }

main.landing { position: relative; isolation: isolate; max-width: none; margin: 0; padding: 0; }
.landing-hero { min-height: calc(100svh - var(--topbar-height)); display: flex; flex-direction: column; }
.hero-body { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); align-items: center; gap: clamp(2rem, 4vw, 4rem); padding: clamp(1rem, 4vh, 3rem) clamp(1rem, 4vw, 4rem) clamp(1rem, 3vh, 2rem) clamp(1rem, 7vw, 7rem); }
.hero-copy { max-width: 36rem; margin: 0; }
.landing h1 { text-wrap: balance; font-size: clamp(2.1rem, 1rem + 2.3vw, 3.25rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; margin: 0 0 1.25rem; }
.hero-sub { max-width: 33rem; margin: 0; color: var(--ink-muted); font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
.hero-sub strong { color: var(--ink); font-weight: 500; }
.hero-copy .landing-ctas { margin-top: 1.5rem; }
.hero-copy .landing-facts { margin-top: 1.25rem; }
.hero-demo { min-width: 0; }
/* Cards over the aurora are near-opaque instead of frosted: a backdrop blur would re-blur the canvas every frame. */
.hero-demo .chat-thread { padding: 1rem 1.25rem 1.25rem; }
.hero-demo .chat-prompt { margin-bottom: 1rem; }
.hero-demo .chat-reply :is(h3, .chat-reply-heading) { margin-bottom: .6rem; }
.hero-demo .chat-compare { gap: 1.25rem; }
.hero-demo .chat-user, .hero-demo .reply-body { font-size: .95rem; line-height: 1.55; }
.hero-demo .reply-body > *, .hero-demo .reply-content > *, .hero-demo .reply-visual > * { margin-bottom: .5rem; }
.hero-demo .reply-body li { margin-bottom: .25rem; }
.hero-demo .reply-body pre { padding: .65rem .85rem; font-size: .8rem; line-height: 1.45; }
.hero-demo .chat-avatar, .hero-demo .refused-badge { background: #2a1214; }
.hero-demo .refused-badge { color: #ff7a74; }
.hero-demo .typical-reply .reply-body { background: #1d1012; color: #f08a84; border: 1px solid #ef4b4b26; }
:is(.landing, .mission-page) .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--topbar-height); padding: 0 clamp(1rem, 4vw, 4rem) 0 clamp(1rem, 7vw, 7rem); border-bottom: 1px solid transparent; }
/* The bar starts clear over the hero and frosts as the page scrolls under it. */
@supports (animation-timeline: scroll()) {
  :is(.landing, .mission-page) .topbar { animation: topbar-frost linear both; animation-timeline: scroll(root); animation-range: 0 6rem; }
}
@supports not (animation-timeline: scroll()) {
  :is(.landing, .mission-page) .topbar { background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom-color: var(--rule); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
}
@keyframes topbar-frost {
  from { background: transparent; border-bottom-color: transparent; backdrop-filter: blur(0) saturate(1); }
  to { background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom-color: var(--rule); backdrop-filter: blur(14px) saturate(1.3); }
}
:is(.landing, .mission-page) .wordmark { display: inline-flex; align-items: center; gap: .45em; margin: 0; font-family: var(--font-mono); font-weight: 600; letter-spacing: -.02em; }
:is(.landing, .mission-page) .account-links { padding: .5rem 0; flex-wrap: nowrap; gap: 1.5rem; margin: 0; font-family: var(--font-mono); font-size: .8rem; }
:is(.landing, .mission-page) .account-links a { color: var(--ink); text-decoration: none; white-space: nowrap; }
:is(.landing, .mission-page) .account-links a:hover { text-decoration: underline; }
:is(.landing, .mission-page) .account-links span { color: var(--red); }
:is(.landing, .mission-page) .account-links:has(.nav-button) { gap: .5rem; }
/* Translucent so the aurora shows through without fighting the labels. */
:is(.landing, .mission-page) .account-links .nav-button { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 30px; padding: 0 .85rem; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 0; background: color-mix(in srgb, var(--bg) 75%, transparent); transition: background 120ms, border-color 120ms; }
:is(.landing, .mission-page) .account-links .nav-button:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 35%, transparent); background: color-mix(in srgb, var(--bg) 55%, transparent); }
:is(.landing, .mission-page) .account-links .nav-button.is-primary { border-color: var(--ink); background: var(--ink); color: var(--bg); }
:is(.landing, .mission-page) .account-links .nav-button.is-primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }

.landing-facts { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; list-style: none; padding: 0; margin: 1rem 0 0; font: .8rem/1.6 var(--font-mono); color: var(--ink-muted); }
.landing-facts li { margin: 0; }
.landing-facts span { color: var(--red); }
.mission-page main { position: relative; z-index: 1; max-width: 42rem; padding: clamp(3rem, 7vh, 6rem) 2rem 6rem; }
/* The text keeps the landing gutter so the aurora has the right half. */
@media (min-width: 900px) { .mission-page main { margin: 0; padding-left: clamp(1rem, 7vw, 7rem); max-width: calc(42rem + clamp(1rem, 7vw, 7rem)); } }
.mission-page .aurora { position: fixed; }
/* Short pages still put the footer at the bottom of the viewport. */
.mission-page { display: flex; flex-direction: column; min-height: 100svh; }
.mission-page main { flex: 1 0 auto; width: 100%; }
.site-footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding: 1.5rem clamp(1rem, 4vw, 4rem) 1.5rem clamp(1rem, 7vw, 7rem); border-top: 1px solid var(--rule); background: var(--bg); color: var(--ink-muted); font: .75rem/1.4 var(--font-mono); }
.site-footer p { display: inline-flex; align-items: center; gap: .6em; margin: 0; }
.site-footer nav { gap: .25rem 1.5rem; margin: 0; }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.footer-social { display: inline-flex; align-items: center; gap: .25rem; }
.site-footer .footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; }
.footer-social svg { width: 1.125rem; height: 1.125rem; fill: currentColor; }
.footer-legal { display: flex; align-items: center; gap: 1.25rem; }
.site-footer .inception-badge { display: block; padding: 0; opacity: .85; transition: opacity 120ms; }
.site-footer .inception-badge:hover { opacity: 1; }
.inception-badge img { display: block; width: 93px; height: auto; }
.footer-grouped { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(24rem, 1.5fr); align-items: start; gap: 2rem; padding-block: 2rem; }
.footer-brand { display: grid; justify-items: start; gap: 1rem; }
.footer-grouped .footer-legal { flex-wrap: wrap; gap: .75rem 1.25rem; }
.footer-grouped .footer-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 2rem; }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.site-footer .footer-group h2 { margin: 0 0 .25rem; color: var(--ink); font: inherit; font-weight: 600; }
@media (max-width: 760px) {
  .footer-grouped { grid-template-columns: 1fr; }
  .footer-grouped .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}

.menu-toggle { display: none; }
@media (min-width: 900px) { .site-menu { display: contents; } }
.mission-page .mission { font-size: 1rem; line-height: 1.8; }
:is(.landing, .mission-page) .mission-link { position: absolute; left: 50%; transform: translateX(-50%); }
.mission-page .mission p { margin: 0 0 1.1rem; }
.mission-page .mission h1 { margin: 0 0 1rem; font-size: 1.75rem; letter-spacing: -.02em; }
.mission-page .mission h2 { margin: 2rem 0 .5rem; font-size: 1rem; }
.mission-page .mission figure { margin: 1.25rem 0; }
.mission-page .mission .mission-lead { margin: 0 0 1.4rem; color: var(--red); font-size: 1.35rem; line-height: 1.4; font-weight: 550; letter-spacing: -.01em; }
.mission-page .mission .mission-mark { margin: 2rem 0; }
.mission-page .mission .mission-mark img { display: block; width: 28px; height: 28px; }
.cve-chart { color: var(--ink-muted); font-family: var(--font-mono); }
.cve-chart .cve-title { margin-bottom: .6rem; font-size: .75rem; font-weight: 500; }
.cve-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.cve-chart .cve-axis { fill: var(--ink-muted); font-size: 13px; }
.cve-chart .cve-grid { fill: none; stroke: var(--rule); stroke-width: .5; vector-effect: non-scaling-stroke; }
.cve-chart stop { stop-color: var(--red); }
.cve-chart .cve-area { fill: url(#cve-fill); }
.cve-chart .cve-line, .cve-chart .cve-projection { fill: none; stroke: var(--red); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cve-chart .cve-projection { stroke-dasharray: 1 4; }
.cve-chart .cve-cursor { pointer-events: none; }
.cve-chart .cve-crosshair { fill: none; stroke: var(--ink-muted); stroke-width: .5; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.cve-chart .cve-dot { fill: var(--red); stroke: var(--bg); stroke-width: 1.5; }
.cve-chart .cve-tooltip rect { fill: var(--bg); stroke: var(--rule); }
.cve-chart .cve-tooltip text { fill: var(--ink); font-size: 11px; }
.cve-chart figcaption { margin-top: .4rem; font-size: .65rem; line-height: 1.6; }
.cve-chart.cve-draw .cve-line { animation: cve-trace 1.2s ease-out; }
.cve-chart.cve-draw .cve-area { animation: cve-fade 1.2s ease-out; }
.cve-chart.cve-draw .cve-projection { animation: cve-fade .3s 1.1s both; }
@keyframes cve-trace { from { stroke-dasharray: 1 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1 1; stroke-dashoffset: 0; } }
@keyframes cve-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cve-chart.cve-draw .cve-line, .cve-chart.cve-draw .cve-area, .cve-chart.cve-draw .cve-projection { animation: none; }
}
.landing-ctas { display: flex; flex-wrap: wrap; align-items: stretch; gap: .75rem; margin: 1.5rem 0 0; }
.signup-cta { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: .6rem .9rem; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--bg); text-decoration: none; font: .8rem/1.3 var(--font-mono); transition: background 120ms, border-color 120ms; }
.signup-cta:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); border-color: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.logo-openai { --company-logo: url(/static/vendors/openai.svg); }
.hyperfast-cta { display: flex; align-items: stretch; border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); border-radius: 0; overflow: hidden; color: var(--ink); text-decoration: none; font: .8rem/1.3 var(--font-mono); transition: border-color 120ms, background 120ms; }
.hyperfast-tag { display: flex; align-items: center; padding: .6rem .75rem; background: var(--red); color: var(--bg); white-space: nowrap; }
.hyperfast-text { flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem .9rem; }
.hyperfast-text span { color: var(--red); transition: transform 120ms; }
.apple-mark { width: 1em; height: 1em; margin-right: -.2rem; flex: none; transform: translateY(-.08em); }
.hyperfast-cta:hover { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--bg)); }
.hyperfast-cta:hover .hyperfast-text span { transform: translateX(3px); }
.announcement { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4rem .75rem; min-height: var(--announcement-height); padding: .4rem 1rem; border-bottom: 1px solid color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 7%, var(--bg)); color: var(--ink); text-decoration: none; text-align: center; font: .75rem/1.4 var(--font-mono); }
.announcement-tag { padding: .15rem .45rem; background: var(--red); color: var(--bg); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.announcement-action { color: var(--red); white-space: nowrap; }
.announcement-action span { display: inline-block; transition: transform 120ms; }
.announcement:hover { background: color-mix(in srgb, var(--red) 12%, var(--bg)); }
.announcement:hover .announcement-action span { transform: translateX(3px); }
/* Desktop only: on phones the banner crowds the hero. */
@media (max-width: 599px) { .announcement { display: none; } }
@media (min-width: 600px) { body:has(.announcement) .landing-hero { min-height: calc(100svh - var(--topbar-height) - var(--announcement-height)); } }
.landing .used-by { position: relative; z-index: 1; width: auto; min-width: 0; margin: 0 clamp(1rem, 7vw, 7rem) clamp(2rem, 7vh, 4rem); padding: .75rem 1.4rem .25rem; border-top: 1px solid var(--rule); color: var(--ink-muted); }
.used-by > p { margin: 0 0 .5rem; font-size: .75rem; text-align: center; }
.logo-carousel { overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); }
.logo-track { display: flex; width: max-content; animation: logo-scroll 38s linear infinite; }
.logo-carousel:hover .logo-track { animation-play-state: paused; }
.logo-group { display: flex; align-items: center; gap: 3rem; flex: none; list-style: none; margin: 0; padding: 0 3rem 0 0; }
.logo-group li { display: flex; align-items: center; gap: .5rem; flex: none; margin: 0; font-size: 1.1rem; font-weight: 550; line-height: 1; white-space: nowrap; }
.company-logo { display: block; flex: none; height: 20px; width: 20px; background: currentColor; mask: var(--company-logo) center / contain no-repeat; }
.logo-databricks { --company-logo: url(/static/logos/databricks.svg); }
.logo-shopify { --company-logo: url(/static/logos/shopify.svg); width: 70px; }
.logo-anduril { --company-logo: url(/static/logos/anduril.svg); width: 109px; }
.logo-replit { --company-logo: url(/static/logos/replit.svg); width: 68px; }
.logo-vercel { --company-logo: url(/static/logos/vercel.svg); }
.logo-scale { --company-logo: url(/static/logos/scale.svg); width: 106px; }
.logo-ramp { --company-logo: url(/static/logos/ramp.svg); width: 71px; }
.logo-plaid { --company-logo: url(/static/logos/plaid.svg); width: 63px; height: 24px; }
.logo-robinhood { --company-logo: url(/static/logos/robinhood.svg); }
.used-by .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes logo-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-track { display: block; width: auto; animation: none; }
  .logo-group { flex-wrap: wrap; gap: 1.5rem 2rem; padding: 0; }
  .logo-group[aria-hidden="true"] { display: none; }
}
/* Only a viewport-sized slice is rasterised; the artwork's coordinates belong to the page.
   aurora.js moves the slice to the scroll position it drew, so the compositor scrolls it with the page between
   redraws; the overscan covers that lag. */
.aurora { position: absolute; inset: 0; pointer-events: none; z-index: 0; --aurora-overscan: 64px; }
.aurora canvas { position: absolute; top: 0; left: 0; display: block; width: 100%; height: calc(100vh + 2 * var(--aurora-overscan)); height: calc(100dvh + 2 * var(--aurora-overscan)); }
.dark .aurora::before { content: ""; position: absolute; inset: 0 0 auto; height: 100svh; background: radial-gradient(45% 60% at 80% 42%, #e3262e1f, transparent 70%); }
/* One glow pass: the filter reruns over the whole canvas on every redraw. */
.dark .aurora canvas { filter: drop-shadow(0 0 4px #ff3b3b66); }

.landing-story { position: relative; z-index: 1; display: grid; align-items: center; min-height: min(44rem, 100svh); margin: 0; padding: 2.5rem clamp(1rem, 7vw, 7rem); }
.story-inner { width: 100%; max-width: 64rem; margin: 0 auto; min-width: 0; }
.story-card, .story-tabs { background: #000000b8; border: 1px solid var(--rule); border-radius: 0; }
.story-heading { width: fit-content; max-width: 100%; padding: 1rem; }
.landing-story h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 550; line-height: 1.15; letter-spacing: -.035em; }
.chat-window { overflow: hidden; border-radius: 0; background: var(--chat-surface); box-shadow: var(--chat-shadow); }
.tab-progress { position: absolute; z-index: 1; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.chat-panels { display: grid; }
.chat-panel { grid-area: 1 / 1; min-width: 0; }
/* Hidden conversations still size the shared grid cell, but cannot be seen or focused. */
.chat-panel[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
.chat-thread { padding: 1.5rem; }
.chat-prompt { display: flex; justify-content: flex-end; margin: 0 0 1.5rem; }
.chat-user { position: relative; max-width: min(42rem, 90%); margin: 0; padding: .75rem 1rem; border-radius: 0; background: var(--chat-chrome); font-size: .875rem; line-height: 1.5; }
.prompt-visual { display: none; position: absolute; inset: 0; padding: inherit; }
.chat-user.is-typing .prompt-full { opacity: 0; }
.chat-user.is-typing .prompt-visual { display: block; }
.chat-compare { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: 1.5rem; }
.chat-reply { min-width: 0; }
.chat-reply :is(h3, .chat-reply-heading) { display: flex; align-items: center; gap: .625rem; min-height: 30px; margin: 0 0 .875rem; font-size: .875rem; font-weight: 600; line-height: 1.4; }
.chat-avatar { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 0; background: var(--chat-refusal); }
.chat-avatar img, .chat-avatar .company-logo { width: 18px; height: 18px; }
.chat-avatar-generic { background: var(--chat-chrome); color: var(--ink); }
.chat-model { padding: .25rem .45rem; border-radius: 0; background: var(--chat-code); color: var(--ink-muted); font: 400 .6875rem/1.4 var(--font-mono); white-space: nowrap; }
.refused-badge { margin-left: auto; padding: .25rem .45rem; border-radius: 0; background: var(--chat-refusal); color: var(--red); font: 500 .625rem/1.4 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.refused-badge.is-pending { visibility: hidden; }
.reply-body { position: relative; font-size: .875rem; line-height: 1.5; }
.reply-body > *, .reply-content > *, .reply-visual > * { margin: 0 0 .625rem; }
.reply-body > :last-child, .reply-content > :last-child, .reply-visual > :last-child { margin-bottom: 0; }
.reply-content { margin: 0; }
.reply-visual { display: none; position: absolute; inset: 0; }
.reply-body.is-streaming .reply-content { opacity: 0; }
.reply-body.is-streaming .reply-visual { display: block; }
.reply-body ul { padding-left: 1.1rem; }
.reply-body li { margin-bottom: .375rem; padding-left: .125rem; }
.reply-body li:last-child { margin-bottom: 0; }
.reply-body strong { font-weight: 600; }
.reply-body pre { padding: .75rem 1rem; border-radius: 0; background: var(--chat-code); white-space: pre-wrap; overflow-wrap: anywhere; font: .75rem/1.45 var(--font-mono); }
.reply-body code { font-family: var(--font-mono); font-size: .92em; }
.reply-body pre code { font: inherit; }
.reply-body :not(pre) > code { padding: .05em .3em; border-radius: 0; background: var(--chat-code); }
.typical-reply .reply-body { padding: 1rem; border-radius: 0; background: var(--chat-refusal); color: var(--red); }
.typical-reply .reply-visual { padding: inherit; }
.stream-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.15em; background: var(--red); }
.chat-thinking { display: inline-flex; gap: 4px; padding: .5rem 0; }
.chat-thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-muted); animation: chat-thinking 1s ease-in-out infinite; }
.chat-thinking span:nth-child(2) { animation-delay: .15s; }
.chat-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-thinking { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (max-width: 759px) {
  .chat-compare { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}
.story-tabs { display: flex; width: fit-content; max-width: 100%; padding: .3rem; gap: .25rem; }
.story-tabs [role="tab"] { min-height: 36px; border: 0; border-radius: 0; padding: .375rem .625rem; background: transparent; color: var(--ink-muted); font: .75rem/1.4 var(--font-mono); }
.story-tabs [role="tab"]:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.story-tabs [aria-selected="true"] { color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--bg)); }
.story-tabs [role="tab"]:focus-visible { outline-offset: -3px; }
.setup-story { min-height: 0; padding-top: 4rem; padding-bottom: 4rem; }
.agents-story { min-height: 0; padding-top: 6rem; padding-bottom: 6rem; }
.setup-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); align-items: center; gap: 1.5rem; }
.story-subline { margin: .75rem 0 1rem; max-width: 28rem; color: var(--ink-muted); font-size: .875rem; line-height: 1.45; }
.setup-code { min-width: 0; overflow: hidden; }
.setup-code .story-tabs { width: 100%; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: .25rem; }
.setup-code pre { margin: 0; padding: 1rem; min-height: 15rem; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; font: .6875rem/1.5 var(--font-mono); }
.setup-code code { font: inherit; }
.code-highlight { background: color-mix(in srgb, var(--red) 24%, transparent); color: #fff; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.section-heading { margin: 0 0 2rem; padding: 0; }
.section-heading .story-subline { margin-bottom: 0; }
.agents-story .section-heading { margin-left: auto; text-align: right; }
.outline-cta { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: .6rem .9rem; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 0; color: var(--ink); text-decoration: none; font: .8rem/1.3 var(--font-mono); transition: border-color 120ms, background 120ms; }
.outline-cta:hover { border-color: color-mix(in srgb, var(--ink) 45%, transparent); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; list-style: none; margin: 0; padding: 0; }
.agent-grid li { margin: 0; }
.agent-grid a { display: flex; align-items: center; gap: .75rem; height: 100%; min-height: 4rem; padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: 0; background: #000000b8; color: var(--ink-muted); font-size: .875rem; font-weight: 500; text-decoration: none; transition: color 120ms, border-color 120ms; }
.agent-grid a:is(:hover, :focus-visible) { border-color: color-mix(in srgb, var(--ink) 30%, transparent); color: var(--ink); }
.agent-grid a:focus-visible { outline-offset: 2px; }
.agent-grid svg { flex: none; width: 24px; height: 24px; color: var(--ink); }
.agent-emoji { flex: none; width: 24px; font-size: 20px; line-height: 1; text-align: center; filter: grayscale(1) brightness(1.6); }
.pay-methods { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .75rem 1.25rem; margin: 1.25rem 0 0; color: var(--ink-muted); font: .75rem/1.5 var(--font-mono); }
.pay-marks { display: inline-flex; align-items: center; gap: .9rem; color: var(--ink); }
.pay-marks svg { width: 22px; height: 22px; opacity: .85; }
.pay-divider { width: 1px; height: 18px; background: var(--rule); }
.price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.price-card { display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid var(--rule); border-radius: 0; background: #000000b8; }
.price-card.is-featured { border-color: color-mix(in srgb, var(--red) 55%, transparent); box-shadow: 0 0 60px -20px color-mix(in srgb, var(--red) 45%, transparent); }
.price-tier { margin: 0 0 1rem; color: var(--ink-muted); font: .75rem/1.5 var(--font-mono); }
.price-amount { display: flex; flex-direction: column; margin: 0 0 1.25rem; font-size: 2.25rem; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; }
.price-amount span { min-height: 1.5em; margin-top: .3rem; color: var(--ink-muted); font: 400 .75rem/1.5 var(--font-mono); letter-spacing: 0; }
.price-card ul { flex: 1; list-style: none; margin: 0 0 1.5rem; padding: 0; font-size: .85rem; }
.price-card li { margin: 0 0 .45rem; }
.price-card li span { color: var(--red); font-family: var(--font-mono); }
.token-prices { margin-top: 1rem; padding: .5rem 1.4rem; border: 1px solid var(--rule); border-radius: 0; background: #000000b8; overflow-x: auto; }
.token-prices table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.token-prices caption { padding: .75rem 0 .25rem; color: var(--ink-muted); font: .7rem/1.5 var(--font-mono); letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.token-prices th, .token-prices td { padding: .6rem 0; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.token-prices th { color: var(--ink-muted); font: 400 .75rem/1.5 var(--font-mono); }
.token-prices :is(th, td):first-child { text-align: left; }
.token-prices tbody tr:last-child td { border-bottom: 0; }
.token-prices td { font-family: var(--font-mono); font-size: .8rem; }
.token-prices td:first-child { font-family: var(--font-sans); font-size: .85rem; }
.pricing-more { margin: 1.25rem 0 0; text-align: right; font: .8rem/1.5 var(--font-mono); }
.pricing-more a { color: var(--ink-muted); text-decoration: none; }
.pricing-more a:hover { color: var(--ink); }
.blog-strip { min-height: 0; }
.blog-strip ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 0; padding: 0; list-style: none; }
.blog-strip a { color: var(--ink); text-decoration: none; }
.blog-strip li a:hover { color: var(--red); }
.blog-strip time { display: block; margin-top: .4rem; color: var(--ink-muted); font: .8rem/1.5 var(--font-mono); }
@media (max-width: 720px) { .blog-strip ul { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; } }
@media (max-width: 1099px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .price-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899px) {
  .setup-layout { grid-template-columns: minmax(0, 1fr); }
  .setup-layout > .story-heading { max-width: 30rem; }
}
@media (max-width: 599px) {
  .landing-ctas { flex-direction: column; align-items: stretch; }
  .landing-story { padding: 2rem 1rem; }
  .story-heading { padding: .75rem; }
  .chat-thread { padding: 1.25rem 1rem; }
  .chat-user { max-width: 100%; }
  .chat-reply :is(h3, .chat-reply-heading) { gap: .5rem; }
  .reply-body pre { padding: .75rem; }
  .story-tabs { width: 100%; gap: 0; }
  .story-tabs [role="tab"] { flex: 1; padding: .375rem .25rem; font-size: .65rem; }
  .setup-code pre { padding: .75rem; }
}

@media (max-width: 899px) {
  :is(.landing, .mission-page) .topbar { flex-wrap: nowrap; gap: .5rem; padding: 0 1rem; }
  :is(.landing, .mission-page) .wordmark { flex-shrink: 0; white-space: nowrap; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -10px -10px -10px auto; padding: 0; border: 0; background: transparent; color: var(--ink); }
  .menu-toggle:hover, .menu-toggle:has(+ .site-menu:popover-open) { background: transparent; color: var(--red); }
  .site-menu:popover-open { position: fixed; inset: calc(var(--topbar-height) - .25rem) 1rem auto auto; display: flex; flex-direction: column; min-width: 11rem; margin: 0; padding: .25rem 1rem; border: 1px solid var(--rule); border-radius: 0; background: var(--bg); box-shadow: 0 6px 24px #1c191714; color: var(--ink); }
  .site-menu .account-links { flex-direction: column; gap: 0; padding: 0; background: none; }
  .site-menu .mission-link { position: static; transform: none; border-bottom: 1px solid var(--rule); }
  .site-menu .account-links a { display: flex; align-items: center; gap: .5em; min-height: 44px; }
  .site-menu .account-links:has(.nav-button) { gap: .5rem; padding: .75rem 0; }
  .site-menu .account-links .nav-button { justify-content: center; }
  .hero-body { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 1.5rem 1rem 2rem; }
  .hero-demo .chat-thread { padding: 1rem; }
  .landing .used-by { margin: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); padding: .9rem 1rem 1rem; }
  .aurora { opacity: .35; }
}
@media (max-width: 400px) { main { padding: 2rem 1.25rem 4rem; } h1 { font-size: 1.5rem; } }

@media (max-width: 599px) {
  .mission-page main { padding: 2.5rem 1rem 4rem; }
  .site-footer { padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
  .site-footer a { display: inline-block; padding: .4rem 0; }
}

/* Desktop-only logo arrival; the page remains interactive throughout. */
html.intro-playing .landing { opacity: 0; }
html.intro-playing .landing .wordmark img { visibility: hidden; }
#landing-intro:not([hidden]) {
  position: fixed; inset: 0; z-index: 10000;
  pointer-events: none; overflow: hidden;
}
#landing-intro svg {
  position: absolute; left: 0; top: 0; width: 100px; height: 100px;
  overflow: visible; transform-origin: 50% 62.5%; opacity: 0;
}
@media (max-width: 767px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  #landing-intro:not([hidden]) { display: none; }
  html.intro-playing .landing { opacity: 1; }
  html.intro-playing .landing .wordmark img { visibility: visible; }
}

/* Thin scrollbars on the public pages. Firefox takes the standard properties; Chrome and Safari
   take the pseudo-elements, which also allow the red hover (Chrome ignores them once scrollbar-color is set). */
@supports not selector(::-webkit-scrollbar) {
  :root.dark { scrollbar-width: thin; scrollbar-color: #ffffff38 transparent; }
}
.dark ::-webkit-scrollbar, :root.dark::-webkit-scrollbar { width: 10px; height: 10px; }
.dark ::-webkit-scrollbar-track, :root.dark::-webkit-scrollbar-track, .dark ::-webkit-scrollbar-corner, :root.dark::-webkit-scrollbar-corner { background: transparent; }
.dark ::-webkit-scrollbar-thumb, :root.dark::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 0; background: #ffffff38 padding-box; }
.dark ::-webkit-scrollbar-thumb:hover, :root.dark::-webkit-scrollbar-thumb:hover { background-color: var(--red); }
.dark ::-webkit-scrollbar-thumb:active, :root.dark::-webkit-scrollbar-thumb:active { background-color: var(--red-6); }

.providers-page h2 { font-size: 1.1rem; font-weight: 550; margin: 0 0 1rem; }
.providers-page section { margin-top: 2.5rem; }
.providers-page li { margin-bottom: .65rem; }
.providers-page .provider-help { font-size: .875rem; color: var(--ink-muted); margin: .4rem 0 0; }
.providers-page fieldset { min-width: 0; margin: 1.75rem 0; padding: 0; border: 0; }
.providers-page legend { margin-bottom: .65rem; }
.provider-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 1rem; }
.provider-options label { display: flex; align-items: center; gap: .65rem; min-height: 44px; margin: 0; cursor: pointer; }
.provider-options input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--red); }
.providers-page textarea { display: block; width: 100%; resize: vertical; font: inherit; color: inherit; background: transparent; border: 1px solid var(--ink-muted); border-radius: 2px; padding: .6rem .7rem; }
.providers-page .provider-error { font-size: .875rem; margin: .4rem 0 0; }
.providers-page [aria-invalid="true"] { border-color: var(--red); }
@media (max-width: 480px) { .provider-options { grid-template-columns: 1fr; } }

/* Blog: a faint aurora behind the index and posts, like the docs panel. */
.blog-aurora { pointer-events: none; position: fixed; inset: 0; z-index: 0; opacity: .13; -webkit-mask-image: radial-gradient(ellipse 42% 85% at 50% 38%, rgb(0 0 0 / .12) 40%, #000); mask-image: radial-gradient(ellipse 42% 85% at 50% 38%, rgb(0 0 0 / .12) 40%, #000); }
.blog-aurora canvas { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .blog-aurora { display: none; } }

/* Blog: long-form posts in the mission column. Code tokens are classes; the CSP forbids inline styles. */
.blog-page .mission h2 { margin: 2.25rem 0 .6rem; font-size: 1.15rem; letter-spacing: -.01em; }
.blog-page .mission h3 { margin: 1.75rem 0 .5rem; font-size: 1rem; }
.blog-page .mission li { margin-bottom: .4rem; }
.blog-page .mission ol { padding-left: 1.25rem; }
.blog-page .mission blockquote { margin: 0 0 1.1rem; padding: .1rem 0 .1rem 1rem; border-left: 2px solid var(--red); color: var(--ink-muted); }
.blog-page .post-crumb { margin-bottom: .75rem; font: .8rem/1.4 var(--font-mono); }
.blog-page .post-meta { color: var(--ink-muted); font: .75rem/1.7 var(--font-mono); }
.blog-page .post-meta + * { margin-top: 2rem; }
.blog-page .draft-tag { color: var(--red); text-transform: uppercase; letter-spacing: .06em; }
/* The index heading stays for screen readers and search; the menu already says Blog. */
.blog-page .blog-index h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.blog-page .blog-index .post-list { margin-top: 0; }
.blog-page .post-list { margin: 2rem 0 0; padding: 0; list-style: none; }
.blog-page .post-list li { display: flex; gap: 1.25rem; align-items: flex-start; margin: 0; padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.blog-page .post-thumb { flex: 0 0 auto; display: block; width: 180px; }
.blog-page .post-thumb img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.blog-page .post-entry { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) { .blog-page .post-list li { flex-direction: column; gap: .75rem; } .blog-page .post-thumb { width: 100%; max-width: 320px; } }
.blog-page .post-list h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.blog-page .post-list h2 a { color: var(--ink); text-decoration: none; }
.blog-page .post-list h2 a:hover { color: var(--red); }
.blog-page .post-list p { margin: 0 0 .35rem; }
.blog-page .post-list .post-meta + * { margin-top: 0; }
.blog-page :not(pre) > code { padding: .05em .3em; background: var(--chat-code); font: .88em var(--font-mono); overflow-wrap: anywhere; }
.blog-page pre.code { margin: 0 0 1.25rem; padding: .9rem 1rem; overflow-x: auto; background: var(--chat-code); border: 1px solid var(--rule); font: .8rem/1.55 var(--font-mono); tab-size: 2; }
.blog-page pre.code code { font: inherit; }
.tok-c { color: var(--ink-muted); font-style: italic; }
.tok-s { color: #9fd6a6; }
.tok-k { color: var(--red); }
.tok-n, .tok-v { color: #e8b56d; }
:root:not(.dark) .tok-s { color: #2f6b38; }
:root:not(.dark) :is(.tok-n, .tok-v) { color: #8a5a12; }
.blog-page .table-scroll { margin: 0 0 1.25rem; overflow-x: auto; }
.blog-page table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.5; }
.blog-page th, .blog-page td { padding: .45rem .75rem .45rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.blog-page th { color: var(--ink-muted); font: 500 .75rem/1.5 var(--font-mono); }
.blog-page thead:has(th:empty) { display: none; }
.blog-page mark.need { padding: 0 .2em; background: #ef4b4b2e; color: var(--ink); outline: 1px dashed var(--red); }
.blog-page figure { margin: 0 0 1.5rem; }
.blog-page figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.blog-page figcaption { margin-top: .5rem; color: var(--ink-muted); font-size: .8rem; line-height: 1.5; }
.blog-page figcaption .credit { font: .7rem/1.5 var(--font-mono); }
.blog-page figcaption a { color: inherit; }
.blog-page .post-cover { margin: 0 0 2rem; }

/* Free credits: four cards stepping diagonally down the page, sized to fit one viewport on desktop. */
.free-credits-page main.credit-stairs { max-width: none; margin: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 1fr repeat(5, auto) 1fr; gap: clamp(.4rem, 1.4vh, .9rem) 1rem; padding: clamp(.75rem, 2.5vh, 2.5rem) clamp(1rem, 4vw, 4rem) clamp(.75rem, 2.5vh, 2.5rem) clamp(1rem, 7vw, 7rem); font-size: clamp(.78rem, 1.7vh, .95rem); line-height: 1.5; }
/* Equal fr rows above the title and around the fine print keep the steps centred and the fine print on the footer. */
.credit-stairs::before { content: ""; grid-column: 1 / -1; grid-row: 1; }
.credit-stairs h1 { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: clamp(1.4rem, 4vh, 2.25rem); letter-spacing: -.02em; }
.credit-card { position: relative; margin: 0; display: flex; flex-direction: column; gap: .3rem; padding: clamp(.6rem, 1.7vh, 1.15rem) clamp(.9rem, 1.5vw, 1.35rem); border: 1px solid var(--rule); background: #000000b8; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color 160ms, transform 160ms; }
.credit-card:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); transform: translateY(-2px); }
.credit-card:nth-of-type(1) { grid-column: 1 / span 4; grid-row: 3; }
.credit-card:nth-of-type(2) { grid-column: 2 / span 4; grid-row: 4; }
.credit-card:nth-of-type(3) { grid-column: 3 / span 4; grid-row: 5; }
.credit-card:nth-of-type(4) { grid-column: 4 / span 4; grid-row: 6; }
.credit-card.is-featured { border-color: color-mix(in srgb, var(--red) 55%, transparent); box-shadow: 0 0 60px -20px color-mix(in srgb, var(--red) 45%, transparent); }
.credit-card h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: 1.12em; letter-spacing: -.01em; }
.credit-card p { margin: 0; color: var(--ink-muted); }
.credit-status { padding: 0 .4rem; border: 1px solid color-mix(in srgb, var(--red) 55%, transparent); color: var(--red-6); font: 500 .62rem/1.6 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.credit-action { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; margin-top: .15rem; color: var(--ink); font: .8rem/1.4 var(--font-mono); text-decoration: none; }
.credit-action:hover { color: var(--red-6); }
.credit-action:focus-visible, .credit-terms a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
/* The fine print runs the full width just above the footer, well clear of the last step. */
.credit-terms { grid-column: 1 / -1; grid-row: 7; align-self: end; margin: clamp(1.5rem, 5vh, 4rem) 0 0; color: var(--ink-muted); font: .68rem/1.5 var(--font-mono); }
.credit-terms a { color: var(--ink); }
@media (min-width: 900px) and (min-height: 700px) {
  .free-credits-page { height: 100svh; min-height: 0; }
  .free-credits-page main.credit-stairs { flex: 1 1 auto; min-height: 0; }
}
@media (max-width: 899px) {
  .free-credits-page main.credit-stairs { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; padding: 2rem 1rem 3rem; font-size: .95rem; }
  .credit-stairs::before { display: none; }
  .credit-stairs h1, .credit-card:nth-of-type(n), .credit-terms { grid-column: 1 / -1; grid-row: auto; }
  .credit-terms { margin-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { .credit-card { transition: none; } .credit-card:hover { transform: none; } }

.affiliates-page { overflow: auto; }
.affiliates-page main.affiliate-public { width: min(100% - 2rem, 1060px); max-width: none; margin: 2rem auto 4rem; padding: 0; }
.affiliate-public h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.2; margin-bottom: 1rem; }
.affiliate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.affiliate-grid section { padding: 1.5rem; border: 1px solid var(--rule); background: #000000b8; min-width: 0; }
.affiliate-grid h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.affiliate-grid p { color: var(--ink-muted); margin: .75rem 0; }
.affiliate-grid a { color: var(--ink); overflow-wrap: anywhere; }
.affiliate-grid summary { cursor: pointer; padding: .6rem 0; }
.affiliate-grid input, .affiliate-grid textarea, .affiliate-grid select, .affiliate-grid button { font: inherit; color: var(--ink); background: #161616; border: 1px solid var(--rule); padding: .65rem; max-width: 100%; }
.affiliate-grid form, .affiliate-grid label { display: grid; gap: .5rem; }
.affiliate-grid form { gap: 1rem; }
.affiliate-grid input, .affiliate-grid textarea { width: 100%; box-sizing: border-box; }
.affiliate-grid li { padding: .35rem 0; }
@media (max-width: 700px) { .affiliate-grid { grid-template-columns: minmax(0, 1fr); } }

/* The hero demo is drawn as the RedRouter Mac app, in its dark palette (macos/Sources/RedRouter/Theme.swift). */
.mac-demo {
  --mac-surface: #181818; --mac-sidebar: #141414; --mac-ink: #e8e8e8; --mac-secondary: #acacac;
  --mac-bubble: #252525; --mac-border: #ffffff1f; --mac-selected: #333333; --mac-hover: #ffffff0f;
  --mac-code: #202020; --mac-brand: #e4504a;
  position: relative;
}
@media (min-width: 1100px) { .landing-hero .hero-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.55fr); } }

.mac-demo .mac-window {
  display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); overflow: visible;
  border: 1px solid var(--mac-border); border-radius: 12px; background: var(--mac-surface); color: var(--mac-ink);
  box-shadow: 0 0 0 .5px #000, 0 28px 70px -18px #000000e6, 0 10px 24px -8px #00000099;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font-sans); -webkit-font-smoothing: antialiased;
}
.mac-demo svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
:where(.mac-demo .mac-window) button { margin: 0; border: 0; background: none; color: inherit; font: inherit; cursor: default; }

/* Sidebar */
.mac-sidebar { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #ffffff12; border-radius: 11px 0 0 11px; background: var(--mac-sidebar); }
/* One rhythm for every sidebar row: 28px rows, 2px apart, contents aligned 16px from the edge. */
.mac-titlebar { display: flex; align-items: center; gap: 1rem; height: 44px; padding: 0 10px 0 16px; }
.mac-lights { display: flex; gap: 8px; }
/* Like macOS, hovering any of the three lights reveals all three glyphs. */
.mac-demo .mac-lights button { display: grid; place-items: center; width: 12px; height: 12px; padding: 0; border-radius: 50%; background: #ff5f57; color: #8c1a10; box-shadow: inset 0 0 0 .5px #0000004d; }
.mac-demo .mac-lights button:nth-child(2) { background: #febc2e; color: #985712; }
.mac-demo .mac-lights button:nth-child(3) { background: #28c840; color: #0b650d; }
.mac-lights svg { width: 8px; height: 8px; stroke-width: 1.6; opacity: 0; transition: opacity .1s; }
.mac-lights svg .mac-fill { fill: currentColor; stroke: none; }
.mac-lights:hover svg, .mac-lights:focus-within svg { opacity: 1; }
.mac-lights button:active { filter: brightness(.8); }
.mac-demo .mac-icon { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 7px; color: var(--mac-secondary); }
.mac-demo .mac-icon:hover { background: var(--mac-hover); color: var(--mac-ink); }
.mac-icon svg { width: 18px; height: 18px; }
.mac-nav { display: grid; gap: 2px; margin: 0; padding: 4px 8px 0; list-style: none; }
.mac-nav li { margin: 0; padding: 0; }
.mac-demo .mac-nav button { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border-radius: 8px; font-size: 13px; line-height: 1; text-align: left; }
.mac-demo .mac-nav button:hover { background: var(--mac-hover); }
.mac-demo .mac-nav button.is-selected { background: var(--mac-selected); }
.mac-nav svg { width: 16px; height: 16px; flex: none; color: var(--mac-secondary); }
.mac-nav button:hover svg, .mac-nav button.is-selected svg { color: var(--mac-ink); }
.mac-group { margin: 18px 16px 4px; color: var(--mac-secondary); font-size: 12px; line-height: 16px; }

.mac-demo .mac-chats { flex-direction: column; width: auto; max-width: none; margin: 0; padding: 0 8px; gap: 2px; border: 0; background: transparent; }
.mac-demo .mac-chats [role="tab"] {
  position: relative; overflow: hidden; display: block; height: 28px; min-height: 0; padding: 0 8px; border-radius: 8px;
  background: transparent; color: var(--mac-ink); font-family: inherit; font-size: 13px; font-weight: 400; line-height: 28px; text-align: left;
  white-space: nowrap; text-overflow: ellipsis;
}
.mac-demo .mac-chats [role="tab"]:hover { background: var(--mac-hover); color: var(--mac-ink); }
.mac-demo .mac-chats [aria-selected="true"], .mac-demo .mac-chats [aria-selected="true"]:hover { background: var(--mac-selected); color: var(--mac-ink); }
.mac-demo .mac-chats [aria-selected="true"]::after { content: none; }
.mac-demo .mac-chats .tab-progress { background: var(--mac-brand); }
.mac-demo .mac-window.is-download .mac-chats [aria-selected="true"] { background: transparent; }
.mac-demo .mac-window.is-download .mac-chats [aria-selected="true"]:hover { background: var(--mac-hover); }
.mac-demo .mac-window.is-download .tab-progress { visibility: hidden; }

/* Chat pane */
.mac-main { display: flex; flex-direction: column; min-width: 0; min-height: 35rem; border-radius: 0 11px 11px 0; }
.mac-main .chat-panels { flex: 1; }
.mac-header { position: relative; display: flex; align-items: center; justify-content: center; height: 46px; padding: 0 5.5rem; font-size: 13px; font-weight: 500; }
.mac-header span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mac-header em { position: absolute; right: 16px; color: var(--mac-secondary); font-style: normal; font-weight: 400; }

.mac-demo .chat-thread { max-width: 768px; margin: 0 auto; padding: .5rem 1.75rem 1rem; }
.mac-demo .chat-prompt { margin-bottom: 1.25rem; }
.mac-demo .chat-user { max-width: 80%; padding: 10px 14px; border-radius: 18px; background: var(--mac-bubble); font-size: 14px; line-height: 1.5; }
.mac-demo .chat-compare { display: block; }
.mac-demo .chat-reply-heading { gap: 8px; min-height: 0; margin-bottom: .6rem; color: var(--mac-secondary); font-size: 12px; font-weight: 500; }
.mac-demo .chat-avatar { width: 22px; height: 22px; border-radius: 6px; background: #2a1214; }
.mac-demo .chat-avatar img { width: 14px; height: 14px; }
.mac-demo .chat-model { padding: 2px 6px; border-radius: 5px; background: var(--mac-code); font-size: 11px; }
.mac-demo .reply-body { font-size: 14px; line-height: 1.6; }
.mac-demo .reply-body pre { padding: .7rem .9rem; border: 1px solid #ffffff12; border-radius: 10px; background: var(--mac-code); font-size: 12.5px; }
.mac-demo .reply-body :not(pre) > code { border-radius: 5px; background: var(--mac-code); }
.mac-demo .stream-caret { background: var(--mac-brand); }

/* The other assistant's answer sits as a second window, offset diagonally off the app's lower-left corner. */
.mac-demo .typical-reply {
  position: absolute; z-index: 3; left: -3rem; bottom: 1.5rem; width: 17.5rem; padding: 34px 16px 18px;
  border: 1px solid #ef4b4b40; border-radius: 12px; background: #1d1012f5; backdrop-filter: blur(20px);
  box-shadow: 0 24px 56px -14px #000000f2, 0 0 0 .5px #000;
}
.mac-demo .typical-reply::before {
  content: ""; position: absolute; top: 12px; left: 14px; width: 10px; height: 10px; border-radius: 50%;
  background: #ffffff26; box-shadow: 16px 0 #ffffff26, 32px 0 #ffffff26;
}
.mac-demo .typical-reply .chat-reply-heading { margin-bottom: .6rem; color: var(--mac-ink); font-size: 14px; }
.mac-demo .typical-reply .chat-avatar { width: 24px; height: 24px; background: #ffffff14; }
.mac-demo .typical-reply .chat-avatar .company-logo { width: 15px; height: 15px; }
.mac-demo .refused-badge { border-radius: 5px; background: #ef4b4b26; color: #ff7a74; }
.mac-demo .typical-reply .reply-body { padding: 0; border: 0; background: none; color: #f2a19c; font-size: 14px; line-height: 1.55; }

.mac-demo .mac-composer {
  display: flex; flex-direction: column; gap: 10px; width: calc(100% - 2.5rem); max-width: 740px; margin: 0 auto 1.25rem;
  padding: 14px 12px 12px 16px; border: 1px solid var(--mac-border); border-radius: 22px; background: var(--mac-code); font-size: 14px; text-align: left; cursor: text;
  transition: border-color .15s;
}
.mac-demo .mac-composer:hover { border-color: #ffffff38; }
.mac-composer:hover .mac-pill { background: var(--mac-hover); color: var(--mac-ink); }
.mac-placeholder { color: var(--mac-secondary); }
.mac-controls { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.mac-pill { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 14px; color: var(--mac-secondary); font-size: 12px; }
.mac-pill svg { width: 10px; height: 10px; stroke-width: 1.6; }
.mac-send { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mac-brand); color: #171113; }
.mac-send svg { width: 14px; height: 14px; stroke-width: 2; }

/* Any app control swaps the chat for the download prompt. */
.mac-window.is-download .chat-panels, .mac-window.is-download .mac-composer { display: none; }
.mac-download { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; text-align: center; white-space: nowrap; animation: mac-in .25s ease-out; }
.mac-download[hidden] { display: none; }
.mac-download img { margin-bottom: 16px; }
.mac-demo .mac-download-title { margin: 0 0 6px; font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: -.01em; }
.mac-download-line { margin: 0 0 20px; color: var(--mac-secondary); font-size: 14px; line-height: 20px; }
.mac-download-cta { display: inline-flex; align-items: center; gap: .5rem; height: 44px; margin-bottom: 20px; padding: 0 1.4rem; border-radius: 22px; background: var(--red); color: #fff; font-size: 15px; font-weight: 500; text-decoration: none; box-shadow: 0 8px 24px -8px #b0161ccc; transition: background .15s; }
.mac-download-cta:hover { background: #c71c23; }
.mac-download-cta .apple-mark { width: 16px; height: 16px; margin-top: -2px; fill: currentColor; stroke: none; }
.mac-download small { color: var(--mac-secondary); font-size: 12px; line-height: 16px; }
@keyframes mac-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .mac-download { animation: none; } }

@media (max-width: 1099px) {
  .mac-demo .mac-window { grid-template-columns: 11.5rem minmax(0, 1fr); }
  .mac-demo .typical-reply { left: -2.25rem; bottom: 1.5rem; width: 14.5rem; }
}
@media (max-width: 899px) {
  .mac-demo .typical-reply { left: -.5rem; }
}
@media (max-width: 759px) {
  .mac-demo .mac-window { grid-template-columns: minmax(0, 1fr); }
  .mac-sidebar { flex-flow: row wrap; align-items: center; border-right: 0; border-bottom: 1px solid #ffffff12; border-radius: 11px 11px 0 0; }
  .mac-group, .mac-demo .mac-icon { display: none; }
  .mac-titlebar { height: 40px; }
  .mac-nav { display: flex; gap: 2px; margin-left: auto; padding: 0 8px; }
  .mac-demo .mac-nav button { justify-content: center; width: 32px; height: 30px; padding: 0; }
  .mac-nav button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mac-demo .mac-chats { flex: 1 0 100%; flex-direction: row; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .mac-demo .mac-chats [role="tab"] { flex: none; }
  .mac-main { min-height: 0; border-radius: 0 0 11px 11px; }
  .mac-download { min-height: 24rem; }
  .mac-header em { display: none; }
  .mac-header { padding: 0 1rem; }
  .mac-demo .chat-thread { padding: .5rem 1rem 1rem; }
  .mac-demo .typical-reply { position: static; width: auto; margin: 1.5rem 12% 0 -1.5rem; backdrop-filter: none; }
  .mac-composer { width: calc(100% - 2rem); margin-bottom: 1rem; }
}
